text
stringlengths
2.85k
2.55M
label
class label
11 classes
arXiv:1802.08726v1 [cs.CV] 23 Feb 2018 Longitudinal Face Aging in the Wild - Recent Deep Learning Approaches Chi Nhan Duong Concordia University Montreal, Quebec, Canada Email: c [email protected] Khoa Luu CyLab Biometrics Center Dept. of Electrical and Computer Engineering Carnegie Mellon University Pittsburgh, PA, USA Email: [email protected] Kha Gia Quach Concordia University Montreal, Quebec, Canada Email: k [email protected] Tien D. Bui Concordia University Montreal, Quebec, Canada Email: [email protected] Abstract—Face Aging has raised considerable attentions and interest from the computer vision community in recent years. Numerous approaches ranging from purely image processing techniques to deep learning structures have been proposed in literature. In this paper, we aim to give a review of recent developments of modern deep learning based approaches, i.e. Deep Generative Models, for Face Aging task. Their structures, formulation, learning algorithms as well as synthesized results are also provided with systematic discussions. Moreover, the aging databases used in most methods to learn the aging process are also reviewed. Keywords-Face Aging, Face Age Progression, Deep Generative Models. I. I NTRODUCTION In recent years, age progression has received considerable interest from the computer vision community. Starting from the predominant approaches that require lots of time and professional skills with the support from forensic artists, several breakthroughs have been achieved. Numerous automatic age progression approaches from anthropology theories to deep learning models have been proposed. In general, the age progression methods can be technically classified into four categories, i.e. modeling, reconstruction, prototyping and deep learning based methods. The methods in the first three categories usually tend to simulate the aging process of facial features by (1) adopting prior knowledge from anthropometric studies ; or (2) representing the face geometry and appearance by a set of parameters via conventional models such as Active Appearance Models (AAMs), 3D Morphable Models (3DMM) and manipulate these parameters via learned aging functions. Although they have achieved some inspiring synthesis results, these face representations are still linear and facing lots of limitations in modeling the non-linear aging process. Meanwhile, the fourth category introduces modern approaches with the state-of-the-art Deep Generative Models (DGM) for both face modeling and aging embedding Figure 1. Given input images, Age Progression task is to predict the future faces of that subject many years later. process. Since deep learning structures have more capabilities of interpreting and transferring the highly non-linear features of the input signals, they are more suitable for modeling the human aging process. As a result, superior synthesized facial images [10], [11], [12], [39], [41] can be generated. Inspired by these state-of-the-art results, in this paper, we aim to provide a review of recent developments for face age progression. Both structures and formulations of several Deep Generative Models, i.e. Restricted Boltzmann Machines (RBM), Deep Boltzmann Machines (DBM), and Generative Adversarial Network (GAN), as well as the way they are adopted to age progression problem will be presented. Moreover, several common face aging databases are also reviewed. II. FACE AGING DATABASES Database collection for face aging is also a challenging problem. There are several requirements during the collecting process. Not only should each subject have images at different ages, but also the covered age range should be large. Therefore, face aging databases are still limited in terms of age labels and the number of available databases. The characteristics and age distributions of several current existing face aging databases are summarized in Table I and Table I P ROPERTIES OF DIFFERENT AGING DATABASES .“I N - THE - WILD ” IMAGES ARE THE ONES COLLECTED FROM UNCONSTRAINED REAL - WORLD CONDITIONS . Database MORPH - Album 1 [30] MORPH - Album 2 [30] FG-NET [1] AdienceFaces [21] CACD [6] IMDB-WIKI [31] AgeDB [25] AGFW (Ours) [10] AGFW-v2 (Ours) Figure 2. # Images 1690 55134 1002 26580 163446 523051 16488 18685 36325 # Subjects 628 13000 82 2984 2000 20284 568 14185 27688 Label type Years old Years old Years old Age groups Years old Years old Years old Age groups Age groups Normalized Age Distribution of Face Aging Databases Fig. 2. Further than these databases, a large-scale in-thewild dataset, named AGing Face in-the-Wild (AGFW), was also introduced in our work [10] with 18,685 facial images with individual ages sampled ranging from 10 to 64. In this database, images are divided into 11 age groups with the span of 5 years, each group contains 1,700 images on average. This database is then extended to AGFW-v2 with double scale, i.e. 36,325 images with an average of 3,300 images per age group. Image type Mugshot Mugshot In-the-wild In-the-wild In-the-wild In-the-wild In-the-wild In-the-wild/Mugshot In-the-wild/Mugshot Subject type Non-famous non-famous Non-famous Non-famous Celebrities Celebrities Celebrities Non-famous Non-famous Clean Label 4 4 4 4 7 7 4 4 4 Public 4 4 4 4 4 4 4 4 4 by learning some aging functions from the relationship of the parameter sets of different age groups. In particular, Pattersons et al. [26] and Lanitis et al. [20] employed a set of Active Appearance Models (AAMs) parameters with four aging functions to model both the general and the specific aging processes. Four variations of aging functions were introduced: Global Aging Function, Appearance Specific Aging Function (ASA), Weighted Appearance Aging Function (WAA), and Weighted Person Specific Aging Function (WSA). Also by employing AAMs during the modeling step, Luu et al. [24] later incorporated familial facial cues to the process of face age progression. Another direction of modeling was proposed in [13] with a definition of AGing pattErn Subspace (AGES). In this approach, the authors construct a representative subspace for aging patterns as a chronological sequence of face images. Then given an image, the proper aging pattern is determined by the projection in this subspace that produces smallest reconstruction error. Finally, the synthesized result at a target age is obtained by the reconstructed faces corresponding to that age position in the subspace. Tsai et al. [38] then enhanced the AGES using guidance faces corresponding to the subject’s characteristics to produce more stable results. Suo et al. [35], [36] introduced the three-layer And-Or Graph (AOG) of smaller parts, i.e. eyes, nose, mouth, etc., to model a face. Then, the face aging process was learned for each part using a Markov chain. III. C ONVENTIONAL A PPROACHES In this section, we provide a brief review of conventional age progression approaches including modeling, prototyping, and reconstructing based approaches. Their properties are also summarized in Table II. A. Modeling-based approach Modeling-based approach is among the earliest categories presented for face age progression. These methods usually exploit some kinds of appearance models, i.e. Active Appearance Models (AAM), 3D Morphable Models (3DMM), to represent the shapes and texture of the input face by a set of parameters. Then the aging process is simulated B. Prototyping approach The main idea of the methods in this category is to predefine some types of aging prototypes and transfer the difference between these prototypes to produce synthesized face images. Usually, the aging prototypes are defined by the average faces of all age groups [32]. Then, input face image can be progressed to the target age by incorporating the differences between the prototypes of two age groups [5]. Notice that this approach requires a good alignment between faces in order to produce plausible results. KemelmacherShlizerman et al. [18] then proposed to construct high quality average prototypes from a large-scale set of images. Table II A SUMMARY OF C ONVENTIONAL A PPROACHES FOR AGE P ROGRESSION . Method Lanitis et al. 2002 [20] Pattersons et al. 2006 [26] Luu et al. 2009 [24] Geng et al. 2007 [13] Tsai et al. 2014 [38] Suo et al. 2010 [36] Suo et al. 2012 [35] KemelmacherShlizerman et al. 2014 [18] Shu et al. 2015 [34] Yang et al. 2016 [40] Approach Representation Architecture Model based AAMs 7 Model based AAMs 7 Summary Model generic and specific aging processes four types of aging functions Learning Effects of morphological changes More efforts on the adult aging stage Model based AAMs 7 Incorporated familial facial cues Model based Aging Patterns Aging Pattern Subspace Grammatical face model Model based Aging Patterns Aging Pattern Subspace Guidance faces according to subject’s feature Model based Part-based And-Or-Graph Markov Chain on Parse Graphs Model based Part-based And-Or-Graph Composition of short-term graph evolution Prototype Image pixel 7 Reconstructing Sparse Representation Coupled dictionaries Reconstructing Sparse Representation Hidden Factor Analysis Illumination normalization and subspace alignment before transferring difference between prototypes. Dictionary Learning with personality-aware coupled reconstruction loss Sparse reconstruction with age-specific feature Shu et al. [34] proposed to use the aging coupled dictionaries (CDL) to model personalized aging patterns by preserving personalized facial features. The dictionaries are learned using face pairs from neighboring age groups via a personalityaware coupled reconstruction loss. Yang et al. [40] represented person-specific and age-specific factors independently using sparse representation hidden factor analysis (HFA). Since only age-specific gradually changes over time, the age factor is transformed to the target age group via sparse reconstruction and then combined with the identity factor to achieve the aged face. Figure 3. Examples of age-progressed faces obtained by IlluminationAware Age Progression approach [18]. Sharper average faces are obtained via the collection flow method introduced in [23] to align and normalize all the images in one age group. Then illumination normalization and subspace alignment technique are employed to handle images with various lighting conditions. Figure 3 illustrates the results obtained in [18]. C. Reconstructing-based approach Rather than constructing aging prototypes for each age group, the reconstructing-based methods focus on constructing the “aging basis” for each age group and model aging faces by the combination of these bases. Dictionary learning techniques are usually employed for this type of approach. IV. D EEP G ENERATIVE M ODELS FOR FACE AGING In this section, we firstly provide an overview of the structures and formulations of the common Deep Generative Models before going through the age progression techniques developed from these structures. A. From Linear Models to Deep Structures Compared to linear models such as AAMs and 3DMM, deep structures have gained significant attention as one of the emerging research topics in both representing higherlevel data features and learning the distribution of observations. For example, being designed following the concepts from Probabilistic Graphical Models (PGM), the RBMbased models organize their non-linear latent variables in multiple connected layers with an energy function such that each layer can learn a different factor to represent the data variations. This section introduces the structures, formulations of several Deep Generative Models including RBM, Deep Boltzmann Machines (DBM), Generative Adversarial Networks (GANs). Figure 4. Structures of (a) RBM, (b) TRBM and (c) DBM. 1) Restricted Boltzmann Machines (RBM) [15]: are undirected graphical models consisting two layers of stochastic units, i.e. visible v and hidden units h. This is a simplified version of Boltzmann Machines where no intra connections between units in the same layer is created. RBM structure is a bipartite graph where visible and hidden units are pairwise conditionally independent. Given a binary state of v, h, the energy of RBM and the joint distribution of visible and hidden units can be computed as −E(v, h) = vT Wh + bT v + aT h 1 P (v, h; θ) = exp{−E(v, h)} Z(θ) (1) where θ = {W, b, a} denotes the parameter set of RBM including the connection weights and the biases of visible and hidden units, respectively. The conditional probabilities RBM structure can be P v w +a computed as p(h = 1|v) = σ( i ij j ) and p(vi = 1|h) = j i P σ( j hj wij + bi ) where σ(·) is the logistic function. In the original RBM, both visible and hidden units are binary. To make it more powerful and be able to deal with real-valued data, an extension of RBM, named Gaussian Restricted Boltzmann Machine, is introduced in [19]. In Gaussian RBM, the visible units are assumed to have values in [−∞, ∞] and normally distributed with mean bi and variance σi2 . Another extension of RBM is Temporal Restricted Boltzmann Machines (TRBM) [37] which was designed to model complex time-series structure. The structure of TRBM is shown in Fig. 4 (b). The major difference between the original RBM and TRBM is the directed connections from both visible and hidden units of previous states to the current states. With these new connections, the short history of their activations can act as “memory” and is able to contribute to the inference step of current states of visible units. 2) Deep Boltzmann Machines (DBM): As an extension of RBM with more than one hidden layer, the structure of DBM contains several RBMs organized in layers. Thanks to this structure, the hidden units in higher layer can learn more complicated correlations of features captured in lower layer. Another interesting point of DBM is that these higher representations can be built from the training data in an unsupervised fashion. Unlike other models such as Deep Belief Network [16] or Deep Autoencoders [4], all connections between units in two consecutive layers are undirected. As a result, each unit receives both bottom-up and topdown information and, therefore, can better propagate uncertainty during the inference process. Let {h(1) , h(2) } be the set of units in two hidden layers, the energy of the state {v, h(1) , h(2) } is given as follows. −E(v, h(1) , h(2) ; θ) =v> W(1) h(1) + h(1)> W(2) h(2) (2) where θ = {W(1) , W(2) } are the weights of visible-tohidden and hidden-to-hidden connections. Notice that the bias terms for visible and hidden units are ignored in Eqn. (2) for simplifying the representation. Exploiting the advantages of DBM, Deep Appearance Models (DAM) [9] and Robust Deep Appearance Models (RDAM) [27] have been introduced and proven to be superior to other classical models such as AAMs in inferencing a representation for new face images under various challenging conditions. 3) Generative Adversarial Networks (GAN): In order to avoid the intractable Markov chain sampling during the training stage of RBM, Goodfellow et al. [14] borrowed the idea from adversarial system to design their Generative Adversarial Networks (GAN). The intuition behind this approach is to set up a game between generator and discriminator. On one hand, the discriminator learns to determine whether given data are from the generator or real samples. On the other hand, the generator learns how to fool the discriminator by its generated samples. This game continues as the learning process takes place. The learning process will stop at a point that the discriminator can’t distinguish between real data and the ones produced by the generator. This is also an indication that the generator has already learned the distribution of input data. Formally, let x be the input data, pg be the distribution learned from generator, and pz (z) be the prior distribution of variable z. Then GAN is defined by two neural networks representing two differentiable functions for the generator G(z, θg ) : z 7→ x and discriminator D(x, θd ) : x 7→ y where y denotes the probability that x comes from the data distribution rather than pg ; θg and θd are the parameters of the CNNs representing G and D, respectively. The training process is then formulated as maximizing the probability D(x) while minimizing log (1 − D(G(z))): min max V (D, G) =Ex∼pdata (x) [log D(x)] G D + Ez∼pz (z) [log (1 − D(G(z)))] (3) In original GAN, the use of fully connected neural network for its generator makes it very hard to generate highresolution face images. Then numerous extensions of GAN focusing on different aspects of this structure have been proposed in literature such as Laplacian pyramid Generative Adversarial Networks (LAPGAN) [8], Deep Convolutional Generative Adversarial Networks (DCGAN) [28], Info-GAN [7], Wasserstein GAN [3]. B. Deep Aging Models for Age Progression Thanks to the power of Deep Learning models in terms of non-linear variations modeling, many deep learning based age progression approaches have been recently developed and achieved considerable results in face age progression. Table III summarizes the key features of these deep learning based approaches. TRBM-based model: In addition to single face modeling, a TRBM based age progression model is introduced in [10] to embed the temporal relationship between images in a face sequence. By taking the advantages of log-likelihood objective function and avoiding the `2 reconstruction error during training, the model is able to efficiently capture the non-linear aging process and automatically synthesize a series of age-progressed faces in various age ranges with Table III P ROPERTIES OF D EEP G ENERATIVE M ODEL A PPROACHES FOR AGE P ROGRESSION . D EEP L EARNING (DL), L OG -L IKELIHOOD (LL), I NVERSE R EINFORCEMENT L EARNING (IRL), P ROBABILISTIC G RAPHICAL M ODELS (PGM), A DVERSARIAL (ADV) Method Approach Architecture Loss Function Non -Linearity Tractable Model Subject Dependent Wang et al. 2016 [39] Zhang et al. 2017 [41] Antipov et al. 2017 [2] Li et al. 2018 [22] Ours, 2016 [10] Ours, 2017 [11] Ours, 2017 [12] DL DL DL DL DL DL DL + IRL RNN GAN GAN GAN TRBM PGM + CNN PGM + CNN `2 ADV + `2 ADV + `2 ADV + `2 + ID + Age LL LL LL 4 4 4 4 4 4 4 4 4 4 4 7 4 4 7 7 7 7 7 7 4 Figure 5. Multiple Input support 7 7 7 7 7 7 4 Architectures of (A) the TRBM-based model [10] with post-processing steps, and (B) GAN-based Age Progression model [41]. more aging details. This approach has presented a carefully designed architecture with the combination of both RBM and TRBM for age variation modeling and age transformation embedding. Fig. 5(A) illustrates the aging architecture with TRBM proposed in [10]. In this approach, the longterm aging development is considered as a composition of short-term changes and can be represented as a sequence of that subject faces in different age groups. After the decomposition, a set of RBMs is employed to model the age variation of each age group as well as the wrinkles presented in the faces of older ages. Then the TRBM based model is constructed to embed the aging transformation between faces of consecutive age groups. Particularly, keeping similar form of the energy function as original TRBM and RBM , the bias terms are defined as bti =bi + Bi vt−1 + X Pli s<=t l l atj =aj + Aj vt−1 + X Qlj s<=t l (4) l where {A, B, P, Q} are the model parameters; and s<=t = {st , st−1 } denote the reference faces produced by the set of learned RBM. With this structure, both linear and nonlinear interactions between faces are efficiently exploited. Finally, some wrinkle enhancement together with geometry constraints are incorporated in post-processing steps for more consistent results. Therefore, plausible synthesized results can be achieved using this technique. A comparison in term of synthesis quality between this model and other conventional approaches is shown in Fig. 7. Recurrent Neural Network-based model: Approaching the age progression in a similar way of decomposition, instead of using TRBM, Wang et al. [39] proposed to use a Recurrent Neural Network with two-layer gated recurrent unit (GRU) to model aging sequence. With the recurrent connection between the hidden units, the model can efficiently exploit the information from previous faces as “memory” to produce smoother transition between faces during synthesizing process. Fig. 6(A) illustrates the architecture of the proposed RNN for age progression. In particular, let xt be the input face at young age, this network firstly encodes it into latent representation ht (hidden/memory units) by the bottom GRU and then decodes this representation into an older face ĥt of the subject using the top GRU. The relationship between xt and ht can be interpreted as follows. zt rt ct ht = σ(Wzh ht−1 + Wzx xt + bz ) = σ(Wrh ht−1 + Wrx xt + br ) = tanh(Wch rt ht−1 + Wcx xt + bc ) = (1 − zt ) ht−1 + zt ct (5) Similar formulations are also employed for the relationship between ht and ĥt . Then the difference between ĥt and the ground-truth aged face is computed in a form of `2 loss function. The system is then trained to obtain the synthesis capability. Finally, in order to generate the wrinkles for the aged-faces, the prototyping-style approach is adopted for wrinkle transferring. Although this approach has produced some improvements comparing to classical approaches, the use of a fixed reconstruction loss function has limited its Figure 6. Structures of (A) RNN-based model [39], (B) Temporal Non-Volume Preserving (TNVP) approach [11], and (C) Subject-dependent Deep Aging Path (SDAP) [12]. While SDAP shares the Mapping function with TNVP, it aims at embedding the aging transformation of the whole aging sequence. (3), the new objective function is adapted as. min max λL(x, G(E(x), l)) + γT V (G(E(x), l)) E,G Dz ,Dimg + Ez∗ ∼p(z) [log Dz (z∗ )] + Ex∼pdata (x) [log(1 − Dz (E(x)))] + Ex,l∼pdata (x,l) [log Dimg (x, l)] + Ex,l∼pdata (x,l) [log(1 − Dimg (G(E(x), l)))] Figure 7. A comparison between age-progressed sequence generated by TRBM based model [10] and IAAP approach [18]. synthesis ability and usually resulted in blurry faces. GAN-based model: Rather than step-by-step synthesis as in previous approaches, Antipov et al. [2], Zhang et al. [41], and Li et al. [22] turned into another direction of age progression, i.e. direct approach, and adopted the structure of GAN in their architectures. Fig. 5(B) illustrates the structure of the Conditional Adversarial Autoencoder (CAAE) [41]. From this figure, one can easily see that the the authors have adopted the GAN structure as presented in Section IV-A3 with an additional age label feature in the representation of latent variables. By this way, they can further encode the relationship between subject identity related high-level features of the input face and its age label. After training, by simply changing the aging label according to the target age, the deep-neural-network generator is able to synthesize the aged face at that age. Compared to Eqn. where l denotes the vector represented age label; z is the latent feature vector; E is the decoder function, i.e. E(x) = z. L(·, ·) and T V (·) are the `2 norm and total variation functions, respectively. pdata (x) denotes the distribution of the training data. As one can see, the conditional constraint on the age label is represented in the last two terms of the loss function. Although this model type can avoid the requirement of longitudinal age database during training, it is not easy to be converged due to the step of maintaining a good balance between generator and discriminator which is hard to achieve. Moreover, similar to RNN-based approach, GAN-based models also incorporate the `2 -norm in their objective functions. Therefore, their synthesized results are limited in terms of the image sharpness. Temporal Non-Volume Preserving transformation: Recently, addressing a limitation of intractable learning process of TRBM based model as well as the image quality of RNN-based and GAN-based approaches, the Temporal Non-Volume Preserving (TNVP) approach is introduced in [11] for embedding the feature transformations between faces in consecutive stages while keeping a tractable density function, exact inference and evaluation. Unlike previous approaches which incorporate only PGM or CNN structures, this proposed model enjoys the advantages of both architectures to improve its image synthesis quality and highly non-linear feature generation. The idea of this model start from a PGM with relationships between variables in image and latent domains (see Fig. 6(B)) given by zt−1 = F1 (xt−1 ; θ1 ) zt = H(zt−1 , xt ; θ2 , θ3 ) t−1 = G(z (6) t ; θ3 ) + F2 (x ; θ2 ) where F1 , F2 denote the bijection functions mapping xt−1 and xt to their latent variables zt−1 , zt , respectively. G is the Figure 8. A comparison between Deep Learning Approaches, i.e. TNVP [11], TRBM [10], against conventional approaches including IAAP [18], Exemplar based (EAP) [33], and Craniofacial Growth (CGAP) [29] models. 1 function embedding the aging transformation between latent variables. Then the probability density function is derived by. ∂H(zt−1 , xt ; θ) ∂xt ∂F2 (xt ; θ) = pZ t (zt |zt−1 ; θ) ∂xt = pZ t (zt |zt−1 ; θ) (7) where pX t (xt |xt−1 ; θ) and pZ t (zt |zt−1 ; θ) denote the conditional distribution of xt and zt , respectively. By a specific design of mapping functions F1 , F2 , the two terms on the right-hand-side of Eqn. (7) can be computed exactly and effectively. As a result, the authors can form a deep CNN network optimized under the concepts of PGM. While keeping the tractable log-likelihood density estimation in its objective function, the model turns age progression architectures into new direction where the CNN network can avoid using a fix reconstruction loss function and obtain high-quality synthesized faces. Fig. 8 illustrates the synthesized results achieved by TNVP in comparison with other approaches. Subject-dependent Deep Aging Path (SDAP) model: Inspiring from the advantages of TVNP, the Inverse Reinforcement (IRL) Learning is also taken into account in the structure of Subject-dependent Deep Aging Path (SDAP) model [12]. Under the hypothesis that each subject should have his/her own facial development, Duong et al. [12] proposed to use an additional aging controller in the structure of TNVP. Then rather than only embedding the aging transformation between pairwise relationship between consecutive age groups, the SDAP structure learns from the aging transformation of the whole face sequence for better long-term aging synthesis. This goal is achieved via a Subject-Dependent Aging Policy Network which guarantees to provide an appropriate planning aging path for the age controller corresponding to the subject’s features. The most interesting point of SDAP is that this is one of the pioneers incorporating IRL framework into age progression task. In this approach, let ζi = {x1i , a1i , . . . , xTi } be the age sequence of i-th subject where {x1i , . . . , xTi } are the face sequence 0.8 True Acceptance Rate pX t (xt |xt−1 ; θ) = pX t (xt |zt−1 ; θ) SF + SDAP SF + TNVP SF Deepsense_small 3DiVi-tdvm6 Barebones_FR-cnn NTechLAB_small 0.6 0.4 0.2 0 10 -5 10 -4 10 -3 10 -2 10 -1 False Acceptance Rate 10 0 Figure 9. An example of age invariant face recognition by using age progression models, i.e. TVNP [11] and SDAP [12]. By incorporated their synthesized results, the accuracy of face recognition (FR) system can be improved significantly. Note that the results of other FR methods are provided in Megaface website [17]. representing the facial development of i-th subject and aji denote the variables control the aging amount added to xji to become xj+1 . The probability of ζi can be formulated i via an energy function EΓ (ζi ) by P (ζi ) = 1 exp(−EΓ (ζi )) Z (8) where Z is the partition function. Notice that the formulation of Eqn. (8) is very similar to joint distribution between variables of RBM as in Eqn. (1). Then the goal is to learn a Subject-Dependent Aging Policy Network that can predict aji for each xji during synthesized process. The objective function is defined as. Γ∗ = arg max L(ζ; Γ) = Γ Y 1 log P (ζi ) M (9) ζi ∈ζ Finally, a specific design of IRL framework is proposed to learn the Policy Network. From the experimental results, SDAP has shown its potential to outperform TNVP and other approaches on synthesis results and cross-age verification accuracy. As shown in Fig. 9, SDAP can help to significantly improve the accuracy for face recognition system. V. C ONCLUSION In this paper, we have reviewed the main structures of Deep Generative Models for Age Progression task. Compared to other classical approaches, Deep Learning has shown its potential either in learning the highly nonlinear age variation or aging transformation embedding. As a result, not only do their synthesized faces improve in the image quality but also help to significantly boost the recognition accuracy for cross-age face verification system. Several common aging databases that support the facial modeling and aging embedding process are also discussed. R EFERENCES [1] FG-NET Aging Database. http://www.fgnet.rsunit.com. [2] G. Antipov, M. Baccouche, and J.-L. Dugelay. Face aging with conditional generative adversarial networks. arXiv preprint arXiv:1702.01983, 2017. [3] M. Arjovsky, S. Chintala, and L. Bottou. Wasserstein gan. arXiv preprint arXiv:1701.07875, 2017. [4] Y. Bengio. Learning deep architectures for ai. Foundations and trends R in Machine Learning, 2(1):1–127, 2009. [5] D. M. Burt and D. I. Perrett. Perception of age in adult caucasian male faces: Computer graphic manipulation of shape and colour information. Proc R Soc Lond B Biol Sci, 259(1355):137–143, 1995. [6] B.-C. Chen, C.-S. Chen, and W. H. Hsu. Cross-age reference coding for age-invariant face recognition and retrieval. In ECCV, 2014. [7] X. Chen, Y. Duan, R. Houthooft, J. Schulman, I. Sutskever, and P. Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. In NIPS, pages 2172–2180, 2016. [8] E. L. Denton, S. Chintala, R. Fergus, et al. Deep generative image models using a laplacian pyramid of adversarial networks. In NIPS, pages 1486–1494, 2015. [9] C. N. Duong, K. Luu, K. G. Quach, and T. D. Bui. Beyond principal components: Deep boltzmann machines for face modeling. In CVPR, pages 4786–4794. IEEE, 2015. [10] C. N. Duong, K. Luu, K. G. Quach, and T. D. Bui. Longitudinal face modeling via temporal deep restricted boltzmann machines. In CVPR, 2016. [11] C. N. Duong, K. G. Quach, K. Luu, N. Le, and M. Savvides. Temporal non-volume preserving approach to facial ageprogression and age-invariant face recognition. In ICCV, 2017. [12] C. N. Duong, K. G. Quach, K. Luu, T. Le, and M. Savvides. Learning from longitudinal face demonstration-where tractable deep modeling meets inverse reinforcement learning. arXiv preprint arXiv:1711.10520, 2017. [13] X. Geng, Z.-H. Zhou, and K. Smith-Miles. Automatic age estimation based on facial aging patterns. PAMI, 29(12):2234– 2240, 2007. [14] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. WardeFarley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In NIPS, pages 2672–2680, 2014. [15] G. E. Hinton. Training products of experts by minimizing contrastive divergence. Neural computation, 2002. [16] G. E. Hinton and R. R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313(5786):504–507, 2006. [17] I. Kemelmacher-Shlizerman, S. M. Seitz, D. Miller, and E. Brossard. The megaface benchmark: 1 million faces for recognition at scale. In CVPR, 2016. [18] I. Kemelmacher-Shlizerman, S. Suwajanakorn, and S. M. Seitz. Illumination-aware age progression. In CVPR, pages 3334–3341. IEEE, 2014. [19] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. 2009. [20] A. Lanitis, C. J. Taylor, and T. F. Cootes. Toward automatic simulation of aging effects on face images. PAMI, 24(4):442– 455, 2002. [21] G. Levi and T. Hassner. Age and gender classification using convolutional neural networks. In CVPRW, 2015. [22] P. Li, Y. Hu, Q. Li, R. He, and Z. Sun. Global and local consistent age generative adversarial networks. arXiv preprint arXiv:1801.08390, 2018. [23] C. Liu, J. Yuen, and A. Torralba. Sift flow: Dense correspondence across scenes and its applications. TPAMI, 33(5):978– 994, 2011. [24] K. Luu, C. Suen, T. Bui, and J. K. Ricanek. Automatic childface age-progression based on heritability factors of familial faces. In BIdS, pages 1–6. IEEE, 2009. [25] S. Moschoglou, A. Papaioannou, C. Sagonas, J. Deng, I. Kotsia, and S. Zafeiriou. Agedb: the first manually collected, in-the-wild age database. In CVPR-W, Hawaii, 2017. [26] E. Patterson, K. Ricanek, M. Albert, and E. Boone. Automatic representation of adult aging in facial images. In Proc. IASTED Intl Conf. Visualization, Imaging, and Image Processing, pages 171–176, 2006. [27] K. G. Quach, C. N. Duong, K. Luu, and T. D. Bui. Robust deep appearance models. In ICPR, pages 390–395, 2016. [28] A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. [29] N. Ramanathan and R. Chellappa. Modeling age progression in young faces. In CVPR, 2006. [30] K. Ricanek Jr and T. Tesafaye. Morph: A longitudinal image database of normal adult age-progression. In FGR 2006., pages 341–345. IEEE, 2006. [31] R. Rothe, R. Timofte, and L. V. Gool. Deep expectation of real and apparent age from a single image without facial landmarks. IJCV, 2016. [32] D. Rowland, D. Perrett, et al. Manipulating facial appearance through shape and color. CG&A, IEEE, 15(5):70–76, 1995. [33] C.-T. Shen, W.-H. Lu, S.-W. Shih, and H.-Y. M. Liao. Exemplar-based age progression prediction in children faces. In ISM, pages 123–128. IEEE, 2011. [34] X. Shu, J. Tang, H. Lai, L. Liu, and S. Yan. Personalized age progression with aging dictionary. In ICCV, December 2015. [35] J. Suo, X. Chen, S. Shan, W. Gao, and Q. Dai. A concatenational graph evolution aging model. PAMI, 34(11):2083– 2096, 2012. [36] J. Suo, S.-C. Zhu, S. Shan, and X. Chen. A compositional and dynamic model for face aging. PAMI, 32(3), 2010. [37] I. Sutskever and G. E. Hinton. Learning multilevel distributed representations for high-dimensional sequences. In AISTATS, pages 548–555, 2007. [38] M.-H. Tsai, Y.-K. Liao, and I.-C. Lin. Human face aging with guided prediction and detail synthesis. Multimedia tools and applications, 72(1):801–824, 2014. [39] W. Wang, Z. Cui, Y. Yan, J. Feng, S. Yan, X. Shu, and N. Sebe. Recurrent face aging. In CVPR, 2016. [40] H. Yang, D. Huang, Y. Wang, H. Wang, and Y. Tang. Face aging effect simulation using hidden factor analysis joint sparse representation. TIP, 25(6):2493–2507, 2016. [41] Z. Zhang, Y. Song, and H. Qi. Age progression/regression by conditional adversarial autoencoder. In CVPR, July 2017.
1cs.CV
Deterministic Policy Optimization by Combining Pathwise and Score Function Estimators for Discrete Action Spaces Daniel Levy, Stefano Ermon arXiv:1711.08068v1 [cs.AI] 21 Nov 2017 Department of Computer Science, Stanford University {danilevy,ermon}@cs.stanford.edu Abstract Policy optimization methods have shown great promise in solving complex reinforcement and imitation learning tasks. While model-free methods are broadly applicable, they often require many samples to optimize complex policies. Modelbased methods greatly improve sample-efficiency but at the cost of poor generalization, requiring a carefully handcrafted model of the system dynamics for each task. Recently, hybrid methods have been successful in trading off applicability for improved sample-complexity. However, these have been limited to continuous action spaces. In this work, we present a new hybrid method based on an approximation of the dynamics as an expectation over the next state under the current policy. This relaxation allows us to derive a novel hybrid policy gradient estimator, combining score function and pathwise derivative estimators, that is applicable to discrete action spaces. We show significant gains in sample complexity, ranging between 1.7 and 25×, when learning parameterized policies on Cart Pole, Acrobot, Mountain Car and Hand Mass. Our method is applicable to both discrete and continuous action spaces, when competing pathwise methods are limited to the latter. Introduction Reinforcement and imitation learning using deep neural networks have achieved impressive results on a wide range of tasks spanning manipulation (Levine et al. 2016; Levine and Abbeel 2014), locomotion (Silver et al. 2014), games (Mnih et al. 2015; Silver et al. 2016), and autonomous driving (Ho and Ermon 2016; Li, Song, and Ermon 2017). Model-free methods search for optimal policies without explicitly modeling the system’s dynamics (Williams 1992; Schulman et al. 2015). Most model-free algorithms build an estimate of the policy gradient by sampling trajectories from the environment and perform gradient ascent. However, these methods suffer from either very high sample complexity due to the generally large variance of the estimator, or are restricted to policies with few parameters. On the other hand, model-based reinforcement learning methods learn an explicit model of the dynamics of the system. A policy can then be optimized under this model by back-propagating the reward signal through the learned dyCopyright c 2018, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. namics. While these approaches can greatly improve sample efficiency, the dynamics model needs to be carefully hand-crafted for each task. Recently, hybrid approaches, at the interface of model-free and model-based, have attempted to balance sample-efficiency with generalizability, with notable success in robotics (Levine et al. 2016). Existing methods, however, are limited to continuous action spaces (Levine and Abbeel 2014; Heess et al. 2015). In this work, we introduce a hybrid reinforcement learning algorithm for deterministic policy optimization that is applicable to continuous and discrete action spaces. Starting from a class of deterministic policies, we relax the corresponding policy optimization problem to one over a carefully chosen set of stochastic policies under approximate dynamics. This relaxation allows the derivation of a novel policy gradient estimator, which combines pathwise derivative and score function estimator. This enables incorporating model-based assumptions while remaining applicable to discrete action spaces. We then perform gradient-based optimization on this larger class of policies while slowly annealing stochasticity, converging to an optimal deterministic solution. We additionally justify and bound the dynamics approximation under certain assumptions. Finally, we complement this estimator by a scalable method to estimate the dynamics, first introduced in (Levine and Abbeel 2014), and with a general extension to non-differentiable rewards, rendering it applicable to a large class of tasks. Our contributions are as follows: • We introduce a novel deterministic policy optimization method, that leverages a model of the dynamics and can be applied to any action space, whereas existing methods are limited to continuous action spaces. We also provide theoretical guarantees for our approximation. • We show how our estimator can be applied to a broad class of problems by extending it to discrete rewards, and utilizing a sample-efficient dynamics estimation method (Levine and Abbeel 2014). • We show that this method successfully optimizes complex neural network deterministic policies without additional variance reduction techniques. We present experiments on tasks with discrete action spaces where model-based or hybrid methods are not applicable. On these tasks, we show significant gains in terms of sample-complexity, ranging between 1.7 and 25×. Related Work Sample efficiency is a key metric for RL methods, especially when used on real-world physical systems. Model-based methods improve sample efficiency at the cost of defining and learning task-specific dynamics models, while modelfree methods typically require significantly more samples but are more broadly applicable. Model-based methods approximate dynamics using various classes of models, spanning from gaussian processes (Deisenroth and Rasmussen 2011) to neural networks (Fu, Levine, and Abbeel 2016). Assuming the reward function is known and differentiable, the policy gradient can be computed exactly by differentiating through the dynamics model, thus enabling gradient-based optimization. Heess et al. (2015) extends this idea to stochastic dynamics and policies by expressing randomness as an exogenous variable and making use of the “re-parameterization trick”. This requires differentiability of the dynamics function w.r.t. both state and action, limiting its applicability to continuous action spaces. On the other hand, model-free algorithms are broadly applicable but require significantly more samples as well as variance reduction techniques through control variates (Mnih et al. 2016; Ho, Gupta, and Ermon 2016) or trust regions (Schulman et al. 2015) to converge in reasonable time. Recently, hybrid approaches have attempted to balance sample efficiency with applicability. Levine and Abbeel (2014) locally approximate dynamics to fit locally optimal policies, which then serve as supervision for global policies. A good dynamics model also enables generating artificial trajectories to limit strain on the simulator (Gu et al. 2016). However, these works are once again limited to continuous action spaces. Our work can also be considered a hybrid algorithm that can handle and improve sampleefficiency for discrete action spaces as well. Background In this section, we first present the canonical RL formalism. We then review the score function and pathwise derivative estimators, and their respective advantages. We show applications of these with first, the REINFORCE estimator (Williams 1992), followed by a standard method for modelbased policy optimization consisting of back-propagating through the dynamics equation. Notations and definitions Let X and A denote the state and action spaces, respectively. f refers to a deterministic dynamics function i.e. f : X × A → X . A deterministic policy is a function π : X → A, and a stochastic policy is a conditional distribution over actions given state, denoted π(a|x). For clarity, when considering parameterized policies, stochastic ones will be functions of φ ∈ Φ, and deterministic ones functions of θ ∈ Θ. Throughout this work, dynamics will be considered deterministic. We consider the standard RL setting where an agent interacts with an environment and obtains rewards for its actions. The agent’s goal is to maximize its expected cumulative reward. Formally, there exists an initial distribution p0 over X and a collection of reward functions (rt )t≤T with rt : X → R. x0 is sampled from p0 , and at each step, the agent is presented with xt and chooses an action at according to a policy π. xt+1 is then computed as f (xt , at ). In the finite horizon setting, the episode ends when t = T . The agent is thenPprovided with the cumulative reward, r(x0 , . . . , xT ) = t≤T rt (xt ). The goal of the agent is to find a policy π that maximizes hPthe expected i cumulative reward J(π) = Ex0 ,a0 ,...,aT −1 t≤T rt (xt ) . Score Function Estimator and Pathwise Derivative We now review two approaches for estimating the gradient of an expectation. Let p(x; η) be a probability distribution over a measurable set X and ϕ : X → R. We are interested in obtaining an estimator of the following quantity: ∇η Ex∼p(x;η) [ϕ(x)]. Score Function Estimator The score function estimator relies on the ‘log-trick’. It relies on the following identity (given appropriate regularity assumptions on p and ϕ): ∇η Ex∼p(x;η) [ϕ(x)] = Ex∼p(x;η) [ϕ(x)∇η log p(x; η)] (1) This last quantity can then be estimated using MonteCarlo sampling. This estimator is very general and can be applied even if x is a discrete random variable, as long as log p(x; η) is differentiable w.r.t. η for all x. However, it suffers from high-variance (Glasserman 2013). Pathwise Derivative The pathwise derivative estimator depends on p(x; η) being re-parameterizable, i.e., there exists a function g and a distribution p0 (independent of η) such that sampling x ∼ p is equivalent to sampling  ∼ p0 and computing x = g(η, ). Given that observation, ∇η Ex∼p(x;η) [ϕ(x)] = ∇η E∼p0 () [ϕ (g(η, ))] = E∼p0 () [∇η ϕ(g(η, ))]. This quantity can once again be estimated using Monte-Carlo sampling, but is conversely lower variance (Glasserman 2013). This requires ϕ(g(η, )) to be a differentiable function of η for all . We override J(πθ ) (resp. J(πφ )) as J(θ) (resp. J(φ)), and aim at maximizing this objective function using gradient ascent. REINFORCE Using the score function estimator, we can derive the REINFORCE rule (Williams 1992), which is applicable without assumptions on the dynamics or action space. With πφ a stochastich policy, we iwant to P maximize J(φ) = Ex0 ,a0 ,...,aT where t≤T rt (xt ) at ∼ πφ (·|xht ). Thenthe REINFORCE  rule is ∇φ J(φ) i = P P 0 0 Ex0 ,a0 ,...,aT t≤T t0 ≥t rt (xt ) ∇φ log πφ (at |xt ) . We can estimate this quantity using Monte-Carlo sampling. This only requires differentiability of πφ w.r.t. φ and does not assume knowledge of f and r. This estimator is however not applicable to deterministic policies. A Method for Model-based Policy Optimization Let πθ be a deterministic policy, differentiable w.r.t. both x and θ. Assuming we have knowledge of f and h r, we can directly idifferentiate J: ∇θ J = P Ex0 ∇ r (x ) · ∇ x . The first term, ∇ r , is easx t t θ t x t t≤T ily computed given knowledge of the reward functions. The second term, given knowledge of the dynamics, can be computed by recursively differentiating xt+1 = f (xt , πθ (xt )), i.e. ∇θ x0 = 0 and: ∇θ xt+1 = ∇x f · ∇θ xt + ∇a f · ∇θ πθ (xt ) (2) This method can be extended to stochastic dynamics and policies by using a pathwise derivative estimator i.e. by reparameterizing the noise (Heess et al. 2015). This method is applicable for a deterministic and differentiable policy w.r.t. both x and θ, differentiable dynamics w.r.t. both variables and differentiable reward function. This implies that A must be continuous. This model-based method aims at utilizing the dynamics and differentiating the dynamics equation. Relaxing the Policy Optimization Problem Deterministic policies are optimal in a non-game theoretic setting. Our objective, in this work, is to perform hybrid policy optimization for deterministic policies for both continuous and discrete action spaces. In order to accomplish this, we present a relaxation of the RL optimization problem. This relaxation allows us to derive, in the subsequent section, a policy gradient estimator that differentiates approximate dynamics and leverages model-based assumptions for any action spaces. Contrary to traditional hybrid methods, this does not assume differentiability of the dynamics function w.r.t. the action variable, thus elegantly handling discrete action spaces. As in the previous section, we place ourselves in the finite-horizon setting. We assume terminal rewards and convex state space X . Relaxing the dynamics constraint In this section, we describe our relaxation. Starting from a class of deterministic policies D(Θ) parameterized by θ ∈ Θ, we can construct a class of stochastic policies S(Φ, Λ) ⊃ D(Θ) parameterized by (φ ∈ Φ, λ ∈ Λ), that can be chosen as close as desired to D(Θ) by adjusting λ. On this extended class, we can derive a low-variance gradient estimator. We first explain the relaxation, then detail how to construct S(Φ, Λ) from D(Θ), and finally, provide guarantees on the approximation. Formally, the RL problem with deterministic policy and dynamics can be written as: maximize Ex0 ∼p0 [r(xT )] πθ ∈D(Θ) subject to (3) xt+1 = f (xt , πθ (xt )) Given that πθ is deterministic, the constraint can be equivalently rewritten as: xt+1 = Ea∼πθ (·|xt ) [f (xt , a)] (4) Having made this observation, we proceed to relaxing the optimization from over D(Θ) to S(Φ, Λ), with the constraint now being over approximate and in particular differentiable dynamics. The relaxed optimization program is therefore: maximize Ex0 ∼p0 [r(xT )] πφ,λ ∈S(Φ,Λ) (5) subject to xt+1 = Ea∼πφ,λ (·|xt ) [f (xt , a)] This relaxation casts the optimization to be over stochastic policies, which allows us to derive a policy gradient in Theorem 3, but under different, approximated dynamics. We later describe how to project the solution in S(Φ, Λ) back to an element on D(Θ). Construction of S(Φ, Λ) from D(Θ) Here we show how to construct stochastic policies from deterministic ones while providing a parameterized ‘knob’ to control randomness and closeness to a deterministic policy. Discrete action spaces The natural parameterization is as a softmax model. However, this requires careful parameterization, in order to ensure that all policies of D(Θ) are included. We use the deterministic policy as a prior of which we can control the strength. Formally, we choose a class of parameterized functions {gψ : X → R|A| , ψ ∈ Ψ}. For θ, ψ and λ ≥ 0, we can define thehfollowing stochastic i 1 policy πθ,ψ,λ s.t. πθ,φ,λ (a|x) ∝ exp gψ (x)a + a=πλθ (x) . We have therefore defined S(Φ, Λ) where Φ , Θ × Ψ and Λ , [0, ∞). We easily verify that D(Θ) ⊂ S(Φ, Λ), as, for any θ ∈ Θ, we can choose an arbitrary ψ ∈ Ψ and define φ = (θ, ψ) ∈ Φ, we then have πθ = limλ→0 πφ,λ . Continuous action spaces In the continuous setting, a very simple parameterization is by adding Gaussian noise, of which we can control variance. Formally, given D(Θ), let Φ , Θ, Λ , [0, ∞) and S(Φ, Λ) , {x 7→ N (πθ (x), λ2 I), θ ∈ Θ, λ ≥ 0}. The surjection can be derived by setting λ to 0. More complicated stochastic parameterizations can be easily derived as long as the density remains tractable. Rounding We assume that there is a surjection from S(Φ, Λ) to D(Θ), s.t. any stochastic policy can be made deterministic by setting λ to a certain value. For the above examples, the mapping consists of setting λ to 0. Similar in spirit to simulated annealing for optimization (Kirkpatrick et al. 1983), we optimize over φ, while slowly annealing λ to converge to an optimal solution in D(Θ). Theoretical Guarantees Having presented the relaxation, we now provide theoretical justifications, to show, first, that given conditions on the stochastic policy, a trajectory computed with approximate dynamics under a stochastic policy is close to the trajectory computed with the true dynamics under a deterministic policy. We additionally present connections in the case where our dynamics are discretization of a continuous-time system. Bounding the deviation from real dynamics In this paragraph, we assume that the action space is continuous. Given the terminal reward setting, the amount of approximation can be defined as the divergence between (xt )t≤T , the trajectory from following a deterministic policy πθ , and (x̃t )t≤T , the trajectory corresponding to the approximate dynamics with a policy πφ,λ . This will allow us to relate the optimal value of the relaxed program with the optimal value of the initial optimization problem. Theorem 1 (Approximation Bound). Let πθ and πφ,λ be a deterministic and stochastic policy, respectively, s.t. ∀x ∈ X , Ea∼πφ,λ (·|x) a = πθ . Let us suppose that f is 0 ρ-lipschitz that  and πθ is ρ -lipschitz. We further assume supx tr Varπφ,λ (·|x) a ≤ M and that α , ρ(ρ0 + 1) < 1. We have the following guarantee: 1 √ Ex0 ||xT − x̃T || ≤ M (6) 1−α Furthermore, if [πφ (·|x)]x∈X are distributions of fixed variance λ2 I, the approximation converges towards 0 when λ → 0. Proof. See Appendix. We know that solving the relaxed optimization problem will provide an upper-bound on the expected terminal reward from a policy in D(Θ). Given a ρ00 -lipschitz reward function, this bound shows that the optimal value of the √ ρ00 true optimization program is within 1−α M of the optimal value of the relaxed one. Equivalence in continuous-time systems The relaxation has strong theoretical guarantees when the dynamics are a discretization of a continuous-time system. With analogous notations as before, let us consider a continuous-time dynamical system: x(0) = x0 , ẋ = f (x(t), a(t)). A δ-discretization of this system can be written as xt+1 = xt + δf (xt , at ). We can thus write the dynamics of the relaxed problem: xt+1 = xt + δEa∼πφ,λ (a|xt ) [f (xt , a)]. Intuitively, when the discretization step δ tends to 0, the policy converges to a deterministic one. In the limit, our approximation is the true dynamics for continuous time systems. Proposition 2 formalizes this idea. Proposition 2. Let (Xtδ )t≤T be a trajectory obtained from the δ-discretized relaxed system, following a stochastic policy. Let x(t) be the continuous time trajectory. Then, with probability 1: Xtδ → x(t) (7) Proof. See (Munos 2006). Relaxed Policy Gradient The relaxation presented in the previous section allows us to differentiate through the dynamics for any action space. In this section, we derive a novel deterministic policy gradient estimator, Relaxed Policy Gradient (RPG), that combines pathwise derivative and score function estimators, and is applicable to all action spaces. We then show how to apply our estimator, using a sample-efficient and scalable method to estimate the dynamics, first presented in (Levine and Abbeel 2014). We conclude by extending the estimator to discrete reward functions, effectively making our algorithm applicable to a wide variety of problems. For simplicity, we omit λ (the stochasticity) from our derivations and consider it fixed. Estimator We place ourselves in the relaxation be a parameterized stochastic policy, Ex0 ,a0 ,...,aT −1 [r(xT )]. Our objective arg maxφ J(φ). To that aim, we wish ascent on J. setting. Letting πφ we define J(φ) = is to find φ∗ = to perform gradient Theorem 3 (Relaxed Policy Gradient). Given a trajectory (x0 , a1 , . . . , xT ), sampled by following a stochastic policy πφ , we define the following quantity ĝ = ∇x r(xT ) · ∇φ xT where ∇φ xT can be computed with the recursion defined by ∇φ x0 = 0 and: ∇φ xt+1 = ∇x f (xt , at ) · ∇φ xt + f (xt , at )∇φ log πφ (at |xt ) + f (xt , at )∇x log πφ (at |xt ) · ∇φ xt (8) ĝ is an unbiased estimator of the policy gradient of the relaxed problem, defined in Equation 5. Proof. See Appendix. The presented RPG estimator is effectively a combination of pathwise derivative and score function estimators. Intuitively, the pathwise derivative cannot be used for discrete action spaces as it requires differentiability w.r.t. the action. To this end, we differentiate pathwise through x and handle the discrete portion with a score function estimator. Benefits of pathwise derivative Gradient estimates through pathwise derivatives are considered lower variance (Glasserman 2013). In the context of RL, intuitively, REINFORCE suffers from high variance as it requires many samples to properly establish credit assignment, increasing or decreasing probabilities of actions seen during a trajectory based on the reward. Conversely, as RPG estimates the dependency of the state on φ, the gradient can directly adjust φ to steer the trajectory to high reward regions. This is possible because the estimator utilizes a model of the dynamics. While REINFORCE assigns credit indifferently to actions, RPG adjusts the entire trajectory. However, when examining our expression for RPG, the computation requires the gradient of the dynamics w.r.t. the state, unlike REINFORCE. In the next section, we present a scalable and sample-efficient dynamics fitting method, further detailed in (Levine et al. 2016), to estimate this term. Scalable estimation of the dynamics The Relaxed Policy Gradient estimator can be computed exclusively from sampled trajectories if provided with the state-gradient of the dynamics ∇x f . However, this is not an information available to the agent and thus needs to be estimated from samples. We review a method, first presented in (Levine and Abbeel 2014), that provides estimation of the state-gradient of the dynamics, incorporating information from multiple sampled trajectories. Although the dynamics are deterministic, we utilize a stochastic estimation to account for modeling errors. Formally, we have m sampled trajectories {τi }i≤m of the form {xit , ait , xit+1 }i≤m,t≤T from the dynamical system. Our goal is not only to accurately model the dynamics of the system, but also to estimate correctly the state-gradient. This prevents us from simply fitting a parametric function fφ to the samples. Indeed, this approach would provide no guarantee that ∇x fφ is a good approximation of ∇x f . This is especially important as the variance of the estimator is dependent on the quality of our approximation of ∇x f and not the approximation of f . In order to fit a dynamics model, we choose to locally model the dynamics of the discretized stochastic process as Xt+1 ∼ N (At Xt + Bt at + ct , Ft ), parameterized by ({At , Bt , Ct })t≤T . We choose this approach as it does not model global dynamics but instead a good time-varying local model around the latest sampled trajectories, which corresponds to the term we want to estimate. Under that model, the term we are interested in estimating is then At . While this approach is simple, it requires a large number of samples to be accurate. To greatly increase sampleefficiency, we assume a prior over sampled trajectories. We use the GMM approach of (Levine and Abbeel 2014) which corresponds to softly piecewise linear dynamics. At each iteration, we update our prior using the current trajectories and fit our model. This allows us to utilize both past trajectories as well as nearby time steps that are included in the prior. Another key advantage of this stochastic estimation is that it elegantly handles discontinuous dynamics models. Indeed, by averaging the dynamics locally around the discontinuities, it effectively smooths out the discontinuities of the underlying deterministic dynamics. We refer to (Levine et al. 2016) for more detailed derivations. Prior to this work, estimators incorporating models of the dynamics such as (Heess et al. 2015; Levine and Abbeel 2014) were constrained to continuously differentiable rewards. We present an extension of this type of estimators to a class of non-continuous rewards. To do so, we make assumptions on the form of the reward and approximate it by a smooth function. We assume that X = Rn and that the reward can be written as a sum of indicator functions, i.e.: k X λi 1x∈Ki We can now approximate each (1Ki )i≤K by a smooth function (ψi )i≤K . Given this surrogate reward r̃ , Pk i=1 λi ψi , we can apply our estimator. In practice, however, discrete reward functions are often defined as r(s) = λ1h(s)≥0 , where h is a function from X to R. We approximate the reward function by r̃α (s) = λσ(αh(s)) (σ being the sigmoid function). If h is C 1 , then r̃ is too and r̃α pointwise converges to r. We present in the Appendix an example of the approximate reward functions for the Mountain Car task. Given these arbitrarily close surrogate rewards, we can now prove a continuity result, i.e. the sequence of optimal policies under the surrogate rewards converges to the optimal policy. Proposition 5 (Optimal policies under surrogate reward functions). Let r be a reward function defined as r = 1K and π ∗ the optimal policy under this reward. Let us define V π (x) to be the value of state x under the policy π. Then, there exists a sequence of smooth reward functions (rn )n∈N s.t. if πn is optimal under the reward rn , ∀x ∈ ∗ X , limn→∞ V πn (x) = V π . Proof. See Appendix. Practical Algorithm In Algorithm 1, we present a practical algorithm to perform deterministic policy optimization based on the previously defined RPG. In summary, given D(Θ), we construct our extended class of stochastic policies S(Φ, Λ). We then perform gradient-based optimization over φ, i.e. stochastic policies, while slowly annealing λ, converging to a policy in D(Θ). We easily extend the estimator to the case of non-terminal rewards as: X ∇φ J(φ, λ) = ∇x r(xt ) · ∇φ xt (10) t≤T Extension to discrete rewards r(x) = Proof. See Appendix. (9) i=1 where (Ki )i≤k are compact subsets of Rn . This assumption covers a large collection of tasks where the goal is to end up in a compact subspace of X . For each Ki , we are going to approximate 1x∈Ki by an arbitrarily close smooth function. Proposition 4 (Smooth approximation of an indicator function). Let K be a compact of Rn . For any neighborhood Ω of K, there exists, ψ : Rn → R, smooth, s.t. 1K ≤ ψ ≤ 1Ω . Experiments We empirically evaluate our algorithm to investigate the following questions: 1) How much does RPG improve sample complexity? 2) Can RPG learn an optimal policy for the true reward using a smooth surrogate reward? 3) How effective is our approximation of the dynamics? In an attempt to evaluate the benefits of the relaxation compared to other estimators as fairly as possible, we do not use additional techniques, such as trust regions (Schulman et al. 2015). Both our method and the compared ones can incorporate these improvements, but we leave study of these more sophisticated estimators for future work. Classical Control Tasks We apply our Relaxed Policy Gradient (RPG) to a set of classical control tasks with discrete action spaces: Cart Pole (Barto, Sutton, and Anderson 1983), Acrobot (Sutton 1996), Mountain Car (Sutton 1996) and Hand Mass (Munos Algorithm 1 Relaxed Policy Gradient Inputs: Environment giving xt+1 , ∇x r(xt ) given xt , at , deterministic class of policies D(Θ), stochastic class of policies S(Φ, Λ), number of training episodes Nep , learning rate schedule (αN )N ≤Nep , annealing schedule (γN )N ≤Nep , initial parameters φ0 ∈ Φ, λ0 ∈ Λ. Initialize φ ← φ0 and λ ← λ0 . for N = 1 to Nep do Sample {τi }i≤m with policy πφ,λ Update GMM prior over dynamics Fit dynamics (At , Bt , Ct )t≤T for i = 1 to m do gˆi ← 0 ∇φ x 0 ← 0 for t = 0 to T − 1 do gˆi ← gˆi + ∇x r(xt ) · ∇φ xt−1 fˆt = xt+1 − xt ∇φ xt+1 ← At · ∇φ xt + fˆt ∇φ log πφ,λ (at |xt ) +fˆt ∇x log πφ,λ (at |xt ) · ∇φ xt end for gˆi ← gˆi + ∇x R(xT ) · ∇φ xT end for φ ← φ + αN ĝ λ ← γN λ end for Return: πφ,λ=0 ∈ D(Θ) 2006). For the first three tasks, we used the OpenAI Gym (Brockman et al. 2016) implementation and followed (Munos 2006) for the implementation of Hand Mass. A diagram of our tasks are presented in Figure 1. Baselines We compare our methods against two different baselines: a black-box derivative free optimization algorithm called Cross-Entropy Method (CEM) (Szita and Lörincz 2006) and the Actor-Critic algorithm (A3C) (Mnih et al. 2016). CEM is an evolutionary-type algorithm that samples a different set of parameters at each step, simulates using these parameters and keeps only the top 2%, using those to re-fit the distribution over parameters. CEM is known to Target Movable hand Origin Mass Figure 1: Top row: Cart Pole, Acrobot. Bottom row: Mountain Car, Hand Mass. work well (Duan et al. 2016), but lacks sample efficiency as the algorithm does not exploit any structure. A3C is a variant of REINFORCE (Williams 1992) that learns a value function to reduce the variance of the estimator. For each task and algorithm, we evaluate for 5 distinct random seeds. Results and Analysis We present the learning curves for all tasks in Figure 2. Even when training is done with surrogate rewards, in both instances we report the actual reward. We do not show CEM learning curves as these are not comparable due to the nature of the algorithm; each CEM episode is equivalent to 20 RPG or A3C episodes, we instead report final performance in Tables 1 and 2. For all tasks, the policy is parameterized by a 2-layer neural network with tanh non-linearities and 64 hidden units, with a softmax layer outputting a distribution over actions. In practice, we optimize over stochastic policies with a fixed λ. In our experiments, it converged to a near deterministic policy since the optimization is wellconditioned enough in that case. The policies are trained using Adam (Kingma and Ba 2014). We evaluate differently depending on the task: since Cartpole and Acrobot have a fixed reward threshold at which they are considered solved, for these we present the number of training samples needed to reach that performance (in Table 1). In contrast, for Mountain Car and Hand Mass, we report (in Table 2) the reward achieved with a fixed number of samples. Both of these metrics are meant to evaluate sample-efficiency. Sample Complexity As shown in Tables 1 and 2, our algorithm clearly outperforms A3C across all tasks, requiring between 1.7 and 3 times less samples to solve the tasks and showing significantly better performance for the same number of samples. As shown in Table 2, RPG performs better than CEM in Hand Mass and within 20% for Mountain Car, despite using 20 times less samples. We also note that CEM is particularly well suited for Acrobot, as it is a derivative-free method that can explore the space of parameters very fast and find near-optimal parameters quickly when the optimal policies are fairly simple, explaining its impressive sample-complexity on this specific task. We additionally point out that full plots of performance against number of samples are reported for all tasks in Figure 2, and the numbers in Tables 1 and 2 can all be extracted from there. Robustness, Variance and Training Stability Overall, our method was very robust to the choice of hyperparameters such as learning rate or architecture. Indeed, our policy was trained on all tasks with the same learning rate α = 10−2 , whereas different learning rates were crossvalidated for A3C. When examining the training curves, our estimator demonstrates significantly less variance than A3C and a more stable training process. In tasks where the challenges are exploratory (Acrobot or Mountain Car), RPG’s exploration process is guided by its model of the dynamics while A3C’s is completely undirected, often leading to total failure. The same phenomenon can be observed on control Average Reward 6 Cart Pole ×102 1 5 Mountain Car ×103 ×102 −1 3 −2 2 −3 1 −4 0 −5 0 5 10 15 20 25 30 35 0 −5 −1.5 −10 −2.0 −15 −20 −2.5 0 200 400 600 −3.0 1000 0 800 Hand Mass 5 −1.0 0 4 Acrobot −25 5 10 15 20 25 30 35 40 45 −30 0 20 # episodes 40 RPG 60 80 A3C 100 Figure 2: Mean rewards over 5 random seeds for classical control tasks. Performance of RPG is shown against A3C. Method Samples until solve Cart Pole (Threshold = 495) 470 279 91 CEM A3C RPG Acrobot (Threshold = -105) 180 541 311 CEM A3C RPG Table 1: Average numbers of samples until the task is solved for the Cart Pole and Acrobot tasks for RPG, A3C and CEM. Method Samples Performance Hand Mass (150 episodes) CEM A3C RPG 50 2 2 −0.086 ± 0.01 −2.42 ± 2.19 −0.026 ± 0.01 Mountain Car (1000 episodes) CEM A3C RPG 200 10 10 −110.3 ± 1.2 −176 ± 38.6 −131.3 ± 5.3 Table 2: Average mean rewards for the Hand Mass and Mountain Car tasks for RPG, A3C and CEM. tasks (Hand Mass or Cart Pole), where A3C favors bad actions seen in high reward trajectories, leading to unstable control. Limitations In this section, we explore limitations of our method. To leverage the dynamics of the RL problem, we trade-off some flexibility in the class of problems that model-free RL can tackle for better sample complexity. This can also be seen as an instance of the bias/variance trade-off. Limitations on the reward function While we presented a general way to extend this estimator for rewards in the discrete domain, such function approximations can be difficult to construct for high-dimensional state-spaces such as Atari games. Indeed, one would have to fit the indicator function of a very low dimensional manifold - corresponding to the set of images encoding the state of a given game score - living in a high-dimensional space (order of R200×200×3 ). Limitations on the type of tasks While we show results on classical control tasks, our estimator is broadly applicable to all tasks where the dynamics can be estimated reasonably well. This has been shown to be possible on a number of locomotion and robotics tasks (Levine and Abbeel 2014; Heess et al. 2015). However, our work is not directly applicable to raw pixel input tasks such as the Atari domain. Computational overhead Compared to REINFORCE, our model presents some computational overhead as it requires evaluating (∇φ xt )t≤T as well as fitting T dynamics matrices. In practice, this is minor compared to other training operations such as sampling trajectories or computing necessary gradients. In our experiments, computing the (∇φ xt )t≤T amounts to less than 1% of overhead while dynamics estimation constitutes about 17%. Discussion Approximate Reward On all tasks except Hand Mass, our estimator was trained using approximate smoothed rewards. The performances reported in Figure 2 and Table 2 show that this did not impair training at all. Regarding the baselines, it is interesting to note that since CEM does not leverage the structure of the RL problem, it is natural to train with the real rewards. For A3C, we experimented with the smoothed rewards and obtained comparable numbers. In this work, we presented a method to find an optimal deterministic policy for any action space and in particular discrete actions. This method relies on a relaxation of the optimization problem to a carefully chosen, larger class of stochastic policies. On this class of policies, we can derive a novel, low-variance, policy gradient estimator, Relaxed Policy Gradient (RPG), by differentiating approximate dynamics. We then perform gradient-based optimization while slowly annealing the stochasticity of our policy, converging to a de- terministic solution. We showed how this method can be successfully applied to a collection of RL tasks, presenting significant gains in sample-efficiency and training stability over existing methods. Furthermore, we introduced a way to apply this algorithm to non-continuous reward functions by learning a policy under a smooth surrogate reward function, for which we provided a construction method. It is also important to note that our method is easily amenable to problems with stochastic dynamics, assuming one can reparameterize the noise. This work also opens the way to promising future extensions of the estimator. For example, one could easily incorporate imaginary rollouts (Gu et al. 2016) with the estimated dynamics model or trust regions (Schulman et al. 2015). Finally, this work can also be extended more broadly to gradient estimation for any discrete random variables. Acknowledgments The authors thank Aditya Grover, Jiaming Song and Steve Mussmann for useful discussions, as well as the anonymous reviewers for insightful comments and suggestions. This research was funded by Intel Corporation, FLI, TRI and NSF grants #1651565, #1522054, #1733686. References [Alexandroff and Urysohn 1924] Alexandroff, P., and Urysohn, P. 1924. Zur theorie der topologischen räume. Mathematische Annalen 92(3):258–266. [Barto, Sutton, and Anderson 1983] Barto, A. G.; Sutton, R. S.; and Anderson, C. W. 1983. Neuronlike adaptive elements that can solve difficult learning control problems. IEEE transactions on systems, man, and cybernetics (5):834–846. [Brockman et al. 2016] Brockman, G.; Cheung, V.; Pettersson, L.; Schneider, J.; Schulman, J.; Tang, J.; and Zaremba, W. 2016. Openai gym. arXiv preprint arXiv:1606.01540. [Deisenroth and Rasmussen 2011] Deisenroth, M., and Rasmussen, C. E. 2011. Pilco: A model-based and data-efficient approach to policy search. In Proceedings of the 28th International Conference on machine learning (ICML-11), 465– 472. [Duan et al. 2016] Duan, Y.; Chen, X.; Houthooft, R.; Schulman, J.; and Abbeel, P. 2016. Benchmarking deep reinforcement learning for continuous control. In International Conference on Machine Learning, 1329–1338. [Fu, Levine, and Abbeel 2016] Fu, J.; Levine, S.; and Abbeel, P. 2016. One-shot learning of manipulation skills with online dynamics adaptation and neural network priors. In Intelligent Robots and Systems (IROS), 2016 IEEE/RSJ International Conference on, 4019–4026. IEEE. [Glasserman 2013] Glasserman, P. 2013. Monte Carlo methods in financial engineering, volume 53. Springer Science & Business Media. [Gu et al. 2016] Gu, S.; Lillicrap, T.; Sutskever, I.; and Levine, S. 2016. Continuous deep q-learning with modelbased acceleration. arXiv preprint arXiv:1603.00748. [Heess et al. 2015] Heess, N.; Wayne, G.; Silver, D.; Lillicrap, T.; Erez, T.; and Tassa, Y. 2015. Learning continuous control policies by stochastic value gradients. In Advances in Neural Information Processing Systems, 2944–2952. [Ho and Ermon 2016] Ho, J., and Ermon, S. 2016. Generative adversarial imitation learning. In Advances in Neural Information Processing Systems, 4565–4573. [Ho, Gupta, and Ermon 2016] Ho, J.; Gupta, J. K.; and Ermon, S. 2016. Model-free imitation learning with policy optimization. In Proceedings of the 33rd International Conference on Machine Learning. [Kingma and Ba 2014] Kingma, D., and Ba, J. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980. [Kirkpatrick et al. 1983] Kirkpatrick, S.; Gelatt, C. D.; Vecchi, M. P.; et al. 1983. Optimization by simulated annealing. science 220(4598):671–680. [Levine and Abbeel 2014] Levine, S., and Abbeel, P. 2014. Learning neural network policies with guided policy search under unknown dynamics. In Advances in Neural Information Processing Systems, 1071–1079. [Levine et al. 2016] Levine, S.; Finn, C.; Darrell, T.; and Abbeel, P. 2016. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research 17(39):1– 40. [Li, Song, and Ermon 2017] Li, Y.; Song, J.; and Ermon, S. 2017. Infogail: Interpretable imitation learning from visual demonstrations. Advances in Neural Information Processing Systems. [Mnih et al. 2015] Mnih, V.; Kavukcuoglu, K.; Silver, D.; Rusu, A. A.; Veness, J.; Bellemare, M. G.; Graves, A.; Riedmiller, M.; Fidjeland, A. K.; Ostrovski, G.; et al. 2015. Human-level control through deep reinforcement learning. Nature 518(7540):529–533. [Mnih et al. 2016] Mnih, V.; Badia, A. P.; Mirza, M.; Graves, A.; Lillicrap, T. P.; Harley, T.; Silver, D.; and Kavukcuoglu, K. 2016. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning. [Munos 2006] Munos, R. 2006. Policy gradient in continuous time. Journal of Machine Learning Research 7(May):771–791. [Schulman et al. 2015] Schulman, J.; Levine, S.; Moritz, P.; Jordan, M. I.; and Abbeel, P. 2015. Trust region policy optimization. In International Conference on Machine Learning (ICML 2015). [Silver et al. 2014] Silver, D.; Lever, G.; Heess, N.; Degris, T.; Wierstra, D.; and Riedmiller, M. 2014. Deterministic policy gradient algorithms. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), 387– 395. [Silver et al. 2016] Silver, D.; Huang, A.; Maddison, C. J.; Guez, A.; Sifre, L.; Van Den Driessche, G.; Schrittwieser, J.; Antonoglou, I.; Panneershelvam, V.; Lanctot, M.; et al. 2016. Mastering the game of go with deep neural networks and tree search. Nature 529(7587):484–489. [Sutton 1996] Sutton, R. S. 1996. Generalization in reinforcement learning: Successful examples using sparse coarse coding. Advances in neural information processing systems 1038–1044. [Szita and Lörincz 2006] Szita, I., and Lörincz, A. 2006. Learning tetris using the noisy cross-entropy method. Neural computation 18(12):2936–2941. [Williams 1992] Williams, R. J. 1992. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning 8(3-4):229–256. Appendix E||X − EX|| = Tasks specifications ≤ Cart Pole The classical Cart Pole setting where the agent wishes to balance a pole mounted on a pivot point on a cart. Due to instability, the agent has to perform continuous cart movement to preserve the equilibrium. The agent receives reward 1 for each time step spend upwards. The task is considered solved if the agent reaches a reward of 495. Acrobot First introduced in (Sutton 1996), the system is composed of two joints and two links. Initially hanging downwards, the objective is to actuate the links to swing the end of lower link up to a fixed height. The path’s reward is determined by the negative number of actions required to reach the objectif. The task is considered solved if the agent reaches a reward of −105. Mountain Car We consider the usual setting presented in (Sutton 1996). The objective is to get a car to the top of a hill by learning a policy that uses momentum gained by alternating backward and forward motions. The state consists of (x, ẋ), where x is the horizontal position of the car. The reward can be expressed as r(x) = 1x≥ 12 . The task’s difficulty lies in both the limitation of maximum tangential force and the need for exploration. The agent receives a reward of 1 We use a surrogate smoothed reward for DCTPG. We evaluate the performance after a fixed number of episodes. Hand Mass We consider a physical system first presented in (Munos 2006). The agent is holding a spring linked to a mass. The agent can move in four directions. The objective is to bring the mass to a target point (xt , yt ) while keeping the hand closest to the origin point (0, 0). The state can be described as s = (x0 , y0 , x, y, ẋ, ẏ) and the dynamics are described in (Munos 2006). At the final time step, the agent receives the reward r(s) = −(x−xt )2 −(y−yt )2 −x20 −y02 . Proof of Theorem 1 Lemma 6. Let X be a random variable of Rn of bounded variance. Let Σ = VarX. ≤ ≤ ≤ √ trΣ Proof. We can simply use Cauchy-Schwarz inequality. Let’s define µ = EX. ||x − µ||p(x)dx sxZ x sZ x ||x − µ||2 p(x)dx p(x)dx x X (xi − µi )2 p(x)dx sX √ sZ i VarXi i trΣ Let’s prove this by recursion. ||xt+1 − x̃t+1 || = ||Ea∼πφ (·|x̃t ) [f (xt , πθ (xt )) − f (x̃t , a)] || (11) ≤ Ea∼πφ (·|x̃t ) ||f (xt , πθ (xt )) − f (x̃t , a)|| (12) ≤ ρ||xt − x̃t || + ρEa∼πφ (·|x̃t ) ||a − πθ (xt )|| (13) ≤ ρ||xt − x̃t || + ρEa∼πφ (·|x̃t ) ||a − πθ (x̃t )|| + ρ||πθ (x̃t ) − πθ (xt )|| 0 √ (14) (15) ≤ ρ(ρ + 1)||xt − x̃t || + ρ M (2) is obtained with triangular inequality. (3) because f is ρ-lipschitz. (4) with triangular inequality and because Ea∼πφ (·|x) a = πθ (x). (5) because of Lemma 6 and the uniform bound on variances. Given this inequality and the fact that x0 = x̃0 , we can compute the geometric sum i.e. 1 − [ρ(ρ0 + 1)]T √ ||xT − x̃T || ≤ M 1 − ρ(ρ0 + 1) α = ρ(ρ0 + 1) < 1 concludes the proof. Proofs of Theorem 3 As in the model-based method presented in Background, we want to directly differentiate J(φ). As before, we require the reward function to be differentiable. ∇φ J = ∇x r · ∇φ xT , but when computing ∇φ xT , we need to differentiate through the relaxed equation of the dynamics: X ∇φ xt+1 = ∇φ f (xt , a)πφ (a|xt ) a = X a E||X − EX|| ≤ Z [πφ (a|xt )∇x f · ∇φ xt +f (xt , a) (∇φ πφ + ∇x πφ · ∇φ xt )] = Eπφ [∇x f · ∇φ x +f (xt , a) (∇φ log πφ + ∇x log πφ · ∇φ xt )] The recursion corresponds to a Monte-Carlo estimate with trajectories obtained by running the stochastic policy in the environment, thus concluding the proof. Veloc ity by continuity of the distance to a compact, x∗T ∈ K proving the result. Reward 0.0 0.2 0.4 0.6 0.8 1.0 0.5 0.0 0.5 ion 1.0 osit P Figure 3: Surrogate smooth reward for the Mountain Car task. Left: True reward. Right: Smoothed surrogate reward. Proof of Proposition 4 Given a compact K of Rn and an open neighborhood Ω ⊃ K, let us show that there exists ψ ∈ C ∞ (Rn , R) s.t. 1K ≤ ψ ≤ 1Ω . While according to Urysohn’s lemma (Alexandroff and Urysohn 1924), such continuous functions exist in the general setting of normal spaces given any pair of disjoint closed sets F and G, we will show how to explicitly construct ψ under our simpler assumptions. It is sufficient to show that we can construct a function f ∈ C ∞ (Rn , R) such that for Ω open set containing the closed unit ball, f is equal to 1 on the unit ball and f is null outside of Ω. Given this function, we can easily construct ψ by scaling and translating. 1 Let us define φ(x) , exp(− 1−||x|| 2 )1||x||≤1 . This function is smooth on both B(0, 1) Rand B(0, 1)C . Let us define Fn (x) , B(0,n) φ(t + x)dµ(t). This function is strictly positive on B(0, n) and null outside of B(0, n+ 1). For n large enough, the function f (x) = Fn ( nx ) satisfy the desired property, thus proving that we can construct ψ. Figure 3 shows an example of a smooth surrogate reward for the Mountain Car task. Proof of Proposition 5 Let us consider the deterministic case where r = 1K and the reward is terminal. Let π ∗ be the optimal policy under reward r. There exists a sequence of open neighborhoods (Ωn )n∈N s.t. Ωn ⊂ Ωn+1 and diameter(Ωn − K) tends to 0. Let rn be the smooth reward function constructed for 1K with neighborhood Ωn . Let πn be the deterministic optimal policy under reward rn . For a start state x, we can distinguish between two cases: ∗ 1. V π (x) = 0 ∗ 2. V π (x) = 1 For the former, no policy can reach the compact and thus the surrogate reward make no difference. For the latter, the policy πn , take x to final state xnT where xnT ∈ Ωn . However, d(xnT , K) ≤ diameter(Ωn − K) which tends to 0. The (xnT )n∈N is a Cauchy sequence in a complete space and thus converges to a limit x∗T . Since limn→∞ d(xnT , K) = 0 and
2cs.AI
Fast Distributed Algorithms for Connectivity and MST in Large Graphs Gopal Pandurangan∗ Peter Robinson† Michele Scquizzato∗ arXiv:1503.02353v3 [cs.DC] 6 Jul 2016 July 7, 2016 Abstract Motivated by the increasing need to understand the algorithmic foundations of distributed large-scale graph computations, we study a number of fundamental graph problems in a messagepassing model for distributed computing where k ≥ 2 machines jointly perform computations on graphs with n nodes (typically, n  k). The input graph is assumed to be initially randomly partitioned among the k machines, a common implementation in many real-world systems. Communication is point-to-point, and the goal is to minimize the number of communication rounds of the computation. Our main result is an (almost) optimal distributed randomized algorithm for graph connectivity. Our algorithm runs in Õ(n/k 2 ) rounds (Õ notation hides a polylog(n) factor and an additive polylog(n) term). This improves over the best previously known bound of Õ(n/k) [Klauck et al., SODA 2015], and is optimal (up to a polylogarithmic factor) in view of an existing lower bound of Ω̃(n/k 2 ). Our improved algorithm uses a bunch of techniques, including linear graph sketching, that prove useful in the design of efficient distributed graph algorithms. Using the connectivity algorithm as a building block, we then present fast randomized algorithms for computing minimum spanning trees, (approximate) min-cuts, and for many graph verification problems. All these algorithms take Õ(n/k 2 ) rounds, and are optimal up to polylogarithmic factors. We also show an almost matching lower bound of Ω̃(n/k 2 ) rounds for many graph verification problems by leveraging lower bounds in random-partition communication complexity. ∗ Department of Computer Science, University of Houston, Houston, TX 77204, USA. E-mail: [email protected], [email protected]. Supported, in part, by US-Israel Binational Science Foundation grant 2008348, NSF grant CCF-1527867, and NSF grant CCF-1540512. † Department of Computer Science, Royal Holloway, University of London, United Kingdom. E-mail: [email protected]. 1 1 Introduction The focus of this paper is on distributed computation on large-scale graphs, which is increasingly becoming important with the rise of massive graphs such as the Web graph, social networks, biological networks, and other graph-structured data and the consequent need for fast algorithms to process such graphs. Several large-scale graph processing systems such as Pregel [31] and Giraph [1] have been recently designed based on the message-passing distributed computing model [30, 39]. We study a number of fundamental graph problems in a model which abstracts the essence of these graph-processing systems, and present almost tight bounds on the time complexity needed to solve these problems. In this model, introduced in [22] and explained in detail in Section 1.1, the input graph is distributed across a group of k ≥ 2 machines that are pairwise interconnected via a communication network. The k machines jointly perform computations on an arbitrary n-vertex input graph, where typically n  k. The input graph is assumed to be initially randomly partitioned among the k machines (a common implementation in many real world graph processing systems [31, 41]). Communication is point-to-point via message passing. The computation advances in synchronous rounds, and there is a constraint on the amount of data that can cross each link of the network in each round. The goal is to minimize the time complexity, i.e., the number of rounds required by the computation. This model is aimed at investigating the amount of “speed-up” possible vis-a-vis the number of available machines, in the following sense: when k machines are used, how does the time complexity scale in k? Which problems admit linear scaling? Is it possible to achieve super-linear scaling? Klauck et al. [22] present lower and upper bounds for several fundamental graph problems in the k-machine model. In particular, assuming that each link has a bandwidth of one bit per round, they show a lower bound of Ω̃(n/k 2 ) rounds for the graph connectivity problem.1 They also present an Õ(n/k)-round algorithm for graph connectivity and spanning tree (ST) verification. This algorithm thus exhibits a scaling linear in the number of machines k. The question of existence of a faster algorithm, and in particular of an algorithm matching the Ω̃(n/k 2 ) lower bound, was left open in [22]. In this paper we answer this question affirmatively by presenting an Õ(n/k 2 )-round algorithm for graph connectivity, thus achieving a speedup quadratic in k. This is optimal up to polylogarithmic (in n) factors. This result is important for two reasons. First, it shows that there are non-trivial graph problems for which we can obtain superlinear (in k) speed-up. To elaborate further on this point, we shall take a closer look at the proof of the lower bound for connectivity shown in [22]. Using communication complexity techniques, that proof shows that any (possibly randomized) algorithm for the graph connectivity problem has to exchange Ω̃(n) bits of information across the k machines, for any k ≥ 2. Since there are k(k − 1)/2 links in a complete network with k machines, when each link can carry O(polylog(n)) bits per round, in each single round the network can deliver at most Θ̃(k 2 ) bits of information, and thus a lower bound of Ω̃(n/k 2 ) rounds follows. The result of this paper thus shows that it is possible to exploit in full the available bandwidth, thus achieving a speed-up of Θ̃(k 2 ). Second, this implies that many other important graph problems can be solved in Õ(n/k 2 ) rounds as well. These include computing a spanning tree, minimum spanning tree (MST), approximate min-cut, and many verification problems such as spanning connected subgraph, cycle containment, and bipartiteness. It is important to note that under a different output requirement (explained next) there exists a 1 Throughout this paper Õ(f (n)) denotes O(f (n) polylog n + polylog n), and Ω̃(f (n)) denotes Ω(f (n)/ polylog n). 2 Ω̃(n/k)-round lower bound for computing a spanning tree of a graph [22], which also implies the same lower bound for other fundamental problems such as computing an MST, breadth-first tree, and shortest paths tree. However, this lower bound holds under the requirement that each vertex (i.e., the machine which hosts the vertex) must know at the end of the computation the “status” of all of its incident edges, that is, whether they belong to an ST or not, and output their respective status. (This is the output criterion that is usually required in distributed algorithms [30, 39].) The proof of the lower bound exploits this criterion to show that any algorithm requires some machine receiving Ω(n) bits of information, and since any machine has k − 1 incident links, this results in a Ω̃(n/k) lower bound. On the other hand, if we relax the output criterion to require the final status of each edge to be known by some machine, then we show that this can be accomplished in Õ(n/k 2 ) rounds using the fast connectivity algorithm of this paper. 1.1 The Model We now describe the adopted model of distributed computation, the k-machine model (a.k.a. the Big Data model ), introduced in [22] and further investigated in [9, 40, 38]. The model consists of a set of k ≥ 2 machines N = {M1 , M2 , . . . , Mk } that are pairwise interconnected by bidirectional point-to-point communication links. Each machine executes an instance of a distributed algorithm. The computation advances in synchronous rounds where, in each round, machines can exchange messages over their communication links and perform some local computation. Each link is assumed to have a bandwidth of O(polylog(n)) bits per round, i.e., O(polylog(n)) bits can be transmitted over each link in each round. (As discussed in [22] (cf. Theorem 4.1), it is easy to rewrite bounds to scale in terms of the actual inter-machine bandwidth.) Machines do not share any memory and have no other means of communication. There is an alternate (but equivalent) way to view this communication restriction: instead of putting a bandwidth restriction on the links, we can put a restriction on the amount of information that each machine can communicate (i.e., send/receive) in each round. The results that we obtain in the bandwidth-restricted model will also apply to the latter model [22]. Local computation within a machine is considered to happen instantaneously at zero cost, while the exchange of messages between machines is the costly operation. (However, we note that in all the algorithms of this paper, every machine in every round performs a computation bounded by a polynomial in n.) We assume that each machine has access to a private source of true random bits. Although the k-machine model is a fairly general model of computation, we are mostly interested in studying graph problems in it. Specifically, we are given an input graph G with n vertices, each associated with a unique integer ID from [n], and m edges. To avoid trivialities, we will assume that n ≥ k (typically, n  k). Initially, the entire graph G is not known by any single machine, but rather partitioned among the k machines in a “balanced” fashion, i.e., the nodes and/or edges of G are partitioned approximately evenly among the machines. We assume a vertex-partition model, whereby vertices, along with information of their incident edges, are partitioned across machines. Specifically, the type of partition that we will assume throughout is the random vertex partition (RVP), that is, each vertex of the input graph is assigned randomly to one machine. (This is the typical way used by many real systems, such as Pregel [31], to partition the input graph among the machines; it is easy to accomplish, e.g., via hashing.2 ) However, we notice that our upper bounds 2 In Section 1.3 we will discuss an alternate partitioning model, the random edge partition (REP) model, where each edge of G is assigned independently and randomly to one of the k machines, and show how the results in the random vertex partition model can be related to the random edge partition model. 3 also hold under the much weaker assumption whereby it is only required that nodes and edges of the input graph are partitioned approximately evenly among the machines; on the other hand, lower bounds under RVP clearly apply to worst-case partitions as well. More formally, in the random vertex partition variant, each vertex of G is assigned independently and uniformly at random to one of the k machines. If a vertex v is assigned to machine Mi we say that Mi is the home machine of v and, with a slight abuse of notation, write v ∈ Mi . When a vertex is assigned to a machine, all its incident edges are assigned to that machine as well; i.e., the home machine will know the IDs of the neighbors of that vertex as well as the identity of the home machines of the neighboring vertices (and the weights of the corresponding edges in case G is weighted). Note that an immediate property of the RVP model is that the number of vertices at each machine is balanced, i.e., each machine is the home machine of Θ̃(n/k) vertices with high probability. A convenient way to implement the RVP model is through hashing: each vertex (ID) is hashed to one of the k machines. Hence, if a machine knows a vertex ID, it also knows where it is hashed to. Eventually, each machine Mi , for each 1 ≤ i ≤ k, must set a designated local output variable oi (which need not depend on the set of vertices assigned to Mi ), and the output configuration o = ho1 , . . . , ok i must satisfy certain feasibility conditions for the problem at hand. For example, for the minimum spanning tree problem each oi corresponds to a set of edges, and the edges in the union of such sets must form an MST of the input graph. In this paper, we show results for distributed algorithms that are Monte Carlo. Recall that a Monte Carlo algorithm is a randomized algorithm whose output may be incorrect with some probability. Formally, we say that an algorithm computes a function f with -error if for every input it outputs the correct answer with probability at least 1 − , where the probability is over the random partition and the random bit strings used by the algorithm (if any). The round (time) complexity of an algorithm is the maximum number of communication rounds until termination. For any n and problem P on n node graphs, we let the time complexity of solving P with  error probability in the k-machine model, denoted by T (P), be the minimum T (n) such that there exists an -error protocol that solves P and terminates in T (n) rounds. For any 0 ≤  ≤ 1, graph problem P and function T : Z+ → Z+ , we say that T (P) = O(T (n)) if there exists integer n0 and c such that for all n ≥ n0 , T (P) ≤ cT (n). Similarly, we say that T (P) = Ω(T (n)) if there exists integer n0 and real c such that for all n ≥ n0 , T (P) ≥ cT (n). For our upper bounds, we will usually use  = 1/n, which will imply high probability algorithms, i.e., succeeding with probability at least 1 − 1/n. In this case, we will sometimes just omit  and simply say the time bound applies “with high probability.” 1.2 Our Contributions and Techniques The main result of this paper, presented in Section 2, is a randomized Monte Carlo algorithm in the k-machine model that determines the connected components of an undirected graph G correctly with high probability and that terminates in Õ(n/k 2 ) rounds.3 This improves upon the previous best bound of Õ(n/k) [22], since it is strictly superior in the wide range of parameter k = Θ(n ), for all constants  ∈ (0, 1). Improving over this bound is non-trivial since various attempts to get a faster connectivity algorithm fail due to the fact that they end up congesting a particular machine 3 Since the focus is on the scaling of the time complexity with respect to k, we omit explicitly stating the polylogarithmic factors in our run time bounds. However, the hidden polylogarithmic factor is not large—at most O(log3 n). 4 too much, i.e., up to n bits may need to be sent/received by a machine, leading to a Õ(n/k) bound (as a machine has only k − 1 links). For example, a simple algorithm for connectivity is simply flooding: each vertex floods the lowest labeled vertex that it has seen so far; at the end each vertex will have the label of the lowest labeled vertex in its component.4 It can be shown that the above algorithm takes Θ(n/k + D) rounds (where D is the graph diameter) in the k-machine model by using the Conversion Theorem of [22]. Hence new techniques are needed to break the n/k-round barrier. Our connectivity algorithm is the result of the application of the following three techniques. 1. Randomized Proxy Computation. This technique, similar to known techniques used in randomized routing algorithms [44], is used to load-balance congestion at any given machine by redistributing it evenly across the k machines. This is achieved, roughly speaking, by re-assigning the executions of individual nodes uniformly at random among the machines. It is crucial to distribute the computation and communication across machines to avoid congestion at any particular machine. In fact, this allows one to move away from the communication pattern imposed by the topology of the input graph (which can cause congestion at a particular machine) to a more balanced communication. 2. Distributed Random Ranking (DRR). DRR [8] is a simple technique that will be used to build trees of low height in the connectivity algorithm. Our connectivity algorithm is divided into phases, in each of which we do the following: each current component (in the first phase, each vertex is a component by itself) chooses one outgoing edge and then components are combined by merging them along outgoing edges. If done naively, this may result in a long chain of merges, resulting in a component tree of high diameter; communication along this tree will then take a long time. To avoid this we resort to DRR, which suitably reduces the number of merges. With DRR, each component chooses a random rank, which is simply a random number, say in the interval [1, n3 ]; a component Ci then merges with the component Cj on the other side of its selected outgoing edge if and only if the rank of Cj is larger than the rank of Ci . Otherwise, Ci does not merge with Cj , and thus it becomes the root of a DRR tree, which is a tree induced by the components and the set of the outgoing edges that have been used in the above merging procedure. It can be shown that the height of a DRR tree is bounded by O(log n) with high probability. 3. Linear Graph Sketching. Linear graph sketching [2, 3, 32] is crucially helpful in efficiently finding an outgoing edge of a component. A sketch for a vertex (or a component) is a short (O(polylog n)) bit vector that efficiently encodes the adjacency list of the vertex. Sampling from this sketch gives a random (outgoing) edge of this vertex (component). A very useful property is the linearity of the sketches: adding the sketches of a set of vertices gives the sketch of the component obtained by combining the vertices; the edges between the vertices (i.e., the intra-component edges) are automatically “cancelled”, leaving only a sketch of the outgoing edges. Linear graph sketches were originally used to process dynamic graphs in the (semi-) streaming model [2, 3, 32]. Here, in a distributed setting, we use them to reduce the amount of communication needed to find an outgoing edge; in particular, graph sketches will avoid us from checking whether an edge is an inter-component or an intra-component edge, and this will crucially reduce communication across machines. We note that earlier distributed algorithms such as the classical GHS algorithm [14] for the MST problem would incur too much communication since they involve checking the status of each edge of the graph. We observe that it does not seem straightforward to effectively exploit these techniques in the 4 This algorithm has been implemented in a variant of Giraph [43]. 5 k-machine model: for example, linear sketches can be easily applied in the distributed streaming model by sending to a coordinator machine the sketches of the partial stream, which then will be added to obtain the sketch of the entire stream. Mimicking this trivial strategy in the k-machine model model would cause too much congestion at one node, leading to a Õ(n/k) time bound. Using the above techniques and the fast connectivity algorithm, in Section 3 we give algorithms for many other important graph problems. In particular, we present a Õ(n/k 2 )-round algorithm for computing an MST (and hence an ST). We also present Õ(n/k 2 )-round algorithms for approximate min-cut, and for many graph verification problems including spanning connected subgraph, cycle containment, and bipartiteness. All these algorithms are optimal up to a polylogarithmic factor. In Section 4 we show a lower bound of Ω̃(n/k 2 ) rounds for many verification problems by simulating the k-machine model in a 2-party model of communication complexity where the inputs are randomly assigned to the players. 1.3 Related Work The theoretical study of large-scale graph computations in distributed systems is relatively new. Several works have been devoted to developing MapReduce graph algorithms (see, e.g., [20, 25, 28] and references therein). We note that the flavor of the theory developed for MapReduce is quite different compared to the one for the k-machine model. Minimizing communication is also the key goal in MapReduce algorithms; however this is usually achieved by making sure that the data is made small enough quickly (that is, in a small number of MapReduce rounds) to fit into the memory of a single machine (see, e.g., the MapReduce algorithm for MST in [25]). For a comparison of the k-machine model with other models for parallel and distributed processing, including Bulk-Synchronous Parallel (BSP) model [45], MapReduce [20], and the congested clique, we refer to [46]. In particular, according to [46], “Among all models with restricted communication the “big data” [k-machine] model is the one most similar to the MapReduce model”. The k-machine model is closely related to the BSP model; it can be considered to be a simplified version of BSP, where the costs of local computation and of synchronization (which happens at the end of every round) are ignored. Unlike the BSP and refinements thereof, which have several different parameters that make the analysis of algorithms complicated [46], the k-machine model is characterized by just one parameter, the number of machines; this makes the model simple enough to be analytically tractable, thus easing the job of designing and analyzing algorithms, while at the same time it still captures the key features of large-scale distributed computations. The k-machine model is related to the classical CON GEST model [39], and in particular to the congested clique model, which recently has received considerable attention (see, e.g., [29, 27, 26, 12, 34, 7, 16]). The main difference is that the k-machine model is aimed at the study of large-scale computations, where the size n of the input is significantly bigger than the number of available machines k, and thus many vertices of the input graph are mapped to the same machine, whereas the two aforementioned models are aimed at the study of distributed network algorithms, where n = k and thus each vertex corresponds to a dedicated machine. More “local knowledge” is available per vertex (since it can access for free information about other vertices in the same machine) in the k-machine model compared to the other two models. On the other hand, all vertices assigned to a machine have to communicate through the links incident on this machine, which can limit the bandwidth (unlike the other two models where each vertex has a dedicated processor). These differences manifest in the time complexity. In particular, the fastest known distributed algorithm in the congested clique model for a given problem may not give rise to the fastest algorithm 6 in the k-machine model. For example, the fastest algorithms for MST in the congested clique model ([29, 16]) require Θ(n2 ) messages; implementing these algorithms in the k-machine model requires Θ(n2 /k 2 ) rounds. Conversely, the slower GHS algorithm [14] gives an Õ(n/k) bound in the k-machine model. The recently developed techniques (see, e.g., [11, 35, 13, 16, 12]) used to prove time lower bounds in the standard CON GEST model and in the congested clique model are not directly applicable here. The work closest in spirit to ours is the recent work of Woodruff and Zhang [47]. This paper considers a number of basic statistical and graph problems in a distributed message-passing model similar to the k-machine model. However, there are some important differences. First, their model is asynchronous, and the cost function is the communication complexity, which refers to the total number of bits exchanged by the machines during the computation. Second, a worst-case distribution of the input is assumed, while we assume a random distribution. Third, which is an important difference, they assume an edge partition model for the problems on graphs, that is, the edges of the graph (as opposed to its vertices) are partitioned across the k machines. In particular, for the connectivity problem, they show a message complexity lower bound of Ω̃(nk) which essentially translates to a Ω̃(n/k) round lower bound in the k-machine model; it can be shown by using their proof technique that this lower bound also applies to the random edge partition (REP) model, where edges are partitioned randomly among machines, as well. On the other hand, it is easy to show an Õ(n/k) upper bound for the connectivity in the REP model for connectivity and MST.5 Hence, in the REP model, Θ̃(n/k) is a tight bound for connectivity and other related problems such as MST. However, in contrast, in the RVP model (arguably, a more natural partition model), we show that Θ̃(n/k 2 ) is the tight bound. Our results are a step towards a better understanding of the complexity of distributed graph computation vis-a-vis the partition model. From the technical point of view, King et al. [21] also use an idea similar to linear sketching. Their technique might also be useful in the context of the k-machine model. 2 The Connectivity Algorithm In this section we present our main result, a Monte Carlo randomized algorithm for the k-machine model that determines the connected components of an undirected graph G correctly with high probability and that terminates in Õ(n/k 2 ) rounds with high probability. This algorithm is optimal, up to polylog(n)-factors, by virtue of a lower bound of Ω̃(n/k 2 ) rounds [22]. Before delving into the details of our algorithm, as a warm-up we briefly discuss simpler, but less efficient, approaches. The easiest way to solve any problem in our model is to first collect all available graph data at a single machine and then solve the problem locally. For example, one could first elect a referee among the machines, which requires O(1) rounds [24], and then instruct every machine to send its local data to the referee machine. Since the referee machine needs to receive O(m) information in total but has only k − 1 links of bounded bandwidth, this requires Ω(m/k) rounds. A more refined approach to obtain a distributed algorithm for the k-machine model is to use the Conversion Theorem of [22], which provides a simulation of a congested clique algorithm A in 5 The high-level idea of the MST algorithm in the REP model is: (1) First “filter” the edges assigned to one machine using the cut and cycle properties of a MST [19]; this leaves each machine with O(n) edges; (2) Convert this edge distribution to a RVP which can be accomplished in Õ(n/k) rounds via hashing the vertices randomly to machines and then routing the edges appropriately; then apply the RVP bound. 7 Õ(M/k 2 + ∆0 T /k) rounds in the k-machine model, where M is the message complexity of A, T is its round complexity, and ∆0 is an upper bound to the total number of messages sent (or received) by a single node in a single round. (All these parameters refer to the performance of A in the congested clique model.) Unfortunately, existing algorithms (e.g., [14, 42]) typically require ∆0 to scale to the maximum node degree, and thus the converted time complexity bound in the k-machine model becomes Ω̃(n/k) at best. Therefore, in order to break the Ω̃(n/k) barrier, we must develop new techniques that directly exploit the additional locality available in the k-machine model. In the next subsection we give a high level overview of our algorithm, and then formally present all the technical details in the subsequent subsections. 2.1 Overview of the Algorithm Our algorithm follows a Boruvka-style strategy [6], that is, it repeatedly merges adjacent components of the input graph G, which are connected subgraphs of G, to form larger (connected) components. The output of each of these phases is a labeling of the nodes of G such that nodes that belong to the same current component have the same label. At the beginning of the first phase, each node is labeled with its own unique ID, forms a distinct component, and is also the component proxy of its own component. Note that, at any phase, a component contains up to n nodes, which might be spread across different machines; we use the term component part to refer to all those nodes of the component that are held by the same machine. Hence, at any phase every component is partitioned in at most k component parts. At the end of the algorithm each vertex has a label such that any two vertices have the same label if and only if they belong to the same connected component of G. Our algorithm relies on linear graph sketches as a tool to enable communication-efficient merging of multiple components. Intuitively speaking, a (random) linear sketch su of a node u’s graph neighborhood returns a sample chosen uniformly at random from u’s incident edges. Interestingly, such a linear sketch can be represented as matrices using only O(polylog(n)) bits [17, 32]. A crucial property of these sketches is that they are linear: that is, given sketches su and sv , the combined sketch su + sv (“+” refers to matrix addition) has the property that, w.h.p., it yields a random sample of the edges incident to (u, v) in a graph where we have contracted the edge (u, v) to a single node. We describe the technical details in Section 2.3. We now describe how to communicate these graph sketches in an efficient manner: Consider a component C that is split into j parts P1 , P2 , . . . , Pj , the nodes of which are hosted at machines M1 , M2 , . . . , Mj . To find an outgoing edge for C, we first instruct each machine Mi to construct a linear sketch of the graph neighborhood of each of the nodes in part Pi . Then, we sum up these |Pi | sketches, yielding a sketch sPi for the neighborhood of part Pi . To combine the sketches of the j distinct parts, we now select a random component proxy machine MC,r for the current component C at round r (see Section 2.2). Next, machine Mi sends sPi to machine MC,r ; note that this causes at most k messages to be sent to the component proxy. Finally, machine MC,r P computes sC = ji=1 sPi , and then uses sC to sample an edge incident to some node in C, which, by construction, is guaranteed to have its endpoint in a distinct component C 0 . (See Section 2.4.) At this point, each component proxy has sampled an inter-component edge inducing the edges of a component graph C where each vertex corresponds to a component. To enable the efficient merging of components, we employ the distributed random ranking (DRR) technique of [8] to break up any long paths of C into more manageable directed trees of depth O(log n). To this end, every 8 component chooses a rank independently and uniformly at random from [0, 1],6 and each component (virtually) connects to its neighboring component (according to C) via a (conceptual) directed edge if and only if the latter has a higher rank. Thus, this process results in a collection of disjoint rooted trees, rooted at the node of highest (local) rank. We show in Section 2.5 that each of such trees has depth O(log n). The merging of the components of each tree T proceeds from the leafs upward (in parallel for each tree). In the first merging phase, each leaf Cj of T merges with its parent C 0 by relabeling the component labels of all of their nodes with the label of C 0 . Note that the proxy MCj knows the labeling of C 0 , as it has computed the outgoing edge from a vertex in Cj to a vertex in C 0 . Therefore, machine MCj sends the label of Cj to all the machines that hold a part of Cj . In Section 2.5 we show that this can be done in parallel (for all leafs of all trees) in Õ(n/k 2 ) rounds. Repeating this merging procedure O(log n) times, guarantees that each tree has been merged to a single component. Finally, in Section 2.6 we prove that O(log n) repetitions of the above process suffice to ensure that the components at the end of the last phase correspond to the connected components of the input graph G. 2.2 Communication via Random Proxy Machines Recall that our algorithm iteratively groups vertices into components and subsequently merges such components according to the topology of G. Each of these components may be split into multiple component parts spanning multiple machines. Hence, to ensure efficient load balancing of the messages that machines need to send on behalf of the component parts that they hold, the algorithm performs all communication via proxy machines. Our algorithm proceeds in phases, and each phase consists of iterations. Consider the ρ-iteration of the j-th phase of the algorithm, with ρ, j ≥ 1. We construct a “sufficiently” random hash function hj,ρ , such that, for each component C, the machine with ID hj,ρ (C) ∈ [k] is selected as the proxy machine for component C. First, machine M1 generates ` = Θ̃(n/k) random bits from its private source of randomness. M1 will distribute these random bits to all other machines via the following simple routing mechanism that proceeds in sequences of two rounds. M1 selects k bits b1 , b2 , . . . , bk−1 from the set of its ` private random bits that remain to be distributed, and sends bit bi across its i-th link to machine Mi+1 . Upon receiving bi , machine Mi+1 broadcasts bi to all machines in the next round. This ensures that bits b1 , b2 , . . . , bk−1 become common knowledge within two rounds. Repeating this process to distribute all the ` = Θ̃(n/k) bits takes Õ(n/k 2 ) rounds, after those all the machines have the ` random bits generated by M1 . We leverage a result of [4] (cf. in its formulation as Theorem 2.1 in [5]), which tells us that we can generate a random hash function such that it is d-wise independent by using only O(d log n) true random bits. We instruct machine M1 to disseminate d = ` log n = n polylog(n)/k of its random bits according to the above routing process and then each machine locally constructs the same hash function hj,ρ , which is then used to determine the component proxies throughout iteration ρ of phase j. We now show that communication via such proxy machines is fast in the k-machine model. Lemma 1. Suppose that each machine M generates a message of size O(polylog(n)) bits for each component part residing on M ; let mi denote the message of part Pi and let C be the component of which Pi is a part. If each mi is addressed to the proxy machine MC of component C, then all messages are delivered within Õ(n/k 2 ) rounds with high probability. 6 It is easy to see that an accuracy of Θ(log n) bits suffices to break ties w.h.p. 9 Proof. Observe that, except for the very first phase of the algorithm, the claim does not immediately follow from a standard balls-into-bins argument because not all the destinations of the messages are chosen independently and uniformly at random, as any two distinct messages of the same component have the same destination. Let us stipulate that any component part held by machine Mi is the i-th component part of its component, and denote this part with Pi,j , i ∈ [k], j ∈ [n], where Pi,j = ∅ means that in machine i there is no component part for component j. Suppose that the algorithm is in phase j 0 and iteration ρ. By construction, the hash function hj 0 ,ρ is Θ̃(n/k)-wise independent, and all the component parts held by a single machine are parts of different components. Since Mi has at most Θ̃(n/k) distinct component parts w.h.p., it follows that all the proxy machines selected by the component parts held by machine Mi are distributed independently and uniformly at random. Let y be the number of distinct component parts held by a machine Mi that is, y = |{Pi,j : Pi,j 6= ∅}| = Õ(n/k) (w.h.p.). Consider a link of Mi connecting it to another machine M1 . Let Xt be the indicator variable that takes Py value 1 if M1 is the component proxy of part t (of Mi ), and let Xt = 0 otherwise. Let X = i=1 Xi be the number of component parts that chose their proxy machine at the endpoint of link (Mi , M1 ). Since Pr(Xi = 1) = 1/(k − 1), we have that the expected number of messages that have to be sent by this machine over any specific link is E[X] = y/(k − 1). First, consider the case y ≥ 11k log n. As the Xi ’s are Θ̃(n/k)-wise independent, all proxies by the component parts of Mi are chosen independently and thus we can apply a standard Chernoff bound (see, e.g., [33]), which gives   −2k log n 1 7y < 2. Pr X ≥ ≤ e−3y/16(k−1) < e k 4(k − 1) n By applying the union bound over the k ≤ n machines we conclude that w.h.p. every machine sends Õ(n/k 2 ) messages to each proxy machine, and this requires Õ(n/k 2 ) rounds. Consider now the case y < 11k log n. It holds that 6E[X] = 6y/(k − 1) < 6 · 11k log n/(k − 1) ≤ 132 log n, and thus, by a standard Chernoff bound, Pr (X ≥ 132 log n) ≤ 2−132 log n = 1 n132 . Analogously to the first case, applying the union bound over the k ≤ n machines yields the result. 2.3 Linear Graph Sketches As we will see in Section 2.5, our algorithm proceeds by merging components across randomly chosen inter-component edges. In this subsection we show how to provide these sampling capabilities in a communication-efficient way in the k-machine model by implementing random linear graph sketches. Our description follows the notation of [32]. Recall that each vertex u of G is associated with a unique integer ID from [n] (known to its home machine) which, for simplicity, we also denote by u.7 For each vertex u we define the incidence n vector au ∈ {−1, 0, 1}( 2 ) of u, which describes the incident edges of u, as follows:  if u = x < y and (x, y) ∈ E,  1 −1 if x < y = u and (x, y) ∈ E, au [(x, y)] =  0 otherwise. 7 Note that the asymptotics of our results do not change if the size of the ID space is O(polylog(n)). 10 Note that the vector au + av corresponds to the incidence vector of the contracted edge (u, v). Intuitively speaking, summing P up incidence vectors “zeroes out” edges between the corresponding vertices, hence the vector u∈C au represents the outgoing edges of a component C. Since each incidence vector au requires polynomial space, it would be inefficient to directly communicate vectors to component proxies. Instead, we construct a random linear sketch su of polylog(n)-size that has the property of allowing us to sample uniformly at random a nonzero entry of au (i.e., an edge incident to u). (This is referred to as `0 -sampling in the streaming literature, see e.g. [32].) It is shown in [17] that `0 -sampling can be performed by linear projections. Therefore, at the beginning of each phase j of our algorithm, we instruct each machine to to create a new  n (common) polylog(n) × 2 sketch matrix Lj , which we call phase j sketch matrix.8 Then, each machine M creates a sketch su = Lj · au for each vertex u that resides on M . Hence, each su can be represented by a polylogarithmic number of bits. Observe that, by linearity, we have Lj · au + Lj · av = Lj · (au + av ). In other words, a crucial property of sketches is that the sum su + sv is itself a sketch that allows us to sample an edge incident to the contracted edge (u, v). We summarize these properties in the following statement. Lemma 2. Consider a phase j, and let P a subgraph of G induced by vertices {u1 , . . . , u` }. Let su1 , . . . , su` be the associated sketches of vertices in P constructed by applying the phase j sketch P` matrix to the respective incidence vectors. Then, the combined sketch sP = i=1 sui can be represented using O(polylog(n)) bits and, by querying sP , it is possible (w.h.p.) to sample a random edge incident to P (in G) that has its other endpoint in G \ P . Constructing Linear Sketches Without Shared Randomness. Our construction of the linear sketches described so far requires Õ(n) fully independent random bits that would need to be shared by all machines. It is shown in Theorem 1 (cf. also Corollary 1) of [10] that it is possible to construct such an `0 -sampler (having the same linearity properties) by using Θ(n) random bits that are only Θ(log n)-wise independent. Analogously as in Section 2.2, we can generate the required Θ(log2 n) true random bits at machine M1 , distribute them among all other machines in O(1) rounds, and then invoke Theorem 2.1 of [5] at each machine in parallel to generate the required (shared) Θ(log n)-wise independent random bits for constructing the sketches. 2.4 Outgoing Edge Selection Now that we know how to construct a sketch of the graph neighborhood of any set of vertices, we will describe how to combine these sketches in a communication-efficient way in the k-machine model. The goal of this step is, for each (current) component C, to find an outgoing edge that connects C to some other component C 0 . Recall that C itself might be split into parts P1 , P2 , . . . , Pj across multiple machines. Therefore, as a first step, each machine Mi locally constructs the combined sketch for each part that resides in Mi . By Lemma 2, the resulting sketches have polylogarithmic size each and present a sketch of the incidences of their respective component parts. Next, we combine the sketches of the individual parts of each component C to a sketch of C, by instructing the machines to send the sketch of each part Pi (of component C) to the proxy machine of C. By virtue of Lemma 1, all of these messages are delivered to the component proxies within Õ(n/k 2 ) rounds. Finally, the component 8 Here we describe the construction as if nodes have access to a source of shared randomness (to create the sketch matrix). We later show how to remove this assumption. 11 proxy machine of C combines the received sketches to yield a sketch of C, and randomly samples an outgoing edge of C (see Lemma 2). Thus, at the end of this procedure, every component (randomly) selected exactly one neighboring component. We now show that the complexity of this procedure is Õ(n/k 2 ) w.h.p. Lemma 3. Every component can select exactly one outgoing edge in Õ(n/k 2 ) rounds with high probability. Proof. Clearly, since at every moment each node has a unique component’s label, each machine holds Õ(n/k) component’s parts w.h.p. Each of these parts selected at most one edge, and thus each machine “selected” Õ(n/k) edges w.h.p. All these edges have to be sent to the corresponding proxy. By Lemma 1, this requires Õ(n/k 2 ) rounds. The procedure is completed when the proxies communicate the decision to each of the at most k components’ parts. This entails as many messages as in the first part to be routed using exactly the same machines’ links used in the first part, with the only difference being that messages now travel in the opposite direction. The lemma follows. 2.5 Merging of Components After the proxy machine of each component C has selected one edge connecting C to a different component, all the neighboring components are merged so as to become a new, bigger component. This is accomplished by relabeling the nodes of the graph such that all the nodes in the same (new) component have the same label. Notice that the merging is thus only virtual, that is, component parts that compose a new component are not moved to a common machine; rather, nodes (and their incident edges) remain in their home machine, and just get (possibly) assigned a new label. We can think of the components along with the sampled outgoing edges as a component graph C. We use the distributed random ranking (DRR) technique [8] to avoid having long chains of components (i.e., long paths in C). That is, we will (conceptually) construct a forest of directed trees that is a subgraph (modulo edge directions) of the component graph C and where each tree has depth O(log n).9 The component proxy of each component C chooses a rank independently and uniformly at random from [0, 1]. (It is easy to show that Θ(log n) bits provide sufficient accuracy to break ties w.h.p.) Now, the proxy machine of C (virtually) connects C to its neighboring component C 0 if and only if the rank chosen by the latter’s proxy is higher. In this case, we say that C 0 becomes the parent of C and C is a child of C 0 . Lemma 4. After Õ(n/k 2 ) rounds, the structure of the DRR-tree is completed with high probability. Proof. We need to show that every proxy machine of a non-root component knows its smaller-ranking parent component and every root proxy machine knows that it is root. Note that during this step the proxy machines of the child components communicate with the respective parent proxy machines. Moreover, the number of messages sent for determining the ordering of the DRR-trees is guaranteed to be O(n) with high probability, since C has only O(n) edges. By instantiating Lemma 1, it follows that the delivery of these messages can be completed in Õ(n/k 2 ) rounds w.h.p. 9 Instead of using DRR trees, an alternate and simpler idea is the following. Let every component select a number in [0, 1]. A merging can be done only if the outgoing edge (obtained from the sketch) connects a component with ID 0 to a component with ID 1. One can show that this merging procedure also gives the same time bound. 12 Since links are bidirectional, the parent proxies are able to send their replies within the same number of rounds, by re-running the message schedule of the child-to-parent communication in reverse order. If a component has the highest rank among all its neighbors (in C), we call it a root component. Since every component except root components connects to a component with higher rank, the resulting structure is a set of disjoint rooted trees. In the next step, we will merge all components of each tree into a single new component such that all vertices that are part of some component in this tree receive the label of the root. Consider a tree T . We proceed level-wise (in parallel for all trees) and start the merging of components at the leafs that are connected to a (lower-ranking) parent component C. Lemma 5. There is a distributed algorithm that merges all trees of the DRR forest in Õ(dn/k 2 ) rounds with high probability, where d is the largest depth of any tree. Proof. We proceed in d iterations by merging the (current) leaf components with their parents in the tree. Thus it is sufficient to analyze the time complexity of a single iteration. To this end, we describe a procedure that changes the component labels of all vertices that are in leaf components in the DRR forest to the label of the respective parent in Õ(n/k 2 ) rounds. At the beginning of each iteration, we select a new proxy for each component C by querying the shared hash function hj,ρ (C), where ρ is the current iteration number. This ensures that there are no dependencies between the proxies used in each iteration. We know from Lemma 4 that there is a message schedule such that leaf proxies can communicate with their respective parent proxy in Õ(n/k 2 ) rounds (w.h.p.) and vice versa, and thus every leaf proxy knows the component label of its parent. We have already shown in Lemma 3 that we can deliver a message from each component part to its respective proxy (when combining the sketches) in Õ(n/k 2 ) rounds. Hence, by re-running this message schedule, we can broadcast the parent label from the leaf proxy to each component part in the same time. Each machine that receives the parent label locally changes the component label of the vertices that are in the corresponding part. The following result is proved in [8, Theorem 11]. To keep the paper self-contained we also provide a direct and simpler proof for this result (see Appendix). Lemma 6 ([8, Theorem 11]). The depth of each DRR tree is O(log n) with high probability. 2.6 Analysis of the Time Complexity We now show that the number of phases required by the algorithm to determine the connected components of the input graph is O(log n). At the beginning of each phase i, distributed across the k machines there are ci distinct components. At the beginning of the algorithm each node is identified as a component, and thus c0 = n. The algorithm ends at the completion of phase ϕ, where ϕ is the smallest integer such that cϕ = cc(G), where cc(G) denotes the number of connected components of the input graph G. If pairs of components were merged in each phase, it would be straightforward to show that the process would terminate in at most O(log n) phases. However, in our algorithm each component connects to its neighboring component if and only if the latter has a higher rank. Nevertheless, it is not difficult to show that this slightly different process also terminates in O(log n) phases w.h.p. (that is, components gets merged “often enough”). The intuition for this result is that, since components’ ranks are taken randomly, for each component the 13 probability that its neighboring component has a higher rank is exactly one half. Hence, on average half of the components will not be merged with their own neighbor: each of these components thus becomes a root of one component, which means that, on average, the number of new components will be half as well. Lemma 7. After 12 log n phases, the component labels of the vertices correspond to the connected components of G with high probability. Proof. Replace the ci ’s with corresponding random variables Ci ’s, and consider the stochastic process defined by the sequence C0 , C1 , . . . , Cϕ . Let C̄i be the random variable that counts the number of components that actually participate at the merging process of phase i, because they do have an outgoing edge to another component. Call these components participating components. Clearly, by definition, C̄i ≤ Ci . We now show that, for every phase i ∈ [ϕ − 1], E[E[C̄i+1 | C̄i ]] ≤ E[C̄i ]/2. To this end, fix a generic phase i and a random ordering of its C̄i participating components. Define random variables Xi,1 , Xi,2 , . . . , Xi,C̄i where Xi,j takes value 1 if the j-th participating component will be a root of P i a participating tree/component for phase i + 1, and 0 otherwise. Then, C̄i+1 | C̄i = C̄ j=1 Xi,j is the number of participating components for phase i + 1. As we noticed before, for any i ∈ [ϕ − 1] and j ∈ [C̄i ], the probability that a participating component will not be merged to its neighboring component, and thus become a root of a tree/component for phase i+1 is exactly one half. Therefore, Pr(Xi,j = 1) ≤ 1/2. Hence, by the linearity of expectation, we have that E[C̄i+1 | C̄i ] = C̄i X E[Xi,j ] = j=1 C̄i X Pr(Xi,j = 1) ≤ j=1 C̄i . 2 Then, using again the linearity of expectation, E[E[C̄i+1   E[C̄i ] C̄i | C̄i ]] ≤ E = . 2 2 We now leverage this result to prove the claimed statement. Let us call a phase successful if it reduces the number of participating components by a factor of at most 3/4. By Markov’s inequality, the probability that phase i is not successful is   E[E[C̄i+1 | C̄i ]] 3 Pr E[C̄i+1 | C̄i ] > E[C̄i ] < 4 (3/4)E[C̄i ] E[C̄i ] 4 ≤ · 2 3E[C̄i ] 2 = , 3 and thus the probability that a phase of the algorithm is successful is at least 1/3. Now consider a sequence of 12 log n phases of the algorithm. We shall prove that within that many phases the algorithm w.h.p. has reduced the number of participating components a sufficient number of times so 14 that the algorithm has terminated, that is, ϕ ≤ 12 log n w.h.p. Let Xi be an indicator variable that takes value 1 if phase i is successful, and 0 otherwise (this also includes the case that the i-th phase P log n Xi be the number does not take place because the algorithm already terminated). Let X = 12 i=1 of successful phases out of the at most 12 log n phases of the algorithm. Since Pr(Xi = 1) ≥ 1/3, by the linearity of expectation we have that E[X] = 12X log n i=1 E[Xi ] = 12X log n Pr(Xi = 1) ≥ i=1 12 log n = 4 log n. 3 As the Xi ’s are independent we can apply a standard Chernoff bound, which gives Pr(X ≤ log n) ≤ e−4 log n(3/4) 2 /2 9 = e− 8 log n < 1 . n Hence, with high probability 12 log n phases are enough to determine all the components of the input graph. Theorem 1. There is a distributed algorithm in the k-machine model that determines the connected components of a graph G in Õ(n/k 2 ) rounds with high probability. Proof. By Lemma 7, the algorithm finishes in O(log n) phases with high probability. To analyze the time complexity of an individual phase, recall that it takes Õ(n/k 2 ) rounds to sample an outgoing edge (see Lemma 3). Then, building the DRR forest requires Õ(n/k 2 ) additional rounds, according to Lemma 4. Merging each DRR tree T in a level-wise fashion (in parallel) takes Õ(dn/k 2 ) rounds (see Lemma 5), where d is the depth of T which, by virtue of Lemma 6, is bounded by O(log n). Since each of these time bounds hold with high probability, and the algorithm consists of O(log n) phases with high probability, by the union bound we conclude that the total time complexity of the algorithm is Õ(n/k 2 ) with high probability. We conclude the section by noticing that it is easy to output the actual number of connected components after the termination of our algorithm: every machine just needs to send “YES” directly to the proxies of each of the components’ labels it holds, and subsequently such proxies will send the labels of the components for which they received “YES” to one predetermined machine. Since the communication is performed via the components’ proxies, it follows from Lemma 1 that the first step takes Õ(n/k 2 ) rounds w.h.p., and the second step takes only O(log n) rounds w.h.p. 3 Applications In this section we describe how to use our fast connectivity algorithm as a building block to solve several other fundamental graph problems in the k-machine model in time Õ(n/k 2 ). 3.1 Constructing a Minimum Spanning Tree Given a weighted graph where each edge e = (u, v) has an associated weight w(e), initially known to both the home machines of u and v, the minimum spanning tree (MST) problem asks to output a set of edges that form a tree, connect all nodes, and have the minimum possible total weight. Klauck et al. [22] show that Ω̃(n/k) rounds are necessary for constructing any spanning tree (ST), assuming 15 that, for every spanning tree edge e = (u, v), the home machine of u and the home machine of v must both output (u, v) as being part of the ST. Here we show that we can break the Ω̃(n/k) barrier, under the slightly less stringent requirement that each spanning tree edge e = (u, v) is returned by at least one machine, but not necessarily by both the home machines of u and v. Our algorithm mimics the multi-pass MST construction procedure of [2], originally devised for the (centralized) streaming model. To this end we modify our connectivity procedure of Section 2, by ensuring that when a component proxy C chooses an outgoing edge e, this is the minimum weight outgoing edge (MWOE) of C with high probability. We now describe the i-th phase of this MST construction in more detail. Analogously to the connectivity algorithm in Section 2, the proxy of each component C determines an outgoing edge e0 which, by the guarantees of our sketch construction (Lemma 2), is chosen uniformly at random from all possible outgoing edges of C. We then repeat the following edge-elimination process t = Θ(log n) times: The proxy broadcasts w(e0 ) to every component part of C. Recall from Lemma 3 that this communication is possible in Õ(n/k 2 ) rounds. Upon receiving this message, the machine M of a part P of C constructs a new sketch su for each u ∈ P , but first zeroes out all entries in au that refer to edges of weight > w(e0 ). (See Section 2.3 for a more detailed description of au and su .) Again, we combine the sketches of all vertices of all parts of C at the proxy of C, which in turn samples a new outgoing edge e1 for C. Since each time we sample a randomly chosen edge and eliminate all higher weight edges, it is easy to see that the edge et is the MWOE of C w.h.p. Thus, the proxy machine of C includes the edge et as part of the MST output. Note that this additional elimination procedure incurs only a logarithmic time complexity overhead. At the end of each phase, we proceed by (virtually) merging the components along their MWOEs in a similar manner as for the connectivity algorithm (see Section 2.5), thus requiring Õ(n/k 2 ) rounds in total. Let E be the set of added outgoing edges. Since the components of the connectivity algorithm eventually match the actual components of the input graph, the graph H on the vertices V (G) induced by E connects all vertices of G. Moreover, since components are merged according to the trees of the DRR-process (see Section 2.5), it follows that H is cycle-free. We can now fully classify the complexity of the MST problem in the k-machine model: Theorem 2. There exists an algorithm for the k-machine model that outputs an MST in (a) Õ(n/k 2 ) rounds, if each MST-edge is output by at least one machine, or in (b) Õ(n/k) rounds, if each MST-edge e is output by both machines that hold an endpoint of e. Both bounds are tight up to polylogarithmic factors. 3.2 O(log n)-Approximation for Min-Cut Here we show the following result for the min-cut problem in the k-machine model. Theorem 3. There exists an O(log n)-approximation algorithm for the min-cut problem in the k-machine model that runs in Õ(n/k 2 ) rounds with high probability. Proof. We use exponentially growing sampling probabilities for sampling edges and then check connectivity, leveraging a result by Karger [18]. This procedure was proposed in [15] in the classic 16 CON GEST model, and can be implemented in the k-machine model as well, where we use our fast connectivity algorithm (in place of Thurimella’s algorithm [42] used in [15]). The time complexity is dominated by the connectivity-testing procedure, and thus is Õ(n/k 2 ) w.h.p. 3.3 Algorithms for Graph Verification Problems It is well known that graph connectivity is an important building block for several graph verification problems (see, e.g., [11]). We now analyze some of such problems, formally defined, e.g., in Section 2.4 of [11], in the k-machine model. Theorem 4. There exist algorithms for the k-machine model that solve the following verification problems in Õ(n/k 2 ) rounds with high probability: spanning connected subgraph, cycle containment, e-cycle containment, cut, s-t connectivity, edge on all paths, s-t cut, bipartiteness. Proof. We discuss each problem separately. Cut verification: remove the edges of the given cut from G, and then check whether the resulting graph is connected. s-t connectivity verification: run the connectivity algorithm and then verify whether s and t are in the same connected component by checking whether they have the same label. Edge on all paths verification: since e lies on all paths between u and v iff u and v are disconnected in G \ {e}, we can simply use the s-t connectivity verification algorithm of previous point. s-t cut verification: to verify if a subgraph is an s-t cut, simply verify s-t connectivity of the graph after removing the edges of the subgraph. Bipartiteness verification: use the connectivity algorithm and the reduction presented in Section 3.3 of [2]. Spanning connected subgraph, cycle containment, and e-cycle containment verification: these also follow from the reductions given in [11]. 4 Lower Bounds for Verification Problems In this section we show that Ω̃(n/k 2 ) rounds is a fundamental lower bound for many graph verification problems in the k-machine model. To this end we will use results from the classical theory of communication complexity [23], a popular way to derive lower bounds in distributed message-passing models [11, 36, 37]. √ Even though many verification problems are known to satisfy a lower bound of Ω̃(D + n) in √ the classic distributed CON GEST model [11], the reduction of [11] encodes a Θ( n)-instance of set √ disjointness, requiring at least one node to receive Θ̃( n) information across a single short “highway” √ √ path or via Θ( n) longer paths of length Θ( n). Moreover, we assume the random vertex partition model, whereas the results of [11] assume a worst case distribution. Lastly, any pair of machines can communicate directly in the k-machine model, thus breaking the Ω(D) bound for the CON GEST model. Our complexity bounds follow from the communication complexity of 2-player set disjointness in the random input partition model (see [22]). While in the standard model of communication 17 complexity there are 2 players, Alice and Bob, and Alice (resp., Bob) receives an input vector X (resp., Y ) of b bits [23], in the random input partition model Alice receives X and, in addition, each bit of Y has probability 1/2 to be revealed to Alice. Bob’s input is defined similarly with respect to X. In the set disjointness problem, Alice and Bob must output 1 if and only if there is no index i such that X[i] = Y [i] = 1. The following result holds. Lemma 8 ([22, Lemma 3.2]). For some constant  > 0, every randomized communication protocol that solves set disjointness in the random input partition model of 2-party communication complexity with probability at least 1 − , requires Ω(b) bits. Now we can show the main result of this section. Theorem 5. There exists a constant γ > 0 such that any γ-error algorithm A has round complexity of Ω̃(n/k 2 ) on an n-node vertex graph of diameter 2 in the k-machine model, if A solves any of the following problems: connectivity, spanning connected subgraph, cycle containment, e-cycle containment, s-t-connectivity, cut, edge on all paths, and s-t-cut. Proof. The high-level idea of the proof is similar to the simulation theorem of [11]. We present the argument for the spanning connected subgraph problem defined below. The remaining problems can be reduced to the SCS problem using reductions similar to those in [11]. In the spanning connected subgraph (SCS) problem we are given a graph G and a subgraph H ⊆ G and we want to verify whether H spans G and is connected. We will show, through a reduction from 2-party set disjointness, that any algorithm for SCS in the k-machine model requires Ω̃(n/k 2 ) rounds. Given an instance of the 2-party set disjointness problem in the random partition model we will construct the following input graphs G and H. The nodes of G consist of 2 special nodes s and t, and nodes u1 , . . . , ub , v1 , . . . , vb , for b = (n − 2)/2. (For clarity of presentation, we assume that (n − 2)/2 and k/2 are integers.) The edges of G consist of the edges (s, t), (ui , vi ), (s, ui ), (vi , t), for 1 ≤ i ≤ b. Let MA be the set of machines simulated by Alice, and let MB be the set of machines simulated by Bob, where |MA | = |MB | = k/2. First, Alice and Bob use shared randomness to choose the machines MX and MY that receive the vertices s and t. If MX 6= MY , then Alice assigns t to a machine chosen randomly from MA , and Bob assigns s to a random machine in MB . Otherwise, if MX and MY denote the same machine, Alice and Bob output 0 and terminate the simulation. The subgraph H is determined by the disjointness input vectors X and Y as follows: H contains all nodes of G and the edges (ui , vi ), (s, t), 1 ≤ i ≤ b. Recall that, in the random partition model, X and Y are randomly distributed between Alice and Bob, but Alice knows all X and Bob knows all of Y . Hence, Alice and Bob mark the corresponding edges as being part of H according to their respective input bits. That is, if Alice received X[i] (i.e. Bob did not receive X[i]), she assigns the node ui to a random machine in MA and adds the edge (s, ui ) to H if and only if X[i] = 0. Similarly, the edge (vi , t) is added to H if and only if Y [i] = 0 (by either Alice or Bob depending on who receives Y [i]). See Figure 1. Note that, since X and Y were assigned according to the random input partition model, the resulting distribution of vertices to machines adheres to the random vertex partition model. Clearly, H is an SCS if and only if X and Y are disjoint. We describe the simulation from Alice’s point of view (the simulation for Bob is similar): Alice locally maintains a counter rA , initialized to 1, that represents the current round number. Then, she simulates the run of A on each of her k/2 machines, yielding a set of ` messages m1 , . . . , m` 18 ub vb .. . .. . ui vi .. . .. . u1 v1 s t Figure 1: The graph construction for the spanning connected subgraph problem, given a set disjointness instance where X[1] = 0, Y [1] = 1, X[i] = 1, Y [i] = 0, and X[b] = Y [b] = 0. The thick edges are the edges of subgraph H. The subgraph H contains all edges (ui , vi ) (1 ≤ i ≤ b) and (s, t); the remaining edges of H are determined by the input vectors X and Y of the set disjointness instance. of O(polylog(n)) bits each that need to be sent to Bob to simulate the algorithm on his machines in the next round. By construction, we have that 0 ≤ ` ≤ dk 2 /4e. To send these messages in the (asynchronous) 2-party random partition model of communication complexity, Alice sends a message h`, (M1 , m1 , M2 ), . . . , (M` , m` , M`+1 )i to Bob, where a tuple (Mi , mi , Mi+1 ) corresponds to a message mi generated by machine Mi simulated by Alice and destined to machine Mi+1 simulated at Bob. Upon receiving this message, Bob increases its own round counter and then locally simulates the next round of his machines by delivering the messages to the appropriate machines. Adding the source and destination fields to each message incurs an overhead of only O(log k) = O(log n) bits, hence the total communication generated by simulating a single round of A is upper bounded by Õ(k 2 ). Therefore, if A takes T rounds to solve SCS in the k-machine model, then this gives us an O(T k 2 polylog(n))-bit communication complexity protocol for set disjointness in the random partition model, as the communication between Alice and Bob is determined by the communication across the Θ(k 2 ) links required for the simulation, each of which can carry O(polylog(n)) bits per round. Note that if A errs with probability at most γ, then the simulation errs with probability at most γ + 1/k, where the extra 1/k term comes from the possibility that machines MX and MY refer to the same machine. For large enough k and small enough γ we have γ + 1/k < . It follows that we need to simulate at least T = Ω̃(n/k 2 ) many rounds, since by Lemma 8 the set disjointness problem requires Ω(b) bits in the random partition model, when the error is smaller than . Interestingly, our lower bounds hold even for graphs of diameter 2, which is in contrast to the analogous results for the classic distributed CON GEST model assumed in [11]. We remark that the lower bound of connectivity verification was already shown in [22]. 19 5 Conclusions There are several natural directions for future work. Our connectivity algorithm is randomized: it would be interesting to study the deterministic complexity of graph connectivity in the k-machine model. Specifically, does graph connectivity admit a Õ(n/k 2 ) deterministic algorithm? Investigating higher-order connectivity, such as 2-edge/vertex connectivity, is also an interesting research direction. A general question motivated by the algorithms presented in this paper is whether one can design algorithms that have superlinear scaling in k for other fundamental graph problems. Some recent results in this directions are in [38]. Acknowledgments. The authors would like to thank Mohsen Ghaffari, Seth Gilbert, Andrew McGregor, Danupon Nanongkai, and Sriram V. Pemmaraju for helpful discussions. References [1] Giraph, http://giraph.apache.org/. [2] Kook Jin Ahn, Sudipto Guha, and Andrew McGregor. Analyzing graph structure via linear measurements. In Proceedings of the 23rd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 459–467, 2012. [3] Kook Jin Ahn, Sudipto Guha, and Andrew McGregor. Graph sketches: sparsification, spanners, and subgraphs. In Proceedings of the 31st ACM Symposium on Principles of Database Systems (PODS), pages 5–14, 2012. [4] Noga Alon, László Babai, and Alon Itai. A fast and simple randomized parallel algorithm for the maximal independent set problem. J. Algorithms, 7(4):567–583, 1986. [5] Noga Alon, Ronitt Rubinfeld, Shai Vardi, and Ning Xie. Space-efficient local computation algorithms. In Proceedings of the 23rd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1132–1139, 2012. [6] Otakar Boruvka. O Jistém Problému Minimálnı́m (About a Certain Minimal Problem). Práce Mor. Prı́rodoved. Spol. v Brne III, 3, 1926. [7] Keren Censor-Hillel, Petteri Kaski, Janne H. Korhonen, Christoph Lenzen, Ami Paz, and Jukka Suomela. Algebraic methods in the congested clique. In Proceedings of the 34th ACM Symposium on Principles of Distributed Computing (PODC), pages 143–152, 2015. [8] Jen-Yeu Chen and Gopal Pandurangan. Almost-optimal gossip-based aggregate computation. SIAM J. Comput., 41(3):455–483, 2012. [9] Fan Chung and Olivia Simpson. Distributed algorithms for finding local clusters using heat kernel pagerank. In Proceedings of the 12th Workshop on Algorithms and Models for the Web-graph (WAW), pages 77–189, 2015. [10] Graham Cormode and Donatella Firmani. A unifying framework for `0 -sampling algorithms. Distributed and Parallel Databases, 32(3):315–335, 2014. 20 [11] Atish Das Sarma, Stephan Holzer, Liah Kor, Amos Korman, Danupon Nanongkai, Gopal Pandurangan, David Peleg, and Roger Wattenhofer. Distributed verification and hardness of distributed approximation. SIAM J. Comput., 41(5):1235–1265, 2012. [12] Andrew Drucker, Fabian Kuhn, and Rotem Oshman. On the power of the congested clique model. In Proceedings of the 33rd ACM Symposium on Principles of Distributed Computing (PODC), pages 367–376, 2014. [13] Michael Elkin, Hartmut Klauck, Danupon Nanongkai, and Gopal Pandurangan. Can quantum communication speed up distributed computation? In Proceedings of the 33rd ACM Symposium on Principles of Distributed Computing (PODC), pages 166–175, 2014. [14] Robert G. Gallager, Pierre A. Humblet, and Philip M. Spira. A distributed algorithm for minimum-weight spanning trees. ACM Trans. Program. Lang. Syst., 5(1):66–77, 1983. [15] Mohsen Ghaffari and Fabian Kuhn. Distributed minimum cut approximation. In Proceedings of the 27th International Symposium on Distributed Computing (DISC), pages 1–15, 2013. [16] James W. Hegeman, Gopal Pandurangan, Sriram V. Pemmaraju, Vivek B. Sardeshmukh, and Michele Scquizzato. Toward optimal bounds in the congested clique: Graph connectivity and MST. In Proceedings of the 34th ACM Symposium on Principles of Distributed Computing (PODC), pages 91–100, 2015. [17] Hossein Jowhari, Mert Saglam, and Gábor Tardos. Tight bounds for Lp samplers, finding duplicates in streams, and related problems. In Proceedings of the 30th ACM Symposium on Principles of Database Systems (PODS), pages 49–58, 2011. [18] David R. Karger. Random sampling in cut, flow, and network design problems. In Proceedings of the 26th Annual ACM Symposium on Theory of Computing (STOC), pages 648–657, 1994. [19] David R. Karger, Philip N. Klein, and Robert E. Tarjan. A randomized linear-time algorithm to find minimum spanning trees. J. ACM, 42(2):321–328, 1995. [20] Howard J. Karloff, Siddharth Suri, and Sergei Vassilvitskii. A model of computation for MapReduce. In Proceedings of the 21st annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 938–948, 2010. [21] Valerie King, Shay Kutten, and Mikkel Thorup. Construction and impromptu repair of an MST in a distributed network with o(m) communication. In Proceedings of the 2015 ACM Symposium on Principles of Distributed Computing (PODC), pages 71–80, 2015. [22] Hartmut Klauck, Danupon Nanongkai, Gopal Pandurangan, and Peter Robinson. Distributed computation of large-scale graph problems. In Proceedings of the 26th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 391–410, 2015. [23] Eyal Kushilevitz and Noam Nisan. Communication Complexity. Cambridge University Press, 1997. [24] Shay Kutten, Gopal Pandurangan, David Peleg, Peter Robinson, and Amitabh Trehan. Sublinear bounds for randomized leader election. Theoret. Comput. Sci., 561:134–143, 2015. 21 [25] Silvio Lattanzi, Benjamin Moseley, Siddharth Suri, and Sergei Vassilvitskii. Filtering: a method for solving graph problems in MapReduce. In Proceedings of the 23rd ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 85–94, 2011. [26] Christoph Lenzen. Optimal deterministic routing and sorting on the congested clique. In Proceedings of the 32nd ACM Symposium on Principles of Distributed Computing (PODC), pages 42–50, 2013. [27] Christoph Lenzen and Roger Wattenhofer. Tight bounds for parallel randomized load balancing. Distrib. Comput., 29(2):127–142, 2016. [28] Jure Leskovec, Anand Rajaraman, and Jeffrey David Ullman. Mining of Massive Datasets. Cambridge University Press, 2014. [29] Zvi Lotker, Boaz Patt-Shamir, Elan Pavlov, and David Peleg. Minimum-weight spanning tree construction in O(log log n) communication rounds. SIAM J. Comput., 35(1):120–131, 2005. [30] Nancy A. Lynch. Distributed Algorithms. Morgan Kaufmann Publishers Inc., 1996. [31] Grzegorz Malewicz, Matthew H. Austern, Aart J. C. Bik, James C. Dehnert, Ilan Horn, Naty Leiser, and Grzegorz Czajkowski. Pregel: a system for large-scale graph processing. In Proceedings of the 2010 ACM International Conference on Management of Data (SIGMOD), pages 135–146, 2010. [32] Andrew McGregor. Graph stream algorithms: a survey. SIGMOD Record, 43(1):9–20, 2014. [33] Michael Mitzenmacher and Eli Upfal. Probability and Computing: Randomized Algorithms and Probabilistic Analysis. Cambridge University Press, 2005. [34] Danupon Nanongkai. Distributed approximation algorithms for weighted shortest paths. In Proceedings of the 46th ACM Symposium on Theory of Computing (STOC), pages 565–573, 2014. [35] Danupon Nanongkai, Atish Das Sarma, and Gopal Pandurangan. A tight unconditional lower bound on distributed randomwalk computation. In Proceedings of the 30th Annual ACM Symposium on Principles of Distributed Computing (PODC), pages 257–266, 2011. [36] Rotem Oshman. Communication complexity lower bounds in distributed message-passing. In Proceedings of the 21th International Colloquium on Structural Information and Communication Complexity (SIROCCO), pages 14–17, 2014. [37] Gopal Pandurangan, David Peleg, and Michele Scquizzato. Message lower bounds via efficient network synchronization. In Proceedings of the 23rd International Colloquium on Structural Information and Communication Complexity (SIROCCO), 2016. To appear. [38] Gopal Pandurangan, Peter Robinson, and Michele Scquizzato. Tight bounds for distributed graph computations. CoRR, abs/1602.08481, 2016. [39] David Peleg. Distributed Computing: A Locality-Sensitive Approach. Society for Industrial and Applied Mathematics, 2000. 22 [40] Judy Qiu, Shantenu Jha, Andre Luckow, and Geoffrey C. Fox. HPC-ABDS: An initial high-performance big data stack. 2014. http://grids.ucs.indiana.edu/ptliupages/publications/nist-hpc-abds.pdf. Towards Available: [41] Isabelle Stanton. Streaming balanced graph partitioning algorithms for random graphs. In Proceedings of the 25th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1287–1301, 2014. [42] Ramakrishna Thurimella. Sub-linear distributed algorithms for sparse certificates and biconnected components. J. Algorithms, 23(1):160–179, 1997. [43] Yuanyuan Tian, Andrey Balmin, Severin Andreas Corsten, Shirish Tatikonda, and John McPherson. From “think like a vertex” to “think like a graph”. PVLDB, 7(3):193–204, 2013. [44] Leslie G. Valiant. A scheme for fast parallel communication. SIAM J. Comput., 11(2):350–361, 1982. [45] Leslie G. Valiant. A bridging model for parallel computation. Commun. ACM, 33(8):103–111, 1990. [46] Sergei Vassilvitskii. Models for parallel computation (a hitchhikers’ guide to massively parallel universes), http://grigory.us/blog/massively-parallel-universes/, 2015. [47] David P. Woodruff and Qin Zhang. When distributed computation is communication expensive. Distrib. Comput., to appear. 23 A A.1 Omitted Proofs Proof of Lemma 6 Proof. Consider one phase of the algorithm, and suppose that during that phase there are n components. (In one phase there are c ≤ n components, thus setting c = n gives a valid upper bound to the height of each DRR tree in that phase.) Each component picks a random rank from [0, 1]. Thus, all ranks are distinct with high probability. If the target component’s rank is higher, then the source component connects to it, otherwise the source component becomes a root of a DRR tree. Consider an arbitrary component of the graph, and consider the (unique) path P starting form the node that represents the component to the root of the tree that contains it. Let |P | be the number of nodes of P , and assign indexes to the |P | nodes of P according to their position in the path from the selected node to the root. (See Figure 2.) X4 X3 X2 X1 Figure 2: One DRR tree, and one path from one node to the root of the tree. Nodes of the path are labeled with the indicator variable associated to them, indexed by the position of the node in the path. For each i ∈ [|P |], define Xi as the indicator variable that takes value 1 if node i is not the root P|P | of P , and 0 otherwise. Then, X = i=1 Xi is the length of the path P . Because of the random choice for the outgoing edge made by components’ parts, the outgoing edge of each component is to a random (and distinct) component. This means that, for each j ≤ |P |, the ranks of the first j nodes of the path form a set of j random values in [0, 1]. Hence, the probability that a new random value in [0, 1] is higher than the rank of the j-th node of the path is the probability that the new random value is higher than all the j previously chosen random values (that is, the probability its value is the highest among all the first j values of the path), and this probability is at most 1/(j + 1). Thus, Pr(Xi = 1) ≤ 1/(i + 1). Hence, by the linearity of expectation, the expected height 24 of a path in a tree produced by the DRR procedure is E[X] = ≤ |P | X i=1 n X E[Xi ] E[Xi ] i=1 = n X Pr(Xi = 1) i=1 ≤ n X i=1 1 i+1 ≤ log(n + 1). Notice that the Xi ’s are independent (but not identically distributed) random variables, since the probability that the i-th smallest ranked node is not a root depends only on the random neighbor that it picks, and is independent of the choices of the other nodes. Thus, applying a standard Chernoff bound (see, e.g., [33]) we have Pr(X ≥ 6 log(n + 1)) ≤ 2−6 log(n+1) = 1 . (n + 1)6 Applying the union bound over all the at most n paths concludes the proof. 25
8cs.DS
arXiv:1712.00123v1 [stat.ML] 30 Nov 2017 Label Efficient Learning of Transferable Representations across Domains and Tasks Zelun Luo Stanford University [email protected] Yuliang Zou Virginia Tech [email protected] Judy Hoffman University of California, Berkeley [email protected] Li Fei-Fei Stanford University [email protected] Abstract We propose a framework that learns a representation transferable across different domains and tasks in a label efficient manner. Our approach battles domain shift with a domain adversarial loss, and generalizes the embedding to novel task using a metric learning-based approach. Our model is simultaneously optimized on labeled source data and unlabeled or sparsely labeled data in the target domain. Our method shows compelling results on novel classes within a new domain even when only a few labeled examples per class are available, outperforming the prevalent fine-tuning approach. In addition, we demonstrate the effectiveness of our framework on the transfer learning task from image object recognition to video action recognition. 1 Introduction Humans are exceptional visual learners capable of generalizing their learned knowledge to novel domains and concepts and capable of learning from few examples. In recent years, computational models based on end-to-end learnable convolutional networks have made significant improvements for visual recognition [18, 28, 54] and have been shown to demonstrate some cross-task generalizations [8, 48] while enabling faster learning of subsequent tasks as most frequently evidenced through finetuning [14, 36, 50]. However, most efforts focus on the supervised learning scenario where a closed world assumption is made at training time about both the domain of interest and the tasks to be learned. Thus, any generalization ability of these models is only an observed byproduct. There has been a large push in the research community to address generalizing and adapting deep models across different domains [64, 13, 58, 38], to learn tasks in a data efficient way through few shot learning [27, 70, 47, 11], and to generically transfer information across tasks [1, 14, 50, 35]. While most approaches consider each scenarios in isolation we aim to directly tackle the joint problem of adapting to a novel domain which has new tasks and few annotations. Given a large labeled source dataset with annotations for a task set, A, we seek to transfer knowledge to a sparsely labeled target domain with a possibly wholly new task set, B. This setting is in line with our intuition that we should be able to learn reusable and general purpose representations which enable faster learning of future tasks requiring less human intervention. In addition, this setting matches closely to the most common practical approach for training deep models which is to use a large labeled source dataset (often ImageNet [6, 52]) to train an initial representation and then to continue supervised learning with a new set of data and often with new concepts. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. In our approach, we jointly adapt a source representation for use in a distinct target domain using a new multilayer unsupervised domain adversarial formulation while introducing a novel cross-domain and within domain class similarity objective. This new objective can be applied even when the target domain has non-overlapping classes to the source domain. We evaluate our approach in the challenging setting of joint transfer across domains and tasks and demonstrate our ability to successfully transfer, reducing the need for annotated data for the target domain and tasks. We present results transferring from a subset of Google Street View House Numbers (SVHN) [41] containing only digits 0-4 to a subset of MNIST [29] containing only digits 5-9. Secondly, we present results on the challenging setting of adapting from ImageNet [6] object-centric images to UCF-101 [57] videos for action recognition. 2 Related work Domain adaptation. Domain adaptation seeks to learn from related source domains a well performing model on target data distribution [4]. Existing work often assumes that both domains are defined on the same task and labeled data in target domain is sparse or non-existent [64]. Several methods have tackled the problem with the Maximum Mean Discrepancy (MMD) loss [17, 36, 37, 38, 73] between the source and target domain. Weight sharing of CNN parameters [58, 22, 21, 3] and minimizing the distribution discrepancy of network activations [51, 65, 30] have also shown convincing results. Adversarial generative models [33, 32, 2, 59] aim at generating source-like data with target data by training a generator and a discriminator simultaneously, while adversarial discriminative models [62, 64, 13, 12, 23] focus on aligning embedding feature representations of target domain to source domain. Inspired by adversarial discriminative models, we propose a method that aligns domain features with multi-layer information. Transfer learning. Transfer learning aims to transfer knowledge by leveraging the existing labeled data of some related task or domain [45, 71]. In computer vision, examples of transfer learning include [1, 31, 61] which try to overcome the deficit of training samples for some categories by adapting classifiers trained for other categories [43]. With the power of deep supervised learning and the ImageNet dataset [6, 52], learned knowledge can even transfer to a totally different task (i.e. image classification → object detection [50, 49, 34]; image classification → semantic segmentation [35]) and then achieve state-of-the-art performance. In this paper, we focus on the setting where source and target domains have differing label spaces but the label spaces share the same structure. Namely adapting between classifying different category sets but not transferring from classification to a localization plus classification task. Few-shot learning. Few-shot learning seeks to learn new concepts with only a few annotated examples. Deep siamese networks [27] are trained to rank similarity between examples. Matching networks [70] learns a network that maps a small labeled support set and an unlabeled example to its label. Aside from these metric learning-based methods, meta-learning has also served as a essential part. Ravi et al. [47] propose to learn a LSTM meta-learner to learn the update rule of a learner. Finn et al. [11] tries to find a good initialization point that can be easily fine-tune with new examples from new tasks. When there exists a domain shift, the results of prior few-shot learning methods are often degraded. Unsupervised learning. Many unsupervised learning algorithms have focused on modeling raw data using reconstruction objectives [19, 69, 26]. Other probabilistic models include restricted Boltzmann machines [20], deep Boltzmann machines [53], GANs [15, 10, 9], and autoregressive models [42, 66] are also popular. An alternative approach, often terms “self-supervised learning” [5], defines a pretext task such as predicting patch ordering [7], frame ordering [40], motion dynamics [39], or colorization [72], as a form of indirect supervision. Compared to these approaches, our unsupervised learning method does not rely on exploiting the spatial or temporal structure of the data, and is therefore more generic. 3 Method We introduce a semi-supervised learning algorithm which transfers information from a large labeled source domain, S, to a sparsely labeled target domain, T . The goal being to learn a strong target 2 Source CNN { , } Supervised Loss Source labeled data Multi-layer Domain Transfer Adversarial Loss Target unlabeled data { t} Semantic Transfer Pairwise Similarity Softmax Entropy Loss Target labeled data Supervised Loss { t, t} Target CNN Figure 1: Our proposed learning framework for joint transfer across domains and semantic transfer across source and target and across target labeled to unlabeled data. We introduce a domain discriminator which aligns source and target representations across multiple layers of the network through domain adversarial learning. We enable semantic transfer through minimizing the entropy of the pairwise similarity between unlabeled and labeled target images and use the temperature of the softmax over the similarity vector to allow for non-overlapping label spaces. classifier without requiring the large annotation overhead required for standard supervised learning approaches. In fact, this setting is very commonly explored for convolutional network (convnet) based recognition methods. When learning with convnets the usual learning procedure is to use a very large labeled dataset (e.g. ImageNet [6, 52]) for initial training of the network parameters (termed pre-training). The learned weights are then used as initialization for continued learning on new data and for new tasks, called fine-tuning. Fine-tuning has been broadly applied to reduce the number of labeled examples needed for learning new tasks, such as recognizing new object categories after ImageNet pre-training [54, 18], or learning new label structures such as detection after classficiation pretraining [14, 50]. Here we focus on transfer in the case of a shared label structure (e.g. classification of different category sets). We assume the source domain contains ns images, xs ∈ X S , with associated labels, ys ∈ Y S . Similarly, the target domain consists of nt unlabeled images, x̃t ∈ X˜T , as well as mt images, xt ∈ X T , with associated labels, yt ∈ Y T . We assume that the target domain is only sparsely labeled so that the number of image-label pairs is much smaller than the number of unlabeled images, mt  nt . Additionally, the number of source labeled images is assumed to be much larger than the number of target labeled images, mt  ns . Unlike standard domain adaptation approaches which transfer knowledge from source to target domains assuming a marginal or conditional distribution shift under a shared label space (Y S = Y T ), we tackle joint image or feature space adaptation as well as transfer across semantic spaces. Namely, we consider the case where the source and target label spaces are not equal, Y S 6= Y T , and even the most challenging case where the sets are non-overlapping, Y S ∩ Y T = ∅. 3.1 Joint domain and semantic transfer Our approach consists of unsupervised feature alignment between source and target as well as semantic transfer to the unlabeled target data from either the labeled target or the labeled source data. We introduce a new multi-layer domain discriminator which can be used for domain alignment following the recent domain adversarial learning approaches [13, 64]. We next introduce a new semantic transfer learning objective which uses cross category similarity and can be tuned to account for varying size of label set overlap. 3 We depict our overall model in Figure 1. We take the ns source labeled examples, {xs , ys }, the mt target labeled examples, {xt , yt }, and the nt unlabeled target images, {x̃t } as input. We learn an initial layered source representation and classification network (depicted in blue in Figure 1) using standard supervised techniques. We then initialize the target model (depicted in green in Figure 1) with the source parameters and begin our adaptive transfer learning. Our model jointly optimizes over a target supervised loss, Lsup , a domain transfer objective, LDT , and finally a semantic transfer objective, LST . Thus, our total objective can be written as follows: L(X S , Y S , X T , Y T , X˜T ) = Lsup (X T , Y T ) + αLDT (X S , X˜T ) + βLST (X S , X T , X˜T ) (1) where the hyperparameters α and β determine the influence of the domain transfer loss and the semantic transfer loss, respectively. In the following sections we elaborate on our domain and semantic transfer objectives. 3.2 Multi-layer domain adversarial loss We define a novel domain alignment objective function called multi-layer domain adversarial loss. Recent efforts in deep domain adaptation have shown strong performance using feature space domain adversarial objectives [13, 64]. These methods learn a target representation such that the target distribution viewed under this model is aligned with the source distribution viewed under the source representation. This alignment is accomplished through an adversarial minimization across domain, analogous to the prevalent generative adversarial approaches [15]. In particular, a domain discriminator, D(·), is trained to classify whether a particular data point arises from the source or the target domain. Simultaneously, the target embedding function E t (xt ) (defined as the application of layers of the network is trained to generate the target representation that cannot be distinguished from the source domain representation by the domain discriminator. Similar to [63, 64], we consider a representation to be domain invariant if the domain discriminator can not distinguish examples from the two domains. Prior work considers alignment for a single layer of the embedding at a time and as such learns a domain discriminator which takes the output from the corresponding source and target layers as input. Separately, domain alignment methods which focus on first and second order statistics have shown improved performance through applying domain alignment independently at multiple layers of the network [36]. Rather than learning independent discriminators for each layer of the network we propose a simultaneous alignment of multiple layers through a multi-layer discriminator. At each layer of our multi-layer domain discriminator, information is accumulated from both the output from the previous discriminator layer as well as the source and target activations from the corresponding layer in their respective embeddings. Thus, the output of each discriminator layer is defined as: dl = Dl (σ(γdl−1 ⊕ El (x))) (2) where l is the current layer, σ(·) is the activation function, γ ≤ 1 is the decay factor, ⊕ represents concatenation or element-wise summation, and x is taken either from source data xs ∈ X S , or target data x̃t ∈ X˜T . Notice that the intermediate discriminator layers share the same structure with their corresponding encoding layers to match the dimensions. Thus, the following loss functions are proposed to optimize the multi-layer domain discriminator and the embeddings, respectively, according to our domain transfer objective:   s t LD DT = −Exs ∼X S [log dl ] − Ext ∼X T log(1 − dl )   t s t LE DT = −Exs ∼X S [log(1 − dl )] − Ext ∼X T log dl (3) (4) where dsl , dtl are the outputs of the last layer of the source and target multi-layer domain discriminator. Note that these losses are placed after the final domain discriminator layer and the last embedding layer but then produce gradients which back-propagate throughout all relevant lower layer parameters. These two losses together comprise LDT , and there is no iterative optimization procedure involved. This multi-layer discriminator (shown in Figure 1 - yellow) allows for deeper alignment of the source and target representations which we find empirically results in improved target classification performance as well as more stable adversarial learning. 4 Figure 2: We illustrate the purpose of temperature (τ ) for our pairwise similarity vector. Consider an example target unlabeled point and its similarity to four labeled source points (x-axis). We show here, original unnormalized scores (leftmost) as well as the same similarity scores after applying softmax with different temperatures, τ . Notice that entropy values, H(x), have higher variance for scores normalized with a small temperature softmax. 3.3 Cross category similarity for semantic transfer In the previous section, we introduced a method for transferring an embedding from the source to the target domain. However, this only enforces alignment of the global domain statistics with no class specific transfer. Here, we define a new semantic transfer objective, LST , which transfers information from a labeled set of data to an unlabeled set of data by minimizing the entropy of the softmax with temperature of the similarity vector between an unlabeled point and all labeled points. Thus, this loss may be applied either between the source and unlabeled target data or between the labeled and unlabeled target data. For each unlabeled target image, x̃t , we compute the similarity, ψ(·), to each labeled example or to each prototypical example [56] per class in the labeled set. For simplicity of presentation let us consider semantic transfer from the source to the target domain first. For each target unlabeled image we compute a similarity vector where the ith element is the similarity between this target image and the ith labeled source image: [vs (x̃t )]i = ψ(x̃t , xsi ). Our semantic transfer loss can be defined as follows: LST (X˜T , X S ) = X H(σ(vs (x̃t )/τ )) (5) x̃t ∈X˜T where, H(·) is the information entropy function, σ(·) is the softmax function and τ is the temperature of the softmax. Note that the temperature can be used to directly control the percentage of source examples we expect the target example to be similar to (see Figure 2). Entropy minimization has been widely used for unsupervised [44] and semi-supervised [16] learning by encouraging low density separation between clusters or classes. Recently this principle of entropy minimization has be applied for unsupervised adaptation [38]. Here, the source and target domains are assumed to share a label space and each unlabeled target example is passed through the initial source classifier and the entropy of the softmax output scores is minimized. In contrast, we do not assume a shared label space between the source and target domains and as such can not assume that each target image maps to a single source label. Instead, we compute pairwise similarities between target points and the source points (or per class averages of source points [56]) across the features spaces aligned by our multi-layer domain adversarial transfer. We then tune the softmax temperature based on the expected similarity between the source and target labeled set. For example, if the source and target label set overlap, then a small temperature will encourage each target point to be very similar to one source class, whereas a larger temperature will allow for target points to be similar to multiple source classes. For semantic transfer within the target domain, we utilize the metric-based cross entropy loss between labeled target examples to stabilize and improve the learning. For a labeled target example, in addition to the traditional cross entropy loss, we also calculate a metric-based cross entropy loss 1 . Assume we have k labeled examples from each class in the target domain. We compute the embedding for 1 We refer this as "metric-based" to cue the reader that this is not a cross entropy within the label space. 5 each example and then the centroid cTi of each class in the embedding space. Thus, we can compute the similarity vector for each labeled example, where the ith element is the similarity between this labeled example and the centroid of each class: [vt (xt )]i = ψ(xt , cTi ). We can then calculate the metric based cross entropy loss: LST,sup (X T ) = − X {xt ,yt }∈X T exp ([vt (xt )]yt ) log Pn t i=1 exp ([vt (x )]i ) (6) Similar to the source-to-target scenario, for target-to-target we also have the unsupervised part, X H(σ(vt (x̃t )/τ )) LST,unsup (X˜T , X T ) = (7) x̃t ∈X˜T With the metric-based cross entropy loss, we introduce the constraint that the target domain data should be similar in the embedding space. Also, we find that this loss can provide a guidance for the unsupervised semantic transfer to learn in a more stable way. LST is the combination of LST,unsupervised from source-target (Equation 5), LST,supervised from source-target (Equation 6), and LST,unsupervised from target-target (Equation 7), i.e., LST (X S , X T , X˜T ) = LST (X˜T , X S ) + LST,sup (X T ) + LST,unsup (X˜T , X T ) 4 (8) Experiment This section is structured as follows. In section 4.1, we show that our method outperform fine-tuning approach by a large margin, and all parts of our method are necessary. In section 4.2, we show that our method can be generalized to bigger datasets. In section 4.3, we show that our multi-layer domain adversarial method outperforms state-of-the-art domain adversarial approaches. Datasets We perform adaptation experiments across two different paired data settings. First for adaptation across different digit domains we use MNIST [29] and Google Street View House Numbers (SVHN) [41]. The MNIST handwritten digits database has a training set of 60,000 examples, and a test set of 10,000 examples. The digits have been size-normalized and centered in fixed-size images. SVHN is a real-world image dataset for machine learning and object recognition algorithms with minimal requirement on data preprocessing and formatting. It has 73,257 digits for training, 26,032 digits for testing. As our second experimental setup, we consider adaptation from object centric images in ImageNet [52] to action recognition in video using the UCF-101 [57] dataset. ImageNet is a large benchmark for the object classification task. We use the task 1 split from ILSVRC2012. UCF-101 is an action recognition dataset collected on YouTube. With 13,320 videos from 101 action categories, UCF-101 provides a large diversity in terms of actions and with the presence of large variations in camera motion, object appearance and pose, object scale, viewpoint, cluttered background, illumination conditions, etc. Implementation details We pre-train the source domain embedding function with cross-entropy loss. For domain adversarial loss, the discriminator takes the last three layer activations as input when the number of output classes are the same for source and target tasks, and takes the second last and third last layer activations when they are different. The similarity score is chosen as the dot product of the normalized support features and the unnormalized target feature. We use the temperature τ = 2 for source-target semantic transfer and τ = 1 for within target transfer as the label space is shared. We use α = 0.1 and β = 0.1 in our objective function. The network is trained with Adam optimizer [25] and with learning rate 10−3 . We conduct all the experiments with the PyTorch framework. 4.1 SVHN 0-4 → MNIST 5-9 Experimental setting. In this experiment, we define three datasets: (i) labeled data in source domain D1 ; (ii) few labeled data in target domain D2 ; (iii) unlabeled data in target domain D3 . We take the training split of SVHN dataset as dataset D1 . To fairly compare with traditional learning paradigm and episodic training, we subsample k examples from each class to construct dataset D2 so that we can perform traditional training or episodic (k − 1)-shot learning. We experiment with k = 2, 3, 4, 5, which corresponds to 10, 15, 20, 25 labeled examples, or 0.017%, 0.025%, 0.333%, 0.043% of the 6 total training data respectively. Since our approach involves using annotations from a small subset of the data, we randomly subsample 10 different subsets {D2i }10 i=1 from the training split of MNIST dataset, and use the remaining data as {D3i }10 i=1 for each k. Note that source domain and target domain have non-overlapping classes: we only utilize digits 0-4 in SVHN, and digits 5-9 in MNIST. Figure 3: An illustration of our task. Our model effectively transfer the learned representation on SVHN digits 0-4 (left) to MNIST digits 5-9 (right). Baselines and prior work. We compare against six different methods: (i) Target only: the model is trained on D2 from scratch; (ii) Fine-tune: the model is pretrained on D1 and fine-tuned on D2 ; (iii) Matching networks [70]: we first pretrain the model on D3 , then use D2 as the support set in the matching networks; (iv) Fine-tuned matching networks: same as baseline iii, except that for each k the model is fine-tuned on D2 with 5-way (k − 1)-shot learning: k − 1 examples in each class are randomly selected as the support set, and the last example in each class is used as the query set; (v) Fine-tune + adversarial: in addition to baseline ii, the model is also trained on D1 and D3 with a domain adversarial loss; (vi.) Full model: fine-tune the model with the proposed multi-layer domain adversarial loss. Results and analysis. We calculate the mean and standard error of the accuracies across 10 sets of data, which is shown in Table 1. Due to domain shift, matching networks perform poorly without fine-tuning, and fine-tuning is only marginally better than training from scratch. Our method with multi-layer adversarial only improves the overall performance, but is more sensitive to the subsampled data. Our method achieves significant performance gain, especially when the number of labeled examples is small (k = 2). For reference, fine-tuning on full target dataset gives an accuracy of 99.65%. Table 1: The test accuracies of the baseline models and our method. Row 1 to row 6 correspond (in the same order) to the six methods proposed in section 4.2. Note that the accuracies of two matching net methods are calculated based on nearest neighbors in the support set. We report the mean and the standard error of each method across 10 different subsampled data. Method k=2 k=3 k=4 k=5 Target only Fine-tune Matching nets [70] Fine-tuned matching nets Ours: fine-tune + adv. Ours: full model (γ = 0.1) (a) (b) 0.642 ± 0.026 0.612 ± 0.020 0.469 ± 0.019 0.645 ± 0.019 0.702 ± 0.020 0.917 ± 0.007 0.771 ± 0.015 0.779 ± 0.018 0.455 ± 0.014 0.755 ± 0.024 0.800 ± 0.013 0.936 ± 0.006 (c) (d) 0.801 ± 0.010 0.802 ± 0.016 0.566 ± 0.013 0.793 ± 0.013 0.804 ± 0.014 0.942 ± 0.006 (e) 0.840 ± 0.013 0.830 ± 0.011 0.513 ± 0.023 0.827 ± 0.011 0.831 ± 0.013 0.950 ± 0.004 (f) Figure 4: The t-SNE [68, 67] visualization of different feature embeddings. (a) Source domain embedding. (b) Target domain embedding using encoder trained with source domain domain. (c) Target domain embedding using encoder fine-tuned with target domain data. (d) Target domain embedding using encoder trained with our method. (e) An overlap of a and c. (f) An overlap of a and d. (best viewed in color and with zoom) 7 4.2 Image object recognition → video action recognition Problem analysis. Many recent works [60, 24] study the domain shift between images and video in the object detection settings. Compared to still images, videos provide several advantages: (i) motion provides information for foreground vs background segmentation [46]; (ii) videos often show multiple views and thus provide 3D information. On the other hand, video frames usually suffer from: (i) motion blur; (ii) compression artifacts; (iii) objects out-of-focus or out-of-frame. Experimental setting. In this experiment, we focus on three dataset splits: (i) ImageNet training set as the labeled data in source domain D1 ; (ii) k video clips per class randomly sampled from UCF-101 training as the few labeled data in target domain set D2 ; (iii) the remaining videos in UCF-101 training set as the unlabeled data in target domain D3 . We experiment with k = 3, 5, 10, which corresponds 303, 505, 1010 video clips, or 2.27%, 3.79%, 7.59% of the total training data respectively. Each experiment is run 3 times on D1 , {D2i }3i=1 , and {D3i }3i=1 . Baselines and prior work. We compare our method with two baseline methods: (i) Target only: the model is trained on D2 from scratch; (ii) Fine-tune: the model is first pre-trained on D1 , then fine-tuned on D2 . For reference, we report the performance of a fully supervised method [55]. Results and analysis. The accuracy of each model is shown in Table 2. We also fine-tune a model with all the labeled data for comparison. Per-frame performance (img) and average-across-frame performance (vid) are both reported. Note that we calculate the average-across-frame performance by averaging the softmax score of each frame in a video. Our method achieves significant improvement on average-across-frame performance over standard fine-tuning for each value of k. Note that compared to fine-tuning, our method has a bigger gap between per-frame and per-video accuracy. We believe that this is due to the semantic transfer: our entropy loss encourages a sharper softmax variance among per-frame softmax scores per video (if the variance is zero, then per-frame accuracy = per-video accuracy). By making more confident predictions among key frames, our method achieves a more significant gain with respective to per-video performance, even when there is little change in the per-frame prediction. Table 2: Accuracy of UCF-101 action classification. The results of the two-stream spatial model are taken from [55] and vary depending on hyperparameters. We report the mean and the standard error of each method across 3 different subsampled data. Method k=3 k=5 k=10 All Target only (img) Target only (vid) Fine-tune (img) Fine-tune (vid) Two-stream spatial [55] Ours (img) Ours (vid) 4.3 0.098±0.003 0.105±0.003 0.380±0.013 0.406±0.015 0.393±0.006 0.467±0.007 0.126±0.022 0.133±0.024 0.486±0.012 0.523±0.010 0.459±0.013 0.545±0.014 0.100±0.035 0.106±0.038 0.529±0.039 0.568±0.042 0.523±0.002 0.620±0.005 0.672 0.714 0.708 - 0.720 - Ablation: unsupervised domain adaptation To validate our multi-layer domain adversarial loss objective, we conduct an ablation experiment for unsupervised domain adaptation. We compare against multiple recent domain adversarial unsupervised adaptation methods. In this experiment, we first pretrain a source embedding CNN on the training split SVHN [41] and then adapt the target embedding for MNIST by performing adversarial domain adaptation. We evaluate the classification performance on the test split of MNIST [29]. We follow the same training strategy and model architecture for the embedding network as [64]. 8 All the models here have a two-step training strategy and share the first stage. ADDA [64] optimizes encoder and classifier simultaneously. We also propose a similar method, but optimize encoder only. Only we try a model with no classifier in the last layer (i.e. perform domain adversarial training in feature space). We choose γ = 0.1 as the decay factor for this model. The accuracy of each model is shown in Table 3. We find that our method achieve 6.5% performance gain over the best competing domain adversarial approach indicating that our multilayer objective indeed contributes to our overall performance. In addition, in our experiments, we found that the multilayer approach improved overall optimization stability, as evidenced in our small standard error. Table 3: Experimental results on unsupervised domain adaptation from SVHN to MNIST. Results of Gradient reversal, Domain confusion, and ADDA are from [64], and the results of other methods are from experiments across 5 different subsampled data. Method Accuracy Source only Gradient reversal [13] Domain confusion [62] ADDA [64] Ours 5 0.601 ± 0.011 0.739 0.681 ± 0.003 0.760 ± 0.018 0.810 ± 0.003 Conclusion In this paper, we propose a method to learn a representation that is transferable across different domains and tasks in a data efficient manner. The framework is trained jointly to minimize the domain shift, to transfer knowledge to new task, and to learn from large amounts of unlabeled data. We show superior performance over the popular fine-tuning approach. We hope to keep improving the method in future work. Acknowledgement We would like to start by thanking our sponsors: Stanford Computer Science Department and Stanford Program in AI-assisted Care (PAC). Next, we specially thank De-An Huang, Kenji Hata, Serena Yeung, Ozan Sener and all the members of Stanford Vision and Learning Lab for their insightful discussion and feedback. Lastly, we thank all the anonymous reviewers for their valuable comments. 9 References [1] Yusuf Aytar and Andrew Zisserman. Tabula rasa: Model transfer for object category detection. In Computer Vision (ICCV), 2011 IEEE International Conference on, pages 2252–2259. IEEE, 2011. [2] Konstantinos Bousmalis, Nathan Silberman, David Dohan, Dumitru Erhan, and Dilip Krishnan. Unsupervised pixel-level domain adaptation with generative adversarial networks. arXiv preprint arXiv:1612.05424, 2016. [3] Lluis Castrejon, Yusuf Aytar, Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Learning aligned cross-modal representations from weakly aligned data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2940–2949, 2016. [4] Gabriela Csurka. Domain adaptation for visual applications: A comprehensive survey. arXiv preprint arXiv:1702.05374, 2017. [5] Virginia R de Sa. Learning classification with unlabeled data. Advances in neural information processing systems, pages 112–112, 1994. [6] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009. [7] Carl Doersch, Abhinav Gupta, and Alexei A Efros. Unsupervised visual representation learning by context prediction. In Proceedings of the IEEE International Conference on Computer Vision, pages 1422–1430, 2015. [8] Jeff Donahue, Yangqing Jia, Oriol Vinyals, Judy Hoffman, Ning Zhang, Eric Tzeng, and Trevor Darrell. Decaf: A deep convolutional activation feature for generic visual recognition. In Proceedings of the 31st International Conference on International Conference on Machine Learning - Volume 32, ICML’14, pages I–647–I–655. JMLR.org, 2014. [9] Jeff Donahue, Philipp Krähenbühl, and Trevor Darrell. Adversarial feature learning. arXiv preprint arXiv:1605.09782, 2016. [10] Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Alex Lamb, Martin Arjovsky, Olivier Mastropietro, and Aaron Courville. Adversarially learned inference. arXiv preprint arXiv:1606.00704, 2016. [11] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. arXiv preprint arXiv:1703.03400, 2017. [12] Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. arXiv preprint arXiv:1409.7495, 2014. [13] Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. Journal of Machine Learning Research, 17(59):1–35, 2016. [14] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Computer Vision and Pattern Recognition, 2014. [15] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. [16] Yves Grandvalet, Yoshua Bengio, et al. Semi-supervised learning by entropy minimization. In NIPS, volume 17, pages 529–536, 2004. [17] A Gretton, A.J. Smola, J Huang, Marcel Schmittfull, K.M. Borgwardt, B Schölkopf, J Quiñonero Candela, M Sugiyama, A Schwaighofer, and N D. Lawrence. Covariate shift by kernel mean matching. In Dataset Shift in Machine Learning, 131-160 (2009), 01 2009. 10 [18] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. [19] Geoffrey E Hinton and Ruslan R Salakhutdinov. Reducing the dimensionality of data with neural networks. science, 313(5786):504–507, 2006. [20] Geoffrey E Hinton and Terrence J Sejnowski. Learning and releaming in boltzmann machines. Parallel Distrilmted Processing, 1, 1986. [21] Judy Hoffman, Saurabh Gupta, and Trevor Darrell. Learning with side information through modality hallucination. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 826–834, 2016. [22] Judy Hoffman, Saurabh Gupta, Jian Leong, Sergio Guadarrama, and Trevor Darrell. Crossmodal adaptation for rgb-d detection. In Robotics and Automation (ICRA), 2016 IEEE International Conference on, pages 5032–5039. IEEE, 2016. [23] Judy Hoffman, Dequan Wang, Fisher Yu, and Trevor Darrell. Fcns in the wild: Pixel-level adversarial and constraint-based adaptation. arXiv preprint arXiv:1612.02649, 2016. [24] Vicky Kalogeiton, Vittorio Ferrari, and Cordelia Schmid. Analysing domain shift factors between videos and images for object detection. IEEE transactions on pattern analysis and machine intelligence, 38(11):2327–2334, 2016. [25] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [26] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. [27] Gregory Koch. Siamese neural networks for one-shot image recognition. PhD thesis, University of Toronto, 2015. [28] Alex Krizhevsky, Ilya Sutskever, and Geoff Hinton. Imagenet classification with deep convolutional neural networks. In Neural Information Processing Systems (NIPS), 2012. [29] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. [30] Yanghao Li, Naiyan Wang, Jianping Shi, Jiaying Liu, and Xiaodi Hou. Revisiting batch normalization for practical domain adaptation. arXiv preprint arXiv:1603.04779, 2016. [31] Joseph J Lim, Ruslan Salakhutdinov, and Antonio Torralba. Transfer learning by borrowing examples for multiclass object detection. In Proceedings of the 24th International Conference on Neural Information Processing Systems, pages 118–126. Curran Associates Inc., 2011. [32] Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. arXiv preprint arXiv:1703.00848, 2017. [33] Ming-Yu Liu and Oncel Tuzel. Coupled generative adversarial networks. In Advances in Neural Information Processing Systems, pages 469–477, 2016. [34] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C Berg. Ssd: Single shot multibox detector. In European Conference on Computer Vision, pages 21–37. Springer, 2016. [35] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3431–3440, 2015. [36] Mingsheng Long, Yue Cao, Jianmin Wang, and Michael I Jordan. Learning transferable features with deep adaptation networks. In ICML, pages 97–105, 2015. 11 [37] Mingsheng Long, Jianmin Wang, and Michael I Jordan. Deep transfer learning with joint adaptation networks. arXiv preprint arXiv:1605.06636, 2016. [38] Mingsheng Long, Han Zhu, Jianmin Wang, and Michael I Jordan. Unsupervised domain adaptation with residual transfer networks. In Advances in Neural Information Processing Systems, pages 136–144, 2016. [39] Zelun Luo, Boya Peng, De-An Huang, Alexandre Alahi, and Li Fei-Fei. Unsupervised learning of long-term motion dynamics for videos. arXiv preprint arXiv:1701.01821, 2017. [40] Ishan Misra, C Lawrence Zitnick, and Martial Hebert. Shuffle and learn: unsupervised learning using temporal order verification. In European Conference on Computer Vision, pages 527–544. Springer, 2016. [41] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupervised feature learning, volume 2011, page 5, 2011. [42] Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016. [43] Maxime Oquab, Leon Bottou, Ivan Laptev, and Josef Sivic. Learning and transferring midlevel image representations using convolutional neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1717–1724, 2014. [44] Gintautas Palubinskas, Xavier Descombes, and Frithjof Kruggel. An unsupervised clustering method using the entropy minimization. In AAAI, 1999. [45] Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Transactions on knowledge and data engineering, 22(10):1345–1359, 2010. [46] Deepak Pathak, Ross Girshick, Piotr Dollár, Trevor Darrell, and Bharath Hariharan. Learning features by watching objects move. arXiv preprint arXiv:1612.06370, 2016. [47] Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In International Conference on Learning Representations, volume 1, page 6, 2017. [48] Ali Sharif Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. CNN features off-the-shelf: An astounding baseline for recognition. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR Workshops 2014, Columbus, OH, USA, June 23-28, 2014, pages 512–519, 2014. [49] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 779–788, 2016. [50] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91–99, 2015. [51] Artem Rozantsev, Mathieu Salzmann, and Pascal Fua. Beyond sharing weights for deep domain adaptation. arXiv preprint arXiv:1603.06432, 2016. [52] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015. [53] Ruslan Salakhutdinov and Geoffrey Hinton. Deep boltzmann machines. In Artificial Intelligence and Statistics, pages 448–455, 2009. [54] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. 12 [55] Karen Simonyan and Andrew Zisserman. Two-stream convolutional networks for action recognition in videos. In Advances in neural information processing systems, pages 568–576, 2014. [56] Jake Snell, Kevin Swersky, and Richard S Zemel. Prototypical networks for few-shot learning. arXiv preprint arXiv:1703.05175, 2017. [57] Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012. [58] Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In Computer Vision–ECCV 2016 Workshops, pages 443–450. Springer, 2016. [59] Yaniv Taigman, Adam Polyak, and Lior Wolf. Unsupervised cross-domain image generation. arXiv preprint arXiv:1611.02200, 2016. [60] Kevin Tang, Vignesh Ramanathan, Li Fei-Fei, and Daphne Koller. Shifting weights: Adapting object detectors from image to video. In Advances in Neural Information Processing Systems, pages 638–646, 2012. [61] Tatiana Tommasi, Francesco Orabona, and Barbara Caputo. Safety in numbers: Learning categories from few examples with multi model knowledge transfer. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pages 3081–3088. IEEE, 2010. [62] Eric Tzeng, Judy Hoffman, Trevor Darrell, and Kate Saenko. Simultaneous deep transfer across domains and tasks. In Proceedings of the IEEE International Conference on Computer Vision, pages 4068–4076, 2015. [63] Eric Tzeng, Judy Hoffman, Trevor Darrell, and Kate Saenko. Simultaneous deep transfer across domains and tasks. In International Conference in Computer Vision (ICCV), 2015. [64] Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In Computer Vision and Pattern Recognition (CVPR), 2017. [65] Eric Tzeng, Judy Hoffman, Ning Zhang, Kate Saenko, and Trevor Darrell. Deep domain confusion: Maximizing for domain invariance. arXiv preprint arXiv:1412.3474, 2014. [66] Aaron van den Oord, Nal Kalchbrenner, Lasse Espeholt, Oriol Vinyals, Alex Graves, et al. Conditional image generation with pixelcnn decoders. In Advances in Neural Information Processing Systems, pages 4790–4798, 2016. [67] Laurens Van Der Maaten. Accelerating t-sne using tree-based algorithms. Journal of machine learning research, 15(1):3221–3245, 2014. [68] Laurens Van der Maaten and Geoffrey Hinton. Visualizing non-metric similarities in multiple maps. Machine learning, 87(1):33–55, 2012. [69] Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th international conference on Machine learning, pages 1096–1103. ACM, 2008. [70] Oriol Vinyals, Charles Blundell, Tim Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In Advances in Neural Information Processing Systems, pages 3630–3638, 2016. [71] Karl Weiss, Taghi M Khoshgoftaar, and DingDing Wang. A survey of transfer learning. Journal of Big Data, 3(1):1–40, 2016. [72] Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In European Conference on Computer Vision, pages 649–666. Springer, 2016. [73] Xu Zhang, Felix Xinnan Yu, Shih-Fu Chang, and Shengjin Wang. Deep transfer network: Unsupervised domain adaptation. arXiv preprint arXiv:1503.00591, 2015. 13 Network Architecture (a) SVHN 0-4 → MNIST 5-9 name layer type kernel stride padding name layer type kernel stride padding name layer type kernel Table 4: Embedding network structure conv1 pool1 conv2 conv-batchnorm-relu max pool conv-batchnorm-relu 3×3×64 2×2 3×3×64 1 2 1 1 0 1 conv3 pool3 conv4 conv-batchnorm-relu max pool conv-batchnorm-relu 3×3×64 2×2 3×3×64 1 2 1 1 0 1 fc1 fc2 fc-relu fc 64×64 64×5 name layer type kernel fc1 fc-relu 64×64 Table 5: Discriminator structure fc2 fc3 fc4 fc5 fc-relu fc-relu fc-relu fc-relu 64×5 5×500 500×500 500×500 14 pool2 max pool 2×2 2 0 pool4 max pool 2×2 2 0 fc6 fc 500×1 (b) Image object recognition → video action recognition Embedding network structure: ResNet-18 2 . name layer type kernel stride padding Table 6: Discriminator structure conv1 conv2 conv-batchnorm-leaky relu conv-batchnorm-leaky relu 3×3×512 3×3×512 2 1 1 1 conv3 conv 1×1×1 1 0 (c) Ablation: unsupervised domain adaptation name layer type kernel stride padding name layer type kernel name layer type kernel Table 7: Embedding network structure conv1 pool1 conv2 pool2 conv-relu max pool conv-relu max pool 5×5×20 2×2 5×5×20 2×2 1 2 1 2 0 0 0 0 fc1 fc2 fc-relu fc 800×500 500×10 Table 8: Discriminator structure fc1 fc2 fc3 fc4 fc-relu fc-relu fc-relu fc-relu 800×500 500×10 10×500 500×500 2 fc5 fc 500×1 We refer readers to the PyTorch implementation: https://github.com/pytorch/vision/blob/ master/torchvision/models/resnet.py 15
1cs.CV
1 Resource Allocation for D2D Communications Underlaying a NOMA-Based Cellular Network Yijin Pan, Cunhua Pan, Zhaohui Yang, Ming Chen Abstract arXiv:1710.05149v1 [cs.IT] 14 Oct 2017 This letter investigates the power control and channel assignment problem in device-to-device (D2D) communications underlaying a non-orthogonal multiple access (NOMA) cellular network. With the successive interference cancellation decoding order constraints, our target is to maximize the sum rate of D2D pairs while guaranteeing the minimum rate requirements of NOMA-based cellular users. Specifically, the optimal conditions for power control of cellular users on each subchannel are derived first. Then, based on these results, we propose a dual-based iterative algorithm to solve the resource allocation problem. Simulation results validate the superiority of proposed resource allocation algorithm over the existing orthogonal multiple access scheme. Index Terms D2D, NOMA, power control, channel assignment. I. I NTRODUCTION The device-to-device (D2D) communications have been considered as a promising way to alleviate the upcoming traffic pressure on core networks. Due to the short transmission distance of D2D pairs, the spectrum efficiency can be significantly improved by the spectrum reuse with cellular users (CUs). In conventional networks, the uplink resources are normally provided for D2D communications since traffic in downlink is significantly heavier than that in uplink [1], [2]. However, some uplink applications with high rate requirements are becoming popular in the future networks such as the Skype video call [3]. Hence, the traffic between uplink and downlink is becoming less asymmetric and the resource allocation problem for D2D communications underlaying the downlink celluar network should be studied as well [4]–[6]. Apart from D2D communications, non-orthogonal multiple access (NOMA) is another emerging technology to handle the transmission pressure in the near future [7]. In a NOMA-based cellular network, multiple CUs are allowed to share the same subchannel via different power Y. Pan, Z. Yang and M. Chen are with the National Mobile Communications Research Laboratory, Southeast University, Nanjing 211111, China. Email:{panyijin,yangzhaohui,chenming}@seu.edu.cn. C. Pan is with the School of Electronic Engineering and Computer Science, Queen Mary, University of London, London E1 4NS, UK. Email: [email protected]. 2 levels, and successive interference cancellation (SIC) is adopted at the CUs for decoding. In this way, the NOMA-based cellular network can greatly increase system throughput and allow massive connectivities. Recently, several approaches have been proposed to combine the D2D communications with NOMA technology [8], [9]. The D2D users were grouped through the NOMA way in [8] to achieve better D2D rate performance, and the channel allocation problem for the NOMA-based D2D groups is modeled as a Many-to-One matching. Furthermore, the D2D assisted NOMA scheme was proposed in [9] to enhance system throughput performance. D2D pairs were merely assumed to transmit on exclusive channels without sharing channels with CUs in [9], even though frequency reuse between D2D pairs and CUs is spectrum efficient. However, when D2D pairs reuse spectrum with NOMA-based CUs, the co-channel interference in SIC decoding will become further complicated, which may destroy the original SIC decoding order of CUs. To conquer this issue, one should impose an additional restriction for the power control and channel assignment of the D2D pairs, which has not been studied in current literature. This motivates us to reconsider the resource allocation problem for D2D communications when the D2D pairs share spectrum with the NOMA-based CUs. In this letter, we consider the power control and channel assignment for the D2D pairs underlaying NOMA-based cellular networks with consideration of the SIC decoding constraints. This scenario is different from that in [8], where NOMA is implemented in D2D transmissions. Furthermore, since power control is not considered for either CUs or NOMA-based D2D groups in [8], the approach in [8] cannot be directly applied to solve our problem. Our target is to maximize the sum rate of D2D pairs while guaranteeing the minimum rate requirements of CUs. We derive the optimal conditions for power control of the NOMA-based CUs first, then propose a dual-based iterative algorithm to solve the resource allocation problem. Specifically, by adopting the auxiliary variables and relaxing the binary constraints, the formulated optimization problem is transformed into a convex one, which can be optimally solved by the dual method. Finally, simulation results show the significant D2D sum rate gains of proposed algorithm over the conventional orthogonal multiple access (OMA) scheme. II. S YSTEM M ODEL AND P ROBLEM F ORMULATION Consider a downlink NOMA-based cellular network, where base station (BS) serves CUs through N subchannels (SCs). By adopting NOMA, M CUs are multiplexed in the same SC by 3 splitting them in the power domain1 . That is to say, the total number of CUs is NM. Meanwhile, there are K(K ≤ N) underlaid D2D pairs randomly distributed in the cell. Denote K = {1, · · · , K} and N = {1, · · · , N} as the sets of D2D pairs and SCs, respectively. The superposition symbol transmitted by BS on SC n to CUs is n x = M X p pni sni , (1) i=1 where sni and pni are the transmit signal and transmit power for CU i on SC n, respectively. To implement NOMA, BS needs to inform each CU of the SIC decoding order, so that strong CUs can decode and remove the signal from weak CUs. In current work, it is generally assumed that the SIC decoding order follows the increasing order of channel gains [10], [11]. Let hni denote the channel from BS to CU i on n-th SC2 . When |hn1 | ≤ |hn2 | ≤· · ·≤ |hnM |, CU i can successfully decode and remove the interference from CU j, ∀j < i. However, in our work, underlaid D2D pairs also contribute to the co-channel interference, which affects the NOMA decoding order. In this case, the received SINR at CU i to decode the signal sj , j < i, on SC n is SINRni→j pnj |hni |2 = n PM , P n n n 2 2 |hi |2 t=j+1 pnt + K k=1 αk qk |hk,i | + σ (2) where the binary variable αkn denotes whether or not SC n is assigned to D2D pair k. The term PK n n n 2 k=1 αk qk |hk,i | represents the co-channel interference to CU i from the underlaid D2D pairs on SC n, where qkn is the transmit power of D2D pair k and |hnk,i | represents the channel gain from D2D pair k to CU i on SC n. Specifically, when CU i desires to decode the signal of CU j from superposition symbol xn , the interference cancellation is successful if the CU i’s received SINR is larger or equal to CU j’s own received SINR. Therefore, to protect the given SIC decoding order, the following conditions should be satisfied. PK PK n n n 2 2 n n n 2 2 k=1 αk qk |hk,j | + σ k=1 αk qk |hk,i | + σ ≥ , |hnj |2 |hni |2 (3) for i, j ∈ {1, · · · , M} , M, j < i, and n ∈ N . The set M represents the set of CUs’ index on each SC. Note that there will be M (M2 −1) constraints for each SC in the form of (3). To simplify the decoding order constraints, the following equivalent inequalities can be implied from (3) PK PK n n n 2 2 n n n 2 2 k=1 αk qk |hk,i | + σ k=1 αk qk |hk,i+1 | + σ ≥ , (4) |hni |2 |hni+1 |2 1 It is assumed that CUs served by the same SC are already scheduled. The CU grouping issues (see e.g. [7]) are generally the task of the upper-layer, which are beyond the scope of this paper. 2 Similar as [10], [11], the receivers are assumed to have the perfect channel state information by channel feedback. 4 for i ∈ M \ {M}, and n ∈ N . In this form, there are only M − 1 constraints on each SC. The achievable rate of CU i on SC n in bits/s/Hz is n Ri→i = log2 (1 + SINRni→i ). (5) Although the spectrum efficiency can be improved by allowing multiple D2D pairs reusing the same SC, the design of efficient resource allocation schemes in this paradigm requires high computation complexity. Moreover, heavy signaling overhead exchange occurs since channel state information of the interference channels between different D2D pairs over all SCs should be estimated. Given theses concerns, we assume that one SC is only allocated to at most one D2D pair. Consequently, we have the following channel assignment constraints: K X αkn ≤ 1, αkn ∈ {0, 1}, ∀n ∈ N , k ∈ K. (6) k=1 The SINR at the receiver of D2D pair k on SC n is SINRnk = qkn |gkn |2 , PM n n 2 2 p + σ | |gk,B i i=1 (7) where |gkn | is the channel gain between the transmitter and receiver of D2D pair k on SC n, and n |gk,B | is the interference channel gain from BS to the receiver of D2D pair k on SC n. In this case, the achievable rate of D2D pair k on SC n in bits/s/Hz is Rkn = log2 (1 + SINRnk ). (8) Meanwhile, to guarantee the rate fairness among CUs, the minimum rate requirements for CUs are imposed as n Ri→i ≥ γin , ∀i ∈ M, n ∈ N , (9) where γin is the rate requirement of CU i on SC n. The transmit power constraints for D2D N X pairs and BS for CUs are D αkn qkn ≤ Pmax , ∀k ∈ K, n=1 M X C pni ≤ Pmax , ∀n ∈ N . (10) (11) i=1 To maximize the sum rate of D2D pairs, the following optimization problem is obtained. P1 : max n n {pn k ,αk ,qk } D Rmax = K X N X αkn Rkn , k=1 n=1 s.t. (4), (6), (9) − (11). (12a) 5 III. P OWER C ONTROL AND C HANNEL A SSIGNMENT To solve the sum rate maximization Problem P1, the optimal conditions for power control of the NOMA-based CUs on a given SC are first investigated. Then, we propose a dual-based iterative method to obtain the power control and channel assignment for D2D pairs. A. Optimal Power Control for CUs If SC n is assigned to D2D pair k, we first determine the optimal transmit power conditions for CUs. For simplicity, the superscript n is omitted in the following analysis of this subsection. To solve the power control problem, we define σ2 |hk,i |2 , ∆ = , ∀i ∈ M. (13) i |hi |2 |hi |2 It is easy to know that the constraint (9) should hold with equality for the optimal transmit ξk,i = power of CU i denoted as p∗i , ∀i ∈ M [4], [5]. Otherwise, the sum rate of D2D pairs can be further improved by decreasing p∗i . Setting (9) with equality for CU M, we have p∗M = (2γM − 1) (qk ξk,M + ∆M ) . (14) Accordingly, for the CU i, ∀i ∈ M \ {M}, the optimal transmit power p∗i is ! M X p∗i = (2γi − 1) qk ξk,i + ∆i + p∗t . (15) t=i+1 It is not easy to obtain the explicit expression of p∗i from (15). To assist solving this issue, we P ∗ define Si = M t=i pt , which represents the summation of transmit powers from CU i to CU M. Substituting Si in (15), we have Si = (2γi − 1)(qk ξk,i + ∆i ) + 2γi Si+1 . (16) According to the recursive relations, we can obtain that MX −i−1 Si= where we define 2 j=0 P−1 l=0 2 Pj−1 γi+l l=0 γi+l (2γi+j − 1)(qk ξk,i+j +∆i+j ) + 2 PM −i−1 s=0 γi+s SM . (17) = 20 = 1. Obviously, SM = p∗M . Based on (14), (17) is simplified to Si = M −i X 2 Pj−1 l=0 γi+l (2γi+j − 1)(qk ξk,i+j +∆i+j ). (18) j=0 P ∗ In addition, the optimal transmit power for CU i, ∀i ∈ M \ {M} is obtained by p∗i = M t=i pt − PM P0 0 ∗ l=1 γi+l = 2 = 1, we have t=i+1 pt = Si − Si+1 . By further using (18) and defining p∗i = (2γi −1) M −i X j=1 2 Pj−1 l=1 γi+l (2γi+j −1)(qk ξk,i+j +∆i+j )+(2γi −1)(qk ξk,i +∆i ), i ∈ M\{M}. (19) 6 B. D2D Power Control and Channel Assignment Based on the previous analysis, the transmit powers for CUs are all determined by the transmit power of the multiplexed D2D pair. When SC n is assigned to D2D pair k, according to (18), the transmit power constraint (11) is equivalent to M −1 X n C Γj (qkn ξk,1+j +∆n1+j ) ≤ Pmax . (20) j=0 where Γj = 2 Pj l=1 γl (2γ1+j − 1). Then, the following inequality holds. P −1 n C Pmax − M j=0 Γj ∆1+j n . qk ≤ PM −1 n Γ ξ j k,1+j j=0 (21) According to (18), the SIC successful decoding order constraints in (4) can be rewritten as n n qkn ξk,i + ∆ni ≥ qkn ξk,i+1 + ∆ni+1 , ∀i ∈ M \ {M}. (22) n n Recall that ∆ni+1 ≤ ∆ni since |hni | ≤ |hni+1 |. Note that if ξk,i ≥ ξk,i+1 , (22) is feasible for any non-negative qkn . Hence, the transmit power of D2D pair k on SC n should satisfy ) ( n n ∆ − ∆ i+1 i . qkn ≤ minn n n n <ξk,i+1 } {i∈M\{M }|ξk,i ξk,i − ξk,i+1 n n Remark: According to (23), we find that if ξk,i < ξk,i+1 , i.e., 2 |hn k,i | 2 |hn | i < 2 |hn k,i+1 | 2 , |hn | i+1 (23) one additional transmit power constraint is imposed on the D2D pair to protect the SIC decoding order of CUs. n n On the other hand, if the condition ξk,i ≥ ξk,i+1 , i.e., 2 |hn k,i | n 2 |hi | ≥ 2 |hn k,i+1 | n 2 |hi+1 | holds for all i ∈ M \ {M}, the SIC decoding order constraints in (4) are alway satisfied. Substituting (18) into (8), the achievable rate of D2D pair k on SC n is   dnk qkn n n Rk (qk ) = log2 1 + n , qk + enk where dnk = n | |gk,B |gkn |2 PM −1 2 j=0 Γj ξj+1 , enk = n |2 |gk,B Problem P1 is simplified to P2 : max n n {αk ,qk } PM −1 n |2 |gk,B j=0 Γj ∆j+1 +σ PM −1 j=0 Γj ξj+1 D Rmax = K X N X (24) 2 . Given the above results, the original αkn Rkn (qkn ), (25a) k=1 n=1 s.t. (6), (10), (25b) 0 ≤ qkn ≤ Qnk , ∀k ∈ K, n ∈ N , (  where Qnk = min max 0,  P o n n C − M −1 Γ ∆n Pmax ∆i+1 −∆n j 1+j j=0 i PM −1 , minn n n n n <ξk,i+1 } ξk,i −ξk,i+1 {i∈M\{M }|ξk,i j=0 Γj ξk,1+j (25c) ) . 7 It is easy to see that f (qkn ) = n dn k qk n qk +en k is concave with respect to (w.r.t) qkn . Consequently, Rkn (qkn ) is concave w.r.t qkn due to that the logarithmic function is increasing and concave [12, Page 84]. However, problem P2 is not convex due to (25a) and (6). By introducing the auxiliary variable xnk = αkn qkn , and temporarily relaxing the integer constraints for {αkn }, Problem P2 is transformed  n K X N X into xk D n n n n P3 : max Rmax (αk , xk ) = αk Rk , (26a) n n αk ∈[0,1] α k n=1 k=1 xn ∈[0,αn Qn ] k k k s.t. N X D xnk ≤ Pmax , ∀k ∈ K, (26b) αkn ≤ 1, ∀n ∈ N . (26c) n=1 K X k=1 D It is inferred that Rmax (αkn , xnk ) is concave w.r.t (αkn , xnk ) within a triangular region due to the perspective property [4], [13], so that Problem P3 is convex. Therefore, the optimal solution to Problem P3 can be obtained by using the standard dual method. The Lagrangian is obtained as ! !  n X N N K N K X K X X X X x D k αkn , (27) λk Pmax − xnk + βn 1 − αkn Rkn L= + n α k n=1 n=1 k=1 k=1 n=1 k=1 where {λk } and {βn } are the non-negative dual variables associated with the constraints (26b) and (26c), respectively. Taking the derivative of L w.r.t xnk and αkn respectively, we have  n  n   ∂L ∂L xk xnk n ′ xnk xk n′ n = Rk − λk , = Rk − n Rk − βn , (28) ∂xnk αkn ∂αkn αkn αk αkn where Rkn ′ (t) is the derivative of Rkn (t) w.r.t t. Applying the Karush-Kuhn-Tucker conditions, we can obtain the following necessary conditions for the optimal solution (αkn ∗ , xnk ∗ ). If αkn ∗ = 0, then xnk ∗ = 0, and we have ∂L ∂xn k ∂L n n n < 0, ∂α n < 0, for all αk ∈ (0, 1] and xk ∈ (0, Qk ]. If αkn ∗ 6= 0, we have   < 0, if xnk ∗ = 0   ∂L = 0, if xnk ∗ ∈ (0, Qnk ) , ∂xnk    > 0, if xn ∗ = Qn k k k ∂L ∂αkn ( When xnk ∗ ∈ (0, Qnk ), xnk ∗ can be obtained by solving = 0, if αkn ∗ ∈ (0, Qnk ) (29) > 0, if αkn ∗ = 1. ∂L ∂xn k = 0. Denoting t = ∗ xn ∂L k ∗ , ∂xn αn k k = 0 is equivalent to the following quadratic equation. (dnk + 1)t2 + (dnk + 2)enk t + (enk )2 − dnk enk = 0. λk ln 2 Note that the discriminant of this quadratic equation is ∆ = enk dnk 2 + 2 4dn k λk ln 2 (30) + n en k dk , λk ln 2 indicating that (30) has two real roots. According to the quadratic solution formula, we define tnk (λk ) = √ n −(dn k +2)ek + ∆ . n 2(dk +1) Given that xnk ∗ ∈ [0, αkn Qnk ], we can conclude that xnk ∗ = αkn ∗ Tkn ∗ , (31) 8 Qn where Tkn ∗ = [tnk (λk )]0 k , and [x]ab = min{max{x, b}, a}. According to (29), it follows that ( 1, if Hkn > βn (32) αkn ∗ = 0, if Hkn < βn where Hkn = Rkn (Tkn ∗ ) − Tkn ∗ Rkn ′ (Tkn ∗ ). If Hkn are all different for k ∈ K, according to constraint (26c) and (32), we have αkn′ ∗ = 1, αkn ∗ = 0, ∀k 6= k ′ , (33) where k ′ = arg maxHkn . For SC n, only the D2D pair with the largest Hkn should be assigned k this SC. Note that the value of λk can be determined by the sub-gradient method [14]. The updating procedure of λk in the (t + 1)-th iteration is " (t+1) λk (t) (t) = λk − θk (t) D Pmax − N X (xnk )(t) n !#+ . (34) where [a]+ = max{0, a}, and θk is the positive step size. According to [14, Proposition 6.3.1], the sub-gradient method converges to the optimal solution to Problem P3 for sufficient small step (t) size θk . Thus, the transmit power of the D2D pairs can be obtained as qkn = αkn xnk . Overall, the above analysis is summarized as the following dual-based iterative resource allocation (DBIRA) algorithm to solve problem P1. IV. S IMULATION R ESULTS The performance of the proposed resource allocation scheme is evaluated by simulations in this section. The cell is a 500 m × 500 m square area with BS located in center. The maximum distance between each D2D transmitter and receiver is 30 m. The rate requirements for CUs are C D the same and denoted by γth . We set N = 30, Pmax = 35 dBm, Pmax = 25 dBm, and σ 2 = −114 dBm. The Okumura-Hata loss model is adopted and the standard deviation of log-normal shadow fading is 4 dB. All results are averaged over 1000 random realizations. For comparison, we adopt the orthogonal frequency division multiple access (OFDMA) system that have multiple CUs on each SC as the benchmark, labeled as the MCU-OFDMA scheme, where the joint power control and channel assignment algorithm in [4] is applied. In MCU-OFDMA system, each SC is also shared by M CUs, but each CU is only allowed to access 1 M fraction of SC bandwidth, so that the multiplexed D2D pair in MCU-OFDMA is also interfered by M co-channel CUs. 9 Algorithm 1 Dual Based Iterative Resource Allocation (DBIRA) Algorithm Initialize xnk (0) = 0, αkn (0) = 0, ∀k ∈ K, n ∈ N . (0) (0) Initialize λk , step size θk for all k ∈ K, and set the precision ǫ. repeat for n ∈ N ,k ∈ K do Calculate αkn (t) and xnk (t) according to (33) and (31), respectively; end for (t) Update λk according to (34) ; D Update Rmax until D (t) |Rmax qkn (t) according to (26a) ; D − Rmax (t−1) |<ǫ; Calculate and pnk according D (t) Output: qkn , pnk , αkn (t) , Rmax . to (19) for all k ∈ K, n ∈ N ; Fig. 1 illustrates the convergence behavior of the proposed DBIRA algorithm versus the number of iterations under different M. As expected, it is shown that the sum rate of D2D pairs monotonically increases during the initial iterations. Moreover, the sum rate performance converges within 20 iterations for all considered three cases, which validates the effectiveness of the proposed DBIRA algorithm. Fig. 2 shows the sum rate of D2D pairs w.r.t CUs’ minimum rate requirements γth under different M. As expected, the NOMA-based scheme outperforms MCU-OFDMA scheme, especially when the number of CU multiplexed on each SC is large. The CUs need larger transmit power in MCU-OFDMA scheme to satisfy the same rate requirement, compared with NOMA-based scheme. This leads to larger interference to the D2D pairs in MCU-OFDMA scheme than that in NOMA-based scheme, since the interferences to D2D pairs are summed from all multiplexed M CUs in both MCU-OFDMA and NOMA schemes. Moreover, the sum rate of D2D pairs decreases with the rate requirements of cellular links, which is also due to the larger transmit power for CUs required by the higher data rate requirements. V. C ONCLUSION The resource allocation problem for D2D communications underlaying a NOMA-based cellular network was investigated in this letter. Although additional power constraints are introduced to D2D pairs for the sake of the NOMA decoding order, it is shown that the D2D underlaying NOMA cellular network still outperforms the conventional scheme for the network with high data requirements and myriad users. 10 450 500 400 450 D2D rate (bps/Hz) D2D rate (bps/Hz) 350 300 250 200 NOMA,M=2 NOMA,M=3 NOMA,M=4 150 400 350 300 100 250 50 0 0 5 10 15 20 25 NOMA,M=2 NOMA,M=3 NOMA,M=4 MCU-FDMA,M=2 MCU-FDMA,M=3 MCU-FDMA,M=4 200 0.2 30 0.3 0.4 0.5 0.6 CU rate requirement Iteration number Fig. 1: Convergence performance of DBIRA algorithm. 0.7 th 0.8 0.9 1 (bps/Hz) Fig. 2: D2D sum rate w.r.t CUs’ rate requirements. R EFERENCES [1] S. Dang, J. P. Coon, and G. Chen, “Resource allocation for full-duplex relay-assisted device-to-device multicarrier systems,” IEEE Wireless Commun. Lett., vol. 6, no. 2, pp. 166–169, April 2017. [2] T. D. Hoang, L. B. Le, and T. Le-Ngoc, “Resource allocation for D2D communication underlaid cellular networks using graph-based approach,” IEEE Tans. Wireless Commun., vol. 15, no. 10, pp. 7099–7113, October 2016. [3] S. Luo, R. Zhang, and T. J. Lim, “Downlink and uplink energy minimization through user association and beamforming in C-RAN,” IEEE Trans. Wireless Commun., vol. 14, no. 1, pp. 494–508, Jan 2015. [4] D. Zhu, J. Wang, A. L. Swindlehurst, and C. Zhao, “Downlink resource reuse for device-to-device communications underlaying cellular networks,” IEEE Signal Process. Lett., vol. 21, no. 5, pp. 531–534, May 2014. [5] Z. Yang, N. Huang, H. Xu, Y. Pan, Y. Li, and M. Chen, “Downlink resource allocation and power control for device-todevice communication underlaying cellular networks,” IEEE Commun. Lett., vol. 20, no. 7, pp. 1449–1452, July 2016. [6] F. Malandrino, Z. Limani, C. Casetti, and C. F. Chiasserini, “Interference-aware downlink and uplink resource allocation in hetnets with D2D support,” IEEE Tans. Wireless Commun., vol. 14, no. 5, pp. 2729–2741, May 2015. [7] L. Dai, B. Wang, Y. Yuan, S. Han, C. l. I, and Z. Wang, “Non-orthogonal multiple access for 5G: solutions, challenges, opportunities, and future research trends,” IEEE Commun. Mag., vol. 53, no. 9, pp. 74–81, September 2015. [8] J. Zhao, Y. Liu, K. K. Chai, Y. Chen, M. Elkashlan, and J. Alonso-Zarate, “NOMA-based D2D communications: Towards 5G,” in Proc. of the IEEE Global Commun. Conf. (GLOBECOM), Dec 2016, pp. 1–6. [9] Z. Zhang, Z. Ma, M. Xiao, Z. Ding, and P. Fan, “Full-duplex device-to-device aided cooperative non-orthogonal multiple access,” IEEE Trans. Veh. Technol., vol. PP, no. 99, pp. 1–1, 2016. [10] Z. Yang, W. Xu, C. Pan, Y. Pan, and M. Chen, “On the optimality of power allocation for NOMA downlinks with individual QoS constraints,” IEEE Commun. Lett., vol. PP, no. 99, pp. 1–1, 2017. [11] Z. Ding, Z. Yang, P. Fan, and H. V. Poor, “On the performance of non-orthogonal multiple access in 5G systems with randomly deployed users,” IEEE Signal Process. Lett., vol. 21, no. 12, pp. 1501–1505, Dec 2014. [12] S. Boyd and L. Vandenberghe, Convex Optimization. Cambridge university press, 2004. [13] C. Y. Wong, R. S. Cheng, K. B. Lataief, and R. D. Murch, “Multiuser OFDM with adaptive subcarrier, bit, and power allocation,” IEEE J. Sel. Areas Commun., vol. 17, no. 10, pp. 1747–1758, Oct 1999. [14] D. Bertsimas and R. Weismantel, Optimization over integers. Dynamic Ideas Belmont, 2005, vol. 13.
7cs.IT
arXiv:1611.00630v2 [math.ST] 27 Jun 2017 The accumulated persistence function, a new useful functional summary statistic for topological data analysis, with a view to brain artery trees and spatial point process applications Christophe A.N. Biscio Department of Mathematical Sciences, Aalborg University, Denmark and Jesper Møller Department of Mathematical Sciences, Aalborg University, Denmark June 28, 2017 Abstract We start with a simple introduction to topological data analysis where the most popular tool is called a persistent diagram. Briefly, a persistent diagram is a multiset of points in the plane describing the persistence of topological features of a compact set when a scale parameter varies. Since statistical methods are difficult to apply directly on persistence diagrams, various alternative functional summary statistics have been suggested, but either they do not contain the full information of the persistence diagram or they are two-dimensional functions. We suggest a new functional summary statistic that is one-dimensional and hence easier to handle, and which under mild conditions contains the full information of the persistence diagram. Its usefulness is illustrated in statistical settings concerned with point clouds and brain artery trees. The appendix includes additional methods and examples, together with technical details. The R-code used for all examples is available at http://people.math.aau.dk/~christophe/Rcode.zip. Keywords: clustering, confidence region, global rank envelope, functional boxplot, persistent homology, two-sample test. 1 1 Introduction Statistical methods that make use of algebraic topological ideas to summarize and visualize complex data are called topological data analysis (TDA). In particular persistent homology and a method called the persistence diagram are used to measure the persistence of topological features. As we expect many readers may not be familiar with these concepts, Section 1.1 discusses two examples without going into technical details though a few times it is unavoidable to refer to the terminology used in persistent homology. Section 1.2 discusses the use of the persistence diagram and related summary statistics and motivates why in Section 1.3 a new functional summary statistic called the accumulative persistence function (APF) is introduced. The remainder of the paper demonstrates the use of the APF in various statistical settings concerned with point clouds and brain artery trees. 1.1 Examples of TDA The mathematics underlying TDA uses technical definitions and results from persistent homology, see Fasy et al. (2014) and the references therein. This theory will not be needed for the present paper. Instead we provide an understanding through examples of the notion of persistence of k-dimensional topological features for a sequence of compact subsets Ct of the d-dimensional Euclidean space R d , where t ≥ 0, k = 0, 1, . . . , d − 1, and either d = 2 (Section 1.1.1) or d = 3 (Section 1.1.2). Recalling that a set A ⊆ R d is path-connected if any two points in A are connected by a curve in A, a 0-dimensional topological feature of a compact set C ⊂ R d is a maximal path-connected subset of C, also called a connected component of C. The meaning of a 1-dimensional topological feature is simply understood when d = 2, and we appeal to this in a remark at the end of Section 1.1.1 when d = 3. 2 t=0 t = 0.5 t = 0.62 0.4 Birth time 0.8 1.0 0.5 APF(m) 0.0 APF0 APF1 0.0 0.4 k=0 k=1 0.0 Death time 0.8 1.5 t = 0.75 0.0 0.4 0.8 m Figure 1: The four first panels show a simple example of spherically growing circles centred at (-1,-1), (1,-1), and (0,1) and all with radii 0.5 when time is 0. The fifth panel shows the persistence diagram for the connected components (k = 0) and the loops (k = 1). The final panel shows the corresponding accumulated persistence functions. 1.1.1 A toy example Let C ⊂ R2 be the union of the three circles depicted in the top-left panel of Figure 1. The three circles are the 0-dimensional topological features (the connected components) of C, as any curve that goes from a circle to another will be outside C. The complement R2 \ S has four connected components, one of which is unbounded, whilst the three others are the 1-dimensional topological features of C, also called the loops of C (the boundary of each bounded connected component is a closed curve with no crossings; in this example the closed curve is just a circle). For t ≥ 0, let Ct be the subset of points in R2 within distance t from C. Thinking of t as time, Ct results when each point on C grows as a disc with constant speed one. The algebraic topology (technically speaking the Betti numbers) changes exactly at the times t = 0, 0.5, 0.62, 0.75, see the first four panels of Figure 1: For each topological dimension (k) k = 0, 1, let ti denote the time of the ith change. First, C0 = C has three connected (0) components and three loops as given above; we say that they are born at time t1 3 = (1) t1 = 0 (imaging there was nothing before time 0). Second, the loops disappear and two connected components merge into one connected component; we say that the loops (0) (1) and one of the connected components die at time t2 = t2 = 0.5; since the two merging connected components were born at the same time, it is decided uniformly at random which one should die respectively survive; the one which survives then represent the (0) (1) new merged connected component. Third, at time t3 = t3 = 0.62, a new loop is born and the two connected component merge into one which is represented by the oldest (first born) connected component whilst the other connected component (the one which (0) was retained when the two merged at time t2 = 0.5) dies; the remaining connected component "lives forever" after time 0.62 and it will be discarded in our analysis. Finally, (1) at time t4 = 0.75, the loop dies. Hence, for each k = 0, 1, there is a multiset of points specifying the appearance and disappearance of each k-dimensional topological feature as t grows. A scatter plot of these points is called a persistence diagram, see Figure 1 (bottom-middle panel): For k = 0 (the connected components), the points are (0, 0.5) and (0, 0.62) (as (0, ∞) is discarded from the diagram) with multiplicities 1 and 1, respectively; and for k = 1 (the loops), the points are (0, 0.5) and (0.62, 0.75) with multiplicities 3 and 1, respectively. The term "persistence" refers to that distant connected components and large loops are present for a long time; which here of course just corresponds to the three circles/connected components of C and their loops persist for long whilst the last appearing loop has a short lifetime and hence is considered as "noise". Usually in practice C is not known but a finite subset of points { x1 , . . . , x N } has been collected as a sample on C, possibly with noise. Then we redefine Ct as the union of closed discs of radius t and with centres given by the point cloud. Hence the connected components of C0 are just the points x1 , . . . , x N , and C0 has no loops. For t > 0, it is in general difficult to directly compute the connected components and loops of Ct , but a graph in R m (with m ≥ 2) can be constructed so that its connected components correspond to those of Ct and moreover the triangles of the graph may be filled or not in a way so that the loops of the obtained triangulation correspond to those of Ct . 4 Remark: Such a construction can also be created in the case where Ct is the union of d-dimensional closed balls of radius t and with centres given by a finite point pattern { x1 , . . . , x N } ⊂ R d . The construction is a so-called simplicial complex such as the Čechcomplex, where m may be much larger than d, or the Delaunay-complex (or alphacomplex), where m = d, and a technical result (the Nerve Theorem) establishes that it is possible to identify the topological features of Ct by the Čech or Delaunay-complex, see e.g. Edelsbrunner and Harer (2010). It is unnecessary for this paper to understand the precise definition of these notions, but as d = 2 or d = 3 is small in our examples, it is computationally convenient to use the Delaunay-complex. When d = 3, we may still think of a 1-dimensional topological feature as a loop, i.e. a closed curve with no crossings; again the simplicial complex is used for the "book keeping" when determining the persistence of a loop. For example, a 2-dimensional sphere has no loops, and a torus in R3 has two. Finally, when d ≥ 3, a k-dimensional topological feature is a k-dimensional manifold (a closed surface if k = 2) that cannot "be filled in", but for this paper we omit the precise definition since it is technical and not needed. 1.1.2 Persistent homology for brain artery trees The left panel of Figure 2 shows an example of one of the 98 brain artery trees analysed in Bendich et al. (2016). The data for each tree specifies a graph in R3 consisting of a dense cloud of about 105 vertices (points) together with the edges (line segments) connecting the neighbouring vertices; further details about the data are given in Section 2.2. As in Bendich et al. (2016), for each tree we only consider the k-dimensional topological features when k = 0 or k = 1, using different types of data and sets Ct as described below. Below we consider the tree in Figure 2 and let B ⊂ R3 denote the union of its edges. Following Bendich et al. (2016), if k = 0, let Ct = {( x, y, z) ∈ B : z ≤ t} be the sub-level set of the height function for the tree at level t ≥ 0 (assuming Ct is empty for t < 0). Thus the 0-dimensional topological features at "time/level" t are the connected components of 5 25 20 15 5 10 Death time 80 60 40 Death time 20 0 0 0 20 40 60 80 Birth time 0 5 10 15 20 25 Birth time Figure 2: A brain artery tree with the "water level" indicated (left panel) and the persistence diagrams of connected components (middle panel) and loops (right pane). Ct . As illustrated in the left panel of Figure 2, instead of time we may think of t as "water level": As the water level increases, connected components of the part of B surrounded by water (the part in blue) may be born or die; we refer to this as sub-level persistence. As in Section 1.1.1, we represent the births and deaths of the connected component in a persistence diagram which is shown in Figure 2 (middle panel). The persistence of the connected components for all brain artery trees will be studied in several examples later on. As in Bendich et al. (2016), if k = 1, we let B be represented by a point pattern C of 3000 points subsampled from B, and redefine Ct to be the union of balls of radii t ≥ 0 and centres given by C (as considered in the remark at the end of Section 1.1.1). The loops of Ct are then determined by the corresponding Delaunay-complex. The right panel of Figure 2 shows the corresponding persistence diagram. The persistence of the loops for all trees will be studied in the examples to follow. 1.2 Further background and objective The persistence diagram is a popular graphical representation of the persistence of the topological features of a sequence of compact sets Ct ⊂ R d , t ≥ 0. As exemplified above it consists for each topological dimension k = 0, . . . , d − 1 of a multiset PDk of points (bi , di ) with multiplicities ci , where bi and di is a pair of birth-death times for a k-dimensional topological feature obtained as time t grows. 6 In the majority of literature on TDA, including the analysis in Bendich et al. (2016) of brain artery trees, long lifetimes are of main interest whereas short lifetimes are considered as topological noise. Short lifetimes are of interest in the study of complex structures such as branch polymers and fractals, see MacPherson and Schweinhart (2012); and for brain artery trees Bendich et al. (2016) noticed in one case that "not-particularlyhigh persistence have the most distinguishing power in our specific application". In our examples we demonstrate that short lifetimes will also be of key interest in many situations, including when analysing the brain artery trees dataset from Bendich et al. (2016). Chazal et al. (2013) and Chen et al. (2015) note that it is difficult to apply statistical methodology to persistent diagrams. Alternative functional summary statistics have been suggested: Bubenik (2015) introduces a sequence of one-dimensional functions called the persistent landscape, where his first function is denoted λ1 and is considered to be of main interest, since it provides a measure of the dominant topological features, i.e. the longest lifetimes; therefore we call λ1 the dominant function. Chazal et al. (2013) introduce the silhouette which is a weighted average of the functions of the persistent landscape, where the weights control whether the focus is on topological features with long or short lifetimes. Moreover, Chen et al. (2015) consider a kernel estimate of the intensity function for the persistent diagram viewed as a point pattern. The dominant function, the silhouette, and the intensity estimate are one-dimensional functions and hence easier to handle than the persistence diagram, however, they provide selected and not full information about the persistence diagram. In Section 1.3, we introduce another one-dimensional functional summary statistic called the accumulative persistence function and discuss its advantages and how it differs from the existing functional summary statistics. 7 1.3 The accumulated persistence function For simplicity and specificity, for each topological dimension k = 0, 1, . . . , d − 1, we always assume that the persistence diagram PDk = {(b1 , d1 , c1 ), . . . , (bn , dn , cn )} is such that n < ∞ and 0 ≤ bi < di < ∞ for i = 1, . . . , n. This assumption will be satisfied in our examples (at least with probability one). Often in the TDA literature, PDk is transformed to the rotated and rescaled persistence diagram (RRPD) given by RRPDk = {(m1 , l1 , c1 ), . . . , (mn , ln , cn )}, where mi = (bi + di )/2 is the meanage and li = di − bi is the lifetime. This transformation is useful when defining our accumulative persistence function (APF) by n APFk (m) = ∑ c i l i 1 ( m i ≤ m ), i =1 m ≥ 0, (1) where 1(·) is the indicator function and we suppress in the notation that APFk is a function of RRPDk . The remainder of this section comments on this definition. Formally speaking, when RRPDk is considered to be random, it is viewed as a finite point process with multiplicities, see e.g. Daley and Vere-Jones (2003). It what follows it will always be clear from the context whether PDk and RRPDk are considered as being random or observed, and hence whether APFk is a deterministic or random function. In the latter case, because APFk (m) is an accumulative function, its random fluctuations typically increase as m increases. Depending on the application, the jumps and/or the shape of APFk may be of interest as demonstrated later in our examples. A large jump of APFk corresponds to a large lifetime (long persistence). In the simple example shown in Figure 1, both jumps of APF0 are large and indicate the three connected components (circles), whilst only the first jump of APF1 is large and indicates the three original loops. For the more complicated examples considered in the following it may be hard to recognize the individual jumps. In particular, as in the remark at the end of Section 1.1.1, suppose Ct is the union of d-dimensional balls of radius t and with centres given by a finite point pattern { x1 , . . . , x N } ⊂ R d . Roughly speaking we may then have the following features as il- lustrated later in Example 1. For small meanages m, jumps of APF0 (m) correspond to 8 balls that merge together for small values of t. Thus, if the point pattern is aggregated (e.g. because of clustering), we expect that APF0 (m) has jumps and is hence large for small meanages m, whilst if the point pattern is regular (typically because of inhibition between the points), we expect the jumps of APF0 (m) to happen and to be large for modest values of m (as illustrated later in the middle panel of Figure 3 considering curves for the Matérn cluster process and the determinantal point process). For large meanages, jumps of APF0 (m) are most likely to happen in the case of aggregation. Accordingly, the shape of APF0 can be very different for these two cases (as illustrated in the first panel of Figure 3). Similar considerations lead us to expect different shapes of APF1 for different types of point patterns; we expect that APF1 (m) is large respective small for the case of aggregation respective regularity when m is small, and the opposite happens when m is large (as illustrated in the last panel of Figure 3). Clearly, RRPDk is in one-to-one correspondence to PDk . In turn, if all ci = 1 and the mi are pairwise distinct, then there is a one-to-one correspondence between RRPDk and its corresponding APFk . For k = 0, this one-to-one correspondence would easily be lost if we had used bi in place of mi in (1). We need to be careful with not over-stating this possible one-to-one correspondence. For example, imagine we want (1) to compare two APFs with respect to Lq -norm (1 ≤ q ≤ ∞) and let PDk (2) and PDk be the underlying persistence diagrams. However, when points (b, d) close to the diagonal are considered as topological noise (see Section 1.1.1), usually the so-called bot(1) (2) tleneck distance W∞ (PDk , PDk ) is used, see e.g. Fasy et al. (2014). Briefly, for ǫ > 0, √ let N = {(b, d) : b ≤ d, l ≤ 2ǫ} be the set of points at distance 2ǫ of the diagonal in the persistence diagram, and let S(b, d) = {( x, y) : | x − b| ≤ ǫ, |y − d| ≤ ǫ} be the square with center (b, d), sides parallel to the b- and d-axes, and of side length 2ǫ. (1) (2) (2) Then W∞ (PDk , PDk ) ≤ ǫ if PDk (bi , di ) a point of (1) (1) PDk has exactly one point in each square S(bi , di ), with (repeating this condition ci times). However, small values of (2) W∞ (PDk , PDk ) does not correspond to closeness of the two corresponding APFs with respect to Lq -norm. Note that the dominant function, the silhouette, and the intensity estimate (see Sec- 9 tion 1.2) are in general not in a one-to-one correspondence with RRPDk . Like these functions, APFk is a one-dimensional function, and so it is easier to handle than the sequence of functions for the persistent landscape in Bubenik (2015) and the intensity estimate in Chen et al. (2015) — e.g. confidence regions become easier to plot. Contrary to the dominant function and the silhouette, the APF provides information about topological features without distinguishing between long and short lifetimes. 1.4 Outline Our paper discusses various methods based on APFs in different contexts and illustrated by simulation studies related to spatial point process applications and by reanalysing the brain artery trees dataset previously analysed in Bendich et al. (2016). Section 2 specifies the setting for these examples. Sections 3, 4, and 5 consider the case of a single APF, a sample of APFs, and two samples of APFs, respectively. Further examples and details appear in Appendix A-F. 2 Datasets 2.1 Simulated data In our simulation studies we consider a planar point cloud, i.e. a finite point pattern { x1 , . . . , x N } ⊂ R2 , and study as at the end of Section 1.1.1 how the topological features of Ct , the union of closed discs of radii t and centred at x1 , . . . , x N , change as t grows. Here { x1 , . . . , x N } will be a realisation of a point process X ⊂ R2 , where the count N is finite. Thus PDk and RRPDk can be viewed as finite planar point processes (with multiplicities) and APFk as a random function. Note that N may be random, and conditional on N, the points in X are not necessarily independent and identically distributed (IID). This is a common situation in spatial statistics, e.g. if the focus is on the point process X 10 and the purpose is to assess the goodness of fit for a specified point process model of X when { x1 , . . . , x N } is observed. 2.2 Brain artery trees dataset The dataset in Bendich et al. (2016) comes from 98 brain artery trees which can be included within a cube of side length at most 206 mm; one tree is excluded "as the java/matlab function crashed" (e-mail correspondence with Sean Skwerer). They want to capture how the arteries bend through space and to detect age and gender effects. For k = 0, sub-level persistence of the connected components of each tree represented by a union of line segments is considered, cf. Section 1.1.2; then for all meanages, mi ≤ 137; and the number of connected components is always below 3200. For k = 1, persistence of the loops for the union of growing balls with centres at a point cloud representing the tree is considered, cf. Section 1.1.2; the loops have a finite death time but some of them do not die during the allocated time T = 25 (that is, Bendich et al. (2016) stop the growth of balls when t > 25). Thus we shall only consider meanages mi ≤ 25; then the number of loops is always below 2700. For each tree and k = 0, 1, most ci = 1 and sometimes ci > 1. For each tree and k = 0, 1, Bendich et al. (2016) use only the 100 largest lifetimes in their analysis. Whereas their principal component analysis clearly reveal age effects, their permutation test based on the mean lifetimes for the male and females subjects only shows a clear difference when considering PD1 . Accordingly, when demonstrating the usefulness of APF0 and APF1 , we will focus on the gender effect and consider the same 95 trees as in Bendich et al. (2016) (two transsexual subjects are excluded) obtained from 46 female subjects and 49 male subjects; in contrast to Bendich et al. (2016), we consider all observed meanages and lifetimes. In accordance to the allocated time T = 25, we need to redefine APF1 by n APF1 (m) = ∑ ci li 1(mi ≤ m, mi + li /2 ≤ T ), i =1 11 m ≥ 0. (2) For simplicity we use the same notation APF1 in (1) and (2); although all methods and results in this paper will be presented with the definition (1) in mind, they apply as well when considering (2). Finally, we write APFkF and APFkM to distinguish between APF’s for females and males, respectively. 3 A single accumulated persistence function There exists several constructions and results on confidence sets for persistence diagrams when the aim is to separate topological signal from noise, see Fasy et al. (2014), Chazal et al. (2014), and the references therein. Appendix A and its accompanying Example 5 discuss the obvious idea of transforming such a confidence region into one for an accumulate persistence function, where the potential problem is that the bottleneck metric is used for persistence diagrams and this is not corresponding to closeness of APFs, cf. Section 1.3. In this section we focus instead on spatial point process model assessment using APFs or more traditional tools. Suppose a realization of a finite spatial point process X0 has been observed and copies X1 , . . . , Xr have been simulated under a claimed model for X0 so that the joint distribution of X0 , X1 , . . . , Xr should be exchangeable. That is, for any permutation (σ0 , . . . , σr ) of (0, . . . , r ), (Xσ0 , . . . , Xσr ) is claimed to be distributed as (X0 , . . . , Xr ); e.g. this is the case if X0 , X1 , . . . , Xr are IID. This is a common situation for model assessment in spatial point process analysis when a distribution for X0 has been specified (or estimated), see e.g. Baddeley et al. (2015) and Møller and Waagepetersen (2016). Denote the APFk s for X0 , . . . , Xr by A0 , . . . , Ar , respectively, and the null hypothesis that the joint distribution of A0 , . . . , Ar is exchangeable by H0 . Adapting ideas from Myllymäki et al. (2016), we will discuss how to construct a goodness-of-fit test for H0 based on a so-called global rank envelope for A0 ; their usefulness will be demonstrated in Example 1. 12 In functional data analysis, to measure how extreme A0 is in comparison to A1 , . . . , Ar , a so-called depth function is used for ranking A0 , . . . , Ar , see e.g. López-Pintado and Romo (2009). We suggest using a depth ordering called extreme rank in Myllymäki et al. (2016): Let T > 0 be a user-specified parameter chosen such that it is the behaviour of A0 (m) for 0 ≤ m ≤ T which is of interest. For l = 1, 2, . . ., define the l-th bounding curves of A0 , . . . , Ar by l Alow (m) = min l Ai (m) i =0,...,r and l Aupp (m) = max l Ai (m), i =0,...,r 0 ≤ m ≤ T, where min l and max l denote the l-th smallest and largest values, respectively, and where l ≤ r/2. Then, for i = 0, . . . , r, the extreme rank of Ai with respect to A0 , . . . , Ar is n l l Ri = max l : Alow (m) ≤ Ai (m) ≤ Aupp (m ) o for all m ∈ [0, T ] . The larger Ri is, the deeper or more central Ai is among A0 , . . . , Ar . Now, for a given α ∈ (0, 1), the extreme rank ordering is used to define the 100(1 − α)%- lα lα global rank envelope as the band delimited by the curves Alow and Aupp where ) ( r 1 1 ( Ri < l ) ≤ α . lα = max l : r + 1 i∑ =0 Under H0 , with probability at least 1 − α, lα lα Alow (m) ≤ A0 (m) ≤ Aupp (m ) for all m ∈ [0, T ], (3) see Myllymäki et al. (2016). Therefore, the 100(1 − α)%-global rank envelope is specifying a conservative statistical test called the extreme rank envelope test and which accepts H0 at level 100α% if (3) is satisfied or equivalently if r 1 1( Ri < R0 ) > α, r + 1 i∑ =0 (4) cf. Myllymäki et al. (2016). A plot of the extreme rank envelope allows a graphical interpretation of the extreme rank envelope test and may in case of rejection suggest an alternative model for X0 . 13 There exist alternatives to the extreme rank envelope test, in particular a liberal extreme rank envelope test and a so-called global scaled maximum absolute difference envelope, see Myllymäki et al. (2016). It is also possible to combine several extreme rank envelopes, for instance by combining APF0 and APF1 , see Mrkvička et al. (2016). In the following example we focus on (3)-(4) and briefly remark on results obtained by combining APF0 and APF1 . Example 1 (simulation study). Recall that a homogeneous Poisson process is a model for complete spatial randomness (CSR), see e.g. Møller and Waagepetersen (2004) and the simulation in the first panel of Figure 3. Consider APFs A0 , A1 , . . . , Ar corresponding to independent point processes X0 , X1 , . . . , Xr defined on a unit square and where Xi for i > 0 is CSR with a given intensity ρ (the mean number of points). Suppose X0 is claimed to be CSR with intensity ρ, however, the model for X0 is given by one of the following four point process models, which we refer to as the true model: (a) CSR; hence the true model agrees with the claimed model. (b) A Baddeley-Silverman cell process; this has the same second-order moment properties as under CSR, see Baddeley and Silverman (1984). Though from a mathematical point of view, it is a cluster process, simulated realisations will exhibit both aggregation and regularity at different scales, see the second panel of Figure 3. (c) A Matérn cluster process; this is a model for clustering where each cluster is a homogenous Poisson process within a disc and the centers of the discs are not observed and constitute a stationary Poisson process, see Matérn (1986), Møller and Waagepetersen (2004), and the third panel of Figure 3. (d) A most repulsive Bessel-type determinantal point process (DPP); this is a model for regularity, see Lavancier et al. (2015), Biscio and Lavancier (2016), and the fourth panel of Figure 3. We let ρ = 100 or 400. This specifies completely the models in (a) and (d), whereas 14 Figure 3: Simulated point patterns for a homogeneous Poisson process (first panel), a Baddeley-Silverman cell process (second panel), a Matérn cluster process (third panel), and a most repulsive Bessel-type DPP (fourth panel). the remaining parameters in the cases (b)-(c) are defined to be the same as those used in Robins and Turner (2016). In all cases of Figure 3, ρ = 400. Finally, following the recommendation in Myllymäki et al. (2016), we let r = 2499. For each value of ρ = 100 or 400, we simulate each point process in (a)-(d) with the Rpackage spatstat. Then, for each dimension k = 0 or 1, we compute the extreme rank envelopes and extreme rank envelope tests with the R-package spptest. We repeat all this 500 times. Table 1 shows for each case (a)-(d) the percentage of rejection of the hypothesis that X0 is a homogeneous Poisson process with known intensity ρ. In case of CSR, the type one error of the test is small except when k = 0 and ρ = 100. As expected in case of (b)-(d), the power of the test is increased when ρ is increased. For both the Baddeley-Silverman process and the DPP, when k = 0 and/or ρ = 400, the power is high and even 100% in two cases. For the Matérn cluster process, the power is 100% when both ρ = 100 and 400; this is also the case when instead the radius of a cluster becomes 10 times larger and hence it is not so easy to distinguish the clusters as in the third panel of Figure 3. When we combine the extreme rank envelopes for APF0 and APF1 , the results are better or close to the best results obtained when considering only one extreme rank envelope. Figure 4 illustrates for one of the 500 repetitions and for each dimension k = 0 and k = 1 the deviation of APFk from the extreme rank envelope obtained when the true model is not CSR. For each of the three non-CSR models, APFk is outside the extreme 15 CSR DPP Matérn cluster Baddeley-Silverman ρ = 100 ρ = 400 ρ = 100 ρ = 400 ρ = 100 ρ = 400 ρ = 100 ρ = 400 APF0 3.6 4 77.4 100 100 100 45.6 99.6 APF1 3.8 4.6 28.2 57.8 100 100 65.8 100 APF0 , APF1 4.8 3.6 82.4 100 100 100 60.8 100 Table 1: Percentage of point patterns for which the 95%-extreme rank envelope test rejects the hypothesis of CSR (a homogeneous Poisson process on the unit square with intensity ρ = 100 or ρ = 400) when the true model is either CSR or one of three alternative point process models. rank envelope, in particular when k = 0 and both the meanage and lifetime are small, cf. the middle panel. This means that small lifetimes are not noise but of particular importance, cf. the discussion in Section 1.2. Using an obvious notation, for small m, MC we may expect that APFDPP (m) < APFCSR 0 0 (m ) < APF0 (m ) which is in agreement with the middle panel. For large m, we may expect that APFDPP (m) > APFCSR 0 0 (m ) and MC APFCSR 0 (m ) > APF0 (m ), but only the last relation is detected by the extreme rank CSR envelope in the left panel. Similarly, we may expect APFMC 1 (m ) > APF1 (m ) for small CSR m, whereas APFMC 1 (m ) < APF1 (m ) for large m, and both cases are detected in the right panel. Note that for the Baddeley-Silverman cell process and k = 0, 1, APFBS k has a rather similar behaviour as APFDPP , i.e. like a regular point process and probably k because clustering is a rare phenomena. A similar simulation study is discussed in Robins and Turner (2016) for the models in (a)-(c), but notice that they fix the number of points to be 100 and they use a testing procedure based on the persistent homology rank function, which in contrast to our onedimensional APF is a two-dimensional function and is not summarizing all the topological features represented in a persistent diagram. Robins and Turner (2016) show that a test for CSR based on the persistent homology rank function is useful as compared to various tests implemented in spatstat and which only concern first and secondorder moment properties. Their method is in particular useful, when the true model is a Baddeley-Silverman cell process with the same first and second-order moment properties as under CSR. Comparing Figure 4 in Robins and Turner (2016) with the results 16 1.5 Determinantal 0.5 1.0 2.5 1.5 APF1(m) Baddeley−Silverman 1.0 APF0(m) Matern cluster Baddeley−Silverman 0.5 Matern cluster Extreme rank envelope bounds Matern cluster Determinantal 2.0 8 6 4 APF0(m) 2 Extreme rank envelope bounds Extreme rank envelope bounds 0.1 0.2 0.3 0.4 0.0 0 Baddeley−Silverman 0.0 0.0 Determinantal 0.000 0.010 m 0.020 m 0.030 0.0 0.1 0.2 0.3 0.4 0.5 0.6 m Figure 4: 95%-extreme rank envelope for APFi when i = 0 (left panel and the enlargement shown in the middle panel) or i = 1 (right panel) together with the curves for the three non-CSR models (Baddeley-Silverman cell process, Matérn cluster process, and Bessel-type DPP). The envelope is obtained from 2499 realisations of a CSR model on the unit square and with intensity 100. in Table 1 when the true model is a Baddeley-Silverman cell process and ρ = 100, the extreme rank envelope test seems less powerful than the test they suggest. On the other hand, Robins and Turner (2016) observe that the latter test performs poorly when the true model is a Strauss process (a model for inhibition) or a Matérn cluster process; as noticed for the Matérn cluster process, we obtain a perfect power when using the extreme rang envelope test. 4 A single sample of accumulated persistence functions 4.1 Functional boxplot This section discusses the use of a functional boxplot (Sun and Genton, 2011) for a sample A1 , . . . , Ar of APFk s those joint distribution is exchangeable. The plot provides a representation of the variation of the curves given by A1 , . . . , Ar around the most central curve, and it can be used for outlier detection, i.e. detection of curves that are too extreme with respect to the others in the sample. This is illustrated in Example 2 for the 17 brain artery trees dataset and in Appendix B and its accompanying Example 6 concerning a simulation study. The functional boxplot is based on an ordering of the APFk s obtained using a so-called depth function. For specificity we make the standard choice called the modified band depth function (MBD), cf. López-Pintado and Romo (2009) and Sun and Genton (2011): For a user-specified parameter T > 0 and h, i, j = 1, . . . , r with i < j, define    Bh,i,j = m ∈ [0, T ] : min Ai (m) , A j (m) ≤ Ah (m) ≤ max Ai (m) , A j (m) , and denote the Lebesgue measure on [0, T ] by |·|. Then the MBD of Ah with respect to A1 , . . . , Ar is MBDr ( Ah ) = 2 Bh,i,j . r (r − 1) 1≤∑ i < j ≤r (5) This is the average proportion of Ah on [0, T ] between all possible pairs of A1 , . . . , Ar . Thus, the larger the value of the MBD of a curve is, the more central or deeper it is in the sample. We call the region delimited by the 50% most central curves the central envelope. It is often assumed that a curve outside the central envelope inflated by 1.5 times the range of the central envelope is an outlier or abnormal curve — this is just a generalisation of a similar criterion for the boxplot of a sample of real numbers — and the range may be changed if it is more suitable for the application at hand, see the discussion in Sun and Genton (2011) and Example 2 below. Example 2 (brain artery trees). For the brain artery trees dataset (Section 2.2), Figure 5 shows the functional boxplots of APFk s for females (first and third panels) respective males (second and fourth panels) when k = 0 (first and second panels) and k = 1 (third and fourth panels): The most central curve is plotted in black, the central envelope in purple, and the upper and lower bounds obtained from all the curves except the outliers in dark blue. Comparing the two left panels (concerned with connected components), the shape of the central envelope is clearly different for females and males, in particular on the interval [40, 60], and the upper and lower bounds of the non-outlier are closer 18 20 40 60 80 100 m 0 20 40 60 80 100 1000 200 0 0 m 600 APF1(m) − Male 1000 600 APF1(m) − Female 0 200 1500 1000 0 500 APF0(m) − Male 1500 1000 500 APF0(m) − Female 0 0 5 10 15 20 25 0 5 10 m 15 20 25 m Figure 5: Functional boxplots of APFs for females and males obtained from the brain artery trees dataset: APF0F (first panel), APF0M (second panel), APF1F (third panel), APF1M (fourth panel). The dashed lines show the outliers detected by the 1.5 criterion. Figure 6: Brain artery tree of a male subject with APF0M and APF1M detected as outliers by the 1.5 criterion. to the central region for females, in particular on the interval [0, 50]. For the two right panels (concerned with loops), the main difference is observed on the interval [15, 25] where the central envelope is larger for females than for males. The dashed lines in Figure 5 show the APFs detected as outliers by the 1.5 criterion, that is 6 APF0F s (first panel), 3 APF1F s (third panel), 6 APF0M s (second panel), and 4 APF1M s (fourth panel). For the females, only for one point pattern both APF0F and APF1F are outliers, where APF1F is the steep dashed line in the bottom-left panel; and for the males, only for two point patterns both APF0M and APF1M are outliers, where in one case APF1M is the steep dashed line in the bottom-right panel. For this case, Figure 6 reveals an obvious issue: A large part on the right of the corresponding tree is missing! Examples 3 and 4 discuss to what extent our analysis of the brain artery trees will be sensitive to whether we include or exclude the detected outliers. 19 4.2 Confidence region for the mean function This section considers an asymptotic confidence region for the mean function of a sample A1 , . . . , Ar of IID APFk s. We assume that D1 , . . . , Dr are the underlying IID RRPDk s for the sample so that with probability one, there exists an upper bound T < ∞ on the death times and there exists an upper bound nmax < ∞ on the number of k-dimensional topological features. Note that the state space for such RRPDk s is n Dk,T,nmax = {{(m1 , l1 , c1 ), . . . , (mn , ln , cn )} : ∑ ci ≤ nmax , mi + li /2 ≤ T, i = 1, . . . , n} i =1 and only the existence and not the actual values of nmax and T play a role when applying our method below. For example, in the settings (i)-(ii) of Section 2.1 it suffices to assume that X is included in a bounded region of R2 and that the number of points N is bounded by a constant; this follows from the two versions of the Nerve Theorem presented in Fasy et al. (2014) and Edelsbrunner and Harer (2010), respectively. We adapt an empirical bootstrap procedure (see e.g. van der Vaart and Wellner (1996)) which in Chazal et al. (2013) is used for a confidence region for the mean of the dominant function of the persistent landscape and which in our case works as follows. For 0 ≤ m ≤ T, the mean function is given by µ(m) = E { A1 (m)} and estimated by the empirical mean function Ar (m) = 1 r ∑ri=1 Ai (m). Let A1∗ , . . . , Ar∗ be independent uni- form draws with replacement from the set { A1 , . . . , Ar } and set Ar∗ = 1r ∑ri=1 Ai∗ and √ θ ∗ = supm∈[0,T ] r Ar (m) − Ar∗ (m) . For a given integer B > 0, independently repeat this procedure B times to obtain θ1∗ , . . . , θB∗ . Then, for 0 < α < 1, the 100(1 − α)%quantile in the distribution of θ ∗ is estimated by q̂αB = inf{q ≥ 0 : 1 B 1(θi∗ > q) ≤ α}. B i∑ =1 The following theorem is verified in Appendix F. Theorem 4.1. Let the situation be as described above. For large values of r and B, the functions √ Ar ± q̂αB / r provide the bounds for an asymptotic conservative 100(1 − α)%-confidence region 20 20 40 60 80 100 400 200 APF1(m) 0 Confidence region bounds − Female 0 0 Confidence region bounds − Male 600 800 1000 1400 1000 600 APF0(m) 200 Confidence region bounds − Female Confidence region bounds − Male 0 m 5 10 15 20 25 m Figure 7: Bootstrap confidence regions for the mean APFkM and the mean APFkF when k = 0 (left panel) and k = 1 (right panel). for the mean APF, that is   √ √ lim lim P µ(m) ∈ [ Ar (m) − q̂αB / r, Ar (m) + q̂αB / r ] for all m ∈ [0, T ] ≥ 1 − α. r →∞ B→∞ Example 3 (brain artery trees). The brain artery trees are all contained in a bounded region and presented by a bounded number of points, so it is obvious that T and nmax exist for k = 0, 1. To establish confidence regions for the mean of the APFkM s respective APFkF s, we apply the bootstrap procedure with B = 1000. The result is shown in Figure 7 when all 95 trees are considered: In the left panel, k = 0 and approximatively half of each confidence region overlap with the other confidence region; it is not clear if there is a difference between genders. In the right panel, k = 1 and the difference is more pronounced, in particular on the interval [15, 25]. Similar results and conclusions are obtained if we exclude the APFs detected as outliers in Example 2. Of course we should supply with a statistical test to assess the gender effect and such a test is established in Section 5 and applied in Example 4. Appendix C provides the additional Example 7 for a simulated dataset along with a discussion on the geometrical interpretation of the confidence region obtained. 21 5 Two samples of accumulated persistence functions This section concerns a two-sample test for comparison of two samples of APFs. Appendix E presents both a clustering method (Appendix E.1, including Example 9) and a unsupervised classification method (Appendix E.2, including Example 10) for two or more samples. Consider two samples of independent RRPDk s D1 , . . . , Dr1 and E1 , . . . , Er2 , where each Di (i = 1, . . . , r1 ) has distribution PD and each E j has distribution PE (j = 1, . . . , r2 ), and suppose we want to test the null hypothesis H0 : PD = PE = P. Here, the common distribution P is unknown and as in Section 4.2 we assume it is concentrated on Dk,T,nmax for some integer nmax > 0 and number T > 0. Below, we adapt a two-sample test statistic studied in Præstgaard (1995) and van der Vaart and Wellner (1996). Let r = r1 + r2 . Let A1 , . . . , Ar be the APFk corresponding to ( D1 , . . . , Dr1 , E1 , . . . , Er2 ), and denote by Ar1 and Ar2 the empirical means of A1 , . . . , Ar1 and Ar1 +1 , . . . , Ar1 +r2 , respectively. Let I = [ T1 , T2 ] be a user-specified interval with 0 ≤ T1 < T2 ≤ T and used for defining a two-sample test statistic by r r1 r2 KSr1 ,r2 = sup Ar1 (m) − Ar2 (m) , r m∈ I where large values are critical for H0 . This may be rewritten as r r r r 2 r1 r 1 r2 r1 r2 KSr1 ,r2 = sup GD ( m ) − GE ( m ) + E { A D − A E } (m ) , r r r m∈ I r1 = where GD √ (6) (7)   √ r1 Ar1 − E { A D } and GEr2 = r2 Ar2 − E { A E } . By Lemma F.2 in Apr pendix F and by the independence of the samples, GD1 and GEr2 converge in distribution to two independent zero-mean Gaussian processes on I, denoted GD and GE , respectively. Assume that r1 /r → λ ∈ (0, 1) as r → ∞. Under H0 , in the sense of convergence in distribution, lim KSr1 ,r2 = sup r →∞ m∈ I √ 1 − λGD (m) − 22 √ λGE (m) , (8) where √ 1 − λGD − λGE follows the same distribution as GD . If H0 is not true and  E A1 − Ar1 +1 (m) > 0, then KSr1 ,r2 → ∞ as r → ∞, see van der Vaart and Wellner √ supm∈ I (1996). Therefore, for 0 < α < 1 and letting qα = inf{q : P(supm∈ I | GD (m)| > q) ≤ α}, the asymptotic test that rejects H0 if KSr1 ,r2 ≤ qα is of level 100α% and of power 100%. As qα depends on the unknown distribution P, we estimate qα by a bootstrap method: Let A1∗ , . . . , Ar∗ be independent uniform draws with replacement from { A1 , . . . , Ar }. For 0 ≤ m ≤ T, define the empirical mean functions Ar∗1 (m) = 1 r2 1 r1 r1 ∗ ∗ ∑i = 1 Ai (m ) and Ar2 (m ) = r +r 2 ∗ 1 ∑i = r1 +1 Ai (m ), and compute ∗ θ = r r1 r2 sup A∗ (m) − Ar∗2 (m) . r m ∈ I r1 (9) For a given integer B > 0, independently repeat this procedure B times to obtain θ1∗ , . . . , θB∗ . Then we estimate qα by the 100(1 − α)%-quantile of the empirical distribution of θ1∗ , . . . , θB∗ , that is q̂αB 1 B = inf{q ≥ 0 : ∑ 1(θi∗ > q) ≤ α}. B i =1 The next theorem is a direct application of Theorem 3.7.7 in van der Vaart and Wellner (1996) noticing that the APFk s are uniformly bounded by Tnmax and they form a socalled Donsker class, see Lemma F.2 and its proof in Appendix F. Theorem 5.1. Let the situation be as described above. If r → ∞ such that r1 /r → λ with λ ∈ (0, 1), then under H0  lim lim P KSr1 ,r2 > r →∞ B→∞ q̂αB  = α,  whilst if H0 is not true and supm∈ I E A1 − Ar1 +1 (m) > 0, then   lim lim P KSr1 ,r2 > q̂αB = 1. r →∞ B→∞ Therefore, the test that rejects H0 if KSr1 ,r2 > q̂αB is of asymptotic level 100α% and power 100%. As remarked in van der Vaart and Wellner (1996), by their Theorem 3.7.2 it is 23 possible to present a permutation two-sample test so that the critical value q̂αB for the bootstrap two-sample test has the same asymptotic properties as the critical value for the permutation test. Other two-sample test statistics than (6) can be constructed by considering other measurable functions of Ar1 − Ar2 , e.g. we may consider the two-sample test statistic Mr1 ,r2 = Z I Ar1 (m) − Ar2 (m) dm. (10) Then by similar arguments as above but redefining θ ∗ in (9) by r Z r1 r2 ∗ A∗ (m) − Ar∗2 (m) dm, θ = r m ∈ I r1 the test that rejects H0 if Mr1 ,r2 > q̂αB is of asymptotic level 100α% and power 100%. Example 4 (brain artery trees). To distinguish between male and female subjects of the brain artery trees dataset, we use the two-sample test statistic KSr1 ,r2 under three different settings: (A) For k = 0, 1, we let PD′k be the subset of PDk corresponding to the 100 largest lifetimes. Then D1 , . . . , D46 and E1 , . . . , E49 are the RRPDk s obtained from the PD′k s associated to female and male subjects, respectively. This is the setting used in Bendich et al. (2016). (B) For k = 0, 1, we consider all lifetimes and let D1 , . . . , D46 and E1 , . . . , E49 be the RRPDk s associated to female and male subjects, respectively. (C) The samples are as in setting (B) except that we exclude the RRPDk s where the corresponding APFk was detected as an outlier in Example 2. Hence, r1 = 40 and r2 = 43 if k = 0, and r1 = 43 and r2 = 45 if k = 1. Bendich et al. (2016) perform a permutation test based on the mean lifetimes for the male and female subjects and conclude that gender effect is recognized when considering PD1 24 APF0 APF1 I = [0, 137] I = [0, 60] I = [0, 25] I = [15, 25] Setting (A) 5.26 3.26 3.18 2.72 Setting (B) 7.67 3.64 20.06 1.83 Setting (C) 4.55 2.61 0.92 0.85 Table 2: Estimated p-values given in percentage of the two-sample test based on KSr1 ,r2 used with APF0 and APF1 on different intervals I to distinguish between male and female subjects under settings (A), (B), and (C) described in Example 4. (p-value = 3%) but not PD0 (p-value = 10%). For comparison, under each setting (A)(C), we perform the two-sample test for k = 0, 1, different intervals I, and B = 10000. In each case, we estimate the p-value, i.e. the smallest α such that the two-sample test with significance level 100α% does not reject H0 , by p̂ = 1 B ∑iB=1 1(θi∗ > KSr1 ,r2 ). Table 2 shows the results. Under each setting (A)-(C), using APF0 we have a smaller p-value than in Bendich et al. (2016) if I = [0, 137] and an even larger p-value if I = [0, 60]; and for k = 1 under setting (B), our p-value is about seven times larger than the pvalue in Bendich et al. (2016) if I = [0, 25], and else it is similar or smaller. For k = 1 and I = [0, 25], the large difference between our p-values under settings (B) and (C) indicates that the presence of outliers violates the result of Theorem 5.1 and care should hence be taken. In our opinion we can better trust the results without outliers, where in contrast to Bendich et al. (2016) we see a clear gender effect when considering the connected components. Notice also that in agreement with the discussion of Figure 5 in Example 2, for each setting A, B, and C and each dimension k = 0, 1, the p-values in Table 2 are smallest when considering the smaller interval I = [0, 60] or I = [15, 25]. Appendix D provides an additional Example 8 illustrating the use of two-sample test in a simulation study. 25 Acknowledgements Supported by The Danish Council for Independent Research | Natural Sciences, grant 7014-00074B, "Statistics for point processes in space and beyond", and by the "Centre for Stochastic Geometry and Advanced Bioimaging", funded by grant 8721 from the Villum Foundation. Helpful discussions with Lisbeth Fajstrup on persistence homology is acknowledged. In connection to the brain artery trees dataset we thank James Stephen Marron and Sean Skwerer for helpful discussions and the CASILab at The University of North Carolina at Chapel Hill for providing the data distributed by the MIDAS Data Server at Kitware, Inc. We are grateful to the editors and the referees for useful comments. Appendix Appendix A-F contain complements and additional examples to Sections 3-5. Our setting and notation are as follows. All the examples are based on a simulated point pattern { x1 , . . . , x N } ⊂ R2 as described in Section 2.1, with x1 , . . . , x N being IID points where N is a fixed positive integer. As in Section 1.1.1, our setting corresponds to applications typically considered in TDA where the aim is to obtain topological information about a compact set C ⊂ R2 which is unobserved and where possibly noise appears: For specificity, we let xi = yi + ǫi , i = 1, . . . , N, where y1 , . . . , y N are IID points with support C, the noise ǫ1 , . . . , ǫ N are IID and independent of y1 , . . . , y N , and ǫi follows the restriction to the square [−10σ, 10σ]2 of a bivariate zero-mean normal distribution with IID coordinates and standard deviation σ ≥ 0 (if σ = 0 there is no noise). We denote this distribution for ǫi by N2 (σ) (the restriction to [−10σ, 10σ]2 is only imposed for technical reasons and is not of practical importance). We let Ct be the union of closed discs of radii t and centred at x1 , . . . , x N , and we study how the topological features of Ct changes as t ≥ 0 grows. For this we use the Delaunay-complex mentioned in Section 1.1.1. Finally, we denote by C((a, b), r ) the circle with center (a, b) and radius r. 26 A Transforming confidence regions for persistence diagrams used for separating topological signal from noise As noted in Section 3 there exists several constructions and results on confidence sets for persistence diagrams when the aim is to separate topological signal from noise, see Fasy et al. (2014), Chazal et al. (2014), and the references therein. We avoid presenting the technical description of these constructions and results, which depend on different choices of complexes (or more precisely so-called filtrations). For specificity, in this appendix we just consider the Delaunay-complex and discuss the transformation of such a confidence region into one for an accumulate persistence function. We use the following notation. As in the aforementioned references, consider the persistence diagram PDk for an unobserved compact manifold C ⊂ R2 and obtained as in Section 1.1.1 by considering the persistence as t ≥ 0 grows of k-dimensional topological features of the set consisting of all points in R2 within distance t from C. Note that PDk is considered as being non-random and unknown; of course in our simulation study c k,N be the presented in Example 5 below we only pretend that PDk is unknown. Let PD random persistence diagram obtained as in Section 1.1.1 from IID points x1 , . . . , x N with √ support C. Let N = {(b, d) : b ≤ d, l ≤ 2c N } be the set of points at distance 2c N of the diagonal in the persistence diagram. Let S(b, d) = {( x, y) : | x − b| ≤ c N , |y − d| ≤ c N } be the square with center (b, d), sides parallel to the b- and d-axes, and of side length 2c N . Finally, let α ∈ (0, 1). Fasy et al. (2014) and Chazal et al. (2014) suggest various ways of constructing a bound c N > 0 so that an asymptotic conservative 100(1 − α)%-confidence region for PDk with respect to the bottleneck distance W∞ is given by   c lim inf P W∞ (PDk , PDk,N ) ≤ c N ≥ 1 − α N →∞ (11) where W∞ is the bottleneck distance defined in Section 1.3. The confidence region given by (11) consists of those persistence diagrams PDk which have exactly one point in each c k,N , and have an arbitrary number of points in square S(bi , di ), with (bi , di ) a point of PD 27 c k,N falling in N as noise and the the set N . Fasy et al. (2014) consider the points of PD remaining points as representing a significant topological feature of C. Using (11) an asymptotic conservative 100(1 − α)%-confidence region for the APFk corresponding to PDk is immediately obtained. This region will be bounded by two funcbmin and A bmax specified by PD c k,N and c N . Due to the accumulating nature of APFk , tions A k,N k,N the span between the bounds is an increasing function of the meanage. When using the Delaunay-complex, Chazal et al. (2014) show that the span decreases as N increases; this is illustrated in Example 5 below. Example 5 (simulation study). Let C = C((−1.5, 0), 1) ∪ C((1.5, 0), 0.8) and suppose each point xi is uniformly distributed on C. Figure 8 shows C and an example of a simulated point pattern with N = 300 points. We use the bootstrap method implemented in the R-package TDA and presented in Chazal et al. (2014) to compute the 95%-confidence region for PD1 when N = 300, see the top-left panel of Figure 9, where the two squares above the diagonal correspond to the two loops in C and the other squares correspond to topological noise. Thereby 95%-confidence regions for RRPD1 (top-right panel) and APF1 (bottom-left panel) are obtained. The confidence region for APF1 decreases as N increases as demonstrated in the bottom panels where N is increased from 300 to 500. As noticed in Section 1.3, we must be careful when using results based on the bottleneck metric, because small values of the bottleneck metric does not correspond to closeness of the two corresponding APFs: Although close persistence diagram with respect to the bottleneck distance imply that the two corresponding APFs are close with respect to the Lq -norm (1 ≤ q ≤ ∞), the converse is not true. Hence, it is possible that an APF is in the confidence region plotted in Figure 9 but that the corresponding persistence diagram is very different from the truth. 28 Figure 8: The set C in Example 5 (left panel) and a simulated point pattern of N = 300 independent and uniformly distributed points on C (right panel). B Additional example related to Section 4.1 "Functional boxplot" The functional boxplot described in Section 4.1 can be used as an exploratory tool for the curves given by a sample of APFk s. It provides a representation of the most central curve and the variation around this. It can also be used for outliers detection as illustrated in the following example. Example 6 (simulation study). We consider a sample of 65 independent APFk s, where the joint distribution of the first 50 APFk s is exchangeable, whereas the last 15 play the role of outliers. We suppose each APFk corresponds to a point process of 100 IID points, where each point xi follows one of the following distributions P1 , . . . , P4 . • P1 (unit circle): xi is a uniform point on C((0, 0), 1) perturbed by N2 (0.1)-noise. • P2 (Gaussian mixture): Let yi follow N2 (0.2), then xi = yi with probability 0.5, and xi = yi + (1.5, 0.5) otherwise. • P3 (two circles): xi is a uniform point on C((−1, −1), 1) ∪ C((1, 1), 0.5) perturbed by N2 ((0, 0), 0.1)-noise. • P4 (circle of radius 0.7): xi is a uniform point on C((0, 0), 0.7) perturbed by N2 (0.1)noise. 29 1.2 0.6 0.2 0.4 Lifetime 0.8 1.0 1.0 0.8 0.6 Death time 0.4 0.0 0.2 0.0 0.0 0.2 0.4 0.6 0.8 1.0 −0.2 0.4 0.6 0.8 5 APF1 0 0 1 2 3 2 3 4 Confidence region bounds APF1 APF1(m) 4 Confidence region bounds 1 APF1(m) 0.2 Meanage 5 Birth time 0.0 0.5 1.0 1.5 0.0 0.5 m 1.0 1.5 m Figure 9: 95%-confidence regions obtained by the bootstrap method for PD1 (top-left panel) and its corresponding RRPD1 (top-right panel) when C and x1 , . . . , x300 are as in Figure 8. The bottom-left panel shows the corresponding 95%-confidence region for APF1 . The bottom-right panel shows the 95%-confidence region for APF1 when a larger point cloud with 300 points is used. We let the first 50 point processes be obtained from P1 (the distribution for non-outliers), the next 5 from P2 , the following 5 from P3 , and the final 5 from P4 . Figure 10 shows a simulated realization of each of the four types of point processes. Figure 11 shows the functional boxplots when considering APF0 (left panel) and APF1 (right panel). The curves detected as outliers and corresponding to the distributions P2 , P3 , and P4 are plotted in red, blue, and green, respectively. In both panels the outliers detected by the 1.5 criterion agree with the true outliers. In the left panel, each curve has an accumulation of small jumps between m = 0 and m ≈ 0.1, corresponding to the moments where the points associated to each circle are connected by the growing discs in the sequence {Ct }t≥0 . The curves corresponding to realisations of P3 have a jump at m ≈ 0.38 which corresponds to the moment where 30 P1 − P2 − P3 − P4 − Circle r=1 Gaussian mixture Two circles Circle r=0.7 Figure 10: Simulated realizations of the four types of point processes, each consisting of 100 IID points with distribution either P1 (black dots), P2 (blue crosses), P3 (red triangles), or P4 (rotated green crosses). the points associated to the two circles used when defining P3 are connected by the growing discs in the sequence {Ct }t≥0 . The points following the distribution P4 are generally closer to each other than the ones following the distribution P1 as the radius of the underlying circle is smaller. This corresponds to more but smaller jumps in APF0 for small meanages, and hence the curves of APF0 are lower when they correspond to realisations of P1 than to realisations of P4 ; and as expected, for large meanages, the curves of APF0 are larger when they correspond to realisations of P1 than to realisations of P4 . Note that if we redefine P4 so that the N2 (0.1)-noise is replaced by N2 (0.07)-noise, then the curves would be the same up to rescaling. In the right panel, we observe clear jumps in all APF1 s obtained from P1 , P3 , and P4 . These jumps correspond to the first time that the loops of the circles in P1 , P3 , and P4 are covered by the union of growing discs in the sequence {Ct }t≥0 . Once again, if we have used N2 (0.07)-noise in place of N2 (0.1)-noise in the definition of P4 , the curves would be the same up to rescaling. If we repeat everything but with the distribution P4 redefined so that C((0, 0), 0.7) is replaced by C((0, 0), 0.8), then the support of P4 is closer to that of P1 and it becomes harder in the case of APF0 to detect the outliers with distribution P4 (we omit the corresponding plot); thus further simulations for determining a stronger criterion would be 31 1.5 1.0 APF1(m) 0.5 6 4 Gaussian mixture Two circles Circle r=0.7 0 0.0 2 APF0(m) 8 Gaussian mixture Two circles Circle r=0.7 0.0 0.2 0.4 0.6 0.8 0.0 m 0.5 1.0 1.5 m Figure 11: Functional boxplots of 65 APFs based on the topological features of dimension 0 (left panel) and 1 (right panel). In each panel, 50, 5, 5, and 5 APFs are obtained from the Delaunay-complex of 100 IID points from the distribution P1 , P2 , P3 , and P4 , respectively. The APFs detected as outliers are plotted in red, blue, and green in the case of P2 , P3 , and P4 , respectively. needed. C Additional example related to Section 4.2 "Confidence region for the mean function" This appendix provides yet an example to illustrate the bootstrap method in Section 4.2 for obtaining a confidence region for the mean function of a sample of IID APFk s. Example 7 (simulation study). Consider 50 IID copies of a point process consisting of 100 independent and uniformly distributed points on the union of three circles with radius 0.25 and centred at (−1, −1), (0, 1), and (1, −1), respectively (these circles were also considered in the example of Section 1.1.1). A simulated realization of the point process is shown in the left panel of Figure 12, and the next two panels show simulated confidence regions for APF0 and APF1 , respectively, when the bootstrap procedure with B = 1000 is used. In the middle panel, between m = 0 and m = 0.2, there is an accu32 1.2 0.1 0.2 0.3 0.4 m 0.5 0.6 0.4 0.2 APF1(m) 0.0 Confidence region bounds 0.0 0 Empirical mean 0.8 1.0 6 5 4 3 APF0(m) 2 1 Confidence region bounds Empirical mean 0.0 0.2 0.4 0.6 0.8 1.0 m Figure 12: A simulation of 100 independent and uniformly distributed points on the union of three circles (dashed lines) with the same radius r = 0.5 and centred at (−1, −1), (0, 1), and (1, −1) (left panel). The 95%-confidence regions for the mean APF0 (middle panel) and the mean APF1 (right panel) are based on 50 IID simulations. mulation of small jumps corresponding to the moment when each circle is covered by the union of growing discs from the sequence {Ct }t≥0 ; we interpret these small jumps as topological noise. The jump at m ≈ 0.25 corresponds to the moment when the circles centred at (−1, −1) and (1, −1) are connected by the growing discs, and the jump at m ≈ 0.3 to when all three circles are connected by the growing discs. In the right panel, at m ≈ 0.3 there is an accumulation of small jumps corresponding to the moment when the three circles are connected by the growing discs and they form a loop at m = 0.25 in Figure 1. The disappearance of this loop at m = 0.69 in Figure 1 corresponds to the jump at m ≈ 0.7 in Figure 12. D Additional example to Section 5 "Two samples of accumulated persistence functions" Section 5 considered two samples of independent RRPDk s D1 , . . . , Dr1 and E1 , . . . , Er2 , where each Di (i = 1, . . . , r1 ) has distribution PD and each E j has distribution PE (j = 1, . . . , r2 ). Then we studied a bootstrap two-sample test to asses the null hypothesis H0 : PD = PE , e.g. in connection to the brain artery trees. An additional example showing 33 Circle r=1 Circle r=0.95 Figure 13: A simulation of 100 independent and uniformly distributed points on the circle centred at (0, 0) with radius 1 and perturbed by N2 ((0, 0), 0.2)-noise (red dots), together with 100 independent and uniformly distributed points on the circle centred at (0, 0) with radius 0.95 and perturbed by N2 ((0, 0), 0.2)-noise (blue crosses). the performance of the test is presented below. Example 8 (simulation study). Let PD be the distribution of a RRPDk obtained from 100 independent and uniformly distributed points on C((0, 0), 1) perturbed by N2 (0.2)noise, and define PE in a similar way but with a circle of radius 0.95. A simulated realisation of each point process is shown in Figure 13; it seems difficult to recognize that the underlying circles are different. Let us consider the two-sample test statistics (6) and (10) with I = [0, 3], r1 = r2 = 50, and α = 0.05. Over 500 simulations of the two samples of RRPDk we obtain the following percentage of rejection: For Mr1 ,r2 , 5.2% if k = 0, and 24.2% if k = 1. For KSr1 ,r2 much better results are observed, namely 73.8% if k = 0, and 93.8% if k = 1, where this high percentage is mainly caused by the largest lifetime of a loop. 34 E Further methods for two or more samples of accumulated persistence functions E.1 Clustering Suppose A1 , . . . , Ar are APFk s which we want to label into K < r groups by using a method of clustering (or unsupervised classification). Such methods are studied many places in the literature for functional data, see the survey in Jacques and Preda (2014). In particular, Chazal et al. (2009), Chen et al. (2015), and Robins and Turner (2016) consider clustering in connection to RRPDk s. Whereas the RRPDk s are two-dimensional functions, it becomes easy to use clustering for the one-dimensional APFk s as illustrated in Example 9 below. For simplicity we just consider the standard technique known as the K-means clustering algorithm (Hartigan and Wong (1979)). For more complicated applications than considered in Example 9 the EM-algorithm may be needed for the K-means clustering algorithm. As noticed by a referee, to avoid the use of the EM-algorithm we can modify (9) or (10) and thereby construct a distance/similarity matrix for different APFs which is used to perform hierarchical clustering. However, for Example 9 the results using hierarchical clustering (omitted here) were not better than with the K-means algorithm. Assume that A1 , . . . , Ar are pairwise different and square-integrable functions on [0, T ], where T is a user-specified parameter. For example, if RRPDk ∈ Dk,T,nmax (see Section 4.2), then APFk ∈ L2 ([0, T ]). The K-means clustering algorithm works as follows. • Chose uniformly at random a subset of K functions from { A1 , . . . , Ar }; call these functions centres and label them by 1, . . . , K. • Assign each non-selected APFk the label i if it is closer to the centre of label i than to any other centre with respect to the L2 -distance on L2 ([0, T ]). 35 • In each group, reassign the centre by the mean curve of the group (this may not be an APFk of the sample). • Iterate these steps until the assignment of centres does not change. The algorithm is known to be convergent, however, it may have several drawbacks as discussed in Hartigan and Wong (1979) and Bottou and Bengio (1995). Example 9 (simulation study). Consider K = 3 groups, each consisting of 50 APF0 s and associated to point processes consisting of 100 IID points, where each point xi follows one of the following distributions P1 , P2 , and P3 for groups 1, 2, and 3, respectively. • P1 (unit circle): xi is a uniform point on C((0, 0), 1) perturbed by N2 (0.1)-noise. • P2 (two circles): xi is a uniform point on C((−1, −1), 0.5) ∪ C((1, 1), 0.5) perturbed by N2 (0.1)-noise. • P3 (circle of radius 0.8): xi is a uniform point on C((0, 0), 0.8) perturbed by N2 (0.1)noise. We start by simulating a realization of each of the 3 × 50 = 150 point processes. The left panel of Figure 14 shows one realization of each type of point process; it seems difficult to distinguish the underlying circles for groups 1 and 3, but the three APF0 s associated to these three point patterns are in fact assigned to their right groups. The right panel of Figure 14 shows the result of the K-means clustering algorithm. Here we are using the R-function “kmeans” for the K-means algorithm and it takes only a few seconds when evaluating each Ai (m) at 2500 equidistant values of m between 0 and T = 0.5. As expected we see more overlap between the curves of the APF0 s assigned to groups 1 and 3. We next repeat 500 times the simulation of the 150 point processes. A clear distinction between the groups is obtained by the K-means algorithm applied for connected com- 36 ponents: The percentage of wrongly assigned APF0 s among the 500 × 3 × 50 = 75000 APF0 s has an average of 4.5% and a standard deviation of 1.6%. The assignment error is in fact mostly caused by incorrect labelling of APF0 s associated to P1 or P3 . This is expected as the underlying circles used in the definitions of P1 and P3 are rather close, whereas the underlying set in the definition of P2 is different with two connected components as represented by the jump at m ≈ 0.4 in the middle panel of Figure 14. Even better results are obtained when considering loops instead of connected components: The percentage of wrongly assigned APF1 s among the 75000 APF1 s has an average of 1.6% and a standard deviation of 1.0%. This is mainly due to the sets underlying P1 , P2 , and P3 which have distinctive loops that results in clear distinct jumps in the APF1 s as seen in the right panel of Figure 14. 0.2 0.4 m 0.8 0.4 APF1(m) 0.0 0.0 4 3 2 P1 − Circle r=1 P2 − Two circles P3 − Circle r=0.8 1 P1 − Circle r=1 P2 − Two circles P3 − Circle r=0.8 0 APF0(m) 5 6 1.2 P1 − Circle r=1 P2 − Two circles P3 − Circle r=0.8 0.0 0.2 0.4 m Figure 14: Left panel: Simulated example of the three point processes, each consisting of 100 IID points drawn from the distribution P1 (black dots), P2 (red triangles), or P3 (blue crosses). Middle panel: The 150 APF0 s obtained from the simulation of the 150 point processes associated to P1 , P2 , or P3 , where the colouring in black, red, or blue specifies whether the K-means algorithm assigns an APF0 to the group associated to P1 , P2 , or P3 . Right panel: As the middle panel but for the 150 APF1 s. E.2 Supervised classification Suppose we want to assign an APFk to a training set of K different groups G1 , . . . , GK , where Gi is a sample of ri independent APFk s Ai1 , . . . , Airi . For this purpose supervised classification methods for functional data may be adapted. 37 We just consider a particular method by López-Pintado et al. (2010): Suppose α ∈ [0, 1] and we believe that at least 100(1 − α)% of the APFk s in each group are IID, whereas the remaining APFk s in each group follow a different distribution and are considered as outliers (see Section 4.1). For a user-specified parameter T > 0 and i = 1, . . . , K, define α the 100α%-trimmed mean Ai with respect to Gi as the mean function on [0, T ] of the 100(1 − α)% APFk s in Gi with the largest MBDri , see (5). Assuming ∪iK=1 Gi ⊂ L2 ([0, T ]), an APFk A ∈ L2 ([0, T ]) is assigned to Gi if α i = argmin k A j − Ak, (12) j∈{1,...,K } where k · k denotes the L2 -distance. Here, the trimmed mean is used for robustness and allows a control over the curves we may like to omit because of outliers, but e.g. the median could have been used instead. Example 10 (simulation study). Consider the following distributions P1 , . . . , P4 for a point xi . • P1 (unit circle): xi is a uniform point on C((0, 0), 1) which is perturbed by N2 (0.1)noise. • P1′ (two circles, radii 1 and 0.5): xi is a uniform point on C((0, 0), 1) ∪ C((1.5, 1.5), 0.5) and perturbed by N2 (0.1)-noise. • P2 (circle of radius 0.8): xi is a uniform point on C((0, 0), 0.8) which is perturbed by N2 (0.1)-noise. • P2′ (two circles, radii 0.8 and 0.5): xi is a uniform point on C((0, 0), 0.8) ∪ C((1.5, 1.5), 0.5) and perturbed by N2 (0.1)-noise. For k = 0, 1 we consider the following simulation study: K = 2 and r1 = r2 = 50; G1 consists of 45 APFk s associated to simulations of point processes consisting of 100 IID points with distribution P1 (the non-outliers) and 5 APFk s obtained in the same way but from P1′ (the outliers); G2 is specified in the same way as G1 but replacing P1 and P1′ with 38 0.8 6 0.6 5 4 0.4 3 0.00 0.10 0.20 0.2 A0.2 2 A0.2 1 A0.2 2 0.0 0 2 1 A0.2 1 0.30 0.0 m 0.2 0.4 0.6 0.8 1.0 m Figure 15: Top panels: The 20%-trimmed mean functions with respect to G1 and G2 when considering APF0 s (left) and APF1 s (right) obtained from the Delaunay-complex and based on 100 IID points following the distribution P1 (solid curve) or P2 (dotted curve). Bottom panels: Examples of point patterns with associated APF0 s assigned to the wrong group, together with the circles of radius 0.8 and 1. P2 and P2′ , respectively; and we have correctly specified that α = 0.2. Then we simulate 100 APFk s associated to P1 and 100 APFk s associated to P2 , i.e. they are all non-outliers. Finally, we use (12) to assign each of these 200 APFk s to either G1 or G2 . 0.2 The top panels in Figure 15 show the 20%-trimmed means A1 0.2 and A2 when k = 0 (left) and k = 1 (right). The difference between the 20%-trimmed means is clearest when k = 1 and so we expect that the assignment error is lower in that case. In fact wrong assignments happen mainly when the support of P1 or P2 is not well covered by the point pattern as illustrated in the bottom panels. 39 Repeating this simulation study 500 times, the percentage of APF0 s wrongly assigned among the 500 repetitions has a mean of 6.7% and a standard deviation of 1.7%, whereas for the APF1 s the mean is 0.24% and the standard deviation is 0.43%. To investigate how the results depend on the radius of the smallest circle, we repeat everything but with radius 0.9 in place of 0.8 when defining the distributions P2 and P2′ . Then for the APF0 s, the proportion of wrong assignments has a mean of 23.2% and a standard deviation of 2.9%, and for the APF1 s, a mean of 5.7% and a standard deviation of 1.9%. Similar to Example 9, the error is lowest when k = 1 and this is due to the largest lifetime of a loop. F Proof of Theorem 4.1 The proof of Theorem 4.1 follows along similar lines as in Chazal et al. (2013) as soon as we have verified Lemma F.2 below. Note that the proof of Lemma F.2 is not covered by the approach in Chazal et al. (2013). We first need to recall the following definition, where BT denotes the topological space of bounded real valued Borel functions defined on [0, T ] and its topology is induced by the uniform norm. Definition F.1. A sequence { Xr }r=1,2,... of random elements in BT converges in distribution to a random element X in BT if for any bounded continuous function f : BT 7→ R, E f (Xr ) converges to E f (X ) as r → ∞. Lemma F.2. Let the situation be as in Section 4.2. As r → ∞, √  r Ar − µ converges in dis- tribution towards a zero-mean Gaussian process on [0, T ] with covariance function c(m, m′ ) = Cov ( A1 (m), A1 (m′ )), m, m′ ∈ [0, T ]. Proof. We need some notation and to recall some concepts of empirical process theory. For D ∈ DTk,nmax , denote A D the APFk of D. Let F = { f m : 0 ≤ m ≤ T } be the class of functions f m : DTk,nmax 7→ [0, ∞) given by f m ( D ) = A D (m). To see the connection with 40 empirical process theory, we consider Gr ( f m ) = √ r 1 r f m ( Di ) − µ ( m ) r i∑ =1 ! as an empirical process. Denote k · k the L2 norm on F with respect to the distribution  of D1 , i.e. k f m (·)k2 = E A D1 (m)2 . For u, v ∈ F , the bracket [u, v] is the set of all functions f ∈ F with u ≤ f ≤ v. For any ǫ > 0, N[] (ǫ, F , k · k) is the smallest integer J J ≥ 1 such that F ⊂ ∪ j=1 [u j , v j ] for some functions u1 , . . . , u J and v1 , . . . , v J in F with r   R1 kv j − u j k ≤ ǫ for j = 1, . . . , J. We show below that 0 log N[] (ǫ, F , k · k) dǫ is finite. Then, by Theorem 19.5 in van der Vaart (2000), F is a so-called Donsker class which implies the convergence in distribution of Gr ( f m ) to a Gaussian process as in the statement of Lemma F.2. For any sequence −∞ = t1 < . . . < t J = ∞ with J ≥ 2, for j = 1, . . . , J − 1, and for D = {(m1 , l1 , c1 ), . . . , (mn , ln , cn )} ∈ DTk,nmax , let u j ( D ) = ∑in=1 ci li 1(mi ≤ t j ) and v j ( D ) = ∑in=1 ci li 1(mi < t j+1 ) (if n = 0, then D is empty and we set u j ( D ) = v j ( D ) = 0). Then, for any m ∈ [0, T ], there exists a j = j(m) such that u j ( D ) ≤ f m ( D ) ≤ v j ( D ), i.e. J −1 f m ( D ) ∈ [u j , v j ]. Consequently, F ⊂ ∪ j=1 [u j , v j ]. We prove now that for any ǫ ∈ (0, 1), the sequence {t j }1≤ j≤ J can be chosen such that for j = 1, . . . , J − 1, we have kv j − u j k ≤ ǫ. Write D1 = {( M1 , L1 , C1 ), . . . , ( M N , L N , CN )}, where N is random and should not to be confused with N in Sections 2.1 and A (if N = 0, then D1 is empty). Let n ∈ {1, . . . , nmax } and conditioned on N = n, let I be uniformly selected from {1, . . . , n}. Then E n v j ( D1 ) − u j ( D1 ) 2 1 ( N = n) o ( 1 Ci Li 1 Mi ∈ t j , t j+1 n i∑ =1   2 ≤ T 2 n4max E 1 ( N = n) 1 M I ∈ t j , t j+1   ≤ T 2 n4max P M I ∈ t j , t j+1 | N = n , = n2 E 1 ( N = n ) as n ≤ nmax , Ci ≤ nmax , and Li ≤ T. Further, E n n v j ( D1 ) − u j ( D1 ) 41 2 o 1 ( N = 0) = 0.  )2 Hence  E v j ( D1 ) − u j ( D1 ) 2 nmax = ∑ E n =0 n ≤ T 2 n5max v j ( D1 ) − u j ( D1 ) max n =1,...,nmax 2 1 ( N = n) o   P M I ∈ t j , t j +1 | N = n . (13) Moreover, by Lemma F.3 below, there exists a finite sequence {tn,j }1≤ j≤ Jn such that  P( M I ∈ (tn,j , tn,j+1)| N = n) ≤ ǫ2 / T 2 n5max and Jn ≤ 2 + T 2 n5max /ǫ2 . Thus, by choosing { t j } 1≤ j ≤ J = [ n =1,...,nmax {tn,j }1≤ j≤ Jn , we have J ≤ 2nmax + T 2 n6max /ǫ2 and max n =1,...,nmax   P M I ∈ t j , t j +1 | N = n ≤ ǫ2 . T 2 n5max Hence by (13), kv j − u j k ≤ ǫ, and so by definition, N[] (ǫ, F , k · k) ≤ 2nmax + T 2 n6max /ǫ2 . Therefore Z 1r 0   log N[] (ǫ, F , k · k) dǫ ≤ Z 1q 0 log (2nmax + T 2 n6max /ǫ2 ) dǫ < ∞. This completes the proof. Proof of Theorem 4.1. By the Donsker property established in the proof of Lemma F.2  √ √ and Theorem 2.4 in Gine and Zinn (1990), r ( Ar − Ar∗ ) and r Ar − µ converge in √ distribution to the same process as r → ∞, so the quantile of supm∈[0,T ] r Ar (m) − Ar∗ (m) √ converges to the quantile of supm∈[0,T ] r Ar (m) − µ(m) . Therefore, q̂αB provides the bounds for the asymptotic 100(1 − α)%-confidence region stated in Theorem 4.1. Lemma F.3. Let X be a positive random variable. For any ǫ ∈ (0, 1), there exists a finite sequence −∞ = t1 < . . . < t J = ∞ such that J ≤ 2 + 1/ǫ and for j = 1, . . . , J − 1,  P X ∈ (t j , t j+1 ) ≤ ǫ. Proof. Denote by F the cumulative distribution function of X, by F(t−) the left-sided limit of F at t ∈ R, and by F−1 the generalised inverse of F, i.e. F−1 (y) = inf{ x ∈ 42 R : F( x ) ≥ y} for y ∈ R. We verify the lemma with J = 2 + ⌊1/ǫ⌋, t J = ∞, and t j = F−1 (( j − 1)ǫ) for j = 1, . . . , J − 1. Then, for j = 1, . . . , J − 2, P X ∈ t j , t j +1 Finally, P X ∈ t J −1 , t J       = F F−1 ( jǫ)− − F F−1 (( j − 1) ǫ) ≤ jǫ − ( j − 1) ǫ = ǫ.   = P(X > F−1 (( J − 2)ǫ)) = 1 − F F−1 (( J − 2)ǫ) ≤ 1 − ⌊1/ǫ⌋ǫ < ǫ. References Baddeley, A., Rubak, E. & Turner, R. (2015). Spatial Point Patterns: Methodology and Applications with R. Chapman and Hall/CRC Press. Baddeley, A. J. & Silverman, B. W. (1984). A cautionary example on the use of secondorder methods for analyzing point patterns. Biometrics 40, 1089–1093. Bendich, P., Marron, J., Miller, E., Pieloch, A. & Skwerer, S. (2016). Persistent homology analysis of brain artery trees. The Annals of Applied Statistics 10, 198–218. Biscio, C. A. N. & Lavancier, F. (2016). Quantifying repulsiveness of determinantal point processes. Bernoulli 22, 2001–2028. Bottou, L. & Bengio, Y. (1995). Convergence properties of the k-means algorithms. In: Advances in Neural Information Processing Systems, volume 7, MIT Press, 585–592. Bubenik, P. (2015). Statistical topological data analysis using persistence landscapes. Journal of Machine Learning Research 16, 77–102. Chazal, F., Cohen-Steiner, D., Guibas, L. J., Mémoli, F. & Oudot, S. Y. (2009). GromovHausdorff stable signatures for shapes using persistence. Computer Graphics Forum 28, 1393–1403. 43 Chazal, F., Fasy, B., Lecci, F., Rinaldo, A., Singh, A. & Wasserman, L. (2013). On the bootstrap for persistence diagrams and landscapes. Modeling and Analysis of Information Systems 20, 111–120. Chazal, F., Fasy, B. T., Lecci, F., Michel, B., Rinaldo, A. & Wasserman, L. (2014). Robust topological inference: Distance to a measure and kernel distance. Available on arXiv:1412.7197. Chen, Y.-C., Wang, D., Rinaldo, A. & Wasserman, L. (2015). Statistical analysis of persistence intensity functions. Available on arXiv: 1510.02502. Daley, D. J. & Vere-Jones, D. (2003). An Introduction to the Theory of Point Processes. Volume I: Elementary Theory and Methods. Springer-Verlag, New York, 2nd edition. Edelsbrunner, H. & Harer, J. L. (2010). Computational Topology. American Mathematical Society, Providence, RI. Fasy, B., Lecci, F., Rinaldo, A., Wasserman, L., Balakrishnan, S. & Singh, A. (2014). Confidence sets for persistence diagrams. The Annals of Statistics 42, 2301–2339. Gine, E. & Zinn, J. (1990). Bootstrapping general empirical measures. The Annals of Probability 18, 851–869. Hartigan, J. A. & Wong, M. A. (1979). Algorithm AS 136: A k-means clustering algorithm. Journal of the Royal Statistical Society: Series C (Applied Statistics) 28, 100–108. Jacques, J. & Preda, C. (2014). Functional data clustering: a survey. Advances in Data Analysis and Classification 8, 231–255. Lavancier, F., Møller, J. & Rubak, E. (2015). Determinantal point process models and statistical inference. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 77, 853–877. López-Pintado, S. & Romo, J. (2009). On the concept of depth for functional data. Journal of the American Statistical Association 104, 718–734. 44 López-Pintado, S., Romo, J. & Torrente, A. (2010). Robust depth-based tools for the analysis of gene expression data. Biostatistics 11, 254–264. MacPherson, R. & Schweinhart, B. (2012). Measuring shape with topology. Journal of Mathematical Physics 53, 073516. Matérn, B. (1986). Spatial Variation. Lecture Notes in Statistics 36, Springer-Verlag, Berlin. Møller, J. & Waagepetersen, R. P. (2004). Statistical Inference and Simulation for Spatial Point Processes. Chapman and Hall/CRC, Boca Raton. Møller, J. & Waagepetersen, R. P. (2016). Some recent developments in statistics for spatial point patterns. Annual Review of Statistics and Its Application To appear. Mrkvička, T., Myllymäki, M. & Hahn, U. (2016). Multiple Monte Carlo testing, with applications in spatial point processes. Statistics and Computing , 1–17. Myllymäki, M., Mrkvička, T., Grabarnik, P., Seijo, H. & Hahn, U. (2016). Global envelope tests for spatial processes. Journal of the Royal Statistical Society: Series B (Statistical Methodology) Available on arXiv:1307.0239. Præstgaard, J. T. (1995). Permutation and bootstrap Kolmogorov-Smirnov tests for the equality of two distributions. Scandinavian Journal of Statistics 22, 305–322. Robins, V. & Turner, K. (2016). Principal component analysis of persistent homology rank functions with case studies of spatial point patterns, sphere packing and colloids. Physica D: Nonlinear Phenomena 334, 99–117. Sun, Y. & Genton, M. G. (2011). Functional boxplots. Journal of Computational and Graphical Statistics 20, 316–334. van der Vaart, A. W. (2000). Asymptotic Statistics. Cambridge University Press, Cambridge. van der Vaart, A. W. & Wellner, J. A. (1996). Weak Convergence and Empirical Processes. Springer Series in Statistics, Springer-Verlag, New York. 45
10math.ST
Deep Learning Framework for Multi-class Breast Cancer Histology Image Classification arXiv:1802.00931v1 [cs.CV] 3 Feb 2018 Yeeleng S. Vang, Zhen Chen, and Xiaohui Xie University of California Irvine Irvine, CA 92697 {ysvang, zhenc4}@uci.edu [email protected] Abstract. In this work, we present a deep learning framework for multiclass breast cancer image classification as our submission to the International Conference on Image Analysis and Recognition (ICIAR) 2018 Grand Challenge on BreAst Cancer Histology images (BACH). As these histology images are too large to fit into GPU memory, we first propose using Inception V3 to perform patch level classification. The patch level predictions are then passed through an ensemble fusion framework involving majority voting, gradient boosting machine (GBM), and logistic regression to obtain the image level prediction. We improve the sensitivity of the Normal and Benign predicted classes by designing a Dual Path Network (DPN) to be used as a feature extractor where these extracted features are further sent to a second layer of ensemble prediction fusion using GBM, logistic regression, and support vector machine (SVM) to refine predictions. Experimental results demonstrate our framework shows a 12.5% improvement over the state-of-the-art model. 1 Introduction In the United States, breast cancer continues to be the leading cause of cancer death among women of all races [1]. Studies have shown that improvement to survival rate over the last decade can be attributed to early diagnosis and awareness of better treatment options [2],[3],[4]. Common non-invasive screening test includes clinical breast exam which involves a visual check of the skin and tissue and a manual check for unusual texture or lump, mammography which requires taking an x-ray image of the breast to look for changes, and breast MRI which uses radio waves to obtain a detailed image inside the breast. Of the latter two diagnostic modals, many computer-aided diagnosis (CAD) systems have been developed to assist radiologists in their effort to identify breast cancer in its early stages [5]. On the other side of the screening toolbox are biopsies which are minimally invasive procedures whereby tissue samples are physically removed to be stained with hematoxylin and eosin (H&E) and visualized under a microscope. These histopathology slides allow pathologists to distinguish between normal, non-malignant, and malignant lesions [11] to assist in their diagnosis. However, even among trained pathologists the concordance between their unanimous agreement is a mere 75% [6]. This high degree of discord motivates the development of automatic CAD systems using machine learning to assist these professionals in their diagnosis. From November 2017 to January 2018, the International Conference on Image Analysis and Recognition (ICIAR) held the 2018 Grand Challenge on BreAst Cancer Histology images (BACH) to solicit submissions of automatic image analysis systems for the task of four-class classification of breast cancer histology images. Here we present a deep learning framework for the task of multi-class breast cancer histology image classification. Our approach uses the Inception (GoogLeNet) V3 [19] architecture to discriminate between invasive carcinoma, in situ carcinoma, benign lesion, and normal tissue patches. We then fuse these patch level predictions to obtain image level prediction using an ensemble framework. Our system improves the sensitivity over the benign and normal classes by using a Dual Path Network (DPN) [24] to extract features as input into a second level ensemble framework involving GBM, SVM, and logistic regression. Experimental results on a held out set demonstrate our framework shows a 12.5% improvement over the state-of-the-art model. 2 Relate Work Several works have been published in the area of applying machine learning algorithms for cancer histology image detection and classification [12],[13],[14],[21]. In the specific area of breast cancer histopathology classification, the Camelyon 16 competition led to numerous new approaches utilizing techniques from deep learning to obtain results comparable to highly trained medical doctors [9],[10],[17]. The winning team used Inception V3 to create a tumor probability heatmap and perform geometrical and morphological feature selection over these heatmaps as input into a random forest classifier to achieve near 100% area under the receiver operating characteristic curve (AUC) score [9]. However, this competition involved only binary class prediction of tumor and normal whole slide images. For 4-class breast cancer classification, Araujo et al. [11] published a bespoke convolutional neural network architecture that achieved state-of-theart accuracy results and high sensitivity for carcinoma detection. 3 ICIAR2018 Grand Challenge Datasets and Evaluation Metric In this section, we describe the ICIAR2018 dataset provided by the organizers for the subchallenge of multi-class breast cancer histology image classification and the evaluation metric used to score submissions. The interested reader is encouraged to refer to the competition page for details regarding the other subchallenge. 3.1 ICIAR2018 Dataset The ICIAR2018 breast cancer histology image classification subchallenge consist of Hematoxylin and eosin (H&E) stained microscopy images as shown in Table 1. The dataset is an extended version of the one used by Araujo et al. [11]. All images were digitized with the same acquisition conditions, with resolution of 2040 × 1536 pixels and pixel size of 0.42µm × 0.42µm. Each image is labeled with one of four classes: i) normal tissue, ii) benign lesion, iii) in situ carcinoma and iv) invasive carcinoma according to the predominant cancer type in each image. The images were labeled by two pathologists who only provided a diagnostic from the image contents without specifying the area of interest. There are a total of 400 microscopy images with an even distribution over the four classes. We randomly perform a 70%-20%-10% training-validation-test split. The training and validation sets are used for model development while the test set is held out and only used for evaluation. Table 1. ICIAR2018 H&E Histopathology Dataset Type Training Validation Test Total normal 70 20 10 benign 70 20 10 Microscopy 400 in situ 70 20 10 invasive 70 20 10 3.2 Evaluation Metric This challenge consists of automatically classifying H&E-stained breast cancer histology images into four classes: normal, benign, in situ carcinoma and invasive carcinoma. Performance on this challenge is evaluated based on the overall prediction accuracy, i.e. the ratio of correct predictions over total number of images. 4 Method In this section, we describe our framework and approach to this problem of multi-class breast cancer histology image classification. 4.1 Image-wise classification of microscopy images Stain Normalization Pre-processing Stain normalization is a critically important step in the pre-processing of H&E stain images. It is known that cell nucleus are stained with a large amount of pure hematoxylin and a small amount of Eosin whereas cytoplasm is stained with a large amount of pure eosin and small amount of hematoxylin [8]. Variations in H&E images can be attributed to such factors as differences in lab protocols, concentration, source manufacturer, scanners, and even staining time [22]. These variations makes it difficult for software trained on a particular stain appearance [23] therefore necessitates careful preprocessing to reduce such variances. Many methods have been proposed for stain normalization including [23],[7],[8] that are based on color devolution where RGB pixel values are decomposed into their stain-specific basis vectors. In addition to color information, Bejnordi et el. takes advantage of spatial information to perform this deconvolution step [22], however their approach currently only works for whole slide images. In our framework, we utilized both Macenko [7], which used singular value decomposition (SVD), and Vahadane normalizations [8], which used sparse nonnegative matrix factorization (SNMF), as part of our ensemble framework. This was due to the fact that initial empirical results showed Macenko-normalized images obtained high sensitivity for invasive and in situ classes whereas Vahadanenormalized images showed high sensitivity for benign and normal classes. Both set of normalized datasets were normalized using ”iv001.tif” as the target image. An example of both normalization schemes are shown in Fig. 1. A B C D Fig. 1. A target image, B original image, C image after Macenko normalization, D image after Vahadane normaliztion. Image-wise Classification Framework The microscopy classification framework consists of a patch level classification stage, an image level heatmap postprocessing stage, and possibly a refinement stage, as depicted in Fig. 2. During model training of the patch-based classifer, each patch input is of size 512 × 512. We extracted 500 patches from each microscopy slide in the training and validation sets for both Macenko-normalized and Vahadane-normalized datasets. 35 of those patches comes from sliding over the normalized microscopy image with strides of 256 while the remaining patches were randomly sub-sampled. As with the assumption used in [11], these patches are given the same label as the original slide image with which they where obtained from. A pretrained Inception V3 model [19], is modified to accept image patch of this size and trained to discriminate between the four classes. At training time, images data are dynamically augmented before being fed through the model. Similar to the color perturbation scheme used in [10], brightness is perturbed with a delta of 5/255, contrast with a delta of .05, saturation with a delta of .05, and hue with a delta of 0.02. In addition to color perturbation, images were randomly flipped vertically and/or horizontally, and randomly rotated by 90 degrees to obtain all eight valid orientations. The Inception V3 model was fine-tuned on 4 GPUs (2 Nvidia Titan X GPUs and 2 Nvidia GTX 1080Ti) where each GPUs receive a batch of 8 images. Model is trained for 30 epochs with learning rates set as: 5e-5 for the bottom 5 convolution layers, 5e-4 for the eleven inception modules, and 5e-2 for the top fully connected layer. Learning rate was decreased by 0.95 every 2 epochs. The RMSprop optimizer [18] with 0.9 momentum is used and the best performing model on the validation set is saved. At inference time for a single microscopy image, a heatmap tensor of size [8 × 4 × 3 × 4] is obtained. The first dimension corresponds to the 8 valid orientations of the image, the second dimension to the 4 classes, and the third and fourth dimension corresponds to the spatial dimensions of the image using non-overlapping patching. I npu tI mage I nv as i v e 1 2 1 0 InSitu 0 1 2 1 MVLRGBM 1 3 1 1 BNeonrimganl Pa t c hes Nor mal i z edI mage Googl eNe tV3Model Pr edi c t i on Ou t pu t LRGBM SVM Ou t pu t DualPa t hNe t wor k Fig. 2. The framework of image-wise classification. The normalized input image is patched into twelve non-overlapping patches. 8 sets of these patches are generated corresponding to the 8 valid orientations. These 8 sets of patches are passed through the Inception (GoogLeNet) V3 model to generate a patch level heatmap probability tensor. The heatmap tensor is then fused using majority voting (MV), gradient boosting machine (GBM), and logistic regression (LR) across both macenko-normalized and vahadane-normalized version of the input image. If the model predicts invasive or in situ carcinoma, the model outputs this prediction. Otherwise the normalize images are pass through the DPN network to extract features for a second fusing step involving LR, GBM, and support vector machine (SVM) to output prediction for benign and normal class. Heatmap-based Post-processing Three data fusion strategies were investigated for this competition. The first strategy involved finding the average probabilities along the first dimension of the heatmap and then assigning labels to each 3 × 4 patches corresponding to the most probable class, which we will call the class map. From this 3 × 4 class map, a final label for the microscopy is obtained by majority voting. The second and third strategies involved finding the class map for each of the 8 orientation separately first, and then obtaining a histogram of the classes across all 8 orientations. The histogram data is then used to train two separate models: a logistic regression with L1 regularization and a gradient boosting machine (GBM) classifier (num. of estimator=280, max depth = 4, learning rate = .9) to ultimately classify the image similar to [16]. If the model predicts benign or normal, the vahadane-normalized image was further passed through a refinement stage as will be describe in the next section. Refinement model for Benign and Normal classes Since the Inception model yielded low sensitivity for both normal and benign classes with many interclass misclassification between these two classes, we proposed training a slimed-down version of the dual path network (DPN) [24] to serve as a feature extractor for use with Vahadane-normalized images. DPN was chosen due to its compact size and having beneficial characteristics of both residual-like and densenet-like architectures. Using the features extracted by the DPN, we train three additional models: GBM, Support Vector Machine (SVM), and Logistic regression with L1 for binary classification. The results for our entire pipeline is presented below in Table 2. 5 Experimental Results The performance of our framework on image-wise classification is shown below in Table 2. As a baseline, we compare against Araujo et al. [11] which, although using a smaller subset of this dataset, tested on a held-out set of roughly the same size. Their best accuracy performance on this 4-class classification problem was 77.8%. Our framework achieves an accuracy score of 87.5%, a 12.5% improvement over the baseline score. Even without the refinement model, our model offers a 6 % improvement over the baseline. Table 2. Image-wise Classification Results MV LR GBM MV Vahadane LR normalization GBM Ensemble Ensemble with refinement Macenko normalization Accuracy Validation Set Test Set 0.800 0.775 0.750 0.775 0.775 0.775 0.788 0.775 0.763 0.775 0.750 0.800 0.825 0.825 0.838 0.875 Comparing the sensitivity by Araujo et al. [11], we see they achieved sensitivities of 77.8 %, 66.7%, 88.9%, and 88.9% for normal, benign, in situ, and invasive classes respectively. From Table 3, we showed higher sensitivity across all four classes using our framework. Of noticeable improvement is the benign class which we saw an almost 20% improvement. This validates our decision to incorporate a binary class refinement phase specifically for the benign and normal classes. Table 3. Image-wise Test Set Contingency Table Prediction invasive in situ benign normal sensitivity Ground Truth invasive in situ benign normal 6 9 0 1 0 0 10 1 0 1 0 8 2 0 0 0 8 0.90 1.00 0.80 0.80 Discussion In this work we proposed a deep learning framework for the problem of multiclass breast cancer histology image classification. To leverage the advances from the computer vision field, we propose using the successful inception V3 model for initial four-class classification. We propose a new ensemble scheme to fuse patch probabilities for image-wise classification. To improve the sensitivity of the benign and normal class, we propose a two-class refinement stage using a dual path network to first extract features from the vahadane-normalized images and then using gradient boosting machine, support vector machine, and logistic regression to fuse all our predictions into a final result. Experimental results on the ICIAR2018 Grand Challenge dataset demonstrates an improvement of 12.5% over the state-of-the-art system. References 1. U.S. Cancer Statistics Working Group. United States Cancer Statistics: 1999-2014 Incidence and Mortality Web-based Report. Atlanta: U.S. Department of Health and Human Services, Centers for Disease Control and Prevention and National Cancer Institute; 2017. Available at: www.cdc.gov/uscs. 2. Saadatmand, Sepideh, et al. ”Influence of tumour stage at breast cancer detection on survival in modern times: population based study in 173 797 patients.” bmj 351 (2015): h4901. 3. Berry, Donald A., et al. ”Effect of screening and adjuvant therapy on mortality from breast cancer.” New England Journal of Medicine 353.17 (2005): 1784-1792. 4. de Gelder, Rianne, et al. ”The effects of populationbased mammography screening starting between age 40 and 50 in the presence of adjuvant systemic therapy.” International journal of cancer 137.1 (2015): 165-172. 5. Hadjiiski, Lubomir, Berkman Sahiner, and Heang-Ping Chan. ”Advances in CAD for diagnosis of breast cancer.” Current opinion in obstetrics & gynecology 18.1 (2006): 64. 6. Elmore, Joann G., et al. ”Diagnostic concordance among pathologists interpreting breast biopsy specimens.” Jama 313.11 (2015): 1122-1132. 7. Macenko, Marc, et al. ”A method for normalizing histology slides for quantitative analysis.” Biomedical Imaging: From Nano to Macro, 2009. ISBI’09. IEEE International Symposium on. IEEE, 2009. 8. Vahadane, Abhishek, et al. ”Structure-preserved color normalization for histological images.” Biomedical Imaging (ISBI), 2015 IEEE 12th International Symposium on. IEEE, 2015. 9. Wang, Dayong, et al. ”Deep learning for identifying metastatic breast cancer.” arXiv preprint arXiv:1606.05718 (2016). 10. Liu, Yun, et al. ”Detecting cancer metastases on gigapixel pathology images.” arXiv preprint arXiv:1703.02442 (2017). 11. Arajo, Teresa, et al. ”Classification of breast cancer histology images using Convolutional Neural Networks.” PloS one 12.6 (2017): e0177544. 12. Nayak, Nandita, et al. ”Classification of tumor histopathology via sparse feature learning.” Biomedical Imaging (ISBI), 2013 IEEE 10th International Symposium on. IEEE, 2013. 13. Gorelick, Lena, et al. ”Prostate histopathology: Learning tissue component histograms for cancer detection and classification.” IEEE transactions on medical imaging 32.10 (2013): 1804-1818. 14. Xu, Yan, et al. ”Weakly supervised histopathology cancer image segmentation and classification.” Medical image analysis 18.3 (2014): 591-604. 15. Ciompi, Francesco, et al. ”The importance of stain normalization in colorectal tissue classification with convolutional networks.” arXiv preprint arXiv:1702.05931 (2017). 16. Hou, Le, et al. ”Patch-based convolutional neural network for whole slide tissue image classification.” Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2016. 17. Bejnordi, Babak Ehteshami, et al. ”Diagnostic assessment of deep learning algorithms for detection of lymph node metastases in women with breast cancer.” Jama 318.22 (2017): 2199-2210. 18. Tieleman, Tijmen, et al.: Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude (2012) 22. 19. Szegedy, Christian, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. ”Going deeper with convolutions.” In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1-9. 2015. 20. Otsu, Nobuyuki. ”A threshold selection method from gray-level histograms.” IEEE transactions on systems, man, and cybernetics 9, no. 1 (1979): 62-66. 21. Wang, Wei, John A. Ozolek, and Gustavo K. Rohde. ”Detection and classification of thyroid follicular lesions based on nuclear structure from histopathology images.” Cytometry Part A 77.5 (2010): 485-494. 22. Bejnordi, Babak Ehteshami, et al. ”Stain specific standardization of whole-slide histopathological images.” IEEE transactions on medical imaging 35.2 (2016): 404415. 23. Khan, Adnan Mujahid, et al. ”A nonlinear mapping approach to stain normalization in digital histopathology images using image-specific color deconvolution.” IEEE Transactions on Biomedical Engineering 61.6 (2014): 1729-1738. 24. Chen, Yunpeng, et al. ”Dual path networks.” Advances in Neural Information Processing Systems. 2017.
1cs.CV
Semantic Segmentation of Colon Glands with Deep Convolutional Neural Networks and Total Variation Segmentation Philipp Kainz1,2,* , Michael Pfeiffer2 , and Martin Urschler3,4,5 arXiv:1511.06919v2 [cs.CV] 10 Oct 2017 1 Institute of Biophysics, Center for Physiological Medicine, Medical University of Graz, Graz, Austria 2 Institute of Neuroinformatics, University of Zurich and ETH Zurich, Zurich, Switzerland 3 Institute for Computer Graphics and Vision, Graz University of Technology, Graz, Austria 4 Ludwig Boltzmann Institute for Clinical Forensic Imaging, Graz, Austria 5 BioTechMed-Graz, Graz, Austria * [email protected] Abstract Segmentation of histopathology sections is an ubiquitous requirement in digital pathology and due to the large variability of biological tissue, machine learning techniques have shown superior performance over standard image processing methods. As part of the GlaS@MICCAI2015 colon gland segmentation challenge, we present a learning-based algorithm to segment glands in tissue of benign and malignant colorectal cancer. Images are preprocessed according to the HematoxylinEosin staining protocol and two deep convolutional neural networks (CNN) are trained as pixel classifiers. The CNN predictions are then regularized using a figure-ground segmentation based on weighted total variation to produce the final segmentation result. On two test sets, our approach achieves a tissue classification accuracy of 98% and 94%, making use of the inherent capability of our system to distinguish between benign and malignant tissue. 1 Introduction The variability of glandular structures in biological tissue poses a challenge to automated analysis of histopathology slides. It has become a key requirement to quantitative morphology assessment and supporting cancer grading. Considering nonpathological cases only, automated segmentation algorithms must already be able to deal with significant variability in shape, size, location, texture and staining of glands. Moreover, in pathological cases gland objects can tremendously differ from non-pathological and benign glands, which further exacerbates finding a general solution to the segmentation problem. Previous work on gland segmentation in colon tissue has used graphical models [1, 2, 3] or textural features [4]. Others worked on segmentation in prostatic cancer tissue using an integrated low-, high-level and contextual segmentation model [5], probabilistic Markov models [6], k-means clustering and region growing [7], spatial association of nuclei to gland lumen [8, 9]. The reader is referred to the work of Sirinukunwattana et al. [3] for a more detailed description of work related to glandular structure segmentation. Deep learning methods, especially convolutional neural networks (CNNs) [10], have found applications in biomedical image analysis for different tasks: semantic segmentation [11], mitosis detection [12] and classification [13], and blood cell counting [14]. (a) (b) Fig. 1: Samples of (a) benign and (b) malignant colorectal cancer sections in the Warwick-QU dataset. Ground truth labels in each image are available for each pixel and overlaid in different colors for individual objects. 2 In this work, we propose a learning-based strategy to semantically segment glands in the Warwick-QU dataset, presented at the GlaS@MICCAI2015 challenge1 . It contains 161 annotated images of benign and malignant colorectal adenocarcinoma, stained with Hematoxylin-Eosin (H&E) and scanned at 20× magnification. Fig. 1 shows some example images and their ground truth annotation. In each image, individual objects are annotated with the same label, illustrated by the different colors. To the challenge participants, information on whether an image shows benign or malignant tissue is only available in the training dataset. Three datasets were released during the contest and the total number of non-overlapping images (benign/malignant) in the training set, test set A and test set B is 85(37/48), 60(33/27), and 16(12/4), respectively. These datasets further contained 795, 666, and 91 individual glands. The contributions of our work are twofold: (i) we present a novel deep learning scheme to generate classifier predictions for malignant and benign object and background pixels accompanied by a dedicated gland-separating refinement classifier that is able to distinguish touching objects, which pose a challenge for later segmentation. (ii) We use these classification results as the input for a simple, yet effective, globally optimal figure-ground segmentation approach based on a convex geodesic active contour formulation that regularizes the classifier predictions according to a minimal contour-length principle. Both technological contributions are described in section 2, while the subsequent sections show and discuss the results of our novel approach applied to the datasets of the GlaS@MICCAI2015 challenge. 2 Methods We present a segmentation method for Hematoxylin-Eosin (H&E) stained histopathological sections that proceeds in three steps: The raw RGB images are preprocessed to extract a robust representation of the tissue structure. Subsequently, two classifiers are trained to predict glands (Object-Net) and gland-separating structures (Separator-Net) from the image. Finally, the outputs of the classifiers are combined and a figure-ground segmentation based on weighted total variation is used to produce the segmentation result. 2.1 Preprocessing H&E Slides Prior to classification, the RGB images are preprocessed as shown in Fig. 2. A standard color deconvolution [15] is performed for the specific H&E staining used in the provided dataset2 . It separates tissue components according to their staining, emphasizes the structure and inherently performs data whitening. The first (red) channel of the deconvolved RGB image contains most of the tissue structure information, so the other channels can be omitted. In order to account for different staining contrasts and lighting conditions during image acquisition, contrast limited adaptive histogram equalization (CLAHE) [17] is applied. 1 2 http://www2.warwick.ac.uk/fac/sci/dcs/research/combi/research/bic/glascontest/ We used the H&E 2 setting in the implementation of G. Landini, available in Fiji [16]. 3 Fig. 2: Preprocessing of the RGB images. Color deconvolution [15] separates the Hematoxylin-Eosin stained tissue components. The red channel of the deconvolved image is processed by CLAHE [17] and taken as input to the pixel classifiers. 2.2 Learning Pixel Classifiers Given the large variability of both benign and malignant tissue in the Warwick-QU dataset, we opted for CNNs due to their recently shown convincing performance in pixelwise classification of histopathology images [12] and to learn a rich set of features directly from images. The general architecture of both CNNs is motivated by a classical LeNet-5 architecture [18] and consists of K = 7 (k = 1, . . . , K) layers: four convolutional layers (Convk) for feature learning and three fully connected (FCk) layers as feature classifier, see Fig. 3. The rectified linear unit (ReLU) nonlinearity (f (x) = max(0, x)) is used as the activation function throughout all layers in the networks. All convolutional layers consist of a set of learnable square 2D filters with pixel stride 1, followed by ReLU activation. Subsampling (max-pooling) layers (Subk, 2 × 2), accounting for translation invariance, are used after the first three convolutional layers and are counted as part of the convolutional layer. The final pixelwise classification of an input image is obtained by sliding a window over the image, and classifying the center pixel of that window. For training minibatch stochastic gradient descent (MBSGD) with momentum, weight decay, and dropout regularization is used to minimize a negative log-likelihood loss function. 2.2.1 Object-Net: Classifying Gland Objects The goal of the Object-Net is to predict the probability of a pixel belonging to a gland or background. One could now define a binary classification problem, but malignant and benign tissue express express unique features, which are not found in the other tissue type, and which can thus complicate the learning problem. We therefore formulate 4 an alternative, four-class classification problem, in which we distinguish (L = 4, with l = 0, ..., L − 1): background benign (C0 ), gland benign (C1 ), background malignant (C2 ), and gland malignant (C3 ). In order to do that it is necessary to transform the provided ground truth labels to reflect benignity and malignancy as well. The annotation images are binarized and a new label is assigned to pixels belonging to each class Cl , see Fig. 4. The input to the CNN is an image patch I(x) of size 101 × 101 pixels, centered at an image location x = (u, v)> , where x ∈ Ω and Ω denotes the image domain. A given patch I(x) is convolved with 80 filters (11 × 11) in the first convolutional layer, in the second layer with 96 filters (7 × 7), in the third layer with 128 filters (5 × 5), and in the last layer with 160 filters (3 × 3), see Fig. 3(a). The three subsequent fully connected layers FC5-FC7 of the classifier contain 1024, 512, and four output units, respectively. The output of FC7 is fed into a softmax function, producing the center pixel’s probability distribution over the labels. The probability for each class l is stored in a corresponding map ICl (x). Input 101x101 Conv1 80@91x91 Conv2 96@40x40 Sub1 80@46x46 max-pooling 2x2 convolutions 11x11 Conv3 128@16x16 Sub2 96@20x20 Conv4 160@6x6 Sub3 128@8x8 FC5 1024 FC6 512 Output FC7 4 max-pooling max-pooling full connection 2x2 2x2 convolutions convolutions convolutions 7x7 3x3 5x5 (a) Object-Net architecture Input 101x101 Conv1 64@93x93 Conv2 96@41x41 Sub1 64@47x47 max-pooling 2x2 convolutions 9x9 Conv3 128@17x17 Sub2 96@21x21 Conv4 160@6x6 Sub3 128@7x7 FC5 1024 FC6 512 Output FC7 2 max-pooling max-pooling full connection 2x2 2x2 convolutions convolutions convolutions 7x7 3x3 5x5 (b) Separator-Net architecture Fig. 3: CNN classifier architectures of (a) the Object-Net and (b) the SeparatorNet. Both architectures have K = 7 (k = 1, . . . , K) layers, are identical in the number of convolutional (Convk), max-pooling (Subk), and fully connected (FCk) layers, but differ in convolution kernel size, size and number of the feature maps, as well as number of output units. The probability distribution over L labels of the center pixel x = (u, v)> (marked as red cross in the input patch) is predicted by the CNNs. 5 (a) (b) Fig. 4: Ground truth transformation for learning the four-class classification on the preprocessed images with the Object-Net. The first row shows a benign case, the second row shows a malignant case. (a) Preprocessed images with overlaid individual ground truth object annotations. (b) Provided annotations were transformed into four labels for benign background (C0 ), benign gland (C1 ), malignant background (C2 ) and malignant gland (C3 ). 2.2.2 Separator-Net: Classifying Gland-separating Structures Initial experiments have shown that taking pixelwise predictions only from the ObjectNet were insufficient in order to separate very close gland objects. Hence, a second CNN, the Separator-Net, is trained to predict structures in the image that are separating such objects. This learning problem is formulated as binary classification task. As depicted in Fig. 3(b), the CNN structure is similar to the Object-Net: a given input image patch I(x) of size 101 × 101 pixels is convolved with 64 filters (9 × 9) in the first convolutional layer, in the second layer with 96 filters (7 × 7), in the third layer with 128 filters (5 × 5), and in the last layer with 160 filters (3 × 3). The three subsequent fully connected layers FC5-FC7 of the classifier contain 1024, 512, and two output units, respectively. The output of the last layer (FC7) is fed into a softmax function to produce the probability distribution over the labels for the center pixel. The probability for a pixel x belonging to a gland-separating structure is stored in the corresponding probability map S(x). 2.2.3 Refining CNN Outputs Once all probability maps have been obtained, the Object-Net predictions ICl (x) are refined with the Separator-Net predictions S(x) to emphasize the gland borders and prevent merging of close objects. The subsequent figure-ground segmentation algorithm requires a single foreground and background map to produce the final segmentation result, so outputs are combined as follows. The foreground probability map pf g is constructed by      X pf g (x) = max  ICl (x) − ρS(x), 0 ,   l∈{1,3} 6 (1) where ρ ∈ [0, 1] controls the influence of the refinements done by the separator predictions. Similarly, evaluating Eq. (2) produces the background probability map:      X pbg (x) = min  ICl (x) + ρS(x), 1 .   (2) l∈{0,2} 2.3 Total Variation Segmentation To generate a final segmentation, the following continuous non-smooth energy functional Eseg (u) [19, 20] is minimized: Z Z min Eseg (u) = min u u s.t. g(x)|∇u(x)| dx + λ Ω u(x) · w(x) dx Ω (3) u ∈ Cbox = {u : u(x) ∈ [0, 1], ∀ x ∈ Ω} where Ω denotes the image domain and u ∈ C 1 : Ω 7→ R is smooth. The first term denotes the g-weighted total variation (TV) semi-norm which is a reformulation of the geodesic active contour energy [21]. The edge function g(x) is defined as β g(x) = e−αk∇I(x)k , α, β > 0, (4) where ∇I(x) is the gradient of the input image, thus attracting the segmentation towards large gradients. The second term in Eq. (3) is the data term with w describing a weighting map. The values in w have to be chosen negative if u should be foreground and positive if u should be background. If values in w are set to zero, the pure weighted TV energy is minimized seeking for a minimal contour length segmentation. We use the refined outputs from the previous classification step (Eqs. (1) and (2)) and introduce a threshold τ to ensure a minimum class confidence in a map p: ( p(x) = 0 if p(x) < τ . w(x) otherwise (5) The weighting map w is derived by applying the logit transformation: ( w(x) = −(log(pf g (x)) − log(1 − pf g (x))) if log(pbg (x)) − log(1 − pbg (x)) if pf g (x) > pbg (x) . pf g (x) ≤ pbg (x) (6) The regularization parameter λ defines the trade-off between our data term and the weighted TV semi-norm. The stated convex problem in Eq. (3) can be solved for its global optimum efficiently using the primal-dual algorithm [22], which can be implemented very efficiently using NVidia CUDA, thus making use of the parallel computing power of recent GPUs. As the segmentation u is continuous, the final segmentation is achieved by thresholding u with a value of 0.5. We optimize the free parameters α, β and λ by performing a grid search in a suitable range of these values (α ∈ [0.5, 15], β ∈ [0.35, 0.95] and λ ∈ [0.01, 10]), where all 85 annotated training images are used to tune these parameters based on the Dice coefficient. 7 2.4 2.4.1 Implementation Details Training Dataset Sampling For the sake of execution speed when using a sliding window approach, the images are rescaled to half resolution prior to classification and upsampled with bilinear interpolation to their original size afterwards. The size of the input patch I(x) is chosen to be 101 × 101 pixels, such that sufficient contextual information is available to classify the center pixel. The majority of training images (79) have a size of 775 × 522 pixels, and resizing reduces them to 387 × 261 pixels. If we just considered the valid part without border extension for sampling the patches for the training dataset, we would actually lose approximately 46% of the labeled pixels when using a patch size of 101 × 101 pixels. On the other hand, we would introduce a significant number of boundary artifacts by artificially extending the border to make use of all labeled pixels. Fortunately, most images are tiles of a bigger image and can thus be stitched seamlessly to obtain a total of 19 images3 (Fig. 5), where we can sample enough patches without heavily relying on artificial border extension. In principle, we pursued the same sampling strategy for the Separator-Net, but were required to create the ground truth labels manually. We annotated all pixels that belong to a structure very close to two or more gland borders. The green lines in Fig. 5 illustrate the additional manual annotation of the separating structures. Due to the low number of foreground samples when compared to the Object-Net, the number of foreground samples for the Separator-Net was artificially increased by exploiting the problem’s requirement for rotation-invariance and adding nine additional rotated versions of the patch, i.e. every 36◦ . Fig. 5: Manual ground truth annotations for gland-separating structures. Stitched images from four tiles (numbers in red boxes), red lines denote the tile borders. Manual annotations of pixels belonging to gland-separating structures are shown as green lines, the thickness of lines is increased for better illustration. 2.4.2 CNN Training Both CNNs were trained on a balanced training set of 125, 000 image patches per class. Patches in the training sets were sampled at random from the available pool of training 3 In one case, stitching was not possible, since only 3 tiles were available. These 3 tiles, and the remaining 6 images, that were not part of a bigger image, were treated as individual images. 8 0.8 training Obj.-Net test Obj.-Net training Sep.-Net test Sep.-Net classification error 0.7 0.6 0.5 best Obj.-Net 0.4 best Sep.-Net 0.3 0.2 0.1 0.0 0 20 40 60 80 100 120 140 epochs Fig. 6: CNN training progress. Classification error over epochs on a subset of the training data (training error), and on the held-out test set. The Object-Net reaches below 4.9% test error after 43 epochs, the Seperator-Net reaches 6.2% test error after 119 epochs. images. Training and test sets reflect approximately the same distribution of samples over images. The size of the minibatches in the MBSGD was set to 200 samples and the networks were trained until the stopping criterion was met: no further improvement of the error rate on a held-out test set over 20 epochs. We set the initial learning rate η0 = 0.0025, with a linear decay saturating at 0.2η0 after 100 epochs. For all layers, a weight decay was chosen to be 0.005 and the dropout rate was set to 0.5. We used an adaptive momentum term starting at 0.8 and increasing to 0.99 after 50 epochs, such that with progressing training the updates are influenced by a larger number of samples than at the beginning. Fig. 6 shows the classification error rate as a function of the training duration in epochs. Each class was represented with 5, 000 samples in the test set for the ObjectNet, and 10, 000 for the Separator-Net, respectively. The training error is actually estimated on a fixed subset of the training data (20, 000 samples), to get an intuition when overfitting starts. The Object-Net achieves the best performance after 43 epochs, with a minimum training error of 0.0475 and a minimum test error of 0.0492. Training of the Separator-Net continued until the lowest training error of 0.0231 and test error of 0.0624 was reached after 119 epochs. Fig. 7 shows the learned filters of the first convolutional layer in both networks. The CNN models were implemented in Pylearn2 [23], a machine learning library built on top of Theano [24, 25]. 3 Results 3.1 Colon Gland Segmentation The grid search resulted in α = 10, β = 0.95 and λ = 0.1 as parameters optimizing the TV segmentation based on the Dice score. The confidence threshold for foreground and background was determined empirically and fixed to τ = 0.65. Separator predictions were fully considered for refining the Object-Net predictions (ρ = 1). In Table 1, we report performance metrics4 for detection (precision, recall, F14 The evaluation scripts were kindly provided by the contest organizers and are avail- 9 (a) (b) Fig. 7: CNN training results. (a) 80 11 × 11 filters of the first layer in Object-Net and (b) 64 9 × 9 filters in the Separator-Net. Table 1: Segmentation performance metrics for the Warwick-QU dataset used in the GlaS@MICCAI2015 challenge. Dataset Precision Recall F1-score Object-Dice Hausdorff without separator refinement Training Test A Test B 0.97(0.09) 0.83(0.22) 0.70(0.35) 0.67(0.21) 0.60(0.24) 0.48(0.30) 0.78(0.17) 0.67(0.20) 0.50(0.26) 0.81(0.16) 0.70(0.15) 0.58(0.19) 116.89(115.18) 137.44(78.53) 249.37(114.69) with separator refinement Training Test A Test B 0.91(0.15) 0.67(0.24) 0.51(0.30) 0.85(0.14) 0.77(0.22) 0.70(0.32) 0.87(0.12) 0.68(0.20) 0.55(0.28) 0.88(0.09) 0.75(0.13) 0.61(0.22) 61.36(61.36) 103.49(72.38) 213.58(119.15) Metrics are reported as mean and standard deviation, best results are printed in bold. Performance on the training set is reported on all 85 training images. Test set A consists of 60 images, test set B of 16 images. Except for values of the Hausdorff distance, higher values are superior. score), segmentation (object-level Dice), and shape (Hausdorff distance) on the training set, as well as test set A and B as mean and standard deviation (SD). Blobs with an area less than 500 pixels were removed and all remaining blobs were labeled with unique identifiers before computing the measures. Compared to using predictions only from the Object-Net, the segmentation performance improved with separator refinement. Malignant cases are harder to segment due to their irregular shape and pathological variations in the tissue. Fig. 8 illustrates some qualitative example segmentation results on the training data set, Fig. 9 and Fig. 10 show results on test set A and B, respectively. able from http://www2.warwick.ac.uk/fac/sci/dcs/research/combi/research/bic/glascontest/ evaluation/. 10 The average total runtime for segmenting a 577 × 522 image is 5 minutes using an NVidia GeForce Titan Black 6GB GPU. (a) benign (b) malignant (c) benign (d) malignant (e) malignant (f) benign Fig. 8: Qualitative segmentation results on images of the training dataset. Even rows show the outline of ground truth in green and the segmentation result in blue. The numbers refer to the unique objects within the image. Odd rows show the segmentation difference: false negative pixels are colored in cyan, and false positives are colored in yellow. (a-c) show examples, where our segmentation algorithm works well, (d-f) show different types of segmentation errors. 3.2 Benignity and Malignancy Classification In the proposed approach, the Object-Net inherently learns a discrimination of benign (c = 0) and malignant (c = 1) tissue, since the labels for benign and malignant are available in the training dataset and we defined a four-class classification problem. Instead of combining the probability maps for glands and background as done for segmentation, we combine the maps for benignity and malignancy. Subsequently, the 11 (a) benign (b) malignant (c) benign (d) benign (e) benign (f) malignant Fig. 9: Qualitative segmentation results on images of test dataset A. Even rows show the segmentation (blue outline) and ground truth (green outline), odd rows show the differences, where false negative pixels are cyan, and false positive pixels are yellow. (a-c) show reasonable segmentation results, in (d-f) different segmentation errors are shown. average probabilities for a benign case can be computed as P(c = 0|IC0 , IC1 ) = 1 X IC (x) + IC1 (x), |Ω| x∈Ω 0 (7) 1 X IC (x) + IC3 (x), |Ω| x∈Ω 2 (8) and for a malignant case as P(c = 1|IC2 , IC3 ) = where |Ω| is the number of pixels in the image domain Ω. The maximum of both values finally indicates the prediction: n o c∗ = arg max P(c|·, ·) . (9) c We evaluated the classification performance for benign and malignant tissue on the two test sets A and B and achieved an accuracy of 98.33% and 93.75%. The average 12 (a) malignant (b) benign (c) malignant (d) benign (e) malignant (f) malignant Fig. 10: Qualitative segmentation results on images of test dataset B. Even rows show the segmentation (blue outline) and ground truth (green outline), odd rows show the differences, where false negative pixels are cyan, and false positive pixels are yellow. (a-c) show reasonable segmentation results, in (d-f) different segmentation errors are shown. (SD) decision confidence in test set A was 0.84(0.13) for benign and 0.81(0.11) for malignant, and in test set B 0.74(0.11) and 0.86(0.15), respectively. 4 Discussion and Conclusions This paper presented a method to segment glands in H&E stained histopathological images of colorectal cancer using deep convolutional neural networks and total variation segmentation. As our main contribution, we showed that segmentation results can be greatly improved when the predictions of the Object-Net are refined with the learned gland-separating structures of the Separator-Net. Adding the separators does not only regulate the trade-off between precision and recall, but generally improves the performance scores for detection (F1-score), segmentation (Dice) and shape (Hausdorff). The final ranking as well as the test set performance results of other 13 algorithms participating in this challenge are available online at the contest website5 , which is continuously being updated by algorithms from new participating groups. Our approach inherently allows to very accurately discriminate benign and malignant cases, because the Object-Net was trained on labels for both cases. The average confidence for a decision towards benignity and malignancy is acceptable. Nevertheless, we cannot distinguish more detailed histologic grades among these cases, since there was no information (e.g. high- or low-grade) available in addition to the segmentation ground truth. Acknowledgements The authors are grateful to the organizers of the GlaS@MICCAI2015 challenge for providing (i) the Warwick-QU image dataset, and (ii) the MATLAB evaluation scripts for computing performance measures that are comparable among the participating teams. Further thanks goes to Julien Martel for fruitful discussions in early phases of this challenge. References [1] C. Gunduz-Demir, M. Kandemir, A. B. Tosun, and C. Sokmensuer. Automatic segmentation of colon glands using object-graphs. Medical Image Analysis, 14(1):1 – 12, 2010. [2] A.B. Tosun and C. Gunduz-Demir. Graph run-length matrices for histopathological image segmentation. IEEE Transactions on Medical Imaging, 30(3):721–732, March 2011. [3] K. Sirinukunwattana, D.R.J. Snead, and N.M. Rajpoot. A stochastic polygons model for glandular structures in colon histology images. IEEE Transactions on Medical Imaging, PP(99):1–1, 2015. [4] R. Farjam, H. Soltanian-Zadeh, K. Jafari-Khouzani, and R. A. Zoroofi. An image analysis approach for automatic malignancy determination of prostate pathological images. Cytometry Part B: Clinical Cytometry, 72B(4):227–240, February 2007. [5] S. Naik, S. Doyle, S. Agner, A. Madabhushi, M. Feldman, and J. Tomaszewski. Automated gland and nuclei segmentation for grading of prostate and breast cancer histopathology. In IEEE International Symposium on Biomedical Imaging – ISBI, pages 284–287, May 2008. [6] J. P. Monaco, J. E. Tomaszewski, M. D. Feldman, I. Hagemann, M. Moradi, P. Mousavi, A. Boag, C. Davidson, P. Abolmaesumi, and A. Madabhushi. High-throughput detection of prostate cancer in histological sections using probabilistic pairwise markov models. Medical Image Analysis, 14(4):617–629, August 2010. [7] Y. Peng, Y. Jiang, L. Eisengart, M. Healy, F. Straus, and X. Yang. Computer-aided identification of prostatic adenocarcinoma: Segmentation of glandular structures. Journal of Pathology Informatics, 2(1), 2011. [8] K. Nguyen, A. Sarkar, and A. K. Jain. Structure and context in prostatic gland segmentation and classification. In Medical Image Computing and Computer-Assisted Intervention – MICCAI 2012, pages 115–123, 2012. [9] S. Rashid, L. Fazli, A. Boag, R. Siemens, P. Abolmaesumi, and S. E. Salcudean. Separation of benign and malignant glands in prostatic adenocarcinoma. In Medical Image Computing and Computer-Assisted Intervention – MICCAI 2013, pages 461–468, 2013. 5 http://www2.warwick.ac.uk/fac/sci/dcs/research/combi/research/bic/glascontest/ results/ 14 [10] Y. LeCun, K. Kavukcuoglu, and C. Farabet. Convolutional networks and applications in vision. In IEEE International Symposium on Circuits and Systems – ISCAS, pages 253–256, May 2010. [11] B. Pang, Y. Zhang, Q. Chen, Z. Gao, Q. Peng, and X. You. Cell nucleus segmentation in color histopathological imagery using convolutional networks. In Chinese Conference on Pattern Recognition – CCPR, pages 1–5, October 2010. [12] D. C. Ciresan, A. Giusti, L. M. Gambardella, and J. Schmidhuber. Mitosis detection in breast cancer histology images with deep neural networks. In Medical Image Computing and Computer-Assisted Intervention – MICCAI 2013, pages 411–418, 2013. [13] C. D. Malon and E. Cosatto. Classification of mitotic figures with convolutional neural networks and seeded blob features. Journal of Pathology Informatics, 4:9, May 2013. [14] M. Habibzadeh, A. Krzyżak, and T. Fevens. White blood cell differential counts using convolutional neural networks for low resolution images. In Artificial Intelligence and Soft Computing, pages 263–274. Springer Berlin Heidelberg, 2013. [15] A. C. Ruifrok and D. A. Johnston. Quantification of histochemical staining by color deconvolution. Analytical and Quantitative Cytology and Histology, 23(4):291–299, August 2001. [16] J. Schindelin, I. Arganda-Carreras, E. Frise, V. Kaynig, M. Longair, T. Pietzsch, S. Preibisch, C. Rueden, S. Saalfeld, B. Schmid, J. Tinevez, D. J. White, V. Hartenstein, K. Eliceiri, P. Tomancak, and A. Cardona. Fiji: an open-source platform for biologicalimage analysis. Nature Methods, 9(7):676–682, July 2012. [17] K. Zuiderveld. Contrast limited adaptive histogram equalization. In Graphics gems IV, pages 474–485. Academic Press Professional, Inc., 1994. [18] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, November 1998. [19] C. Reinbacher, T. Pock, C. Bauer, and H. Bischof. Variational Segmentation of Elongated Volumetric Structures. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3177–3184, 2010. [20] K. Hammernik, T. Ebner, D. Stern, M. Urschler, and T. Pock. Vertebrae segmentation in 3D CT images based on a variational framework. In Recent Advances in Computational Methods and Clinical Applications for Spine Imaging, pages 227–233. Springer, 2015. [21] X. Bresson, S. Esedoglu, P. Vandergheynst, J.-P. Thiran, and S. Osher. Fast global minimization of the active contour/snake model. Journal of Mathematical Imaging and Vision, 28(2):151–167, 2007. [22] A. Chambolle and T. Pock. A first-order primal-dual algorithm for convex problems with applications to imaging. Journal of Mathematical Imaging and Vision, 40(1):120–145, 2011. [23] I. J. Goodfellow, D. Warde-Farley, P. Lamblin, V. Dumoulin, M. Mirza, R. Pascanu, J. Bergstra, F. Bastien, and Y. Bengio. Pylearn2: a machine learning research library. arXiv preprint arXiv:1308.4214, 2013. [24] J. Bergstra, O. Breuleux, F. Bastien, P. Lamblin, R. Pascanu, G. Desjardins, J. Turian, D. Warde-Farley, and Y. Bengio. Theano: a CPU and GPU math expression compiler. In Proceedings of the Python for Scientific Computing Conference (SciPy), June 2010. [25] F. Bastien, P. Lamblin, R. Pascanu, J. Bergstra, I. J. Goodfellow, A. Bergeron, N. Bouchard, and Y. Bengio. Theano: new features and speed improvements. Deep Learning and Unsupervised Feature Learning NIPS 2012 Workshop, 2012. 15
1cs.CV
1 A Novel Progressive Learning Technique for Multi-class Classification Rajasekar Venkatesan* 1 and Meng Joo Er2 1, 2 School of Electrical and Electronic Engineering, Nanyang Technological University, Singapore. Email id: [email protected] 1 [email protected] 2 Abstract— In this paper, a progressive learning technique for multi -class classification is proposed. This newly developed learning technique is independent of the number of class constraints and it can learn new classes while still retaining the knowledge of previous classes. Whenever a new class (non-native to the knowledge learnt thus far) is encountered, the neural network structure gets remodeled automatically by facilitating new neurons and interconnections , and the parameters are calculated in such a way that it retains the knowledge learnt thus far. This technique is suitable for realworld applications where the number of classes is often unknown and online learning from real -time data is required. The consistency and the complexity of the progressive learning technique are analyzed. S everal standard datasets are used to evaluate the performance of the developed technique. A comparative study shows that the developed technique is superior. Key Words—Classification, machine learning, multi-class, sequential learning, progressive learning. T 1. INTRODUCTION HE study on feedforward neural network (FNN) has gained prominence since the advent of back propagation (BP) algorithm [1]. Several improved and optimized variants of the BP algorithm have then been developed and analyzed [2-7]. In the past two decades, single hidden layer feedforward neural networks (SLFNs) has gained significant importance due to its widespread applications in recognition, classification and function approximation area [8-12]. Several learning techniques have been proposed since then for effective training of the SLFN [13-14]. The learning techniques can be grouped under two basic categories; Batch learning and Sequential learning [15]. Batch learning algorithms require pre collection of training data. The collected data set is then used for training the neural network. The network parameters are calculated and updated by processing all the training data together. There are several batch learning algorithms in the literature. One of the relatively new batch learning scheme called Extreme Learning Machines (ELM) is proposed by Huang et al in 2004 [16]. The special nature of ELM is that the input weights and the hidden node biases can be chosen at random [17]. A key feature of ELM is that it maintains the universal approximation capability of SLFN [17-19]. It has gained much attention to it and several research works are further made in it due to its special nature of random input weight initialization and its unique advantage of extreme learning speed [20]. The advantages of ELM over other traditional feedforward neural network are analyzed in the literature [9,21]. Many new variants and developments are made to the ELM and significant results are achieved in the approximation, classification and regression areas [22-24]. Batch learning involves processing of the complete data set concurrently for updating the weights. This technique is limited to its applications as batch learning techniques are more time consuming and requires the complete data set prior to training. On the other hand, in online/sequential learning algorithms, the network parameters are updated as and when a new training data arrives. To overcome the shortcomings of the batch learning techniques, several sequential and/or online learning algorithms are developed [ 2528]. 2 In many cases, sequential learning algorithms are preferred over batch learning algorithms as they do not require retraining whenever a new data sample is received [8]. Online-sequential learning method that combines ELM and Recursive Least Square (RLS) algorithm is later developed and is called Online-Sequential extreme learning machine (OS-ELM) [15]. Several variants of ELM and OS-ELM were developed and proposed in the literature [8,9,17,22,23,29]. The issue with existing multi-class classification techniques such as ELM and SVM is that, once they are trained to classify a specific number of classes, learning of new classes is not possible. In order to learn new class of data it requires retraining all the classes anew again. The existing techniques require a priori information on the number of classes that will be present in the training dataset. The information on the number of classes is required to be either specified directly or is identified by analyzing the complete training data set. Based on this parameter, the network model will be designed and only the parameters or the weights of the networks are updated depending on the sequential input data. This makes the existing techniques “static” with respect to the number of classes it can learn. While the existing techniques are suited for applications with pre-known dataset, it might not be well suited for applications such as cognitive robotics or those involving real-time data where the nature of training data is unknown. For such real-world and real-time data, where the number of classes to be learnt is often unknown, the learning technique must be self-developing to meet the dynamic needs. To overcome this shortcoming, a novel learning paradigm is proposed, called the “progressive learning”. Progressive learning is the next stage of advancement to the online learning methods. Existing online sequential techniques only learn to classify data among a fixed set of classes which are initialized during the initialization phase of the algorithm. They fail to dynamically adapt when introduced to new class/classes on the run. The progressive learning technique is independent of the number of class constraint and it can learn several new classes on the go by retaining the knowledge of previous classes. This is achieved by modifying the network structure by itself upon encountering a new class and updating the network parameters in such a way that it learns the new class and retains the knowledge learnt thus far. The existing online sequential learning methods do not require retraining when a “new data sample” is received. But it fails when a “new class of data” which is unknown to the existing knowledge is encountered. Progressive learning technique overcomes this shortcoming by allowing the network to learn multiple new classes’ alien to existing knowledge, encountered at any point of time. 2. PRELIMINARIES This section gives a brief review of the ELM and the OS-ELM techniques to provide basic background information . 2.1 Extreme Learning Machines A condensed overview of the batch learning ELM technique as proposed by Huang et. al. [16] is given below. Consider there are N training samples represented as {(xj,tj)} where j varies from 1 to N, xj denotes the input data vector: xj = [xj1 ,xj2 ,…xjn ]T ϵ Rn and tj = [t j1 ,tj2 ,…,tjm]T ϵ Rm denotes the target class labels. Let there be P number of hidden layer neurons in the network, the output of the standard SLFN can be given as 𝑃 𝑃 (1) ∑ 𝜷𝒊 𝑔𝑖 (𝒙 𝒋 ) = ∑ 𝜷𝒊 𝑔 (𝒘𝒊 . 𝒙 𝒋 + 𝑏𝑖 ) = 𝒐 𝒋 𝑖 =1 𝑖 =1 where, j = 1, 2….N, wi = [wi1 ,wi2 ,…win ]T denotes the weight vector from input nodes to ith hidden node, βi = [β i1, βi2 ,… β im]T denotes the weight vector connecting ith hidden node to the output nodes and b i is the hidden layer bias value. For the standard SLFN mentioned in the equation above to perform as a classifier, the output of the network should 3 be equal to the corresponding target class of the input data given to the classifier. Hence, for the SLFN in equation 1 to be a classifier, there exist a βi , g(x), wi and b i such that 𝑃 (2) ∑‖𝒐 𝒋 − 𝒕𝒋 ‖ = 0 𝑗 =1 Therefore, the equation for the output of the network can be written as, 𝑃 (3) ∑ 𝜷𝒊 𝑔(𝒘𝒊 . 𝒙 𝒋 + 𝑏𝑖 ) = 𝒕𝒋 𝑖=1 where j = 1,2,…N, and tj denotes the target class corresponding to the input data vector xj. This equation can be written in compact form as Hβ = T (4) Where 𝑔(𝑤1 . 𝑥1 + 𝑏1 ) ⋮ 𝑔(𝑤1 . 𝑥 𝑁 + 𝑏1 ) H(w1,…wP,b1,…,bP,x1,….,xN)= [ ⋯ 𝑔(𝑤𝑃 . 𝑥1 + 𝑏𝑃 ) ⋱ ⋮ ] ⋯ 𝑔(𝑤𝑃 . 𝑥𝑁 + 𝑏𝑃 ) 𝑁𝑋𝑃 (5) 𝛽1𝑇 𝜷= [ ⋮ ] 𝛽𝑃𝑇 𝑃𝑋𝑚 (6) 𝑡1𝑇 𝑻= [⋮] 𝑡𝑁𝑇 𝑁𝑋𝑚 (7) H is called the hidden layer output matrix of the neural network where each column of H gives corresponding output of the hidden layers for a given input xi . The mathematical framework and the training process are extensively described in the literature [9]. The key results are restated. Lemma 1: [9] Given a standard SLFN with N hidden nodes and activation function g: R → R which is infinitely differentiable in any interval, for N arbitrary distinct samples ( x i ,t i ), where x i ϵ Rn and t i ϵ Rm , for any wi and b i randomly chosen from any intervals of R n and R, respectively, according to any continuous probability distribution, then with probability one, the hidden layer output matrix H of the SLFN is invertible and ||Hβ – T|| = 0. Lemma 2: [9] Given any small positive value ε > 0 and activation function g: R → R which is infinitely differentiable in any interval, there exists P ≤ N such that for N arbitrary distinct samples ( x i ,ti ), where x i ϵ Rn and ti ϵ Rm , for any wi and b i randomly chosen from any intervals of R n and R, respectively, according to any continuous probability distribution, then with probability one, ||HNxP βPXm – TNXm|| < ε. Thus it can be seen that for an ELM, the input weights w i , and the hidden layer neuron bias bi can be randomly assigned. Training of the ELM involves estimating the output weights β such that the relation Hβ = T is true. The output weight β for the ELM can be estimated using the Moore-Penrose generalized inverse as β = H+T, where is the Moore-Penrose inverse of the hidden layer output matrix H. H+ The overall batch learning algorithm of the ELM for training set of form {(xi ,ti )|xi ϵ Rn , ti ϵ Rm, i = 1,…N} with P hidden layer neurons can be summarized as, STEP 1: Random assignment of input weights wi and hidden layer bias b i , i = 1,….P. 4 STEP 2: Computation of the hidden layer output matrix H. STEP 3: Estimation of output weights using β = H+T where H+ is the Moore-Penrose inverse of H and T = [t 1 ,…t N ]T. 2.2 Online Sequential – Extreme Learning Machine Based on the batch learning method of the ELM, sequential modification is performed and Online Sequential-ELM (OS-ELM) is proposed in literature [15]. OS-ELM operates on online data. In the batch learning method ELM the output weight β is estimated using the formula β = H+T, where H+ is the Moore-Penrose inverse of the hidden layer output matrix H. The H+ can be written as, H+ = (HTH)-1 HT (8) As stated in [15], this solution gives the least square solution to Hβ = T. The OS-ELM uses RLS algorithm to update the output weight matrix sequentially as the data arrives online. It has been well studied in the literature and the summary is given below. Let N0 be the number of samples in the initial block of data that is p rovided to the network. Calculate M0 = (H0 TH0 )-1 and β0 = M0 H0 TT0 . For each of the subsequent sequentially arriving data, the output weights can be updated as 𝑴𝒌+𝟏 = 𝑴𝒌 − 𝑴𝒌 𝒉𝒌+𝟏 𝒉𝑻𝒌+𝟏 𝑴𝒌 (9) 𝟏 + 𝒉𝑻𝒌+𝟏 𝑴𝒌 𝒉𝒌+𝟏 𝜷𝒌+𝟏 = 𝜷𝒌 + 𝑴𝒌+𝟏 𝒉𝒌+𝟏 (𝒕𝑻𝒌+𝟏 − 𝒉𝑻𝒌+𝟏 𝜷𝒌 ) (10) Where k = 0,1,2…. N-N0 -1. The steps in the Online-Sequential ELM based on the RLS algorithm are summarized below. INITIALIZATION PHASE STEP 1: The input weights and the hidden layer bias are assigned in random. STEP 2: For the initial block of N0 samples of data, the hidden layer output matrix H0 is calculated. H0 = [h1 ,….hP]T, where hi = [g(w1 .xi +b 1 ),….g(wP .xi +b P )]T, i = 1,2…N0 (11) STEP 3: From the value of H0 , the initial values of M 0 and β 0 are estimated as M0 = (H0 TH0 )-1 (12) β0 = M0 H0 TT0 (13) SEQUENTIAL LEARNING PHASE STEP 4: For each of the subsequent sequentially arriving data, the hidden layer output vector h k+1 is calculated. STEP 5: The output weight is updated based on the RLS algorithm as, 𝑴𝒌+𝟏 = 𝑴𝒌 − 𝑴𝒌 𝒉𝑻𝒌+𝟏 (𝑰 + 𝒉𝒌+𝟏 𝑴𝒌 𝒉𝑻𝒌+𝟏 ) −𝟏 𝒉𝒌+𝟏 𝑴𝒌 𝜷𝒌+𝟏 = 𝜷𝒌 + 𝑴𝒌+𝟏 𝒉𝑻𝒌+𝟏 ( 𝒕𝒌+𝟏 − 𝒉𝒌+𝟏 𝜷𝒌 ) (14) (15) The theory and the formulation behind the operation of the OS-ELM and ELM have been discussed in detail in 5 several papers [8,9,13,15,30]. The standard variants of activation function used in ELM [31] and other special mapping functions and their variants are discussed in detail in the literature [32-35]. The other variants of ELM includes ELM Kernel [36], ELM for imbalanced data [37], ELM for noisy data [38], Incremental ELM [19], ELM ensemble [39-41] and many other variants are summarized in [31] 3. PRO GRESSIVE LEARNING TECHNIQ UE 3.1 Learning like children The proposed progressive learning algorithm is adapted from the natural learning process exhibited by the children. Peter Jarvis in his book [42] has described in detail the nature of the human learning process. As opposed to traditional machine learning algorithm’s training-testing cycle, human learning is a continuous process. The learning / training phase is never ending. Whenever human brain is stumbled upon with a new phenomenon, the learning resumes [42]. The key feature of human learning is that, the learning of new phenomenon does not affect the knowledge learnt. The new knowledge is leant and is added along with existing knowledge. Though there are several online and sequential learning methods, the information of number of classes is fixed during initialization. This restricts the possibility of learning newer classes on the run. Existing machine learning algorithms fails to resume learning when an entirely new class / classes of data are encountered after the initializatio n . For applications such as cognitive robotics, real-world learning, etc. the system should be robust and dynamic to learn new classes on the run. The number of classes it encounters is not known beforehand. The system should be able to redesign itself and adapt to meet the learning of the new class as it arrives. The proposed learning method introduces a novel technique of progressive learning which showcases continuous learning. The progressive learning technique enables to learn new classes dynamically on the run. Whenever a new class is encountered, the neural network “grows” and redesign its interconnections and weights so as to incorporate the learning of the new classification. Another key feature of the proposed method is that the newer classes are learnt in addition to the existing knowledge as if they were present from the beginning. 3.2 Proposed Algorithm As foreshadowed, the key objective of the progressive learning technique is that it can dynamically learn new classes on the run. Suppose the network is initially trained to classify ‘m’ number of classes. Consider the network encounters ‘c’ number of new classes which are alien to the previously learnt class, the Progressive Learning Technique (PLT) will adapt automatically and starts to learn the new class by maintaining the knowledge of previously learnt classes. The introduction of new class (es) to the network, results in changes in the dimension of the output vector and the output weight matrix. Also the newly formed matrices with increased dimension should be evaluated in such a way that it still retains the knowledge learnt thus far and also facilitates the learning of the newly introduced class (es). The method of increasing the dimension of the matrix, the weight update and matrix recalibration methods of the proposed algorithm are significantly different from the class -incremental extreme learning machine [43]. The proposed algorithm can not only learn sequential introduction of single new class, but also simultaneous (multiple new classes in same block of the online data) and sequential introduction of multiple new classes. The proposed algorithm is also independent of the time of introduction of the new class(es). Consider there are P hidden layer neurons, and the training data is of the form (xi , t i ), the steps of the PLT algorith m are: INITIALIZATION PHASE STEP 1: The input weights and the hidden layer bias are assigned at random. STEP 2: For the initial block of N0 samples of data, the hidden layer output matrix H0 is calculated. 6 H0 = [h1 ,….hP]T, where hi =[g(w1 .xi +b 1 ),….g(wP .xi +b P )]T, i = 1,2…N0 (16) STEP 3: From the value of H0 , the initial values of M 0 and β 0 are estimated as M0 = (H0 TH0 )-1 (17) β0 = M0 H0 TT0 (18) SEQUENTIAL LEARNING PHASE The subsequent data that arrives to the network can be trained either on one-by-one or chunk-by-chunk basis. Let ‘b’ be the chunk size. Unity value for b results in training the network on one -by-one basis. When a new data sample/chunk of data is arrived, it can fall into either of the two categories. i) Absence of new class of data ii) Presence of new class / classes of data If there are no new classes in the current set of data, the PLT is similar to OS-ELM and the usual process of calculating and updating the output weights is performed. The subsequent algorithm steps for the case of no new classes in current chunk of data are as follows. STEP 4: The hidden layer output vector h k+1 is calculated. STEP 5: The output weight is updated based on the RLS algorithm as, 𝑴𝒌+𝟏 = 𝑴𝒌 − 𝑴𝒌 𝒉𝑻𝒌+𝟏 (𝑰 + 𝒉𝒌+𝟏 𝑴𝒌 𝒉𝑻𝒌+𝟏 ) −𝟏 𝒉𝒌+𝟏 𝑴𝒌 𝜷𝒌+𝟏 = 𝜷𝒌 + 𝑴𝒌+𝟏 𝒉𝑻𝒌+𝟏 ( 𝒕𝒌+𝟏 − 𝒉𝒌+𝟏 𝜷𝒌 ) (19) (20) If there is a new class(es) in the chunk of data arrived, a novel progressive learning technique is used to recalibrate the network to accommodate new class by retaining old knowledge. The algorithm maintains the classes learnt thus far in a separate set. When a new data sample/block of data arrives, the data are analyzed for the class it belongs to. If the target class of new data block is equal to or a subset of existing classes, no new classification has been encountered. When the new data block’s target class set is not a subset of existing classes, it means that the system has encountered new classification and a special recalibrate routine is initiated. In the recalibration routine, the number of new classes encountered is determined and class labels are identified . Let ‘c’ be the number of new classes encountered. Upon identifying the number of new classes introduced, the set containing the classes learnt thus far is updated accordingly. The neural network is redesigned with the number of output neurons increased accordingly and the interconnections redone. The weights of the new network are determined from the current and the previous weights of the old network. The weight update is made such that the knowledge learnt by the old network is retained and the knowledge of new classes is included along with it. Consider there are P hidden layer neurons in the network, m classes of data are currently learnt by the network and b be the chunk size of the sequential learning. The introduction of ‘c’ new classes at any instant k+1, will modify the dimensions of the output weight matrix β from βPXm to βPXm+c. The output weight matrix β is of critical importance in ELM based networks. Since the input weights and the hidden layer bias are randomly assigned, the values in the β matrix control the number of classes learnt and the accuracy of each class. The algorithm steps are continued as follows. STEP 4: The values of βPXm+c are calculated based on the current values of βPXm , (hk)bXP and (Mk)PXP. 7 The current β matrix is of the dimension ( 𝜷𝒌 )𝑷𝑿𝒎 and ‘c’ new classes are introduced. Therefore, to accommodat e ̃𝒌 as given the output weight matrix for the increased number of output layer neurons, the β matrix is transformed to 𝜷 in equation. (21) ̃𝒌 = (𝜷𝒌 )𝑷𝑿𝒎 𝑰𝒎𝑿𝒎 +𝒄 𝜷 Where 𝑰𝒎𝑿𝒎 +𝒄 is a rectangular identity matrix of dimension m X m+c. ̃𝒌 𝜷 = ( 𝜷𝒌 )𝑃𝑋𝑚 𝑃𝑋𝑚+𝑐 1 [0 0 0 0 1 0 0 ̃𝒌 𝜷 = [(𝜷𝒌 )𝑃𝑋𝑚 𝑃𝑋𝑚+𝑐 … … … … 0 0] 0 0 𝑚𝑋𝑚 +𝑐 𝑶 𝑃𝑋𝑐 ] 𝑃𝑋𝑚+𝑐 (22) (23) Where 𝑶 𝑃𝑋𝑐 is zero matrix. Upon extending the weight matrix to accommodate the increased number of output neurons, the learning learnt thus far has to be incorporated in the newly upgraded weight matrix. Appending zero matrix is a trivial way to increase the dimensions. The matrix values have to be updated such that the network retains the knowledge of existing classes and can learn new classes as if they were available from the beginning of the training phase. From equation 18, it can be seen that, the error difference between the t arget class 𝒕𝒌+𝟏 and the predicted class 𝒉𝒌+𝟏 𝜷𝒌 is scaled by a learning factor and is added to 𝜷𝒌 . Since ‘c’ new classes are introduced only at the k+1th time instant, for the initial k data samples, the target class label value corresponding to the new class is -1. Therefore, the k-learning step update for the ‘c’ new classes ((∆𝜷𝑘 )𝑃𝑋𝑐 ) can be written as, −1 ⋯ (∆𝜷𝑘 )𝑃𝑋𝑐 = (𝑴𝑘 )𝑃𝑋𝑃 (𝒉𝑻𝒌 ) [ ⋮ ⋱ 𝑃𝑋𝑏 −1 ⋯ −1 ⋮ ] −1 𝑏𝑋𝑐 ( ∆𝜷𝑘 ) 𝑃𝑋𝑐 = −(𝑴𝑘 ) 𝑃𝑋𝑃 (𝒉𝑇𝑘 ) 𝑃𝑋𝑏 𝑱𝑏𝑋𝑐 (24) (25) where 𝑱𝑏𝑋𝑐 is an all-ones matrix. 1 𝑱𝑏𝑋𝑐 = [ ⋮ 1 ⋯ ⋱ ⋯ 1 ⋮] 1 𝑏𝑋𝑐 (26) ̃𝑘 The k-learning step update for the new classes is then incorporated with the 𝜷 to provide the upgraded 𝑚𝑋𝑚 +𝑐 ( 𝜷𝑘 ) 𝑃𝑋(𝑚+𝑐 ) matrix which is recalibrated to adapt learning ‘c’ new classes. ̃𝑘 ) (∆𝜷 = [ 𝑶 𝑃𝑋𝑚 𝑃𝑋𝑚+𝑐 −(𝑴𝑘 )𝑃𝑋𝑃 ( 𝒉𝑇𝑘 )𝑃𝑋𝑏 𝑱𝑏𝑋𝑐 ] (27) The recalibrated output weight matrix (𝜷𝑘 ) 𝑁′ 𝑋(𝑁′+𝑐 ) is calculated as, ( 𝜷𝑘 ) 𝑃𝑋(𝑚+𝑐 ) = 𝜷 ̃𝑘 ̃𝑘) + (∆𝜷 𝑃𝑋𝑚+𝑐 𝑃𝑋𝑚+𝑐 (28) Upon simplification, (𝜷𝑘 )𝑃𝑋 (𝑚+𝑐 ) can be expressed as, (𝜷𝑘 )𝑃𝑋 (𝑚+𝑐 ) = [ (𝜷𝑘 )𝑃𝑋𝑚 (∆𝜷𝑘 )𝑃𝑋𝑐 ] (29) ( 𝜷𝑘 )𝑃𝑋𝑚 represents the knowledge previously learnt. The dimension of β is increased from m to m+c. As opposed to populating the increased dimension with identity matrix values, the new entries ( ∆𝜷𝑘 ) 𝑃𝑋𝑐 are calculated in such a 8 way that the newly introduced classes will appear to the neural network as if they are present from the beginning of the training procedure and the training data samples thus far does not belong to the newly introduced class. The network is recalibrated such that the (∆𝜷𝑘 )𝑃𝑋𝑐 matrix represents the learning of the new class from the beginning of the training phase to the current data sample considering that none of the previous data samples belong to the newly introduced class. i.e. The (∆𝜷𝑘 )𝑃𝑋𝑐 is computed which is equivalent to the k-learning step equivalent of the ‘c’ new classes from the beginning of the training phase. Therefore the updated (𝜷𝑘 )𝑃𝑋 (𝑚+𝑐 ) matrix represents the network with (m+c) classes with ‘m’ previously existin g classes and ‘c’ new classes. STEP 5: The hidden layer output vector h k+1 is calculated. STEP 6: The output weight matrix of increased dimension to facilitate learning of new class is updated based on the RLS algorithm as, 𝑴𝒌+𝟏 = 𝑴𝒌 − 𝑴𝒌 𝒉𝑻𝒌+𝟏 (𝑰 + 𝒉𝒌+𝟏 𝑴𝒌 𝒉𝑻𝒌+𝟏 ) −𝟏 𝒉𝒌+𝟏 𝑴𝒌 𝜷𝒌+𝟏 = 𝜷𝒌 + 𝑴𝒌+𝟏 𝒉𝑻𝒌+𝟏 ( 𝒕𝒌+𝟏 − 𝒉𝒌+𝟏 𝜷𝒌 ) (30) (31) Whenever a new class(es) are encountered, the training resume learning the new class/classes by retaining the existing knowledge. The algorithm also supports recalibration with multiple new classes introduced simultaneously and sequentially. Also, the new classes can be introduced at any instant of time and any number of times to the network. The algorithm of the progressive learning technique (PLT) is summarized in Fig. 1. 4 EXPERIMENTATIO N Proposed progressive learning algorithm exhibit “dynamic” learning of new class of data. Current multiclass classification algorithms fails to adapt when encountered with new class and hence the accuracy drops when introduced with one or more new classes. The proposed algorithm redesigns itself to adapt to new classifications and still retaining the knowledge learnt thus far. The proposed progressive learning algorithm is tested with several real world and standard datasets. The standard datasets are in general uniformly distributed. But to test the performance of progressive learning effectively, it should be presented with conditions where new classes are introduced in a non – uniform manner at different time instants. Hence the standard datasets cannot be used directly to test the progressive learning algorithm efficiently. The datasets should be in such a way that only a subset of classes is available for training initially and new classes should be introduced at arbitrary time instances during the latter part of training. Thus, some of the standard datasets are modified and used for testing the proposed algorithm. By default, classification problems involve two classes: 1. Presence of class and 2. Absence of class. These are the two trivial classes that are available in any of the classification problem. Since the minimum number of classes in a classification is two, learning of new classes is absent in bivariate datasets. For binary classification datasets, since there are only two classes and no new classes are introduced, the proposed algorithm performs similar to the existing online sequential algorithm. The unique feature of progressive learning is clearly evident only in multiclass classification. Thus the proposed algorithm is tested with multiclass classification datasets such as iris, balance scale, waveform, wine, satellite image, digit and character datasets. The specifications of the datasets are shown in TABLE 1. The proposed technique is experimented with both balanced and unbalanced datasets. Balanced dataset is one in which each of the class has equal or almost equal number of training data. Unbalanced dataset is a skewed dataset where a subset of classes has a high number of training samples and other classes have fewer training samples. The number of hidden layer neurons for the experimentation is chosen such that the overfitting problem is mitigated. The test dataset consists data samples corresponding to all the class labels used for prog ressive learning of the network. 9 Algorithm : Progressive Learning Technique for Multi-class Classification 1. The parameters of the network are initialized 2. The raw input data is processed for classification 3. ELM Training – Initial phase Processing of initial block of data M0 = (H0 TH0 )-1 β0 = M0 H0 TY0 4. ELM Training – Sequential phase Case 1: No new classes are introduced: 𝑴𝒌+𝟏 = 𝑴𝒌 − 𝑴𝒌 𝒉𝒌+𝟏 𝒉𝑻𝒌+𝟏 𝑴𝒌 𝟏 + 𝒉𝑻𝒌+𝟏 𝑴𝒌 𝒉𝒌+𝟏 𝜷𝒌+𝟏 = 𝜷𝒌 + 𝑴𝒌+𝟏 𝒉𝒌+𝟏 (𝒀𝑻𝒌+𝟏 − 𝒉𝑻𝒌+𝟏 𝜷𝒌 ) Case 2: ‘c’ new classes are introduced: (𝜷𝑘 )𝑁′ 𝑋(𝑚+𝑐 ) = [ ( 𝜷𝑘 ) 𝑁′ 𝑋𝑚 (∆𝜷𝑘 ) 𝑁′𝑋𝑐 ] −1 (∆𝜷𝑘 )𝑁′𝑋𝑐 = ( 𝑴𝑘 ) 𝑁′𝑋𝑁′ (𝒉𝑻𝒌 ) [ ⋮ 𝑁′𝑋𝑏 −1 𝑴𝒌+𝟏 = 𝑴𝒌 − ⋯ −1 ⋱ ⋮ ] ⋯ −1 𝑏𝑋𝑐 𝑴𝒌 𝒉𝒌+𝟏 𝒉𝑻𝒌+𝟏 𝑴𝒌 𝟏 + 𝒉𝑻𝒌+𝟏 𝑴𝒌 𝒉𝒌+𝟏 𝜷𝒌+𝟏 = 𝜷𝒌 + 𝑴𝒌+𝟏 𝒉𝒌+𝟏 (𝒀𝑻𝒌+𝟏 − 𝒉𝑻𝒌+𝟏 𝜷𝒌 ) 5. ELM Testing Estimation of raw output values using Y = Hβ Class corresponding to the index of maximu m value of Yi is the predicted target class Fig. 1. Algorithm of Progressive Learning Technique The proposed algorithm also works for introduction of multiple new classes. The number of classes can be increased from 2 to 3, and then from 3 to 4 and 4 to 5 and so on. For testing multiple new classes, the proposed method is tested with character recognition dataset which is described in the latter part of this section. The introduction of multiple classes both sequentially and simultaneously at multiple time instances are experimented and verified. 5 RESULTS AND DISCUSSIONS The functionality of the technique, consistency and complexity are the three key features to be tested for any new technique. The functional testing is used to validate that the proposed algorithm is functional and results in its expected behavior. The functionality of the technique is tested using iris, waveform and balance-scale datasets. The operational working of the concept of progressive learning in the proposed algorithm is tested in the functionality test. Consistency 10 is another key feature that is essential for any new technique. The proposed algorithm should provide consistent results for multiple trials with minimal variance. Being an ELM based algorithm, the consistency of the proposed method across several trials of same dataset and also the consistency across 10-fold cross validation are tested. Complexity analysis is essential for a new technique. The number of operations performed and calculations involved in the proposed method is computed and is compared against the existing me thod. Also the performance of the proposed algorithm is evaluated by introducing new classes at different time instances (1. Very early during training, 2. In the middle of training and 3. Towards the end of training) are evaluated. Both sequential and simultaneous introduction of new classes are experimented and results are analyzed and discussed. T ABLE I SP ECIFICATIONS OF MULTICLASS CLASSIFICATION DATASETS Dataset Number of classes Number of features/attributes Remarks Iris dataset 3 4 Basic benchmark dataset Balance scale dataset 3 4 Benchmark dataset for unbalanced data Waveform dataset 3 21 Basic benchmark dataset Wine dataset 3 13 Basic benchmark dataset Satellite image dataset 6 36 Basic benchmark dataset Digit dataset 10 64 Basic benchmark dataset Character dataset 1 4 17 Dataset for sequential introduction of two new classes Character dataset 2 5 17 Dataset for sequential introduction of three new classes Character dataset 3 5 17 Dataset for simultaneous introduction of new classes 5.1 Functionality The proposed technique is experimented with iris, waveform and balance scale datasets to verify the basic intended functionality of the technique. The iris dataset consists of three classes which are uniformly distributed over the 150 instances. To facilitate testing of progressive learning, the dataset is redistributed such that first 50 samples consists of only two classes (sentosa, versicolor) and the third class (virginica) is introduced only after the 51st sample. This type of redistribution closely emulates the real time scenario of encountering a new class on the run. The ability of the proposed algorithm to recognize, adapt and learn the new class can be verified by this testing. The distribution details of the dataset used is given in TABLE 2. 11 T ABLE 2 SP ECIFICATIONS OF I RIS DATASET Data range Number of classes 1–50 New class added 2 Point of introduction of new class - - Class labels Sentosa Versicolor 50–150 3 1 51 Sentosa Versicolor Virginica IRIS Dataset 1 Testing Accuracy (* 100%) 0.95 0.9 0.85 0.8 0.75 0.7 0.65 20 40 60 80 100 Samples 120 140 160 Fig. 2. T esting Accuracy in Iris Dataset The Progressive Learning algorithm is tested with the specified iris dataset and the learning curve or the testing accuracy graph is plotted. The result obtained is shown in Fig. 2. The testing accuracy is continuously calculated with the test data set for every new training data. It can be seen from the graph that until the sample index 50, the testing accuracy is only 66.6 %. This implies that the system has learnt only two of the three classes thus far. When the third new class is introduced in the 51st sample, the system recognizes the introduction of a new class and recalibrates itself by sufficiently increasing the number of neurons in the output layer. The weight matrix is suitably increased in dimension and the weights are updated based on the special recalibration technique proposed. A new network structure and weight parameters are formed from the current network parameters and the data obtained from the new class. In the forthcoming iterations, the system then trains for recognition of the new class in addition to previously learnt classes and reaches a steady state testing accuracy. This process results in the sudden rise in the testing accuracy of the network, which then settles at a final testing accuracy value. This sudden increase in the testing accuracy is due to the fact that the network can now recognize the newly encountered class of data. The same procedure is repeated for waveform and balance scale dataset. The dataset specifications of the waveform and balance scale dataset are shown in TABLE 3-4. The result obtained by the progressive learning method is shown in Fig. 3-4 respectively. 12 T ABLE 3 SP ECIFICATIONS OF W AVEFORM DATASET Data range Number of classes 1–1500 New class added 2 Point of introduction of new class - - Class labels Waveform 1 Waveform 2 1501–3000 3 1 1501 Waveform 1 Waveform 2 Waveform 3 Waveform Dataset 0.85 Testing Accuracy (* 100%) 0.8 0.75 0.7 0.65 1000 1500 2000 Samples 2500 3000 Fig. 3. T esting Accuracy of Waveform Dataset T ABLE 4 SP ECIFICATIONS OF BALANCE SCALE DATASET Data range 1–350 Number of classes 2 New class added - Point of introduction of new class - Class labels Left Right 351–1100 3 1 351 Left Right Balanced 13 Balance Dataset 1 Testing Accuracy (* 100%) 0.9 0.8 0.7 0.6 0.5 0.4 0 200 400 600 Samples 800 1000 1200 Fig. 4. T esting Accuracy of Balance dataset From the test results, the expected behavior of the progressive learning method is verified. The result shows that the algorithm is able to learn new classes dynamically on the run and the learning of new class does not significantly affect the accuracy of the classes previously learnt. The consistency and performance of the proposed method is evaluated using six benchmark datasets. 5.2 Consistency Consistency is a critical characteristic to be tested for any new technique. The proposed technique is verified for its consistency in its results. Consistency is a key virtue that any technique should exhibit. The learning technique which provides inconsistent results is not reliable for practical applications. Being an ELM based technique, the input weights and the hidden layer bias values are initialized at random. Hence multiple executions of the same dataset and same specification results in different results. Therefore, the same dataset with same specification is executed multiple times to determine the consistency across multiple executions. The consistency results of repeated multiple execution s of the three datasets are shown in TABLE 5. T ABLE 5 CONSISTENCY: ACROSS MULTIPLE TRIALS (10 TRIALS) Testing Accuracy (%) Iris Dataset 99.4 ± 0.9660 Waveform Dataset 83.9 ± 1.2589 Balance Scale Dataset 91.6 ± 1.0557 Wine Dataset 97.9 ± 0.9285 Satellite Image Dataset 89.6 ± 1.1640 Digit Dataset 97.1 ± 0.7854 Cross validation is the most common method to evaluate the consistency of any given technique. The proposed algorithm is tested with each of the datasets for 5-fold cross validation (5-fcv) and 10-fold cross validation (10-fcv ) and the resulting testing accuracy is tabulated. TABLE 6 gives the consistency of the proposed algorithm for cross 14 validation performance. It can be seen from the table that the proposed algorithm is consistently accurate in each of the attempts. The deviation of the testing accuracy is in order of about 1 % from the mean value which is nominal. Thus, the results show that the proposed method gives consistent and reliable testing accuracy for both balanced and unbalanced datasets. T ABLE 6 CONSISTENCY: 5-FOLD CROSS VALIDATION AND 10-FOLD CROSS VALIDATION 5-fcv 10-fcv Iris Dataset 99 ± 1.0954 99.4 ± 1.0544 Waveform Dataset 84.1 ± 1.2589 83.6 ± 1.3658 Balance Scale Dataset 91.8 ± 1.0557 91.2 ± 1.3847 Wine Dataset 97.5 ± 1.5376 97.9 ± 1.4625 Satellite Image Dataset 89.4 ± 1.4618 89.8 ± 1.5537 Digit Dataset 97.2 ± 1.0441 96.9 ± 1.0683 5.3 Computational Reduction The number of computations required for the proposed progressive learning technique is analyzed and compared with the existing OS-ELM method. Though learning of new classes dynamically on the run causes overhead to the computations and seemingly increases the complexity of the technique, the actual computational complexity of the proposed technique is lesser than the OS-ELM method. The decrease in complexity is due to two reasons. 1. The overhead computations responsible for increasing the number of output neurons, creating new interconnections and recalibration of weights occur only during the samples when a new class is introduced. Thus , the recalibration routine is invoked only when there is a new class , henceforth causing minimal increase in the computation complexity. For example, when only one new class is introduced, the recalibration procedure is invoked only once. 2. The progressive learning method also provides another distinct advantage. Since the new classes are learnt dynamically, it results in lesser number of weight calculations when compared with other static online sequential training techniques like OS-ELM. For example, in the iris dataset considered, the traditional algorithm needs to update the weight for all three output neurons for the entire 150 instances of the training set. But in the proposed method, there are only two output neurons till the occurrence of the third class. The third output neuron is introduced only during the recalibration stage triggered by the introduction of a new class. Thus, the number of weight calculations is effectively reduced. This effectively reduces the number of computations performed and thereby reducing the computat ional complexity. The reduction in number of weight calculations is shown in TABLE 7. The number of computations in the OS-ELM is normalized to 100 and the computational complexity of OS-ELM and the progressive learning method are compared in Fig. 5. 15 100 Number of Computations Normalized to 100 90 80 70 60 50 40 30 20 10 0 Iris Waveform OS-ELM Balance Scale Wine Satellite Image Digit Progressive Learning Fig. 5. Comparison of Computational Reduction T ABLE 7 REDUCTION IN NUMBER OF CALCULATIONS BY THE PROPOSED METHOD No. of weight calculations in OSELM ( *nHidden) Point of introduction of new class No. of weight calculations in proposed method (* nHidden) % of calculations saved Iris dataset 150 * 3 51 (50 * 2) + (100 * 3) 11.11 % Waveform dataset 3000 * 3 1501 (1500 * 2) + (1500 * 3) 16.67 % Balance scale dataset 1100 * 3 351 (350 * 2) + (750*3) 10.61 % Wine dataset 120*3 71 (70 * 2) + (50 * 3) 19.44 % Satellite image dataset 4500 * 6 3001 (3000 * 5) + (1500 * 6) 11.11% Digit dataset 4000 * 10 3001 (3000 * 9) + (1000 * 10) 7.5 % Though the new classes are learnt only from halfway through the datasets, the testing accuracy of the algorithm is nearly maintained or even improved when compared to algorithms with a static number of classes. The reason for the change in accuracy is due to the fact that new classes are learnt on the run after the learning of previous classes. If the previously learnt classes and the new class are fairly distinctive the learning accuracy will be improved. On other hand, in some cases due to the feature set of the learnt class and new class, the learning of the new class will affect the existing knowledge but only to a little extent thereby marginally reducing the overall accuracy. The testing accuracy of the proposed algorithm is compared with the existing OS-ELM and its variants such as voting based OS-ELM (VOS-ELM ), enhanced OS-ELM (EOS-ELM), robust OS-ELM (ROS-ELM ), robust bayesian ELM (RB-ELM) and generalized pruning ELM (GP-ELM ) and is tabulated as shown in TABLE 8. It can be seen from the table that despite learning the new classes dynamically at a later stage of training, the testing accuracy is either improved or maintained nearly equal to the testing accuracy of the OS-ELM based methods. But the proposed method provides two key advantages over the existing methods. 16 1. Reduction in computational complexity. 2. Flexibility to learn new classes at any instant of time. From the results obtained thus far, it is evident that the proposed progressive learning algorithm learns new class of data in a dynamic way. T ABLE 8 COMP ARISON OF TESTING ACCURACY (%) OS-ELM VOS-ELM EOS-ELM ROS-ELM RB-ELM GP-ELM Proposed method IRIS dataset 98 99.2 100 100 100 100 100 Waveform dataset 84.2 84.8 84.6 85.1 84.3 84.7 83.9 Balance scale dataset 90.7 91.1 90.8 91.4 90.9 91.3 91.6 Wine dataset 97.2 97.5 97.4 98.0 97.1 97.6 97.9 Satellite image dataset 88.9 89.2 89.0 89.1 89.5 89.8 89.6 Digit dataset 96.6 96.8 96.5 96.9 97.1 97.3 97.1 5.4 Introduction of New Class at Different Time Instants The new class is introduced at different stages of the training period and its effect on learning rate is analyzed. In order to analyze the response, three different test cases are experimented and performance is measured. The new class is introduced at three different time instances. 1. Very early during training, 2. In the middle of training, 3. Towards the end of training. The testing accuracy curve in each of the test case is plotted and the results are evaluated and compared. The point of introduction of a new class for each of the test case is tabulated and is given in TABLE 9. The performance of the proposed network for each of the test cases is given in Fig . 6. It can be seen from the figure that, independent of the point of introduction of a new class to the system, the network is capable of learning the new class and the final steady state testing accuracy is the same across the test cases. T ABLE 9 P OINT OF INTRODUCTION OF NEW CLASS Test cases Point of introduction of new class (Total number of samples = 150) Very Early 6 In the Middle 71 Towards the End 131 17 Fig. 6: Introduction of new class in training (a) Very early, (b) In the middle and (c) Towards the end 5.5 Multiple New Classes The performance of the proposed technique when introduced with multiple new classes both sequentially and simultaneously is discussed in this section. Learning of multiple new classes by the proposed algorithm is tested by using the Character recognition dataset. Several combinations of tests are made such as 1. Sequential introduction of 2 new classes (4 classes) 2. Sequential introduction of 3 new classes (5 classes) 3. Simultaneous introduction of 2 new classes along with one new class sequentially (5 classes) The performance of the proposed algorithm on each of the test case is observed. 5.5.1 Sequential Introduction of 2 new classes Character dataset with 4 classes (A, B, C and D) is used to test the sequential introduction of two new classes in the proposed algorithm. The dataset is redistributed to meet the testing requirements for progressive learning. The specifications of the dataset are given in TABLE 10. 18 T ABLE 10 SP ECIFICATIONS OF CHARACTER DATASET FOR 2 NEW CLASSES Data range Number of classes New class added Class labels 1 – 800 2 - A and B 801 – 1600 3 C A, B and C 1601 – 3096 4 D A,B,C and D Initially the network is sequentially trained with only two classes A and B up to 800 samples. A new class ‘C’ is introduced to the training data in the 801st sample and a fourth class ‘D’ is introduced as 1601st sample. The proposed algorithm identifies both the new classes and recalibrates itself each time and continues learning. This results in two sudden rise in the learning curve of the network. The first rise corresponding occurring at 801st sample corresponds to the learning of class ‘C’ and the second rise occurring at 1601st sample corresponds to learning of class ‘D’. The learning curve graph is shown in Fig. 7. Characters A,B,C and D 1 0.9 Testing Accuracy (* 100%) 0.8 0.7 0.6 0.5 0.4 0.3 0.2 500 1000 1500 2000 Samples 2500 3000 3500 Fig. 7. Sequential learning of two new classes 5.5.2 Sequential introduction of 3 new classes Character dataset with 5 classes (A, B, C, D and E) is used for testing sequential introduction of 3 new classes. The network is initially trained to recognize only two classes. Three new classes (C, D and E) are introduced one after another after the initial training of two classes. The specifications of the dataset are shown in TABLE 11. T ABLE 11 SP ECIFICATIONS OF CHARACTER DATASET FOR THREE NEW CLASSES Data range Number of classes New class added Class labels 1 – 800 2 - A and B 801 – 1600 3 C A, B and C 1601 – 2000 4 D A,B,C and D 2001 – 3850 5 E A,B,C,D and E 19 Each of the new classes is introduced sequentially at later time instants and the algorithm adapts to new class each time and also maintains the testing accuracy at the same level. The testing accuracy curve is shown in Fig. 8. To verify that learning of each new class is independent of previously learnt classes, the overall testing accuracy is broken down into individual testing accuracy of each of the classes and is shown in Fig. 9. It can be seen that, the testing accuracy of each of the classes remains over 90%. Also , whenever a new class is introduced, a new learning curve is formed which contributes towards the overall accuracy along with the existing classes. The network is initially trained with two classes A and B. Third class C is introduced after 800 samples and the learning curve of the class C is shown in black line. Another new class ‘D’ who’s testing accuracy as shown in red is introduced after the 1600 sample. A fifth class, ‘E’ is introduced in the 2001st sample and its learning curve is shown in light blue. From the graph it can be seen that each class introduced is learnt anew without affecting much the existing knowledge. The learning accuracy of each of the classes is collectively responsible for the overall accuracy of the network. Further, it can be seen that the testing accuracy of each of the classes is over 90% and the overall accuracy of 94% is achieved. Characters A,B,C,D and E 1 0.9 Testing Accuracy (* 100%) 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 500 1000 1500 2000 2500 Samples 3000 3500 4000 Fig. 8. Sequential learning of three new classes Fig. 9: Individual and Overall Testing Accuracy – Sequential Introduction 20 The testing accuracy obtained by introducing one, two and three new classes is summarized in TABLE 12. From the table it can be observed that learning of multiple new classes does not affect the testing accuracy of previously learnt class. Hence this method can be used to learn a large number of multiple new classes in a progressive manner without affecting the testing accuracy of previously learnt classes. T ABLE 12 SUMMARY OF TESTING ACCURACY FOR SEQUENTIAL INTRODUCTION OF MULTIPLE NEW CLASSES Number of classes introduced sequentially Testing Accuracy Two base class + One new class 93.8 % Two base class + Two new classes 93.7 % Two base class + Three new classes 94 5.5.3 Simultaneous introduction of new classes To verify that the proposed algorithm performs effectively when multiple classes are introduced simultaneously (introduced in the same block), character dataset with specifications as shown in TABLE 13 is used. Here, the two classes C and D are introduced together and the new class E at a later stage. The testing accuracy is shown in Fig. 10. T ABLE 13 SP ECIFICATIONS OF CHARACTER DATASET FOR SIMULTANEOUS NEW CLASSES Data range Number of classes New class added Class labels 1 – 800 2 - A and B 801 – 2000 4 C,D A, B, C and D 2001 – 3850 5 E A,B,C,D and E The first rise observed at the sample instant of 800 in the testing accuracy curve corresponds to the introduction of two new classes (characters C and D). The algorithm identifies both the new classes and recalibrates to facilitate multiple class addition. The second rise in the curve corresponds to the introduction of the third class (character E). In order to show that the previous knowledge is retained and new knowledge is added along with the existing, the testing accuracy is split up for each of the five alphabets and is shown in Fig. 11. It can be seen that, two new learning curves corresponding to each new class C and D is introduced in the 800th sample. Both of the newly introduced classes are learnt simultaneously along with the existing classes A and B. The learning curve at 1600th sample index corresponds to the introduction of class E. Also, from the graph it is clear that the learning of additional classes does not significantly affect the testing accuracy of the classes previously learnt. Thus, enabling the proposed algorithm to learn multiple new classes both sequentially and simultaneously in a progressive manner. 21 Characters A,B,C,D and E 1 0.9 Testing Accuracy (* 100%) 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 500 1000 1500 2000 2500 Samples 3000 3500 4000 Fig. 10. T esting Accuracy for Simultaneous new classes Fig. 11. Individual and Overall Testing Accuracy for Simultaneous New Classes The proposed algorithm introduces new neurons in the output layer and recalibrates the network by itself to facilitat e learning of new classes. Since only the output layer neurons are increased and the number of hidden layer n eurons is the same, the learning of new classes that can be progressively learnt is limited by the number of classes that can be learnt by the given number of hidden layer neurons. Further, the proposed algorithm can be extended such that both the output neurons and hidden layer neurons are increased such that any number of new classes can be learnt progressively. 6. CO NCLUSIONS In this paper, a novel learning technique of progressive learning for multi-class classification is developed. Progressive learning enables the network to learn multiple new classes dynamically on the run. The new classes can be learnt in both sequential and simultaneous manner. Hence this technique is much suited for applications where the number of classes to be learned is unknown. Progressive learning enables the network to recalibrate and adapt when encountered 22 with a new class of data. The proposed progressive learning technique will perform effectively in applications such as cognitive robotics where the system is trained by real time experienced based data. ACKNO WLEDGMENT The first author would like to thank Nanyang Technological University, Singapore for the NTU Research Student Scholarship. REFERENCES [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] D. E. Rumelhart, G. E. Hinton, R. J. Williams, “Learning Representations by Back-propagating Errors”, Nature, vol. 323, no. 9, pp. 533-536, 1986. M. T . Hagan, M. B. Menhaj, “Training Feedforward Networks with the Marquardt Algorithm”, IEEE Trans. on Neural Networks, vol. 5, no. 6, pp. 989-993, 1994. B. M. Wilamowski, H. Yu, “Neural Network Learning without Backpropagation”, IEEE Trans. on Neural Networks, vol. 21. No. 11, pp. 1793-1803, 2010. S. Chen, C. Cowan, P. Grant, “Orthogonal Least Squares Learning Algorithm for Radial Basis Function Networks”, IEEE Trans. on Neural Networks, vol. 2, no. 2, pp. 302-309, 1991. K. Li, J. X. Peng, G. W. Irwin, “A Fast Nonlinear Model Identification Method”, IEEE Trans. on Automatic Control, vol. 50, no. 8, pp. 12111216, 2005. J. Branke, “Evolutionary Algorithms for Neural Network Design and T raining”, Proc. Of first Nordic workshop on genetic algorithms and its applications, 1995. X. Yao, “ A Review of Evolutionary Artificial Neural Networks”, International Journal of Intelligent Systems, vol. 8, no. 4, pp. 539-567, 1993. B. Li, J. Wang, Y. Li, Y. Song, "An Improved On-Line Sequential Learning Algorithm for Extreme Learning Machine", Advances in Neural Networks – ISNN 2007, vol. 4491, pp. 1087-1093, 2007. G. B. Huang, Q. Y. Zhu, and C. K. Siew, "Extreme Learning Machine: Theory and applications", Neurocomputing, vol. 70, pp. 489-501, 2006. D. E. Rumelhart, G. E. Hinton, R. J. Williams, "Learning Internal Representations by Error Propagation", No. ICS-8506, California University San Diego La Jolla Inst. for Cognitive Science, 1985. S. Ferrari, R. F. Stengel, "Smooth Function Approximation Using Neural Networks", IEEE Transactions on Neural Networks, vol. 16, pp. 24-38, 2005. G. B. Huang, Y. Q. Chen, H. A. Babri, "Classification Ability of Single Hidden Layer Feedforward Neural Networks", IEEE Transactions on Neural Networks, vol. 11, pp. 799-801, 2000. G. B. Huang, D. H. Wang, Y. Lan, "Extreme Learning Machines: A Survey", International Journal of Machine Learning and Cybernetics, vol. 2, pp. 107-122, 2011. N. Wang, M. J. Er, M. Han, “Generalized Single-hidden Layer Feedforward Networks for Regression Problems”, IEEE Transactions on Neural Networks and Learning Systems, vol. 26, no. 6, pp. 1161-1176, 2015. N. Y. Liang, G. B. Huang, P. Saratchandran, N. Sundararajan, "A Fast and Accurate Online Sequential Learning Algorithm for Feedforward Networks", IEEE Transactions on Neural Networks, vol. 17, pp. 1411-1423, 2006. G. B. Huang, Q. Y. Zhu, C. K. Siew, "Extreme Learning Machine: A New Learning Scheme of Feedforward Neural Networks", Proceedings of International Joint Conference on Neural Networks, vol. 2, pp. 985-990, 2004. G. B. Huang, L. Chen, C. K. Siew, "Universal Approximation Using Incremental Constructive Feedforward Networks with Random Hidden Nodes", IEEE Transactions on Neural Networks, vol. 17, pp. 879-892, 2006. G. B. Huang, L. Chen, “Convex Incremental Extreme Learning Machine”, Neurocomputing, vol. 70, no. 16, pp. 3056-3062, 2007. G. B. Huang, L. Chen, “Enhanced Random Search based Incremental Extreme Learning Machine”, Neurocomputing, vol. 71, no. 16, pp. 3460-3468, 2008. Y. Wang, F. Cao, Y. Yuan, "A Study on Effectiveness of Extreme Learning Machine", Neurocomputing, vol. 74, pp. 2483-2490, 2011. G. B. Huang, H. Zhou, X. Ding, R. Zhang, “Extreme Learning Machine for Regression and Multiclass Classification”, IEEE Trans. on Systems, Man and Cybernetics, Part B: Cybernetics, vol. 42, no. 2, pp. 513-529, 2012. Q. Y. Zhu, A. K. Qin, P. N. Suganthan, G. B. Huang, "Evolutionary Extreme Learning Machine", Pattern Recognition, vol. 38, pp. 17591763, 2005. M. B. Li, G. B. Huang, P. Saratchandran, N. Sundararajan, "Fully Complex Extreme Learning Machine", Neurocomputing, vol.68, pp.306314, 2005. N. Wang, M. J. Er, M. Han, “Parsimonious Extreme Learning Machine Using Recursive Orthogonal Least Squares”, IEEE Transactions on Neural Networks and Learning Systems, vol. 25, no. 10, pp. 1828-1841, 2014. G. B. Huang, P. Saratchandran, N. Sundararajan, "An Efficient Sequential Learning Algorithm for Growing and Pruning RBF (GAP-RBF) Networks", IEEE Transactions on Systems, Man, and Cybernetics, Part B: vol. 34, pp. 2284-2292, 2004. G. B. Huang, P. Saratchandran, N. Sundararajan, "A Generalized Growing and Pruning RBF (GGAP -RBF) Neural Network for Function Approximation", IEEE Transactions on Neural Networks, vol. 16, pp. 57-67, 2005. 23 [27] N. Wang, J. C. Sun, M. J. Er, Y. C. Liu, “Hybrid Recursive Least Squares Algorithm for Online Sequential Identification Using Data Chunks”, Neurocomputing, vol. 174, pp. 651-660, 2016. [28] N. Wang, M. Han, N. Dong, M. J. Er, “Constructive Multi-output Extreme Learning Machine with Application to Large Tanker Motion Dynamics Identification”, Neurocomputing, vol. 128, pp. 59-72, 2014. [29] H. J. Rong, G. B. Huang, N. Sundararajan, P. Saratchandran, "Online Sequential Fuzzy Extreme Learning Machine for Function Approximation and Classification Problems", IEEE Transactions on Systems, Man, and Cybernetics, Part B: vol. 39, pp. 1067-1072, 2009. [30] G. B. Huang, N. Y. Liang, H. J. Rong, P. Saratchandran, N. Sundararajan, "On-Line Sequential Extreme Learning Machine", Computational Intelligence, vol. 2005, pp. 232-237, 2005. [31] G. Huang, G. B. Huang, S. Song, K. You, “T rends in Extreme Learning Machines: A Review”, Neural Networks, vol. 61, pp. 32-48, 2015. [32] M. R. Daliri, “A Hybrid Automatic System for the Diagnosis of Lung Cancer Based on Genetic Algorithm and Fuzzy Extreme Learning Machines”, Journal of Medical Systems, vol. 36, no. 2, pp. 1001-1005, 2012. [33] W. B. Zhang, H. B. Ji, “Fuzzy Extreme Learning Machine for Classification”, Electronics Letters, vol. 49, no. 7, pp. 448-449, 2013. [34] E. Avci, R. Coteli, “A New Automatic Target Recognition System based on Wavelet Extreme Learning Machine”, Expert Systems with Applications, vol. 39, no. 16, pp. 12340-12348, 2012. [35] V. Malathi, N. S. Marimuthu, S. Baskar, K. Ramar, “Application of Extreme Learning Machine for Series Compensated T ransmission Line Protection”, Engineering Applications of Artificial Intelligence, vol. 24, no. 5, pp. 880-887, 2011. [36] B. Freney, M. Verleysen, “Parameter-insensitive Kernel in Extreme Learning for Non-linear Support Vector Regression”, Neurocomputing, vol. 74, no. 16, pp. 2526-2531, 2011. [37] W. W. Zong, G. B. Huang, Y. Q. Chen, “Weighted Extreme learning Machine for Imbalance Learning”, Neurocomputing, vol. 101, pp. 229242, 2013. [38] Z. H. Man, K. Lee, D. H. Wang, Z. W. Cao, C. Y. Miao, “A New Robust Training Algorithm for a Class of Single Hidden Layer feedforward neural networks”, Neurocomputing, vol. 74, no. 16, pp. 2491-2501, 2011. [39] J. W. Cao, Z. P. Lin, G. B. Huang, N. Liu, “Voting based Extreme Learning Machine”, Information Sciences, vol 185, no. 1, pp. 66-77, 2012. [40] Z. H. You, Y. K. Lei, L. Zhu, J. F. Xia, B. Wang, “Prediction of Protein-protein Interactions from Amino Acid Sequences with Ensemble Extreme Learning Machines and Principal Component Analysis”, BMC Bioinformatics, 14, 2013. [41] J. H. Zhai, H. Y. Xu, X. Z. Wang, “Dynamic Ensemble Extreme Learning Machine based on Sample E ntropy”, Soft Computing, vol. 16, no. 9, pp. 1493-1502, 2012. [42] Jarvis, Peter. “Towards a Comprehensive Theory of Human Learning”, Vol. 1, Psychology Press, 2006. [43] Z. Zhao, Z. Chen, Y. Chen, S. Wang, H. Wang, “A Class Incremental Extreme learning machine for activity recognition”, Cognitive Computation, vol. 6 no. 3, pp. 423-431, 2014.
9cs.NE
Measure of combined effects of morphological parameters of inclusions within composite materials via stochastic homogenization to determine effective mechanical properties Vladimir Salnikov, Sophie Lemaitre, Daniel Choı̈, and Philippe Karamian-Surville Nicolas Oresme Mathematics Laboratory arXiv:1411.4037v2 [cs.CE] 9 Apr 2015 University of Caen Lower Normandy CS 14032, Bd. Maréchal Juin, BP 5186 14032, Caen Cedex, France Abstract In our previous papers we have described efficient and reliable methods of generation of representative volume elements (RVE) perfectly suitable for analysis of composite materials via stochastic homogenization. In this paper we profit from these methods to analyze the influence of the morphology on the effective mechanical properties of the samples. More precisely, we study the dependence of main mechanical characteristics of a composite medium on various parameters of the mixture of inclusions composed of spheres and cylinders. On top of that we introduce various imperfections to inclusions and observe the evolution of effective properties related to that. The main computational approach used throughout the work is the FFT-based homogenization technique, validated however by comparison with the direct finite elements method. We give details on the features of the method and the validation campaign as well. Keywords: Composite materials, Cylindrical and spherical reinforcements, Mechanical properties, Stochastic homogenization 1 I. INTRODUCTION / MOTIVATION In this paper we study the influence of morphological parameters of composite materials on their effective mechanical properties. The usage of composite materials for industrial applications motivated a huge amount of publications on the subject in recent years: they concern both experimental and modelling results. The reason for us to address the question is twofold as well: on the one hand we explore the existing modelling techniques, on the other hand we have in mind very concrete applications related to the project in the industry of aeronautics. The need in modelling for the analysis of composite materials as in most of the applied domains comes from the fact that experimental work is usually expensive and difficult to carry out. It is thus important to develop modelling approaches that are efficient, reliable and sufficiently flexible so that the outcome can be validated by an experiment. The strategy that we adopt here is related to the notions of stochastic homogenization. The key idea is to consider a sample of a composite material that is sufficiently large to capture its behavior and compute the macroscopic parameters: for mechanical properties it can be for example the Young modulus, the Poisson ratio or eventually the whole stiffness tensor. To take into account possible imperfections or random factors one can average the result for a series of tests representing the same macro characteristics. The usual technology for this is to generate a series of samples (representative volume elements) randomly, controlling though their parameters, perform the computation for each of them and average the result. It is now generally accepted that the main characteristic affecting the effective properties of a composite material is its morphology, i.e. the combination of geometric characteristics of the inclusions and their distribution in the supporting matrix. To analyze the phenomenon one needs thus a tool to generate RVEs capturing various morphological parameters. We have developed and implemented such a tool: in [1] we described the algorithms to produce the RVEs containing spheres (that represent globular inclusions) and cylinders (that are responsible for fiber-type reinforcements). We are able to reach the volume fraction of inclusions up to relatively high values of 50%–60%, and in addition we can control the geometric configuration of a sample as a whole, namely manage the intersections of inclusions and eventually their distribution. Moreover in [2] we have extended the method to introduce irregularities to the shape of inclusions. In this paper we describe the results 2 of computations carried out with the generated samples via an FFT-based homogenization technique ([3, 4]). For the presentation here we have chosen the results that can be useful for applications and/or those where the trends are not intuitively obvious, in particular we explore the influence of redistribution of the volume fraction between globular and fiber-type reinforcements, as well as the effects of imperfections. The paper is organized as follows. In the next section we briefly recall the RVE generation methods proposed in [1] and extended in our further works. In its second part we give details about the main computational method which is used throughout the work: the FFT-based homogenization technique coupled with stochastic methods of RVE generation. We describe its convenience and limitations as well as present the results of the validation campaign, i.e. compare it with the direct finite elements method. The section III is the description of the results of analysis (via the above mentioned methods) of effective properties of composites depending on the morphological parameters of the inclusions. We conclude by describing eventual industrial applications, some work in progress and expected results of it. II. SAMPLE GENERATION AND COMPUTATIONAL TECHNIQUES As we have outlined in the introduction, this section is devoted to a brief description of the methods that we have used to perform computations and the reasons to choose these concrete methods. A. RVE generation The generation of samples for computation is an important step in the process of modelling of the behavior of composite materials. Since the morphology of composites may be quite complex this can be a very challenging task. On the one hand it is important to be able to approximate rather involved geometries, on the other hand the method should be fast and reliable; in the ideal case the stage of generation should be much shorter than the computation itself. There has been a number of works where the inclusions were represented by simple geometric objects like spheres or ellipsoids (see for example, [5–8]). If one considers more complicated geometry, the problem of managing the intersection of inclusions arises immediately. 3 Among the established approaches of dealing with it, one can mention two important families: random sequential adsorption (RSA) type algorithms and molecular dynamics (MD) based methods. The RSA ([9]) is based on sequential addition of inclusions verifying for each of them the intersection; the main idea of the MD ([10–12]) is to make the inclusions move, until they reach the desired configuration. Let us mention that the first method needs an efficient algorithm of verification of intersection between the geometric shapes, and the second one an algorithm of predicting the time to the intersection of moving objects, which exists for a very limited class of shapes and often amounts to a difficult minimization problem. In [1], we have described the classical RSA and a time-driven version of MD applied to the mixture of inclusions of spherical and cylindrical shapes. The key ingredient for both of the approaches was the explicit formulation of algebraic conditions of intersection of a cylinder with a sphere and of two cylinders. To be more specific, we recapitulate the ideas of these algorithms (Algorithms 1, 2). We have observed that the RSA approach is extremely efficient for relatively small volume fractions of inclusions (up to 30%), where it permits to generate a sample in fractions of a second. The MD-based method is powerful for higher volume fractions (of order 50 − 60%): it generates a configuration in about a second while the RSA can get stuck. An example of a sample with a mixture of non-intersecting spherical and cylindrical inclusions is presented on the figure 1. FIG. 1: 3D view of an RVE: spherical and cylindrical inclusions, periodic boundary conditions. 4 Algorithm 1 RSA generation procedure. Input: volume fractions, number of inclusions ncyl , nsp , aspect ratio. 1. Compute the parameters of cylinders and spheres 2. NumOfGenSpheres = 0, NumOfGenCylinders = 0 3. while (N umOf GenCylinders < ncyl ) (a) Generate a new cylinder (b) Using the algorithm ([1], Alg. 4) check if it overlaps with any cylinder generated before (c) if yes redo 3a (d) if no increase NumOfGenCylinders 4. while (N umOf GenSpheres < nsp ) (a) Generate a new sphere (b) Check if it overlaps with any sphere generated before (c) if yes redo 4a (d) Using the algorithm ([1], Alg. 1) check if it overlaps with any cylinder generated before (e) if yes redo 4a (f ) if no increase NumOfGenSpheres Algorithm 2 MD-based generation procedure. Input: volume fractions, number of inclusions ncyl , nsp , aspect ratio. 1. Compute the parameters of cylinders and spheres, fix the criterion ε to stop the simulation 2. Generate nsp spheres and ncyl cylinders, disregarding overlapping 3. while (OverlappingEnergy > ε) (a) Check overlapping ([1], Alg. 1, 4) (b) For each couple of overlapping inclusions compute the interaction force ([1], table 1) (c) Perform the integration step for the evolution equations ([1], Eq. 6) (d) Update the value of OverlappingEnergy 5 The outcome of these algorithms is a list of inclusions in the “vector” form, i.e. a list of coordinates of centers, radii, and eventually axes of symmetry of inclusions. This is perfectly suitable for various computational techniques: FFT-based homogenization procedures applied to the pixelized samples, as well as finite element computations on the mesh constructed from this pixelization. In addition ([2]) we are able to introduce various imperfections of the inclusions without spoiling the efficiency of the generation algorithm: the figure 2 shows two such examples, where the surface of an inclusion is waved or a part of an inclusion is taken out to produce irregular shapes. (a) Waved surface of an inclusion (b) Part of an inclusion taken out FIG. 2: Various imperfections of inclusions. B. FFT-based homogenization scheme Having an efficient scheme of generation of samples we can now proceed to the computation of effective mechanical properties. As we have mentioned in the introduction for evaluating these properties we have adopted the philosophy of stochastic homogenization. Schematically one can view the process as follows: 1. Fix the macroscopic parameters of the material (volume fraction and type of inclusions). 2. Generate a series of samples (RVEs) of a composite material with these parameters (stochastic part). 3. Perform accurate computation of effective properties on these RVEs (deterministic homogenization part). 6 4. Average the computed (macroscopic) characteristics of the samples. Let us now describe the mechanical model behind this computation as well as the main computational method – the homogenization procedure. Consider a representative volume element V , and denote u(x) the displacement field defined at any point x ∈ V . The system in mechanical equilibrium is described by the law σ(x) = ∂w(x) , ∂ε(x) where ε(x) = ε(u(x)) = 21 (∇u(x) + ∇u(x)T ) – the strain tensor in the model of small deformations, w(x) – the stored mechanical energy, and σ(x) – the stress tensor, subject to the condition div σ(x) = 0. In the linear case this law simplifies to ∂w(x) ∂ε(x) = c(x) : ε(x) with the stiffness tensor c(x). Notice that for a composite material the stiffness tensor does depend on the point x: the dependence is governed by microscopic geometry of the sample, namely which phase (matrix or inclusion) the point x belongs to. We suppose that the averaged strain < ε >= E is prescribed, and decompose ε(x) in two parts: ε(u(x)) = E + ε(ũ(x)), which is equivalent to representing u(x) = E.x + ũ(x), for ũ(x) being periodic on the boundary of V . Thus, the problem we are actually solving reads σ(x) = c(x) : (E + ε(ũ(x)), div σ(x) = 0, (1) ũ(x) periodic, σ(x).n antiperiodic. The solution of (1) is the tensor field σ(x), we are interested in its average in order to obtain the homogenized stiffness tensor chom from the equation < σ(x) >= chom :< ε(x) > . (2) To recover all the components of chom in 3-dimensional space one needs to perform the computation of < σ(x) > for six independent deformations E, which morally correspond to usual stretch and shear tests. There is a couple of natural approaches to solving the problem (1): one can construct a mesh of an RVE V and employ the finite elements method, or discretize (basically pixelize) the RVE to use the FFT-based homogenization scheme ([3, 4]). The major difficulty arising when applying the former method is that for rather involved geometry one needs to construct a fine mesh which is a non-trivial task in its own, and moreover to proceed with finite elements one requires considerable memory resources. The idea of the latter is that in the Fourier space the equations of (1) acquire a rather nice form for which in the case of a 7 homogeneous isotropic material one can construct a Green operator and basically produce an exact solution. For a composite material containing possibly several phases one introduces an artificial reference medium for which the Green operator is defined, the computation then is an iterative procedure to approximate the corrections of the microscopic behavior of the material in comparison to this reference medium. For the sake of completeness let us present this method here in details, following essentially the works [13, 14]. Introduce the reference medium stiffness tensor c0 and the correction to it δc(x) = c(x) − c0 . The equations (1) can equivalently be rewritten as σ(x) = c0 : ε(ũ(x)) + τ (x), div σ(x) = 0, (3) τ (x) = δc(x) : (ε(ũ(x)) + E) + c0 : E, ũ(x) periodic, σ(x).n antiperiodic. The tensor τ is called polarization. The periodicity assumptions permit to rewrite the first line of (3) in the Fourier space. Using the linearity of the Fourier transform and its property with respect to derivation, one obtains ˆ k (ξ) + τ̂mj (ξ), σ̂mj (ξ) = ic0mjkl ξl ũ iσ̂mj ξj = 0, (4) where •ˆ denotes the Fourier image of • and ξj ’s are the coordinates in the Fourier space. The key observation is that in the Fourier space there is a relation between the polarization and the deformation tensors, namely ˆε̃(ξ) = −Γ̂0 (ξ) : τ̂ (ξ). Γ0 is the Green operator, which for an isotropic reference medium with the Lamé coefficients λ0 , µ0 can be computed explicitly: Γ̂0klmj (ξ) = λ0 + µ0 ξj ξk ξl ξm δkm ξl ξj + δlm ξk ξj + δkj ξl ξm + δlj ξk ξm − 2 µ0 (λ0 + 2µ0 ) |ξ|4 4µ0 |ξ| Going back to the original variables, the initial problem (3) reduces to the periodic Lippmann–Schwinger integral equation ε(u(x)) = −Γ0 (δc : ε(u(x))) + E, This equation can be solved iteratively using the following algorithm. 8 Algorithm 3 FFT-based numerical scheme. Initialize ε0 (x) ≡ E, fix the convergence criterion acc. while (not converged) 1. Convergence test: if (comp < acc) compute σ(x) = c(x) : εn (x), σ̂(ξ) = F F T (σ), p eq = < kξσ̂(ξ)n k2 >/kσ̂(0)k if (eq < acc) → converged, stop 2. τ n (x) = (c(x) + c0 ) : εn (x) 3. τ̂ n (ξ) = F F T (τ n ) 4. ε̂ncomp (ξ) = Γ̂0 (ξ) : τ̂ n (ξ), ξ 6= 0; ε̂ncomp (0) = E 5. εncomp (x) = F F T −1 (ε̂ncomp ) q 6. comp = < kεn − εncomp k2 >/kEk 7. εn+1 (x) = εn (x) − 2(c(x) − c0 )−1 : c0 : (εncomp (x) − εn (x)) When the above algorithm converges we can compute < σ(x) > to be inserted into the equation (2). As we have mentioned above this computation has to be repeated for a complete set of independent global deformation fields. We have chosen this approach for its computational efficiency both in time and memory consumption, and also for its convenience in the applied problems, that we will discuss afterwards. There are however some details worth being commented on here. First, there are several versions of such FFT-based schemes: there is a possibility to use the initial variables σ and ε or formulate a dual problem the solution of which will produce the compliance tensor. One can produce a sort of mixture of the two, using polarization as the primary variable. The efficiency of these methods depends on the contrast between the characteristics of different phases. We have chosen to implement the direct accelerated scheme presented above, since there one has a theoretical result on the optimal values of parameters of the reference medium. According to the convergence theorem formulated in [14], for a two-phase composite with the Lamé coefficients of the constituent phases (λ1 , µ1 ) √ √ and (λ2 , µ2 ) respectively, one should choose λ0 = − λ1 λ2 , µ0 = − µ1 µ2 to compute c0 . 9 The optimality of this accelerated scheme is also coherent with recent results of [15]. Second, we have carried out a validation campaign by comparing the results of computations using the FFT-based process, several types of finite elements approaches, and analytical results where possible. We have constructed some test samples with simple geometries: a square bar with different orientations, a plane cutting the sample in two parts, etc. In addition to the FFT-based scheme for these samples we have computed the stiffness tensor using finite elements with the adapted mesh and with the mesh constructed from the pixelized sample. In both cases we used about 218 hexahedron elements : parallelepipeds for the adapted mesh constructed with Cast3M, and cubes corresponding to voxels for the mesh built from pixelized sample. The computation with adapted meshes gives results which are in good agreement with theoretical estimations, while with the mesh obtained from the pixelization there is a tendency of overestimating the parameters (when the inclusions are more rigid than the matrix). Although for the values of contrast between the matrix and the inclusions that interest us the difference can reach 1 − 2%, which is not of great importance for observing the trends. What is more interesting is that the FFT-based scheme produces the results where the parameters are often underestimated (up to 5%). The situation is certainly reversed when the inclusions are less rigid than the matrix. For computing mechanical properties of composite materials a simple way out is to increase the resolution of pixelization. For the tests that we describe in this paper the pixelization at around 200 × 200 × 200 already produces reasonable results. For each given sample like the one presented at figure 1 it is sufficient to make several tests at different resolutions for the same vector data and observe when the result stabilizes. Let us however note that if one is interested in thermal properties, where typically there are more than two phases with rather fine geometry, the problem can be much more complicated – we will suggest some more advanced techniques of adapting a sample to such computations elsewhere. Third, as mentioned the stochastic part of computations is due to averaging the results for several samples with the same macroscopic characteristics. This is the usual approach inspired by the Monte Carlo method. Since the pioneer work [16] of Metropolis and Ulam, there has been a great number of applications of this method for various problems in pure mathematics ([17]), physics ([18]), engineering ([12, 19–22]), science in general[25]. In the concrete context of homogenization and estimation of effective properties of composite materials a natural problem arises: having computed the average for a given sampling we need 10 to decide how far it is from the real average. The usual way to do it is to use Student’s distribution to compute the confidence intervals from the sampling mean value and the standard deviation (see for example [6]) for a precise algorithm. In our tests it was sufficient to make 10 − 20 runs to obtain acceptably small values of deviation, and 20 was needed not very often – mostly for high values of volume fraction of inclusions and significant contrast between the two materials. We do not depict the confidence intervals on the figures that follow not to overload the plots, we however verify for each of them that the trends that we exhibit are not due to statistical errors. III. MECHANICAL PROPERTIES OF COMPOSITES In this section we present the tendencies of the behaviour of composite materials for various morphological parameters, that we have obtained by making a series of tests using the algorithms described above. We start with simple tests, the aim of which is more to validate the methods in the sense that they produce expected results for simple tendencies. We continue with more involved analysis of influence of combinations of morphological parameters. With the algorithm of generation of RVEs we are able to control a number of parameters. As we have already mentioned we are working with spheres and cylinders that are supposed to represent respectively globular inclusions and microfiber reinforcements. For both types of inclusions we are able to assign the volume fraction in the generated sample: fsp and fcyl respectively. We can choose the number of inclusions for each type (nsp , ncyl ), and for cylinders we have an extra parameter of aspect ratio (the ratio between the length of a cylinder and its diameter). This already gives a lot of parameters, on top of that we will introduce the imperfections to inclusions – we will comment on them at the end of this section. The result certainly depends on the mechanical parameters of the matrix and the inclusions – we describe this concisely by fixing the value of contrast between the two media. The output is thus the normalized (with respect to the matrix) value of homogenized parameters. We have carried out several series[26] of computations varying these parameters, in this paper we present a selection of results that are qualitatively not obvious from the first sight or quantitatively important for applications. 11 A. Basic tests Before starting the real computations we need to fix one more detail, namely the typical size of the representative volume element. According to [23] the size is acceptable if increasing it does not modify the result of computations. In our case fixing the relative size of an RVE is equivalent to determine the minimal acceptable number of inclusions. A small number of inclusions clearly corresponds to a small piece of material studied, while the large number means that each sample includes sufficient microscopic variety and is close to being homogeneous in the context of effective properties. We have analyzed the dependence of effective properties on the number of inclusions with all the other parameters being fixed. The typical trend is shown on the figure 3, which clearly shows that from the total number of 20 the properties stabilize, the effect is more pronounced for higher volume fractions. In all the computations that follow, we will thus consider the number of inclusions of this order. 4 f_sc+f_cyl = 0.30 f_sc+f_cyl = 0.24 f_sc+f_cyl = 0.18 f_sc+f_cyl = 0.12 f_sc+f_cyl = 0.06 normalized bulk modulus 3.5 3 2.5 2 1.5 1 5 10 15 20 25 30 35 40 45 50 n_sp = n_cyl FIG. 3: The dependence of mechanical parameters of a composite on the number of inclusions for the volume fraction being fixed. Contrast 2048. Let us now turn to analysis of the influence of morphological properties. Here and in what follows we will depict the trends for the effective bulk and shear moduli or for just one of them, since they are usually rather similar qualitatively. In principal we are computing 12 the whole homogenized stiffness tensor, that turns out to be very close to isotropic, it is thus possible to extract any combination of mechanical characteristics out of it (Young modulus, Poisson ratio, Lamé coefficients). The choice of the bulk and the shear moduli is motivated by further comparison with experimental measurements and datasheets. To start with, let us consider only spherical inclusions (figure 4) and only cylindrical ones (figure 5). For the spheres at contrast greater than 1 the effective parameters increase non-linearly with the volume fraction, and decrease for the contrast less than 1. The further the contrast is from 1 the more this effect is pronounced. The similar effect is observed for the cylinders, and in addition to this the reinforcement by longer inclusions (with higher aspect ratio) is more efficient. These first tests should be considered more as preparatory results and validation check for the methods, since their outcome is rather predictable. In what follows we discuss more interesting tests. 3.5 3.5 3 3 contrast 2048 contrast 16 contrast 0.0625 2.5 contrast 2048 contrast 16 contrast 0.0625 2.5 2 2 1.5 1.5 1 1 0.5 0.5 0 0 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 volume fraction volume fraction (a) Bulk modulus FIG. 4: (b) Shear modulus The dependence of mechanical parameters of a composite on the volume fraction of spherical inclusions. nsp = 20, a similar picture for 15 and 25. B. Advanced morphology analysis Let us now turn to more subtle questions related to analysis of the influence of morphology on the effective properties of composite materials, namely let us consider the composites reinforced by the mixture of globular and fiber-type inclusions and understand what factors in repartition of the inclusions to these two types influence the result. 13 1 0.9 0.8 0.7 0.6 0.5 0 0.1 fraction 0.2 0.3 0 4 2.4 2.1 1.8 1.5 1.2 0.9 20 16 12 8 aspect 0 (a) Contrast 0.0625, normalized bulk modulus 25 20 15 10 5 0 0 0.1 fraction 0.2 0.3 0 4 0.3 0 4 (b) Contrast 16, normalized bulk modulus 15 12 9 6 3 0 20 16 12 8 aspect 0 (c) Contrast 2048, normalized bulk modulus FIG. 5: 0.1 fraction 0.2 20 16 12 8 aspect 0.1 fraction 0.2 0.3 0 4 20 16 12 8 aspect (d) Contrast 2048, normalized shear modulus The dependence of mechanical parameters of a composite on the volume fraction and aspect ratio of cylindrical inclusions. ncyl = 20 In the first series of tests here we fix the overall number of inclusions of both type and study the dependence of the effective properties on the aspect ratio of the cylindrical inclusions for various volume fractions. The results (figure 6) clearly show that for contrast greater than 1 the composite is better reinforced with longer cylinders. The effect is certainly better visible for higher contrast. Although as expected the presence of spherical inclusions in the mixture does not permit to reach the same values of parameters of the homogenized medium as in the case of the same volume fraction formed by cylinders only (cf. figure 5). The opposite effect is present for values of contrast less than 1, but quantitatively it is less pronounced. Let us now fix the volume fraction of each type of inclusions and vary the number of them. The figure 7 shows that the reinforcement/weakening is slightly more efficient with a 14 2.8 2.6 2.4 2.2 2 1.8 1.6 1.4 1.2 1 1 0.8 0.6 f_sp=f_cyl=0.05 f_sp=f_cyl=0.1 f_sp=f_cyl=0.15 0.4 0.2 0 0 2 4 6 8 10 12 14 16 18 20 aspect ratio 0 (a) Contrast 0.0625, normalized bulk modulus 5 3.5 3 2.5 2 1.5 1 2 4 6 8 10 12 14 16 18 20 4 6 8 10 12 14 16 18 20 aspect ratio f_sp=f_cyl=0.15 f_sp=f_cyl=0.1 f_sp=f_cyl=0.05 0 aspect ratio 2 (b) Contrast 16, normalized bulk modulus 10 9 8 7 6 5 4 3 2 1 f_sp=f_cyl=0.15 f_sp=f_cyl=0.1 4 f_sp=f_cyl=0.05 4.5 0 f_sp=f_cyl=0.15 f_sp=f_cyl=0.1 f_sp=f_cyl=0.05 2 4 6 8 10 12 14 16 18 20 aspect ratio (c) Contrast 256, normalized bulk modulus (d) Contrast 2048, normalized bulk modulus FIG. 6: The dependence of mechanical parameters of a composite material on the aspect ratio of the cylinders in the mixture of inclusions. Comparison for nsp = ncyl = 20. large number of cylinders. Although looking at numerical values one sees that the effect is rather subtle and can be neglected in the global analysis. Notice that there is a saturation phenomenon when the total number of inclusions is small, which is in perfect agreement with the above discussion about the size of an RVE and figure 3. The most interesting series of tests from this group is the study of the influence of repartition of the volume of inclusions between spheres and cylinders. The diagonals of each plot on the figure 8 represent the volume fractions of two types of inclusions with a fixed sum. One can again notice that the reinforcement/weakening effect is better observed for cylinders than for spheres. 15 0.845 0.844 0.843 0.842 5 1.44 1.42 10 15 10 num_sp20 25 30 5 5 10 15 10 num_sp20 25 30 5 30 25 20 15 num_cyl (a) fsp = fcyl = 0.05, contrast 0.0625, (b) fsp = fcyl = 0.05, contrast 2048, normalized bulk modulus normalized bulk modulus 0.708 0.707 0.706 0.705 5 10 15 10 num_sp20 25 30 5 2.06 2.04 2.02 2 30 25 20 15 num_cyl 5 10 15 10 num_sp20 25 30 5 30 25 20 15 num_cyl (c) fsp = fcyl = 0.1, contrast 0.0625 (d) fsp = fcyl = 0.1, contrast 2048 normalized normalized bulk modulus bulk modulus 0.586 0.585 0.584 0.583 5 FIG. 7: 1.4 30 25 20 15 num_cyl 10 15 10 num_sp20 25 30 5 3.04 3.02 3 2.98 2.96 2.94 2.92 30 25 20 15 num_cyl 5 10 15 10 num_sp20 25 30 5 30 25 20 15 num_cyl (e) fsp = fcyl = 0.15, contrast 0.0625 (f) fsp = fcyl = 0.15, contrast 2048 normalized normalized bulk modulus bulk modulus The dependence of mechanical parameters of a composite material on the number of various inclusions for fixed volume fraction. Note that the scale on these plots is different from all the others: the difference between the minimal and the maximal values is almost absorbed by the confidence intervals, except the corner with the small number of inclusions (cf. also figure 3). 16 0.3 1 0.9 0.8 0.7 0.6 0.5 0 f_cyl 0.2 0.1 0.3 0.1 f_sp 0.2 0.1 0.2 f_cyl 0 0.3 0 0 0.1 0.2 0.3 f_sp (a) contrast 0.0625, normalized bulk modulus (b) contrast 0.0625, normalized bulk modulus 0.3 2.4 2.1 1.8 1.5 1.2 0.9 0 f_cyl 0.2 0.1 0.3 0.1 f_sp 0.2 0.1 0.2 f_cyl 0 0.3 0 0 0.1 0.2 0.3 f_sp (c) contrast 16, normalized bulk modulus (d) contrast 16, normalized bulk modulus 0.3 4.8 4 3.2 2.4 1.6 0.8 0 f_cyl 0.2 0.1 0.3 0.1 f_sp 0.2 0.1 0.2 f_cyl 0 0.3 0 0 0.1 0.2 0.3 f_sp (e) contrast 2048, normalized bulk modulus (f) contrast 2048, normalized bulk modulus FIG. 8: The dependence of mechanical parameters of a composite material on the repartition of inclusions volume between spheres and cylinders. nsp = ncyl = 20. 3D plot on the left, level sets map on the right. 17 C. Imperfections The following two series of tests represent the most true to life situations when the inclusions are not of ideal shape. With the algorithms from [1] we are able to generate various types of imperfections including perturbing the surfaces of inclusions by waves and taking out parts of the inclusions preserving the overall volume fraction (figure 2). Let us mention that generating these imperfections we still suppose that the interface between the two materials is perfect, i.e. no voids or discontinuities are created. This proves to be a reasonable assumption for mechanical properties, let us note though that if one studies for example thermal or electrical conductivity the result is more subtle (cf. [24]). In the first case the main parameter is the relative wave amplitude, i.e. the ratio between the amplitude of perturbations of the surface and some characteristic size of the inclusions (radii of spheres and cylinders in the performed computations). A typical dependence of the effective properties on this parameter for several aspect ratios of cylinders in the mixture is presented on figure 9. The trends observed there leave no doubt that such perturbations in fact contribute to more efficient reinforcement of the material. Our computations show that the effect is more pronounced when the composite is already well reinforced, i.e. at higher volume fraction, larger aspect ratio of cylinders, or significant contrast between two phases. The second series of tests concerns the simulation of possible defects while introducing the inclusions to the matrix of the future composite material. We model this process by generating the zones where the obtained composite is “spoilt”, namely if the inclusion intersects partially with such a zone some piece of it is moved out and placed apart in the matrix. The main parameter of this perturbation is thus the volume fraction of such zones. The figure 10 shows the effect of the amount of defects on the properties of a material. The curves are less smooth than for most of the dependencies presented above, but globally one sees that the defects (at least at reasonable volume fraction) contribute to reinforcement as well. And as before, the more the studied material was reinforced without imperfections, the clearer this effect is visible. 18 6 6 f_sp=f_cyl=0.15 f_sp=f_cyl=0.12 f_sp=f_cyl=0.09 f_sp=f_cyl=0.06 f_sp=f_cyl=0.03 5 4 f_sp=f_cyl=0.15 f_sp=f_cyl=0.12 f_sp=f_cyl=0.09 f_sp=f_cyl=0.06 f_sp=f_cyl=0.03 5 4 3 3 2 2 1 1 0 0 0 0.05 0.1 0.15 0.2 0.25 relative wave amplitude 0.3 0 (a) aspect 3, normalized bulk modulus 7 5 4 0.1 0.15 0.2 0.25 relative wave amplitude 0.3 (b) aspect 6, normalized bulk modulus 6 f_sp=f_cyl=0.15 f_sp=f_cyl=0.12 f_sp=f_cyl=0.09 f_sp=f_cyl=0.06 f_sp=f_cyl=0.03 6 0.05 f_sp=f_cyl=0.15 f_sp=f_cyl=0.12 f_sp=f_cyl=0.09 f_sp=f_cyl=0.06 f_sp=f_cyl=0.03 5 4 3 3 2 2 1 1 0 0 0 0.05 0.1 0.15 0.2 0.25 0.3 0 relative wave amplitude 0.05 0.1 0.15 0.2 0.25 0.3 relative wave amplitude (c) aspect 9, normalized bulk modulus (d) aspect 9, normalized shear modulus FIG. 9: The dependence of mechanical parameters of a composite on the waving of the surface of inclusions. nsp = ncyl = 20, contrast 2048. IV. CONCLUSION / OUTLOOK To conclude, let us recapitulate the main messages of this paper. We have started by presenting the methods that we find suitable for analysis of mechanical properties of composite materials. The approach that we find optimal can be called ‘FFT-based stochastic homogenization’, where the FFT-based iterative scheme is used for computing effective properties of each given sample, and the stochastic part enters at the level of random generation of samples. One of important advantages of this approach is its low time and memory consumption in comparison for example with finite elements methods. Turning to concrete computational results, we can conclude that the most important morphological properties influencing the effective properties of composite materials are the volume fractions of various types of inclusions and rather basic geometry of fiber reinforcements. Moreover introducing various 19 7 7 fsp=fcyl=0.15 fsp=fcyl=0.12 fsp=fcyl=0.09 fsp=fcyl=0.06 fsp=fcyl=0.03 6 5 4 fsp=fcyl=0.15 fsp=fcyl=0.12 fsp=fcyl=0.09 fsp=fcyl=0.06 fsp=fcyl=0.03 6 5 4 3 3 2 2 1 1 0 0 0 0.05 0.1 0.15 0.2 fraction of defects 0.25 0.3 0 (a) aspect 3, normalized bulk modulus 0 0.05 0.1 0.15 0.25 0.3 0 0.05 fraction of defects 0.3 0.1 0.15 0.2 0.25 0.3 fraction of defects (c) aspect 9, normalized bulk modulus FIG. 10: 0.25 fsp=fcyl=0.15 fsp=fcyl=0.12 fsp=fcyl=0.09 fsp=fcyl=0.06 fsp=fcyl=0.03 8 7 6 5 4 3 2 1 0 0.2 0.1 0.15 0.2 fraction of defects (b) aspect 6, normalized bulk modulus fsp=fcyl=0.15 fsp=fcyl=0.12 fsp=fcyl=0.09 fsp=fcyl=0.06 fsp=fcyl=0.03 8 7 6 5 4 3 2 1 0 0.05 (d) aspect 9, normalized shear modulus The dependence of mechanical parameters of a composite on the volume of defects in the material. nsp = ncyl = 20, contrast 2048. irregularities to inclusions, and thus making their shape geometrically more complex, has positive effect on the parameters of the obtained material. We have also mentioned that behind this paper there is a precise motivation related to industrial applications. We are doing this work within the framework of an industrial project related to amelioration of effective properties of composite materials. Certainly the dream of an applied mathematician in such a context would be to propose an optimal scheme of production. Our contacts with the companies that actually produce composite materials show that in reality the fabrication process is not that flexible as one wants. For example, in this paper we deliberately omitted the analysis of the influence of collective orientation of the inclusions and their possible unequal distribution in a sample (though the algorithms from [1] permit us to control these parameters), on the contrary we always checked that the 20 resulting homogenized medium was sufficiently isotropic. Often such modelling results are aimed at validation of the properties rather than on the production planning, or at the choice between a very limited number of possible strategies. In our particular case the input of the simulation consists of the parameters of different phases of the composite and the geometry of the sample in the form of 3D images obtained from tomography or microscopy; and the expected outcome is the estimation of the effective parameters. In the best scenario these images are segmented, i.e. the regions belonging to the matrix or to inclusions are labeled – in such a format the sample is perfectly suitable for performing the FFT-based computation described above. This however does not mean that the main applied aim of this paper was to test the methods. In fact during the computations described above we have accumulated a huge database of samples together with already computed effective properties – this can now be used for various parameter fitting or inverse problems. Acknowledgements. Most of the computations described in this paper have been carried out at the cluster of the Center of Informatics Resources of Higher Normandy (CRIHAN – Centre de Ressources Informatiques de HAute-Normandie). This work has been supported by the ACCEA project selected by the “Fonds Unique Interministériel (FUI) 15 (18/03/2013)” program. [1] V. Salnikov, D. Choi, P. Karamian, On efficient and reliable stochastic generation of RVEs for analysis of composites within the framework of homogenization, accepted to Computational Mechanics, DOI: 10.1007/s00466-014-1086-1, arXiv:1408.6074. [2] S.Lemaitre, V.Salnikov, D.Choi, P.Karamian, Génération de VER 3D par la dynamique moléculaire et variations autour de la pixellisation. Calcul des propriétés effectives des composites, accepted for publication in the proceedings of the CSMA 2015. [3] J.C. Michel, H. Moulinec and P. Suquet, A computational scheme for linear and non-linear composites with arbitrary phase contrast, Int. J. Numer. Meth. Engng 2001; 52:139160 (DOI: 10.1002/nme.275). [4] V. Monchiet, and G. Bonnet, A polarization-based FFT iterative scheme for computing the effective properties of elastic composites with arbitrary contrast, Int. J. Numer. Meth. Engng (2011). 21 [5] J. Segurado, J. Llorca, A numerical approximation to the elastic properties of sphere-reinforced composites, Journal of the Mechanics and Physics of Solids, 50 (2002) 2107–2121. [6] E. Ghossein, M. Lévesque, A fully automated numerical tool for a comprehensive validation of homogenization models and its application to spherical particles reinforced composites, International Journal of Solids and Structures 49 (2012) 1387–1398. [7] J. Zhao, S. Li, R. Zou, A. Yu, Dense random packings of spherocylinders, Soft Matter, 8 (2012) 10031009. [8] W. Man, A. Donev, F. Stillinger, M. Sullivan, W. Russel, D. Heeger, S. Inati, S. Torquato, P. Chaikin, Experiments on random packings of ellipsoids, Physical Review Letters, 94 (2005) 198001. [9] B. Widom, Random Sequential Addition of Hard Spheres to a Volume, J. Chem. Phys. 44, 3888 (1966). [10] B. D. Lubachevsky, F.H. Stillinger, Geometric properties of random disk packings Journal of Statistical Physics, 08/1990; 60(5):561-583. [11] S. Williams, A. Philipse, Random packings of spheres and spherocylinders simulated by mechanical contraction, Physical Review E, 67 (2003) 051301. [12] E. Ghossein, M. Lévesque, Random generation of periodic hard ellipsoids based on molecular dynamics: A computationally-efficient algorithm, Journal of Computational Physics. 253(2013), 471–490. [13] J.C. Michel, H. Moulinec, P. Suquet, Effective properties of composite materials with periodic microstructure: a computational approach, Computational methods in applied mechanics and engineering, 172 (1999), 109–143. [14] D. Eyre, G. Milton, A fast numerical scheme for computing the response of composites using grid refinement. European Physical Journal, Applied Physics 6, 4147, 1999. [15] H. Moulinec, F. Silva, Comparison of three accelerated FFT-based schemes for computing the mechanical response of composite materials International Journal for Numerical Methods in Engineering, Wiley-Blackwell, 2014, 97 (13), pp.960-985. [16] N. Metropolis, S. Ulam, The Monte Carlo Method, J. Amer. statistical assoc. 1949, 44, No247, 335–341. [17] V. Salnikov, On numerical approaches to the analysis of topology of the phase space for dynamical integrability, Chaos, Solitons & Fractals, Vol. 57, 2013. 22 [18] N. Yoshinaga, E.I. Kats and A. Halperin, On the Adsorption of Two-State Polymers, Macromolecules 41(20), 7744 (2008) [19] M. Kaminski, B.A. Schrefler, Probabilistic effective characteristics of cables for superconducting coils. Comput. Meth. Appl. Mech. Engrg. 188(1-3): 1-16, 2000. [20] W. Leclerc, P. Karamian, A. Vivet, A. Campbell, Numerical evaluation of the effective elastic properties of 2D overlapping random fibre composites. Technische Mechanik, 32, 358-368, 2012. [21] W. Leclerc, P. Karamian-Surville, Effects of fibre dispersion on the effective elastic properties of 2D overlapping random fibre composites, Comput. Mat. Sci., 79, 674-683, 2013. [22] W. Leclerc, P. Karamian-Surville, A. Vivet, Influence of morphological parameters of a 2D random short fibre composite on its effective elastic properties, Mechanics & Industry, 14, 05, 361-365, 2013. [23] T. Kanit, S. Forest, I. Galliet, V.Mounoury, D.Jeulin, Determination of the size of the representative volume element for random composites: statistical and numerical approach. Int J Solids Struct, 40:36473679, 2003. [24] J. Yvonnet, Q.-C. He, C. Toulemonde, Numerical modelling of the effective conductivities of composites with arbitrarily shaped inclusions and highly conducting interface, Composites Science and Technology 68 (2008) 28182825. [25] This list is in no case exhaustive since the range of application of the Monte Carlo approach is, without exaggeration, enormous. [26] This is a rather time consuming numerical experiment, that took about 500Khours of CPU time at the Antares cluster of the CRIHAN computational center. 23
5cs.CE
DIVERGENCE, UNDISTORTION AND HÖLDER CONTINUOUS COCYCLE SUPERRIGIDITY FOR FULL SHIFTS arXiv:1709.10218v2 [math.DS] 9 Oct 2017 NHAN-PHU CHUNG AND YONGLE JIANG Abstract. In this article, we will prove a full topological version of Popa’s measurable cocycle superrigidity theorem for full shifts [36]. More precisely, we prove that every Hölder continuous cocycle for the full shifts of every finitely generated group G that has one end, undistorted elements and sub-exponential divergence function is cohomologous to a group homomorphism via a Hölder continuous transfer map if the target group is complete and admits a compatible bi-invariant metric. Using the ideas of Behrstock, Druţu, Mosher, Mozes and Sapir [4, 5, 17, 18], we show that the class of our acting groups is large including wide groups having undistorted elements and one-ended groups with strong thick of finite orders. As a consequence, irreducible uniform lattices of most of higher rank connected semisimple Lie groups, mapping class groups of g-genus surfaces with p-punches, g ≥ 2, p ≥ 0; Richard Thompson groups F, T, V ; Aut(Fn ), Out(Fn ), n ≥ 3; certain (2 dimensional)-Coxeter groups; and one-ended right-angled Artin groups are in our class. This partially extends the main result in [12]. 1. introduction During studying measurable orbit equivalence, Popa established his celebrated cocycle superrigidity theorem for Bernoulli shifts in the measurable setting [36, 37]: Q for certain groups G the full shift action G y G (A, µ) is Uf in -measurable cocycle superrigid, for every finite set A, where Uf in is the class of Polish groups which arise as closed subgroups of the unitary groups of finite von Neumann algebras. The class Uf in contains all countable groups. In [12] we proved a topological version of Popa’s theorem by showing that for every non-torsion finitely generated group G with one end, every full shift G y AG is continuous H-cocycle rigid for every countable group H. Shortly after that, Cohen [13] removed the “non-torsion” assumption in [12]. As one expects, this continuous cocycle superrigidity theorem has applications in continuous orbit equivalence theory, which was systematically studied in [33]. As Popa’s theorem holds for the class Uf in groups containing all countable groups, one may wonder whether we can extend the main result in [12] to other target groups belonging to Uf in . More precisely, we study continuous cocycles for shifts with target groups being any Polish groups that admit compatible bi-invariant metrics. And following [23, 2.b.], we denote this class of groups by Ginv , which contains the class Uf in . Date: October 10, 2017. 1 2 NHAN-PHU CHUNG AND YONGLE JIANG On the other direction, in 1994, in a seminal paper [31], Katok and Spatzier established their pioneer rigidity properties of hyperbolic actions of higher rank abelian groups Zk , k ≥ 2. They showed that for standard Zk -hyperbolic actions, k ≥ 2 including all known irreducible examples, every Hölder continuous cocycle into Rl is Hölder cohomologous to a constant cocycle without any assumptions on periodic data as Livšic’s theory for Z-actions. After that, many results of rigidity for cocycles in higher rank abelian group actions have been proved, see the recent monograph [29] for details and references. As a nature, we would like to investigate whether results of [31] can be extended for hyperbolic actions of groups beyond Zk . This paper is our first steps to understand this question when we consider our “simplest Anosov action”, the full shifts of general countable groups, and the target groups of cocycles are complete and admits compatible bi-invariant metrics. Following [30, 39], we investigate the following class of groups: GH := {G| Every Hölder continuous cocycle c : G × AG → H is Hölder cohomologous to a group homomophism from G to H for all H ∈ Ginv and all finite set A}. Since any continuous cocycles into discrete target groups are automatically Hölder continuous, we have GH ⊆ G, where G is defined in [12] as follows: G := {G| Every continuous cocycle c : G × AG → H is continuous cohomologous to a group homomophism from G to H for all countable discrete group H and all finite set A}. We proved in [12] that if G is finitely generated and non-torsion, then G belongs to G iff G has one end. We expect the same conclusion still holds if we replace G with GH . Along this direction, we prove the following theorem, which is a counterpart of [12, Theorem 1] in our setting. Theorem 1.1. Let A be a finite set and G be a finitely generated infinite group. Let σ : G y X ⊆ AG be a subshift. Assume the following conditions are satisfied: (1) G has one end and its divergence function grows sub-exponentially (see Section 2.1). (2) G has slow growth distortion property (abbreviated as (SDT) property) (see Definition 2.3). (3) σ is topological mixing, and the homoclinic equivalence relation ∆X has strong a-specification (see Section 3.2) for every element a in G with (SDT) property. Then every Hölder continuous cocycle c : G × X → H on any group H ∈ Gf in is cohomologous to a homomorphism via a continuous transfer map. If we further assume G has undistorted elements (see Section 2.3), then this transfer map can be chosen to be Hölder continuous. From this theorem, we deduce the following: DIVERGENCE, UNDISTORTION AND HÖLDER CONT. COCYCLE SUPERRIGIDITY 3 Corollary 1.2. Let G be a finitely generated infinite group. If G has one end, undistorted elements and its divergence function grows sub-exponentially. Then G ∈ GH . We organize our paper as follows. In section 2, we review definitions and elementary properties of divergence functions, distortion property, undistorted elements and translation numbers. In section 3, we review Hölder continuous cocycle, homoclinic equivalence relation for shifts and also introduce a modified version of specification property for shifts to deal with rigidity of Hölder continuous cocycles. In this section, we also establish a key lemma about construction of invariant holonomies for undistorted elements. In section 4, we prove our main theorem by combining our techniques in [12] with our sub-exponential growth rate of divergence functions to get a universal solution of continuous transfer map and show that it is indeed Hölder continuous whenever we have undistorted elements. Finally, using ideas in [4, 5, 17, 18] we illustrate that our class GH contains wide groups having undistorted elements and one-ended groups with strong thick of finite orders. This implies that irreducible uniform lattices of most of higher rank connected semisimple Lie groups, mapping class groups of g-genus surfaces with p-punches, g ≥ 2, p ≥ 0; R. Thompson groups F, T, V ; Aut(Fn ), Out(Fn ), n ≥ 3; certain (2-dimensional) Coxeter groups; and one-ended right-angled Artin groups are in GH . Acknowledgement: N.-P. Chung was supported by the NRF grant funded by the Korea government (MSIP) (No. NRF-2016R1D1A1B03931922). Y. Jiang is grateful to his advisor Prof. Hanfeng Li for his support in Buffalo, where part of this paper was written. Both authors were supported by Science Research Center Program through NRF funded by the Ministry of Science, ICT & Future Planning (No. NRF-2016R1A5A1008055). We thank Jason Behrstock for informing us examples in [35] of finitely generated groups whose divergences are sub-exponential but non-polynomials. We would also like to thank Mark Sapir for helpful comments, specially providing us more information of R. Thompson groups F, T, V . 2. Preliminaries In this section, we recall some definitions and set up notations. Throughout this paper, G is a finitely generated, non-torsion group unless otherwise specified. 2.1. Divergence functions. Let (X, d) be a geodesic metric space, typically, we would take X to be a Cayley graph of G endowed with the word metric with respect to some symmetric generating set. The main reference for divergence functions we use are [4, section 3] and [17, section 3.1]. Note that there are several definitions of divergence functions, here we use [17, Definition 3.1] by taking δ = 21 and γ = 2 since these two constants would guarantee these definitions are equivalent by [17, Corollary 3.12(2)] when X is a Cayley graph of a finitely generated one-ended group. 4 NHAN-PHU CHUNG AND YONGLE JIANG We define the divergence of a pair of points a, b ∈ X relative to a point c 6∈ {a, b} as the length of the shortest path from a to b avoiding a ball around c of radius d(c, {a, b})/2 − 2, where d(c, {a, b}) := min{d(c, a), d(c, b)}. If no such path exists, then we define the divergence to be infinity. The divergence of a pair of points a, b, Div(a, b), is the supremum of the divergences of a, b relative to all c ∈ X \ {a, b}. The divergence of X is given by DivX (n) := max{Div(a, b) | d(a, b) ≤ n}. We say DivX (·) grows sub-exponentially if limn→∞ DivX (n)r n = 0 for all 0 < r < 1. One can check limn→∞ DivX (n)r n = 0 for all 0 < r < 1 iff limn→∞ log(DivX (n))/n = 0. And if DivX (·) is a polynomial, then it grows sub-exponentially. Recall that given two non-decreasing functions f, g : R+ → R+ , we write f  g if there exists a constant C ≥ 1 for which f (x) ≤ Cg(Cx + C) + Cx + C for all x ∈ R+ ; we set f ≍ g if both f  g and g  f . It is easy to check that the ≍-equivalence class of the divergence functions is a quasi-isometry invariant when X = Cayley(G) and d is a word metric. It is also clear that the property of having sub-exponential growing divergence function is preserved under quasi-isometry. 2.2. Distortion and (SDT) property. We first recall the definition of distortion functions, which is needed for the definition of (SDT) property. Definition 2.1 (cf. [28]). Let K be a subgroup of a group G, where K and G are generated by finite sets T and S, respectively. Then the distortion function of K in G is defined as ∆G K : R+ → R+ , x 7→ max{ℓT (k) : k ∈ K, ℓS (k) ≤ x}. G And we also define the compression function ρG K as follows: ρK : R+ → R+ , x 7→ min{ℓS (k) : k ∈ K, ℓT (k) ≥ x}. G For later use, we would frequently work with ρG K rather than ∆K . Roughly speakG G ing, one can think of ρK as the inverse function of ∆K (see the proposition below). G G Note that we could not define the inverse function of ∆G K directly since ∆K and ρK G −1 may not be strictly monotone. However, we still use (ρK ) (c) to denote the number sup{λ > 0 : ρG K (λ) ≤ c}. This makes sense by Proposition 2.2 (1) below. Given two non-decreasing functions f, g : R+ → R+ , we write f ≈ g if there exists c > 0 such that for f (x) ≤ cg(cx) and g(x) ≤ cf (cx) for all x ∈ R+ . Let us record properties of these functions for later use. We leave the proof as exercises. G Proposition 2.2. (1) Both ∆G K and ρK are constant on open intervals (n, n + 1) for all n ∈ N, non-decreasing and do not depend on the choice of finite generating sets T and S up to ≈ and hence also up to ≍. G (2) ∆G K (ℓS (k)) ≥ ℓT (k) and ρK (ℓT (k)) ≤ ℓS (k) for all k ∈ K. In particular, if i i G K = hgi and g is of infinite order, then ∆G K (ℓS (g )) ≥ i and ρK (i) ≤ ℓS (g ) for all i ≥ 1 by taking T = {g ± }. G G G G −1 G (3) ∆G K (ρK (x) − 1) < x < ρK (∆K (x) + 1) and (ρK ) (x) ≤ ∆k (x) for all x ∈ R+ . G (4) If K is infinite, then ∆G K is at least and ρK is at most linear up to ≈. DIVERGENCE, UNDISTORTION AND HÖLDER CONT. COCYCLE SUPERRIGIDITY 5 (5) If K = hgi, T = {g ± }, where g ∈ G has infinite order and S = S −1 . Then ρG K G G G G is subadditive, i.e. ρG (x+y) ≤ ρ (x)+ρ (y); ∆ is superadditive, i.e. ∆ (x+y) ≥ K K K K K G ∆G K (x) + ∆K (y) for all x, y ∈ R+ . Definition 2.3. Let G be a finitely generated infinite group. We say G has slow growth distortion property (abbreviated as (SDT) property) if there exists some P ρG (i) hgi non-torsion element g in G such that I(r) := ∞ < ∞ for all 0 < r < 1. i=1 r And we also say such a g has (SDT) property or g is an (SDT) element. We record the following facts for later use. Proposition 2.4. (1) If a function f : R+ → R+ is non-decreasing and continuous P f (i) except at atRmost countably many points. Then for every r > 0, ∞ < ∞ if i=1 r ∞ f (x) and only if 1 r dx < ∞. P f (i) (2) Let f, g : R+ → R+ be functions as in (1). If f ≈ g, then ∞ < ∞ for i=1 r P∞ g(i) all r ∈ (0, 1) if and only if i=1 r < ∞ for all r ∈ (0, 1). P f (i) (3) If f (x) = x1/m , where m ≥ 1, then ∞ < ∞ for all r ∈ (0, 1). i=1 r G (4) If there exist some c > 0, m ≥ 1 such that ∆K (x) ≤ c(cx)m for all x > 0, then P ρG K (i) < ∞ for all r ∈ (0, 1). I(r) := ∞ i=1 r (5) More generally, if ∆G (·) grows sub-exponentially, i.e. limn→∞ log(∆G K (n))/n = P∞ ρG (i)K K 0, then I(r) := i=1 r < ∞ for all 0 < r < 1. Proof. The proof of (1) and (2) are left as exercises. To prove (3), observe that for any k ≥ 1, #{i ∈ N : k ≤ f (i) < k + 1} = #{i ∈ P P f (i) N : k ≤ i1/m < k + 1} ≤ (1 + k)m − k m + 1. Hence, ∞ ≤ k≥f (n) ((1 + k)m − i=n r k m + 1)r k → 0 as n → ∞. G G m To prove (4), by Proposition 2.2 (3), we have x < ρG K (∆K (x)+1) ≤ ρK (c(cx) +1). G m+1 1/m Hence, ρK (y) ≥ ((y − 1)/c ) . Then apply part (3). The proof of (5) is similar to the above proof of (4).  In this paper, we are mainly interested in the case K = hgi for some non-torsion element g in G. For later use, when there is no danger of confusion, we would simply G ± write ρg (x) (respectively, ∆g (x)) for ρG hgi (x) (respectively, ∆hgi (x)) with T = {g }. 2.3. Undistorted elements and translation numbers. To give explicit examples of groups with (SDT) property, let us first look at the special case when there exists some non-torsion element g with ∆g (·) grows at most linearly. In general, recall the following well-known definition. Definition 2.5. Let G be a finitely generated infinite group and K be a finitely generated subgroup of G. We say K is undistorted in G if there exists some constant c > 0 such that ∆G K (n) ≤ cn for all n ≥ 1. Another way to characterize undistorted elements is to use translation numbers that we recall below. Fix any finite generating set S of G, let g ∈ G be an element of infinite order. As ℓS (g m+n ) ≤ ℓS (g m ) + ℓS (g n ) for every m, n ∈ N, the limit limn→∞ ℓS (g n )/n exists 6 NHAN-PHU CHUNG AND YONGLE JIANG and equals to inf n∈N ℓS (g n )/n [41, Theorem 4.9]. The translation number of g with respect to S is defined by τS (g) := limn→∞ ℓS (g n )/n [25, Section 6]. Some elementary properties of translation numbers are established in [25, Lemma 6.3]. An element g ∈ G is called an undistorted element if τS (g) > 0 for some (and every) finite generating set S of G [22, Definition 1.1]. We say that a finitely generated group G satisfies property (UD) if there exists an element g ∈ G and a finite generating set S such that ℓS (g k ) ≥ k for every k ∈ N. As τS (g m ) = |m|τS (g) for every g ∈ G, m ∈ Z, it is clear that a group G has property (UD) iff it has an undistortion element g, i.e τS (g) 6= 0 for some (and every) finite generating set S of G. We have the following proposition. Proposition 2.6. Let G be a finitely generated infinite group with a finite symmetric generating set S and g be an element in G with infinite order. The following statements are equivalent. (1) hgi is undistorted in G, i.e. ∆g (n) ≤ cn for some c > 0 and all n ≥ 1. (2) g is an undistorted element in G, i.e. τS (g) > 0. (3) There exists some positive constant λ such that ℓS (g n ) ≥ λn for all n ≥ 1. (4) There exist some positive constants λ, µ such that ℓS (g n ) ≥ λn − µ for all n ≥ 1. (5) There exists some positive constant λ such that ρg (n) ≥ λn for all n ≥ 1. (6) There exists some positive constants λ, µ such that ρg (n) ≥ λn − µ for all n ≥ 1. Proof. (1) ⇒ (2). From Proposition 2.2 (2) (3), we deduce n < ρg (∆g (n) + 1) ≤ (g cn+1 ) n ≥ cn+1 . Then take lim on both sides. ρg (cn + 1) ≤ ℓS (g cn+1). Hence ℓS cn+1 (2) ⇒ (1), (2) ⇒ (3) ⇒ (4) ⇒ (2), (3) ⇔ (5) ⇔ (6). All these are clear.  Lemma 2.7. Let G be a finitely generated infinite group with (SDT) property, G′∞ be the subgroup generated by all elements with (SDT) property in G and G′∞,1 be the subgroup generated by all elements that are undistorted, then both G′∞ and G′∞,1 are infinite normal subgroup of G. Proof. By definition, any (SDT) element has infinite order, hence G′∞ and G′∞,1 are infinite. Now, for any h ∈ G and any non-torsion element g in G, ℓS (tg n t−1 ) ≥ ℓS (g n ) − 2ℓS (t), hence ρtgt−1 (n) ≥ ρg (n) − 2ℓS (t) for all n ∈ N, where S is any finite generating set of G. Hence tgt−1 has (SDT) property (respectively, is undistorted) if g has the same property, so G′∞ and G′∞,1 are normal subgroups of G.  3. Hölder continuous cocycles, homoclinic equivalence relation and specification property for shifts 3.1. Hölder continuous cocycles and homoclinic equivalence relation. Let (G, X) be a subshift, where X ⊂ AG for some finite set A, S be a finite symmetric generating set of G. We write B(n) := {g ∈ G : ℓS (g) ≤ n}, where ℓS be the word length on G induced by S. Following [39, p.245], a function f : X → H is called Hölder continuous if there exist C > 0 and 0 < r < 1 such that for every DIVERGENCE, UNDISTORTION AND HÖLDER CONT. COCYCLE SUPERRIGIDITY 7 n ≥ 0, d(f (x), f (y)) ≤ Cr n , for every (x, y) ∈ X × X with xB(n) = yB(n) . A cocycle c : G × X → H is Hölder continuous if c(g, ·) : X → H is Hölder continuous for every g ∈ G. We say two Hölder continuous cocycles c1 , c2 : G × X → H are Hölder cohomologous if c1 (g, x) = b(gx)−1 c2 (g, x)b(x) holds for all g ∈ G and all x ∈ X for some Hölder continuous map b : X → H. Let us comment on this definition. In general, for two metric spaces (X, d), (Y, d′), a function f : X → Y is Hölder continuous if for some positive constants c, α, d′ (f (x1 ), f (x2 )) ≤ Cd(x1 , x2 )α holds for all xi in X. But this definition depends on the specific metric d rather than the topology of X, which is not satisfactory when dealing with a subshift (G, X). Thus we need a meaningful definition of Hölder continuous map that is independent of the specific metric on X, such a definition is given in [30, p.109] for Zd -subshift. Choosing d(x1 , x2 ) := (1/2)sup{n: (x1 )B(n) =(x2 )B(n) } in [30, p.109], one can check the definition in [30, p.109] is reduced to the one in [39, p.245]. Note that in the definition of Hölder continuous cocycles, for different g, the associated C, r may be different. As in [12], we would use ∆X to denote the homoclinic equivalence relation for a subshift (G, X). Let f : X → H be a Hölder continuous map. For every n ≥ 1, we define maps (g),+,(n) cf (x, y) = Å n−1 Y j f (g x) −1 = Å n−1 Y j f (g y) −1 j=0 j=0 (g),−,(n) cf (x, y) ãÅ n−1 Y −j f (g x) ãÅ n−1 Y −j f (g y) j=1 j=1 ã−1 ã−1 , . Lemma 3.1. Assume that g is an (SDT) element in G, H is complete w.r.t. a (g),+ (g),− compatible bi-invariant metric d, e.g. H ∈ Ginv . Then the maps cf , cf : ∆X → H defined by (g),+ cf (x, y), (g),−,(m) (x, y), m→∞ (g),− cf (g),+,(m) (x, y) := lim cf (x, y) := lim cf m→∞ for every (x, y) ∈ ∆X are well defined and satisfy the cocycle condition (g),+ cf (g),+ (x, y)cf (g),+ (y, z) = cf (g),− (g),− cf (x, y)cf (y, z) = (x, z), (g),− cf (x, z), for every (x, y), (y, z) ∈ ∆X . Furthermore, there exists C ′ > 0 such that for every N ∈ N, if (x, y) ∈ ∆X with xh = yh for every h ∈ / B(N) then (1) (g),+ d(cf (g),+,(m+ρg −1 (N )) (x, y), cf (x, y)) ≤ C ′ ∞ X j=ρ−1 g (N )+m r ρg (j) 8 NHAN-PHU CHUNG AND YONGLE JIANG for every m ≥ 0; Here, r is the constant appeared when defining Hölder continuity of f . Proof. For every j > (ρg )−1 (N) and every h ∈ B(ρg (j) − N − 1), one has ℓS (g −j h) ≥ ℓS (g −j ) − ℓ(h) ≥ ρg (j) − (ρg (j) − N − 1) = N + 1, hence (g j x)B(ρg (j)−N −1) = xg−j B(ρg (j)−N −1) = yg−j B(ρg (j)−N −1) = (g j y)B(ρg (j)−N −1) . Thus, for every ρ−1 g (N) < ′ n < n , one has (g),+,(n) d(cf = d( Å n−1 Y (g),+,(n′ ) (x, y), cf j f (g x) −1 ′ −1 Å nY j f (g x) −1 = d( j=n ≤ ′ −1 nX f (g y) −1 j −1 f (g y) , ′ −1 nY ′ −1 ã−1 Å nY , j=0 ′ −1 ãÅ nY f (g j y)−1 j=n j=n ′ −1 nY j j=0 j=0 = d(1H , ãÅ n−1 Y (x, y)) ã−1 j f (g x) −1 ′ −1 ãÅ nY j=0 f (g j y)−1 ã−1 ) ) f (g j x)−1 ) j=n d(f (g j y)−1, f (g j x)−1 ) j=n = ′ −1 nX d(f (g j x), f (g j y)) j=n ≤ C ′ −1 nX j=n r ρg (j)−N −1 ≤ Cr −N −1 ∞ X r ρg (j) . j=n (g),+,(n) Thus, {cf (x, y)}n∈N is a Cauchy sequence since g has (SDT) property. As H (g),+ is complete, cf is well defined. Choose C ′ = Cr −N −1 , then we also get (1) from (g),− the last inequality. Similarly, cf is also well-defined.  3.2. Specification property for shifts. For the proof of Theorem 1.1, we need the following version of specification property for a subshift. This is one key novelty in this paper since to handle Ginv -target (Hölder continuous) cocycles, we need to generalize the version of specification used in Schmidt’s approach in [39]. In his definition, it involves some cone structure that is defined using the Euclidean structure of Zd , so to extend this definition to general groups actions, we need a suitable counterpart for the Euclidean structure. Note that we only need a degenerate cone (i.e. a line) structure when defining the specification property used in [12]. Definition 3.2. Let G be a finitely generated group with a finite generating set S. Let a be an element in G. Write rj = ρa (j)/4, for every R ≥ 0, we define ∆+ (a, R) := {(x, x′ ) ∈ ∆X : xak B([rk ]+R) = x′ak B([rk ]+R) , for all k ≥ 0}, ∆− (a, R) := {(x, x′ ) ∈ ∆X : xa−k B([rk ]+R) = x′a−k B([rk ]+R) , for all k ≥ 0}. DIVERGENCE, UNDISTORTION AND HÖLDER CONT. COCYCLE SUPERRIGIDITY 9 We say that the equivalence class ∆X (x̄) of a point x̄ ∈ X has strong a-specification (respectively, a-specification) if ∆X (x̄) ∩ a−1 ∆X (x̄)(respectively, ∆X (x̄)) is dense in X, and if there exist constants s′ ≥ 1, t′ ≥ 0 with the following property: for any R ≥ 0, if x, x′ ∈ ∆X (x̄) satisfy that xB(N ) = x′B(N ) , where N = ⌈s′ ℓS (a)ρ−1 a (4R) + ′ + 2R + t ⌉, then we can find an element y in ∆X (x̄) such that (x, y) ∈ ∆ (a, R) and (x′ , y) ∈ ∆− (a, R). And we say that the homoclinic equivalence relation ∆X has strong a-specification (respectively, a-specification) if there exists a point x̄ ∈ X such that ∆X (x̄) has strong a-specification (respectively, a-specification). Remark 3.3. In the above definition of rj , one can take a different ratio than 1/4 as long as it is less than 1/2. This would be clear from the proof of Lemma 3.4 below. For later use, we would take a to be an (SDT) or undistorted element. We record the following lemmas for later use. Lemma 3.4. Let g be an element in G with infinite order. Then ( S R)) ∩ ( j≥0 g j B([rj ] + R)) ⊆ B(ℓS (g)ρ−1 g (4R) + 2R). S j≥0 g −j B([rj ] + Proof. Suppose h = g −j1 h1 = g j2 h2 for some j1 , j2 ≥ 0 and hi ∈ B([rji ] + R), j1 +j2 i = 1, 2. Then g j1+j2 = h1 h−1 ) = ℓS (h1 h−1 2 ; hence, ρg (j1 + j2 ) ≤ ℓS (g 2 ) ≤ [rj1 ] + [rj2 ] + 2R ≤ 2rj1+j2 + 2R ≤ 2ρg (j1 + j2 )/4 + 2R, therefore, ρg (j1 + j2 ) ≤ 4R, j2 j2 and j1 +j2 ≤ ρ−1 g (4R), so ℓS (h) = ℓS (g h2 ) ≤ ℓS (g )+ℓS (h2 ) ≤ ℓS (g)j2 +rj2 +j1 +R ≤ −1 −1 ℓS (g)ρg (4R) + ρg (j1 + j2 )/4 + R ≤ ℓS (g)ρg (4R) + 2R.  Lemma 3.5. Let (G, AG ) be the full shift. If a ∈ G is an (SDT) element, then ∆X (x̄) has strong a-specification, where x̄ = (0)G , i.e. x̄ is the element in X = AG with every coordinate to be a constant 0 ∈ A. Proof. The proof is similar to the proof of [12, Lemma 4], but we use Lemma 3.4 now instead of [12, Lemma 3].  4. Proof of Theorem 1.1 Recall that the main steps in the proof of [12, Theorem 1] is to apply [12, Lemma 2, Corollary 2, Lemma 5, Lemma 6, Lemma 7, Lemma 1] successively. In this section, we prepare the corresponding lemmas in our setting. The proofs are natural modification of the ones in [12]. For completeness, we record the main changes below. Lemma 4.1. Let G be a group with a finite symmetric generating set S. Assume G has one end, sub-exponential divergence function and g, h are (SDT) elements in G, (h),+ (g),+ then cfg (x, y) = cfh (x, y) for all (x, y) ∈ ∆X , where fg (x) := c(g, x), fh (x) := c(h, x) for all x ∈ X and c : G × X → H is a Hölder continuous cocycle with (G, X) being a subshift and H ∈ Ginv . Proof. First, since limn→∞ ℓS (g n ) = ∞, after passing to a subsequence, we may assume 3ℓS (g n )/2 < ℓS (g n+1) for all n ≥ 1. Then, for each large enough n (e.g. any 10 NHAN-PHU CHUNG AND YONGLE JIANG n such that ℓS (g n ) > ℓS (h)), we may find m(n) such that 2ℓS (g n ) < ℓS (hm(n) ) < 3ℓS (g n ). This is possible since |ℓS (hm ) − ℓS (hm+1 )| ≤ ℓS (h) < 3ℓS (g n ) − 2ℓS (g n ). Note that we have the following facts. (1) We may assume {m(n)}n is an increasing sequence after passing to a subsequence since 3ℓS (g n ) < 2ℓS (g n+1). (2) ℓS (g −n hm(n) ) ≥ ℓS (hm(n) ) − ℓS (g n ) ≥ ℓS (g n ) → ∞ as n → ∞. (3) ℓS (g −n hm(n) ) ≤ ℓS (hm(n) ) + ℓS (g n ) ≤ (1/2 + 1)ℓS (hm(n) ), also ≤ (1 + 3)ℓS (g n ); hence ℓS (g −n hm(n) ) ≤ 4 · min{ℓS (g n ), ℓS (hm(n) )}. Since both g and h are (SDT) elements, by Lemma 3.1 and the definition of (g),+,(n) cf , we just need to show lim lim d(c(hm , x)−1 c(hm , y), c(g n, x)−1 c(g n , y)) = 0. m=m(n)→∞ n→∞ Since (x, y) ∈ ∆X , write x|B(R)c = y|B(R)c for some R > 0. Let n >> 1. Since G has one end, we can find a path p = p(n) which avoids the ball with radius min{ℓS (g −n ), ℓS (h−m(n) )}/2 − 2 to connect g −n with h−m . Write −1 −n m g −n = h−m s−1 h )) and si ∈ S. Then from the 1 · · · sk , where k ≤ DivX (ℓS (g following equality: c(g n , x) = c(sk , sk−1 · · · s1 hm x)c(sk−1 , sk−2 · · · s1 hm x) · · · c(s1 , hm x)c(hm , x), we deduce that d(c(hm , x)−1 c(hm , y), c(g n, x)−1 c(g n , y)) = d(c(sk , sk−1 · · · s1 hm x)c(sk−1 , sk−2 · · · s1 hm x) · · · c(s1 , hm x), c(sk , sk−1 · · · s1 hm y)c(sk−1, sk−2 · · · s1 hm y) · · · c(s1 , hm y)) ≤ k X d(c(sj , sj−1 · · · s1 hm x), c(sj , sj−1 · · · s1 hm y)). j=1 Now, note that (sj−1 · · · si hm x)B(M ) = (sj−1 · · · si hm y)B(M ) for all 1 ≤ j ≤ k, where M = min{ℓS (g −n ), ℓS (h−m )}/2 − 2 − R − 1 ≥ ℓS (g −n hm )/8 − R − 3. Hence, we have the following estimation. k X d(c(sj , sj−1 · · · s1 hm x), c(sj , sj−1 · · · s1 hm y)) j=1 −n m ≤ kCr M ≤ C · DivX (ℓS (g −n hm ))r ℓS (g h )/8−R−3 → 0, as n → ∞ since limn→∞ ℓS (g −n hm ) = ∞. Here r := max{rs : s ∈ S}, C := max{Cs : s ∈ S}, where rs , Cs are the constants appeared when defining Hölder continuity of c(s, −).  Remark 4.2. One can also use Gersten’s definition of divergence functions in [24] for the above proof (still assuming the sub-exponential growing condition on these functions). For the relation between this function and the one used in this paper, see [17, Lemma 3.13]. DIVERGENCE, UNDISTORTION AND HÖLDER CONT. COCYCLE SUPERRIGIDITY 11 Similar to [12, Corollary 2], we have the following lemma. Lemma 4.3. Let G be a group with a finite symmetric generating set S. Assume G (g),− (g),+ has one end and g is an (SDT) element in G, then cfg (x, y) = cfg (x, y) for all (x, y) ∈ ∆X , where fg (x) := c(g, x) for all x ∈ X and c : G × X → H is a Hölder continuous cocycle with (G, X) being a subshift and H ∈ Ginv . Lemma 4.4. Let X ⊂ AG be a subshift and f : X → H be Hölder continuous, where H ∈ Ginv . Assume that ∆X (x̄) has g-specification for some point x̄ ∈ X, (g),± where g ∈ G is an element with (SDT) property and the cocycles cf : ∆X → H in Lemma 3.1 are equal. Then (g),+ lim (x,x′ )→∆ d(cf (x, x′ ), eH ) = 0, where ∆ ⊂ X × X denotes the diagonal. x,x′ ∈∆X (x̄) Proof. Fix any l > 1, R > 0. Now, fix (x′ , x) ∈ ∆X and suppose d(x′ , x) is sufficiently small such that xB(L) = ′ ′ ′ ′ xB(L) , where L ≥ ⌈s′ ℓS (g)ρ−1 g (4R) + 2R + t ⌉ for some s , t as in Definition 3.2, then ∆X (x̄) has g-specification implies there exists some y ∈ ∆X (x̄) with (x′ , y) ∈ ∆− (g, R) and (x, y) ∈ ∆+ (g, R). Since (x′ , y) ∈ ∆− (g, R), x′ , y satisfy that (g j x′ )B([rj ]+R) = (g j y)B([rj ]+R) for all j ≥ 0. Then we deduce the following. d( l−1 Y f (g j x′ )−1 , l−1 Y l−1 X f (g j y)−1) ≤ = Cr R l−1 X Cr [rj ]+R j=0 j=0 j=0 j=0 d(f (g j x′ ), f (g j y)) ≤ l−1 X r [rj ] ≤ r R C X r [rj ] . j≥0 j=0 P (g),+ Hence, d(cf (y, x′ ), eH ) ≤ r R C j≥1 r [rj ] . Here, r, C are the constants appeared when defining f is Hölder continuous. We have used d(f (g j x′ ), f (g j y)) ≤ Cr [rj ]+R P and j≥0 r [rj ] < ∞ (since g has (SDT) property). Next, since (x, y) ∈ ∆+ (g, R), (g −j x)|B([rj ]+R) = (g −j y)|B([rj ]+R) for all j ≥ 0. We deduce the following. d( l−1 Y −j f (g x), j=1 l−1 Y l−1 X −j f (g y)) ≤ j=1 −j −j d(f (g x), f (g y)) ≤ j=1 = Cr R (g),− Hence d(cf (x, y), eH ) ≤ r R C (g),+ d(cf j≥1 r [rj ] r [rj ] ≤ r R C (g),+ (y, x′), eH ) + d(cf ≤ 2Cr R (g),+ X j≥0 r [rj ] . . Thus, we deduce (x, x′ ), cf = d(cf X j≥1 (g),+ (x, x′ ), eH ) ≤ d(cf Cr [rj ]+R j=1 l−1 X j=1 P l−1 X (g),+ (x, y)) + d(cf (g),− (x, y), eH ) (x, y), eH ) r [rj ] → 0, as R → ∞.  12 NHAN-PHU CHUNG AND YONGLE JIANG Lemma 4.5. Assume that there exists a point x̄ ∈ X such that ∆X (x̄)∩g −1 ∆X (x̄) is (g),+ dense in X, where g ∈ G has (SDT) property, and lim (x,x′ )→∆ d(cf (x, x′ ), eH ) = x,x′ ∈∆X (x̄) 0, where f : X → H is Hölder continuous and H ∈ Ginv , then there is a continuous map b : X → H such that the map x 7→ b(gx)−1 f (x)b(x) is constant on X. (g),± If g is undistorted, ∆X (x̄) has strong g-specification and the cocycles cf : ∆X → H in Lemma 3.1 are equal. Then b can be taken to be Hölder continuous. Proof. Observe that the proof of [12, Lemma 6] also works for H ∈ Ginv , so we are left to check the continuous map b defined there is Hölder continuous under the assumptions in the second part. From the proof of [12, Lemma 6], we know that for any x, x′ ∈ ∆X (x̄)∩g −1 ∆X (x̄), (g),+ d(b(x), b(x′ )) = d(b(x)b(x′ )−1 , eH ) = d(cf (x, x′ ), eH ). Since g is undistorted, from Proposition 2.6, we know ρg (n) ≥ λn for some λ > 0 n and all n ≥ 1. Hence, ρ−1 g (n) ≤ λ . ′ +2R+t′ +1 ≥ Now, for any R ∈ N, let N = ⌈ sλ ⌉ℓS (g)4R+2R+⌈t′ ⌉+1 ≥ s′ ℓS (g) 4R λ ′ ⌈s′ ℓS (g)ρ−1 g (4R) + 2R + t ⌉, from the estimate in the proof of Lemma 4.4, we know P (g),+ that if xB(N ) = x′B(N ) , then d(cf (x, x′ ), eH ) ≤ 2Cr R j≥0 r [rj ] . Here r, C are constants appeared when defining Hölder continuity of f . (g),+ Hence, if xB(N ) = x′B(N ) , then d(cf (x, x′ ), eH ) ≤ C ′ r ′N , where C ′ := 2C X r ⌈t′ ⌉+1 ′ S (g)⌈s /λ⌉ [rj ]− 2+4ℓ 1 > 0, 0 < r ′ = r 2+4ℓS (g)⌈s′ /λ⌉ < 1. j≥0 ′ Therefore, d(b(x), b(x′ )) ≤ C ′ r ′N for N = ⌈ sλ ⌉ℓS (g)4R + 2R + ⌈t′ ⌉ + 1. Let R change, then we deduce d(b(x), b(x′ )) ≤ C ′′ r ′′N for all N ∈ N and some constants C ′′ > 0, 0 < r ′′ < 1. Then since ∆X (x̄) ∩ g −1 ∆X (x̄) is dense in X and b is continuous, a simple density argument implies that for all x, x′ ∈ X with xB(N ) = x′B(N ) , d(b(x), b(x′ )) ≤ C ′′ r ′′N for all N ∈ N. Hence b is Hölder continuous.  Lemma 4.6. Assume G has one end, gi ∈ G is an element with (SDT) property, and there exists a point x̄ ∈ X such that ∆X (x̄) ∩ gi −1 ∆X (x̄) is dense in X and lim (x,x′ )→∆ x,x′ ∈∆X (x̄) (g ),+ d(cfgii (x, x′ ), eH ) = 0, for all i = 1, · · · , k, where k is any positive integer (maybe infinity), then there is a continuous map b : X → H such that the map x 7→ b(gx)−1 c(g, x)b(x) is constant on X (depending only on g) for all g ∈ hg1 , · · · , gk i, where c : G × X → H is a Hölder continuous cocycle and H ∈ Ginv . If we further assume gi is undistorted and ∆X (x̄) has strong gi -specification for all i, then such a b can be taken to be Hölder continuous. DIVERGENCE, UNDISTORTION AND HÖLDER CONT. COCYCLE SUPERRIGIDITY 13 Proof. The proof is the same as the proof of [12, Lemma 7] after replacing [12, Lemma 6, Lemma 2] with Lemma 4.5 and Lemma 4.1 respectively.  Lemma 4.7. The statement is the same as [12, Lemma 1] except we replace “continuous” by “Hölder continuous” everywhere. Proof. The proof still works here since we do not change the transfer map.  Using these Lemmas, we can finish the proof of Theorem 1.1 and Corollary 1.2. Proof of Theorem 1.1. Same proof as the proof of [12, Theorem 1] still works here. Note that we need to use Lemma 2.7 now instead of [12, Lemma 8].  Proof of Corollary 1.2. By Lemma 3.5, we can apply Theorem 1.1 to full shifts.  5. Examples, groups in GH and remarks Besides full shifts, we give another class of subshifts satisfying assumptions of Theorem 1.1. Example 5.1. (The generalized golden mean subshifts) Let A = {0, 1, · · · , k} and F1 , · · · , Fm be non-empty finite subsets of G. Let X(F1 , · · · , Fm ) be a subset of AG consisting of all x ∈ AG such that for every 1 ≤ j ≤ m, g ∈ G, there exists gj ∈ gFj such that xgj = 0. Then it is a subshift of AG . Using the same argument as in the proof of [12, Lemma 10], we also obtain that ∆X has strong a-specification in the sense of definition 3.2 for every element a in G with infinite order. And hence similar to the proof of [12, Corollary 4], we know that the generalized golden mean subshifts X(F1 , · · · , Fm ) are examples of our theorem 1.1 Remark 5.2. In our main theorem, if we drop the condition of specification, the result does not hold any more even for the special case G = Zd , d > 1, see for example [39, Example 4.3]. Now we will investigate the class of one-ended groups having undistorted elements and sub-exponential growing divergence functions. Before giving examples of groups with sub-exponential growing divergence functions, let us review definitions of wide groups, unconstricted groups, and thick groups [4, 5, 18]. Let X be a connected, locally connected topological space. A point x ∈ X is a (global) cut-point if X \ {x} has at least two connected components. Definition 5.3. We call a finitely generated group G unconstricted if one of its asymptotic cones has no cut-points. We say a finitely generated group G wide if none of its asymptotic cones has a cut-point. Clearly, wide groups are unconstricted. And by Stallings’ Ends theorem, we know that unconstricted groups are one-ended groups. Recall that a finitely generated subgroup H of a finitely generated group G is undistorted if any word metric of H is bi-Lipschitz equivalent to a word metric of G restricted to H. 14 NHAN-PHU CHUNG AND YONGLE JIANG Definition 5.4. (Algebraic network of subgroups) Let G be a finitely generated group, H be a finite collection of subgroups of G and let M > 0. We say G is an M-algebraic network with respect to H if • All subgroups in H are finitely generated and undistorted in G; • there is a finite index subgroup G1 of G such that G ⊂ NM (G1 ) and such S that a finite generating set of G1 is contained in H∈H H; • any two subgroups H, H ′ in H can be thickly connected in H in the sense that there exists a finite sequence H = H1 , . . . , Hn = H ′ of subgroups in H such that for all 1 ≤ i < n, Hi ∩ Hi+1 is infinite. Definition 5.5. (Algebraic thickness) Let G be a finitely generated group. G is called algebraically thick of order zero if it is unconstricted. We say G is M-algebraically thick of order at most n + 1 with respect to H, where H is a finite collection of subgroups of G and M > 0, if • G is an M-algebraic network with respect to H; • all subgroups in H are algebraically thick of order at most n. G is said to be algebraically thick of order n + 1 with respect to H, when n is the smallest value for which this statement holds. And G is algebraically thick of order n + 1 if G is algebraically thick of order n + 1 with respect to H for some H. The algebraic thickness property of G does not depend on the word metric on G. Let X be a metric space. For L, C > 0, an (L, C)-quasi-geodesic is an (L, C)quasi-isometric embedding f : I → X, where I is a connected subset in R. For every subset A of X and r > 0, we denote by Nr (A) := {x ∈ X : dist(x, A) < r}. For C > 0, a subset A in X is called C-path connected if any two points in A can be connected by a path in NC (A). We say that A is C-quasi-convex if any two points in A can be connected in NC (A) by an (C, C)-quasi-geodesic. Definition 5.6. (Tight algebraic network of subgroups). We say a finitely generated group G is an M-tight algebraic network with respect to H if • H is a collection of M-quasiconvex subgroups • there is a finite index subgroup G1 of G such that G ⊂ NM (G1 ) and such S that a finite generating set of G1 is contained in H∈H H; • and for any two subgroups H, H ′ ∈ H there exists a finite sequence H = H1 , . . . , Hm = H ′ of subgroups in H such that for all 1 ≤ i < m, the intersection Hi ∩ Hi+1 is infinite and M-path connected. Definition 5.7. (Strong algebraic thickness). Let G be a finitely generated group. G is strongly algebraically thick of order zero if it is wide. Given M > 0, we say G is M-strongly algebraically thick of order at most n + 1 with respect to a finite collection of subgroups H of G, if • G is an M-tight algebraic network with respect to H; • all subgroups in H are strongly algebraically thick of order at most n. DIVERGENCE, UNDISTORTION AND HÖLDER CONT. COCYCLE SUPERRIGIDITY 15 We say G is strongly algebraically thick of order n + 1 with respect to H, when n is the smallest value for which this statement holds. And G is strongly algebraically thick of order n + 1 if G is strongly algebraically thick of order n + 1 with respect to H for some H. The strongly algebraic thickness property of G does not depend on the word metric on G. We list some examples of G with sub-exponential growing divergence functions. • linear divergence: From [17, Proposition 1.1], every group is wide if and only if it has linear divergence. And here are some examples of wide groups. (1) Non-virtually cyclic groups satisfying a law are wide [18, Corollary 6.13]. A law is a word w in n letters x1 , . . . , xn and a group G satisfies the law w if w = 1 in G whenever x1 , . . . , xn are replaced by every set of n elements in G. Solvable groups, uniformly amenable finitely generated groups are groups satisfying a law [18, Corollary 6.16]. (2) Non-virtually cyclic groups whose center contains Z are wide [18, Theorem 6.5]. (3) Products of arbitrary infinite groups are wide [5, Example 1, page 555]. Note that although [5, Example 1, page 555] only mentioned that these groups are unconstricted, indeed from there we can get they are actually wide. (4) Let G be an irreducible lattice in a semi-simple Lie group of higher rank. Assume that G is either of Q-rank 1 or is of the form SLn (OS ), where n ≥ 3, S is a finite set of valuations of a number field K including all infinite valuations, and OS is the associated ring of S-integers. Then G is wide [17, Proposition 1.1 and Theorem 1.4]. (5) [17, page 2455, last paragraph] Let G be a connected semisimple Lie group with finite center, no nontrivial compact factors and R-rank> 1. Let Γ be a uniform lattice of G. Then Γ is quasi-isometric to G. And hence each asymptotic cone of Γ is bi-Lipschitz equivalent to an asymptotic cone of G. With conditions of G, the quotient space G/K where K is a maximal compact subgroup of G is a symmetric space of noncompact type and has no Euclidean factor. Thus, applying [32, Theorem 5.2.1], we get that every asymptotic cone of G/K is an Euclidean building of rank> 1 and every two points in the asymptotic cone belong to a 2-dimensional flat. Therefore, every asymptotic cone of G/K has no cut points. Hence so are G and Γ. Thus, Γ is wide. (6) R. Thompson groups F := hs, t|[st−1, s−1 ts] = [st−1 , s−2 ts2 ] = 1i, T , V [26, Corollary 2.14]. • polynomial growth divergence: if a finitely generated group G is strongly algebraic thick of order n, then its divergence is at most polynomial of degree n + 1 [4, Corollary 4.17]. And here are some examples of strongly algebraic thick groups. Note that although in [5] the authors only proved that these 16 NHAN-PHU CHUNG AND YONGLE JIANG groups are algebraic thick , the proofs there also imply that they are actually strongly algebraic thick groups. (1) Mapping class groups MCG(Σg,p ), where Σg,p is an orientable surface of genus g with p punches satisfying 3g + p > 4 [5, Theorem 8.1]; (2) Aut(Fn ), Out(Fn ) for n ≥ 3 [5, Theorem 9.2]; • sub-exponential growth: in [35, Corollary 6.4], the authors constructed groups whose divergences are sub-exponential but non-polynomials. However, these groups are torsion and hence do not have undistorted elements. Non-elementary word hyperbolic groups are examples of groups with at least exponential divergence, see [2, Theorem 2.19] or [27]. Many groups satisfy property (UD). Here we list some of them: • finitely generated abelian groups [25, Lemma 6.4]. • Heisenberg group H3 (Z). • biautomatic groups [25, Proposition 6.6]. Geometrically finite hyperbolic groups are biautomatic [19, Theorem 11.4.1] • mapping class group MCG(Σg,m ), where Σg,m is an oriented surface of genus g and m punches [21, Theorem 1.1]. • (outer) automorphism group of a finitely generated free group [1, Theorem 1.1]. • semihyperbolic groups [8, III. Lemma 4.18, p. 479]. Note that biautomatic groups are semihyperbolic [20, page 59]. • Let Γ be an irreducible uniform lattice in a semisimple linear Lie group G 6= SO(n, 1). Then Γ is bicombable, i.e. Γ is semihyperbolic [20, Theorem 1.1 and page 59]. Indeed, following the remark after [20, Theorem 1.1], we can prove that every irreducible uniform lattice in a connected semisimple Lie group with finite center is also semihyperbolic. • SLn (Z) [11, Examples 2.13–2.15]. • Let (M; ω) be a closed symplectically hyperbolic manifold and denote by Ham(M; ω) the group of Hamiltonian diffeomorphisms. Then every finitely generated subgroup G of Ham(M; ω) has undistorted elements [38, Theorem 1.6.A and remark 1.6.C] • R. Thompson groups F [9, Proposition 4], T [10, Corollary 5.4], V [6, Theorem 1.3] (note that the R. Thompson group V is V2 in [6]). From the above arguments, we know that the class of one-ended groups having undistorted elements and sub-exponential growing divergence functions will contain the class (UW) and the class (ET), where (UW) is the class of wide groups having undistorted elements and (ET) is the class of one-ended groups being strongly algebraic thick of order n for some n ≥ 1. The following groups are in the class (UW): • Let G be a connected semisimple higher rank Lie groups with finite center and no nontrivial compact factors. Let Γ be an irreducible uniform lattice in G. Then Γ is wide and has undistorted elements. DIVERGENCE, UNDISTORTION AND HÖLDER CONT. COCYCLE SUPERRIGIDITY 17 • Baumslag-Solitar groups BS(m, n) with 1 < |m| = |n|. • Heisenberg group H3 (Z). • Z × G, where G is infinite. • SLn (Z), n ≥ 3. • R. Thompson groups F, T, V . To see BS(m, n) ∈ (UW ), observe that it has a finite index subgroup Z×Fn which has one end, linear divergence and (UD) when 1 < |m| = |n| and the following holds. Lemma 5.8. Let G′ < G be a subgroup inclusion of finitely generated groups. If the inclusion map is a quasi-isometry (e.g. [G : G′ ] < ∞), and G′ has (UD) property, then G also has (UD) property. The class of (ET) includes the following groups (1) Aut(Fn ), Out(Fn) for n ≥ 3. (2) Mapping class groups MCG(Σg,p ), where Σg,p is a closed, orientable, connected surface of genus g > 1 with p-punches. Applying [14, Section 3], we know that Aut(Fn ), Out(Fn ) and MCG(Σg,p ) for n ≥ 3, g > 1, p ≥ 0 have property F R, i.e every its action on an R-tree have a fixed point. As a consequence, they have property FA and hence applying [40, Theorem 15, page 58] and Stallings’ End theorem we know that they are one-ended groups. From [35, Corollary 6.4], we ask the following question Question 5.9. Are there finitely generated groups whose divergences are sub-exponential but non-polynomials have undistorted elements? Our class of groups GH also contains all one-ended right-angled Artin groups. Let Γ be a finite, simplicial graph with vertex set V . The right-angled Artin group (RAAG) associated to Γ is the group AΓ with presentation AΓ := {V | vw = wv if v and w are connected by an edge in Γ}. If Γ is connected then AΓ is always has polynomial divergence [3, Corollary 4.8]. Furthermore if Γ has at least 3 vertices then AΓ has one end when Γ is connected [7, Theorem B] or [34, Corollary 5.2]. Because AΓ projects onto Zn , where n is the number of vertices in Γ, by adding all commuting relations between the generators, for any generator s in AΓ , the length of sk in AΓ is greater than or equal to the length of s̄k in Zn . Thus, AΓ is undistorted. Therefore, if V has at least 3 vertices and is connected then the RAAG group AΓ belongs to GH . Similarly, certain right-angled Coxeter groups (RACGs) also belong to our class. Given a finite simplicial graph Γ with vertices V , the associated RACG WΓ is the group with presentation WΓ := {V | v 2 = 1, vw = wv if v and w are connected by an edge in V}. For a graph Γ, we define the associated four-cycle graph Γ4 as follows. The embedded loops of length four (i.e. four-cycles) in Γ are the vertices of Γ4 . Two vertices of Γ4 are connected by an edge if the corresponding four-cycles in Γ share a pair of 18 NHAN-PHU CHUNG AND YONGLE JIANG adjacent edges. Given a subgraph Γ1 of Γ4 , we define the support of Γ1 to be the collection of vertices of Γ appearing in the four-cycles in Γ corresponding to the vertices of Γ1 . A graph Γ is said to be CFS (Component with Full Support) if there exists a component of Γ4 whose support is the entire vertex set of Γ. A point or vertex in Γ is separating if its complement in Γ is not connected. If Γ is connected, triangle-free; has no separating vertices or edges then WΓ is one-ended [16, Theorem 8.7.2]. Furthermore, if it is join, i.e a complete bipartite graph, or CFS then WΓ has a polynomial divergence [15, Theorem 1.1]. Besides, if WΓ is not finite, i.e. there exist two vertices, say v and w, of Γ that are not connected by an edge, then the element g := vw is undistorted in WΓ by applying Theorems 3.2.16, 3.3.4, 3.4.2 and Corollary 6.12.6 in [16]. Since we are unaware of any criterion to classify one-ended groups with both subexponential divergence function and property (UD), we want to end the paper with the following question: Question 5.10. Let G be a finitely generated non-torsion amenable group that is not virtually cyclic, does G have (UD)? Does G have sub-exponential divergence function? What about G is any finitely generated infinite group with property (T) but not hyperbolic? References [1] E. Alibegović, Translation lengths in Out(Fn ), Geom. Dedicata 92 (2002), 87–93. [2] J. M. Alonso, T. Brady, D. Cooper, V. Ferlini, M. Lustig, M. Mihalik, M. Shapiro, and H. Short, Notes on word hyperbolic groups, Group theory from a geometrical viewpoint (Trieste, 1990), World Sci. Publ., River Edge, NJ, 1991, pp. 3–63. Edited by Short. [3] J. Behrstock and R. Charney, Divergence and quasimorphisms of right-angled Artin groups, Math. Ann. 352 (2012), no. 2, 339–356. [4] J. Behrstock and C. Druţu, Divergence, thick groups, and short conjugators, Illinois J. Math. 58 (2014), no. 4, 939–980. [5] J. Behrstock, C. Druţu, and L. Mosher, Thick metric spaces, relative hyperbolicity, and quasiisometric rigidity, Math. Ann. 344 (2009), no. 3, 543–595. [6] C. Bleak, H. Bowman, A. Gordon Lynch, G. Graham, J. Hughes, F. Matucci, and E. Sapir, Centralizers in the R. Thompson group Vn , Groups Geom. Dyn. 7 (2013), no. 4, 821–865. [7] N. Brady and J. Meier, Connectivity at infinity for right angled Artin groups, Trans. Amer. Math. Soc. 353 (2001), no. 1, 117–132. [8] M. R. Bridson and A. Haefliger, Metric spaces of non-positive curvature, Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences], vol. 319, Springer-Verlag, Berlin, 1999. [9] J. Burillo, Quasi-isometrically embedded subgroups of Thompson’s group F , J. Algebra 212 (1999), no. 1, 65–78. [10] J. Burillo, S. Cleary, M. Stein, and J. Taback, Combinatorial and metric properties of Thompson’s group T , Trans. Amer. Math. Soc. 361 (2009), no. 2, 631–652. [11] D. Calegari and M. H. Freedman, Distortion in transformation groups, Geom. Topol. 10 (2006), 267–293. With an appendix by Yves de Cornulier. [12] N. Chung and Y. Jiang, Continuous Cocycle Superrigidity for Shifts and Groups with One End, Math. Ann. 368 (2017), no. 3-4, 1109–1132. DIVERGENCE, UNDISTORTION AND HÖLDER CONT. COCYCLE SUPERRIGIDITY 19 [13] D. B. Cohen, Continuous cocycle superrigidity for the full shift over a finitely generated torsion group, arXiv: 1706.03743. [14] M. Culler and K. Vogtmann, A group-theoretic criterion for property FA, Proc. Amer. Math. Soc. 124 (1996), no. 3, 677–683. [15] P. Dani and A. Thomas, Divergence in right-angled Coxeter groups, Trans. Amer. Math. Soc. 367 (2015), no. 5, 3549–3577. [16] M. W. Davis, The geometry and topology of Coxeter groups, London Mathematical Society Monographs Series, vol. 32, Princeton University Press, Princeton, NJ, 2008. [17] C. Druţu, S. Mozes, and M. Sapir, Divergence in lattices in semisimple Lie groups and graphs of groups, Trans. Amer. Math. Soc. 362 (2010), no. 5, 2451–2505. [18] C. Druţu and M. Sapir, Tree-graded spaces and asymptotic cones of groups, Topology 44 (2005), no. 5, 959–1058. With an appendix by Denis Osin and Mark Sapir. [19] D. B. A. Epstein, J. W. Cannon, D. F. Holt, S. V. F. Levy, M. S. Paterson, and W. P. Thurston, Word processing in groups, Jones and Bartlett Publishers, Boston, MA, 1992. [20] B. Farb, Combing lattices in semisimple Lie groups, Groups—Korea ’94 (Pusan), de Gruyter, Berlin, 1995, pp. 57–67. [21] B. Farb, A. Lubotzky, and Y. Minsky, Rank-1 phenomena for mapping class groups, Duke Math. J. 106 (2001), no. 3, 581–597. [22] J. Franks and M. Handel, Distortion elements in group actions on surfaces, Duke Math. J. 131 (2006), no. 3, 441–468. [23] A. Furman, On Popa’s cocycle superrigidity theorem, Int. Math. Res. Not. IMRN 19 (2007), Art. ID rnm073, 46. [24] S. M. Gersten, Quadratic divergence of geodesics in CAT(0) spaces, Geom. Funct. Anal. 4 (1994), no. 1, 37–51. [25] S. M. Gersten and H. B. Short, Rational subgroups of biautomatic groups, Ann. of Math. (2) 134 (1991), no. 1, 125–158. [26] G. Golan and M. Sapir, Divergence of Thompson groups, preprint, arXiv:1709.08144. [27] M. Gromov, Hyperbolic groups, Essays in group theory, Math. Sci. Res. Inst. Publ., vol. 8, Springer, New York, 1987, pp. 75–263. , Asymptotic invariants of infinite groups, Geometric group theory, Vol. 2 (Sussex, [28] 1991), London Math. Soc. Lecture Note Ser., vol. 182, Cambridge Univ. Press, Cambridge, 1993, pp. 1–295. [29] A. Katok and V. Niţică, Rigidity in higher rank abelian group actions. Volume I, Cambridge Tracts in Mathematics, vol. 185, Cambridge University Press, Cambridge, 2011. [30] A. B. Katok and K. Schmidt, The cohomology of expansive Zd -actions by automorphisms of compact, abelian groups, Pacific J. Math. 170 (1995), no. 1, 105–142. [31] A. Katok and R. J. Spatzier, First cohomology of Anosov actions of higher rank abelian groups and applications to rigidity, Inst. Hautes Études Sci. Publ. Math. 79 (1994), 131–156. [32] B. Kleiner and B. Leeb, Rigidity of quasi-isometries for symmetric spaces and Euclidean buildings, Inst. Hautes Études Sci. Publ. Math. 86 (1997), 115–197 (1998). [33] X. Li, Continuous orbit equivalence rigidity, to appear in Ergod. Th. Dyn. Sys. [34] J. Meier, Geometric invariants for Artin groups, Proc. London Math. Soc. (3) 74 (1997), no. 1, 151–173. [35] A. Y. Ol′shanskii, D. V. Osin, and M. V. Sapir, Lacunary hyperbolic groups, Geom. Topol. 13 (2009), no. 4, 2051–2140. With an appendix by Michael Kapovich and Bruce Kleiner. [36] S. Popa, Cocycle and orbit equivalence superrigidity for malleable actions of w-rigid groups, Invent. Math. 170 (2007), no. 2, 243–295. , On the superrigidity of malleable actions with spectral gap, J. Amer. Math. Soc. 21 [37] (2008), no. 4, 981–1000. 20 NHAN-PHU CHUNG AND YONGLE JIANG [38] L. Polterovich, Growth of maps, distortion in groups and symplectic geometry, Invent. Math. 150 (2002), no. 3, 655–686. [39] K. Schmidt, The cohomology of higher-dimensional shifts of finite type, Pacific J. Math. 170 (1995), no. 1, 237–269. [40] J.-P. Serre, Trees, Springer-Verlag, Berlin-New York, 1980. Translated from the French by John Stillwell. [41] P. Walters, An introduction to ergodic theory, Graduate Texts in Mathematics, vol. 79, Springer-Verlag, New York-Berlin, 1982. Nhan-Phu Chung, Department of Mathematics, Sungkyunkwan University, Suwon 440-746, Korea. Tel: +82 031-299-4819 E-mail address: [email protected];[email protected] Yongle Jiang, Department of Mathematics, Sungkyunkwan University, Suwon 440-746, Korea. E-mail address: [email protected]
4math.GR
1 Designing Distributed Fixed-Time Consensus Protocols for Linear Multi-Agent Systems Over Directed Graphs arXiv:1605.07761v2 [cs.SY] 26 May 2016 Yu Zhao, Yongfang Liu, Guanrong Chen Abstract This technical note addresses the distributed fixed-time consensus protocol design problem for multi-agent systems with general linear dynamics over directed communication graphs. By using motion planning approaches, a class of distributed fixed-time consensus algorithms are developed, which rely only on the sampling information at some sampling instants. For linear multi-agent systems, the proposed algorithms solve the fixed-time consensus problem for any directed graph containing a directed spanning tree. In particular, the settling time can be off-line pre-assigned according to task requirements. Compared with the existing results for multi-agent systems, to our best knowledge, it is the first-time to solve fixedtime consensus problems for general linear multi-agent systems over directed graphs having a directed spanning tree. Extensions to the fixed-time formation flying are further studied for multiple satellites described by Hill equations. Index Terms Fixed-time consensus, linear multi-agent system, directed graph, pre-specified settling time, directed spanning tree. I. I NTRODUCTION Over the past few years, the coordinative control problems of multi-agent systems are of great interest to various scientific and engineering communities [1], [2], [3], [4], [5], due to its broad applications in such fields as spacecraft formation flying, distributed sensor network, automated highway systems, and so forth [6], [7], [8], [9]. Compared to the traditional monolithic systems, the coordination control reduces the systems cost, breaches the size constraints and prolongs the life span of the systems. One interesting and important issue arising from coordination control of multi-agent systems is to design distributed protocols based only on the local relative information to guarantee the states of all agents to reach an agreement, known as the consensus problem. According to convergence rate, existing consensus algorithms can be roughly categorized into two classes, namely, asymptotic consensus [10], [11], [12], [13], [14] and finite-time consensus [15], [16], [17], [18]. For the consensus control problem, a key task is to design appropriate distributed controllers which are usually called consensus protocols. Due to the practical engineering requirements of networked agents, designing finite-time consensus protocols has been a hot research topic in the area of consensus problem. Y. Zhao and Y. Liu are with the School of Automation, Northwestern Polytechnical University, Xi’an Shaanxi, 710129, China (e-mail: [email protected]; [email protected]). G. Chen is with the Department of Electronic Engineering, City University of Hong Kong, Kowloon, Hong Kong (e-mail: [email protected]). May 27, 2016 DRAFT 2 Previous works of study the finite-time consensus problem was firstly shown in [15] for first-order multi-agent systems, where the signed gradient flows of a differential function and discontinuous algorithms were used. Since then, a variety of finite-time consensus algorithms have been proposed to solve the finite-time consensus problem under different scenarios; see [16], [17], [19] and references therein. Then, over directed graphs having a spanning tree, the finite-time consensus protocol designing problems was studied in [20], [21], [22]. Further, a class of finite-time consensus protocols for second-order multi-agent systems are given in [23], [24], [18], [27]. Then, the finite-time consensus problems for multiple non-identical second-order nonlinear systems in [28] with the settling time estimation, where the settling time functions is depend on initial states of the agents. It prohibits their practical applications if the knowledge of initial conditions is unavailable in advance. Recently, the authors in [25], [26] present a novel class of nonlinear consensus protocols for integrator-type multi-agent networks, called fixed-time consensus which assumes uniform boundedness of a settling time regardless of the initial conditions. Also, for multiple linear systems, fixed-time formation problems were studied in [29]. However, most of the above-mentioned works in [25], [26], [29] are derived for multiagent systems under undirected topologies. It is significant and challenging to solve the fixed-time consensus problem for linear multi-agent systems over directed topologies. Motivated by the above observations, by using motion planning approaches, this technical note investigates the fixed-time consensus problem of general linear multi-agent systems over directed graphs. Main contributions of this technical note can be summed up in the following aspects. Firstly, by using motion planning approaches, a novel framework is introduced to solve fixedtime consensus problems. In this framework, for general linear multi-agent systems considered in this technical note, a novel class of distributed protocols are designed to solve fixed-time consensus problems. In particular, the settling time can be off-line pre-specified according to task requirements. Secondly, the communication topologies among the networked agents in this technical note is directed and contains a directed spanning tree. To the best of authors’ knowledge, it is the first time to solve fixed-time consensus problems for general linear multi-agent systems over directed graphs. Finally, the protocols designed in this technical note are based only on sampling measurements of the relative state information among its neighbors, which greatly reduces cost of the network communication. Notations: Let Rn and Rn×n be the sets of real numbers and real matrices, respectively. In represents the identity matrix of dimension n. Denote by 1 a column vector with all entries equal to one. The matrix inequality A > (≥)B means that A − B is positive (semi-) definite. Denote by A ⊗ B the Kronecker product of matrices A and B. For a vector x ∈ Rn , let kxk denote 2-norm of x. For a set V , |V | represents the number of elements in V . II. N OTATION AND P RELIMINARIES Let Rn×n be the set of n × n real matrices. The superscript T means transpose for real matrices. In represents the identity matrix of dimension n, and I denotes the identity matrix of an appropriate dimension. Let 1n denote the vector with all entries equal to one. For ξ ∈ C, Re(ξ) denote by its real part. diag(A1 , · · · , AN ) represents a block-diagonal matrix with matrices Ai , i = 1, · · · , n, on its diagonal. The Kronecker product [30] of matrices A ∈ Rm×n and May 27, 2016 DRAFT 3 A ∈ Bp×q is defined as  a11 B . . . a1n B ..  .. A ⊗ B =  ... . . am1 B . . . amn B  which satisfies the following properties: (A ⊗ B)(C ⊗ D) = (AC ⊗ BD), (A ⊗ B)T = AT ⊗ B T , A ⊗ B + A ⊗ C = A ⊗ (B + C). For systems with n agents, a directed graph G = (V, E) is developed to model the interaction among these agents, where V = {1, 2, · · · , N} is the vertex set and E ⊂ {(vi , vj ) : vi , vj ∈ V} is the edge set, where an edge is an ordered pair of vertices in V which means that agent j can receive information from agent i. If there is a directed edge from i to j , i is defined as the parent node and j is defined as the child node. The neighbors of node i are denoted by Ni = {j ∈ V|(vi , vj ) ∈ E}, and |Ni | is the neighbors number of agent i. A directed tree is a directed graph, where every node, except the root, has exactly one parent. A spanning tree of a directed graph is a directed tree formed by graph edges that connect all the nodes of the graph. We say that a graph has (or contains) a spanning tree if a subset of the edges forms a spanning tree. The adjacency matrix A associated with G is defined such that aij = 1 if node i is adjacent to node j, and aij = 0 otherwise. The Laplacian matrix of the graph associated with adjacency N P matrix A is given as L = (lij ), where lii = aij and lij = −aij , i 6= j. j=1 III. D ISTRIBUTED FIXED - TIME CONSENSUS CONTROL FOR LINEAR MULTI - AGENT SYSTEMS OVER DIRECTED GRAPHS In this section, the distributed fixed-time consensus problem for linear multi-agent systems over directed graphs is studied. Consider a multi-agent systems with N agents with general linear dynamics, which may be regarded as the linearized model of some nonlinear systems [5], [6]. The dynamics of each agents in networks is described by ẋi (t) = Axi (t) + Bui (t), i = 1, 2, · · · , N, (1) where xi (t) = [xi1 (t), xi2 (t), · · · , xin (t)]T ∈ Rn is the state of agent i , ui ∈ Rm is its control input. A, B, are constant matrices with compatible dimensions, and (A, B) is controllable. Assumption 1. Suppose that the graph G of the communication topology is directed and has a spanning tree. Lemma 1. [31] Assume that directed graph G has a spanning tree. Then, zero is a simple eigenvalue of L with 1 as an eigenvector and all of the nonzero eigenvalues are in the open right half plane. Lemma 2. [2] Let M = [mij ] ∈ MN (R) be a stochastic matrix, where MN (R) represents the set of all N × N real matrices. If M has an eigenvalue λ = 1 with algebraic multiplicity equal May 27, 2016 DRAFT 4 to one, and all the other eigenvalues satisfy |λ| < 1, then M is SIA, that is, limk→∞ M k = 1ξ T , where ξ = (ξ1 , ξ2 , · · · , ξN )T ∈ RN satisfies M T ξ = ξ and 1T ξ = 1. Furthermore, each element of ξ is nonnegative. Definition 1. The fixed-time consensus problem for multi-agent systems (1) is said to be solved if and only if for a off-line pre-specified finite settling time Ts > 0, states of multi-agent systems (1) satisfy lim kxi (t) − xj (t)k = 0, ∀i, j ∈ V, t→Ts and xi (t) = xj (t) when t > Ts for any initial conditions. In this technical note, it is assumed that only relative measurements information can be used to develop the distributed consensus protocols. Moreover, the ith agent can only obtain the consensus error from its neighborhood. The objective of this technical note is to design a distributed control law ui based on the above-mentioned relative information such that the states of all the agents in networks reach fixed-time consensus over directed graphs. In order to achieve the control objective in this technical note, the following sampled-type protocol is proposed: X 1 ui (t) = − BT P (xi (tk ) − xj (tk )), (2) |Ni | + 1 j∈N i where P = e−A T (t−t ) k Φ−1 eA(tk+1 −tk ) ,    M (t −t ) 0n k+1 k , Φ = In 0 n e In   A BB T M= , 0n×n −AT tk ≤ t < tk+1 , i = 1, 2, · · · , N, 6 with the sampling time sequence {tk |tk = t0 + Tk , Tk = (πk) 2 Ts }, where Ts > 0 is a off-line pre-specified settling time according to task requirements. The above fixed-time consensus protocol is designed by considering the following Hamiltonian function: N Hi,k N X 1X T =− pTi (t)(Axi (t) + Bui (t)), ui (t)ui (t) + 2 i=1 i=1 (3) where pi (t) ∈ Rn represents the costate. Then, (3) is the Hamiltonian function of the cost function proposed as follows: Z N 1 tk+1 X T ui (t)Ri ui (t)dt, (4) Ji,k = 2 tk i=1 May 27, 2016 DRAFT 5 where tk and tk+1 can be seen as the initial and terminal times, respectively. Then, according to Pontryagin’s principle [32] that the necessary condition of optimality are written as  ∂Hi,k   (5a)  ẋi (t) = ∂p (t) = Axi (t) + Bui (t), i  ∂Hi,k   ṗi (t) = − = −AT pi (t). (5b) ∂xi (t) Besides, according to the extremal condition ∂Hi,k = −ui (t) + B T pi (t) = 0, ∂ui (t) one has ui (t) = B T pi (t). (6) Therefore, the determination of the optimal control (6) is boiled down to computing pi (t). By substituting (6) into (5a) and (5b), one gets      ẋi (t) xi (t) A BB T = . (7) ṗi (t) pi (t) 0n×n −AT Integrating the above equation form tk to tk+1 , it follows that     xi (tk+1 ) xi (tk ) M (tk+1 −tk ) = e . pi (tk+1 ) pi (tk ) (8) Further, by designing the terminal condition of (3) over [tk , tk+1 ] as follows, X 1 eA(tk+1 −tk ) [ xj (tk ) + xi (tk )], xi (tk+1 ) = |Ni | + 1 j∈N i i = 1, 2, · · · , N, (9) from (8) and (9), one has eA(tk+1 −tk ) X 1 [ xj (tk ) + xi (tk )] |Ni | + 1 j∈N i A(tk+1 −tk ) = e xi (tk ) + Φpi (tk ). If Φ is invertible, then, it is followed that pi (tk ) = Φ−1 eA(tk+1 −tk ) X 1 [xj (tk ) − xi (tk )] |Ni | + 1 j∈N i Therefore, for the time sequence tk , one has the distributed protocol (2). To summarize so far, with the fixed-time P control protocol (2), the states of linear multi-agent xj (tk )+xi (tk ) j∈Ni systems (1) are derived from xi (tk ) to , i = 1, 2, · · · , N. That is to say, with the |Ni |+1 distributed controller (2), the states of each agent in systems (1) will be derived to the average state of all its neighbors. From an intuitional point of view, after enough times such motion planning steps, the states of all agents in systems (1) will achieve consensus. May 27, 2016 DRAFT 6 Note that, the above proposed protocol exists only if Φ is invertible. Thus, before moving on, the following lemma is given. Lemma 3. Φ is invertible if and only if (A, B) is controllable. Proof: It follows from (2) that Φ = IN ⊗((tk+1 −tk )BB T + (tk+1 −tk )2 (ABB T −BB T AT ) 2! (tk+1 − tk )3 2 2 (A BB T −ABB T AT +BB T AT ) 3! (tk+1 − tk )4 3 2 (A BB T −A2 BB T AT +ABB T AT + 4! T T3 −BB A )+ · · · · · · ). + First, the proof of the sufficiency is given as follows. Let t2 t3 (ABB T −BB T AT ) + (A2 BB T 2! 3! 4 t 2 −ABB T AT + BB T AT ) + (A3 BB T 4! 3 2 T T T T2 −A BB A + ABB A − BB T AT ) + · · · · · · . Π = tBB T + By reductio, assume that Π is singular. Thus, there is at least one nonzero vector α ∈ Rn , which makes that αT Π = 0. Taking the derivatives of the above equation to (n − 1) order with respect to the time t and setting t = 0, we get αT BB T =0, αT (ABB T −BB T AT )=0, 2 αT (A2 BB T − ABB T AT + BB T AT )=0, 2 3 αT (A3 BB T −A2 BB T AT +ABB T AT −BB T AT )=0, ······ T n−1 α (A T n−2 BB −A 2 BB T AT +An−3 BB T AT − · · · +(−1)n−1 BB T AT n−1 )=0. Simplifying the above equations, we have αT BB T = 0, αT ABB T = 0, αT A2 BB T = 0, αT A3 BB T = 0, · · · · · · , αT An−1 BB T = 0. Let Q= May 27, 2016  BB T ABB T A2 BB T · · · An−1 BB T  . DRAFT 7 Then, we have αT Q = 0. It follows from α 6= 0 that the matrix Q is linearly dependent. Note that (A, BB T ) is controllable, if and only if (A, B) is controllable. This contradicts with the condition that (A, B) is controllable. Thus, it is proved that Π is nonsingular. Further, Φ is invertible. Similarly, the proof of the necessity is given. By reductio, it is assumed that (A, B) is uncontrollable. Thus, there is at least one nonzero vector β ∈ Rn , which makes that β T Q = 0. It follows that β T BB T = 0, β T ABB T = 0, β T A2 BB T = 0, β T A3 BB T = 0, · · · · · · , β T An−1 BB T = 0. Then, it is obtained that β T Π = 0. This contradicts with the condition that Φ is invertible. Thus, it is proved that (A, B) is controllable. The proof is completed. Remark 1. From the Lemma 3, one has that the the proposed protocol exists if (A, B) is controllable, which is a fundamental requirement for control of linear systems. Remark 2. Existing works [5] usually design consensus protocols using the smallest real part of the nonzero eigenvalues of the Laplacian matrix associated with the communication graph. Some researchers have used the adaptive control approaches [6] to overcome the requirements of nonzero eigenvalues of the Laplacian matrix. In this technical note, the above proposed protocol (2) does not require the knowledge of the Laplacian matrix associated with the communication graph. Then, the following theorem provides the main result in this technical note. Theorem 1. Suppose that Assumption 1 holds. For an off-line pre-specified settling time Ts , the distributed sampling protocol (2) can solve the fixed-time consensus problem of linear multi-agent system (1) if (A, B) is controllable. Proof: First, it is to prove that at the sampling time series {tk }, the states of systems (1) with (2) will achieve consensus. Substituting (2) into (1), one gets 1 T BB T e−A (t−tk ) |Ni | + 1 X ·Φ−1 eA(tk+1 −tk ) (xi (tk ) − xj (tk )). ẋi (t) = Axi (t) − (10) j∈Ni By integrating (10) from tk to tk+1 , k = 0, 1, · · ·, one gets xi (tk+1 ) − eA(tk+1 −tk ) xi (tk ) X 1 (xj (tk ) − xi (tk )). = eA(tk+1 −tk ) |Ni | + 1 j∈N i May 27, 2016 DRAFT 8 Let X(tk ) = (xT1 (tk ), xT2 (tk ), · · · , xTN (tk ))T . It follows that X(tk+1 ) − IN ⊗ eA(tk+1 −tk ) X(tk ) = −(N ⊗ eA(tk+1 −tk ) )(L ⊗ In ) · X(tk ), where N = diag( |N11|+1 , |N21|+1 , · · · , |NN1|+1 ). Then, X(tk+1 ) = (IN − N L) ⊗ eA(tk+1 −tk ) X(tk ) = (IN − N L)k+1 ⊗ eA(tk+1 −t0 ) X(t0 ). Under Assumption 1, the directed graph G has a spanning tree. Thus, IN − N L is a stochastic matrix. According to Lemma 1, one gets that IN − N L has an eigenvalue λ1 = 1 with algebraic multiplicity equal to one, and all the other eigenvalues satisfy |λi | < 1, i = 2, · · · , N. Thus, it followed from Lemma 2 that for matrix IN − N L, there exist a column vector ξ such that lim (IN − N L)k = 1ξ T . k→∞ (11) Besides, since tk → Ts as k → ∞, one has tk−1 −t0 is bounded, which ensures each item of matrix eA(tk+1 −t0 ) is bounded. It follows that lim [(IN −N L)k −1ξ T ] ⊗ eA(tk+1 −t0 ) = 0. k→∞ Let x∗ (t) = PN A(t−t0 ) xi (t0 ) i=1 ξi e (12) and X ∗ (t) = 1 ⊗ x∗ (t). One has X ∗ (t) = [1ξ T ⊗ eA(t−t0 ) ]X(t0 ). Thus, lim (X(tk+1 ) − X ∗ (tk+1 )) k→∞ = lim [((IN − N L)k+1 − 1ξ T ) ⊗ eA(tk+1 −t0 ) ]X(t0 ) k→∞ = 0. Note that X ∗ (tk ) = 1 ⊗ N hX i=1 i ξi eA(tk −t0 ) xi (t0 ) . Thus, one has the discrete states xi (tk ) will achieve consensus in exponential rate as k → ∞, i.e., limk→∞ kxi (tk ) − xj (tk )k = 0. Secondly, for the off-line pre-specified finite-time Ts , we will proof that the discrete states xi (tk ) can achieve fixed-time consensus as tk → Ts . According to {tk |tk+1 = tk + Tk+1 , Tk = 6 T , k = 1, 2, · · ·}, one has limk→∞ tk = Ts . Thus, (πk)2 s lim kxi (tk ) − xj (tk )k tk →Ts = lim kxi (tk ) − xj (tk )k k→∞ = 0, i, j = 1, 2, · · · , N Therefore, for the pre-specified settling time Ts , the distract states xi (tk ) will achieve fixed-time consensus in exponential rate as tk → Ts . May 27, 2016 DRAFT 9 Finally, we will proof that the the continuous states xi (t) can achieve fixed-time consensus as t → Ts . By integrating (10) from tk to t, it is obtained that xi (t) − eA(t−tk ) xi (tk ) Z t 1 T eA(t−τ ) BB T e−A (τ −tk ) dτ = − |Ni | + 1 tk X ·Φ−1 eA(tk+1 −tk ) (xi (tk ) − xs (tk )), s∈Ni tk ≤ t < tk+1 . Let 1 δi (t) = − |Ni | + 1 Z t eA(t−τ ) BB T e−A T (τ −t ) k dτ tk ·Φ−1 eA(tk+1 −tk ) X (xi (tk ) − xs (tk )). s∈Ni Thus, xi (t) − xj (t) = eA(t−tk ) (xi (tk ) − xj (tk )) + δi (t) − δj (t). Further, kxi (t) − xj (t)k ≤ k eA(tk+1 −tk ) k · k xi (tk ) − xj (tk ) k + k δi (tk ) k + k δj (tk ) k . Besides, note that k eA(tk+1 −tk ) k k δi (t) k ≤ k |Ni | + 1 Z tk+1 BB T e−A T (τ −t ) k dτ k tk · k Φ−1 kk eA(tk+1 −tk ) k X · k xi (tk ) − xs (tk ) k . s∈Ni 6 Since the length of the time interval tk − tk−1 = Tk = (πk) 2 Ts , k = 1, 2, · · ·} is upper bounded. R T tk+1 T −A (τ −tk ) A(tk+1 −tk ) dτ k are bounded. Furthermore, since (A, B) One has k e k and k tk BB e Φ∗ is controllable, it follows from Lemma 3 that Φ is invertible and Φ−1 = |Φ| , where |Φ| = 6 0. P∞ s Thus, by assuming that |Φ| = s=0 fs (tk+1 − tk ) , where fs , s = 0, 1, · · · are coefficients, there exists at least a finite constant m such that coefficient fm 6= 0 and f0 = f1 = · · · = fm−1 = 0. Thus, |Φ| can be rewritten as |Φ| = fm (tk+1 − tk )m + ◦(tk+1 − tk ) when tk+1 − tk is very small, where ◦(tk+1 − tk ) presents the higher-order infinitesimal of tk+1 − tk . Since limk→∞ (tk − kxi (tk )−xj (tk )k 6 = tk−1 ) = limk→∞ Tk = limk→∞ (πk) 2 Ts = 0 in polynomial rate, one has limk→∞ |Φ| −1 0. According that limk→∞ tk = Ts , therefore, limtk →Ts k Φ kk xi (tk ) − xj (tk ) k= 0. It is obtained that limt→Ts k δi (t) k= 0. Similarly, one gets limt→Ts k δj (t) k= 0. Therefore, limt→Ts kxi (t) − xj (t)k = 0. To sum up, under the protocol (2), linear multi-agent systems (1) can achieve consensus in the pre-specified fixed settling time Ts . The proof is completed. May 27, 2016 DRAFT 10 Remark 3. Under undirected graphs, finite-time and fixed-time consensus problems have been investigated in some interesting papers [16], [17], [18], [24], [26], [29], [28], [27]. Under directed graphs, the finite-time consensus problem of first-order multi-agent systems has been solved in [20], [21], [22]. However, the algorithms in [20], [21], [22] are difficult to develop for solving the finite-time consensus problem of high-order multi-agent systems under directed graphs. In this technical note, by using motion planning approaches, the designed protocol 2 successfully solves the fixed-time consensus problems for general linear multi-agent systems over directed graphs. Remark 4. Compared with the existing works [18], [16], [23], [28] on finite-time consensus problems, in this article, the settling time can be off-line pre-specified according to task requirements, which not only realizes the consensus in the state space but also controls the settling time in the time axis. Remark 5. It is worth of mentioning that the fixed-time protocols designed in this technical note are based only on sampling measurements of the relative state information among its neighbors, which greatly reduces cost of the network communication [33], [34], [35]. Remark 6. On connected undirected graphs, fixed-time consensus algorithms have been studied in [25], [26]. As a special case of the result in Theorem 1 of this paper, on directed graphs containing a directed spanning tree, the fixed-time consensus problems for the multi-agent systems with dynamics such as single-integrator [25], double-integrator [26] and harmonic oscillators [23] can be solved in this technical note. IV. A PPLICATION TO SPACECRAFT FORMATION FLYING . In this section, the application of the preceding control laws to spacecraft formation flying in the low Earth orbit is addressed. Spacecraft formation flying needs precise coordination among multiple spacecraft whose dynamics are coupled through a common control law [36]. Early pertinent works for spacecraft formation flying with variable dynamics, such as second integrators, linear systems, precise nonlinear models, have been launched by Ren [37], Li [5], and so on, where control laws are developed for spacecraft to asymptotically convergent to the desired formation. In order to simplify the analysis, in this section, it is assumed that the reference orbit is a circular or near-circular orbit of radius R0 , i.e., er = 0, where er is the eccentricity of the reference orbit. The relative motion of the spacecraft with respect to the reference orbit can be described in the local vertical local horizontal (LVLH) frame. Let r = [x, y, z]T be the position vector of the spacecraft and r = |r|. For the circular or near-circular reference orbit, the relative position dynamics of spacecraft with respect to the reference orbit can be written as given in [29]. Further, assume that the relative orbit radius between the ith spacecraft and the reference orbit is very small compered to the radius of the reference orbit. The linearized equations of the relative dynamics of the ith spacecraft with respect to the reference orbit are given by Hill’s equations ẍ − 3n2r x − 2nr ẏ = uxi , ÿ + 2nr ẋ = uyi , z̈ + n2r z = uzi , May 27, 2016 (13) DRAFT 11 where nr is the natural frequency of the reference orbit, uxi , uyi and uzi are the control inputs. Let ui = [uxi , uyi , uzi ]T . Thus, for the Hill’ equations, one has the following form        ṙi 0 I3 ri 0 = + ui , r̈i A1 A2 ṙi I3 where    0 2nr 0 3nr 2 0 0 0 0  , A2 =  −2nr 0 0  . A1 =  0 0 0 0 0 0 −nr 2  Spacecraft are said to achieve formation flying in fixed settling time if their velocity vectors converge to the same value and their positions maintain a prescribed separation, i.e., ri − hi → ṙj − hj , ṙi → ṙj , i, j = 1, · · · , N, at the terminal time Ts , where hi − hj ∈ R3 denotes the desired constant separation between spacecraft i and j, and Ts can be given in advance. Based on algorithm (2), the distributed fixed-time formation control law for spacecraft i is proposed as 1 T B T e−A (t−tk ) Φ−1 eA(tk+1 −tk ) ui (t)=−A1 hi − |Ni | + 1 X  r (t ) − r (t ) − h + h  i k j k i j , · ṙi − ṙj j∈Ni tk ≤ t < tk+1 , i = 1, 2, · · · , N, (14)   0 I3 0 where A = , B = . Note that (A, B) is controllable. Thus, according to A1 A2 I3 Theorem 1, the following theorem is given.   Theorem 2. Assume that the directed topology graph G among the N satellites satisfies Assumption 1. Then, for an off-line pre-specified settling time Ts > 0, the fixed-time forma6 tion protocol (14) with the sampling time sequence {tk |tk = t0 + Tk , Tk = (πk) 2 Ts } solves the fixed-time formation flying problem of multiple satellites systems described by (13), i.e., limt→Ts kri (t) − rj (t) + hi − hj k = 0, limt→Ts kṙi (t) − ṙj (t)k = 0, i, j = 1, · · · , N. Example Consider the formation flying of six spacecraft with respect to a circular reference orbit with the orbital radius R0 = 4.224 × 107 m. Note that the gravitation constant of the earth µ = GMe = 3.986 × 1014 m3 /s2 , where G is the universal constant of gravity and Me is the mass of the Earth. Therefore, the natural frequency of the reference orbit nr = 7.273 × 10−5 s−1 . All the spacecraft have mass m = 410kg. The directed communication topology between the spacecrafts is given in Fig. 1. The desired formation is that the six satellites will maintain a regular hexagon with a separation of 1000m. Thus, it is given that h1 = [0, 1000, 0]T m, h2 = [−866, 500, 0]T m, h3 = [−866, −500, 0]T m, h4 = [0, −1000, 0]T m, h5 = [866, −500, 0]T m, h6 = [866, 500, 0]T m. To simplify things, let the initial time be t0 = 0h. The off-line pre-specified May 27, 2016 DRAFT 12 S1 S2 S3 S5 S4 S6 Fig. 1. Communication topology with 6 spacecrafts over a directed graph having a spanning tree. 5 r x 5 x 10 0 −5 0 1 2 3 6 r y 2 1 z 4 time(s) 5 4 time(s) 5 6 7 5 x 10 0 1 2 3 5 r 5 x 10 −2 0 6 7 5 x 10 x 10 0 −1 0 Fig. 2. 4 time(s) 1 2 3 6 7 5 x 10 The positions of the spacecrafts. formation time is 200h. Select the initial states for spacecraft as following: [r1 (t0 )]=[0, 966000, 10000]T m, [ṙ1 (t0 )]=[10, 0, 0]T m/s, [r2 (t0 )]=[0, 900000, 20000]T m, [ṙ2 (t0 )]=[15, 0, 0]T m/s, [r3 (t0 )]=[0, 866000, 30000]T m, [ṙ3 (t0 )]=[20, 0, 0]T m/s, [r4 (t0 )]=[0, 800000, 40000]T m, [ṙ4 (t0 )]=[25, 0, 0]T m/s, [r5 (t0 )]=[0, 766000, 50000]T m, [ṙ5 (t0 )]=[30, 0, 0]T m/s, [r6 (t0 )]=[0, 700000, 60000]T m, [ṙ6 (t0 )]=[35, 0, 0]T m/s. Figs.2 and 3 depict the positions and the velocities of spacecrafts, respectively. The control forces are shown in Fig. 4. It can be seen that the desired formation is derived at the fixed settling time Ts = 200h. The motion trajectories of these six spacecraft in three-dimensional space are illustrated in Fig.5. Fig. 6 shows the final formation configurations. The six agents May 27, 2016 DRAFT 13 50 ⋅ rx 0 −50 0 1 2 3 4 time(s) 5 4 time(s) 5 4 time(s) 5 4 time(s) 5 4 time(s) 5 4 time(s) 5 6 5 r y ⋅ 100 0 −100 0 1 2 3 6 ⋅ z r 7 5 x 10 5 0 −5 0 Fig. 3. 7 x 10 1 2 3 6 7 5 x 10 The velocities of the spacecrafts. u x −4 x 10 5 0 −5 0 1 2 3 −4 u y 5 1 2 3 −5 z 5 u 7 5 x 10 0 −5 0 6 7 5 x 10 x 10 0 −5 0 Fig. 4. 6 x 10 1 2 3 6 7 5 x 10 The control signals of the spacecrafts. 5 x 10 2 rz 1 0 −1 −2 5 5 5 x 10 0 −5 ry Fig. 5. 0 −5 5 x 10 r x The trajectories of the spacecrafts in three-dimensional space. May 27, 2016 DRAFT 14 4 x 10 r z −1.7 −1.75 2.74 −1.8 −0.9 2.72 −0.95 5 x 10 5 x 10 −1 2.7 −1.05 r y Fig. 6. −1.1 2.68 r x The final formation configurations of the spacecrafts in three-dimensional space. form a regular hexagon about 1000m on each side. V. C ONCLUSIONS This technical note has studied the distributed fixed-time consensus protocol design problem for multi-agent systems with general continuous-time linear dynamics over directed graphs. By using motion planning approaches, a class of distributed fixed-time consensus algorithms are developed, which rely only on the sampling information at some sampling instants. For linear multi-agent systems, the proposed algorithms solve the fixed-time consensus problem for any directed graph containing a directed spanning tree. In particular, the fixed settling time can be offline pre-specified according to task requirements. Extensions to the fixed-time formation flying are further studied for multiple satellites described by Hill equations. Future works will focus on solving distributed fixed-time consensus problem for mobile agents modeled by nonlinear dynamics over directed switching graphs. R EFERENCES [1] R. Olfati-Saber and R. M. Murray. Consensus problems in networks of agents with switching topology and time-delays. IEEE Transactions on Automatic Control, 49(9):1520-1533, 2004. [2] W. Ren and R. W. Beard. Consensus seeking in multiagent systems under dynamically changing interaction topologies. IEEE Transactions on Automatic Control, 50(5):655-661, 2005. [3] M. Cao, A. S. Morse and B. D. O. Anderson. Agreeing asynchronously, IEEE Transactions on Automatic Control, 53(8):1826-1838, 2008. [4] Y. G. Hong, G. R. Chen and L. Bushnell. Distributed observers design for leader-following control of multi-agent networks, Automatica, 44(3):846-850, 2008. [5] Z. K. Li, Z. S. Duan, G. R. Chen and L. Huang. Consensus of multiagent systems and synchronization of complex networks: a unified viewpoint, IEEE Transactions on Circuits and Systems I: Regular Papers, 57(1): 213–224, 2010. [6] Z. K. Li, W. Ren, X. D. Liu and L. H. Xie. Distributed consensus of linear multi-agent systems with adaptive dynamic protocols, Automatica, 49(7):1986-1995, 2013. [7] Y. F. Liu, Y. Zhao and G. R. Chen. Finite-time formation tracking control for multiple vehicles: A motion planning approach, International Journal of Robust and Nonlinear Control, DOI: 10.1002/rnc.3496, 2015. [8] F. Chen, W. Ren, W. Lan and G. R. Chen. Distributed average tracking for reference signals with bounded accelerations, IEEE Transactions on Automatic Control, 60(3):863C869, 2015. [9] Y. Zhao, Y. F. Liu, Z. S. Duan and G. H. Wen. Distributed average computation for multiple time-varying signals with output measurements, International Journal of Robust and Nonlinear Control, DOI: 10.1002/rnc.3486 2015 [10] Q. Song, J. D. Cao and W. W. Yu. Second-order leader-following consensus for nonlinear multi-agent systems via pinning control, Systems & Control Letters, 59(9), 553-562, 2010. [11] H. S. Su, G. R. Chen, X. F. Wang and Z. L. Lin. Adaptive second-order consensus of networked mobile agents with nonlinear dynamics, Automatica, 47(2):368-375, 2011. May 27, 2016 DRAFT 15 [12] G. Q. Hu. Robust consensus tracking of a class of second-order multi-agent dynamic systems, Systems & Control Letters, 61(1):134-142, 2012. [13] Z. Y. Meng, Z. L. Lin, and W. Ren. Robust cooperative tracking for multiple non-identical second-order nonlinear systems. Automatica, 49(8):2363–2372, 2013. [14] J. J. Fu and J. Z. Wang. Leader-following control of second-order integrator systems using binary information. Proceedings of 26th Chinese Control and Decision Conference (CCDC), Changsha China, 263–268, 2014. [15] J. Cortés. Finite-time convergent gradient flows with applications to network consensus. Automatica, 42(11):1993–2000, 2006. [16] Q. Hui, W. M., Haddad and S. P. Bhat. Semistability, finite-time stability, differential inclusions, and discontinuous dynamical systems having a continuum of equilibria. IEEE Transactions on Automatic Control, 54(10): 2465–2470, 2009. [17] X. Wang and Y. G. Hong. Finite-time consensus for multi-agent networks with second-order agent dynamics. Proceedings of the 17th world congress, IFAC, pages 15185–15190, 2008. [18] S. H. Li, H. B. Du, and X. Lin. Finite-time consensus algorithm for multi-agent systems with double-integrator dynamics. Automatica, 47(8):1706–1712, 2011. [19] G. Chen, F. L. Lewis, and L. H. Xie. Finite-time distributed consensus via binary control protocols. Automatica, 47:1962– 1968, 2011. [20] H. Sayyaadi and M. R. Doostmohammadian. Finite-time consensus in directed switching network topologies and timedelayed communications. Scientia Iranica, 18(1): 75–85, 2011. [21] F. Mauro, P. Alessandro, G. Alessandro and U. Elio. Finite-time consensus with disturbance rejection by discontinuous local interactions in directed graphs. IEEE Transactions on Automatic Control, 60(4): 1133–1138, 2013. [22] Y. C. Cao and W. Ren. Finite-time consensus for multi-agent networks with unknown inherent nonlinear dynamics. Automatica, 50(10): 2648–2656, 2014. [23] Y. J. Zhang, Y. Yang and Y. Zhao. Finite-time consensus tracking for harmonic oscillators using both state feedback control and output feedback control, International Journal of Robust and Nonlinear Control 23(8):878-893, 2013. [24] Y. Zhao, Z. S. Duan, G. H. Wen and G. R. Chen. Distributed finite-time tracking for a multi-agent system under a leader with bounded unknown acceleration. Systems & Control Letters, 81(7):8–13, 2015. [25] Z. Zuo, and L. Tie. A new class of finite-time nonlinear consensus protocols for multi-agent systems. International Journal of Control, 87(2), 363–370, 2012. [26] Z. Zuo. Nonsingular fixed-time consensus tracking for second-order multi-agent networks. Automatica, 54:305–309, 2015. [27] X. Xu and J. Z. Wang. Finite-time consensus tracking for second-order multi-agent systems. Asian Journal of Control, 15(4): 1246–1250, 2013. [28] Y. Zhao, Z. S. Duan, G. H. Wen and G. R. Chen. Distributed finite-time tracking of multiple non-identical second-order nonlinear systems with settling time estimation, Automatica, 64:84-93, 2016. [29] Y. F. Liu and Z. Y. Geng. Finite-time formation control for linear multi-agent systems: A motion planning approach, Systems & Control Letters, 85(11):54-60, 2015. [30] R. Horn and C. R. Johnson, Matrix Analysis, New York: Cambridge Univesity Press 1985. [31] C. Godsil and G. Royle, Algebraic Graph Theory, New York: Springer 2001. [32] A. E. Bryson and Y. C. Ho. Applied optimal control, Hemisphere Publishing Corporation London, 1975. [33] W. W. Yu, W. X. Zheng, G. R. Chen, W. Ren and J. D. Cao. Second-order consensus in multi-agent dynamical systems with sampled position data, Automatica, 47(7):1496-1503, 2011. [34] N. Huang, Z. S. Duan and G. R. Chen. Some necessary and sufficient conditions for consensus of second-order multi-agent systems with sampled position data, Automatica 63(1):148-155, 2016. [35] G. H. Wen, Z. S. Duan, W. W. Yu and G. R. Chen. Consensus of multi-agent systems with nonlinear dynamics and sampled-data information: a delayed-input approach, International Journal of Robust and Nonlinear Control 23(6):602619, 2013. [36] D. P. Scharf, F. Y. Hadaegh and S. R. Ploen. A survey of spacecraft formation flying guidance and control (part 11): Control, in Proceeding of the 2004 American Control Conference, Boston, Massachusetts, 2004. [37] W. Ren. Formation keeping and attitude alignment for multiple spacecraft through local interactions, Journal of Guidance, Control, and Dynamics, 30(2):633–638, 2007. May 27, 2016 DRAFT
3cs.SY
arXiv:1605.08188v2 [cs.LG] 5 Jun 2017 Learning Multivariate 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] June 7, 2017 Abstract We study the problem of estimating multivariate log-concave probability density functions. We prove the first sample complexity upper bound for learning log-concave densities on Rd , for all d ≥ 1. Prior to our work, no upper bound on the sample complexity of this learning problem was known for the case of d > 3. In more detail, we give an estimator that, for any d ≥ 1 and ǫ > 0, draws  Õd (1/ǫ)(d+5)/2 samples from an unknown target log-concave density on Rd , and outputs a hypothesis that (with high probability) is ǫ-close to the target, in total variation distance. Our upper bound  on the sample complexity comes close to the known lower bound of Ωd (1/ǫ)(d+1)/2 for this problem. 1 Introduction 1.1 Background and Motivation The estimation of a probability density function based on observed data is a classical and paradigmatic problem in statistics [Pea95] with a rich history (see, e.g., [BBBB72, DG85, Sil86, Sco92, DL01]). This inference task is known as density estimation or distribution learning and can be informally described as follows: Given a set of samples from an unknown distribution f that is believed to belong to (or be well-approximated by) a given family D, we want to output a hypothesis distribution h that is a good approximation to the target distribution f . The first and arguably most fundamental goal in density estimation is to characterize the sample complexity of the problem in the minimax sense, i.e., the number of samples ∗ † Supported by NSF Award CCF-1652862 (CAREER) and a Sloan Research Fellowship. Supported by NSF Award CCF-1553288 (CAREER) and a Sloan Research Fellowship. 1 inherently required to obtain a desired accuracy (in expectation or with high probability). In other words, for a given distribution family D and desired accuracy ǫ > 0, we are interested in obtaining an estimator for D with a sample complexity upper bound of N = N(D, ǫ), and an information-theoretic lower bound showing that no estimator for D can achieve accuracy ǫ with fewer than Ω(N) samples. The sample complexity of this unsupervised learning problem depends on the structure of the underlying family D. Perhaps surprisingly, while density estimation has been studied for several decades, the sample complexity of learning is not yet well-understood for various natural and fundamental distribution families. We emphasize here that there is no known simple complexity measure of a distribution family D that characterizes the sample complexity of learning (an unknown distribution from) D under the total variation distance. In contrast, the VC dimension of a concept class plays such a role in the PAC model of learning Boolean functions (see, e.g., [BEHW89, KV94]). It should be noted that the classical information-theoretic quantity of the metric entropy and its variants (e.g., bracketing entropy) [vdVW96, DL01, Tsy08]1 , provide upper bounds on the sample complexity of distribution learning that are not tight in general. Specifically, such upper bounds are suboptimal – both quantitatively and qualitatively – for various distributions families, see, e.g., [DKS16c] for a natural example. There are two main strands of research in distribution learning. The first one concerns the learnability of high-dimensional parametric distribution families (e.g., mixtures of Gaussians). The sample complexity of learning parametric families is typically polynomial in the dimension and the goal is to design computationally efficient algorithms. The second strand – which is the focus of this paper – studies the learnability of low-dimensional nonparametric distribution families under various assumptions on the shape of the underlying density. There has been a long line of work on this strand within statistics since the 1950’s and, more recently, in theoretical computer science (see Section 1.3 for an overview of related work). The majority of this literature has studied the univariate (one-dimensional) setting which is by now fairly well-understood for a wide range of distributions. On the other hand, the multivariate setting and specifically the regime of fixed dimension is significantly more challenging and poorly understood for many natural distribution families. 1.2 Our Results and Comparison to Prior Work In this work, we study the problem of density estimation for the family of log-concave distributions on Rd . A distribution on Rd is log-concave if the logarithm of its probability density function is a concave function (see Definition 1). Log-concave distributions constitute a rich and attractive non-parametric family that is particularly appealing for modeling and inference [Wal09]. They encompass a range of interesting and well-studied distributions, including uniform, normal, exponential, logistic, extreme value, Laplace, Weibull, Gamma, Chi and Chi-Squared, and Beta distributions (see, e.g., [BB05]). Log-concave distributions have been studied in a range of different contexts including economics [An95], statistics and 1 Roughly speaking, the metric entropy of a distribution family D is the logarithm of the size of the smallest ǫ-cover of D. A subset Dǫ ⊆ D in a metric space (D, d) is said to be an ǫ-cover of D with respect to the metric d : X 2 → R+ , if for every x ∈ D there exists some y ∈ Dǫ such that d(x, y) ≤ ǫ. In this paper, we focus on the total variation distance between distributions. 2 probability theory (see [SW14] for a recent survey), theoretical computer science [LV07], and algebra, combinatorics and geometry [Sta89]. 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 [CSS10, DR09, DW16, CS13, KS16, BD14, HW16] and references therein, and, more recently, in theoretical computer science [CDSS13, CDSS14a, ADLS17, ADK15, CDGR16, DKS16a]. In Section 1.3, we provide a detailed summary of related work. In this subsection, we confine ourselves to describing the prior work that is most relevant to the results of this paper. We study the following fundamental question: How many samples are information-theoretically required to learn an arbitrary log-concave density on Rd , up to total variation distance ǫ? Despite significant amount of work on log-concave density estimation, our understanding of this question even for constant dimension d remains surprisingly poor. The only prior work that addresses the d > 1 case in the finite sample regime is [KS16]. Specifically, [KS16] study this estimation problem with respect to the squared Hellinger distance and obtain the following results:  (1) an information-theoretic sample complexity lower bound of Ωd (1/ǫ)(d+1)/2 for any d ∈ Z+ , and (2) a sample complexity upper bound that is tight (up to logarithmic factors) for d ≤ 3. Specifically, prior to our work, no finite sample complexity upper bound was known even for d = 4.  In this paper, we obtain a sample complexity upper bound of Õd (1/ǫ)(d+5)/2 , for any d ∈ Z+ , under the total variation distance. By using the known relation between the total variation and squared Hellinger distances, our sample complexity upper bound immediately implies the same upper bound under the squared Hellinger distance. Moreover, the aforementioned lower bound of [KS16] also directly applies to the total variation distance. Hence, our upper bound is tight up to an Õd (ǫ−2 ) multiplicative factor. To formally state our results, we will need some terminology. Notation and Definitions. Let f : Rd → R be a Lebesgue measurable function. We R will use f (A) to denote A f (x)dx. A Lebesgue measurable function f : Rd → R is a R probability density function (pdf) if f (x) ≥ 0 for all x ∈ Rd and Rd f (x)dx = 1. The total variation distance between two non-negative measures f, g : Rd → R is defined as dTV (f, g) = supS |f (S) − g(S)|, where the supremum is over all Lebesgue measurable subsets of the domain. If f, g : Rd → R+ are R probability density functions, then we have that dTV (f, g) = (1/2) · kf − gk1 = (1/2) · Rd |f (x) − g(x)|dx. Definition 1. A probability density function f : Rd → R+ , d ∈ Z+ , is called log-concave if there exists an upper semi-continuous concave function φ : Rd → [−∞, ∞) such that f (x) = eφ(x) for all x ∈ Rd . We will denote by Fd the set of upper semi-continuous, logconcave densities with respect to the Lebesgue measure on Rd . 3 We use the following definition of learning under the total variation distance. We remark that our learning model incorporates adversarial model misspecification, and our proposed estimators are robust in this sense. Definition 2 (Agnostic Distribution Learning). Let D be a family of probability density functions on Rd . A randomized algorithm AD is an agnostic distribution learning algorithm for D, if for any ǫ > 0, and any probability density function f : Rd → R+ , on input ǫ and sample access to f , with probability 9/10, algorithm AD outputs a hypothesis density def h : Rd → R+ such that dTV (h, f ) ≤ O(OPT) + ǫ, where OPT = inf g∈D dTV (f, g). Our agnostic learning definition subsumes Huber’s ǫ-contamination model [Hub64], which prescribes that the target distribution f is of the form (1 − ǫ)g + ǫr, where g ∈ D and r is some arbitrary distribution. The main result of this paper is the following theorem: Theorem 3 (Main Result). There exists an agnostic learning algorithm for the family Fd of log-concave densities on Rd with the following performance guarantee: For any d ∈ Z+ , ǫ > 0, and any probability density function f : Rd → R+ , the algorithm draws O(d/ǫ)(d+5)/2 log2 (1/ǫ) samples from f and, with probability at least 9/10, outputs a hypothesis density h : Rd → R+ def such that dTV (h, f ) ≤ 3 · OPT + ǫ, where OPT = inf g∈Fd dTV (f, g). To the best of our knowledge, our estimator provides the first finite sample complexity guarantees for Fd for any d > 3. With the exception of [KS16], prior work on this problem that provides finite sample guarantees has been confined to the d = 1 case. As previously mentioned, [KS16] study the case of general dimension d focusing on the squared Hellinger def R distance. Recall that the squared Hellinger distance is defined as h2 (f, g) = Rd (f 1/2 − g 1/2 )2 dx and that for any two densities f, g it holds h2 (f, g) ≤ dTV (f, g) ≤ h(f, g). Therefore, the sample lower bound of [KS16] also holds under the total variation distance, and our sample upper bound immediately applies under the squared Hellinger distance. This implies that our upper bound is tight up to an Õd (ǫ−2 ) multiplicative factor. Our proposed estimator establishing Theorem 3 is robust to model misspecification with respect to the total variation distance. It should be noted that our estimator does not rely on maximum likelihood, as opposed to most of the statistics literature on this problem. In contrast, our estimator relies on the VC inequality [VC71, DL01], a classical result in empirical process theory (see Theorem 4). The VC inequality has been recently used [CDSS13, CDSS14a, ADLS17] to obtain sharp learning upper bounds for a wide range of one-dimensional distribution families, including univariate log-concave densities. As far as we know, ours is the first use of the VC inequality to obtain learning upper bounds for structured distributions in multiple dimensions. Remark. Despite its many desirable properties, the maximum likelihood estimator (MLE) is known to be non-robust in Huber’s contamination model2 . To address this downside, recent work in theoretical computer science [CDSS14a, ADLS17] and statistics [BB16] has proposed alternative robust estimators. Moreover, for 4-dimensional log-concave densities, it has been conjectured (see, e.g., [Wel15]) that the MLE has suboptimal sample complexity even without noise. These facts together provide strong motivation for the design and analysis of surrogate estimators with desirable properties, as we do in this work. 2 For log-concave densities, the MLE is known to be robust in the limit under weaker metrics [DSS11]. 4 1.3 Related Work The area of nonparametric density estimation under shape constraints is a classical topic in statistics starting with the pioneering work of Grenander [Gre56] on monotone distributions (see [BBBB72] for an early and [GJ14] for a recent book on the topic). Various structural restrictions have been studied in the literature, starting from monotonicity, unimodality, and concavity [Gre56, Bru58, Rao69, Weg70, HP76, Gro85, Bir87a, Bir87b, Fou97, JW09]. While the majority of the literature has focused on the univariate setting, a number of works have studied nonparametric distribution families in fixed dimension, see, e.g., [BD03, SW10, KM10]. In recent years, there has been a body of work in computer science on nonparametric density estimation of with a focus on both sample and computational efficiency [DDS12a, DDS12b, DDO+ 13, CDSS13, CDSS14a, CDSS14b, ADH+ 15, ADLS17, DHS15, DKS16c, DKS16d, DDKT16, DKS16b, VV16]. During the past decade, density estimation of log-concave densities has been extensively investigated. A line of work in statistics [CSS10, DR09, DW16, CS13, BD14] has obtained a complete understanding of the global consistency properties of the maximum likelihood estimator (MLE) for any dimension d. In terms of finite sample bounds, the sample complexity of log-concave density estimation has been characterized for d = 1, e.g., it is Θ(ǫ−5/2 ) under the variation distance [DL01]. Moreover, it is known [KS16, HW16] that the MLE is sample-efficient in the univariate setting. For dimension d > 1, [KS16] show that the MLE is nearly-sample optimal under the squared Hellinger distance for d ≤ 3, and also prove bracketing entropy lower bounds suggesting that the MLE may be sub-optimal for d > 3. A recent line of work in theoretical computer science [CDSS13, CDSS14a, ADLS17, ADK15, CDGR16, DKS16a] studies the d = 1 case and obtains sample and computationally efficient estimators under the total variation distance. Specifically, [CDSS14a, ADLS17] gave sample-optimal robust estimators for log-concave distributions (among others) based on the VC inequality. 1.4 Technical Overview In this subsection, we provide a high-level overview of our techniques establishing Theorem 3. Our approach is inspired by the framework introduced in [CDSS13, CDSS14a]. Given a family of structured distributions D that we want to learn, we proceed as follows: We find an “appropriately structured” distribution family C that approximates D, in the sense that every density in D is ǫ-close, in total variation distance, to a density in C. By choosing the family C appropriately, we can obtain (nearly-)tight sample upper bounds for D from sample upper bounds for C. Our estimator to achieve this goal (see Lemma 6) leverages the VC inequality. The aforementioned approach was used in [CDSS13, CDSS14a, ADLS17] to obtain sampleoptimal (and computationally efficient) estimators for various one-dimensional structured distribution families. In particular, for the family F1 of univariate log-concave densities, [CDSS13] chooses C to be the family of densities that are piecewise-constant with Õ(1/ǫ) interval pieces. Similarly, [CDSS14a, ADLS17] take C to be the family of densities that are piecewise linear with Õ(ǫ−1/2 ) interval pieces. 5 Our structural approximation result for the multivariate case can be viewed as an appropriate generalization of the above one-dimensional results. Specifically, we show that any log-concave density f on Rd can be ǫ-approximated, in total variation distance, by a function  (d+1)/2 g that is essentially defined by Õd (1/ǫ) hyperplanes. Once such an approximation has been established, roughly speaking, we exploit the fact that families of sets defined by a small number of hyperplanes have small VC dimension. This allows us to use the VC inequality to learn an approximation to g (and, thus, an approximation to f ) from an appropriate number of samples. If V is an upper bound on the VC dimension of the resulting set system, the number of samples needed for this learning task will be O(V /ǫ2). To prove our structural approximation result for log-concave densities f on Rd we proceed as follows: First, we make use of concentration results for log-concave densities implying that a negligible fraction of f ’s probability mass comes from points at which f is much smaller than its maximum value. This will allow us to approximate f by a function h that takes only Õd (1/ǫ) distinct values. Furthermore, the superlevel sets h−1 ([x, ∞)) will be given by the corresponding superlevel sets for f , which are convex. We then use results from convex geometry to approximate eachof these convex sets (with respect to volume) by inscribed polytopes with Od (1/ǫ)(d−1)/2 facets. Applying this approximation to each superlevel set of h gives us our function g. We note that a number of constructions are possible here that differ in exactly how the layers are constructed and what to do when they do or do not overlap. Many of these constructions are either incorrect or difficult to analyze. In this work, we provide a simple construction with a succinct proof that yields a near-optimal sample complexity upper bound. We believe that a more careful structural approximation result may lead to the tight sample upper bound, and we leave this as an interesting question for future work. 1.5 Organization In Section 2, we record the basic probabilistic and analytic 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 The VC inequality. For n ∈ Z+ , we will denote [n] = {1, . . . , n}. Let f : Rd → R be a Lebesgue measurable function. Given a family A of measurable subsets of Rd , we define def the A-norm of f by kf kA = supA∈A |f (A)| . We say that a set X ⊆ Rd is shattered by A if for every Y ⊆ X there exists A ∈ A that satisfies A ∩ X = Y . The VC dimension of a family of sets A over Rd is defined to be the maximum cardinality of a subset X ⊆ Rd that is shattered by A. If there is a shattered subset of size s for all s ∈ Z+ , then we say that the VC dimension of A is ∞. Let f : Rd → R+ be a probability density function. The empirical distribution fbn , corresponding to n independent from f , is the probability measure Pn samples X1 , . . . , Xn drawn d b defined by fn (A) = (1/n)· i=1 1Xi ∈A , for all A ⊆ R . The well-known Vapnik-Chervonenkis (VC) inequality states the following: 6 Theorem 4 (VC inequality, [DL01, p.31]). Let f : Rd → R+ be a probability density function and fbn be the empirical distribution obtained after drawing n samples from pf . Let A be a family of subsets over Rd with VC dimension V . Then, E[kf − fbn kA ] ≤ C V /n , where C is a universal constant. Approximation of Convex Sets by Polytopes. There is a large literature on approximating convex sets by polytopes (see, e.g., the surveys [Gru93, Bro08]). We will make essential use of the following theorem that provides a volume approximation by an inscribed polytope with a bounded number of facets: Theorem 5 ([GMR94, GMR95]). Let d ∈ Z+ . For any convex body K ⊆ Rd , and n sufficiently large, there exists a convex polytope P ⊆ K with at most n facets such that Cd vol (K \ P ) ≤ n2/(d−1) vol(K), where C > 0 is a universal constant. 3 Proof of Theorem 3 To prove our theorem, we will make essential use of the following general lemma, establishing the existence of a sample-efficient estimator using the VC inequality: Lemma 6 ([CDSS14a]). Let D be a family of probability density functions over Rd . Suppose there exists a family A of subsets of Rd with VC-dimension V such that the following holds: For any pair of densities f1 , f2 ∈ D we have that dTV (f1 , f2 ) ≤ kf1 − f2 kA + ǫ/2. Then, there exists an agnostic learning algorithm for D with error guarantee 3 · OPT + ǫ that succeeds with probability 9/10 using O(V /ǫ2) samples. Proof. This lemma is implicit in [CDSS14a], and we include a proof here for completeness. The estimator is extremely simple and its correctness relies on the VC inequality: (1) Draw n = O(V /ǫ2) samples from f ; (2) Output the density h ∈ D that minimizes3 the objective function kg − fbn kA over g ∈ D. We now show that the above estimator is an agnostic learning algorithm for D. Let f ∗ = argmin{dTV (f, g) | g ∈ D}, i.e., OPT = dTV (f, f ∗ ). Note that for any pair of densities f1 , f2 and any collection of subsets A we have that kf1 − f2 kA ≤ dTV (f1 , f2 ). By Theorem 4 and Markov’s inequality, it follows that with probability at least 9/10 over the samples drawn from f we have that kf − fbn kA ≤ ǫ/4 . 3 It is straightforward that it suffices to solve this optimization problem up to an additive O(ǫ) error. 7 Conditioning on this event, we have that dTV (h, f ) ≤ dTV (f, f ∗ ) + dTV (f ∗ , h) ≤ OPT + kf ∗ − hkA + ǫ/2 ≤ OPT + kf ∗ − fbn kA + kh − fbn kA + ǫ/2 ≤ OPT + 2 · kf ∗ − fbn kA + ǫ/2 (since f ∗ , h ∈ D) (since kh − fbn kA ≤ kf ∗ − fbn kA ) ≤ OPT + 2 · kf ∗ − f kA + 2 · kf − fbn kA + ǫ/2 ≤ OPT + 2 · dTV (f ∗ , f ) + 2 · kf − fbn kA + ǫ/2 ≤ OPT + 2 · OPT + 2 · ǫ/4 + ǫ/2 = 3OPT + ǫ . This completes the proof of the lemma. In view of Lemma 6, to prove Theorem 3 we establish the following: Proposition 7. There exists a family A of sets in Rd whose VC dimension is at most V = O(d/ǫ)(d+1)/2 log2 (1/ǫ) that satisfies the condition of Lemma 6 for Fd , i.e., for any pair of densities f1 , f2 ∈ Fd it holds that dTV (f1 , f2 ) ≤ kf1 − f2 kA + ǫ/2. Lemma 6 and Proposition 7 together imply that there exists an agnostic learner for Fd with sample complexity O(V /ǫ2 ) = O (d/ǫ)(d+5)/2 log2 (1/ǫ) , which gives Theorem 3. The main part of this section is devoted to the proof of Proposition 7. Proof Overview: The proof has two main steps. In the first step, we define an appropriately structured family of functions Cd,ǫ so that an arbitrary log-concave density f ∈ Fd can be ǫ-approximated by a function g ∈ Cd,ǫ . More specifically, each function g ∈ Cd,ǫ takes at most L = Od ((1/ǫ) log(1/ǫ)) distinct values, and for each y ≥ 0, the sets g −1 ([y, ∞)) are a union of intersections of H = Od (ǫ−(d−1)/2 ) many halfspaces. We then produce a family Ad,ǫ of sets so that for f, g ∈ Cd,ǫ , dTV (f, g) = kf − gkAd,ǫ and so that the VC dimension of Ad,ǫ is Õ(d · L · H), which yields the desired result. We proceed with the details below. Proof of Proposition 7: We start by formally defining the family of functions Cd,ǫ : Definition 8. Given ǫ > 0, let Cd,ǫ be the set of all functions g : Rd → R of the following form: def • We set L = L(d, ǫ) = Θ((d/ǫ) log(d/ǫ)). def • For i ∈ [L], let yi > 0 and Pi be an intersection of H = Θ(d/ǫ)(d−1)/2 halfspaces in Rd . • Given {(yi , Pi )}Li=1 , we define the function g by  max {yi | i ∈ [L] : x ∈ Pi } if x ∈ ∪Lj=1 Pj g(x) = 0 if x ∈ / ∪Lj=1 Pj . 8 (1) Furthermore, we assume that the asymptotic constants used in defining L and H are sufficiently large. We are now ready to state and prove our first important lemma: Lemma 9. For any f ∈ Fd , and any ǫ > 0, there exists g ∈ Cd,ǫ so that kf − gk1 = O(ǫ). Proof. For y ∈ R+ and a function f : Rd → R+ we will denote by def Lf (y) = {x ∈ Rd | f (x) ≥ y} its superlevel sets. We note that, since f is log-concave, Lf (y) is a convex set for all y ∈ R+ . We define the desired approximation in a natural way, by constructing appropriate polyhedral approximations to the superlevel sets Lf (y) for a finite set of y’s in a geometric series with ratio (1 + ǫ). Concretely, given f ∈ Fd and ǫ > 0, we define the function g ∈ Cd,ǫ as def follows: For i ∈ [L], we set yi = Mf · (1 − ǫ)i , where Mf will denote the maximum value of f . We then consider the collection of convex sets Lf (yi ), i ∈ [L], and apply Theorem 5 to approximate each such set by a polytope with an appropriate number of facets. For each i ∈ [L], Theorem 5, applied for n = O(d/ǫ)(d−1)/2 , prescribes that there exists a polytope, Pi , that is the intersection of H = O(d/ǫ)(d−1)/2 many halfspaces in Rd , so that: (i) Pi ⊆ Lf (yi ), and (ii) vol(Pi ) ≥ vol (Lf (yi )) · (1 − ǫ). This defines our function g. It remains to prove that kf − gk1 = O(ǫ). We first point out that, by the definition of g, we have that f (x) ≥ g(x) for all x ∈ Rd . This is because, if g(x) = yi , it must be the case that x ∈ Pi ⊆ Lf (yi ), by condition (i) Rabove, and therefore f (x) ≥ yi = g(x). So, to prove the lemma, it suffices to show that g(x)dx = 1 − O(ǫ). We start by noting that Rd Z Z   d+1 vol (Lf (y)) dy. 1= f (x)dx = vol (x, y) ∈ R | 0 ≤ y ≤ f (x) = Rd R+ Similarly, if we denote Lg (y) = {x ∈ Rd | g(x) ≥ y}, we have that Z Z vol (Lg (y)) dy . g(x)dx = Rd R+ The following claim establishes that the contribution to with f (x) ≤ yL−1 is small: Ry Claim 10. It holds that 0 L−1 vol (Lf (y)) dy ≤ ǫ. R Rd f (x)dx from the points x ∈ Rd Proof. We assume   without loss of generality that f attains its maximum value, Mf , at x = 0. M Let R = Lf ef . Notice that 1= Z R+ vol (Lf (y)) dy ≥ Z vol (Lf (y)) dy ≥ 0≤y≤Mf /e Z 0≤y≤Mf /e 9 vol (R) dy = Mf · vol (R) , e where we used the fact that R ⊆ Lf (y) since y ≤ Mf /e. Hence, we have that vol(R) ≤ e/Mf . Moreover, we claim that, for z ≥ 1, by the log-concavity of f we have that Lf (Mf e−z ) ⊆ zR . Indeed, for f (x) ≥ Mf e−z , then f (x/z) ≥ f (0)(z−1)/z f (x)1/z ≥ Mf /e. Therefore, we have that x/z ∈ R or equivalently x ∈ zR. Hence,  vol Lf (Mf e−z ) ≤ O(z d /Mf ). (2) Recall that, by our definition of L, if we choose sufficiently large asymptotic constants, it holds yL−1 ≤ δMf for δ = ǫ2 /O(d)2d . We now have the following sequence of inequalities: Z yL−1 vol (Lf (y)) dy = 0 Z ∞  = vol Lf (Mf e−z ) Mf e−z dz ln(Mf /yL−1 ) ≤ ≤ Z (by the change of variable y = Mf e−z ) ∞ ln(1/δ) Z ∞ O(z d e−z )dz (by (2) and the assumption Mf /yL−1 ≥ 1/δ) O(d)de−z/2 dz (since ez/2 ≥ (z/2)d /d!) ln(1/δ) = O(d)dδ 1/2 ≤ǫ. (using the definition of δ) This completes the proof of Claim 10. We now establish the following crucial claim: Claim 11. For yL ≤ y ≤ y1 , we have that vol (Lg (y)) ≥ (1 − ǫ)vol Lf def y 1−ǫ  . Proof. Recall that yi = Mf (1 − ǫ)i , i ∈ [L]. Since y1 > y2 > . . . > yL , we can equivalently write (1) as follows:  yi , where i = min{j ∈ [L] : x ∈ Pj } if x ∈ ∪Lj=1 Pj (3) g(x) = 0 if x ∈ / ∪Lj=1 Pj . S We claim that Lg (yi ) = 1≤j≤i Pj , i ∈ [L]. Indeed, we can write Lg (yi ) = {x ∈ Rd | g(x) ≥ yi } = [ {x ∈ Rd | g(x) = yj } = 1≤j≤i [ 1≤j≤i where the second and third equalities follow from (3). 10 (Pj \ ∪k<j Pk ) = [ 1≤j≤i Pj , For y = y1 , we thus have that  vol(Lg (y1 )) = vol(P1 ) ≥ (1 − ǫ)vol(Lf (y1 )) ≥ (1 − ǫ)vol Lf  y1 1−ǫ  , where the first inequality is implied by (ii), and the second inequality follows from the fact Lf (y) ⊇ Lf (y ′ ) whenever y ≤ y ′ . i+1 For yL ≤ y < y1 , consider the index i ∈ [L − 1] such that yi+1 ≤ y < yi = y1−ǫ . By definition, we have that Lg (yi ) ⊆ Lg (y) ⊆ Lg (yi+1) . S Recalling that Lg (yi ) = 1≤j≤i Pj , we obtain Lg (y) ⊇ Pi , and therefore       y yi+1 ≥ (1−ǫ)vol Lf , vol(Lg (y)) ≥ vol(Pi ) ≥ (1−ǫ)vol(Lf (yi )) = (1−ǫ)vol Lf 1−ǫ 1−ǫ where the second inequality is implied by (ii) and the third inequality uses the fact that y ≥ yi+1 and the fact Lf (y) ⊇ Lf (y ′) whenever y ≤ y ′ . This completes the proof of Claim 11. We are now ready to complete the proof. We have the following: Z Z y1 g(x)dx = vol (Lg (y)) dy Rd yL    Z y1 y dy ≥ (1 − ǫ) vol Lf 1−ǫ yL Z Mf 2 = (1 − ǫ) · vol (Lf (y ′)) dy ′ 2 = (1 − ǫ) · yL /(1−ǫ) Mf Z 0 2 ≥ (1 − ǫ) · Z Rd vol (Lf (y)) dy −  f (x)dx − ǫ Z 0 (by Claim 11) yL−1 vol (Lf (y)) dy  (by Claim 10) = (1 − ǫ)2 · (1 − ǫ) = 1 − O(ǫ) . The proof of Lemma 9 is now complete. We now proceed to define the family of subsets A and bound from above its VC dimension. In particular, we define A to be the family of sets that exactly express the differences between two elements of Cd,ǫ : Definition 12. Define the family Ad,ǫ of sets in Rd to be the collection of all sets of the form {x ∈ Rd : g(x) ≥ g ′ (x)} for some g, g ′ ∈ Cd,ǫ . Notice that if g, g ′ ∈ Cd,ǫ then dTV (g, g ′) = kg − g ′kAd,ǫ . We show the following lemma: 11 Lemma 13. The VC dimension of Ad,ǫ is at most O(d/ǫ)(d+1)/2 log2 (1/ǫ). Furthermore, for f, f ′ ∈ Fd , and c > 0 is a sufficiently small constant, we have that dTV (f, f ′ ) ≤ kf − f ′ kAd,cǫ + ǫ/2. Proof. Note that a g ∈ Cd,ǫ is determined completely by L = O((d/ǫ) log(d/ǫ)) values yi and LH = O(d/ǫ)(d+1)/2 log(1/ǫ) halfspaces used to define the L convex polytopes Pi . We will show that if g ′ ∈ Cd,ǫ is defined by L values yi′ and another set of LH halfspaces, and if x ∈ Rd , then it is possible to determine whether or not g(x) ≥ g ′ (x) based solely on: • The relative ordering of the yi and yi′ . • Which of the 2LH halfspaces x belongs to. Now consider an arbitrary set T of n points in Rd . We wish to bound the number of possible distinct sets that can be obtained by the intersection of T with a set in Ad,ǫ . By the above, the intersection will be determined by: • The relative ordering of the 2L elements given by the yi and yi′ . • The intersections of each of the 2LH halfspaces defining g and g ′ with T . Note T that the number of orderings in question is at most Formally, we can write TH (2L)!. ′ ′ Pi = H P for halfspaces P , and similarly P = P , where Pi and Pi′ appear in i,j i j=1 i,j j=1 i,j the definition of g and g ′ respectively. We have the following: Claim 14. There exist at most (2L)! different 2L-ary set functions Fk such that for any ′ ′ g, g ′ ∈ Cd,ǫ the set {x : g(x) ≥ g ′ (x)} is given by Fk (P1,1 , . . . , PL,H , P1,1 , . . . , PL,H ) for some k. Furthermore, these functions are distributive over intersection, i.e., for all k and T, S1 , . . . , S2LH ⊆ Rd , we have that Fk (S1 , . . . , S2LH ) ∩ T = Fk (S1 ∩ T, . . . , S2LH ∩ T ). Proof. Note that for a given x ∈ Rd , we have that g(x) ≥ g ′ (x) if and only if there is an i / Pi′′ . That is, {x : g(x) ≥ g ′(x)} = such  that x ∈ Pi and for all i′ with yi′′ ≥ yi we have x ∈  S SL ′ i=1 Pi \ i′ :y ′′ >yi Pi′ . In terms of halfspaces, this can be equivalently written as follows: i {x : g(x) ≥ g ′ (x)} = L [ i=1   H \ j=1 Pi,j \ [ H \ i′ :yi′′ >yi j=1  Pi′′ ,j  . Note that, viewed as a function of the halfspaces, the above expression only depends on the relative ordering of the yi and yi′ . Thus, we can express this as one of at most (2L)! functions of these halfspaces. Since these functions are defined using only unions, intersections and differences (which all distribute over intersections), so do the Fk . It is well-known that for any halfspace the number of possible intersections with a set T of size n is at most O(n)d . By Claim 14, for any A ∈ Ad,ǫ we have that A ∩ T = 12 Fk (S1 ∩ T, . . . , S2LH ∩ T ) for halfspaces S1 , . . . , S2LH . There are (O(n)d)2LH different 2LHtuples of intersections of halfspaces with T and at most (2L)! different Fk . Therefore, the number of possible intersections of an element of Ad,ǫ with T is at most (2L)!O(n)2dLH = exp(O(d/ǫ)(d+1)/2 log(1/ǫ) log(n)) . (4) On the other hand, if Ad,ǫ has VC dimension n, (4) must be at least 2n . Therefore, if n is the VC-dimension of Ad,ǫ , we have that n/ log(n) = O(d/ǫ)(d+1)/2 log(1/ǫ) , and therefore, n = O(d/ǫ)(d+1)/2 log2 (1/ǫ) . For the claim comparing the variation distance to k · kAd,cǫ , note that, by Lemma 9, if c is chosen to be sufficiently small, there exist g, g ′ ∈ Cd,cǫ so that dTV (f, g), dTV (f ′ , g ′) ≤ ǫ/8. We then have that dTV (f, f ′ ) ≤ dTV (f, g) + dTV (f ′ , g ′ ) + dTV (g, g ′) ≤ ǫ/4 + kg − g ′kAd,cǫ ≤ ǫ/4 + kf − f ′ kAd,cǫ + dTV (f, g) + dTV (f ′ , g ′) ≤ kf − f ′ kAd,cǫ + ǫ/2 . This completes the proof of Lemma 13. The proof of Proposition 7 and Theorem 3 is now complete. 4 Conclusions In this paper, we gave the first sample complexity upper bound for learning log-concave densities on Rd . Our upper bound agrees with the previously known lower bound up to a multiplicative factor of Õd (ǫ−2 ). No sample complexity upper bound was previously known for this problem for any d > 3. Our result is a step towards understanding the learnability of log-concave densities in multiple dimensions. A number of interesting open problems remain. We outline the two immediate ones here: • What is the optimal sample complexity of log-concave density estimation? It is a plausible conjecture that the correct answer, under the total variation distance, is  Θd (1/ǫ)d/2+2 . We believe that a more sophisticated version of our structural approximation results could give such an upper bound. On the other hand, it seems likely that an adaptation of the construction in [KS16] could yield a matching lower bound. • Is there a polynomial time algorithm (as a function of the sample complexity) to learn log-concave densities on Rd ? The estimator underlying this work (Lemma 6) has been previously exploited [CDSS13, CDSS14a, ADLS17] to obtain computationally efficient learning algorithms for d = 1 – in fact, running in sample near-linear time [ADLS17]. Obtaining a computationally efficient algorithm for the case of general dimension is a challenging and important open question. 13 References [ADH+ 15] J. Acharya, I. Diakonikolas, C. Hegde, J. Li, and L. Schmidt. Fast and nearoptimal algorithms for approximating distributions by histograms. In Proceedings of the 34th ACM Symposium on Principles of Database Systems, PODS 2015, pages 249–263, 2015. [ADK15] J. Acharya, C. Daskalakis, and G. Kamath. Optimal testing for properties of distributions. In NIPS, 2015. [ADLS17] J. Acharya, I. Diakonikolas, J. Li, and L. Schmidt. Sample-optimal density estimation in nearly-linear time. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, pages 1278–1289, 2017. Available at https://arxiv.org/abs/1506.00671. [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. [BB16] Y. Baraud and L. Birge. Rho-estimators for shape restricted density estimation. Stochastic Processes and their Applications, 126(12):3888 – 3912, 2016. [BBBB72] R.E. Barlow, D.J. Bartholomew, J.M. Bremner, and H.D. Brunk. Statistical Inference under Order Restrictions. Wiley, New York, 1972. [BD03] G. Biau and L. Devroye. On the risk of estimates for block decreasing densities. Journal of Multivariate Analysis, 86(1):143 – 165, 2003. [BD14] F. Balabdaoui and C. R. Doss. Inference for a Mixture of Symmetric Distributions under Log-Concavity. To appear in Journal of Bernoulli. Available at http://arxiv.org/abs/1411.4708, 2014. [BEHW89] A. Blumer, A. Ehrenfeucht, D. Haussler, and M. Warmuth. Learnability and the Vapnik-Chervonenkis dimension. Journal of the ACM, 36(4):929–965, 1989. [Bir87a] L. Birgé. Estimating a density under order restrictions: Nonasymptotic minimax risk. Annals of Statistics, 15(3):995–1012, 1987. [Bir87b] L. Birgé. On the risk of histograms for estimating decreasing densities. Annals of Statistics, 15(3):1013–1022, 1987. [Bro08] E. M. Bronstein. Approximation of convex sets by polytopes. Journal of Mathematical Sciences, 153(6):727–762, 2008. [Bru58] H. D. Brunk. On the estimation of parameters restricted by inequalities. The Annals of Mathematical Statistics, 29(2):pp. 437–454, 1958. 14 [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. [CS13] Y. Chen and R. J. Samworth. Smoothed log-concave maximum likelihood estimation with applications. Statist. Sinica, 23:1373–1398, 2013. [CSS10] M. Cule, R. Samworth, and M. Stewart. Maximum likelihood estimation of a multi-dimensional log-concave density. Journal of the Royal Statistical Society: Series B, 72:545–607, 2010. [DDKT16] C. Daskalakis, A. De, G. Kamath, and C. Tzamos. A size-free CLT for poisson multinomials and its applications. In Proceedings of the 48th Annual ACM Symposium on the Theory of Computing, STOC ’16, 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. [DHS15] I. Diakonikolas, M. Hardt, and L. Schmidt. Differentially private learning of structured discrete distributions. In NIPS, pages 2566–2574, 2015. [DKS16a] I. Diakonikolas, D. M. Kane, and A. Stewart. Efficient Robust Proper Learning of Log-concave Distributions. Arxiv report, 2016. [DKS16b] I. Diakonikolas, D. M. Kane, and A. Stewart. The fourier transform of poisson multinomial distributions and its algorithmic applications. In Proceedings of STOC’16, 2016. 15 [DKS16c] I. Diakonikolas, D. M. Kane, and A. Stewart. Optimal learning via the fourier transform for sums of independent integer random variables. In Proceedings of the 29th Conference on Learning Theory, COLT 2016, pages 831–849, 2016. Full version available at https://arxiv.org/abs/1505.00662. [DKS16d] I. Diakonikolas, D. M. Kane, and A. Stewart. Properly learning poisson binomial distributions in almost polynomial time. In Proceedings of the 29th Conference on Learning Theory, COLT 2016, pages 850–878, 2016. Full version available at https://arxiv.org/abs/1511.04066. [DL01] L. Devroye and G. Lugosi. Springer, 2001. Combinatorial methods in density estimation. [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. [DSS11] L. Dumbgen, R. Samworth, and D. Schuhmacher. Approximation by log-concave distributions, with applications to regression. Ann. Statist., 39(2):702–730, 04 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. [Fou97] A.-L. Fougères. Estimation de densités unimodales. Canadian Journal of Statistics, 25:375–387, 1997. [GJ14] P. Groeneboom and G. Jongbloed. Nonparametric Estimation under Shape Constraints: Estimators, Algorithms and Asymptotics. Cambridge University Press, 2014. [GMR94] Y. Gordon, M. Meyer, and S. Reisner. Volume approximation of convex sets by polytopes – a constructive method. Stud. Math., 111:81–95, 1994. [GMR95] Y. Gordon, M. Meyer, and S. Reisner. Constructing a polytope to approximate a convex body. Geometriae Dedicata, 57(2):217–222, 1995. [Gre56] U. Grenander. On the theory of mortality measurement. Skand. Aktuarietidskr., 39:125–153, 1956. [Gro85] P. Groeneboom. Estimating a monotone density. In Proc. of the Berkeley Conference in Honor of Jerzy Neyman and Jack Kiefer, pages 539–555, 1985. [Gru93] P. M. Gruber. Aspects of approximation of convex bodies. Handbook of Convex Geometry, 1993. [HP76] D. L. Hanson and G. Pledger. Consistency in concave regression. The Annals of Statistics, 4(6):pp. 1038–1050, 1976. 16 [Hub64] P. J. Huber. Robust estimation of a location parameter. Ann. Math. Statist., 35(1):73–101, 03 1964. [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. [JW09] H. K. Jankowski and J. A. Wellner. Estimation of a discrete monotone density. Electronic Journal of Statistics, 3:1567–1605, 2009. [KM10] R. Koenker and I. Mizera. Quasi-concave density estimation. Ann. Statist., 38(5):2998–3027, 2010. [KS16] A. K. H. Kim and R. J. Samworth. Global rates of convergence in log-concave density estimation. Ann. Statist., 44(6):2756–2779, 12 2016. Available at http://arxiv.org/abs/1404.2298. [KV94] M. Kearns and U. Vazirani. An Introduction to Computational Learning Theory. MIT Press, Cambridge, MA, 1994. [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. [Rao69] B.L.S. Prakasa Rao. Estimation of a unimodal density. Sankhya Ser. A, 31:23– 36, 1969. [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. [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. [SW10] A. Seregin and J. A. Wellner. Nonparametric estimation of multivariate convextransformed densities. Ann. Statist., 38(6):3751–3781, 12 2010. [SW14] A. Saumard and J. A. Wellner. Log-concavity and strong log-concavity: A review. Statist. Surv., 8:45–114, 2014. [Tsy08] A. B. Tsybakov. Introduction to Nonparametric Estimation. Springer Publishing Company, Incorporated, 2008. [VC71] V. Vapnik and A. Chervonenkis. On the uniform convergence of relative frequencies of events to their probabilities. Theory Probab. Appl., 16:264–280, 1971. 17 [vdVW96] A. W. van der Vaart and J. A. Wellner. Weak convergence and empirical processes. Springer Series in Statistics. Springer-Verlag, New York, 1996. With applications to statistics. [VV16] G. Valiant and P. Valiant. Instance optimal learning of discrete distributions. In Proceedings of the Forty-eighth Annual ACM Symposium on Theory of Computing, STOC ’16, pages 142–155, 2016. [Wal09] G. Walther. Inference and modeling with log-concave distributions. Stat. Science, 24:319–327, 2009. [Weg70] E.J. Wegman. Maximum likelihood estimation of a unimodal density. I. and II. Ann. Math. Statist., 41:457–471, 2169–2174, 1970. [Wel15] J. A. Wellner. Nonparametric estimation of s-concave and log-concave densities: an alternative to maximum likelihood. Talk given at European Meeting of Statisticians, Amsterdam, 2015. Available at https://www.stat.washington.edu/jaw/RESEARCH/TALKS/EMS-2015.1rev1.pdf. 18
7cs.IT
Dynamic Algorithms for Graph Coloring Sayan Bhattacharya∗ Deeparnab Chakrabarty† Monika Henzinger‡ arXiv:1711.04355v1 [cs.DS] 12 Nov 2017 Danupon Nanongkai§ Abstract We design fast dynamic algorithms for proper vertex and edge colorings in a graph undergoing edge insertions and deletions. In the static setting, there are simple linear time algorithms for (∆ + 1)- vertex coloring and (2∆ − 1)-edge coloring in a graph with maximum degree ∆. It is natural to ask if we can efficiently maintain such colorings in the dynamic setting as well. We get the following three results. (1) We present a randomized algorithm which maintains a (∆ + 1)-vertex coloring with O(log ∆) expected amortized update time. (2) We present a deterministic algorithm which maintains a (1 + o(1))∆-vertex coloring with O(polylog ∆) amortized update time. (3) We present a simple, deterministic algorithm which maintains a (2∆ − 1)-edge coloring with √ O(log ∆) worst-case update time. This improves the recent O(∆)-edge coloring algorithm with Õ( ∆) worst-case update time [BM17]. ∗ Corresponding author. University of Warwick, UK. Email: [email protected] Dartmouth College, USA. Email: [email protected] ‡ University of Vienna, Austria. Email: [email protected] § KTH, Sweden. Email: [email protected] † i Contents 1 Introduction 1 2 Our Techniques for Dynamic Vertex Coloring 2.1 An overview of our randomized algorithm. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 An overview of our deterministic algorithm. . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 5 3 A Randomized Dynamic Algorithm for ∆ + 1 Vertex Coloring 3.1 Preliminaries. . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Maintaining the hierarchical partition. . . . . . . . . . . . . 3.3 The recoloring subroutine. . . . . . . . . . . . . . . . . . . 3.4 The complete algorithm and analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 6 7 12 13 4 A Deterministic Dynamic Algorithm for (1 + o(1))∆ Vertex Coloring 14 4.1 Notations and preliminaries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.2 The algorithm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.3 Bounding the amortized update time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 5 A Deterministic Dynamic Algorithm for (2∆ − 1) Edge Coloring 20 6 Extensions to the Case where ∆ Changes with Time 21 6.1 Randomized (∆t + 1) vertex coloring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.2 Deterministic (1 + o(1))∆t vertex coloring. . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.3 Deterministic (2∆t − 1) edge coloring. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 7 Open Problems 23 8 Acknowledgements 24 References 24 A Locally-Fixable Problems 26 ii 1 Introduction Graph coloring is a fundamental problem with many applications in computer science. A proper c-vertex coloring of a graph assigns a color in {1, . . . , c} to every node, in such a way that the endpoints of every edge get different colors. The chromatic number of the graph is the smallest c for which a proper c-vertex coloring exists. Unfortunately, from a computational perspective, approximating the chromatic number is rather futile: for any constant ǫ > 0, there is no polynomial time algorithm that approximates the chromatic number within a factor of n1−ǫ in an n-vertex graph, assuming P 6= N P [FK98; Zuc07] (see [KP06] for a stronger bound). On the positive side, we know that the chromatic number is at most ∆ + 1 where ∆ is the maximum degree of the graph. There is a simple linear time algorithm to find a (∆ + 1)-coloring: pick any uncolored vertex v, scan the colors used by its neighbors, and assign to v a color not assigned to any of its neighbors. Since the number of neighbors is at most ∆, by pigeon hole principle such a color must exist. In this paper, we consider the graph coloring problem in the dynamic setting, where the edges of a graph are being inserted or deleted over time and we want to maintain a proper coloring after every update. The objective is to use as few colors as possible while keeping the update time1 small. Specifically, our main goal is to investigate whether a (∆ + 1)-vertex coloring can be maintained with small update time. Note that the greedy algorithm described in the previous paragraph can easily be modified to give a worst-case update time of O(∆): if an edge (u, v) is inserted between two nodes u and v of same color, then scan the at most ∆ neighbors of v to find a free color. A natural question is whether we can get an algorithm with significantly lower update time. We answer this question in the affirmative. • We design and analyse a randomized algorithm which maintains a (∆ + 1)-vertex coloring with O(log ∆) expected amortized update time.2 It is not difficult to see that if we had (1 + ǫ)∆ colors, then there would be a simple randomized algorithm with O(1/ǫ)-expected amortized update time (see Section 2.1 for details). What is challenging in our result above is to maintain a ∆ + 1 coloring with small update time. In contrast, if randomization is not allowed, then even maintaining a O(∆)-coloring with o(∆)-update time seems non-trivial. Our second result is on deterministic vertex coloring algorithms: although we do not achieve a ∆ + 1 coloring, we come close. • We design and analyse a deterministic algorithm which maintains a (∆ + o(∆))-vertex coloring with O(polylog ∆) amortized update time. Note that in a dynamic graph the maximum degree ∆ can change over time. Our results hold with the changing ∆ as well. However, for ease of explaining our main ideas we restrict most of the paper to the setting where ∆ is a static upper bound known to the algorithm. In Section 6 we point out the changes needed to make our algorithms work for the changing-∆ case. Our final result is on maintaining an edge coloring in a dynamic graph with maximum degree ∆. A proper edge coloring is a coloring of edges such that no two adjacent edges have the same color. • We design and analyze a simple, deterministic (2∆ − 1)-edge coloring algorithm with O(log ∆) worst-case update time. This significantly√improves upon the recent O(∆)-edge coloring algorithm of Barenboim and Maimon [BM17] which needs Õ( ∆)-worst-case update time. 1 There are two notions of update time: amortized update time – an algorithm has amortized update time of α if for any t, after t insertions or deletions the total update time is ≤ αt, and worst case update time – an algorithm has worst case update time of α if every update time ≤ α. As typical for amortized update time guarantees, we assume that the input graph is empty initially. 2 As typically done for randomized dynamic algorithms, we assume that the adversary who fixes the sequence of edge insertions and deletions is oblivious to the randomness in our algorithm. 1 Perspective: An important aspect of (∆ + 1)-vertex coloring is the following local-fixability property: Consider a graph problem P where we need to assign a state (e.g. color) to each node. We say that a constraint is local to a node v if it is defined on the states of v and its neighbors. We say that a problem P is locally-fixable iff it has the following three properties. (i) There is a local constraint on every node. (ii) A solution S to P is feasible iff S satisfies the local constraint at every node. (iii) If the local constraint Cv at a node v is unsatisfied, then we can change only the state of v to satisfy Cv without creating any new unsatisfied constraints at other nodes. For example, (∆ + 1)-vertex coloring is locally-fixable as we can define a constraint local to v to be satisfied if and only if v’s color is different from all its neighbors, and if not, then we can always find a recoloring of v to satisfy its local constraint and introduce no other constraint violations. On the other hand, the following problems do not seem to be locally-fixable: globally optimum coloring, the best approximation algorithm for coloring [Hal93], ∆-coloring (which always exists by Brook’s theorem, unless the graph is a clique or an odd cycle), and (∆ + 1)-edge coloring (which always exists by Vizing’s theorem). Observe that if we start with a feasible solution for a locally-fixable problem P, then after inserting or deleting an edge (u, v) we need to change only the states of u and v to obtain a new feasible solution. For instance in the case of (∆ + 1)-vertex coloring, we need to recolor only the nodes incident to the inserted edge. Thus, the number of changes is guaranteed to be small, and the main challenge is to search for these changes in an efficient manner without having to scan the whole neighborhood. In contrast, for non-locallyfixable problems, the main challenge seems to be analyzing how many nodes or edges we need to recolor (even with an inefficient algorithm) to keep the coloring proper. A question in this spirit has been recently studied in [BCKLRRV17]. It can be shown that the (2∆ − 1)-edge coloring problem is also locally-fixable (see Appendix A). Given our current results on (∆ + 1)-vertex coloring and (2∆ − 1)-edge coloring, it is inviting to ask whether there is some deeper connections that exist in designing dynamic algorithms for these problems. In particular, are there reductions possible among these problems? Or can we find a complete locally-fixable problem? It is also very interesting to understand the power of randomization for these problems. Indeed, in the distributed computing literature, there is deep and extensive work on and beyond the locally-fixable problems above. (In fact, it can be shown that any locally-fixable problem is in the SLOCAL complexity class studied in distributed computing [GKM17]; see Appendix A.) Coincidentally, just like our findings in this paper, there is still a big gap between deterministic and randomized distributed algorithms for (∆ + 1)-vertex coloring. For further details we refer the to the excellent monograph by Barenboim and Elkin [BE13] (see [GKM17; FGK17], and references therein, for more recent results). Finally, we also note that the dynamic problems we have focused on are search problems; i.e., their solutions always exist, and the hard part is to find and maintain them. This posts a new challenge when it comes to proving conditional lower bounds for dynamic algorithms for these locally-fixable problems: while a large body of work has been devoted to decision problems [Pat10; AW14; HKNS15; KPP16; Dah16], it seems non-trivial to adapt existing techniques to search problems. Other Related Work. Dynamic graph coloring is a natural problem and there have been many works on this [DGOP07; OB11; SIPGRP16; HLT17]. Most of these papers, however, have proposed heuristics and described experimental results. The only two theoretical papers that we are aware of are [BM17] and [BCKLRRV17], and they are already mentioned above. Organisation of the rest of the paper. In Section 2 we give the high level ideas behind our vertex coloring result. In particular, Section 2.1 contains the main ideas of the randomized algorithm, whereas Section 3 contains the full details. Similarly, Section 2.2 contains the main ideas of the deterministic algorithm, whereas Section 4 contains the full details. Section 5 contains the edge-coloring result. We emphasize that Sections 3, 4, 5 are completely self contained, and they can be read independently of each other. As mentioned earlier, in Sections 3, 4, 5 we assume that the parameter ∆ is known and that the maximum 2 degree never exceeds ∆. We do so solely for the better exposition of the main ideas. Our algorithms easily modify to give results where ∆ is the current maximum degree. See Section 6 for the details. 2 Our Techniques for Dynamic Vertex Coloring 2.1 An overview of our randomized algorithm. We present a high level overview of our randomized dynamic algorithm for (∆ + 1)-vertex coloring that has O(log ∆) expected amortized update time. The full details can be found in Section 3. We start with a couple of warm-ups before sketching the main idea. Warmup I: Maintaining a 2∆-coloring in O(1) expected amortized update time. We first observe that maintaining a 2∆ coloring is easy using randomization against an oblivious adversary – we need only O(1) expected amortized time. The algorithm is this. Let C be the palette of 2∆ colors. Each vertex v stores the last time τv at which it was recolored. If an edge gets deleted or if an edge gets inserted between two vertices of different colors, then we do nothing. Next, consider the scenario where an edge gets inserted at time τ between two vertices u and v of same color. Without any loss of generality, suppose that τv > τu , i.e., the vertex v was recolored last. In this event, we scan all the neighbors of v and store the colors used by them in a set S, and select a random color from C \ S. Since |C| = 2∆, we have |C \ S| ≥ ∆ as well. Clearly this leads to a proper coloring since the new color of v, by design, is not the current colors of any of v’s neighbors. The time taken to compute the set S can be as high as O(∆) since v can have ∆ neighbors. Now, let us analyze the probability that the insertion of the edge (u, v) at time τ leads to a conflict. Suppose that at time τv , just before v recolored itself, the color of u was c. The insertion at time τ creates a conflict only if v chose the color c at time τv . However the probability of this event is at most 1/∆, since v had at least ∆ choices to choose its color from at time τv . Therefore the expected time spent on the addition of edge (u, v) is O(∆) · (1/∆) = O(1). In the analysis described above, we have crucially used the fact that the insertion of the edge (u, v) at time τ is oblivious to the random choice made while recoloring the vertex v at time τv . It should also be clear that the constant 2 is not sacrosanct and a (1 + ǫ)∆ coloring can be obtained in O(1/ǫ)-expected amortized time. However this fails to give a ∆ + 1 or even ∆ + c coloring in o(∆) time for any constant c. Warmup II: A simple algorithm for (∆ + 1) coloring that is difficult to analyze. In the previous algorithm, while recoloring a vertex we made sure that it never assumed the color of any of its neighbors. We say that a color c is blank for a vertex v iff no neighbor of v gets the color c. Since we have ∆ + 1 colors, every vertex has at least one blank color. However, if there is only one blank color to choose from, then an adversarial sequence of updates may force the algorithm to spend Ω(∆) time after every edge insertion. A polar-opposite idea would be to randomly recolor a vertex without considering the colors of its neighbors. This has the problem that a recoloring may lead to one or more neighbors of the vertex being unhappy (i.e., having the same color as v), and then there is a cascading effect which is hard to control. We take the middle ground: Define a color c to be unique for a vertex v if it is assigned to exactly one neighbor of v. Thus, if v is recolored using a unique color then the cascading effect of unhappy vertices doesn’t explode. Specifically, after recoloring v we only need to consider recoloring v’s unique neighbor, and so on and so forth. Why is this idea useful? This is because although the number of blank colors available to a vertex (i.e., the colors which none of its neighbors are using) can be as small as 1, the number of blank+unique colors is always at least ∆/2. This holds since any color which is neither blank nor unique accounts for at least two neighbors of v, whereas v has at most ∆ neighbors. The above observation suggests the following natural algorithm. When we need to recolor a vertex v, we first scan all its neighbors to identify the set S of all unique and blank colors for v, and then we pick a new 3 color c for v uniformly at random from this set S. By definition of the set S, at most one neighbor y of x will have the same color c. If such a neighbor y exists, then we recolor y recursively using the same algorithm. We now state three important properties of this scheme. (1) While recoloring a vertex x we have to make at most one recursive call. (2) It takes O(∆) time to recolor a vertex x, ignoring the potential recursive call to its neighbor. (3) When we recolor a vertex x, we pick its new color uniformly at random from a set of size Ω(∆). Note that the properties (2) and (3) served as the main tools in establishing the O(1) bound on the expected amortized update time as discussed in the previous algorithm. For property (1), if we manage to upper bound the length of the chain of recursive calls that might result after the insertion of an edge in the input graph between two vertices of same color, then we will get an upper bound on the overall update time of our algorithm. This, however, is not trivial. In fact, the reader will observe that it is not necessary to have ∆ + 1 colors in order to ensure the above three properties. They hold even with ∆ colors. Indeed, in that case the algorithm described above might never terminate. We conclude that another idea is required to achieve O(log ∆) update time. This turns out to be the concept of a hierarchical partition of the set of vertices of a graph. We describe this and present an overview of our final algorithm below. An overview of the final algorithm. Fix a large constant β > 1, and suppose that we can partition the vertex-set of the input graph G = (V, E) into L = logβ ∆ levels 1, . . . , L with the following property. Property 2.1. Consider any vertex v at a level 1 ≤ ℓ(v) ≤ L. Then the vertex v has at most O(β ℓ(v) ) neighbors in levels {1, . . . , ℓ(v)}, and at least Ω(β ℓ(v)−5 ) neighbors in levels {1, . . . , ℓ(v) − 1}. It is not clear at first glance that there even exists such a partition of the vertex-set: Given a static graph G = (V, E), there seems to be no obvious way to assign a level ℓ(v) ∈ {1, . . . , L} to each vertex v ∈ V satisfying Property 2.1. One of our main technical contributions is to present an algorithm that maintains a hierarchical partition satisfying Property 2.1 in a dynamic graph. Initially, when the input graph G = (V, E) has an empty edge-set, we place every vertex at level 1. This trivially satisfies Property 2.1. Subsequently, after every insertion or deletion of an edge in G, our algorithm updates the hierarchical partition in a way which ensures that Property 2.1 continues to remain satisfied. This algorithm is deterministic, and using an intricate charging argument we show that it has an amortized update time of O(log ∆). This also gives a constructive proof of the existence of a hierarchical partition that satisfies Property 2.1 in any given graph. We now explain how this hierarchical partition, in conjunction with the ideas from Warmup II, leads to an efficient randomized ∆ + 1 vertex coloring algorithm. In this algorithm, we require that a vertex u keeps all its neighbors v at levels ℓ(v) ≤ ℓ(u) informed about its own color χ(u). This requirement allows a vertex x to maintain: (1) the set Cx+ of colors assigned to its neighbors y with ℓ(y) ≥ ℓ(x), and (2) the set Cx = C \ Cx+ of remaining colors. We say that a color c ∈ Cx is blank for x iff no neighbor y of x with ℓ(y) < ℓ(x) has the same color c. On the other hand, we say that a color c ∈ Cx is unique for x iff exactly one neighbor y of x with ℓ(y) < ℓ(x) has the same color c. Note the crucial change in the definition of a unique color from Warmup II. Now, for a color c to be unique for x it is not enough that x has exactly one neighbor with the same color; in addition, this neighbor has to lie at a level strictly below the level of x. Using the property of the hierarchical partition that x has Ω(β ℓ(x)−5 ) neighbors in levels {1, . . . , ℓ(x) − 1} and an argument similar to one used in Warmup II, we can show that there are a large number of colors that are either blank or unique for x. Claim 2.1. For every vertex x, there are at least 1 + Ω(β ℓ(x)−5 ) colors that are either blank or unique. We now implement the same template as in Warmup II. When a vertex x needs to be recolored, it picks its new color uniformly at random from the set of its blank + unique colors. This can cause some other vertex y to be unhappy, but such a vertex y lies at a level strictly lower than ℓ(x). As there are O(log ∆) levels, this bounds the depth of any recursive call: At level 1, we just use a blank color. Further, whenever we recolor x, the time it needs to inform all its neighbors y with ℓ(y) ≤ ℓ(x) is bounded by O(β ℓ(x) ) (by 4 the property of the hierarchical partition). Since each recursive call is done on a vertex at a strictly lower level, the total time spent on all the recursive calls can also be bounded by O(β ℓ(x) ) due to a geometric sum. Finally, by Claim 2.1, each time x picks a random color it does so from a palette of size Ω(β ℓ(x)−5 ). If the order of edge insertions and deletions is oblivious to this randomness, then the probability that an edge insertion is going to be problematic is O(1/β ℓ(x)−5 ), which gives an expected amortized time bound of O(1/β ℓ(x)−5 ) × O(β ℓ(x) ) = O(β 5 ) = O(1). 2.2 An overview of our deterministic algorithm. We present a high level overview of our deterministic dynamic algorithm for (1 + o(1))∆-vertex coloring that has an amortized update time of O(polylog ∆). The full details are in Section 4. As in Section 2.1, we start with a warmup before sketching the main idea. √ Warmup: Maintaining a 4∆ coloring √ of 4∆ √ in O( ∆) amortized update time. Let C be the palette √ colors. We partition the set C into 2 ∆ equally sized subsets: C1 , . . . , C2 ∆ each having 2 ∆ colors. Colors in Ct are said to be of type t and we let t(v) denote the type of the color assigned to a node v. Furthermore, we let dt (v) denote the number of neighbors of v that are assigned a type t color. We refer to the neighbors u of v with t(u) = t as type t neighbors of v. For every node v, we let Γ(v) denote the set of neighbors u of v with t(u) = t(v). Every node v maintains the set Γ(v) in a doubly linked list. Note that if the node v gets a color from Ct , then we have dt (v) = |Γ(v)|. We√maintain a proper coloring with the following extra property: If a node v is of type t, then it has at most 2 ∆ − 1 type t neighbors. √ Property 2.2. If any node v is assigned a color from Ct , then we have dt (v) < 2 ∆. Initially, the input graph G = (V, E) is empty, every vertex is colored arbitrarily, and the above property holds. Note that the deletion of an edge from G does not lead to a violation of the above property, nor does it make the existing coloring invalid. We now discuss what we do when an edge (u, v) gets inserted into G, by considering three possible cases. Case 1: t(u) 6= t(v). There is nothing to be done since u and v have different types of colors. √ Case 2: t(u) = t(v) = t, but both dt (u) and dt (v) < 2 ∆ − 1 after the insertion of the edge (u, v). The colors assigned to the vertices u and v are of the same type. In this event, we first set Γ(u) = Γ(u) ∪ {v} and Γ(v) = Γ(v) ∪ {u}. There is nothing further to do if u and v don’t have the same color since the property continues to hold. If they have the same color c, then we pick an arbitrary endpoint u and find a type t color c′ 6= c that √ is not assigned to any√of the neighbors of u in the set Γ(u). This is possible since′ |Γ(u)| = dt (u) < 2 ∆ − 1 and there are 2 √∆ colors of each type. We then change the color of u to c . These operations take O(|Ct | + |Γ(u)|) = O( ∆) time. √ Case 3: t(u) = t(v) = t and dt (u) = 2 ∆−1 after the insertion of the edge (u, v). Here, after the addition of the edge (u, v), the vertex u violates Property 2.2. We run the following subroutine RECOLOR(u): √ • √ Since u has at most ∆ neighbors and there are 2 ∆ types, there must exist a type t′ with dt′ (u) ≤ ∆/2. Such a type t′ can be found by doing a linear scan of all the neighbors of u, and this takes O(∆) time since u has at most ∆ neighbors. a color c that is not assigned to any of the neighbors of u: Such a color must From the set Ct′ we choose √ ′ exist since |Ct | = 2 ∆ > dt′ (u). Next, we update the set Γ(u) as follows: We delete from Γ(u) every neighbor x of u with t(x) = t, and insert into Γ(u) every neighbor x of u with t(x) = t′ . We similarly √ update the set Γx for every neighbor x of u with t(x) ∈ {t, t′ }. It takes O(dt (u) + dt′ (u)) = O( ∆) time to implement this step. √ Accordingly, the total time spent on this call to the RECOLOR(.) subroutine is O(∆) + O( ∆) = O(∆). However, Property 2.2 may now be violated for one or more neighbors u′ of u. If this is the 5 case, then we recursively call RECOLOR(u′) and keep doing so until all the vertices satisfy Property 2.2. In the end, we have a proper coloring with all the vertices satisfying Property 2.2. A priori it may not be clear that the above procedure even terminates.√However, we now argue that the amortized time spent in all the calls to the RECOLOR subroutine is O( ∆) (and in particular P the chain of recursive calls to the subroutine terminates). To do so we introduce a potential Φ := v∈V dt(v) (v), which sums over all vertices the number of its neighbors which are of the same type as itself. Note that when an edge (u, v) is inserted or deleted the potential √ can increase by at most 2. However, during a call to RECOLOR(u) the potential Φ drops by √ at least 3 ∆. This is√because u moves from a color of type √ told to a color of type tnew where dtold (u) = 2 ∆ and dtnew (u) ≤ ∆/2; this leads to a drop of 1.5 ∆ and we get the same amount of drop when considering u’s neighbors.√Therefore, during T edge insertions or deletions starting from an empty graph, we can have at most O(T √ / ∆) calls to the RECOLOR subroutine. Since each such call takes O(∆) time, we get the claimed O( ∆) amortized update time. Getting O(polylog ∆) amortized update time. One way to interpret the previous √ algorithm is as follows. Think of each color c ∈ C as an ordered pair c = (c1 , c2 ), where c1 , c2 ∈ {1, . . . , 2 ∆}. The first coordinate c1 is analogous to the notion of a type, as defined in the previous algorithm. For any vertex v ∈ V and j ∈ {1, 2}, let χ∗j (v) denote the j-tuple consisting of the first j coordinates of the color assigned to v. For ease of exposition, we define χ∗0 (v) = ⊥. Furthermore, for every vertex v ∈ V and every j ∈ {0, 1, 2}, let Nj∗ (v) = {u ∈ Nv : χ∗j (u) = χ∗j (v)} denote the set of neighbors u of v with χ∗j (u) = χ∗j (v). With these √ notations, Property 2.2 can be rewritten as: |N1∗ (v)| < 2 ∆ for all v ∈ V . To improve the amortized update time to O(polylog ∆), we think of every color as an L tuple c = (c1 , . . . , cL ), whose each coordinate can take λ possible values. The total number of colors is given by λL = |C|. The values of L and λ are chosen in such a way which ensures that λ = O(lg1+o(1) ∆) and L = O(lg ∆/ lg lg ∆). We maintain the invariant that |Nj∗ (v)| ≤ (∆/λj ) · f (j) for all v ∈ V and j ∈ [0, L], for some carefully chosen function f (j). We then implement a generalization of the previous algorithm on these colors represented as L tuples. Using some carefully chosen parameters we show how to deterministically maintain a (∆ + o(∆)) vertex coloring in a dynamic graph in O(polylog ∆) amortized update time. See Section 4 for the details. 3 A Randomized Dynamic Algorithm for ∆ + 1 Vertex Coloring As discussed in Section 2.1, our randomized dynamic algorithm for ∆ + 1 vertex coloring has two main components. The first one is a hierarchical partition of the vertices of the input graph into O(log ∆)-many levels. In Section 3.2, we show how to maintain such a hierarchical partition dynamically. The second component is the use of randomization while recoloring a conflicted vertex v so as to ensure that (a) at most one new conflict is caused due to this recoloring, and (b) if so, the new conflicted vertex lies at a level strictly lower than ℓ(v). We describe this second component in Section 3.3. The complete algorithm, which combines the two components, appears in Section 3.4. The theorem below captures our main result. Theorem 3.1. There is a randomized, fully dynamic algorithm to maintain a ∆ + 1 vertex coloring of a graph whose maximum degree is ∆ with expected amortized update time O(log ∆). 3.1 Preliminaries. We start with the definition of a hierarchical partition. Let G = (V, E) denote the input graph that is changing dynamically, and let ∆ be an upper bound on the maximum degree of any vertex in G. For now we assume that the value of ∆ does not change with time. In Section 6, we explain how to relax this assumption. Fix a constant β > 20. For simplicity of exposition, assume that logβ ∆ = L (say) is an integer 6 and that L > 3. The vertex set V is partitioned into L − 3 subsets V4 , . . . , VL . The level ℓ(v) of a vertex v is the index of the subset it belongs to. For any vertex v ∈ V and any two indices 4 ≤ i ≤ j ≤ L, we let Nv (i, j) = {u : (u, v) ∈ E, i ≤ ℓ(u) ≤ j} be the set of neighbors of v whose levels are between i and j. For notational convenience, we define Nv (i, j) = ∅ whenever i > j. A hierarchical partition satisfies the following two properties/invariants. Note that since β L = ∆, Invariant 3.3 is trivially satisfied by every vertex at the highest level L. Invariant 3.2, on the other hand, is trivially satisfied by the vertices at level 4. Invariant 3.2. For every vertex v ∈ V at level ℓ(v) > 4, we have |Nv (4, ℓ(v) − 1)| ≥ β ℓ(v)−5 . Invariant 3.3. For every vertex v ∈ V , we have |Nv (4, ℓ(v))| ≤ β ℓ(v) . Let C = {1, . . . , ∆ + 1} be the set of all possible colors. A coloring χ : V → C is proper for the graph G = (V, E) iff for every edge (u, v) ∈ E, we have χ(u) 6= χ(v). Given the hierarchical partition, a coloring S χ : V → C, and a vertex x at level i = ℓ(x), we define a few key subsets of C. Let Cx+ := y∈Nx (i,L) χ(y) be the colors used by neighbors of x lying in levels i and above. Let Cx := C \ Cx+ denote the remaining set of colors. We say a color c ∈ Cx is blank for x if no vertex in Nx (4, i − 1) is assigned color c. We say a color c ∈ Cx is unique for x if exactly one vertex in Nx (4, i − 1) is assigned color c. We let Bx (respectively Ux ) denote the blank (respectively unique) colors for x. Let Tx := Cx \ (Bx ∪ Ux ) denote the remaining colors in Cx . Thus, for every color c ∈ Tx , there are at least two vertices u ∈ Nx (4, i − 1) that are assigned color c. We end this section with a crucial observation. Claim 3.1. For any vertex x at level i, we have |Bx ∪ Ux | ≥ 1 + |Nx (4,i−1)| . 2 Proof. Since |C| = 1 + ∆ ≥ 1 + |Nx (4, L)| and |Cx+ | ≤ |Nx (i, L)|, we get |Cx | ≥ 1 + |Nx (4, i − 1)|. The following two observations, which in turn follow from definitions, prove the claim; (a) |Cx | = |Bx ∪ Ux | + |Tx | and (b) 2|Tx | ≤ |Nx (4, i − 1)|. Data Structures. We now describe the data structures used by our dynamic algorithm. The first set is used to maintain the hierarchical partition and the second set is used to maintain the sets of colors. (1) For every vertex v ∈ V and every level ℓ(v) ≤ i ≤ L, we maintain the neighbors Nv (i, i) of v in level i in a doubly linked list. If ℓ(v) > 4, then we also maintain the set of neighbors Nv (4, ℓ(v) − 1) in a doubly linked list. We use the phrase neighborhood list of v to refer to any one of these lists. For every neighborhood list we maintain a counter which stores the number of vertices in it. Every edge (u, v) ∈ E keeps two pointers – one to the position of u in the neighborhood list of v, and the other vice versa. Therefore when an edge is inserted into or deleted from G the linked lists can be updated in O(1) time. Finally, we keep two queues of dirty vertices which store the vertices not satisfying either of the two invariants. (2) We maintain the coloring χ as an array where χ(v) contains the current color of v. Every vertex v maintains the colors Cv+ and Cv in doubly linked lists. For each color c and vertex v, we keep a pointer from the color to its position in either Cv+ or Cv depending on which list c belongs to. This allows us to add and delete colors from these lists in O(1) time. We also maintain a counter µ+ v (c) associated with each color c and each vertex v. If c ∈ Cv+ , then the value of µ+ (c) equals the number of neighbors y ∈ Nv (i, L) with v color χ(y) = c. Otherwise, if c ∈ Cv , then we set µ+ (c) ← 0. For each vertex v, we keep a time counter τv v 3 which stores the last “time” (edge insertion/deletion) at which v was recolored , i.e., its χ(v) was changed. 3.2 Maintaining the hierarchical partition. Initially when the graph is empty, all the vertices are at level 4. This satisfies both the invariants vacuously. Subsequently, we ensure that the hierarchical partition satisfies Invariants 3.2 and 3.3 by using a simple 3 Note that as long as the number of edge insertions and deletions are polynomial, τv requires only O(log n) bits to store; if the number becomes superpolynomial then every n3 rounds or so we recompute the full coloring in the current graph. 7 greedy heuristic procedure. To describe this procedure, we define a vertex to be dirty if it violates any one of the invariants, and clean otherwise. Our goal then is to ensure that every vertex in the hierarchical partition remains clean. By inductive hypothesis, we assume that every vertex is clean before the insertion/deletion of an edge. Due to the insertion/deletion of an edge (u, v), some vertices of the form x ∈ {u, v} might become dirty. We fix the dirty vertices as per the procedure described in Figure 1. In this procedure, we always fix the dirty vertices violating Invariant 3.3 before fixing any dirty vertex that violates Invariant 3.2. This will be crucial in bounding the amortized update time. Furthermore, note that as we change the level of a vertex x during one iteration of the W HILE loop in Figure 1, this might lead to a change in the below or side degrees4 of the neighbors of x. Hence, one iteration of the W HILE loop might create multiple new dirty vertices, which are dealt with in the subsequent iterations of the same W HILE loop. It is not hard to see that any iteration of the while loop acting on a vertex x ends with making it clean. We encapsulate this in the following lemma and the subsequent corollary. 01. W HILE Invariant 3.2 or Invariant 3.3 is violated: 02. I F there is some vertex x ∈ V that violates Invariant 3.3, T HEN 03. Find the minimum level k > ℓ(x) where |Nx (4, k)| ≤ β k . 04. Move the vertex x up to level k, and update the relevant data structures as described in the proof of Lemma 3.5. 05. E LSE 06. Find a vertex x ∈ V that violates Invariant 3.2. 07. I F there is a level 4 < k < ℓ(x) where |Nx (4, k − 1)| ≥ β k−1 , T HEN 08. Move the vertex x down to maximum such level k, and update the relevant data structures as described in the proof of Lemma 3.6. 09. E LSE 10. Move the vertex x down to level 4, and update the relevant data structures. Figure 1: Subroutine: MAINTAIN-HP is called when an edge (u, v) is inserted into or deleted from G. Lemma 3.4. Consider any iteration of the W HILE loop in Figure 1 which changes the level of a vertex x ∈ V from i to k. The vertex x becomes clean (i.e., satisfies both the invariants) at the end of the iteration. Furthermore, at the end of this iteration we have: (a) |Nx (4, k)| ≤ β k , (b) |Nx (4, k − 1)| ≥ β k−1 if k > 4. Proof. There are three cases to consider, depending on how the vertex moves from level i to level k. Case 1. The vertex x moves up from a level i ∈ [4, L − 1]. In this case, the vertex moves up to the minimum level k > i where |Nx (4, k)| ≤ β k . This implies that |Nx (4, k − 1)| > β k−1 > β k−5 . Thus, the vertex x satisfies both the invariants after it moves to level k, and both the conditions (a) and (b) hold. Case 2. The vertex x moves down from level i to a level 4 < k < i. In this case, steps 07, 08 in Figure 1 imply that k < i is the maximum level where |Nx (4, k − 1)| ≥ β k−1 . Hence, we have |Nx (4, k)| < β k . So the vertex satisfies both the invariants after moving to level k, and both the conditions (a) and (b) hold. Case 3. The vertex x moves down from level i to level k = 4. Here, steps 07, 09 in Figure 1 imply that |Nx (4, j − 1)| < β j−1 for every level 4 < j < i. In particular, setting j = 5 = k + 1, we get: |Nx (4, k)| < β 0 = 1 < β 4 . Thus, the vertex satisfies both the invariants after it moves down to level 4, and both the conditions (a) and (b) hold. Lemma 3.4 states that during any given iteration of the W HILE loop in Figure 1, we pick a dirty vertex x and make it clean. In the process, some neighbors of x become dirty, and they are handled in the subsequent 4 The terms below-degree and side-degree of a vertex v refer to the values of |Nv (4, ℓ(v)−1)| and |Nv (ℓ(v), ℓ(v))| respectively. 8 iterations of the same W HILE loop. When the W HILE loop terminates, every vertex is clean by definition. It now remains to analyze the time spent on implementing this W HILE loop after an edge insertion/deletion in the input graph. Lemma 3.4 will be crucial in this analysis. The intuition is as follows. The lemma guarantees that whenever a vertex x moves to a level k > 4, its below-degree is at least β k−1 . In contrast, Invariant 3.2 and Figure 1 ensure that whenever the vertex moves down from the same level k, its belowdegree is less than β k−5 . Thus, the vertex loses at least β k−1 − β k−5 in below-degree before it moves down from level k. This slack of β k−1 − β k−5 help us bound the amortized update time. We next bound the time spent on a single iteration of the W HILE loop in Figure 1. Lemma 3.5. Consider any iteration of the W HILE loop in Figure 1 where a vertex x moves up to a level k from a level i < k (steps 2 – 4). It takes Θ(β k ) time to implement such an iteration. Proof. First, we claim that the value of k (the level where the vertex x will move up to) can be identified in Θ(k − i) time. This is because we explicitly store the sizes of the lists Nx (4, i − 1) and Nx (j, j) for all j ≥ i. Next, we update the lists {Cv+ , Cv } and the counters {µ+ v (c)} for x and its neighbors as follows. F OR every level j ∈ {i, . . . , k} and every vertex y ∈ Nx (j, j): + • Cy+ ← Cy+ ∪ {χ(x)}, Cy ← Cy \ {χ(x)} and µ+ y (χ(x)) ← µy (χ(x)) + 1. • I F j < k, T HEN + – µ+ x (χ(y)) ← µx (χ(y)) − 1. + + – If µ+ x (χ(y)) = 0, then Cx ← Cx \ {χ(y)} and Cx ← Cx ∪ {χ(y)}. The time spent on the above operations is bounded by the number of vertices in Nx (4, k). Since the vertex x is moving up from level i to level k > i, we have to update the position of x in the neighborhood lists of the vertices u ∈ Nx (4, k). We also need to merge the lists Nx (4, i − 1) and Nx (j, j) for i ≤ j < k into a single list Nx (4, k − 1). In the process if some vertices u ∈ Nx (4, k) becomes dirty, then we need to put them in the correct dirty queue. This takes Θ(|Nx (4, k)|) time. By Lemma 3.4, we have |Nx (4, k)| ≤ β k , and |Nx (4, k)| ≥ |Nx (4, k − 1)| ≥ β k−1 . Since β is a constant, we conclude that it takes Θ(β k ) time to implement this iteration of the W HILE loop in Figure 1. Lemma 3.6. Consider any iteration of the W HILE loop in Figure 1 where a vertex x moves down to a level k from a level i > k (steps 5 – 10). It takes O(β i ) time to implement such an iteration. Proof. We first bound the time spent on identifying the level k < i the vertex x will move down to. Since the vertex x violates Invariant 3.2, we know that |Nx (4, i − 1)| < β i−5 = O(β i ). Therefore, the algorithm can scan through the list Nx (4, i − 1) and find the required level k in Θ(i + |Nx (4, i − 1)|) time. Next, we update the lists {Cv+ , Cv } and the counters {µ+ v (c)} for x and its neighbors as follows. F OR every vertex y ∈ Nx (4, i − 1) ∪ Nx (i, i): • I F i ≥ ℓ(y) > k, T HEN + – µ+ y (χ(x)) ← µy (χ(x)) − 1. + + – If µ+ y (χ(x)) = 0, then Cy ← Cy \ {χ(x)} and Cy ← Cy ∪ {χ(x)}. • I F i > ℓ(y) ≥ k, T HEN + – Cx+ ← Cx+ ∪ {χ(y)}, Cx ← Cx \ {χ(y)} and µ+ x (χ(y)) ← µx (χ(y)) + 1. 9 The time spent on the above operations is bounded by the number of vertices in Nx (4, i). Since the vertex x is moving down from level i to level k < i, we have to update the position of x in the neighborhood lists of the vertices u ∈ Nx (4, i). We also need to split the list Nx (4, i − 1) into the lists Nx (4, k − 1) and Nx (j, j) for k ≤ j < i. In the process if some vertices u ∈ Nx (4, i) become dirty, then we need to put them in the correct dirty queue. This takes Θ(|Nx (4, i)|) time. Figure 1 ensures that x satisfies Invariant 3.3 at level i before it moves down to a lower level. Thus, we have |Nx (4, i)| ≤ β i , and we spend Θ(1 + |Nx (4, i)|) = O(β i ) time on this iteration of the W HILE loop. Corollary 3.7. It takes Ω(β k ) time for a vertex x to move from a level i to a different level k. Proof. If 4 ≤ i < k, then the corollary follows immediately from Lemma 3.5. For the rest of the proof, suppose that i > k. In this case, as per the proof of Lemma 3.6, the time spent is at least the size of the list Nx (4, k − 1), and Lemma 3.4 implies that |Nx (4, k − 1)| ≥ β k−1 . Hence, the total time spent is Ω(β k−1 ), which is also Ω(β k ) since β is a constant. Note that we ignored the scenarios where k = 4 since in that event β k is a constant anyway. In Theorem 3.8, we bound the amortized update time for maintaining a hierarchical partition. Theorem 3.8. We can maintain a hierarchical partition of the vertex set V that satisfies Invariants 3.2 and 3.3 in O(log ∆) amortized update time. We devote the rest of Section 3.2 to the proof of the above theorem using a token based scheme. The basic framework is as follows. For every edge insertion/deletion in the input graph we create at most O(L) tokens, and we use one token to perform O(β 2 ) units of computation. This implies an amortized update time of O(β 2 · L) = O(β 2 · logβ ∆), which is O(log ∆) since β is a constant. Specifically, we associate θ(v) many tokens with every vertex v ∈ V and θ(u, v) many tokens with every edge (u, v) ∈ E in the input graph. The values of these tokens are determined by the following equalities. θ(u, v) = L − max(ℓ(u), ℓ(v)).  max 0, β ℓ(v)−1 − |Nv (4, ℓ(v) − 1)| θ(v) = 2β = 0 (3.1) if ℓ(v) > 4; (3.2) otherwise. Initially, the input graph G is empty, every vertex is at level 4, and θ(v) = 0 for all v ∈ V . Due to the insertion of an edge (u, v) in G, the total number of tokens increases by at most L − max(ℓ(u), ℓ(v)) < L, where ℓ(u) and ℓ(v) are the levels of the endpoints of the edge just before the insertion. On the other hand, due to the deletion of an edge (u, v) in the input graph, the value of θ(x) for x ∈ {u, v} increases by at most 1/(2β), and the tokens associated with the edge (u, v) disappears. Overall, the total number of tokens increases by at most 1/(2β) + 1/(2β) ≤ O(L) due to the deletion of an edge. We now show that the work done during one iteration of the W HILE loop in Figure 1 is proportional to O(β 2 ) times the net decrease in the total number of tokens during the same iteration. Accordingly, we focus on any single iteration of the W HILE loop in Figure 1 where a vertex x (say) moves from level i to level k. We consider two cases, depending on whether x moves to a higher or a lower level. Case 1: The vertex x moves up from level i to level k > i. Immediately after the vertex x moves up to level k, we have Nx (4, k − 1) ≥ β k−1 and hence θ(x) = 0. This follows from (3.2) and Lemma 3.4. Since θ(x) is always nonnegative, the value of θ(x) does not increase as x moves up to level k. We now focus on bounding the change in the total number of tokens associated with the neighbors of x. Note 10 that the event of x moving up from level i to level k affects only the tokens associated with the vertices u ∈ Nx (4, k). Specifically, from (3.2) we infer that for every vertex u ∈ Nx (4, k), the value of θ(u) increases by at most 1/(2β). On the other hand, for every vertex u ∈ Nx (k + 1, L), the value of θ(u) remains unchanged. Thus, the total number of tokens associated with the neighbors of x increases by at most (2β)−1 · |Nx (4, k)| ≤ (2β)−1 · β k = β k−1 /2. The inequality follows from Lemma 3.4. To summarize, the total number of tokens associated with all the vertices increases by at most β k−1 /2. We now focus on bounding the change in the total number of tokens associated with the edges incident on x. From (3.1) we infer that for every edge (x, u) with u ∈ Nx (4, k − 1), the value of θ(x, u) drops by at least one as the vertex x moves up from level i < k to level k. For every other edge (x, u) with u ∈ Nx (k, L), the value of θ(x, u) remains unchanged. Overall, this means that the total number of tokens associated with the edges drops by at least |Nx (4, k − 1)| ≥ β k−1 . The inequality follows from Lemma 3.4. To summarize, the total number of tokens associated with the edges decreases by at least β k−1 . From the discussion in the preceding two paragraphs, we reach the following conclusion: As the vertex x moves up from level i < k to level k, the total number of tokens associated with all the vertices and edges decreases by at least β k−1 − β k−1 /2 ≥ β k−1 /2. In contrast, Lemma 3.5 states that it takes O(β k ) time taken to implement this iteration of the W HILE loop in Figure 1. Hence, we derive that the time spent on updating the relevant data structures is at most O(2β) = O(β 2 ) times the net decrease in the total number of tokens. This concludes the proof of Theorem 3.8 for Case 1. Case 2: The vertex x moves down from level i to level k < i. As in Case 1, we begin by observing that immediately after the vertex x moves down to level k, we have |Nx (4, k − 1)| ≥ β k−1 if k > 4, and hence θ(x) = 0. This follows from Lemma 3.4. The vertex x violates Invariant 3.2 just before moving from level i to level k (see step 6 in Figure 1). In particular, just before the vertex  moves down from level i to level k, we have |Nx (4, i − 1)| < β i−5 and θ(x) ≥ (2β)−1 · β i−1 − β i−5 = β i−2 /2 − β i−6 /2 ≥ β i−2 /3. The last inequality holds since β is a sufficiently large constant. So the number of tokens associated with x drops by at least β i−2 /3 as it moves down from level i to level k. Also, from (3.2) we infer that the value of θ(u) does not increase for any u ∈ Nx as x moves down to a lower level. Hence, we conclude that: The total number of tokens associated with all the vertices drops by at least β i−2 /3. (3.3) We now focus on bounding the change in the number of tokens associated with the edges incident on x. From (3.1) we infer that the number of tokens associated with an edge (u, x) ∈ Nx (4, i − 1) increases by (i − max(k, ℓ(u))) as x moves down from level i to level k. In contrast, the number of tokens associated with any other edge (u, x) ∈ Nx (i, L) does not change as the vertex x moves down from level i to a lower level. Let Γ be the increase in the total number of tokens associated with all the edges. Thus, we have: Γ= X (u,x)∈Nx (4,i−1) (i − max(k, ℓ(u))) = i−1 X j=k |Nx (4, j)|, (3.4) where the last equality follows by rearrangement. Next, recall that the vertex x moves down from level i to level k during the concerned iteration of the W HILE loop in Figure 1. Accordingly, steps 7 – 10 in Figure 1 implies that |Nx (4, j − 1)| < β j−1 for all levels i > j > k. This is equivalent to the following statement: |Nx (4, j)| < β j for all levels i − 1 > j ≥ k. (3.5) Next, step 6 in Figure 1 implies that the vertex x violates Invariant 3.2 at level i. Thus, we get: |Nx (4, i − 1)| < β i−5 . Note that for all levels j < i, we have Nx (4, j) ⊆ Nx (4, i − 1) and |Nx (4, j)| ≤ |Nx (4, i − 1)|. Hence, we get: |Nx (4, j)| < β i−5 for all levels j < i. Combining this observation with (3.5), we get: |Nx (4, j)| < min(β i−5 , β j ) for all levels i − 1 ≥ j ≥ k. 11 (3.6) Plugging (3.6) into (3.4), we get: Γ < 5β i−5 + i−6 X β j < β i−3 . (3.7) j=k In the above derivation, the last inequality holds since β is a sufficiently large constant. From (3.3) and (3.7), we reach the following conclusion: As the vertex x moves down from level i to a level k < i, the total number of tokens associated with all the vertices and edges decreases by at least β i−2 /3 − Γ > β i−2 /3 − β i−3 = Ω(β i−2 ). In contrast, by Lemma 3.6 it takes O(β i ) time to implement this iteration of the W HILE loop in Figure 1. Hence, we derive that the time spent on updating the relevant data structures is at most O(β 2 ) times the net decrease in the total number of tokens. This concludes the proof of Theorem 3.8 for Case 2. 3.3 The recoloring subroutine. Whenever we want to change the color of a vertex v ∈ V , we call the subroutine RECOLOR(v) as described in Figure 2. We ensure that the hierarchical partition does not change during a call to this subroutine. Specifically, throughout the duration of any call to the RECOLOR subroutine, the value of ℓ(x) remains the same for every vertex x ∈ V . We also ensure that the hierarchical partition satisfies Invariants 3.2 and 3.3 before any making any call to the RECOLOR subroutine. During a call to the subroutine RECOLOR(v), we randomly choose a color c for the vertex v from the subset Bv ∪Uv ⊆ Cv . In case the random color c lies in Uv , we find the unique neighbor v ′ ∈ Nv (4, ℓ(v)−1) of v which is assigned this color, and then we recursively recolor v ′ . Since the level of v ′ is strictly less than that of v, the maximum depth of this recursion is L. We now bound the time spent on a call to RECOLOR(v). 1. 2. 3. 4. 5. 6. Choose c ∈ Bv ∪ Uv uniformly at random. // These notations are defined in Section 3.1. Set χ(v) ← c. Update the relevant data structures as described in the proof of Lemma 3.9. I F c ∈ Uv : Find the unique vertex v ′ ∈ Nv (4, ℓ(v) − 1) with χ(v ′ ) = c. RECOLOR(v ′ ). Figure 2: Subroutine RECOLOR(v) Lemma 3.9. It takes O(β ℓ(v) ) time to implement one call to RECOLOR(v). This includes the total time spent on the chain of subsequent recursive calls that originate from the call to RECOLOR(v). Proof. Let us assume that ℓ(v) = i and χ(v) = c′ just before the call to RECOLOR(v). To implement Step 01 in Figure 2, the vertex v scans the neighborhood list Nv (4, i − 1) and computes the subset colors Tv ⊆ Cv which appear twice or more among the these vertices. The vertex v keeps these colors Tv in a separate list and deletes every color in Tv from the list Cv . On completion, the list Cv consists of the colors in Bv ∪ Uv and the algorithm samples a random color c from this list.5 Next, the algorithm adds all the colors in Tv back to the list Cv , thereby restoring the list Cv to its actual state. The algorithm can also do another scan of Nv (4, i − 1) to check whether c ∈ Bv or c ∈ Uv . The total time taken to do all this is Θ(|Nv (4, i − 1)|) which by Invariants 3.2 and 3.3 is Θ(β ℓ(v) ). After changing the color of the vertex v from c′ to c in step 02, the algorithm needs to update the data structures (see Section 3.1) as follows. 5 Note that we might have |Bv ∪ Uv | ≫ β ℓ(v) and so it is not clear how to sample in O(β ℓ(v) ) time. The modification required here is that it is sufficient to sample from the first β ℓ(v) elements of Bv ∪ Uv . For clarity of exposition, we ignore this issue. 12 • F OR every vertex w ∈ Nv (4, i): ′ + ′ – µ+ w (c ) ← µw (c ) − 1. ′ ′ + ′ + – I F µ+ w (c ) = 0, T HEN Cw ← Cw \ {c } and Cw ← Cw ∪ {c }. + ← C + ∪ {c}, C ← C \ {c} and µ+ (c) ← µ+ (c) + 1. – Cw w w w w w The above operations also take Θ(|Nv (4, i)|) = Θ(β ℓ(v) ) time, as per Invariants 3.2 and 3.3. Finally, in the subsequent recursive calls suppose we recolor the vertices y1 , y2 , . . .. Note that ℓ(x) > ℓ(y1 ) > ℓ(y2 ) > · · · . Therefore the total time taken can be bounded by Θ(β ℓ(x) + β ℓ(y1 ) + · · · ) = Θ(β ℓ(x) ) since it is a geometric series sum. This completes the proof. 3.4 The complete algorithm and analysis. Initially, when the graph G = (V, E) is empty, every vertex v ∈ V belongs to level 4 and picks a random color χ(v) ∈ C. At this point, the coloring χ is proper since there are no edges, and Invariants 3.2 and 3.3 are vacuously satisfied. Now, by inductive hypothesis, suppose that before the insertion or deletion of an edge in G, we have the guarantee that: (1) χ is a proper coloring and (2) Invariants 3.2, 3.3 are satisfied. We handle the insertion or deletion of this edge in G according to the procedure in Figure 3. Specifically, after the insertion or deletion of an edge (u, v), we first update the hierarchical partition by calling the subroutine MAINTAIN-HP (see Figure 1). At the end of the call to this subroutine, we know for sure that Invariants 3.2 and 3.3 are satisfied. At this point, we check if the existing coloring χ is proper. The coloring χ can become invalid only if the edge (u, v) is getting inserted and χ(u) = χ(v). In this event, we find the endpoint x ∈ {u, v} that was recolored last, i.e., the one with the larger τx . Without any loss of generality, let this endpoint be v. We now change the color of v by calling the subroutine RECOLOR(v). At the end of the call to this subroutine, we know for sure that the coloring is proper. Thus, we can now apply the inductive hypothesis for the next insertion or deletion of an edge. On INSERT/DELETE((u, v)): MAINTAIN-HP. // See Figure 1. In case (u, v) is inserted and χ(u) = χ(v): Suppose that τv > τu . // This notation is defined in Section 3.1. RECOLOR(v). Figure 3: Dynamic algorithm to maintain ∆ + 1 vertex coloring We first bound the amortized time spent on all the calls to the RECOLOR subroutine in Lemma 3.10. From Theorem 3.8 and Lemma 3.10, we get the main result of this section, which is stated in Theorem 3.1. Lemma 3.10. Consider a sequence of T edge insertions/deletions starting from an empty graph G = (V, E). Let TR and THP respectively denote the total time spent on all the calls to the RECOLOR and MAINTAIN-HP subroutines during these T edge insertions/deletions. Then E[TR ] ≤ O(T ) + O(THP ). Proof. Since edge deletions don’t lead to recoloring, we need to bother only with edge insertions. Consider the scenario where an edge (u, v) is being inserted into the graph at time τ . Without any loss of generality, assume that τv > τu . Recall that these are the last times before τ when v and u were recolored. Suppose that the vertex v is at level i immediately after we have updated the hierarchical partition following the insertion of the edge at time τ . Thus, if χ(u) = χ(v) at this point in time, then the subroutine RECOLOR(v) will 13 be called to change the color of the endpoint v. On the other hand, if χ(u) 6= χ(v) at this point in time, then no vertex will be recolored. Furthermore, suppose that the vertex v was at level j during the call to RECOLOR(v) at time τv . The analysis is done via three cases. Case 1: i > j. In this case, at some point in time during the interval [τv , τ ], the subroutine MAINTAIN-HP raised the level of the vertex v to i. Corollary 3.7 implies that this takes Ω(β i ) time. On the other hand, even if the subroutine RECOLOR(v) is called at time τ , by Lemma 3.9 it takes O(β i ) time to implement that call. So the total time spent on all such calls to the RECOLOR subroutine is at most O(THP ). Case 2: 4 < i ≤ j. In this case, we use the fact that the vertex v picks a random color at time τv . In particular, by Lemma 3.9 the expected time spent on recoloring the vertex v at time τ is at most O(β i ) · Pr[Eτ ], where Eτ is the event that χ(u) = χ(v) just before the insertion at time τ . We wish to bound this probability Pr[Eτ ], which is evaluated over the past random choices of the algorithm which the adversary fixing the order of edge insertions is oblivious to.6 We do this by using the principle of deferred decision. Let cu and cv respectively denote the colors assigned to the vertices u and v during the calls to the subroutines RECOLOR(u) and RECOLOR(v) at times τu and τv . Note that the event Eτ occurs iff cu = cv . Condition on all the random choices made by the algorithm till just before the time τv . Since τu < τv , this fixes the color cu . At time τv , the vertex v picks the color cv uniformly at random from the subset of colors Bv ∪ Uv . Let λ denote the size of this subset Bv ∪ Uv at time τv . Clearly, the event cv = cu occurs with probability 1/λ, i.e., we have Pr[Eτ ] = 1/λ. It now remains to lower bound λ. Since 4 < i ≤ j, Claim 3.1 and Invariant 3.2 imply that when the vertex v gets recolored at time τv , we have: λ = |Bv ∪ Uv | ≥ 1 + |Nv (4, j − 1)|/2 ≥ 1 + β j−5 /2 = Ω(β j−5 ) = Ω(β i−5 ). To summarize, the expected time spent on the possible call to RECOLOR(v) at time τ is at most O(β i ) · Pr[Eτ ] = O(β i ) · (1/λ) = O(β 5 ) = O(1). Hence, the total time spent on all such calls to the RECOLOR subroutine is at most O(T ). Case 3. i = 4. Even if RECOLOR(v) is called at time τ , by Lemma 3.9 at most O(β 4 ) = O(1) time is spent on that call. So the total time spent on all such calls to the RECOLOR subroutine is O(T ). Proof of Theorem 3.1. The theorem holds since E[TR ]+THP ≤ O(T )+O(THP ) ≤ O(T )+O(T log ∆) = O(T log ∆). The first and the second inequalities respectively follow from Lemma 3.10 and Theorem 3.8. 4 A Deterministic Dynamic Algorithm for (1 + o(1))∆ Vertex Coloring Let G = (V, E) denote the input graph that is changing dynamically, and let ∆ be an upper bound on the maximum degree of any vertex in G. For now we assume that the value of ∆ does not change with time. In Section 6, we explain how to relax this assumption. Our main result is stated in the theorem below. Theorem 4.1. We can maintain a (1 + o(1))∆ vertex coloring in a dynamic graph deterministically in O(lg4+o(1) ∆/ lg lg2 ∆) amortized update time. 4.1 Notations and preliminaries. Throughout Section 4, we define three parameters η, L, λ as follows.   l lg(η∆) m lg(η∆) 16/ lg lg ∆ and λ = 2 L . η=e ,L = lg lg ∆ (4.1) We will use λL colors. From (4.1) and Lemma 4.2, it follows that λL ≤ η∆ = (1 + o(1))∆ when ∆ = ω(1). In Lemma 4.2, we establish a couple of useful bounds on the parameters η, L and λ. 6 In case 1, we used the trivial upper bound Pr[Eτ ] ≤ 1. 14 Lemma 4.2. We have: 1. lg ∆ ≤ λ ≤ 2 lg1+o(1) ∆, and 2. λL ≤ η∆ ≤ (λ + 1)L . Proof. From (4.1) we infer that: λ≥2 lg(η∆) L lg(η∆) ≥ 2 lg(η∆)/ lg lg ∆ = lg ∆. From (4.1) we also infer that: λ ≤ 2·2 lg(η∆) L lg(η∆) ≤ 2 · 2 lg(η∆)/ lg lg ∆−1 lg(η∆) = 2 · 2 lg(η∆)−lg lg ∆ ·lg lg ∆ = 2 · 2(1+o(1))·lg lg ∆ = 2 lg1+o(1) ∆. The proves part (1) of the lemma. Next, note that: l lg(η∆) mL  lg(η∆) L = η∆ ≤ 2 L = (λ + 1)L . λL ≤ 2 L This proves part (2) of the lemma. We let C = {1, . . . , λL } denote the palette of all colors. Note that |C| = λL = (1 + o(1))∆. Indeed, we view the colors available to us as L-tupled vectors where each coordinate takes one of the values from {1, . . . , λ}. In particular, the color assigned to any vertex v is denotes as χ(v) = (χ1 (v), . . . , χL (v)), where χi (v) ∈ [λ] for each i ∈ [L]. Given such a coloring χ : V → C, for every index i ∈ [L] we define χ∗i (v) := (χ1 (v), . . . , χi (v)) to be the i-tuple denoting the first i coordinates of χ(v). For notational convenience, we define χ∗0 (v) := ⊥ for all v. For all i ∈ [L] and α ∈ [λ], we let χ∗i→α (v) = (χ1 (v), . . . , χi−1 (v), α) denote the i-tuple whose first (i − 1) coordinates are the same as that of χ but whose ith coordinate is α. For all i ∈ [L] and α ∈ [λ], we define the subsets Ni∗ (v) = {u ∈ V : (u, v) ∈ E and χ∗i (u) = χ∗i (v)} ∗ ∗ (v) = {u ∈ V : (u, v) ∈ E and χ∗ (u) = χ∗ and Ni→α i→α (v)}. In other words, the set Ni (v) consists of i all the neighbors of a vertex v ∈ V whose colors have the same first i coordinates as the color of v. On the ∗ (v) denotes the status of the set N ∗ in the event that the vertex v decides to change other hand, the set Ni→α i ∗ (v) = ∅. Going over all the ith coordinate of its color to α. In particular, if χi (v) 6= α, then Ni∗ (v) ∩ Ni→α possible choices of χi (v) we get the following [ ∗ ∗ Ni→α (v) Ni−1 (v) = α∈[λ] ∗ ∗ (v)|. Also note that N0∗ (v) is the full neighborhood of v. Define Di∗ (v) = |Ni∗ (v)| and Di→α (v) = |Ni→α The above observations is encapsulated in the following corollary. ∗ (v) is partitioned into Corollary 4.3. For every vertex v ∈ V , and every index j ∈ {1, . . . , L}, the set Nj−1 P ∗ ∗ ∗ (v) = the subsets Nj→α (v) for α ∈ {1, . . . , λ}. In particular, we have: Dj−1 α∈[λ] Dj→α (v). We maintain the following invariant. Invariant 4.4. For all v ∈ V , i ∈ [0, L], we have Di∗ (v) ≤ (∆/λi ) · f (i), where f (i) = ((λ + 1)/(λ − 1))i . 15 For every j, we have f (j) > 1 and f (j − 1) ≤ f (j). We now give a brief intuitive explanation for the above invariant. Associate a rooted λ-ary tree Tv of depth L with every vertex v ∈ V . We shall refer to the vertices of this tree Tv as meta-vertices, to distinguish them from the vertices of the input graph G = (V, E). The total number of leaves in this tree is λL , which is the same as the total number available colors. Thus, we can ensure that each root to leaf path in this tree corresponds to a color in a natural way, and any internal meta-vertex at depth i corresponds to the ith coordinate of a color. The quantity Di∗ (v) can now be interpreted as follows. Consider the meta-vertex (say) xi at depth i on the unique root to leaf path corresponding to the color of v. Let µi denote the number of all neighbors of v in G such that this metavertex xi also belongs to the root to leaf paths for their corresponding colors. Then we have Di∗ (v) = µi . Note that if i = 0, then the meta-vertex xi is the root of the tree, which is at depth zero. It follows that if i = 0, then µi equals the degree of the vertex v in the input graph G, which is at most ∆. Thus, we have µ0 ≤ ∆. Now, let y1 , . . . , yλ denote the children of the root x0 in this λ-ary tree Tv . A simple counting argument implies that there exists an index j ∈ {1, . . . , λ} with the following property: At most a 1/λ fraction of the neighbors of v in G have colors whose corresponding root to leaf paths contain the metavertex yj . Thus, if it were the case that the root to leaf path corresponding to the color of v also passes through such a meta-vertex yj , then we would have Di∗ (v) = µi ≤ ∆/λ for i = 1. Invariant 4.4, on the other hand, gives a slack of f (1) and requires that Di∗ (v) ≤ (∆/λ) · f (1) for i = 1. We can interpret the invariant in this fashion for every subsequent index i ∈ {2, . . . , L} by iteratively applying the same principle. The reader might find it helpful to keep this interpretation in mind while going through the formal description of the algorithm and its analysis. Lemma 4.5. If Invariant 4.4 holds then χ is a proper vertex coloring. Proof. Claim 4.1 implies that for i = L, the invariant reduces to: DL∗ (v) < 1. Since DL∗ (v) is a nonnegative integer, we get DL∗ (v) = 0. Since DL∗ (v) is the number of neighbors of v who are assigned the color χ(v), no two adjacent vertices can get the same color. The invariant thus ensures a proper vertex coloring. Claim 4.1. We have: (∆/λL ) · f (L) < 1. In order to prove Claim 4.1, we derive that: (∆/λL )f (L) ≤ (((λ + 1)L /η)/λL ) · f (L) L (4.2) L = (1/η) · (1 + 1/λ) · (1 + 2/(λ − 1)) ≤ (1/η) · (1 + 1/λ)L · (1 + 4/λ)L L (4.3) ≤ (1/η) · (1 + 7/λ) (4.4) ≤ (1/η) · e7 lg(η∆)/(λ lg lg ∆) (4.5) 7L/λ ≤ (1/η) · e 7 lg(∆2 )/(lg ∆ lg lg ∆) ≤ (1/η) · e (4.6) < 1. (4.7) 14/ lg lg ∆ ≤ (1/η) · e Step (4.2) follows from part (2) of Lemma 4.2. Steps (4.3), (4.4) hold as long as λ ≥ 2.7 Step (4.5) follows from (4.1). Step (4.6) follows from (4.1) and part (1) of Lemma (4.2). Step (4.7) follows from (4.1). Data structures. For every vertex v ∈ V , our dynamic algorithm maintains the following data structures. 7 When λ < 2, we have ∆ = O(1) and so we can trivially maintain a (∆ + 1)-vertex coloring in O(∆) = O(1) update time. 16 • For all i ∈ [0, L], the set Ni∗ (v) as a doubly linked list and the counter Di∗ (v). It will be the responsibility of the neighbors of v to update the list Ni∗ (v) when they change their own colors. Using appropriate pointers, we will ensure that any given node x can be inserted into or deleted from any given list Ni∗ (y) in O(1) time. Note that each vertex figures out if it satisfies the Invariant 4.4 or not. • The color χ(v) = (χ1 (v), . . . , χL (v)) assigned to the vertex v. 4.2 The algorithm. Initially, since the edge-set of the input graph is empty, we can assign each vertex an arbitrary color. For concreteness, we set χi (v) = 1 for all i ∈ [L] and v ∈ V . Since there are no edges, Di∗ (v) = 0 for all i, v and so Invariant 4.4 vacuously holds at this point. We show how to ensure that the invariant continues to remain satisfied even after any edge insertion or deletion, and bound the amortized update time. Deletion of an edge. Suppose that an edge (u, v) gets deleted from G. No vertex changes its color due to this deletion. We only need to update the relevant data structures. Without any loss of generality, suppose that i ∈ [0, L] is the largest index for which we have χ∗i (v) = χ∗i (u). Then for every vertex x ∈ {u, v} and every j ∈ [0, i], we delete the vertex y ∈ {u, v} \ {x} from the set Ni∗ (x) and decrement the value of the counter Dj∗ (x) by one. This takes O(L) time. To summarize, deletion of an edge can be handled in O(L) worst case update time. If Invariant 4.4 was satisfied just before the edge deletion, then the invariant continues to remain satisfied after the edge deletion since the LHS of the invariant can only decrease. Insertion of an edge. Suppose that an edge (u, v) gets inserted into the graph. We first update the relevant data structures as follows. Let i ∈ [0, L] be the largest index such that χ∗i (u) = χ∗i (v). Note that if i = L then the colors of u and v are the same. For every vertex x ∈ {u, v} and every j ∈ [0, i], we insert the vertex y ∈ {u, v} \ {x} into the set Nj∗ (x) and increment the value of the counter Dj∗ (x) by one. This takes O(L) time in the worst case. Next, we focus on ensuring that Invariant 4.4 continues to hold. Towards this end, we execute the subroutine described in Figure 4. Lemma 4.6 implies the correctness of the algorithm. In Lemma 4.7, we upper bound the time spent on a given iteration of the W HILE loop in Figure 4. 1. W HILE there is some vertex x ∈ V that violates Invariant 4.4: 2. Let k ∈ [L] be the smallest index such that Dk∗ (x) > (∆/λk ) · f (k). 3. F OR j = k to L: ∗ 4. Find an α ∈ [λ] that minimizes Dj→α (x). 5. Set χj (x) = α and update the relevant data structures. // See Lemma 4.7. Figure 4: Ensuring Invariant 4.4 after an edge insertion. Lemma 4.6. Consider an iteration of the W HILE loop in Figure 4 for a vertex x ∈ V . At the end of this iteration, the vertex x satisfies Invariant 4.4. Proof. Consider any iteration of the F OR loop in steps 3 – 5. By induction hypothesis, suppose that just before this iteration we have Di∗ (x) ≤ (∆/λi ) · f (i) for all i ∈ [0, j − 1]. Due to step 2, the induction ∗ (x) = hypothesis holds just before the first iteration of the F OR loop, when we have j = k. Since Dj−1 P ∗ ∗ ∗ ∗ α∈[λ] Dj→α (x) by Corollary 4.3, the α that minimizes Dj→α (x) satisfies: Dj→α (x) ≤ (1/λ)·Dj−1 (x) ≤ (∆/λj ) · f (j − 1) ≤ (∆/λj ) · f (j). Accordingly, after executing step 6 we get: Dj∗ (x) ≤ (∆/λj ) · f (j). Thus, the induction hypothesis remains valid for the next iteration of the F OR loop. At the end of the F OR loop, we get Dj∗ (x) ≤ (∆/λj ) · f (j) for all j ∈ [0, L], and hence the vertex x satisfies Invariant 4.4. 17 ∆ · f (k − 1)) time for one iteration of the W HILE loop in Figure 4, where Lemma 4.7. It takes O(λ + L · λk−1 k is defined as per Step 2 in Figure 4. Proof. Consider any iteration of the W HILE loop that changes the color of a vertex x ∈ V . Since we store the value of Dj∗ (x) for every j ∈ [0, L], it takes O(L) time to find the index k ∈ [0, L] as defined in step 2 of Figure 4. Next, for every index j ∈ [k, L] and every vertex u ∈ Nj∗ (x), we set Nj∗ (u) = Nj∗ (u) \ {x} and Dj∗ (u) = Dj∗ (u) − 1. Since the vertex x is going to change the kth coordinate of its color, the previous step is necessary to ensure that no vertex u mistakenly continues to include x in the set Nj∗ (u) for j ∈ [k, L]. P ∗ ∗ ∗ This takes O( L j=k |Nj (x)|) time. Since Nj (x) ⊆ Nj−1 (x) for all j ∈ [k, L], the time taken is actually ∗ (x)|) = O(L · (∆/λk−1 ) · f (k − 1)). The last equality follows from step 2 in Figure 4. O((L − k − 1) · |Nk−1 At this point, we also set Nj∗ (x) = ∅ and Dj∗ (x) = 0 for all j ∈ [k, L]. We shall rebuild the sets Nj∗ (x) during the F OR loop in steps 3 - 5. Applying a similar argument as before, we conclude that this also takes O(L · (∆/λk−1 ) · f (k − 1)) time. It now remains to bound the time spent on the F OR loop in Figure 4. Before the first iteration of the F OR loop, we set a counter Zτ = 0 for all τ ∈ [λ]. This takes Θ(λ) time. Now, consider any iteration of the F OR loop. By inductive hypothesis, suppose that for every index i ∈ [0, j − 1] and every vertex v ∈ V , the list Ni∗ (v) is now consistent with the changes we have made to the color of x in the earlier iterations of the F OR loop. Our first goal is to compute the index α ∈ [λ], ∗ (x). Just before the scan begins, we have Z = 0 for every which we do by scanning the vertices u ∈ Nj−1 τ ∗ (x) during the scan, we set Z τ ∈ [λ]. While considering any vertex u ∈ Nj−1 cj (u) = Zcj (u) + 1. At the end of the scan, we return the index α ∈ [λ] that minimizes the value of Zα . Subsequently, we again scan ∗ (x) and set Z ∗ through the vertices in Nj−1 cj (u) = Zcj (u) − 1 for every vertex u ∈ Nj−1 (x). The second scan ∗ ensures that we again have Zτ = 0 for every τ ∈ [λ]. Thus, it takes O(|Nj−1 (x)|) time to find the index α ∗ (x). Next, for every vertex u ∈ N ∗ (x) with c (u) = α, we set and perform the two scans of the list Nj−1 j j−1 Nj∗ (u) = Nj∗ (u) ∪ {x}, Nj∗ (x) = Nj∗ (x) ∪ {u}, Dj∗ (u) = Dj∗ (u) + 1 and Dj∗ (x) = Dj∗ (x) + 1. It takes ∗ (x)|) time to implement this step. Now, we set c (x) = α in O(1) time. At this stage, we have O(|Nj−1 j updated all the relevant data structures for the index j and changed the jth coordinate of the color of x. This ∗ (x) ⊆ N ∗ (x), the total time spent on this concludes the concerned iteration of the F OR loop. Since Nj−1 k−1 ∗ (x)|) = O(|N ∗ (x)|) = O((∆/λk−1 ) · f (k − 1)), as per step 2 in Figure 4. iteration is O(|Nj−1 k−1 Since the F OR loop runs for at most L iterations, the total time spent on the F OR loop is at most O(λ + ∆ · f (k − 1)). Combining this with the discussion in the first paragraph of the proof of this lemma, L · λk−1 ∆ we infer that the total time spent on one iteration of the W HILE loop is also O(λ + L · λk−1 · f (k − 1)). 4.3 Bounding the amortized update time. In this section, we prove Theorem 4.1 by bounding the amortized update time of the algorithm described in Section 4.2. Recall that handling the deletion of an edge takes O(L) time in the worst case. Furthermore, ignoring the time spent on the W HILE loop in Figure 4, handling the insertion of an edge also takes O(L) time in the worst case. From Lemma 4.2 we have L = O(lg ∆/ lg lg ∆). Thus, it remains to bound the time spent on the W HILE loop in Figure 4. We focus on this task for the remainder of this section. The main idea is the following: by Lemma 4.7 the W HILE loop processing vertex x takes a long time when k is small which in turn implies Dk∗ (x) is large. However, in the F OR loop we choose the colors which ∗ minimize precisely the values of Dj→α (x). Therefore these quantities cannot be large too often. Consider any iteration of the W HILE loop in Figure 4, which changes the color of a vertex x ∈ V . Let Sx+ (resp. Sx− ) be the set of all ordered pairs (i, v) such that the value of Di∗ (v) increases (resp. decreases) due to this iteration. The following lemma precisely bounds the increases and decreases of these D ∗ values. Lemma 4.8. During any single iteration of the W HILE loop in Figure 4, we have: |Sx− | > (∆/λk ) · f (k) and |Sx+ | < (∆/λk ) · f (k − 1) · λ/(λ − 1). 18 Proof. Throughout the proof, we let t− and t+ respectively denote the time-instant just before and just after the concerned iteration of the W HILE loop. Let k ∈ [L] be the smallest index such that Dk∗ (x) > (∆/λk ) · f (k) at time t− . For every index j ∈ [0, L] and every vertex v ∈ V , let Nj∗ (v, t− ) and Nj∗ (v, t+ ) respectively denote the set of vertices in Nj∗ (v) at time t− and at time t+ . Consider any vertex u ∈ Nk∗ (x, t− ). At time t− , we had χ∗k (u) = χ∗k (x). The concerned iteration of the W HILE loop changes the kth coordinate of the color of x, but the vertex u does not change its color during this iteration. Thus, we have χ∗k (u) 6= χ∗k (x) at time t+ . We therefore infer that x ∈ Nk∗ (u, t− ) and x ∈ / Nk∗ (u, t+ ). Hence, for every vertex u ∈ Nk∗ (x, t− ), the value of Dk∗ (u) drops by one due to the concerned iteration of the W HILE loop. It follows that {(k, u)|u ∈ Nk∗ (x, t− )} ⊆ Sx− , and we get: |Sx− | ≥ |Nk∗ (x, t− )| > (∆/λk ) · f (k). The last inequality follows from step 2 in Figure 4. This gives us the desired lower bound on the size of the set Sx− . It now remains to upper bound the size of the set Sx+ . Consider any ordered pair (j, u) ∈ Sx+ . Since the concerned iteration of the W HILE loop increases the value of Dj∗ (u) and does not change the color of any vertex other than x, we infer that: x∈ / Nj∗ (u, t− ) and x ∈ Nj∗ (u, t+ ). (4.8) The concerned iteration of the W HILE loop does not change the ith coordinate of the color of x for any i < k. Thus, the i-tuple χ∗i (x) does not change from time t− to time t+ . Furthermore, the vertex u does not change its color during the time-interval [t− , t+ ]. It follows that if x ∈ / Ni∗ (u, t− ) for some i < k, then we also have x ∈ / Ni∗ (u, t+ ). From (4.8) we therefore get j ∈ [k, L]. Next, note that since x ∈ Nj∗ (u, t+ ), we ∗ have χj (x) = χ∗j (u) at time t+ , and accordingly we also have u ∈ Nj∗ (x, t+ ). To summarize, if an ordered pair (j, u) belongs to the set Sx+ , then we must have j ∈ [k, L] and u ∈ Nj∗ (x, t+ ). Thus, we get: |Sx+ | ≤ L X j=k |Nj∗ (x, t+ )| (4.9) ∗ (x). This gives us the following guarantee. Note that step 4 in Figure 4 picks an α ∈ [λ] that minimizes Dj→α ∗ (x, t− )|/λ. |Nk∗ (x, t+ )| ≤ |Nk−1 |Nj∗ (x, t+ )| ≤ ∗ |Nj−1 (x, t+ )|/λ (4.10) for all j ∈ [k + 1, L]. (4.11) Using (4.9), (4.10) and (4.11), we can upper bound |Sx+ | by the sum of a geometric series, and get: |Sx+ | ≤ L X j=k |Nj∗ (x, t+ )|  1 1 ≤ · + · · · + L−k+1 λ λ 1 ∗ ≤ |Nk−1 (x, t− )| · (λ − 1) ∆ 1 ≤ · f (k − 1) · λk−1 (λ − 1) ∗ |Nk−1 (x, t− )|  The last inequality holds due to step 2 in Figure 4. This gives us the desired upper bound on |Sx+ |. We now use a potential function based argumentPto prove Theorem 4.1, where the potential associated with the graph at any point in time is given by Φ = v∈V,i∈[0,L] Di∗ (v). Note that the potential Φ is always nonnegative. The bound on the amortized update now follows from the three observations stated below. 19 Observation 4.9. Due to the insertion or deletion of an edge in G, the potential Φ changes by at most O(L). Proof. Consider the insertion or deletion of an edge (u, v) in the input graph G = (V, E). For all x ∈ V \ {u, v} and i ∈ [0, L], the value of Di∗ (x) remains unchanged. Furthermore, for all x ∈ {u, v} and i ∈ [0, L], the value of Di∗ (x) changes by at most one. Hence, the potential changes by at most 2(L+1). Observation 4.10. Due to one iteration of the W HILE loop in Figure 4, the potential Φ decreases by at least Γ = (∆/λk ) · f (k − 1)/(λ − 1), where k is defined as per Step 2 in Figure 4. Proof. Note that the concerned iteration of the W HILE loop does not change the color of any vertex v 6= x. Thus, for every vertex v ∈ V and every index i ∈ [0, L], the value of Di∗ (v) changes by at most one. As in Lemma 4.8, let Sx+ (resp. Sx− ) denote the set of all ordered pairs (i, v) such that the value of Di∗ (v) increases (resp. decreases) due to this iteration. We therefore infer that the net decrease in Φ is equal to |Sx− | − |Sx+ |, and we have: |Sx− | − |Sx+ | ≥ (∆/λk ) · f (k) − (∆/λk ) · f (k − 1) · λ/(λ − 1) = (∆/λk ) · f (k − 1) · ((λ + 1)/(λ − 1) − λ/(λ − 1)) = (∆/λk ) · f (k − 1)/(λ − 1). The first step in the above derivation follows from Lemma 4.8, and the second step follows from Invariant 4.4. Observation 4.11. The time taken to implement one iteration of the W HILE loop in Figure 4 is O((λ − 1) · λ · L · Γ), where Γ is the net decrease in the potential due to the same iteration of the W HILE loop. Proof. This follows from Observation 4.10 and Lemma 4.7. Proof of Theorem 4.1. In the beginning when the edge set is empty we have Φ = 0. After T edge insertions and deletions, the total time taken by the algorithm is O(LT ) + W , P where W is the total time taken by the WHILE loops. From Observation 4.11 we know that W = O(λ2 L · t Γt ), where Γt is the P decrease in the potential due to the tth WHILE loop. On the other hand, from Observation 4.9 we get t Γt = O(T L). Putting it all together, we get that the total time taken by the algorithm is O(λ2 L2 T ). This proves the theorem since λ = O(log1+o(1) ∆) and L = O(log ∆/ log log ∆) as per (4.1) and part (1) of Lemma 4.2. 5 A Deterministic Dynamic Algorithm for (2∆ − 1) Edge Coloring Let G = (V, E) be the input graph that is changing dynamically, and let ∆ be an upper bound on the maximum degree of any vertex in G. For now we assume that the value of ∆ does not change with time. In Section 6, we explain how to relax this assumption. We present a simple, deterministic dynamic algorithm for maintaining a 2∆ − 1 edge coloring algorithm in G. Data Structures. For every vertex v ∈ V , we maintain the following data structures. 1. An array Cv of length 2∆ − 1. Each entry in this array corresponds to a color. For each color c, the entry Cv [c] is either null or points to the unique edge incident on v which is colored c. 2. A bit vector Av of length 2∆ − 1, where Av [c] = 0 iff Cv [c] is null, and Av [c] = 1 otherwise. 3. A balanced binary search tree Tv with 2∆ − 1 leaves. We refer to the vertices in the tree as metanodes, to distinguish them from the vertices in the input graph G. We maintain a counter val(Tv , x) at every meta-node x in the tree Tv . The value of this counter at the cth leaf of Tv is given by Av [c]. Furthermore, the value of this counter at any internal meta-node x of Tv is given by: val(Tv , x) = P c:c is a leaf in the subtree rooted at x val(Tv , c). 20 We use the notation Av [a : b] to denote P a≤c<b Av [c]. Initialization. Initially when the graph G = (V, E) is empty, Cv is set to all nulls, Av is set to all 0’s, and the counters val(Tv , x) are set to all 0’s. Coloring subroutine. When an edge e = (u, v) is inserted, we need to assign it a color in {1, 2, . . . , 2∆−1}. We do so using the following binary-search like procedure described in Figure 5. 1. Set ℓ = 1 and r = 2∆. 2. W HILE ℓ < r − 1: // Invariant: Au [ℓ : r] + Av [ℓ : r] < r − ℓ 3. z := ⌈(ℓ + r)/2⌉ 4. If Au [ℓ : z] + Av [ℓ : z] < z − ℓ, T HEN set r = z. 5. Else if Au [z : r] + Av [z : r] < r − z, T HEN set ℓ = z. 6. Assign color χ(e) = ℓ to edge e. 7. Update the following data structures: Cu [ℓ], Cv [ℓ], Au [ℓ], Av [ℓ], Tu , Tv . Figure 5: COLOR(e): Coloring an edge e = (u, v) that has been inserted. Claim 5.1. The subroutine COLOR(e) returns a proper coloring of an edge e in O(log ∆) time. Proof. At the end of the W HILE loop we have ℓ = r − 1 since z ≤ r − 1. Assume that the invariant stated in the while loop holds at the end; in that case we have Au [ℓ] + Av [ℓ] < 1 implying both are 0. This, in turn, means that there is no edge incident on either u or v with the color ℓ. Thus, coloring (u, v) with ℓ is proper. We now show that the invariant always hold. It holds in the beginning since at that point both u and v have degree ≤ ∆ − 1 since (u, v) is being added. This implies the total sum of Au and Av are ≤ 2∆ − 2, which implies the invariant. The while loop then makes sure that the invariant holds subsequently. For time analysis, note that there are O(log ∆) iterations, and the values of Av [ℓ : z]’s are stored in the counters val(Tv , x) at the internal meta-nodes x of the trees Tv , and these values can be obtained in O(1) time. The data structures can also be maintained in O(log ∆) time since in the tree Tv the values of the meta-nodes only in the path from ℓ to the root has to be increased by 1. The full algorithm is this: initially the graph is empty. When an edge e = (u, v) is added, we run COLOR(e). When an edge e = (u, v) is deleted and its color was c, we point Cu [c] and Cv [c] to null, set Au [c] = Av [c] = 0 and then update Tu and Tv in O(log ∆) time. Thus we have the following theorem. Theorem 5.1. In a dynamic graph with maximum degree ∆, we can deterministically maintain a (2∆ − 1)edge coloring in O(log ∆) worst case update time. 6 Extensions to the Case where ∆ Changes with Time For ease of exposition, in the whole paper we have maintained that ∆ is a parameter known to the algorithm up front with the promise that maximum degree of the graph remains at most ∆ at all times. In fact all our algorithms, with some work, can work with the changing ∆ as well. That is, if ∆t is the maximum degree of the graph after t edge insertions and deletions, then in fact we have a randomized algorithm maintaining a (∆t + 1) vertex coloring, a deterministic algorithm maintaining a (1 + o(1))∆t vertex coloring, and a deterministic algorithm maintaining a (2∆t − 1) edge coloring. Our running times take a slight hit. For the first two algorithms the amortized running time is O(polylog ∆) where ∆ is the maximum degree seen 21 so far (till time t); for the edge coloring the worst case update time becomes O(log ∆t ). In the following three subsections we give a brief sketch of the differences in the algorithm and how the analysis needs to be modified. In all cases, we achieve this by making the requirement on the algorithm stronger. 6.1 Randomized (∆t + 1) vertex coloring. Let Dv = |Nv (4, L)| be the degree of a vertex v ∈ V in the current input graph. To extend our dynamic algorithm in Section 3 to the scenario where ∆ changes with time, we simply ensure that the following property holds. Property 6.1. Every vertex v to have a color χ(v) ∈ {1, . . . , Dv + 1}. To see why it is easy to ensure Property 6.1, we only need to make the following two observations. 1. The algorithm that maintains the hierarchical partition in Section 3.2 is oblivious to the value of ∆. 2. For every vertex v ∈ V , change the definition of the subset of colors Cv ⊆ C as follows. Now, the subset Cv ⊆ C consists of all the colors in {1, . . . , Dv + 1} that are not assigned to any neighbor u of v with ℓ(u) ≥ ℓ(v). We can maintain these modified sets Cv by incurring only a O(1) factor cost in the update time. Finally, note that even with this modified definition, Claim 3.1 continues to hold. Hence, the RECOLOR subroutine in Figure 2 in particular and our randomized dynamic coloring algorithm in general continue to remain valid. 6.2 Deterministic (1 + o(1))∆t vertex coloring. Whenever degt (v) is less than a (very) large constant, whenever we need to change its color we do the greedy step taking degt (v) = O(1) time to find a free color. Henceforth assume degt (v) = ω(1). Instead of having a fixed λ, L and η, for every vertex v we have separate parameters which depend on the degree of v at time t. Note these can be maintained at each insertion and deletion with O(1) time per update.    lg(η (v)·deg (v))  16 t t lg(ηt (v) · degt (v)) Lt (v) and λt (v) := 2 . ηt (v) := e lg lg degt (v) , Lt (v) := lg lg degt (v) At time t, each vertex is assigned a color from {1, 2, . . . , λt (v)Lt (v) }. As before, this color χ(v) is assumed to be a Lt (v)-dimensional tuple where each entry takes positive integer values in [λt (v)]. Note that the dimension of tuple and the range of each dimension of the tuple can change with time and we need to be careful about that. The definitions of Ni∗ (v) and Di∗ (v) remains the same, except that the range of i is now only till Lt (v). The invariant that we maintain for every vertex is similar to Invariant 4.4 changed appropriately and we add the condition that at time t each coordinate is in [λt (v)]. Invariant 6.2. For all t, for all v ∈ V , i ∈ [0, Lt (v)], we have (1) Di∗ (v) ≤ (degt (v)/λt (v)i ) · ft,v (i), (t) where ft,v (i) = ((λt (v) + 1)/(λt (v) − 1))i , and (2) χi (v) ∈ {1, 2, . . . , λt (v)}. Let us take care of situations when part (2) of the above invariant is violated because the other part is similar to as done in Section 4. To do so, for a positive integer p, define dp to be the largest value of degt (v) for which λt (v) evaluates to p. By the definition of the parameters (since λt (v) = Θ(lg degt (v))) we get dp+1 − dp = Θ(dp ). To take care of part (2) of Invariant 6.2, the algorithm given in Figure 4 needs to be changed in Step 4 as follows: if degt (v) ∈ [dp , dp+1 ] (and therefore λt (v) = p + 1), we search for α in [λt (v)] if degt (v) > dp + (dp+1 − dp )/2, otherwise we search for α in [λt (v) − 1]. 22 Whenever part (2) of Invariant 6.2 is violated by vertex v at time t, we perform the following changes. We take Θ(degt (v)) time to find a color for v such that χi (v) ∈ [λt (v)] for all i ∈ [Lt (v)] satisfying Invariant 6.2. We now show that this time can be charged to edge deletions incident on v that has happened in the past, and furthermore these edge deletions will not be charged to again. Firstly note that v violated part (2) on Invariant 6.2 only because we delete an edge (u, v) and degt (v) (t) and therefore λt (v) has gone down. Note that it must be the case χi (v) = λt (v) + 1 = λt− (v), where the third term is the value of λt (v) just before the edge deletion. Suppose λt (v) = p. Note that degt (v) must be dp since at time degt− (v) = degt (v) + 1 and λt− (v) = p + 1. Look at the last time t′ before t (t′ ) at which χi (v) was set to p + 1. At that time, because of the modification made above to the algorithm, we must have had degt′ (v) > dp + (dp+1 − dp )/2. Therefore between t′ and t we must have had at least (dp+1 − dp )/2 = Θ(dp ) = Θ(degt (v)) edge deletions incident on v. We charge the Θ(degt (v)) time taken to recolor v due to violation of part (2) of invariant to these deletions. Note that since we choose t′ to be the last time before t, we won’t charge to these edge deletions again. To maintain part (1) of the invariant, the algorithm is similar as in the previous section with two changes: (1) firstly, the WHILE loop checks the new invariant, and (2) is the technical change described above. Observe that even when we delete an edge we run the risk of the invariant getting violated since the RHS of the invariant also goes down. For the analysis, the one line argument why everything generalizes is that our analysis is in fact vertex -by-vertex. More precisely, we have a version of Lemma 4.7 where the ∆, L, λ, f are replaced by degt (v), Lt (v), λt (v), ft,v . Similar changes are in all the other claims and lemmas and for brevity we don’t mention the subscripts below. For instance, time analysis of Lemma 4.7 for the WHILE loop taking care of vertex x generalizes with Lt (x), λt (x), ft,x and degt (x) replacing L, λ, f and ∆. Similarly, in Lemma 4.8 we have exactly the same changes which reflects in Observation 4.10. That is, the decrease in potential in a single while loop is charged to the running time of that while loop. The rest of the analysis as in Section 4. There is an extra change in Lemma 4.8 where because of the technical change we made, we only get |Sx+ | < (∆/λk ) · f (k − 1) · λ/(λ − 2) since we could be searching over a range of [λ − 1]. This only increases the update time by an extra factor which is O(1) if λ ≥ 2. 6.3 Deterministic (2∆t − 1) edge coloring. We assert the invariant that every edge (u, v) gets a color from the palette {1, . . . , 2 max(degt (u), degt (v))− 1}. In the subroutine COLOR(e), the upper bound u is then set to u = degt (u) + degt (v), and the rest of the algorithm remains the same. The trees Tu and Tv now need to be dynamically balanced; but this can be done in O(log ∆t ) time using say red-black trees. The other place where the algorithm needs to change is that when an edge e = (u, v) is deleted, the degree of both u and v go down. That may lead to at most four edges (two incident on u and two incident on v) violating the invariant. They need to be re-colored using COLOR() procedure again. But this takes O(log ∆t ) time in all. 7 Open Problems One obvious open question left from this work is whether we can maintain a (∆ + 1)-vertex coloring in polylogarithmic time using a deterministic algorithm. We believe that this is an important question, since it may help in understanding how to develop deterministic dynamic algorithms in general. It is very challenging and interesting to design deterministic dynamic algorithms with performances similar to the randomized ones for many dynamic graph problems such as maximal matching [BGS11; BHI15b; BHI15a; BHN16; BCH17; BHN17], connectivity [KKM13; NSW17; Wul17; NS17], and shortest paths [Ber17; BC17; BC16; HKN14; HKN16]. 23 Another obvious question is whether our deterministic update time for (1 + o(∆))∆-vertex coloring can be improved. We did not try to optimize the polylog factors hidden inside Theorem 4.1 and believe that it can be improved; however, getting an O(log ∆) deterministic update time seems challenging. It will also be interesting to get O(poly log ∆) worst-case update time for dynamic vertex coloring. Finally, one other direction is to study the classes of locally-fixable problems and SLOCAL [GKM17]. Does every locally-fixable problem admit polylogarithmic update time? How about problems in SLOCAL such as maximal independent set and minimal dominating set? 8 Acknowledgements We thank an anonymous reviewer for the proofs of Lemma 4.2 and Claim 4.1. This project has received funding from the European Research Council (ERC) under the European Unions Horizon 2020 research and innovation programme under grant agreement No 715672. Danupon Nanongkai was also partially supported by the Swedish Research Council (Reg. No. 2015-04659). The research leading to these results has received funding from the European Research Council under the European Union’s Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement no. 340506. References [AW14] Amir Abboud and Virginia Vassilevska Williams. “Popular Conjectures Imply Strong Lower Bounds for Dynamic Problems”. In: FOCS. IEEE Computer Society, 2014, pp. 434– 443 (cit. on p. 2). [BC16] Aaron Bernstein and Shiri Chechik. “Deterministic decremental single source shortest paths: beyond the o(mn) bound”. In: STOC. ACM, 2016, pp. 389–397 (cit. on p. 23). [BC17] Aaron Bernstein and Shiri Chechik. “Deterministic Partially Dynamic Single Source Shortest Paths for Sparse Graphs”. In: SODA. SIAM, 2017, pp. 453–469 (cit. on p. 23). [BCH17] Sayan Bhattacharya, Deeparnab Chakrabarty, and Monika Henzinger. “Deterministic Fully Dynamic Approximate Vertex Cover and Fractional Matching in O(1) Amortized Update Time”. In: IPCO. Vol. 10328. Lecture Notes in Computer Science. Springer, 2017, pp. 86– 98 (cit. on p. 23). [BCKLRRV17] Luis Barba, Jean Cardinal, Matias Korman, Stefan Langerman, André van Renssen, Marcel Roeloffzen, and Sander Verdonschot. “Dynamic Graph Coloring”. In: WADS. 2017 (cit. on p. 2). [BE13] Leonid Barenboim and Michael Elkin. Distributed Graph Coloring: Fundamentals and Recent Developments. Synthesis Lectures on Distributed Computing Theory. Morgan & Claypool Publishers, 2013. ISBN: 9781627050180 (cit. on p. 2). [BGS11] Surender Baswana, Manoj Gupta, and Sandeep Sen. “Fully Dynamic Maximal Matching in O (log n) Update Time”. In: IEEE 52nd Annual Symposium on Foundations of Computer Science, FOCS 2011, Palm Springs, CA, USA, October 22-25, 2011. Ed. by Rafail Ostrovsky. IEEE Computer Society, 2011, pp. 383–392 (cit. on p. 23). [BHI15a] S. Bhattacharya, M. Henzinger, and G. F. Italiano. “Design of Dynamic Algorithms via Primal-Dual Method”. In: ICALP. 2015 (cit. on p. 23). [BHI15b] S. Bhattacharya, M. Henzinger, and G. F. Italiano. “Deterministic Fully Dynamic Data Structures for Vertex Cover and Matching”. In: SODA. 2015 (cit. on p. 23). 24 [BHN16] S. Bhattacharya, M. Henzinger, and D. Nanongkai. “New deterministic approximation algorithms for fully dynamic matching”. In: STOC. 2016 (cit. on p. 23). [BHN17] Sayan Bhattacharya, Monika Henzinger, and Danupon Nanongkai. “Fully Dynamic Approximate Maximum Matching and Minimum Vertex Cover in O(log3 n) Worst Case Update Time”. In: Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, Barcelona, Spain, Hotel Porta Fira, January 16-19. Ed. by Philip N. Klein. SIAM, 2017, pp. 470–489 (cit. on p. 23). [BM17] Leonid Barenboim and Tzalik Maimon. “Fully-Dynamic Graph Algorithms with Sublinear Time Inspired by Distributed Computing”. In: International Conference on Computational Science, ICCS 2017, 12-14 June 2017, Zurich, Switzerland. Ed. by Petros Koumoutsakos, Michael Lees, Valeria V. Krzhizhanovskaya, Jack J. Dongarra, and Peter M. A. Sloot. Vol. 108. Procedia Computer Science. Elsevier, 2017, pp. 89–98 (cit. on pp. i, 1, 2). [Ber17] Aaron Bernstein. “Deterministic Partially Dynamic Single Source Shortest Paths in Weighted Graphs”. In: ICALP. Vol. 80. LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2017, 44:1–44:14 (cit. on p. 23). [DGOP07] Antoine Dutot, Frederic Guinand, Damien Olivier, and Yoann Pign. “On the Decentralized Dynamic Graph-Coloring Problem.” In: COSSOM: Complex Systems and SelfOrganization Modelling. Satellite workshop within European Simulation and Modelling Conference (ESM’2007). Pages 259-261. 2007 (cit. on p. 2). [Dah16] Søren Dahlgaard. “On the Hardness of Partially Dynamic Graph Problems and Connections to Diameter”. In: ICALP. Vol. 55. LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2016, 48:1–48:14 (cit. on p. 2). [FGK17] Manuela Fischer, Mohsen Ghaffari, and Fabian Kuhn. “Deterministic Distributed EdgeColoring via Hypergraph Maximal Matchings”. In: FOCS. IEEE, 2017 (cit. on p. 2). [FK98] Uriel Feige and Joe Kilian. “Zero Knowledge and the Chromatic Number”. In: J. Comput. Syst. Sci. 57.2 (1998). announced at CCC’96, pp. 187–199 (cit. on p. 1). [GKM17] Mohsen Ghaffari, Fabian Kuhn, and Yannic Maus. “On the complexity of local distributed graph problems”. In: STOC. ACM, 2017, pp. 784–797 (cit. on pp. 2, 24, 26, 27). [HKN14] Monika Henzinger, Sebastian Krinninger, and Danupon Nanongkai. “Decremental SingleSource Shortest Paths on Undirected Graphs in Near-Linear Total Update Time”. In: FOCS. IEEE Computer Society, 2014, pp. 146–155 (cit. on p. 23). [HKN16] Monika Henzinger, Sebastian Krinninger, and Danupon Nanongkai. “Dynamic Approximate All-Pairs Shortest Paths: Breaking the O(mn) Barrier and Derandomization”. In: SIAM J. Comput. 45.3 (2016), pp. 947–1006 (cit. on p. 23). [HKNS15] Monika Henzinger, Sebastian Krinninger, Danupon Nanongkai, and Thatchaphol Saranurak. “Unifying and Strengthening Hardness for Dynamic Problems via the Online MatrixVector Multiplication Conjecture”. In: STOC. ACM, 2015, pp. 21–30 (cit. on p. 2). [HLT17] Bradley Hardy, Rhyd Lewis, and Jonathan Thompson. “Tackling the edge dynamic graph colouring problem with and without future adjacency information”. In: Journal of Heuristics (2017), pp. 1–23 (cit. on p. 2). [Hal93] Magnús M. Halldórsson. “A Still Better Performance Guarantee for Approximate Graph Coloring”. In: Inf. Process. Lett. 45.1 (1993), pp. 19–23 (cit. on p. 2). [KKM13] Bruce M. Kapron, Valerie King, and Ben Mountjoy. “Dynamic graph connectivity in polylogarithmic worst case time”. In: SODA. SIAM, 2013, pp. 1131–1142 (cit. on p. 23). 25 [KP06] Subhash Khot and Ashok Kumar Ponnuswami. “Better Inapproximability Results for MaxClique, Chromatic Number and Min-3Lin-Deletion”. In: Automata, Languages and Programming, 33rd International Colloquium, ICALP 2006, Venice, Italy, July 10-14, 2006, Proceedings, Part I. Ed. by Michele Bugliesi, Bart Preneel, Vladimiro Sassone, and Ingo Wegener. Vol. 4051. Lecture Notes in Computer Science. Springer, 2006, pp. 226– 237 (cit. on p. 1). [KPP16] Tsvi Kopelowitz, Seth Pettie, and Ely Porat. “Higher Lower Bounds from the 3SUM Conjecture”. In: SODA. SIAM, 2016, pp. 1272–1287 (cit. on p. 2). [NS17] Danupon Nanongkai and Thatchaphol Saranurak. “Dynamic spanning forest with worstcase update time: adaptive, Las Vegas, and O(n1/2 - ǫ )-time”. In: STOC. ACM, 2017, pp. 1122–1129 (cit. on p. 23). [NSW17] Danupon Nanongkai, Thatchaphol Saranurak, and Christian Wulff-Nilsen. “Dynamic Minimum Spanning Forest with Subpolynomial Worst-case Update Time”. In: FOCS. IEEE Computer Society, 2017 (cit. on p. 23). [OB11] Linda Ouerfelli and Hend Bouziri. “Greedy algorithms for dynamic graph coloring”. In: Communications, Computing and Control Applications (CCCA), 2011 International Conference on. IEEE. 2011, pp. 1–5 (cit. on p. 2). [Pat10] Mihai Patrascu. “Towards polynomial lower bounds for dynamic problems”. In: STOC. ACM, 2010, pp. 603–610 (cit. on p. 2). [SIPGRP16] Scott Sallinen, Keita Iwabuchi, Suraj Poudel, Maya Gokhale, Matei Ripeanu, and Roger A. Pearce. “Graph colouring as a challenge problem for dynamic graph processing on distributed systems”. In: Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, SC 2016, Salt Lake City, UT, USA, November 13-18, 2016. Ed. by John West and Cherri M. Pancake. IEEE Computer Society, 2016, pp. 347–358 (cit. on p. 2). [Wul17] Christian Wulff-Nilsen. “Fully-dynamic minimum spanning forest with improved worstcase update time”. In: STOC. ACM, 2017, pp. 1130–1143 (cit. on p. 23). [Zuc07] David Zuckerman. “Linear Degree Extractors and the Inapproximability of Max Clique and Chromatic Number”. In: Theory of Computing 3.1 (2007). Announced at STOC’06, pp. 103–128 (cit. on p. 1). A Locally-Fixable Problems We consider graph problems in a way similar to [GKM17], where there is a set of states Sv associated with each node v, and each node v has to pick a state s(v) ∈ Sv . For a locally-fixable problem, once every node picks its own state, there is a function fv that determines whether any given node v ∈ V is valid or invalid. Crucially, the function fv satisfies the two properties stated below. The goal in a locally-fixable problem is to assign a state to each node in such a way that all the nodes become valid. Property A.1. The output of the function fv depends only on the states of v and its neighbors. (In other words, fv is a constraint that is local to a node v in that it is defined on the states of v and its neighbors.) Property A.2. Consider any assignment of states to v and its neighbors where v is invalid. Then, without modifying the states of v’s neighbors, there is a way to change the state of v that (a) makes v valid, and (b) does not make any erstwhile valid neighbor of v invalid. 26 We present two examples of locally-fixable problems. Note again that all graph problems below are viewed as assigning states to nodes, and their definitions below are standard. Our main task is to define a function fv for each node v such that Properties A.1 and A.2 are satisfied. (∆ + 1)-vertex coloring. In this problem, the set of states Sv associated with a node v is the set of (∆ + 1) colors, and a feasible coloring is when every node has different color from its neighbors. To show that this problem is locally-fixable, consider the function fv which determines that v is valid iff it none of its neighbors have the same state as v. This satisfies Properties A.1 and A.2, since a node v has at most ∆ neighbors and there are (∆ + 1) possible states. (2∆ − 1)-edge coloring. The problem is as follows. Let C denote the palette of 2∆ − 1 colors. Let n = |V | denote the number of nodes. We identify these nodes as V = {1, . . . , n}. The state s(v) of a node v is an n-tuple s(v) = (s1 (v), . . . , sn (v)), where si (v) ∈ C ∪ ⊥ for each i ∈ [n]. The set Sv consists of all such possible n-tuples. The element su (v) is supposed to be the color of edge (u, v), which should be ⊥ if edge (u, v) does not exist. Thus, the feasible solution is the one where (1) for every nodes u 6= v, su (v) 6= ⊥ iff there is an edge (u, v) (i.e. each node only assign colors to its incident edges), (2) for every edge (u, v), su (v) = sv (u) (i.e. u and v agree on the color of (u, v)), and (3) for every edges (u, v) 6= (u′ , v), su (v) 6= su′ (v) (i.e. adjacent edges should have different colors). To show that this problem is locally-fixable, consider the function fv which determines that v is valid iff the following three conditions hold. (1) si (v) = ⊥ for every i ∈ [n] that is not a neighbor of v. (2) si (v) = sv (i) 6= ⊥ for every neighbor i ∈ [n] of v. (3) si (v) 6= sj (v) for every two neighbors i, j ∈ [n] of v with i 6= j. This satisfies Properties A.1 and A.2. Lemma A.3. In the dynamic setting, we can update a valid solution to a locally-fixable problem by making at most two changes after an insertion or deletion of an edge. Furthermore, the changes occur only at the endpoints of the edge being inserted or deleted. Proof. Consider a locally fixable problem on a dynamic graph G = (V, E). Suppose that every node is valid just before the insertion or deletion of an edge (u, v). By Property A.1, due to the insertion/deletion of the edge, only the endpoints u and v can potentially become invalid. By Property A.2, we can consider u and v one at a time in any order and make them valid again without making any new node invalid. Locally-fixable problems constitute a subclass of SLOCAL problems. Roughly speaking, the complexity class SLOCAL(1) [GKM17] is as follows (the description closely follows [GKM17]). In the SLOCAL(1) model, nodes are processed in an arbitrary order. When a node v is processed, it can see the current state of its neighbors and compute its output as an arbitrary function of this. In addition, v can locally store an arbitrary amount of information, which can be read by later nodes as part of v’s state. Lemma A.4. Any locally-fixable problem is in SLOCAL(1). Proof. We initially assign an arbitrary state s(v) ∈ Sv to every node v ∈ V . Then we scan the nodes in V in any arbitrary order. While considering a node v during the scan, using Property A.2 we change the state of v in such a way which ensures that (1) the node v becomes valid and (2) no previously scanned neighbor of v becomes invalid. Thus, at the end of the scan, we are guaranteed that every node is valid. The maximal independent set (MIS) problem is not locally fixable. Recall the standard definition of MIS where the state s(v) of a node v is either 0 or 1, and a feasible solution is such that (i) no two adjacent nodes are both 1, and (ii) no node whose neighbors are all 0 is in state 0. We claim that MIS under this standard 27 definition is not locally-fixable; i.e. we cannot define function fv for every node v such that Properties A.1 and A.2 are satisfied. To see this, consider the following graph instance G = (V, E), where the node-set is defined as V = {u, v, u1 , . . . , u∆−1 , v1 , . . . , v∆−1 }. The edge-set E is defined as follows. For every i ∈ [∆ − 1], there are two edges (u, ui ) and (v, vi ). Now consider the following MIS solution for the graph G. We have s(u) = s(v) = 1 and s(x) = 0 for all x ∈ V \ {u, v}. Now, if the edge (u, v) gets inserted, we have to change either s(u) or s(v) to 0. Without any loss of generality, suppose that we set s(u) ← 0. Then we also need to set s(ui ) ← 1 for every i ∈ [∆ − 1]. In other words, insertion or deletion of an edge can lead to Ω(∆) many changes in a valid solution. By a contrapositive of Lemma A.3, MIS is not locally-fixable. 28
8cs.DS
Program Transformation to Identify List-Based Parallel Skeletons Venkatesh Kannan G. W. Hamilton School of Computing, Dublin City University, Ireland {vkannan, hamilton}@computing.dcu.ie Algorithmic skeletons are used as building-blocks to ease the task of parallel programming by abstracting the details of parallel implementation from the developer. Most existing libraries provide implementations of skeletons that are defined over flat data types such as lists or arrays. However, skeleton-based parallel programming is still very challenging as it requires intricate analysis of the underlying algorithm and often uses inefficient intermediate data structures. Further, the algorithmic structure of a given program may not match those of list-based skeletons. In this paper, we present a method to automatically transform any given program to one that is defined over a list and is more likely to contain instances of list-based skeletons. This facilitates the parallel execution of a transformed program using existing implementations of list-based parallel skeletons. Further, by using an existing transformation called distillation in conjunction with our method, we produce transformed programs that contain fewer inefficient intermediate data structures. 1 Introduction In today’s computing systems, parallel hardware architectures that use multi-core CPUs and GPUs (Graphics Processor Units) are ubiquitous. On such hardware, it is essential that the programs developed be executed in parallel in order to effectively utilise the computing power that is available. To enable this, the parallelism that is inherent in a given program needs to be identified and exploited. However, parallel programming is tedious and error-prone when done by hand and is very difficult for a compiler to do automatically to the desired level. To ease the task of parallel programming, a collection of algorithmic skeletons [5, 6] are often used for program development to abstract away from the complexity of implementing the parallelism. In particular, map, reduce and zipWith are primitive parallel skeletons that are often used for parallel programming [20, 8]. Most libraries such as Eden [18], SkeTo [22], Data Parallel Haskell (DPH) [3], and Accelerate [2] provide parallel implementations for these skeletons defined over flat data types such as lists or arrays. However, there are two main challenges in skeleton-based programming: 1. Using multiple skeletons in a program often introduces inefficient intermediate data structures [21, 23]. 2. There may be a mismatch in data structures and algorithms used by the skeletons and the program [27, 12]. For example, consider the matrix multiplication program shown in Example 1.1, where mMul computes the product of two matrices xss and yss. The function map is used to compute the dot-product (dot p) of each row in xss and those in the transpose of yss, which is computed by the function transpose. Note that this definition uses multiple intermediate data structures, which is inefficient. G.W. Hamilton, A. Lisitsa, A.P. Nemytykh (Eds): VPT 2016 EPTCS 216, 2016, pp. 118–136, doi:10.4204/EPTCS.216.7 c V. Kannan and G. W. Hamilton V. Kannan and G. W. Hamilton 119 Example 1.1 (Matrix Multiplication – Original Program) mMul :: [[a]] → [[a]] → [[a]] mMul xss yss where mMul [] yss mMul (xs : xss) yss dot p xs ys transpose xss transpose0 [] yss transpose0 (xs : xss) yss rotate [] yss rotate (x : xs) [] rotate (x : xs) (ys : yss) = = = = = = = = = [] (map (transpose yss) (dot p xs)) : (mMul xss yss) f oldr (+) 0 (zipWith (∗) xs ys) transpose0 xss [] yss transpose0 xss (rotate xs yss) yss [x] : (rotate xs yss) (ys ++ [x]) : (rotate xs yss) A version of this program defined using the built-in map, reduce and zipWith skeletons is shown in Example 1.2. Example 1.2 (Hand-Parallelised Matrix Multiplication) mMul xss yss where mMul [] yss mMul (xs : xss) yss dot p xs ys transpose xss transpose0 [] yss transpose0 (xs : xss) yss rotate xs yss = = = = = = = [] (map (dot p xs) (transpose yss)) : (mMul xss yss) reduce (+) 0 (zipWith (∗) xs ys) transpose0 xss [] yss transpose0 xss (rotate xs yss) zipWith (λ x.λ ys.(ys ++ [x])) xs yss As we can observe, though defined using parallel skeletons, this implementation still employs multiple intermediate data structures. For instance, the matrix constructed by the transpose function is subsequently decomposed by map. It is challenging to obtain a program that uses skeletons for parallel evaluation and contains very few intermediate data structures. Therefore, it is desirable to have a method to automatically identify potential parallel computations in a given program, transform them to operate over flat data types to facilitate their execution using parallel skeletons provided in existing libraries, and reduce the number of inefficient intermediate data structures used. In this paper, we present a transformation method with the following aspects: 1. Reduces inefficient intermediate data structures in a given program using an existing transformation technique called distillation [11]. (Section 3) 2. Automatically transforms the distilled program by encoding its inputs into a single cons-list, referred to as the encoded list. (Section 4) 3. Allows for parallel execution of the encoded program using efficient implementations of map and map-reduce skeletons that operate over lists. (Section 5) In Section 6, we discuss the results of evaluating our proposed transformation method using two example programs. In Section 7, we present concluding remarks on possible improvements to our transformation method and discuss related work. 120 2 Program Transformation to Identify List-Based Parallel Skeletons Language We focus on the automated parallelisation of functional programs because pure functional programs are free of side-effects, which makes them easier to analyse, reason about, and manipulate using program transformation techniques. This facilitates parallel evaluation of independent sub-expressions in a program. The higher-order functional language used in this work is shown in Definition 2.1. Definition 2.1 (Language Grammar) data T α1 . . . αM ::= c1 t11 . . .tN1 | . . . | cK t1K . . .tNK t ::= αm | T t1 . . .tM Type Declaration Type Component e ::= x Variable | c e1 . . . eN Constructor Application | e0 Function Definition where 1 K f p11 . . . p1M x(M+1) . . . xN1 = e1 . . . f pK1 . . . pKM x(M+1) . . . xNK = eK | f Function Call | e0 e1 Application | let x1 = e1 . . . xN = eN in e0 let–expression | λ x.e λ –Abstraction p ::= x | c p1 . . . pN Pattern A program can contain data type declarations of the form shown in Definition 2.1. Here, T is the name of the data type, which can be polymorphic, with type parameters α1 , . . . , αM . A data constructor ck may have zero or more components, each of which may be a type parameter or a type application. An expression e of type T is denoted by e :: T . A program in this language can also contain an expression which can be a variable, constructor application, function definition, function call, application, let-expression or λ -expression. Variables introduced in a λ -expression, let-expression, or function definition are bound, while all other variables are free. Each constructor has a fixed arity. In an expression c e1 . . . eN , N must be equal to the arity of the constructor c. Patterns in a function definition header are grouped into two – pk1 . . . pkM are inputs k that are pattern-matched, and x(M+1) . . . xNk are inputs that are not pattern-matched. The series of patterns p11 . . . p1M , . . . , pK1 . . . pKM in a function definition must be non-overlapping and exhaustive. We use [] and (:) as short notations for the Nil and Cons constructors of a cons-list and ++ for list concatenation. The set of free variables in an expression e is denoted as f v(e). Definition 2.2 (Context) A context E is an expression with holes in place of sub-expressions. E[e1 , . . . , eN ] is the expression obtained by filling holes in context E with the expressions e1 , . . . , eN . The call-by-name operational semantics of our language is defined using the one-step reduction relation shown in Definition 2.3. Definition 2.3 (One-Step Reduction Relation) e0 (λ x.e0 ) e1  β e0 {x 7→ e1 }  (e0 e1 ) r e00 r (e00 e1 ) e1 (e0 e1 )   f p1 . . . pN = e ∧ ∃θ · ∀n ∈ {1, . . . , N} · en = pn θ ( f e1 . . . eN ) let x1 = e1 . . . xN = eN in e0  β f eθ e0 {x 7→ e1 , . . . , xN 7→ eN }  r e01 r (e0 e01 ) V. Kannan and G. W. Hamilton 3 121 Distillation Objective: A given program may contain a number of inefficient intermediate data structures. In order to reduce them, we use an existing transformation technique called distillation. Distillation [11] is a technique that transforms a program to remove intermediate data structures and yields a distilled program. It is an unfold/fold-based transformation that makes use of well-known transformation steps – unfold, generalise and fold [25] – and can potentially provide super-linear speedups to programs. The syntax of a distilled program de{} is shown in Definition 3.1. Here, ρ is the set of variables introduced by let–expressions; these are not decomposed by pattern-matching. Consequently, de{} is an expression that has fewer intermediate data structures. Definition 3.1 (Distilled Form Grammar) ρ ρ deρ ::= x de1 . . . deN ρ ρ | c de1 . . . deN ρ | de0 where ρ ρ K 1 . . . xNK = deK . . . xN1 = de1 . . . f pK1 . . . pKM x(M+1) f p11 . . . p1M x(M+1) | f x1 . . . xM x(M+1) . . . xN s.t. ∀x ∈ {x1 , . . . , xM } · x 6∈ ρ  ∀n ∈ {1, . . . , N} · xn ∈ ρ ⇒ ∀k ∈ {1, . . . , K} · pkn = xnk ρ ∪ {x1 ,...,xN } ρ ρ | let x1 = de1 . . . xN = deN in de1 ρ | λ x.de p ::= x | c p1 . . . pN Variable Application Constructor Application Function Definition Function Application let–expression λ –Abstraction Pattern Example 3.1 shows the distilled form of the example matrix multiplication program in Example 1.1. Here, we have lifted the definitions of functions mMul2 and mMul3 to the top level using lambda lifting for ease of presentation. Example 3.1 (Matrix Multiplication – Distilled Program) mMul xss yss where mMul xss yss mMul1 [] zss yss mMul1 xss [] yss mMul1 (xs : xss) (zs : zss) yss = = = = mMul2 [] xs yss v mMul2 (z : zs) xs yss v = = mMul3 [] yss v mMul3 (x : xs) [] v mMul3 (x : xs) (ys : yss) v = = = mMul1 xss yss yss [] [] let v = λ xs.g xs where g [] = 0 g (x : xs) = x in (mMul2 zs xs yss v) : (mMul1 xss zss yss) [] let v0 = λ xs.g xs where g [] = 0 g (x : xs) = v xs in (mMul3 xs yss v) : (mMul2 zs xs yss v0 ) 0 0 (x ∗ (v ys)) + (mMul3 xs yss v) In this distilled program, function mMul1 computes the product of matrices xss and yss, and functions mMul2 and mMul3 compute the dot-product of a row in xss and those in the transpose of yss. This version of matrix multiplication is free from intermediate data structures. In particular, distillation removes data structures that are constructed and subsequently decomposed as a part of the algorithm that is implemented in a given program. 122 Program Transformation to Identify List-Based Parallel Skeletons Consequence: Using the distillation transformation, we obtain a semantically equivalent version of the original program that has fewer intermediate data structures. 4 Encoding Transformation Objective: The data types and the algorithm of a distilled program, which we want to parallelise, may not match with those of the skeletons defined over lists. This would inhibit the potential identification of parallel computations that could be encapsulated using the map or map-reduce skeletons. To resolve this, we define a transformation that encodes the inputs of a distilled program into a single cons-list. The resulting encoded program is defined in a form that facilitates identification of list-based parallel skeleton instances. To perform the encoding transformation, we first lift the definitions of all functions in a distilled program to the top-level using lambda lifting. Following this, for each recursive function f defined in the top-level where-expression of the distilled program, we encode the inputs p1 , . . . , pM that are pattern-matched in the definition of f . Other inputs x(M+1) , . . . , xN that are never pattern-matched in the definition of f are not encoded. Further, we perform this encoding only for the recursive functions in a distilled program because they are potential instances of parallel skeletons, which are also defined recursively. The three steps to encode inputs x1 , . . . , xM of function f into a cons-list, referred to as the encoded list, are illustrated in Figure 1 and described below. Here, we encode the pattern-matched inputs x1 , . . . , xM into a cons-list of type [T f ], where T f is a new type created to contain the pattern-matched variables in x1 , . . . , xM .   x1 . . . xM f - out put   Transformation using Encoded List Type [T f ] encode f   ? ? x f0 - out put   Figure 1: Steps to Encode Inputs of Function f Consider the definition of a recursive function f , with inputs x1 , . . . , xM , x(M+1) , . . . , xN , of the form shown in Definition 4.1 in a distilled program. Here, for each body ek corresponding to function header k . . . xNk in the definition of f , we use one of the recursive calls to function f that may f pk1 . . . pkM x(M+1) appear in ek . All other recursive calls to f in ek are a part of the context Ek . Definition 4.1 (General Form of Recursive Function in Distilled Program) f x1 . . . xM x(M+1) . . . xN where f p11 . . . p1M x(M+1) . . . xN = e1 .. .. . . f pK1 . . . pKM x(M+1) . . . xN = eK h i k xk k where ∃k ∈ {1, . . . , K} · ek = Ek f x1k . . . xM . . . x N (M+1) The three steps to encode the pattern-matched inputs are as follows: V. Kannan and G. W. Hamilton 123 1. Declare a new encoded data type T f : First, we declare a new data type T f for elements of the encoded list. This new data type corresponds to the data types of the pattern-matched inputs of function f that are encoded. The rules to declare type T f are shown in Definition 4.2. Definition 4.2 (Rules to Declare Encoded Data Type for List) data T f α1 . . . αG ::= c1 T11 . . . TL1 | . . . | cK T1K . . . TLK where α1 , . . . , αG are the type variables of the data types of the pattern-matched inputs ∀k ∈ {1, . . . , K}· k k ck is a fresh constructor for T( inputs f corresponding to p1 . . . pM of the pattern-matched h i k k k  f v(Ek ) \ {x(M+1) , . . . , xN }, if ek = Ek f x1 . . . xM x(M+1) . . . xNk k k (z1 :: T1 ), . . . , (zL :: TL ) = f v(ek ) \ {x(M+1) , . . . , xN }, otherwise where f pk1 . . . pkM x(M+1) . . . xN = ek Here, a new constructor ck of the type T f is created for each set pk1 . . . pkM of the pattern-matched inputs x1 . . . xM of function f that are encoded. As stated above, our objective is to encode the inputs of a recursive function f into a list, where each element contains the pattern-matched variables consumed in an iteration of f . To achieve this, the variables bound by constructor ck correspond to the variables z1 , . . . , zL in pk1 . . . pkM that occur in the context Ek (if ek contains a recursive call to f ) or the expression ek (otherwise). Consequently, the type components of constructor ck are the data types of the variables z1 , . . . , zL . 2. Define a function encode f : For a recursive function f of the form shown in Definition 4.1, we use the rules in Definition 4.3 to define function encode f to build the encoded list, in which each element is of type T f . Definition 4.3 (Rules to Define Function encode f ) encode f x1 . . . xM where encode f p11 . . . p1M = e01 .. .. . . encode f pK1 . . . pKM = e0K where i h   k k . . . zk ++ (encode xk . . . xk ), if e = E k . . . xk xk  . . . x c z f x f 1 k k  k 1 L M M (M+1) N 1   where {zk , . . . , zk } = f v(E ) \ {x , . . . , x } N k (M+1) L 1 ∀k ∈ {1, . . . , K} · e0k =    k . . . zk ,  c z otherwise  L  k 1  k k where {z1 , . . . , zL } = f v(ek ) \ {x(M+1) , . . . , xN } where f pk1 . . . pkM x(M+1) . . . xN = ek Here, for each pattern pk1 . . . pkM of the pattern-matched inputs, the encode f function creates a list element. This element is composed of a fresh constructor ck of type T f that binds zk1 , . . . , zkL , which are the variables in pk1 . . . pkM that occur in the context Ek (if ek contains a recursive call to f ) or the k xk k expression ek (otherwise). The encoded input of the recursive call f x1k . . . xM (M+1) . . . xN is then k and appended to the element to build the complete encoded list for computed by encode f x1k . . . xM function f . 3. Transform the distilled program : After creating the data type T f for the encoded list and the encode f function for each recursive function f , we transform the distilled program using the rules in Definition 4.4 by defining a recursive function f 0 , which operates over the encoded list, corresponding to function f . 124 Program Transformation to Identify List-Based Parallel Skeletons Definition 4.4 (Rules to Define Encoded Function Over Encoded List) f 0 x x(M+1) . . . xN where  f 0 (c1 z11 . . . z1L ) : x1 x(M+1) . . . xN = e01 .. .. . .  f 0 (cK zK1 . . . zKL ) : xK x(M+1) . . . xN = e0K where ( h ∀k ∈ {1, . . . , K} · e0k i i h k xk k k . . . x Ek f 0 xk x(M+1) . . . xNk , if ek = Ek f x1k . . . xM N (M+1) = ek , otherwise where f pk1 . . . pkM x(M+1) . . . xN = ek Here, • In each function definition header of f , replace the pattern-matched inputs with a pattern to decompose the encoded list, such that the first element in the encoded list is matched with the corresponding pattern of the encoded type. For instance, a function header f p1 . . . pM x(M+1) . . . xN is transformed to f 0 p x(M+1) . . . xN , where p is a pattern to match the first element in the encoded list with a pattern of the type T f . • In each call to function f , replace the pattern-matched inputs with their encoding. For instance, a call f x1 . . . xM x(M+1) . . . xN is transformed to f 0 x x(M+1) . . . xN , where x is the encoding of the pattern-matched inputs x1 , . . . , xM . The encoded data types, encode functions and encoded program obtained for the distilled matrix multiplication program from Example 3.1 are shown in Example 4.1. Example 4.1 (Matrix Multiplication – Encoded Program) data TmMul1 a ::= c1 | c2 | c3 [a] [a] data TmMul2 a ::= c4 | c5 data TmMul3 a ::= c6 | c7 | c8 a [a] encodemMul1 [] zss = [c1 ] encodemMul1 xss [] = [c2 ] encodemMul1 (xs : xss) (zs : zss) = [c3 xs zs] ++ (encodemMul1 xss zss) encodemMul2 [] = [c4 ] encodemMul2 (z : zs) = [c5 ] ++ (encodemMul2 xs yss zs) encodemMul3 [] yss = [c6 ] encodemMul3 (x : xs) [] = [c7 ] encodemMul3 (x : xs) (ys : yss) = [c8 x ys] ++ (encodemMul3 xs yss) mMul 0 xss yss where mMul 0 xss yss = mMul10 (encodemMul1 xss yss) yss mMul10 (c1 : w) yss = [] mMul10 (c2 : w) yss  = [] mMul1 (c3 xs zs) : w yss = let v = λ xs.g xs where g [] = 0 g (x : xs) = x in (mMul20 (encodemMul2 zs) xs yss v) : (mMul10 w yss) 0 mMul2 (c4 : w) xs yss v = [] mMul20 (c5 : w) xs yss v = let v0 = λ xs.g xs where g [] = 0 g (x : xs) = v xs in (mMul30 (encodemMul3 xs yss) v) : (mMul20 w xs yss v0 ) V. Kannan and G. W. Hamilton 125 mMul30 (c6 : w) v = 0 mMul30 (c7 : w) v  = 0 mMul30 (c8 x ys) : w v = (x ∗ (v ys)) + (mMul30 w v) 4.1 Correctness The correctness of the encoding transformation can be established by proving that the result computed by each recursive function f in the distilled program is the same as the result computed by the corresponding recursive function f 0 in the encoded program. That is,   f x1 . . . xM x(M+1) . . . xN = f 0 x x(M+1) . . . xN where x = encode f x1 . . . xM Proof: The proof is by structural induction over the encoded list type [T f ]. Base Case:  For the encoded list xk = (ck zk1 . . . zkL ) : [] computed by encode f pk1 . . . pkM , 1. By Definition 4.1, L.H.S. evaluates to ek . 2. By Definition 4.4, R.H.S. evaluates to ek . Inductive Case:  For the encoded list xk = (ck zk1 . . . zkL ) : xk computed by encode f pk1 . . . pkM , h i k xk k . 1. By Definition 4.1, L.H.S. evaluates to Ek f x1k . . . xM . . . x N (M+1) i h k 2. By Definition 4.4, R.H.S. evaluates to Ek f 0 xk x(M+1) . . . xNk .   3. By inductive hypothesis, f x1 . . . xM x(M+1) . . . xN = f 0 x x(M+1) . . . xN . Consequence: As a result of the encoding transformation, the pattern-matched inputs of a recursive function are encoded into a cons-list by following the recursive structure of the function. Parallelisation of the encoded program produced by this transformation by identifying potential instances of map and map-reduce skeletons is discussed in Section 5. 5 Parallel Execution of Encoded Programs Objective: An encoded program defined over an encoded list is more likely to contain recursive functions that resemble the structure of map or map-reduce skeletons. This is because the encode f function constructs the encoded list in such a way that it reflects the recursive structure of the map and map-reduce skeletons defined over a cons-list. Therefore, we look for instances of these skeletons in our encoded program. In this work, we identify instances of only map and map-reduce skeletons in an encoded program. This is because, as shown in Property 5.1, any function that is an instance of a reduce skeleton in an encoded program that operates over an encoded list cannot be efficiently evaluated in parallel because the reduction operator will not be associative. 126 Program Transformation to Identify List-Based Parallel Skeletons Property 5.1 (Non-Associative Reduction Operator for Encoded List) Given an encoded program defined over an encoded list, the reduction operator ⊕ in any instance of a reduce skeleton is not associative, that is ∀x, y, z · (x ⊕ (y ⊕ z)) 6= ((x ⊕ y) ⊕ z). Proof: 1. From Definition 4.4, given an encoded function f 0 , f 0 :: [T f ] → T(M+1) . . . TN → b where [T f ] is the encoded list data type. T(M+1) , . . . , TN are data types for inputs that are not encoded. b is the output data type. 2. If f 0 is an instance of a reduce skeleton, then the type of the binary reduction operator is given by ⊕ :: T f → b → b. 3. Given that T f is a newly created data type, it follows from (2) that the binary operator ⊕ is not associative because the two input data types T f and b cannot not be equal. 5.1 Identification of Skeletons To identify skeleton instances in a given program, we use a framework of labelled transition systems (LTSs), presented in Definition 5.1, to represent and analyse the encoded programs and skeletons. This is because LTS representations enable matching the recursive structure of the encoded program with that of the skeletons rather than finding instances by matching expressions. Definition 5.1 (Labelled Transition System (LTS)) A LTS for a given program is given by l = (S , s0 , Act, →) where: • S is the set of states of the LTS, where each state has a unique label s. • s0 ∈ S is the start state denoted by start(l). • Act is one of the following actions: – – – – – – – x, a free variable or let-expression variable, c, a constructor in an application, λ , a λ -abstraction, @, an expression application, #i, the ith argument in an application, p, the set of patterns in a function definition header, let, a let-expression body. • → ⊆ S × Act × S relates pairs of states by actions in Act such that if s ∈ S and s − → s0 then s0 ∈ S where α ∈ Act. α The LTS corresponding to a given program e can be constructed by L JeK s0 0/ 0/ using the rules L shown in Definition 5.2. Here, s0 is the start state, φ is the set of previously encountered function calls mapped to their corresponding states, and ∆ is the set of function definitions. A LTS built using these rules is always finite because if a function call is re-encountered, then the corresponding state is reused. V. Kannan and G. W. Hamilton 127 Definition 5.2 (LTS Representation of Program) L JxK s φ ∆ = s → (x, 0) L Jc e1 . . . eN K s φ ∆ = s → (c, 0), (#1, L Je1 K s1 φ ∆), . . . , (#N, L JeN K sN φ ∆) L Je0 where δ1 . . . δJ K s φ ∆ = L Je0 K s φ ∆ ∪ { f1 7→ δ1 , . . . , fJ 7→ δJ } 1 K where ∀ j ∈ {1, . . . , J} · δ j = f j p11 . . . p1M x(M+1) . . . xN1 = e1 . . . f j pK1 . . . pKM x(M+1) . . . xNK = eK  l where φ ( f ) = start(l), if f ∈ dom(φ ) L JfK s φ ∆ = L J∆( f )K s (φ ∪ { f 7→ s}) ∆, otherwise  u 1 } 1 1 1 1 1 . . . xN1 = e1 f p1 . . . p1M x(M+1)  s → (p1 . . . pM x(M+1) . . . xN , l1 ), . . . , w ..  . K K K .. ~ s φ ∆ = (p1 . . . pM x(M+1) . . . xNK , lK ) Lv .    K where ∀k ∈ {1, . . . , K} · lk = L Jek K sk φ ∆ f pK1 . . . pKM x(M+1) . . . xNK = eK L Je0 e1 K s φ ∆ = s → (@, L Je0 K s0 φ ∆), (#1, L Je1 K s1 φ ∆) L Jlet x1 = e1 . . . xN = eN in e0 K s φ ∆ = s → let, L Je0 K s0 φ ∆), (x1 , L Je1 K s1 φ ∆), . . . , (xN , L JeN K sN φ ∆) L Jλ x.eK s φ ∆ = s → (λ , L JeK s1 φ ∆) Definition 5.3 (LTS Substitution) A substitution is denoted by θ = {x1 7→ l1 , . . . , xN 7→ lN }. If l is an LTS, then lθ = l{x1 7→ l1 , . . . , xN 7→ lN } is the result of simultaneously replacing the LTSs sn → (xn , 0) with the corresponding LTS ln in the LTS l while ensuring that bound variables are renamed appropriately to avoid name capture. Potential instances of skeleton LTSs can be identified and replaced with suitable calls to corresponding skeletons in the LTS of an encoded program l by S JlK 0/ hi ω using the rules presented in Definition 5.4. Definition 5.4 (Extraction of Program from LTS with Skeletons)   f e1 . . . eN , if ∃( f x1 . . . xN , l 0 ) ∈ ω, θ · l 0 θ = l          where      θ = {x → 7 l , . . . , x → 7 l }  N N 1 1      ∀n ∈ {1, . . . , N} · e = (S Jl K ρ σ ω) α n n  , if ∃s ∈ states(l), α · s → start(l)  S JlK ρ σ ω =  f e1 . . . eN , if ∃(s, f ) ∈ ρ · start(l) = s         where σ = he1 , . . . , eN i        S 0 JlK ρ σ ω, otherwise     0 S JlK ρ σ ω, otherwise 0 S Js → (x, 0)K ρ σ ω = x e1 . . . eN where σ = he1 , . . . , eN i S 0 Js → (c, 0), (#1, l1 ), . . . , (#N, lN )K ρ σ ω = c (S Jl1 K ρ σ ω) . . . (S JlN K ρ σ ω) f e1 . . . eN     where   1 0  f p1 . . . p1 x 1  M (M+1) . . . xN = e1  1  t |   1 1 1 1 .. .. s → (p1 . . . pM x(M+1) . . . xN , l1 ), . . . , . . S0 ρσω= K K K K K (p1 . . . pM x(M+1) . . . xN , lK )  . . . xNK = e0K  f pK1 . . . pKM x(M+1)    where f is fresh, σ = he1 , . . . , eN i      ∀k ∈ {1, . . . , K} · e0k = S Jlk K ρ 0 hi ω   ρ 0 = ρ ∪ {(s, f )} S 0 Js → (@, l0 ), (#1, l1 )K ρ σ ω = S Jl0 K ρ h(S Jl1 K ρ ω hi) : σ i ω S 0 Js → (let, l0 ), (x1 , l1 ), . . . , (xN , lN )K ρ σ ω = let x1 = (S Jl1 K ρ σ ω) . . . xN = (S JlN K ρ σ ω) in (S Jl0 K ρ σ ω) = λ x.(S JlK ρ σ ω) where x is fresh S 0 Js → (λ , l)K ρ σ ω Here, the parameter ρ contains the set of new functions that are created and associates them with their corresponding states in the LTS. The parameter σ contains the sequence of arguments of an application expression. The set ω is initialised with pairs of application expression and corresponding LTS representation of each parallel skeleton to be identified in a given LTS; for example, (map xs f , l) is a pair in ω where map xs f is the application expression for map and l is its LTS representation. 128 Program Transformation to Identify List-Based Parallel Skeletons The definitions of list-based map and map-reduce skeletons whose instances we identify in an encoded program are as follows: map :: [a] → (a → b) → [b] map [] f = [] map (x : xs) f = ( f x) : (map xs f ) mapReduce :: [a] → (b → b → b) → b → (a → b) → b mapReduce [] g v f =v mapReduce (x : xs) g v f = g ( f x) (mapReduce xs g v f ) Property 5.2 (Non-Empty Encoded List)  Given rules in Definition 4.3 to encode inputs into a list, ∀ f , x1 , . . . , xM · encode f x1 . . . xM 6= []. Proof: From Definition 4.3, ∃k ∈ {1, . . . ,K} · pk1 . . . pkM that matches inputs x1 . . .xM . k . Therefore, the list computed Consequently, encode f x1 . . . xM = [ck zk1 . . . zkL ] ++ encode f x1k . . . xM by encode f x1 . . . xM is at least a singleton. From Property 5.2, it is evident that the encoded programs produced by our transformation will always be defined over non-empty encoded list inputs. Consequently, to identify instances of map and mapReduce skeletons in an encoded program, we represent only the patterns corresponding to non-empty inputs, i.e. (x : xs), in the LTSs built for the skeletons. As an example, the LTSs built for the map skeleton and the mMul10 function in the encoded program for matrix multiplication in Example 4.1 are illustrated in Figures 2 and 3, respectively. Here, we observe that the LTS of mMul10 is an instance of the LTS of map skeleton. Similarly, the LTS of mMul30 is an instance of the LTS of mapReduce skeleton. @ #1 (:) #1 #2 @ #1 3 @(map) (c1 : w) yss xs (x : xs) f w f @ #1 [] (c2 : w) yss ... 1 ... #2 @ #1 #1 @(mMul10 ) Figure 2: LTS for map Skeleton. v let (:) #1 3 #1 ((c3 xs zs) : w) yss [] @ #1 2 yss @ #1 @ #1 1 2 Figure 3: LTS for mMul10 Function. V. Kannan and G. W. Hamilton 5.2 129 Parallel Implementation of Skeletons In order to evaluate the parallel programs obtained by our method presented in this chapter, we require efficient parallel implementations of the map and map-reduce skeletons. For the work presented in this paper, we use the Eden library [18] that provides parallel implementations of the map and map-reduce skeletons in the following forms: farmB :: (Trans a, Trans b) ⇒ Int → (a → b) → [a] → [b] parMapRedr :: (Trans a, Trans b) ⇒ (b → b → b) → b → (a → b) → [a] → b parMapRedl :: (Trans a, Trans b) ⇒ (b → b → b) → b → (a → b) → [a] → b The farmB skeleton implemented in Eden divides a given list into N sub-lists and creates N parallel processes, each of which applies the map computation on a sub-list. The parallel map-reduce skeletons, parMapRedr and parMapRedr, are implemented using the parMap skeleton which applies the map operation in parallel on each element in a given list. The result of parMap is reduced sequentially using the conventional foldr and foldl functions, respectively. Currently, the map-reduce skeletons in the Eden library are defined using the foldr and foldl functions that require a unit value for the reduction/fold operator to be provided as an input. However, it is evident from Property 5.2 that the skeletons that are potentially identified will always be applied on non-empty lists. Therefore, we augment the skeletons provided in Eden by adding the following parallel map-reduce skeletons that are defined using the foldr1 and foldl1 functions, which are defined for non-empty lists, thereby avoiding the need to obtain a unit value for the reduction operator. parMapRedr1 :: (Trans a, Trans b) ⇒ (b → b → b) → (a → b) → [a] → b parMapRedl1 :: (Trans a, Trans b) ⇒ (b → b → b) → (a → b) → [a] → b To execute the encoded program produced by our transformation in parallel, we replace the identified skeleton instances with suitable calls to the corresponding skeletons in the Eden library. For example, by replacing functions mMul10 and mMul30 , which are instances of map and mapReduce skeletons respectively, with suitable calls to parMap and parMapRedr1, we obtain the transformed matrix multiplication program mMul 00 shown in Example 5.1. Example 5.1 (Matrix Multiplication – Encoded Parallel Program) mMul 00 xss yss where mMul 00 xss yss = mMul100 (encodemMul1 xss yss) yss mMul100 w yss = farmB noPe f w where f c1 = [] f c2 = [] f (c3 xs zs) = let v = λ xs.g xs where g [] = 0 g (x : xs) = x in mMul200 (encodemMul2 zs) xs yss v 00 mMul2 (c4 : w) xs yss v = [] mMul200 (c5 : w) xs yss v = let v0 = λ xs.g xs where g [] = 0 g (x : xs) = v xs in (mMul300 (encodemMul3 xs yss) v) : (mMul200 w xs yss v0 ) 130 Program Transformation to Identify List-Based Parallel Skeletons mMul300 w v = parMapRedr1 g f w where gxy = x+y f c6 = 0 f c7 = 0 f (c8 x ys) = x ∗ (v ys) Consequence: By automatically identifying instances of list-based map and map-reduce skeletons, we produce a program that is defined using these parallelisable skeletons. Using parallel implementations for these skeletons that are available in existing libraries such as Eden, it is possible to execute the transformed program on parallel hardware. 6 Evaluation In this paper, we present the evaluation of two benchmark programs – matrix multiplication and dotproduct of binary trees – to illustrate interesting aspects of our transformation. The programs are evaluated on a Mac Pro computer with a 12-core Intel Xeon E5 processor each clocked at 2.7 GHz and 64 GB of main memory clocked at 1866 MHz. GHC version 7.10.2 is used for the sequential versions of the benchmark programs and the latest Eden compiler based on GHC version 7.8.2 for the parallel versions. For all parallel versions of a benchmark program, only those skeletons that are present in the toplevel expression are executed using their parallel implementations. That is, nesting of parallel skeletons is avoided. The nested skeletons that are present inside top-level skeletons are executed using their sequential versions. The objective of this approach is to avoid uncontrolled creation of too many threads which we observe to result in inefficient parallel execution where the cost of thread creation and management is greater than the cost of parallel execution. 6.1 Example – Matrix Multiplication The original sequential version, distilled version, encoded version and encoded parallel version of the matrix multiplication program are presented in Examples 1.1, 3.1, 4.1 and 5.1 respectively. A hand-parallel version of the original matrix multiplication program in Example 1.1 is presented in Example 6.1. We identify that function mMul is an instance of the map skeleton and therefore define it using a suitable call to the farmB skeleton available in the Eden library. Example 6.1 (Matrix Multiplication – Hand-Parallel Program) mMul xss yss where mMul xss yss = f armB noPe f xss where f xs = map (dot p xs) (transpose yss) dot p xs ys = f oldr (+) 0 (zipWith (∗) xs ys) transpose xss = transpose0 xss [] transpose0 [] yss = yss transpose0 (xs : xss) yss = transpose0 xss (rotate xs yss) rotate [] yss = yss rotate (x : xs) [] = [x] : (rotate xs yss) rotate (x : xs) (ys : yss) = (ys ++ [x]) : (rotate xs yss) Figure 4 presents the speedups achieved by the encoded parallel version of the matrix multiplication program in comparison with the original, distilled and hand-parallel versions. Since we avoid nested V. Kannan and G. W. Hamilton 131 parallel skeletons as explained earlier, the encoded parallel program used in this evaluation contains only the mMul100 function defined using the farmB skeleton and uses the sequential definition for mMul300 . An input size indicated by NxM denotes the multiplication of matrices of sizes NxM and MxN. When compared to the original program, we observe that the encoded parallel version achieves a positive speedup of 3x-8x for all input sizes except for 100x1000. In the case with input size 100x1000, the speedup achieved is 6x-20x more than the speedups achieved for the other input sizes. This is due to the intermediate data structure transpose yss, which is of the order of 1000 elements for input size 100x1000 and of the order of 100 elements for the other inputs, that is absent in the encoded parallel program. This can be verified from the comparison with the distilled version, which is also free of intermediate data structures. Hence, the encoded parallel program has a linear speedup compared to the distilled version. From Examples 6.1 and 5.1, we observe that both the hand-parallel and encoded parallel Figure 4: Evaluation of Speedup for Matrix Multiplication versions parallelise the equivalent computations that multiply rows in the first matrix with columns in the second matrix using the farmB skeleton. However, the encoded parallel version is marginally faster than the hand-parallel version for input sizes 100x100 and 1000x100, and 4x faster for other input sizes except 100x1000. This is due to the use of intermediate data structures in the hand-parallel version which is of the order of 100 for all input sizes except 100x1000 for which the speedup achieved is 48x-18x 132 Program Transformation to Identify List-Based Parallel Skeletons more than the hand-parallel version. Also, the hand-parallel version scales better with a higher number of cores than the encoded parallel version for the input size 100x1000. This is because the encoded parallel version achieves better speedup even with fewer cores due to the elimination of intermediate data structures, and hence does not scale as impressively as the hand-parallel version. 6.2 Example – Dot-Product of Binary Trees Example 6.2 presents a sequential program to compute the dot-product of binary trees, where dotP computes the product of values at the corresponding branch nodes of trees xt and yt, and adds the dotproducts of the left and right sub-trees. The distilled version of this program remains the same as there are no intermediate data structures and a hand-parallel version cannot be defined using list-based parallel skeletons. Example 6.2 (Dot-Product of Binary Trees – Original/Distilled Program) data BTree a ::= E | B a (BTree a) (BTree a) dotP :: (BTree a) → (BTree a) → (BTree a) dotP xt yt where dotP E yt =0 dotP (B x xt1 xt2 ) E =0 dotP (B x xt1 xt2 ) (B y yt1 yt2 ) = (x ∗ y) + (dotP xt1 yt1 ) + (dotP xt2 yt2 ) By applying the encoding transformation, we obtain the encoded version for the dot-product program as shown in Example 6.3. Example 6.3 (Dot-Product of Binary Trees – Encoded Program) data TdotP a ::= c1 | c2 | c3 a a (BTree a) (BTree a) encodedotP E yt = [c1 ] encodedotP (B x xt1 xt2 ) E = [c2 ] encodedotP (B x xt1 xt2 ) (B y yt1 yt2 ) = [c3 x y xt1 yt1 ] ++ (encodedotP xt2 yt2 ) dotP (encodedotP xt yt) where dotP (c1 : w) = 0 dotP (c2 : w) = 0  dotP (c3 x y xt yt) : w = (x ∗ y) + (dotP (encodedotP xt yt)) + (dotP w) By applying the skeleton identification rule to this encoded program, we identify that the encoded version of function dotP is an instance of the mapRedr skeleton. Example 6.4 shows the encoded parallel version defined using a suitable call to the parMapRedr1 skeleton in the Eden library. As explained before, we define only the top-level call to dotP00 using the parallel skeleton and use the sequential for the nested call to dotP because we avoid nested parallel skeletons in this evaluation. Example 6.4 (Dot Product of Binary Trees – Encoded Parallel Program) data TdotP a ::= c1 | c2 | c3 a a (BTree a) (BTree a) encodedotP E yt = [c1 ] encodedotP (B x xt1 xt2 ) E = [c2 ] encodedotP (B x xt1 xt2 ) (B y yt1 yt2 ) = [c3 x y xt1 yt1 ] ++ (encodedotP xt2 yt2 ) V. Kannan and G. W. Hamilton 133 dotP00 (encodedotP xt yt) where dotP00 w = parMapRedr1 g f w where g = (+) f c1 = 0 f c2 = 0 f (c3 x y xt yt) = (x ∗ y) + (dotP xt yt) dotP E yt =0 dotP (B x xt1 xt2 ) E =0 dotP (B x xt1 xt2 ) (B y yt1 yt2 ) = (x ∗ y) + (dotP xt1 yt1 ) + (dotP xt2 yt2 ) Figure 5 presents the speedups of the encoded parallel version compared to the original version. An input size indicated by N denotes the dot-product of two identical balanced binary trees with N nodes each. We observe that the encoded parallel version achieves a positive speedup only upon using more than 4 cores, resulting in a maximum speedup of 2.4x for input size 1,000,000 and 1.4x for input size 100,000,000. For all input sizes, the speedup factor does not improve when using more than 6 cores. Further, we also observe that the speedup achieved scales negatively as the input size increases. The Figure 5: Evaluation of Speedup for Dot-Product of Binary Trees reason for this performance of the encoded parallel version is as follows: From Example 6.4, we observe that each element in the encoded list contains the values at the branch nodes (x and y) and the sub-trees (xt1 and yt1 ), which are arguments of the first recursive call dotP xt1 yt1 in Example 6.2. Consequently, the sizes of the elements in the encoded list progressively decrease from the first to the last element if the input trees are balanced. The encoded list is then split into sub-lists in round-robin fashion by the parMapRedr1 skeleton and each thread in the parallel execution applies the sequential dot-product computation dotP over a sub-list. As a result, the workloads of the parallel threads are not well-balanced and this results in significant idle times for threads that process smaller sub-lists. We also note that, left-skewed input binary trees would result in poorer performance, while right-skewed input binary trees result in better performance of the encoded parallel versions. 7 7.1 Conclusion Summary We have presented a transformation method to efficiently parallelise a given program by automatically identifying parallel skeletons and reducing the number of intermediate data structures used. By encoding the inputs of a program into a single input, we facilitate the identification of parallel skeletons, 134 Program Transformation to Identify List-Based Parallel Skeletons particularly for map- and reduce-based computations. Additionally, we can automatically check skeleton operators for desired properties thereby allowing complete automation of the parallelisation process. Importantly, our transformation does not place any restriction on the programs that can be transformed using our method. To evaluate our transformation method, we presented two interesting benchmark programs whose inputs are encoded into a cons-list. From the results, we observe two possible extreme performances. In one case, linear to super-linear speedups are achieved due to the distillation transformation, which reduces the use of intermediate data structures, as well as our parallelisation transformation. In another case, despite parallelising a program that cannot be defined using existing skeleton implementations in libraries, the positive speedups achieved are limited and not as desired. Despite not being discussed here, by employing additional skeletons such as accumulate [15], we are able to automatically parallelise interesting programs such as maximum prefix sum. The primary challenge lies in the efficient execution of the parallel programs produced that are defined using skeletons. It is important to have efficient implementations of these parallel skeletons that incorporate intelligent data-partitioning and load-balancing methods across the parallel threads created to execute the skeletons. We believe that better load-balancing across threads can be facilitated by polytypic parallel skeletons, list or array data structures that support nested parallelism, or dynamic load-balancing at run-time. 7.2 Related Work Previously, following the seminal works by Cole [5] and Darlington et. al. [6] on skeleton-based program development, a majority of the work that followed [20, 21, 19, 2] catered to manual parallel programming. To address the difficulties in choosing appropriate skeletons for a given algorithm, Hu et. al. proposed the diffusion transformation [13], which is capable of decomposing recursive functions of a certain form into several functions, each of which can be described by a skeleton. Even though diffusion can transform a wider range of functions to the required form, this method is only applicable to functions with one recursive input. Further they proposed the accumulate skeleton [15] that encapsulates the computational forms of map and reduce skeletons that use an accumulating parameter to build the result. However, the associative property of the reduce and scan operators used in the accumulate skeleton have to be verified and their unit values derived manually. The calculational approaches to program parallelisation are based on list-homomorphisms [26] and propose systematic ways to derive parallel programs. However, most methods are restricted to programs that are defined over lists [9, 7, 10, 14]. Further, they require manual derivation of operators or their verification for certain algebraic properties to enable parallel evaluation of the programs obtained. Morihata et. al. [24] extended this approach for trees by decomposing a binary tree into a list of sub-trees called zipper, and defining upward and downward computations on the zipper structure. However, such calculational methods are often limited by the range of programs and data types they can transform. Also, a common aspect of these calculational approaches is the need to manually derive operators that satisfy certain properties, such as associativity to guarantee parallel evaluation. To address this, Chin et. al. [4] proposed a method that systematically derives parallel programs from sequential definitions and automatically creates auxiliary functions that can be used to define associative operators needed for parallel evaluation. However, their method is restricted to a first-order language and applicable to functions defined over a single recursive linear data type, such as lists, that has an associative decomposition operator, such as ++ . As an alternative to calculational approaches, Ahn et. al. [1] proposed an analytical method to trans- V. Kannan and G. W. Hamilton 135 form general recursive functions into a composition of polytypic data parallel skeletons. Even though their method is applicable to a wider range of problems and does not need associative operators, the transformed programs are defined by composing skeletons and employ multiple intermediate data structures. Previously, the authors proposed a method to transform the input of a given program into a cons-list based on the recursive structure of the input [16]. Since this method does not use the recursive structure of the program to build the cons-list, the transformed programs do not lend themselves to be defined using list-based parallel skeletons. This observation led to creating a new encoded data type that matches the algorithmic structure of the program and hence enables identification of polytypic parallel map and reduce skeletons [17]. The new encoded data type is created by pattern-matching and recursively consuming inputs, where a recursive components is created in the new encoded input for each recursive call that occurs in a function body using the input arguments of the recursive call. Consequently, the data structure of the new encoded input reflects the recursive structure of the program. Even though this method leads to better identification of polytypic skeletons, it is not easy to evaluate the performance of the transformed programs defined using these skeletons because existing libraries do not offer implementations of skeletons that are defined over a generic data type. Consequently, the proposed method of encoding the inputs into a list respects the recursive structures of programs and allows evaluation of the transformed programs using existing implementations of list-based parallel skeletons. Acknowledgment This work was supported, in part, by the Science Foundation Ireland grant 10/CE/I1855 to Lero - the Irish Software Research Centre (www.lero.ie). References [1] Joonseon Ahn & Taisook Han (2001): An Analytical Method for Parallelization of Recursive Functions. Parallel Processing Letters, doi:10.1142/S0129626400000330. [2] Manuel M. T. Chakravarty, Gabriele Keller, Sean Lee, Trevor L. McDonell & Vinod Grover (2011): Accelerating Haskell Array Codes with Multicore GPUs. Proceedings of the Sixth ACM Workshop on Declarative Aspects of Multicore Programming, doi:10.1145/1926354.1926358. [3] Manuel M. T. Chakravarty, Roman Leshchinskiy, Simon Peyton Jones, Gabriele Keller & Simon Marlow (2007): Data Parallel Haskell: A Status Report. Proceedings of the 2007 Workshop on Declarative Aspects of Multicore Programming (DAMP), doi:10.1145/1248648.1248652. [4] Wei-Ngan Chin, A. Takano & Zhenjiang Hu (1998): Parallelization via Context Preservation. International Conference on Computer Languages, doi:10.1109/ICCL.1998.674166. [5] Murray Cole (1991): Algorithmic Skeletons: Structured Management of Parallel Computation. MIT Press, Cambridge, MA, USA. [6] John Darlington, A. J. Field, Peter G. Harrison, Paul Kelly, D. W. N. Sharp, Qiang Wu & R. Lyndon While (1993): Parallel Programming Using Skeleton Functions. Lecture Notes in Computer Science, 5th International PARLE Conference on Parallel Architectures and Languages Europe, doi:10.1007/3-540-56891-3 12. [7] Jeremy Gibbons (1996): The Third Homomorphism Theorem. Journal of Functional Programming Vol. 6, No. 3, doi:10.1017/S0956796800001908. [8] Horacio González-Vélez & Mario Leyton (2010): A Survey of Algorithmic Skeleton Frameworks: High-level Structured Parallel Programming Enablers. Software – Practice and Experience, doi:10.1002/spe.v40:12. 136 Program Transformation to Identify List-Based Parallel Skeletons [9] Sergei Gorlatch (1995): Constructing List Homomorphisms for Parallelism. Fakultät für Mathematik und Informatik: MIP. [10] Sergei Gorlatch (1999): Extracting and Implementing List Homomorphisms In Parallel Program Development. Science of Computer Programming, doi:10.1016/S0167-6423(97)00014-2. [11] G. W. Hamilton & Neil D. Jones (2012): Distillation with Labelled Transition Systems. Proceedings of the ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, doi:10.1145/2103746.2103753. [12] Zhenjiang Hu, Masato Takeichi & Wei-Ngan Chin (1998): Parallelization in Calculational Forms. Proceedings of the 25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), doi:10.1145/268946.268972. [13] Zhenjiang Hu, Masato Takeichi & Hideya Iwasaki (1999): Diffusion: Calculating Efficient Parallel Programs. ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM). [14] Zhenjiang Hu, Tetsuo Yokoyama & Masato Takeichi (2005): Program Optimizations and Transformations an Calculation Form. GTTSE, doi:10.1007/11877028 5. [15] Hideya Iwasaki & Zhenjiang Hu (2004): A New Parallel Skeleton for General Accumulative Computations. International Journal of Parallel Programming, Kluwer Academic Publishers, doi:10.1023/B:IJPP.0000038069.80050.74. [16] Venkatesh Kannan & G. W. Hamilton (2014): Extracting Data Parallel Computations from Distilled Programs. Fourth International Valentin Turchin Workshop on Metacomputation (META). [17] Venkatesh Kannan & G. W. Hamilton (2016): Program Transformation To Identify Parallel Skeletons. 24th Euromicro International Conference on Parallel, Distributed, and Network-Based Processing (PDP), doi:10.1109/PDP.2016.32. [18] Rita Loogen (2012): Eden Parallel Functional Programming with Haskell. Lecture Notes in Computer Science, Central European Functional Programming School, Springer Berlin Heidelberg, doi:10.1007/9783-642-32096-5 4. [19] K. Matsuzaki, Z. Hu & M. Takeichi (2006): Parallel Skeletons for Manipulating General Trees. Parallel Computing, doi:10.1016/j.parco.2006.06.002. [20] K. Matsuzaki, H. Iwasaki, K. Emoto & Z. Hu (2006): A Library of Constructive Skeletons for Sequential Style of Parallel Programming. Proceedings of the 1st ACM International Conference on Scalable Information Systems, InfoScale, doi:10.1145/1146847.1146860. [21] K. Matsuzaki, K. Kakehi, H. Iwasaki, Z. Hu & Y. Akashi (2004): Fusion-Embedded Skeleton Library. Euro-Par 2004 Parallel Processing, Lecture Notes in Computer Science, Springer Berlin Heidelberg, doi:10.1007/978-3-540-27866-5 85. [22] Kiminori Matsuzaki, Hideya Iwasaki, Kento Emoto & Zhenjiang Hu (2006): A Library of Constructive Skeletons for Sequential Style of Parallel Programming. Proceedings of the 1st International Conference on Scalable Information Systems, doi:10.1145/1146847.1146860. [23] Trevor L. McDonell, Manuel M.T. Chakravarty, Gabriele Keller & Ben Lippmeier (2013): Optimising Purely Functional GPU Programs. ACM SIGPLAN Notices, doi:10.1145/2500365.2500595. [24] Akimasa Morihata, Kiminori Matsuzaki, Zhenjiang Hu & Masato Takeichi (2009): The Third Homomorphism Theorem on Trees: Downward & Upward Lead to Divide-and-Conquer. POPL, doi:10.1145/1594834.1480905. [25] Alberto Pettorossi & Maurizio Proietti (1996): Rules and Strategies for Transforming Functional and Logic Programs. ACM Computing Surveys, doi:10.1145/234528.234529. [26] D. B. Skillicorn (1993): The Bird-Meertens Formalism as a Parallel Model. Software for Parallel Computation, NATO ASI Series F, Springer-Verlag, doi:10.1007/978-3-642-58049-9 9. [27] D. B. Skillicorn & Domenico D. Talia (1998): Models and Languages for Parallel Computation. ACM Computing Surveys, doi:10.1145/280277.280278.
6cs.PL
Programming Not Only by Example Hila Peleg Sharon Shoham Eran Yahav Technion [email protected] Tel Aviv University [email protected] Technion [email protected] arXiv:1710.01291v1 [cs.PL] 3 Oct 2017 Abstract In recent years, there has been tremendous progress in automated synthesis techniques that are able to automatically generate code based on some intent expressed by the programmer. A major challenge for the adoption of synthesis remains in having the programmer communicate their intent. When the expressed intent is coarsegrained (for example, restriction on the expected type of an expression), the synthesizer often produces a long list of results for the programmer to choose from, shifting the heavy-lifting to the user. An alternative approach, successfully used in end-user synthesis is programming by example (PBE), where the user leverages examples to interactively and iteratively refine the intent. However, using only examples is not expressive enough for programmers, who can observe the generated program and refine the intent by directly relating to parts of the generated program. We present a novel approach to interacting with a synthesizer using a granular interaction model. Our approach employs a rich interaction model where (i) the synthesizer decorates a candidate program with debug information that assists in understanding the program and identifying good or bad parts, and (ii) the user is allowed to provide feedback not only on the expected output of a program, but also on the underlying program itself. That is, when the user identifies a program as (partially) correct or incorrect, they can also explicitly indicate the good or bad parts, to allow the synthesizer to accept or discard parts of the program instead of discarding the program as a whole. We show the value of our approach in a controlled user study. Our study shows that participants have strong preference to using granular feedback instead of examples, and are able to provide granular feedback much faster. 1 Introduction In a development ecosystem where programmers are frequently asked to take on tasks involving unfamiliar APIs and complex data transformations, program synthesis is both a tool to shorten development times and an aid to small tasks of API programming. Synthesis tools for end-users are available for a wide variety of purposes from creating formulae in Microsoft Excel [13] to formulating SQL queries [39]. Tools for expert users who can encode full specifications have also matured enough to be practical [23, 32, 36]. Expressing Intent Despite significant progress in synthesis, expressing the user’s intent remains a major challenge. An expert user can write full specifications and express their intent fully [7, 9, 16– 18, 23, 26, 36–38], but end-users and programmers trying to solve small tasks often use partial specifications. Partial specifications are available in different forms, depending on the synthesizer: source and target types, input-output pairs, tests, and logical specifications. Coarse-grained models such as type-driven synthesis present the user with all possible results that satisfy the coarse-grained criteria (e.g., [12, 15]). This leads to a challenging task: the user must compare a large number of similar programs to select a solution. Expressing Intent with Examples An alternative that has proven itself extremely useful for end-users is to use examples as a way to express intent. Programming by Example (PBE) is a form of program synthesis where the desired behavior is generalized from specific instances of behavior, most often input-output example pairs. This allows an iterative process where, if the synthesized program is not acceptable, additional examples are provided until the target program is reached. This technique is often used either on its own in synthesizers such as [5, 13, 20–22, 24, 39–41] or as a way to refine the results of type-driven synthesis [11, 25]. Insufficiency of Examples for Programmers PBE is geared towards end-users, but is also useful for more advanced users when the behavior is more difficult to describe than its effect. However, in this interaction model, a user can only do one of two things: accept the program after inspection, or reject it with a differentiating example which will rule it out in the next iteration of synthesis. There is wasted knowledge in forcing a programmer to work within this interaction model, as some synthesized programs are not all bad they may have a part of the program that is overfitted to the examples, while another will be on the right track. Allowing only a full accept or full reject ignores the ability of a programmer to read and understand the program, and to express a more directed, granular feedback, deeming parts of it as desirable or undesirable, rather than the program as a whole. In fact, we hypothesize that, in some cases, it is easier for a programmer to explicitly indicate what is good or bad in a candidate program, instead of implicitly trying to express this information through input-output examples. Moreover, we prove that it is sometimes impossible to express such information through examples. Programming Not Only by Example Motivated by the insufficiency of examples, we present a new, granular interaction model that allows a programmer to interact with the synthesizer not only by example but also provide feedback on parts of the synthesized program. Our interaction model is granular in both directions, from the programmer to the synthesizer, and back: Synthesizer → Programmer: A candidate program is presented together with debug information, showing execution values at different program points. This helps the programmer understand whether the candidate program behaves as expected at intermediate states, instead of relying only on its final output. Programmer → Synthesizer: A programmer can provide: (i) inputoutput examples (as in PBE), and (ii) granular feedback on the candidate program by explicitly accepting/rejecting parts of its code. We tested the granular interaction model by a controlled userstudy with 32 developers from both academia and industry. To conduct this study, we developed a synthesizer that interacts with the user in three different ways: holistic (PBE), granular, or both. September, 2017 Our synthesizer also measures interaction times, and records the user-interaction so we can later analyze it. Our implementation synthesizes functional programs in Scala. Scala is a popular functional and object-oriented programming language, used in many big-data processing frameworks (e.g., Spark, Akka). Functional compositions are considered “the Scala way” to approach coding tasks, and so we aim to synthesize them. Advantages of granular interaction The user study strongly supports the hypothesis that it is beneficial to let programmers communicate their understanding of the program explicitly to the synthesizer (by marking parts of it as desirable or undesirable) rather than implicitly (through examples). Several participants in our user study, faced with the inability to rule out an undesired operation in the program using only examples, expressed extreme frustration. As we show in our user-study, this is more common than one would imagine, due to the introduction of redundant or superfluous operations by the synthesizer. As a result, an undesirable operation may be part of several candidate programs along the process, but the holistic PBE model does not allow ruling it out. Our study shows that our granular interaction model (GIM) is easier to use, as supported by: (i) a strong preference of participants for granular feedback over examples, and (ii) a significantly shorter iteration time when using granular feedback. It is important to note that granular feedback does not completely replace examples. Participants that were restricted to granular feedback were sometimes forced to use a larger number of iterations, and were more prone to error when accepting the program. We therefore conclude that future synthesizers should integrate both interaction models. Main Contributions The contributions of this paper are: • A synthesis framework for programmers with a granular interaction model (GIM), which allows the user to approve or disapprove of specific parts of the code of the candidate program, rather than just respond to it as a whole; and allows a synthesizer to present candidate programs with debug information. • A theoretical result that shows that examples are sometimes insufficient for reaching the desired program. We further show that this insufficiency occurs in practice throughout real PBE sessions. • A controlled user study showing that programmers have strong preference for granular feedback instead of examples, and are able to provide granular feedback much faster. Outline Section 4 shows why examples are not only inconvenient but insufficient to communicate the intent of the programmer. To allow more expressive power, we introduce three additional granular operations in Section 5. Our full interaction model consists of the granular operations as well as examples. In addition, we also introduce debug information for every example provided by the user in Section 5.2. In Section 6 we detail our experiments on the number of iterations necessary to solve a set of benchmarks with different interaction models. We also detail a controlled user study of 32 programmers from academia and industry. The study shows an advantage of granular predicates over examples in both iteration time and preference, and we discuss the need for both the granular predicates and examples in order to help the user reach the (correct) target program. Hila Peleg, Sharon Shoham, and Eran Yahav Task: find the most frequent bigram in a string Initial example (σ0 ) "abdfibfcfdebdfdebdihgfkjfdebd"7→"bd" Question q 1 1 2 input .takeRight(2) Problem: takeRight will just take the right of a given string Idea: the frequent bigram needs to be placed in the middle Answer σ1 "cababc"7→"ab" Question q2 1 2 3 input .drop(1) .take(2) Problem: this program crops a given input at a constant position Idea: vary the position of the frequent bigram between examples Answer σ2 "bcaaab"7→"aa" 1 Question q3 2 3 4 5 input .zip(input.tail) .drop(1) .map(p => p._1.toString + p._2) .min Problem: in all examples the output is the lexicographical minimum of all bigrams in the string (e.g., "aa" < "bc", "aa" < ca", "aa" < "ab") Idea: have a frequent bigram that is large in lexicographic order Answer σ3 "xyzzzy"7→"zz" Table 1: The difficulty of finding a differentiating example. 2 Overview In this section we provide an overview of our Granular Interaction Model (GIM) for synthesis on a simple example. We start by showing the interaction model of Programming by Example (PBE) and its shortcomings, and then describe how GIM overcomes these shortcomings by using a richer interaction model. Motivating example Consider the task of writing a program that finds the most frequent character-bigram in a string. Assume that the program is constructed by combining operations from a predefined set of operations we refer to as the vocabulary V. For now, assume that the vocabulary contains standard operations on strings, characters, and lists. In addition, assume that you provide an initial partial specification in the form of an input-output example: σ0 = "abdfibfcfdebdfdebdihgfkjfdebd" 7→ "bd". In this example, the bigram “bd” is the most frequent (appears 4 times), and is thus the expected output of the synthesized program. 2.1 Interaction with a classical PBE synthesizer Table 1 shows the interaction of a programmer with a PBE synthesizer to complete our task. The synthesizer poses a question to the programmer: a candidate program that is consistent with all examples. The programmer provides an answer in the form of an accept, or additional input-output examples to refine the result. Based on the initial example, the synthesizer offers the candidate program q 1 , which consists of a single method from the vocabulary – takeRight(2), which returns the 2 rightmost characters – applied to the input. The programmer then responds by providing the example σ1 which is inconsistent with the candidate program, and therefore differentiates it from the target program. At this point, the synthesizer offers a new candidate program q 2 that is consistent with both σ0 and σ1 . The interaction proceeds in a similar manner. Each additional example may reduce the number of candidate programs (as they are Programming Not Only by Example September, 2017 Task: find the most frequent bigram in a string Initial "abdfibfcfdebdfdebdihgfkjfdebd"7→"bd" specifications Question 1 input//"abdfibfcfdebdfdebdihgfkjfdebd" 2 .takeRight(2)//bd q1 Problem: takeRight will just take the right of a given string Idea: takeRight will never be useful since we always want to consider every element. Remove takeRight from the result program. Answer Remove(takeRight(2)) Question q2 1 2 3 programs by debug information that assists the programmer in understanding the programs, and identifying good and bad parts in them. On the other hand, the user is not restricted to providing semantic input-output examples, but can also mark parts of the program code itself as parts that must or must not appear in any future candidate program. This allows the user to provide explicit, syntactic, feedback on the program code, which is more expressive, and in some cases allows the synthesizer to more aggressively prune the search space. The GIM interaction model for the same task of finding the most frequent bigram is demonstrated in Table 2. Question 1 is as before: the synthesizer produces the candidate program input.takeRight(2). In contrast to classical PBE, the granular interaction model provides additional debug information to the user, showing intermediate values of the program on the examples. This is shown as comments next to the lines of the synthesized program. For q 1 , this is just the input and output values of the initial example. In the next steps this information would be far more valuable. Given q 1 , the programmer responds by providing granular feedback. Using GIM it is possible to narrow the space of programs using syntactic operations. Presented with input.takeRight(2), the user can exclude a sequence of operations from the vocabulary, in this instance takeRight(2), ruling out any program where takeRight(2) appears. This also significantly reduces the space of candidate programs considered by the synthesizer. The synthesizer responds with q 2 . Note that in such cases the debug information assists the programmer in understanding the program, determining whether it is correct, or, as in this case, identifying why it is incorrect. To rule out q 2 , the user rules out the sequence drop(1).take(2), as the debug information shows the effect (“take the second and third character of the string”), and the user deems it undesirable at any point in the computation to truncate the string, as all characters should be considered. The synthesizer responds with q 3 . This candidate program contains something the programmer would like to preserve: using the debug information, they can see that the prefix input.zip(input.tail) creates all bigrams in the string. The user can mark this prefix to affix, or to make sure all candidate programs displayed from now on begin with this prefix. This removes all programs that start with any other function in V, effectively slicing the size of the search space by |V |. Another option available to the user (multiple operations stemming from the same program are not only allowed but encouraged) is to exclude take(2) since the resulting truncation of the list is undesirable. Eventually, the synthesizer produces the following program: input //"abdfibfcfdebdfdebdihgfkjfdebd" .drop(1)//"bdfibfcfdebdfdebdihgfkjfdebd" .take(2) //"bd" Problem: this program crops a given input at a constant position Idea: we don’t want to crop anything out, so these functions have no place in the result program. Answer Remove(drop(1).take(2)) 1 Question q3 2 3 4 5 input //"abdfibfcfdebdfdebdihgfkjfdebd" .zip(input.tail) //List((a,b),(b,d),(d,f),... .take(2) //List((a,b),(b,d)) .map(p => p._1.toString + p._2) //List("ab","bd") .max //"bd" Problem: while the beginning of this program is actually good (dividing the program into bigrams) and so is the mapping of a 2-tuple to a string, take(2) truncates the bigram list. Idea: preserve what is good in the program and remove take(2) on its own and not just as part of a sequence. Affix(zip(input.tail)) Remove(take(2)) Answer Retain(map(p => p._1.toString + p._2)) Table 2: Providing granular, syntactic feedback. required to satisfy all examples). With a careful choice of examples by the user, the process terminates after a total of 4 examples. Finding differentiating examples may be hard Consider the candidate program q 3 . To make progress, the user has to provide an example that differentiates q 3 from the behavior of the desired program. To find a differentiating example, the user must (i) understand the program q 3 and why it is wrong, and (ii) provide input-output examples that overrule q 3 , and preferably also similar programs. By examining the code of q 3 , it is easy to see that min is a problem: calculating a minimum should not be part of finding a most frequent bigram. Even after the programmer understands the problem, they still need to find a differentiating example that rules out q 3 . Because the use of min in q 3 is a minimum over a list of the bigrams in the input, the programmer comes up with an example where the desired bigram is the largest one (lexicographically), as in σ3 . In this interaction, the programmer had to express the explicit knowledge (“do not use min”) implicitly through examples. Coming up with examples that avoid min requires deep understanding of the program, which is then only leveraged implicitly (through examples). Even then, there is no guarantee min will not recur – as we will show in Section 4, it is impossible to completely remove it in this model. In this case, since the programmer already knows that they want to avoid programs using min, it is beneficial to let them communicate this information explicitly to the synthesizer. 2.2 Interaction through a granular interaction model GIM improves PBE by employing a richer, granular interaction model. On the one hand, the synthesizer supplements the candidate 1 2 3 4 5 6 7 input//"abdfibfcfdebdfdebdihgfkjfdebd" .zip(input.tail)//List((a,b),(b,d),(d,f),(f,i),(i,b),(b,f),...) .map(p => p._1.toString + p._2)//List("ab","bd","df","fi","ib",...) .groupBy(x => x)//Map("bf"->List("bf"),"ib"->List("ib"),...) .map(kv => kv._1 -> kv._2.length)//Map("bf"->1,"ib"->1,"gf"->1,...) .maxBy(_._2)//("bd",4) ._1//"bd" which does not discard any bigram, counts the number of occurrences, and retrieves the maximum. This program is accepted. Below we summarize the key aspects of GIM, as demonstrated by the above example. Key Aspects September, 2017 • Interaction Model: granular interaction in both directions: the synthesizer provides debug information on intermediate states of the program, the programmer can provide feedback (keep/discard) on parts of the program, in addition to inputoutput examples. • Assisting the User: our approach assists the user in two ways. First, the synthesizer supplements candidate programs with debug information that helps the programmer understand the good and bad parts of a candidate program. Second, the ability to give explicit feedback on the code itself provides an alternative (and complementary) way to interact with the system without crafting potentially complicated differentiating examples. • Insufficiency of Examples: examples are both inconvenient and insufficient to communicate a programmer’s intent. Other operations are needed to allow a programmer to filter programs not only according to semantic equivalence but also according to additional criteria such as readability, best practices and performance. 3 Background In this work we address synthesis of functional programs. Below we provide the necessary background. Notation of functions We interchangeably use the mathematical notation h(д(f (x))) for the functional composition called on object x and the Scala notation x .f .д.h (in Scala, a function application with no arguments does not require parentheses). For a functional program m, we denote nmo as the function that the program computes. Formally, nmo : D → D ∪ {⊥} maps every element i in the domain, D, either to the element in D that the program outputs on i, or to an error (compilation or runtime) ⊥ < D. Vocabulary and the candidate program space The candidate program space consists of programs of the form input.f1 .. . . .fn−1 .fn (in Scala notation), or fn (fn−1 (. . . f 1 (input) . . . )) (in mathematical notation), where each fi is a method from a predefined vocabulary V. Object methods that accept arguments are handled by partially applying them with predefined arguments, such as constants, lambda functions or variables in the context, leaving only the self reference as an argument. Generally, the candidate program space includes every program in V ∗ , but we notice that for some programs there are compilation errors as not all f ∈ V is applicable to all objects. Programming by Example (PBE) Programming by Example is a sub-class of program synthesis where all communication with the synthesizer is done using examples. The classic PBE problem is defined as a pair (E, L) of initial examples E and target language L, where each example in E is a pair (i, o) of input i ∈ D and expected output o ∈ D. The result of the PBE problem (E, L) is a program m, which is a valid program in L, that satisfies every example in E, i.e., nmo(i) = o for every (i, o) ∈ E. Since there might be more than one program m in the language L that matches all specifications, the iterative PBE problem was introduced. In the iterative model, each candidate program mi is presented to the user, which may then accept mi and terminate the run, or answer the synthesizer with additional examples Ei which direct it in continuing the search. Hila Peleg, Sharon Shoham, and Eran Yahav 4 The Insufficiency of Examples In this section, we show the importance of extending the user’s answer model beyond input-output examples. We examine in more formal details the scenario described in Section 2.1, where the user has seen an undesirable program component and would like to exclude it specifically. We will show that this is not always possible, i.e., that examples are insufficient to communicate the user’s intent. As seen in Section 2.1, the user wishes to rule out the function min, but simply providing an example to rule out the current program might not be enough to remove min from all candidates to ensure it never recurs. We now formally prove it is impossible to completely remove methods like min from the search space using examples. We recall the definition of equivalence between programs. Programs m 1 and m 2 are equivalent if nm 1 o = nm 2 o. Using this we prove the following claim: C LAIM 4.1. Let v ∈ V be a letter such that there exists a program m that is equivalent to m∗ and contains v. Then examples alone cannot rule out the letter v ∈ V from candidate programs. The proof follows since examples can only distinguish between programs that compute different functions. Next we show that Claim 4.1 is applicable to methods that are prevalent in programming languages and extremely useful in some contexts, and therefore are likely to find their way into the vocabularies used in synthesis. We consider two classes of methods: invertible methods and nullipotent methods. Invertible methods are methods for which there exists an inverse method such that applying the two in a pair (in some order) leads back to the initial input. For instance, reverse on a list or iterator is invertible and its own inverse, as in.reverse.reverse will be identical to in, i.e. reverse is its own inverse method. Another example includes zipWithIndex and map(_._1), which cancel each other out. An invertible method can always be added to the target program along with its inverse, resulting in an equivalent program. Hence, it will never be ruled out by examples. Nullipotent methods are methods that, when applied, lead to the same result as not being applied. While this is often context-sensitive, e.g. calling toList on a list or mkString on a string, there are calls that will always be nullipotent, such as takeWhile(true). Because some methods are nullipotent only in a certain context, they may be in a synthesizer’s vocabulary, and end up in the program space in contexts where they are nullipotent. It is easy to construct a program that contains nullipotent methods and is equivalent to the target program. Hence, similarly to invertible methods, these methods cannot be eliminated by examples. Returning to our example, for the target program in Section 2, input.zip(input.tail).map(p => p._1.toString + p._2).groupBy(x => x).map(kv => kv._1 -> kv._2.length).maxBy(_._2)._1, let us now construct an equivalent program by appending to it an invertible pair of functions in sequence: sliding(2).min. The function sliding(2), when applied to a string of length 2 will return List("dc"), and min when applied to list of size 1 will return the only member of the list. This means there is a program that is equivalent to m ∗ on every input, and contains min. As such, given any number of examples applied min, a letter from V, will not be ruled out entirely. Programming Not Only by Example September, 2017 This construction is possible for many target programs, showing that it is often impossible to discard an undesirable member of the alphabet or an undesired sequence using examples alone. Furthermore, since many existing PBE synthesizers prune very aggressively based on observational equivalence, or equivalence based only on the given examples, programs that do not include the undesired component may not be available anymore as they’ve been removed from the space. These properties leave us with the need to define a more expressive, more granular model. The practical implications of claim 4.1 are discussed in section 6.4, which examines the existence of method sequences deemed undesirable by users in candidate programs. The data as well as opinions collected from users show that the inability to remove an undesirable letter from the alphabet has real-world consequences, which affect the user’s frustration with the synthesizer (see table 6). 5 However, since the retain is not dependent on the location of the procedure in the program, we add an additional predicate for not only setting a procedure, but forcing its location to the beginning of the program. The affix predicate will essentially narrow the search space to sub-programs that come after the desired prefix. Additional predicates As these three operations are highly expressive and easy to understand, we have centered the experiments in this paper around them, but they are, by no means, the only possible predicates. Many other granular operations exist. For instance, the user can reason about intermediate states of the program by demanding or excluding certain intermediate states for a given input. A user can also require an error, or an error of a certain kind, for a given input. Section 5.4 will expand on the reasons to select certain expansions to the interaction model over others. 5.2 GIM assumes an interaction with users that are comfortable with reading code. This means not only that more can be expected from them, but that they can be assisted in ways not generally offered by a regular synthesizer. In the same way the interaction from the user to the synthesizer can be granulated, so can the interaction from the synthesizer to the user. PBE tools like FlashFill only show the user the output of running the program on an input. Other tools that do show code show the program while guaranteeing it satisfies all examples in E. In a functional concatenation, it is possible to show the user the result of each subprogram, on each e ∈ E. This means that even if some f ∈ V is not familiar to the user, they can still gauge its effect and determine whether or not that effect is desired by example. The Granular Interaction Model In this section, we describe the Granular Interaction Model (GIM) mechanism, which extends the PBE model with additional predicates. Namely, predicates in GIM include examples, but also additional predicates. The key idea is to add a broader form of feedback from the user to the synthesizer than has been available in PBE. We begin by describing the operations and the type of feedback that each one of them allows the user to provide the synthesizer with, and discuss the observed uses of each. 5.1 Granular predicates In the setting of functional compositions, we choose to present GIM with three syntactic predicates. We refer to these predicates as granular since they impose constraints on parts of the program, rather than on its full behavior, as captured by the function it computes or its input and output types. We will also discuss other, possible predicates. Given a candidate program m = fn (fn−1 (. . . input . . . )) we introduce the following predicates, to be tested against other programs 0 (. . . input . . . )) m 0 = fm0 (fm−1 (1) remove(fi , . . . , f j ) where i ≤ j: will hold only for programs 0 m 0 where ¬∃k.fk0 = fi ∧ · · · ∧ fk+i−j = fj (2) retain(fi , . . . , f j ) where i ≤ j: will hold only for programs m 0 where ∃k.fk0 = fi ∧ · · · ∧ fk0+i−j = f j (3) affix(f 0 , . . . , fi ): will hold only for programs m 0 where ∀j ≤ i.f j = f j0 . The remove operation rules out a sequence of one or more method calls as undesirable. For the example in Section 2, to rule out min the user would simply add the predicate remove(min). However, should the user rule out a sequence longer than a single method, this would apply to the sequence as a whole: the predicate remove(reverse, reverse) does not exclude the reverse method, only two consecutive invocations of it that cancel out. The retain operation defines a sequence that must appear in the target program. It is similarly defined for sequences: when applied to a single method, it forces the method, and when applied to a sequence it forces the sequence, in-order. It can be seen, essentially, as creating a procedure and then deeming that procedure as desirable. Adding a debugging view of the code E XAMPLE 1. Let us consider the case where input is a list of strings, and the user is presented with the candidate program input.sliding(3).map(l => l.mkString). While they are familiar with the mkString method, which formats a list into a string, and with mapping a list, they have never encountered sliding. The user could look up the method and read up on its behavior. However, oftentimes its behavior will be simple enough to understand by its operation within the program. Therefore, if the user is provided with the intermediate states of the program like so: 1 2 3 input //List("aa","bb","cc","dd","ee") .sliding(3)//List(List("aa", "bb", "cc"),List("bb", "cc", "dd"),...) .map(s => s.mkString) //List("aabbcc","bbccdd","ccddee") they can understand that sliding returns a list of sublists of length n beginning at each position in the list – a sliding window of size n. 5.3 Enabling the User After we have introduced the formal framework for predicates, we now wish to leverage it to create a user interaction model. We suggest the following iterative process, which we have implemented for the user study in section 6.3. A candidate program is displayed to the user alongside the debug information. The top image in fig. 1 shows this in our UI. The user is now able to study the program and accept or reject it. If the user is dissatisfied with the program, and would like to reject it, the goal is to allow them to directly express the source of dissatisfaction as predicates as easily as possible. Towards this end, we let the user point out a portion of the program (e.g. by September, 2017 Hila Peleg, Sharon Shoham, and Eran Yahav (2) Syntax: testing the new operation set proposed in Section 5, the user can communicate with the synthesizer via syntactic predicates on the program. (3) GIM: testing the full model, the user can communicate via both sets of predicates. Figure 1: Program with debug information, a sequence selected for removal right-clicking it) and mark it as desirable or undesirable, as seen in the bottom image in fig. 1. This process of easily providing feedback on the program turns predicates into a convenient tool for feedback to the synthesizer. 5.4 Enabling the synthesizer As we have seen, the choice of predicates is crucial from the user’s perspective. However, it is also important for the synthesizer to be able to use them in maintaining and updating a representation of the search space. To complete this section, we show how the predicates described in section 5.1 are naturally utilized by a synthesizer for the domain of linear functional concatenations. Enumerating synthesizer The state of the art in program synthesis hinges on enumerating the program space in a bottom-up fashion [3, 4, 11]. For the domain considered in this paper, bottom-up enumeration consists of concatenating method calls to prefixes already enumerated, starting with the program of length 0, input. This enumeration is restricted by types, i.e. by compilation. The search space in this synthesizer can be represented as an edge-labeled tree where the root is the program input and each edge is labeled by a method name from V. Each finite-length path in the tree represents the program that is the concatenation of every label along the path. The tree is initially pruned by compilation errors (i.e., if f ∈ V does not exist for the return type of m, it will be pruned from the children of the node representing m). It now represents the candidate program space for an unconstrained synthesizer state. We can see that every program deemed undesirable by the operations affix and remove cannot be extended into a desirable program. Therefore these extensions can be discarded and the tree representing the candidate space can be pruned at the nodes of these programs. This is an example of predicates that are well suited to the representation of the state of the synthesizer, in that they not only aid the user but also help guide the search of the space. Since the combination of the enumeration and these predicates is monotone, a program that was pruned from the search space will never need to be looked at in a future, more constrained iteration. This means that the synthesizer does not need to be restarted across iterations – however, even if it is, these predicates will allow it to construct a much smaller search space to begin with. 6 Evaluation To evaluate our approach, we compared three interaction models: (1) PBE: replicating the state of the art in synthesis, the user can communicate with the synthesizer via input-output pairs. We limit the test of the granular interaction model to three operations that are relevant to functional compositions and are easy to understand. Therefore, we select the operations detailed in section 5.1 as our basic set of granular operations. We have conducted two studies: (1) A study of ideal sessions with different operations (i.e., families of predicates) for a set of benchmarks. (2) A controlled user study which tests the usability of a GIM synthesizer for programmers and the benefits when measured against a control group using PBE. Synthesizer We implemented a simple enumerating synthesizer described in section 5.4 in Scala, using the nsc interpreter (used to implement the Scala REPL). The vocabulary V is provided to the algorithm, and programs are compiled and evaluated on the inputs. In order to support the study in section 6.2, the synthesizer accepts input of additional examples, rejection of the current program, or of affix, remove and retain predicates. In order to support the user study in section 6.3, it also precomputes the space of valid programs. 6.1 Problem set We performed the studies using a set of functional programming exercises from three different domains: strings, lists and streams. The exercises were collected from Scala tutorial sites and examples for using MapReduce. The tasks, described in Tab. 3, were each paired with a vocabulary and an initial set of examples. Discussion As seen in Tab. 3, the set of valid programs is signifi∗ cantly smaller than |V | |m | , but in many cases the space still contains thousands or tens of thousands of programs. There is also fair amount of inherent ambiguity over the initial example set Einit , as can be seen in the “reject only” column, representing the set of all programs up to length |m ∗ | that match Einit . This means that, even limiting the search space to the known length of the target program we would start with hundreds or thousands of matching programs that need to be filtered by the user. 6.2 Ideal synthesis sessions Experimental questions For each task in the problem set we answer the following question: under the ideal conditions of an expert user and knowledge of the target program, how many questions (i.e. candidate programs) are posed to the user for each predicate family? Test setup In order to test these questions, each task in the problem set was run in four settings: • Reject only: no operations other than rejecting the current example. This is an enumeration of the programs that match the initial example set. • PBE, Syntax, and GIM: as described above, all with the addition of a reject operation. Examples and other predicates were selected by an expert user (author of this paper) making an effort to create a run with fewer iterations and more aggressive pruning of the space in each iteration. streams lists strings Programming Not Only by Example Benchmark dropnthletter freqbigram frequword linesinfile nonemptylines anagrams histogram median posinlist sudokusquare sumsquares bitstream numhashtags slidingavg Drop every 5th letter in a string Most frequent bigram in a string Most frequent word in a string Number of lines in file Number of non-empty lines in file Group words that are anagrams Create a histogram of number list Find the median of a list of numbers Get all positive numbers from list Validate a square in sudoku Sum of squares of a list of numbers Next integer from a stream of bits Count hashtags in a stream of tweets Average next three values from every index September, 2017 |V | 20 19 25 20 21 17 12 20 20 17 20 17 15 25 | Eini t | 1 1 1 1 1 1 1 1 1 1 1 2 1 1 |m ∗ | 3 6 4 2 3 6 5 4 2 5 2 4 7 4 candidate space size 280 118261 4853 47 1664 13554 4208 71211 190 1602 120 3717 11527 60479 Number of Candidates reject only PBE Syntax GIM 4 2 3 2 (1) 674 4 8 6 (0) 126 5 8 6 (1) 4 3 4 3 (1) 29 2 3 3 (1) 12 3 3 3 (0) 37 3 9 3 (1) 1663 6 14 9 (1) 17 3 4 4 (1) 118 3 7 4 (0) 2 2 2 2 (0) 101 2 8 5 (1) 2 2 2 2 (0) 125 2 2 2 (0) Table 3: The test setup of 14 synthesis experiments, showing the ambiguity inherent in Eini t , and the number of iterations to the target program in an ideal synthesis session with each available set of operations. Parentheses indicate examples used. Results Tab. 3 shows the results for each of the programming tasks. As can be seen from the table, in ideal (i.e. thoroughly optimized, expert user) runs, the number of questions produced by the synthesizer for a PBE run was lowest. This was not unexpected: carefully selected examples are a fast way to differentiate between programs. The subject of examples selected in less ideal conditions is left to the following section. But we also see that in a run allowing all predicates the number of questions asked was lowered substantially compared to syntax only, without involving more than one example. 6.3 User study To test the interaction between programmer and synthesizer, we conducted a user study, where we compared the interaction of programmers with the synthesizer using the three families of operations: PBE (control), Syntax, and GIM. Research questions We examine the following questions: (1) Are answers consisting of syntactic predicates easier or faster to generate than example predicates? This question is examined in two different ways: first, for each task the average and median iteration times with the synthesizer are compared between the control group (PBE) and the Syntax group. Second, when users are allowed both (GIM), the time spent on iterations where they provided examples is measured against their average time. (2) Is the total time to solution improved by adding or exchanging the available predicates? (3) Are users able to reach a correct program using each of the predicate sets? (4) Do users prefer examples? This question examines the choices made by the participants in the GIM group, which had a choice between all possible predicates. We test how often examples were chosen, and whether the task being solved had an effect on this preference. (5) Are users in PBE sessions distracted by undesirable sequences that cannot be removed? We check the recurrence in the PBE group of sequences that were deemed undesirable by users in the Syntax and GIM groups, and try to determine whether these repeat enough to distract the user. We also check for the acceptance of equivalent programs with superfluous elements as mentioned in claim 4.1. In addition, we bring some anecdotal opinions volunteered by participants. Most questions are examined on all participants. We show data for the small set of users experienced in Scala against those new to Scala when the difference is of interest. Test setup 32 developers participated in the study. They consist of 7 undergraduates in their final year of a CS degree, 9 graduate students in CS, most with a history as developers outside academia, and 16 industry developers employed by four different companies. Of the 32, 8 had prior experience with the Scala programming language. The participants in the study were evenly distributed between three test groups: PBE, Syntax and GIM. Each participant was randomly assigned to one of the test groups. Not all participants performed all tasks (scheduling constraints were cited for the most part). The order of the tasks was randomized for each user. The reject operation was not allowed in any group, forcing users to provide the process with new information as they would in any state of the art synthesizer, rather than just iterate the program space. Each participant was asked to use the synthesizer to solve three programming questions. The three problems—frequword, nonemptylines, and histogram—were selected from the tasks tested in section 6.2 because of their high level of ambiguity based on the initial example, and not requiring any additional libraries or definitions outside the Scala standard library to solve (i.e., the programs could be run in a Scala console with no imports or definitions). Participants were given a short introduction to Scala, if they were not already familiar with it, and aided themselves with a Scala REPL, but no online sources or documentation. Implementation Participants performed the tasks using the UI shown in fig. 1. The space of programs was precomputed by the enumerating synthesizer detailed in section 6.1 and over the same initial inputs, up to a program length of 6. In each iteration a program that uphold every predicate given by the user was selected from the set of programs. Selection used a hash-based criterion to prevent lexicographical ordering and favoring of short programs, in order to also show the user complex programs. At the end of every iteration the user’s answers are added to the synthesizer’s state and the programs are filtered accordingly. If the precomputed set is exhausted, the user is given the option of starting over or abandoning the current task. 6.4 User study results We address each question individually. September, 2017 number of correct iterations target equiv. avg med finished answer answer 2.45 2.0 11 1 10 12.11 8.0 9 3 4 8.90 7.5 10 5 4 2.73 2.0 11 0 8 10.50 9.5 7 3 1 8.82 8.0 9 4 3 4.45 4.0 10 9 0 22.10 15.0 8 7 0 8.82 8.0 10 8 0 Question 1: The average and median times per iteration are shown in table 4. Medians are also shown in Fig. 2. We examined the distributions of data using the Mann-Whitney test. The threshold for statistical significance selected was p < 0.05. A significant difference was found in the time per iteration between the control (PBE) group and the syntax-only group for all tests: histogram (131.97s, 59.97s, p=0.03), nonemptylines (168.17s, 60.56s, p = 0.03) and frequword (71.27s, 50.34s, p = 0.04). A significant difference was found between the control group and the GIM group for two of the three tests: histogram (131.97s, 96.18s, p = 0.03), nonemptylines (168.17s, 65.78 s, p =0.03), but not for frequword (71.27s, 53.84s, p=0.058). Additionally, a significant difference was found between the syntax-only group and the GIM group for one test: histogram (59.97s, 96.18s, p=0.047), but not for nonemptylines (60.56s, 65.78s, p=0.33) or frequword (50.34s, 53.84s,p=0.19). These results imply that, with the exception of the frequword test for the GIM group, using either a syntax-only or both syntax and example predicates, there is a speedup in iteration time from solving the same problem in PBE alone. Additionally, with the exception of the histogram task, the slowdown in iteration time between syntax-only and GIM seems to be coincidental. In addition, we looked only at the session for users in the GIM group and within each session examined the time to create an example against the average iteration time. There is a slowdown of 19.5% in iteration time with an example, and we see that this difference is statistically significant (75.03s, 90.11s, p=0.049). We can therefore answer question 1 in the affirmative on both counts: syntactic predicates are faster to generate than examples, both when examining the test groups against the PBE group, and when examining the users with access to both against themselves. Question 2: We noticed a change in the median total time between the control (PBE) and the other groups (Syntax and GIM) indicating a possible slowdown. However, for none of the individual tests, as well as for a unification of all tests, was this change statistically significant (p > 0.25 for all). Therefore, while we do not answer question 2 in the affirmative – as the total time was not improved in either of the test groups – we can also say that the evidence of a slowdown may be coincidental. Question 3: The correctness results in table 4 are visualized in Fig. 4. Aside from the histogram task, completed by all users, all other tasks had some users stopping without accepting a program. The success percentage in reaching any functionally-correct response, is highest for PBE (100%, 73%, 90%), lowest for Syntax (78%, 57%, 87%), and users familiar with Scala users unfamiliar with Scala sessions no. of used task sessions examples histogram 10 9 nonemptylines 11 8 frequword 11 10 histogram 2 2 nonemptylines 2 2 frequword 2 2 histogram 8 7 nonemptylines 9 6 frequword 9 8 percent examples per user avg med min max 37.6% 35.0% 0.0% 85.7% 29.7% 31.0% 0.0% 66.7% 36.1% 37.5% 0.0% 85.7% 74.1% 74.1% 62.5% 85.7% 46.7% 46.7% 33.3% 60.0% 29.9% 29.9% 22.2% 37.5% 28.5% 17.7% 0.0% 66.7% 25.9% 30.0% 0.0% 66.7% 37.5% 37.5% 0.0% 85.7% Table 5: Proportional part (%) of examples in the predicates provided by GIM group users. Some used no examples at all, none used only examples. num of lines Table 4: Summary of the three tasks performed in the user study (all users). all users most frequent word iteration time (sec) avg med 163.34 131.97 86.27 59.97 98.78 96.18 170.13 168.17 82.16 60.56 78.26 65.78 114.52 71.27 58.28 50.34 79.87 53.84 histogram no. of task group sessions PBE 11 histogram Syntax 9 GIM 10 PBE 11 no. lines 8 with text Syntax GIM 11 most PBE 11 frequent Syntax 10 word GIM 11 Hila Peleg, Sharon Shoham, and Eran Yahav GIM/Syntax users saw removed sequence and removed tail 84.2% (16) takeWhile(c => c != "\n") 73.7% (14) filterNot(c => c==’\r’ || c==’\n’) 57.9% (11) filter(!_.isEmpty) 27.3% (3) tail.takeWhile(c => c != "\n") 15.8% (3) takeRight(1) 100.0% (12) drop(10) 84.6% (11) drop(1) 76.5% (13) takeRight(6) 76.2% (16) dropRight(1) 71.4% (15) take(5) 57.1% (12) last 42.9% (6) drop(10).drop(1) 41.7% (5) takeRight(6).takeRight(6) 38.1% (8) toMap map(_._1 -> 1) zipWithIndex map(_._1.toInt) 57.9% (11) 42.1% (8) 26.3% (5) 15.8% (3) PBE times seen distracting in session occurrences users min max (average) distracted 1 4 2.8 45.5% (5) 1 4 2.7 54.5% (6) 0 3 2.3 27.3% (3) 0 3 2.3 27.3% (3) 1 4 2.8 45.5% (5) 0 1 0 0.0% (0) 0 1 0 0.0% (0) 0 3 2.5 16.7% (2) 1 3 2.4 58.3% (7) 0 7 3.3 33.3% (4) 1 5 2.8 66.7% (8) 0 3 3 16.7% (2) 0 1 0 0.0% (0) 1 2 2 8.3% (1) 1 1 1 1 1 1 1 1 0 0 0 0 0.0% (0) 0.0% (0) 0.0% (0) 0.0% (0) Table 6: Frequently-removed method sequences in the Syntax and GIM groups and their occurrence in the PBE group. rebounds with GIM (90%, 77%, 80%) to levels close to the control, even overtaking it for the nonemptylines task. Question 4: A summary of how often users chose examples appears in table 5 and fig. 3. We can see a distinction between users familiar with Scala and users who are not. While users familiar with Scala used examples in every task, for users unfamiliar with Scala every task included at least one user avoiding examples– sometimes as many as 1/3 of the users. The proportional part of examples out of the total predicates used in the task is fairly low for the entire test group, ranging from 31% to 37.5% (median). Looking at the data by familiarity with Scala we see that the preference for examples is inverse between the two groups: users familiar with Scala preferred more examples overwhelmingly (over 60% examples for both users) for the histogram task and preferred other predicates for the frequword (most frequent word) task. Conversely, users unfamiliar with Scala preferred examples (but not as overwhelmingly, half the participants over 30%) for the frequword task and favored other predicates (half the participants under 20% examples) when solving the histogram task. This seems to suggest a relationship with the difficulty of the task – histogram is a less trivial problem than frequword. Despite this, even in cases where examples were favored, they were not the only tool used. Programming Not Only by Example Question 5: To test whether users were distracted by undesirable sequences that cannot be removed we first located undesirable sequences by how many users who had the ability (i.e. access to a remove predicate) removed them, then counted their appearance in the sessions of users from the PBE group. Table 6 shows the results. It is important to note that not all sequences that were commonly removed appeared in the PBE group at all, itself an indicator of how syntax operations vastly change the traversal of the search space. These undesirable sequences appeared in user sessions up to 7 times in a single session. Some of these sequences distracted (i.e. kept reappearing) up to 2/3 of the users performing a task, and on average 22.2% of the users. Furthermore, a distracting sequence appeared, on average, around 3 times in each session. This shows that the inability to remove a letter or sequence discussed in claim 4.1 is not only a theoretical problem, nor is it only a problem at the end of the process as seen in table 4, but a real distraction from the ability to synthesize over an expressive vocabulary. When examining the presence of distracting elements in the final program accepted by participants, we can see in fig. 4 that in two of the tasks (histogram and nonemptylines) most or all PBE users ended up accepting a program with superfluous elements. For example, many histogram sessions accepted a program with a call of toMap on a map, and many nonemptylines sessions accepted a program that called filterNot(c => c == ’\r’ || c == ’\n’) on a list of strings. Both of these are nullipotent elements: toMap creates a map from a map, and filterNot(c => c == ’\r’ || c == ’\n’) compares strings to characters and so always filters nothing. In addition, in these cases where PBE users stopped at an equivalent program rather than the target program, we tested the number of iterations spent in the same equivalence class (i.e. presented with the same candidate program) before accepting the program. While most users accepted an equivalent program immediately, one user performing the histogram task tried an additional iteration and one user tried two additional iterations. For nonemptylines, two users tried an additional iteration and one user tried two additional iteration. Altogether, these are 22% of the sessions where users tried unsuccessfully to improve upon the program they already had, either trying to get rid of a nullipotent element or not realizing it has no influence, before finally accepting it. We chose not to tackle the questions of user preference and measures of distraction with a questionnaire asking the users to approximate their preference, sticking only to empirical results. Despite that, we wish to bring several anecdotes from the course of the experiment that may help shed light on the behavior observed. Users in the PBE test group expressed very specific frustration on several occasions such as “it insists on using take(5) no matter what I do” while solving the most frequent word task, or “I couldn’t get rid of these nonsense functions, I just wanted to shake it” after solving the non-empty lines task. 6.5 Discussion and conclusions In this section we discuss the results of the study. Speed and ease of use We see a speedup of iteration time between examples and other predicates. The change is largest between the PBE and Syntax groups, and a smaller speedup when examining the GIM group against itself. We may attribute this difference between the two tests to the fact that the users in the GIM group resort to September, 2017 examples only when they are convenient or readily apparent and therefore take a shorter amount of time to create. When combined with a low preference for examples, we conclude that syntax predicates are easier for the user to use in general. In addition, when we combine the improvement in iteration time, the change in number of iterations (itself statistically significant) and the lack of significance in the change in total time, we conclude that changing the type of predicates simply leads to the same time spent on the synthesis task using more, but shorter and easier, iterations. Distracting elements and user frustration Much of the frustration users in the PBE group expressed had to do with recurring program elements they thought were useless. Recurring undesirable sequences showed up in up to 2/3 of the users and recurred on average 3 times during the session, which is definitely a reason for frustration. In addition, some PBE users wasted time and effort trying to remove elements that cannot be removed. We therefore conclude that avoiding this distraction by giving users more tools would, at the very least, make for more content users. Helpfulness of debug information We attribute the success rate and relatively short use times of a set of developers who have never before seen Scala to the guidance offered by debug information. We did not target this specifically in the experiment, but 9 separate users volunteered to us after the experiment that it was anywhere from “helpful” to “lifesaving” in understanding unfamiliar methods and keeping track of examples. This approval included people who were familiar with Scala and developers who develop in Scala. Correctness with syntax operations There is a dip in correctness (a functionally correct program was not reached) from the PBE group to the Syntax group, but an improvement in GIM. We attribute this to the helpfulness of debug information: it seems to be easier to make a correct decision about a program when presented with its breakdown over several examples, rather than just the single initial example available to the Syntax group. Preferred operations There is a very strong preference of all users for syntactic predicates over examples. However, there may be a subordinate trend within this preference: separating the users into those familiar with Scala and those who are not, the preference reverses. Users familiar with Scala preferred more examples than the rest, and preferred examples over other predicates in the harder task, histogram, and predicates over examples in the easier task, frequword. This may have to do with their ability to better understand a candidate program: more savvy programmers could more easily read the programs and so preferred to break the observed behavior with examples, whereas programmers that have a harder time reading the code focus on individual program elements. This remains a conjecture as the set of users familiar with Scala within the GIM group is only 2. 7 Threats to Validity Cross validation The study was not cross-validated (i.e. each user performing tasks in several groups). Because the predicate families include each other, we felt it would create a bias toward some operations based on order. As cross validation should not be used when it creates bias, we decided against it. We tried to negate some of the differences between individual programmers tested by drawing September, 2017 Figure 2: Median iteration time per task in each test group. Significant change from PBE indicated by *. Hila Peleg, Sharon Shoham, and Eran Yahav Figure 3: Examples used (med, min, max) by GIM users (all operations). None used 100% examples. participants from similar backgrounds – same year in university, developers in the same department – and then dividing them evenly. Sampling of population An external validity issue mentioned in section 6.5 is the relatively small percentage of participants familiar with Scala – only 25% of the participants of the study, and, due to random assignment to groups, in some of the groups as few as 20%. As we have already pointed out, this does not allow us to make general claims about differences between Scala-savvy programmers and those who are new to the language. However, we can still generalize our claims with regards to programmers working in a language they have not encountered before – the majority of the participants. Additionally, our sample of undergraduates is not random, but rather of students who felt familiar enough with functional programming to agree to participate. This may skew the ability to generalize. This is hopefully not significant in the compiled results as undergraduates are not a very large percentage of the participants – less than 22%. 8 Related Work Syntax-based synthesis [2] is the domain of program synthesis where the target program is derived from a target programming language according to the syntax rules. [19, 21, 30, 35] all fall within this scope. The implementation of GIM presented in this paper is syntax-based, where the target language is a functional subset of Scala as specified by V. Syntax-based synthesis algorithms often use a user-driven interaction model [14] which GIM extends. Programming by Example In PBE the interaction between user and synthesizer for demonstrating the desired behavior is restricted to examples, both in initial specifications and any refinement. FlashFill [13, 29] is a PBE tool for automating transformations on an Excel data set, and is included in Microsoft Excel. It does not show its users the program, only its application on the data set. Because the resulting program is never inspected, it might still suffer from overfitting to the examples and is not reusable. Escher [1] is a PBE tool for synthesizing recursive functions. Like FlashFill, Escher decomposes the synthesis task based on the examples, searching for programs that could be used as sub-programs in condition blocks. Escher is parameterized by the set of operations used in synthesis, and like FlashFill, allows refinement only by re-running the process. Type-Directed Synthesis is a category of synthesis algorithms that perform syntax-based synthesis mainly driven by the types of variables and methods, and the construction of the program is performed through type-derivation rules. While type-directed methods tend to Figure 4: No. users that reached the target program or an equivalent (non-functional differences) result. be user-driven, many of them [12, 15, 27] require only initial specifications and the user manually chooses from multiple candidate programs that match the specification. The philosophy behind GIM is that a user shouldn’t consider many programs (could be dozens or more) at a time with no additional data. Rather, programs should be considered one at a time, with additional information that can help the user consider the program in depth and direct the search. Adding examples to Type-directed synthesis Recent work connects PBE with type-driven synthesis [11, 25]. These tools accept their initial specifications as examples (and their inherent type information), use type derivations to produce candidate programs, and verify them with the examples. B IGλ [31] synthesizes MapReduce processes via sketching and type derivations over lambda calculus and a vocabulary. Examples are also used to verify determinism. S Y P ET [10] is a type-directed, component-based synthesis algorithm that uses Petrinets to represent type relationships, and finds possible programs by reachability. Candidates are tested using tests provided by the user. S Y P ET requires full test cases rather than examples, which, while more descriptive, still require the user to learn a lot about the library in order to program the test case, effort that may be equal to learning about the methods required to solve the programming task at hand. Sketching The user can restrict the search space via sketches [32– 34], structural elements (e.g. conditions or loops) which includes holes to be synthesized. Sketching is a way to leverage a programmer’s knowledge of expected syntactic elements, and when used in conjunction with restrictions on the syntax [2] can allow very intricate synthesis. However, since the most general sketch, a program with only a single hole, is usually too unconstrained for the synthesizer, the user must come armed with at least some knowledge of the expected structure rather than iteratively build it as in GIM. Enriching user input Several existing works have enriched the specification language, or the interface for specifying program behavior. Adding examples to type-directed synthesis is an example of such enrichment. Another approach by Polikarpova et al. [28] with S YNQUID is to use refinement types instead of types, which encode constraints on the solution program, which can be imposed on the candidate space. While these constraints are mainly semantic, unlike GIM’s syntactic predicates, this embodies the same ideal of passing off some responsibility to a user that can understand code, or in this case, write code. Likewise, Barman et al. [6] suggest an interactive, user-dependent extension of sketching intended to synthesize the sketch itself by leveraging the user to decompose the specifications Programming Not Only by Example and examine the results. Angelic programming [8] leverages programmer knowledge by an expanded interface from synthesizer to user: the user is shown a synthesized program with a nondeterministic “angelic operation” and execution traces for that operation to make the program correct, and the it is their responsibility to identify the needed operation to replace the angelic operator. 9 Conclusion We presented a novel granular interaction model (GIM) for interacting with a synthesizer. This interaction model extends common PBE approaches and enables a programmer to communicate more effectively with the synthesizer. First, we prove that using only examples is insufficient for eliminating certain undesired operations in a program, where these undesired operations are easy to eliminate when using syntactic operations made available by GIM. Second, we show the effectiveness of GIM by a controlled user study that compares GIM to standard PBE. Our study shows that participants have strong preference (66% of the time) to using granular feedback instead of examples, and are able to provide granular feedback up to 3 times faster (and 2.14 times faster on average). 10 Acknowledgements The research leading to these results has received funding from the European Union’s - Seventh Framework Programme (FP7) under grant agreement no. 615688 - ERC- COG-PRIME. The authors thank Yifat Chen Solomon for her indispensable assistance in getting the user study off the ground, and Hadas E. Sloin and Yoav Goldberg for their help in analyzing the data. References [1] Aws Albarghouthi, Sumit Gulwani, and Zachary Kincaid. 2013. Recursive program synthesis. In International Conference on Computer Aided Verification. Springer, 934–950. [2] Rajeev Alur, Rastislav Bodik, Garvit Juniwal, Milo MK Martin, Mukund Raghothaman, Sanjit A Seshia, Rishabh Singh, Armando Solar-Lezama, Emina Torlak, and Abhishek Udupa. 2015. Syntax-guided synthesis. Dependable Software Systems Engineering 40 (2015), 1–25. [3] Rajeev Alur, Dana Fisman, Rishabh Singh, and Armando Solar-Lezama. 2016. SyGuS-Comp 2016: Results and Analysis. arXiv preprint arXiv:1611.07627 (2016). [4] Rajeev Alur, Arjun Radhakrishna, and Abhishek Udupa. 2017. Scaling Enumerative Program Synthesis via Divide and Conquer. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems. Springer, 319–336. [5] Tobias Anton. 2005. XPath-Wrapper Induction by generalizing tree traversal patterns. In Lernen, Wissensentdeckung und Adaptivitt (LWA) 2005, GI Workshops, Saarbrcken. 126–133. [6] Shaon Barman, Rastislav Bodik, Satish Chandra, Emina Torlak, Arka Bhattacharya, and David Culler. 2015. Toward tool support for interactive synthesis. In 2015 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (Onward!). ACM, 121–136. [7] L. Blaine, L. Gilham, J. Liu, D. Smith, and S. Westfold. 1998. Planware - DomainSpecific Synthesis of High-Performance Schedulers. In Proceedings of the 13th IEEE International Conference on Automated Software Engineering (ASE ’98). IEEE Computer Society, Washington, DC, USA, 270–. http://dl.acm.org/citation. cfm?id=521138.786844 [8] Rastislav Bodik, Satish Chandra, Joel Galenson, Doug Kimelman, Nicholas Tung, Shaon Barman, and Casey Rodarmor. 2010. Programming with angelic nondeterminism. In ACM Sigplan Notices, Vol. 45. ACM, 339–352. [9] Rezaul Chowdhury, Pramod Ganapathi, Jesmin Jahan Tithi, Charles Bachmeier, Bradley C. Kuszmaul, Charles E. Leiserson, Armando Solar-Lezama, and Yuan Tang. 2016. AUTOGEN: Automatic Discovery of Cache-oblivious Parallel Recursive Algorithms for Solving Dynamic Programs. In Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP ’16). ACM, New York, NY, USA, Article 10, 12 pages. DOI: http://dx.doi.org/10.1145/2851141.2851167 September, 2017 [10] Yu Feng, Ruben Martins, Yuepeng Wang, Isil Dillig, and Thomas Reps. 2017. Component-Based Synthesis for Complex APIs. In Proceedings of the 44th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2017. [11] John K Feser, Swarat Chaudhuri, and Isil Dillig. 2015. Synthesizing data structure transformations from input-output examples. In ACM SIGPLAN Notices, Vol. 50. ACM, 229–239. [12] Joel Galenson, Philip Reames, Rastislav Bodik, Björn Hartmann, and Koushik Sen. 2014. Codehint: Dynamic and interactive synthesis of code snippets. In Proceedings of the 36th International Conference on Software Engineering. ACM, 653–663. [13] Sumit Gulwani. 2011. Automating String Processing in Spreadsheets Using Inputoutput Examples. In Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’11). ACM, New York, NY, USA, 317–330. DOI:http://dx.doi.org/10.1145/1926385.1926423 [14] Sumit Gulwani. 2012. Synthesis from examples: Interaction models and algorithms. In Symbolic and Numeric Algorithms for Scientific Computing (SYNASC), 2012 14th International Symposium on. IEEE, 8–14. [15] Tihomir Gvero, Viktor Kuncak, Ivan Kuraj, and Ruzica Piskac. 2013. Complete completion using types and weights. In ACM SIGPLAN Notices, Vol. 48. ACM, 27–38. [16] Daqing Hou and David M Pletcher. 2011. An evaluation of the strategies of sorting, filtering, and grouping api methods for code completion. In Software Maintenance (ICSM), 2011 27th IEEE International Conference on. IEEE, 233–242. [17] Shachar Itzhaki, Rohit Singh, Armando Solar-Lezama, Kuat Yessenov, Yongquan Lu, Charles Leiserson, and Rezaul Chowdhury. 2016. Deriving Divide-andConquer Dynamic Programming Algorithms using Solver-Aided Transformations. In international conference companion on Object oriented programming systems languages and applications. To appear. [18] Shachar Itzhaky, Sumit Gulwani, Neil Immerman, and Mooly Sagiv. 2010. A Simple Inductive Synthesis Methodology and Its Applications. SIGPLAN Not. 45, 10 (Oct. 2010), 36–46. DOI:http://dx.doi.org/10.1145/1932682.1869463 [19] Shachar Itzhaky, Rohit Singh, Armando Solar-Lezama, Kuat Yessenov, Yongquan Lu, Charles Leiserson, and Rezaul Chowdhury. 2016. Deriving divide-andconquer dynamic programming algorithms using solver-aided transformations. In Proceedings of the 2016 ACM SIGPLAN International Conference on ObjectOriented Programming, Systems, Languages, and Applications. ACM, 145–164. [20] Jürgen Landauer and Masahito Hirakawa. 1995. Visual AWK: A Model for Text Processing by Demonstration.. In vl. 267–274. [21] Tessa Lau, Steven A Wolfman, Pedro Domingos, and Daniel S Weld. 2001. Learning repetitive text-editing procedures with SMARTedit. Your Wish Is My Command: Giving Users the Power to Instruct Their Software (2001), 209–226. [22] Vu Le and Sumit Gulwani. 2014. FlashExtract: a framework for data extraction by examples. In Proceedings of the 35th Conference on Programming Language Design and Implementation, Michael F. P. O’Boyle and Keshav Pingali (Eds.). ACM, 55. DOI:http://dx.doi.org/10.1145/2594291.2594333 [23] Feng Liu, Nayden Nedev, Nedyalko Prisadnikov, Martin Vechev, and Eran Yahav. 2012. Dynamic synthesis for relaxed memory models. ACM SIGPLAN Notices 47, 6 (2012), 429–440. [24] Adi Omari, Sharon Shoham, and Eran Yahav. 2016. Cross-supervised synthesis of web-crawlers. In Proceedings of the 38th International Conference on Software Engineering, ICSE 2016, Austin, TX, USA, May 14-22, 2016. 368–379. DOI: http://dx.doi.org/10.1145/2884781.2884842 [25] Peter-Michael Osera and Steve Zdancewic. 2015. Type-and-example-directed program synthesis. In ACM SIGPLAN Notices, Vol. 50. ACM, 619–630. [26] Robert Paige. 1990. Symbolic finite differencing-part I. In European Symposium on Programming. Springer, 36–56. [27] Daniel Perelman, Sumit Gulwani, Thomas Ball, and Dan Grossman. 2012. Typedirected completion of partial expressions. In ACM SIGPLAN Notices, Vol. 47. ACM, 275–286. [28] Nadia Polikarpova, Ivan Kuraj, and Armando Solar-Lezama. 2016. Program synthesis from polymorphic refinement types. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 522–538. [29] Oleksandr Polozov and Sumit Gulwani. 2015. Flashmeta: A framework for inductive program synthesis. ACM SIGPLAN Notices 50, 10 (2015), 107–126. [30] Veselin Raychev, Martin Vechev, and Eran Yahav. 2014. Code completion with statistical language models. In ACM SIGPLAN Notices, Vol. 49. ACM, 419–428. [31] Calvin Smith and Aws Albarghouthi. 2016. MapReduce program synthesis. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 326–340. [32] Armando Solar-Lezama. 2008. Program synthesis by sketching. ProQuest. [33] Armando Solar-Lezama, Christopher Grant Jones, and Rastislav Bodik. 2008. Sketching concurrent data structures. In ACM SIGPLAN Notices, Vol. 43. ACM, 136–148. [34] Armando Solar-Lezama, Liviu Tancau, Rastislav Bodik, Sanjit Seshia, and Vijay Saraswat. 2006. Combinatorial sketching for finite programs. ACM SIGOPS Operating Systems Review 40, 5 (2006), 404–415. September, 2017 [35] Abhishek Udupa, Arun Raghavan, Jyotirmoy V Deshmukh, Sela Mador-Haim, Milo MK Martin, and Rajeev Alur. 2013. TRANSIT: specifying protocols with concolic snippets. ACM SIGPLAN Notices 48, 6 (2013), 287–296. [36] Martin Vechev, Eran Yahav, and Greta Yorsh. 2010. Abstraction-Guided Synthesis of Synchronization. In POPL’10: 37th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages. 327–338. [37] Martin T Vechev, Eran Yahav, and David F Bacon. 2006. Correctness-preserving derivation of concurrent garbage collection algorithms. In ACM SIGPLAN Notices, Vol. 41. ACM, 341–353. [38] Martin T Vechev, Eran Yahav, David F Bacon, and Noam Rinetzky. 2007. CGCExplorer: a semi-automated search procedure for provably correct concurrent collectors. In ACM SIGPLAN Notices, Vol. 42. ACM, 456–467. [39] Chenglong Wang, Alvin Cheung, and Rastislav Bodik. 2017. Synthesizing highly expressive SQL queries from input-output examples. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 452–466. [40] Ian H Witten and Dan Mo. 1993. TELS: Learning text editing tasks from examples. In Watch what I do. MIT Press, 183–203. [41] Shanchan Wu, Jerry Liu, and Jian Fan. 2015. Automatic Web Content Extraction by Combination of Learning and Grouping. In Proceedings of the 24th International Conference on World Wide Web. ACM, 1264–1274. Hila Peleg, Sharon Shoham, and Eran Yahav
6cs.PL
On Coinductive Equivalences for Higher-Order Probabilistic Functional Programs Ugo Dal Lago Davide Sangiorgi Michele Alberti arXiv:1311.1722v1 [cs.PL] 7 Nov 2013 Abstract We study bisimulation and context equivalence in a probabilistic λ-calculus. The contributions of this paper are threefold. Firstly we show a technique for proving congruence of probabilistic applicative bisimilarity. While the technique follows Howe’s method, some of the technicalities are quite different, relying on non-trivial “disentangling” properties for sets of real numbers. Secondly we show that, while bisimilarity is in general strictly finer than context equivalence, coincidence between the two relations is attained on pure λ-terms. The resulting equality is that induced by Levy-Longo trees, generally accepted as the finest extensional equivalence on pure λ-terms under a lazy regime. Finally, we derive a coinductive characterisation of context equivalence on the whole probabilistic language, via an extension in which terms akin to distributions may appear in redex position. Another motivation for the extension is that its operational semantics allows us to experiment with a different congruence technique, namely that of logical bisimilarity. 1 Introduction Probabilistic models are more and more pervasive. Not only are they a formidable tool when dealing with uncertainty and incomplete information, but they sometimes are a necessity rather than an option, like in computational cryptography (where, e.g., secure public key encryption schemes need to be probabilistic [17]). A nice way to deal computationally with probabilistic models is to allow probabilistic choice as a primitive when designing algorithms, this way switching from usual, deterministic computation to a new paradigm, called probabilistic computation. Examples of application areas in which probabilistic computation has proved to be useful include natural language processing [31], robotics [48], computer vision [8], and machine learning [36]. This new form of computation, of course, needs to be available to programmers to be accessible. And indeed, various probabilistic programming languages have been introduced in the last years, spanning from abstract ones [24, 40, 35] to more concrete ones [37, 18], being inspired by various programming paradigms like imperative, functional or even object oriented. A quite common scheme consists in endowing any deterministic language with one or more primitives for probabilistic choice, like binary probabilistic choice or primitives for distributions. One class of languages that copes well with probabilistic computation are functional languages. Indeed, viewing algorithms as functions allows a smooth integration of distributions into the playground, itself nicely reflected at the level of types through monads [20, 40]. As a matter of fact, many existing probabilistic programming languages [37, 18] are designed around the λ-calculus or one of its incarnations, like Scheme. All these allows to write higher-order functions (i.e., programs can take functions as inputs and produce them as outputs). The focus of this paper are operational techniques for understanding and reasoning about program equality in higher-order probabilistic languages. Checking computer programs for equivalence is a crucial, but challenging, problem. Equivalence between two programs generally means that the programs should behave “in the same manner” under any context [32]. Specifically, two λ-terms are context equivalent if they have the same convergence behavior (i.e., they do or do not terminate) in any possible context. Finding effective methods for context equivalence proofs is particularly challenging in higher-order languages. 1 Bisimulation has emerged as a very powerful operational method for proving equivalence of programs in various kinds of languages, due to the associated coinductive proof method. To be useful, the behavioral relation resulting from bisimulation — bisimilarity — should be a congruence, and should also be sound with respect to context equivalence. Bisimulation has been transplanted onto higher-order languages by Abramsky [1]. This version of bisimulation, called applicative bisimulation has received considerable attention [19, 38, 42, 27, 39, 28]. In short, two functions M and N are applicative bisimilar when their applications M P and N P are applicative bisimilar for any argument P . Often, checking a given notion of bisimulation to be a congruence in higher-order languages is nontrivial. In the case of applicative bisimilarity, congruence proofs usually rely on Howe’s method [22]. Other forms of bisimulation have been proposed, such as environmental bisimulation and logical bisimulation [44, 45, 25], with the goal of relieving the burden of the proof of congruence, and of accommodating language extensions. In this work, we consider the pure λ-calculus extended with a probabilistic choice operator. Context equivalence of two terms means that they have the same probability of convergence in all contexts. The objective of the paper is to understand context equivalence and bisimulation in this paradigmatic probabilistic higher-order language, called Λ⊕ . The paper contains three main technical contributions. The first is a proof of congruence for probabilistic applicative bisimilarity along the lines of Howe’s method. This technique consists in defining, for every relation on terms R, its Howe’s lifting RH . The construction, essentially by definition, ensures that the relation obtained by lifting bisimilarity is a congruence; the latter is then proved to be itself a bisimulation, therefore coinciding with applicative bisimilarity. Definitionally, probabilistic applicative bisimulation is obtained by setting up a labelled Markov chain on top of λ-terms, then adapting to it the coinductive scheme introduced by Larsen and Skou in a first-order H setting [26]. In the proof of congruence, the construction (·) closely reflects analogous constructions for nondeterministic extensions of the λ-calculus. The novelties are in the technical details for proving that the resulting relation is a bisimulation: in particular our proof of the so-called Key Lemma — an essential ingredient in Howe’s method — relies on non-trivial “disentangling” properties for sets of real numbers, these properties themselves proved by modeling the problem as a flow network and then apply the Max-flow Min-cut Theorem. The congruence of applicative bisimilarity yields soundness with respect to context equivalence as an easy corollary. Completeness, however, fails: applicative bisimilarity is proved to be finer. A subtle aspect is also the late vs. early formulation of bisimilarity; with a choice operator the two versions are semantically different; our construction crucially relies on the late style. In our second main technical contribution we show that the presence of higher-order functions and probabilistic choice in contexts gives context equivalence and applicative bisimilarity maximal discriminating power on pure λ-terms. We do so by proving that, on pure λ-terms, both context equivalence and applicative bisimilarity coincide with the Levy-Longo tree equality, which equates terms with the same Levy-Longo tree (briefly LLT). The LLT equality is generally accepted as the finest extensional equivalence on pure λ-terms under a lazy regime. The result is in sharp contrast with what happens under a nondeterministic interpretation of choice (or in the absence of choice), where context equivalence is coarser than LLT equality. Our third main contribution is a coinductive characterisation of probabilistic context equivalence on the whole language Λ⊕ (as opposed to the subset of pure λ-terms). We obtain this result by setting a bisimulation game on an extension of Λ⊕ in which weighted formal sums — terms akin to distributions — may appear in redex position. Thinking of distributions as sets of terms, the construction reminds us of the reduction of nondeterministic to deterministic automata. The technical details are however quite different, because we are in a higher-order language and therefore — once more — we are faced with the congruence problem for bisimulation, and because formal sums may contain an infinite number of terms. For the proof of congruence of bisimulation in this extended language, we have experimented the technique of logical bisimulation. In this method (and in the related method of environmental bisimulation), the clauses of applicative bisimulation are modified so to allow the standard congruence argument for bisimulations in firstorder languages, where the bisimulation method itself is exploited to establish that the closure of 2 the bisimilarity under contexts is again a bisimulation. Logical bisimilarities have two key elements. First, bisimilar functions may be tested with bisimilar (rather than identical) arguments (more precisely, the arguments should be in the context closure of the bisimulation; the use of contexts is necessary for soundness). Secondly, the transition system should be small-step, deterministic (or at least confluent), and the bisimulation game should also be played on internal moves. In our probabilistic setting, the ordinary logical bisimulation game has to be modified substantially. Formal sums represent possible evolutions of running terms, hence they should appear in redex position only (allowing them anywhere would complicate matters considerably), also making the resulting bisimulation proof technique more cumbersome). The obligation of redex position for certain terms is in contrast with the basic schema of logical bisimulation, in which related terms can be used as arguments to bisimilar functions and can therefore end up in arbitrary positions. We solve this problem by moving to coupled logical bisimulations, where a bisimulation is formed by a pair of relations, one on Λ⊕ -terms, the other on terms extended with formal sums. The bisimulation game is played on both relations, but only the first relation is used to assemble input arguments for functions. Another delicate point is the meaning of internal transitions for formal sums. In logical bisimilarity the transition system should be small-step; and formal sums should evolve into values in a finite number of steps, even if the number of terms composing the formal sum is infinite. We satisfy these requirements by defining the transition system for extended terms on top of that of Λ⊕ -terms. The proof of congruence of coupled logical bisimilarity also exploits an “up-to distribution” bisimulation proof technique. In the paper we adopt call-by-name evaluation. The results on applicative bisimilarity can be transported onto call-by-value; in contrast, transporting the other results is less clear, and we leave it for future work. See Section 8 for more details. An extended version of this paper with more details is available [9]. 1.1 Further Related Work Research on (higher-order) probabilistic functional languages have, so far, mainly focused on either new programming constructs, or denotational semantics, or applications. The underlying operational theory, which in the ordinary λ-calculus is known to be very rich, has remained so far largely unexplored. In this section, we give some pointers to the relevant literature on probabilistic λ-calculi, without any hope of being exhaustive. Various probabilistic λ-calculi have been proposed, starting from the pioneering work by SahebDjahromi [41], followed by more advanced studies by Jones and Plotkin [24]. Both these works are mainly focused on the problem of giving a denotational semantics to higher-order probabilistic computation, rather than on studying it from an operational point view. More recently, there has been a revamp on this line of work, with the introduction of adequate (and sometimes also fully-abstract) denotational models for probabilistic variations of PCF [11, 16]. There is also another thread of research in which various languages derived from the λ-calculus are given types in monadic style, allowing this way to nicely model concrete problems like Bayesian inference and probability models arising in robotics [40, 35, 20]; these works however, do not attack the problem of giving an operationally based theory of program equivalence. Nondeterministic extensions of the λ-calculus have been analysed in typed calculi [3, 47, 27] as well as in untyped calculi [23, 7, 33, 13]. The emphasis in all these works is mainly domain-theoretic. Apart from [33], all cited authors closely follow the testing theory [12], in its modalities may or must, separately or together. Ong’s approach [33] inherits both testing and bisimulation elements. Our definition of applicative bisimulation follows Larsen and Skou’s scheme [26] for fullyprobabilistic systems. Many other forms of probabilistic bisimulation have been introduced in the literature, but their greater complexity is usually due to the presence of both nondeterministic and probabilistic behaviors, or to continuous probability distributions. See surveys such as [5, 34, 21]. Contextual characterisations of LLT equality include [6], in a λ-calculus with multiplicities in which deadlock is observable, and [15], in a λ-calculus with choice, parallel composition, and both call-by-name and call-by-value applications. The characterisation in [43] in a λ-calculus with 3 M ⇓∅ bt V ⇓ {V } bv M ⇓D {P {N/x} ⇓ EP,N }λx.P ∈S(D) P ba M N ⇓ λx.P ∈S(D) D(λx.P ) · EP,N M ⇓D N ⇓E bs M ⊕ N ⇓ 12 · D + 21 · E Figure 1: Big-step call-by-name approximation semantics for Λ⊕ . non-deterministic operators, in contrast, is not contextual, as derived from a bisimulation that includes a clause on internal moves so to observe branching structures in behaviours. See [14] for a survey on observational characterisations of λ-calculus trees. 2 2.1 Preliminaries A Pure, Untyped, Probabilistic Lambda Calculus Let X = {x, y, . . .} be a denumerable set of variables. The set Λ⊕ of term expressions, or terms is defined as follows: M, N, L ::= x | λx.M | M N | M ⊕ N, where x ∈ X. The only non-standard operator in Λ⊕ is probabilistic choice: M ⊕ N is a term which is meant to behave as either M or N , each with probability 12 . A more general construct M ⊕p N where p is any (computable) real number from [0, 1], is derivable, given the universality of the λ-calculus (see, e.g., [10]). The set of free variables of a term M is indicated as FV(M ) and is defined as usual. Given a finite set of variables x ⊆ X, Λ⊕ (x) denotes the set of terms whose free variables are among the ones in x. A term M is closed if FV(M ) = ∅ or, equivalently, if M ∈ Λ⊕ (∅). The (capture-avoiding) substitution of N for the free occurrences of x in M is def def denoted M {N/x}. We sometimes use the identity term I = λx.x, the projector K = λx.λy.x, def and the purely divergent term Ω = (λx.xx)(λx.xx). Terms are now given a call-by-name semantics following [10]. A term is a value if it is a closed λ-abstraction. We call VΛ⊕ the set of all values. Values are ranged over by metavariables like V, W, X. Closed terms evaluates not toP a single value, but to a (partial) value distribution, that is, a function D : VΛ⊕ → R[0,1] such that V ∈VΛ⊕ D(V ) ≤ 1. The set of all value distributions is Pv . Distributions do not necessarily sum to 1, so to model the possibility of (probabilistic) divergence. Given a value distribution D, its support S(D) is the subset of VΛ⊕ whose elements are values to which D attributes positive probability. Value distributions ordered pointwise form both a lower semilattice P P and an ωCPO: limits of ω-chains always exist. Given a value distribution D, its sum D is V ∈VΛ⊕ D(V ). The call-by-name semantics of a closed term M is a value distribution [[M ]] defined in one of the ways explained in [10]. We recall this now, though only briefly for lack of space. The first step consists in defining a formal system deriving finite lower approximations to the semantics of M . Big-step approximation semantics, as an example, derives judgments in the form M ⇓ D, where M is a term and D is a value distribution of finite support (see Figure 1). Small-step approximation semantics can be defined similarly, and derives judgments in the form M ⇒ D. Noticeably, big-step and small-step can simulate each other, i.e. if M ⇓ D, then M ⇒ E where E ≥ D, and vice versa [10]. In the second step, [[M ]], called the semantics of M , is set as the least upper bound of distributions obtained in either of the two ways: def [[M ]] = sup D = sup D. M ⇓D M ⇒D Notice that the above is well-defined because for every M , the set of all distributions D such that M ⇓ D is directed, and thus its least upper bound is a value distribution because of ω-completeness. 4 expone f n = (f n) (+) (expone f n+1) exptwo f = (\x -> f x) (+) (exptwo (\x -> f (x+1))) expthree k f n = foldp k n f (expthree (expone id k) f) foldp 0 n f g = g n foldp m n f g = (f n) (+) (foldp (m-1) (n+1) f g) Figure 2: Three Higher-Order Functions def Example 2.1 Consider the term M = I ⊕ (K ⊕ Ω). We have M ⇓ D, where D(I) = 12 and D(V ) is 0 elsewhere, as well as M ⇓ ∅, where ∅ is the empty distribution. The distribution [[M ]] assigns 1 1 2 to I and 4 to K. The semantics of terms satisfies some useful equations, such as: Lemma 2.2 [[(λx.M )N ]] = [[M {N/x}]]. Lemma 2.3 [[M ⊕ N ]] = 12 [[M ]] + 21 [[N ]]. Proof. See [10] for detailed proofs.  We are interested in context equivalence in this probabilistic setting. Typically, in a qualitative scenario as the (non)deterministic one, terms are considered context equivalent if they both converge or diverge. Here, we need to take into account quantitative information. P Definition 2.4 (Context Preorder and Equivalence) The expression M ⇓p stands for [[M ]] = p, i.e., the term M converges with probability p. The context preorder ≤⊕ stipulates M ≤⊕ N if C[M ]⇓p implies C[N ]⇓q with p ≤ q, for every closing context C. The equivalence induced by ≤⊕ is probabilistic context equivalence, denoted as '⊕ . Remark 2.5 (Types, Open Terms) The results in this paper are stated for an untyped language. Adapting them to a simply-typed language is straightforward; we use integers, booleans and recursion in examples. Moreover, while the results are often stated for closed terms only, they can be generalized to open terms in the expected manner. In the paper, context equivalences and preorders are defined on open terms; (bi)similarities are defined on closed terms and it is then intended that they are extended to open terms by requiring the usual closure under substitutions. Example 2.6 We give some basic examples of higher-order probabilistic programs, which we will analyse using the coinductive techniques we introduce later in this paper. Consider the functions expone, exptwo, and expthree from Figure 2. They are written in a Haskell-like language extended with probabilistic choice, but can also be seen as terms in a (typed) probabilistic λ-calculus with integers and recursion akin to Λ⊕ . Term expone takes a function f and a natural number n in input, then it proceeds by tossing a fair coin (captured here by the binary infix operator (+)) and, depending on the outcome of the toss, either calls f on n, or recursively calls itself on f and n+1. When fed with, e.g., the identity and the natural number 1, the program expone evaluates to the geometric distribution assigning probability 21n to any positive natural number n. A similar effect can be obtained by exptwo, which only takes f in input, then “modifying” it along the evaluation. The function expthree is more complicated, at least apparently. To understand its behavior, one should first look at the auxiliary function foldp. If m and n are two natural numbers and f and g are two functions, foldp m n f g call-by-name reduces to the following expression: (f n) (+) ((f n+1) (+) ... ((f n+m-1) (+) (g n+m))). The term expthree works by forwarding its three arguments to foldp. The fourth argument is a recursive call to expthree where, however, k is replaced by any number greater or equal to it, chosen according to a geometric distribution. The functions above can all be expressed in Λ⊕ , using fixed-point combinators. As we will see soon, expone, exptwo, and expthree k are context equivalent whenever k is a natural number. 5 2.2 Probabilistic Bisimulation In this section we recall the definition and a few basic notions of bisimulation for labelled Markov chains, following Larsen and Skou [26]. In Section 3 we will then adapt this form of bisimilarity to the probabilistic λ-calculus Λ⊕ by combining it with Abramsky’s applicative bisimilarity. Definition 2.7 A labelled Markov chain is a triple (S, L, P) such that: • S is a countable set of states; • L is set of labels; • P is a transition probability matrix, i.e. a function P : S × L × S → R[0,1] such that the following normalization condition holds: ∀` ∈ L.∀s ∈ S. P(s, `, S) ≤ 1 P where, as usual P(s, `, X) stands for t∈X P(s, `, t) whenever X ⊆ S. If R is an equivalence relation on S, S/R denotes the quotient of S modulo R, i.e., the set of all equivalence classes of S modulo R. Given any binary relation R, its reflexive and transitive closure is denoted as R∗ . Definition 2.8 Given a labelled Markov chain (S, L, P), a probabilistic bisimulation is an equivalence relation R on S such that (s, t) ∈ R implies that for every ` ∈ L and for every E ∈ S/R, P(s, `, E) = P(t, `, E). Note that a probabilistic bisimulation has to be, by definition, an equivalence relation. This means that, in principle, we are not allowed to define probabilistic bisimilarity simply as the union of all probabilistic bisimulations. As a matter of fact, given R, T two equivalence relations, R ∪ T is not necessarily an equivalence relation. The following is a standard way to overcome the problem: Lemma 2.9 If {RS i }i∈I , is a collection of probabilistic bisimulations, then also their reflexive and transitive closure ( i∈I Ri )∗ is a probabilistic bisimulation. def S Proof. Let us fix T = ( i∈I Ri )∗ . The fact that T is an equivalence relation can be proved as follows: • Reflexivity is easy: T is reflexive by definition. • Symmetry is a consequence of symmetry of each of the relations in {Ri }i∈I : if s T t, then there are n ≥ 0 states v0 , . . . , vn such that v0 = s, vn = t and for every 1 ≤ i ≤ n there is j such that vi−1 Rj vi . By the symmetry of each of the Rj , we easily get that vi Rj vi−1 . As a consequence, t T s. • Transitivity is itself very easy: T is transitive by definition. S Now, please notice that for any i ∈ I, Ri ⊆ j∈I Rj ⊆ T . This means that any equivalence class with respect to T is the union of equivalence classes with respect to Ri . Suppose that s T t. Then there are n ≥ 0 states v0 , . . . , vn such that v0 = s, vn = t and for every 1 ≤ i ≤ n there is j such that vi−1 Rj vi . Now, if ` ∈ L and E ∈ S/T , we obtain P(s, `, E) = P(v0 , `, E) = . . . = P(vn , `, E) = P(t, `, E). This concludes the proof.  Lemma 2.9 allows us to define the largest probabilistic bisimulation, called probabilistic bisimilarity. def S It is ∼ = {R | R is a probabilistic bisimulation}. Indeed, by Lemma 2.9, (∼)∗ is a probabilistic bisimulation too; we now claim that ∼ = (∼)∗ . The inclusion ∼ ⊆ (∼)∗ is obvious. The other way around, ∼⊇ (∼)∗ , follows by (∼)∗ being a probabilistic bisimulation and hence included in the union of them all, that is ∼. 6 In the notion of a probabilistic simulation, preorders play the role of equivalence relations: given a labelled Markov chain (S, L, P), a probabilistic simulation is a preorder relation R on S such that (s, t) ∈ R implies that for every ` ∈ L and for every X ⊆ S, P(s, `, X) ≤ P(t, `, R(X)), where as usual R(X) stands for the R-closure of X, namely the set {y ∈ S | ∃ x ∈ X. x R y}. Lemma 2.9 can be adapted to probabilistic simulations: Proposition 2.10 If {R S i }i∈I , is a collection of probabilistic simulations, then also their reflexive and transitive closure ( i∈I Ri )∗ is a probabilistic simulation. def S Proof. The fact that R = ( i∈I Ri )∗ is a preorder follows by construction. Then, for being a probabilistic simulation R must satisfy the following property: (s, t) ∈ R implies that for every ` ∈ L and for every X ⊆ S, P(s, `, X) ≤ P(t, `, R(X)). Let (s, t) ∈ R. There are n ≥ 0 states v1 , . . . , vn and for every 2 ≤ i ≤ n there is ji such that s = v1 Rj2 v2 . . . vn−1 Rjn vn = t. As a consequence, for every ` ∈ L and for every X ⊆ S, it holds that P(v1 , `, X) ≤ P(v2 , `, Rj2 (X)) ≤ P(v3 , `, Rj3 (Rj2 (X))) ≤ · · · ≤ P(vn , `, Rjn (. . . (Rj2 (Rj1 (X))))) Since, by definition, Rjn (. . . (Rj2 (Rj1 (X)))) ⊆ R(X), it follows that P(s, `, X) ≤ P(t, `, R(X)). This concludes the proof.  def S As a consequence, we define similarity simply as . = {R | R is a probabilistic simulation}. Any symmetric probabilistic simulation is a probabilistic bisimulation. Lemma 2.11 If R is a symmetric probabilistic simulation, then R is a probabilistic bisimulation. Proof. If R is a symmetric probabilistic simulation, by definition, it is also a preorder: that is, it is a reflexive and transitive relation. Therefore, R is an equivalence relation. But for being a probabilistic bisimulation R must also satisfy the property that sRt implies, for every ` ∈ L and for every E ∈ S/R, P(s, `, E) = P(t, `, E). From the fact that R is a simulation, it follows that if sRt, for every ` ∈ L and for every E ∈ S/R, P(s, `, E) ≤ P(t, `, R(E)). Since E ∈ S/R is an R-equivalence class, it holds R(E) = E. Then, from the latter follows P(s, `, E) ≤ P(t, `, E). We get the other way around by symmetric property of R, which implies that, for every label ` and for every E ∈ S/R, P(t, `, E) ≤ P(s, `, E). Hence, P(s, `, E) = P(t, `, E) which completes the proof.  Moreover, every probabilistic bisimulation, and its inverse, is a probabilistic simulation. Lemma 2.12 If R is a probabilistic bisimulation, then R and Rop are probabilistic simulation. Proof. Let us prove R probabilistic simulation first. U Consider the set {Xi }i∈I of equivalence subclasses module R contained in X. Formally, X = i∈I Xi such that, for all iU∈ I, Xi ⊆ Ei with Ei equivalence class modulo R. Please observe that, as a consequence, R(X) = i∈I Ei . Thus, the result easily follows, for every ` ∈ L and every X ⊆ S, X P(s, `, X) = P(s, `, Xi ) i∈I ≤ X P(s, `, Ei ) i∈I = X P(t, `, Ei ) = P(t, `, R(X)). i∈I Finally, Rop is also a probabilistic simulation as a consequence of symmetric property of R and the fact, just proved, that R is a probabilistic simulation.  7 Contrary to the nondeterministic case, however, simulation equivalence coincides with bisimulation: Proposition 2.13 ∼ coincides with . ∩ .op . Proof. The fact that ∼ is a subset of . ∩ .op is a straightforward consequence of symmetry property of ∼ and the fact that, by Lemma 2.12, every probabilistic bisimulation is also a probabilistic simulation. Let us now prove that . ∩ .op is a subset of ∼, i.e., the former of being a probabilistic bisimulation. Of course, . ∩ .op is an equivalence relation because . is a preorder. Now, consider any equivalence class E modulo . ∩ .op . Define the following two sets of states def def X = . (E) and Y = X − E. Observe that Y and E are disjoint set of states whose union is precisely X. Moreover, notice that both X and Y are closed with respect to .: • On the one hand, if s ∈. (X), then s ∈. (. (E)) =. (E) = X; • On the other hand, if s ∈. (Y ), then there is t ∈ X which is not in E such that t . s. But then s is itself in X (see the previous point), but cannot be E, because otherwise we would have s . t, meaning that s and t are in the same equivalence class modulo . ∩ .op , and thus t ∈ E, a contradiction. As a consequence, given any (s, t) ∈. ∩ .op and any ` ∈ L, P(s, `, X) ≤ P(t, `, . (X)) = P(t, `, X), P(t, `, X) ≤ P(s, `, . (X)) = P(s, `, X). It follows P(s, `, X) = P(t, `, X) and, similarly, P(s, `, Y ) = P(t, `, Y ). But then, P(s, `, E) = P(s, `, X) − P(s, `, Y ) = P(t, `, X) − P(t, `, Y ) = P(t, `, E) which is the thesis.  For technical reasons that will become apparent soon, it is convenient to consider Markov chains in which the state space is partitioned into disjoint sets, in such a way that comparing states coming U from different components is not possible. Remember that the disjoint union i∈I Xi of a family of sets {Xi }i∈I is definedUas {(a, i) | i ∈ I ∧ a ∈ Xi }. If the set of states S of a labelled Markov chain is a disjoint union i∈I Xi , one wants that (bi)simulation relations only compare elements coming from the same Xi , i.e. (a, i)R(b, j) implies i = j. In this case, we say that the underlying labelled Markov chain is multisorted. 3 Probabilistic Applicative Bisimulation and Howe’s technique In this section, notions of similarity and bisimilarity for Λ⊕ are introduced, in the spirit of Abramsky’s work on applicative bisimulation [1]. Definitionally, this consists in seeing Λ⊕ ’s operational semantics as a labelled Markov chain, then giving the Larsen and Skou’s notion of (bi)simulation for it. States will be terms, while labels will be of two kinds: one can either evaluate a term, obtaining (a distribution of) values, or apply a term to a value. The resulting bisimulation (probabilistic applicative bisimulation) will be shown to be a congruence, thus included in probabilistic context equivalence. This will be done by a non-trivial generalization of Howe’s technique [22], which is a well-known methodology to get congruence results in presence of higher-order functions, but which has not been applied to probabilistic calculi so far. Formalizing probabilistic applicative bisimulation requires some care. As usual, two values λx.M and λx.N are defined to be bisimilar if for every L, M {L/x} and N {L/x} are themselves bisimilar. But how if we rather want to compare two arbitrary closed terms M and N ? The simplest solution consists in following Larsen and Skou and stipulate that every equivalence class 8 of VΛ⊕ modulo bisimulation is attributed the same measure by both [[M ]] and [[N ]]. Values are thus treated in two different ways (they are both terms and values), and this is the reason why each of them corresponds to two states in the underlying Markov chain. Definition 3.1 Λ⊕ can be seen as a multisorted labelled Markov chain (Λ⊕ (∅) ] VΛ⊕ , Λ⊕ (∅) ] {τ }, P⊕ ) that we denote with Λ⊕ . Labels are either closed terms, which model parameter passing, or τ , that models evaluation. Please observe that the states of the labelled Markov chain we have just defined are elements of the disjoint union Λ⊕ (∅) ] VΛ⊕ . Two distinct states correspond to the same value V , and to avoid ambiguities, we call the second one (i.e. the one coming from VΛ⊕ ) a distinguished value. When we want to insist on the fact that a value λx.M is distinguished, we indicate it with νx.M . We define the transition probability matrix P⊕ as follows: • For every term M and for every distinguished value νx.N , def P⊕ (M, τ, νx.N ) = [[M ]](νx.N ); • For every term M and for every distinguished value νx.N , def P⊕ (νx.N, M, N {M/x}) = 1; • In all other cases, P⊕ returns 0. Terms seen as states only interact with the environment by performing τ , while distinguished values only take other closed terms as parameters. Simulation and bisimulation relations can be defined for Λ⊕ as for any labelled Markov chain. Even if, strictly speaking, these are binary relations on Λ⊕ (∅) ] VΛ⊕ , we often see them just as their restrictions to Λ⊕ (∅). Formally, a probabilistic applicative bisimulation (a PAB) is simply a probabilistic bisimulation on Λ⊕ . This way one can define probabilistic applicative bisimilarity, which is denoted ∼. Similarly for probabilistic applicative simulation (PAS) and probabilistic applicative similarity, denoted .. Remark 3.2 (Early vs. Late) Technically, the distinction between terms and values in Definition 3.1 means that our bisimulation is in late style. In bisimulations for value-passing concurrent languages, “late” indicates the explicit manipulation of functions in the clause for input actions: functions are chosen first, and only later, the input value received is taken into account [46]. Late-style is used in contraposition to early style, where the order of quantifiers is exchanged, so that the choice of functions may depend on the specific input value received. In our setting, adopting N an early style would mean having transitions such as λx.M − → M {N/x}, and then setting up a probabilistic bisimulation on top of the resulting transition system. We leave for future work a study of the comparison between the two styles. In this paper, we stick to the late style because easier to deal with, especially under Howe’s technique. Previous works on applicative bisimulation for nondeterministic functions also focus on the late approach [33, 38]. Remark 3.3 Defining applicative bisimulation in terms of multisorted labelled Markov chains has the advantage of recasting the definition in a familiar framework; most importantly, this formulation will be useful when dealing with Howe’s method. To spell out the explicit operational details of the definition, a probabilistic applicative bisimulation can be seen as an equivalence relation R ⊆ Λ⊕ (∅) × Λ⊕ (∅) such that whenever M R N : 1. [[M ]](E ∩ VΛ⊕ ) = [[N ]](E ∩ VΛ⊕ ), for any equivalence class E of R (that is, the probability of reaching a value in E is the same for the two terms); 2. if M and N are values, say λx.P and λx.Q, then P {L/x} R Q{L/x}, for all L ∈ Λ⊕ (∅). The special treatment of values, in Clause 2., motivates the use of multisorted labelled Markov chains in Definition 3.1. As usual, one way to show that any two terms are bisimilar is to prove that one relation containing the pair in question is a PAB. Terms with the same semantics are indistinguishable: 9 Lemma 3.4 The binary relation R = {(M, N ) ∈ Λ⊕ (∅) × Λ⊕ (∅) s.t. [[M ]] = [[N ]]} VΛ⊕ × VΛ⊕ } is a PAB. U {(V, V ) ∈ Proof. The fact R is an equivalence easily follows from reflexivity, symmetry and transitivity of set-theoretic equality. R must satisfy the following property for closed terms: if M RN , then for every E ∈ VΛ⊕ /R, P⊕ (M, τ, E) = P⊕ (N, τ, E). Notice that if [[M ]] = [[N ]], then clearly P⊕ (M, τ, V ) = P⊕ (N, τ, V ), for every V ∈ VΛ⊕ . With the same hypothesis, X P⊕ (M, τ, E) = P⊕ (M, τ, V ) V ∈E = X P⊕ (N, τ, V ) = P⊕ (N, τ, E). V ∈E Moreover, R must satisfy the following property for cloned values: if νx.M Rνx.N , then for every close term L and for every E ∈ Λ⊕ (∅)/R, P⊕ (νx.M, L, E) = P⊕ (νx.N, L, E). Now, the hypothesis [[νx.M ]] = [[νx.N ]] implies M = N . Then clearly P⊕ (νx.M, L, P ) = P⊕ (νx.N, L, P ) for every P ∈ Λ⊕ (∅). With the same hypothesis, X P⊕ (νx.M, L, E) = P⊕ (νx.M, L, P ) P ∈E = X P⊕ (νx.N, L, P ) = P⊕ (νx.N, L, E). P ∈E This concludes the proof.  Please notice that the previous result yield a nice consequence: for every M, N ∈ Λ⊕ (∅), (λx.M )N ∼ M {N/x}. Indeed, Lemma 2.3 tells us that the latter terms have the same semantics. Conversely, knowing that two terms M and N are (bi)similar means knowing quite a lot about their convergence probability: P P Lemma 3.5 (Adequacy [[M ]] = [[N ]]. Moreover, if P P of Bisimulation) If M ∼ N , then M . N , then [[M ]] ≤ [[N ]]. Proof. X [[M ]] = X P⊕ (M, τ, E) E∈VΛ⊕ /∼ = X P⊕ (N, τ, E) = X [[N ]]. E∈VΛ⊕ /∼ And, X [[M ]] = P⊕ (M, τ, VΛ⊕ ) ≤ P⊕ (N, τ, . (VΛ⊕ )) X = P⊕ (N, τ, VΛ⊕ ) = [[N ]]. This concludes the proof.  Example 3.6 Bisimilar terms do not necessarily have the same semantics. After all, this is one reason for using bisimulation, and its proof method, as basis to prove fine-grained equalities among functions. Let us consider the following terms: def M = ((λx.(x ⊕ x)) ⊕ (λx.x)) ⊕ Ω; def N = Ω ⊕ (λx.Ix); 10 Their semantics differ, as for every value V , we have:  1 if V is λx.(x ⊕ x) or λx.x; 4 [[M ]](V ) = 0 otherwise;  1 if V is λx.Ix; 2 [[N ]](V ) = 0 otherwise. Nonetheless, we can prove M ∼ N . Indeed, νx.(x ⊕ x) ∼ νx.x ∼ νx.Ix because, for every L ∈ Λ⊕ (∅), the three terms L, L ⊕ L and IL all have the same semantics, i.e., [[L]]. Now, consider any equivalence class E of distinguished values modulo ∼. If E includes the three distinguished values above, then P⊕ (M, τ, E) = X [[M ]](V ) = V ∈E X 1 = [[N ]](V ) = P⊕ (N, τ, E). 2 V ∈E Otherwise, P⊕ (M, τ, E) = 0 = P⊕ (N, τ, E). Let us prove the following technical result that, moreover, stipulate that bisimilar distinguished values are bisimilar values. Lemma 3.7 λx.M ∼ λx.N iff νx.M ∼ νx.N iff M {L/x} ∼ N {L/x}, for all L ∈ Λ⊕ (∅). Proof. The first double implication is obvious. For that matter, distinguished values are value terms. Let us now detail the second double implication. (⇒) The fact that ∼ is a PAB implies, by its definition, that for every L ∈ Λ⊕ (∅) and every E ∈ Λ⊕ (∅)/∼, P⊕ (νx.M, L, E) = P⊕ (νx.N, L, E). Suppose then, by contradiction, that M {L/x} 6∼ N {L/x}, for some L ∈ Λ⊕ (∅). The latter means that, there exists F ∈ Λ⊕ (∅)/∼ such that M {L/x} ∈ F and N {L/x} 6∈ F. According to its definition, for all P ∈ Λ⊕ (∅), P⊕ (νx.M, L, P ) = 1 iff P ≡ M {L/x}, and P P⊕ (νx.M, L, P ) = 0 otherwise. Then, since M {L/x} ∈ F, we derive P (νx.M, L, F) = ⊕ P ∈F P⊕ (λx.M, L, P ) ≥ P P⊕ (νx.M, L, M {L/x}) = 1, which implies P ∈F P⊕ (νx.M, L, P ) = P⊕ (νx.M, L, F) = 1. Although νx.N is a distinguished value and the starting reasoning we have just made above still holds, P P⊕ (νx.N, L, F) = P ∈F P⊕ (νx.N, L, P ) = 0. We get the latter because there is no P ∈ F of the form N {L/x} due to the hypothesis that N {L/x} 6∈ F. From the hypothesis on the equivalence class F, i.e. P⊕ (νx.M, L, F) = P⊕ (νx.N, L, F), we derive the absurd: 1 = P⊕ (νx.M, L, F) = P⊕ (νx.N, L, F) = 0. (⇐) We need to prove that, for every L ∈ Λ⊕ (∅) and every E ∈ Λ⊕ (∅)/∼, P⊕ (νx.M, L, E) = L L P⊕ (νx.N, L, E) supposing holds. First of all, let us rewrite P⊕ (νx.M, L, E) P that M { /x} ∼ N { /x} P and P⊕ (νx.N, L, E) as P ∈E P⊕ (νx.M, L, P ) and P ∈E P⊕ (νx.N, L, P ) respectively. Then, from the hypothesis and the same reasoning we have made for (⇒), for every E ∈ Λ⊕ (∅)/∼:   X X 1 if M {L/x} ∈ E; 1 if N {L/x} ∈ E; P⊕ (νx.M, L, P ) = = = P⊕ (νx.N, L, P ) 0 otherwise 0 otherwise P ∈E P ∈E which proves the thesis.  The same result holds for .. 3.1 Probabilistic Applicative Bisimulation is a Congruence In this section, we prove that probabilistic applicative bisimulation is indeed a congruence, and that its non-symmetric sibling is a precongruence. The overall structure of the proof is similar to the one by Howe [22]. The main idea consists in defining a way to turn an arbitrary relation R on (possibly open) terms to another one, RH , in such a way that, if R satisfies a few simple 11 conditions, then RH is a (pre)congruence including R. The key step, then, is to prove that RH is indeed a (bi)simulation. In view of Proposition 2.13, considering similarity suffices here. It is here convenient to work with generalizations of relations called Λ⊕ -relations, i.e. sets of triples in the form (x, M, N ), where M, N ∈ Λ⊕ (x). Thus if a relation has the pair (M, N ) with M, N ∈ Λ⊕ (x), then the corresponding Λ⊕ -relation will include (x, M, N ). (Recall that applicative (bi)similarity is extended to open terms by considering all closing substitutions.) Given any Λ⊕ -relation R, we write x ` M R N if (x, M, N ) ∈ R. A Λ⊕ -relation R is said to be compatible iff the four conditions below hold: (Com1) ∀x ∈ PFIN (X), x ∈ x: x ` x R x, (Com2) ∀x ∈ PFIN (X),∀x ∈ X − x,∀M, N ∈ Λ⊕ (x ∪ {x}): x ∪ {x} ` M R N ⇒ x ` λx.M R λx.N , (Com3) ∀x ∈ PFIN (X),∀M, N, L, P ∈ Λ⊕ (x): x ` M R N ∧ x ` L R P ⇒ x ` M L R N P , (Com4) ∀x ∈ PFIN (X),∀M, N, L, P ∈ Λ⊕ (x): x ` M R N ∧ x ` L R P ⇒ x ` M ⊕ L R N ⊕ P . We will often use the following technical results to establish (Com3) and (Com4) under particular hypothesis. Lemma 3.8 Let us consider the properties (Com3L) ∀x ∈ PFIN (X),∀M, N, L ∈ Λ⊕ (x): x ` M R N ⇒ x ` M L R N L, (Com3R) ∀x ∈ PFIN (X),∀M, N, L ∈ Λ⊕ (x): x ` M R N ⇒ x ` LM R LN . If R is transitive, then (Com3L) and (Com3R) together imply (Com3). Proof. Proving (Com3) means to show that the hypothesis x ` M R N and x ` L R P imply x ` M L R N P . Using (Com3L) on the first one, with L as steady term, it follows x ` M L R N L. Similarly, using (Com3R) on the second one, with N as steady term, it follows x ` N L R N P . Then, we conclude by transitivity property of R.  Lemma 3.9 Let us consider the properties (Com4L) ∀x ∈ PFIN (X),∀M, N, L ∈ Λ⊕ (x): x ` M R N ⇒ x ` M ⊕ L R N ⊕ L, (Com4R) ∀x ∈ PFIN (X),∀M, N, L ∈ Λ⊕ (x): x ` M R N ⇒ x ` L ⊕ M R L ⊕ N . If R is transitive, then (Com4L) and (Com4R) together imply (Com4). Proof. Proving (Com4) means to show that the hypothesis x ` M R N and x ` L R P imply x ` M ⊕ L R N ⊕ P . Using (Com4L) on the first one, with L as steady term, it follows x ` M ⊕ L R N ⊕ L. Similarly, using (Com4R) on the second one, with N as steady term, it follows x ` N ⊕ L R N ⊕ P . Then, we conclude by transitivity property of R.  The notions of an equivalence relation and of a preorder can be straightforwardly generalized to Λ⊕ -relations, and any compatible Λ⊕ -relation that is an equivalence relation (respectively, a preorder) is said to be a congruence (respectively, a precongruence). If bisimilarity is a congruence, then C[M ] is bisimilar to C[N ] whenever M ∼ N and C is a context. In other words, terms can be replaced by equivalent ones in any context. This is a crucial sanity-check any notion of equivalence is expected to pass. It is well-known that proving bisimulation to be a congruence may be nontrivial when the underlying language contains higher-order functions. This is also the case here. Proving (Com1), (Com2) and (Com4) just by inspecting the operational semantics of the involved terms is indeed possible, but the method fails for (Com3), when the involved contexts contain applications. In particular, proving (Com3) requires probabilistic applicative bisimilarity of being stable with respect to substitution of bisimilar terms, hence not necessarily the same. In general, a Λ⊕ -relation R is called (term) substitutive if for all x ∈ PFIN (X), x ∈ X − x, M, N ∈ Λ⊕ (x ∪ {x}) and L, P ∈ Λ⊕ (x) x ∪ {x} ` M R N ∧ x ` L R P ⇒ x ` M {L/x} R N {P/x}. (1) Note that if R is also reflexive, then this implies x ∪ {x} ` M R N ∧ L ∈ Λ⊕ (x) ⇒ x ` M {L/x} R N {L/x}. (2) We say that R is closed under term-substitution if it satisfies (2). Because of the way the open extension of ∼ and . are defined, they are closed under term-substitution. 12 x ` x R M (How1) x ` x RH M x ∪ {x} ` M RH L x ` λx.L R N x ` λx.M R x ` M RH P x ` M RH P x ` N RH Q x ` M N RH L H x∈ /x N x ` PQ R L (How2) (How3) x ` N RH Q x`P ⊕QRL (How4) H x`M ⊕N R L Figure 3: Howe’s Lifting for Λ⊕ . Unfortunately, directly prove . to enjoy such substitutivity property is hard. We will thus proceed indirectly by defining, starting from ., a new relation .H , called the Howe’s lifting of ., that has such property by construction and that can be proved equal to .. Actually, the Howe’s lifting of any Λ⊕ -relation R is the relation RH defined by the rules in Figure 3. The reader familiar with Howe’s method should have a sense of déjà vu here: indeed, this is precisely the same definition one finds in the realm of nondeterministic λ-calculi. The language of terms, after all, is the same. This facilitates the first part of the proof. Indeed, one already knows that if R is a preorder, then RH is compatible and includes R, since all these properties are already known (see, e.g. [38]) and only depend on the shape of terms and not on their operational semantics. Lemma 3.10 If R is reflexive, then RH is compatible. Proof. We need to prove that (Com1), (Com2), (Com3), and (Com4) hold for RH : • Proving (Com1) means to show: ∀x ∈ PFIN (X), x ∈ x ⇒ x ` x RH x. Since R is reflexive, ∀x ∈ PFIN (X), x ∈ x ⇒ x ` x R x. Thus, by (How1), we conclude x ` x RH x. Formally, x ` x R x (How1) x ` x RH x • Proving (Com2) means to show: ∀x ∈ PFIN (X), ∀x ∈ X − x, ∀M, N ∈ Λ⊕ (x ∪ {x}), x ∪ {x} ` M RH N ⇒ x ` λx.M RH λx.N. Since R is reflexive, we get x ` λx.N R λx.N . Moreover, we have x ∪ {x} ` M RH N by hypothesis. Thus, by (How2), we conclude x ` λx.M RH λx.N holds. Formally, x ∪ {x} ` M RH N x ` λx.N R λx.N x∈ /x x ` λx.M RH λx.N (How2) • Proving (Com3) means to show: ∀x ∈ PFIN (X), ∀M, N, L, P ∈ Λ⊕ (x), x ` M RH N ∧ x ` L RH P ⇒ x ` M L RH N P. Since R is reflexive, we get x ` N P R N P . Moreover, we have x ` M RH N and x ` L RH P by hypothesis. Thus, by (How3), we conclude x ` M L RH N P holds. Formally, x ` M RH N x ` L RH P x ` N P R N P (How3) x ` M L RH N P 13 • Proving (Com4) means to show: ∀x ∈ PFIN (X), ∀M, N, L, P ∈ Λ⊕ (x), x ` M RH N ∧ x ` L RH P ⇒ x ` M ⊕ L RH N ⊕ P. Since R is reflexive, we get x ` N ⊕ P R N ⊕ P . Moreover, we have x ` M RH N and x ` L RH P by hypothesis. Thus, by (How4), we conclude x ` M ⊕ L RH N ⊕ P holds. Formally, x ` M RH N x ` L RH P x`N ⊕P RN ⊕P (How4) x ` M ⊕ L RH N ⊕ P This concludes the proof.  Lemma 3.11 If R is transitive, then x ` M RH N and x ` N R L imply x ` M RH L. Proof. We prove the statement by inspection on the last rule used in the derivation of x ` M RH N , thus on the structure of M . • If M is a variable, say x ∈ x, then x ` x RH N holds by hypothesis. The last rule used has to be (How1). Thus, we get x ` x R N as additional hypothesis. By transitivity of R, from x ` x R N and x ` N R L we deduce x ` x R L. We conclude by (How1) on the latter, obtaining x ` x RH L, i.e. x ` M RH L. Formally, x`xRN x`N RL x ` x R L (How1) x ` x RH L • If M is a λ-abstraction, say λx.Q, then x ` λx.Q RH N holds by hypothesis. The last rule used has to be (How2). Thus, we get x ∪ {x} ` Q RH P and x ` λx.P R N as additional hypothesis. By transitivity of R, from x ` λx.P R N and x ` N R L we deduce x ` λx.P R L. We conclude by (How2) on x ∪ {x} ` Q RH P and the latter, obtaining x ` λx.Q RH L, i.e. x ` M RH L. Formally, x ` λx.P R N x`N RL x ` λx.P R L (How2) x ` λx.Q RH L x ∪ {x} ` Q RH P • If M is an application, say RS, then x ` RS RH N holds by hypothesis. The last rule used has to be (How3). Thus, we get x ` R RH P , x ` S RH Q and x ` P Q R N as additional hypothesis. By transitivity of R, from x ` P Q R N and x ` N R L we deduce x ` P Q R L. We conclude by (How3) on x ` R RH P , x ` S RH Q and the latter, obtaining x ` RS RH L, i.e. x ` M RH L. Formally, x`RR H P H x`SR Q x ` RS RH x ` PQ R N x`N RL x ` PQ R L (How3) L • If M is a probabilistic sum, say R ⊕ S, then x ` R ⊕ S RH N holds by hypothesis. The last rule used has to be (How4). Thus, we get x ` R RH P , x ` S RH Q and x ` P ⊕ Q R N as additional hypothesis. By transitivity of R, from x ` P ⊕ Q R N and x ` N R L we deduce x ` P ⊕ Q R L. We conclude by (How4) on x ` R RH P , x ` S RH Q and the latter, obtaining x ` R ⊕ S RH L, i.e. x ` M RH L. Formally, x ` R RH P x`P ⊕QRN x`N RL x ` S RH Q x`P ⊕QRL (How4) x ` R ⊕ S RH L This concludes the proof.  14 Lemma 3.12 If R is reflexive, then x ` M R N implies x ` M RH N . Proof. We will prove it by inspection on the structure of M . • If M is a variable, say x ∈ x, then x ` x R N holds by hypothesis. We conclude by (How1) on the latter, obtaining x ` x RH N , i.e. x ` M RH N . Formally, x ` x R N (How1) x ` x RH N • If M is a λ-abstraction, say λx.Q, then x ` λx.Q R N holds by hypothesis. Moreover, since R reflexive implies RH compatible, RH is reflexive too. Then, from x ∪ {x} ` Q RH Q and x ` λx.Q R N we conclude, by (How2), x ` λx.Q RH N , i.e. x ` M RH N . Formally, x ∪ {x} ` Q RH Q x ` λx.Q R N x∈ /x x ` λx.Q RH N (How2) • If M is an application, say LP , then x ` LP R N holds by hypothesis. By reflexivity of R, hence that of RH too, we get x ` L RH L and x ` P RH P . Then, from the latter and x ` LP R N we conclude, by (How3), x ` LP RH N , i.e. x ` M RH N . Formally, x ` L RH L x ` P RH P x ` LP RH N x ` LP R N (How3) • If M is a probabilistic sum, say L ⊕ P , then x ` L ⊕ P R N holds by hypothesis. By reflexivity of R, hence that of RH too, we get x ` L RH L and x ` P RH P . Then, from the latter and x ` L ⊕ P R N we conclude, by (How4), x ` L ⊕ P RH N , i.e. x ` M RH N . Formally, x ` L RH L x ` P RH P x`L⊕P RN (How4) H x`L⊕P R N This concludes the proof.  Moreover, if R is a preorder and closed under term-substitution, then its lifted relation RH is substitutive. Then, reflexivity of R implies compatibility of RH by Lemma 3.10. It follows RH reflexive too, hence closed under term-substitution. Lemma 3.13 If R is reflexive, transitive and closed under term-substitution, then RH is (term) substitutive and hence also closed under term-substitution. Proof. We show that, for all x ∈ PFIN (X), x ∈ X − x, M, N ∈ Λ⊕ (x ∪ {x}) and L, P ∈ Λ⊕ (x), x ∪ {x} ` M RH N ∧ x ` L RH P ⇒ x ` M {L/x} RH N {P/x}. We prove the latter by induction on the derivation of x ∪ {x} ` M RH N , thus on the structure of M. • If M is a variable, then either M = x or M ∈ x. In the latter case, suppose M = y. Then, by hypothesis, x ∪ {x} ` y RH N holds and the only way to deduce it is by rule (How1) from x ∪ {x} ` y R N . Hence, by the fact R is closed under term-substitution and P ∈ Λ⊕ (x), we obtain x ` y{P/x} R N {P/x} which is equivalent to x ` y R N {P/x}. Finally, by Lemma 3.12, we conclude x ` y RH N {P/x} which is equivalent to x ` y{L/x} RH N {P/x}, i.e. x ` M {L/x} RH N {P/x} holds. Otherwise, M = x and x ∪ {x} ` x RH N holds. The only way to deduce the latter is by the rule (How1) from x ∪ {x} ` x R N . Hence, by the fact R is closed under term-substitution and P ∈ Λ⊕ (x), we obtain x ` x{P/x} R N {P/x} which is equivalent to x ` P R N {P/x}. By Lemma 3.11, we deduce the following: x ` L RH P x ` P R N {P/x} x ` L RH N {P/x} which is equivalent to x ` x{L/x} RH N {P/x}. Thus, x ` M {L/x} RH N {P/x} holds. 15 • If M is a λ-abstraction, say λy.Q, then x ∪ {x} ` λy.Q RH N holds by hypothesis. The only way to deduce the latter is by rule (How2) as follows: x ∪ {x, y} ` Q RH R x ∪ {x} ` λy.R R N x, y ∈ /x x ∪ {x} ` λy.Q RH N (How2) Let us denote y = x ∪ {y}. Then, by induction hypothesis on y ∪ {x} ` Q RH R, we get y ` Q{L/x} RH R{P/x}. Moreover, by the fact R is closed under term-substitution and P ∈ Λ⊕ (x), we obtain that x ` (λy.R){P/x} R N {P/x} holds, i.e. x ` λy.R{P/x} R N {P/x}. By (How2), we deduce the following: x ∪ {y} ` Q{L/x} RH R{P/x} x ` λy.R{P/x} R N {P/x} H x ` λy.Q{L/x} R y∈ /x N {P/x} (How2) which is equivalent to x ` (λy.Q){L/x} RH N {P/x}. Thus, x ` M {L/x} RH N {P/x} holds. • If M is an application, say QR, then x ∪ {x} ` QR RH N holds by hypothesis. The only way to deduce the latter is by rule (How3) as follows: x ∪ {x} ` Q RH Q0 x ∪ {x} ` R RH R0 x ∪ {x} ` Q0 R0 R N x ∪ {x} ` QR RH N (How3) By induction hypothesis on x ∪ {x} ` Q RH Q0 and x ∪ {x} ` R RH R0 , we get x ` Q{L/x} RH Q0 {P/x} and x ` R{L/x} RH R0 {P/x}. Moreover, by the fact R is closed under term-substitution and P ∈ Λ⊕ (x), we obtain that x ` (Q0 R0 ){P/x} R N {P/x} holds, i.e. x ` Q0 {P/x}R0 {P/x} R N {P/x}. By (How3), we deduce the following: x ` Q{L/x} RH Q0 {P/x} x ` R{L/x} RH R0 {P/x} x ` Q0 {P/x}R0 {P/x} R N {P/x} x ` Q{L/x}R{L/x} RH N {P/x} (How3) which is equivalent to x ` (QR){L/x} RH N {P/x}. Thus, x ` M {L/x} RH N {P/x} holds. • If M is a probabilistic sum, say Q ⊕ R, then x ∪ {x} ` Q ⊕ R RH N holds by hypothesis. The only way to deduce the latter is by rule (How4) as follows: x ∪ {x} ` Q RH Q0 x ∪ {x} ` R RH R0 H x ∪ {x} ` Q ⊕ R R x ∪ {x} ` Q0 ⊕ R0 R N N (How4) By induction hypothesis on x ∪ {x} ` Q RH Q0 and x ∪ {x} ` R RH R0 , we get x ` Q{L/x} RH Q0 {P/x} and x ` R{L/x} RH R0 {P/x}. Moreover, by the fact R is closed under term-substitution and P ∈ Λ⊕ (x), we obtain that x ` (Q0 ⊕ R0 ){P/x} R N {P/x}, i.e. x ` Q0 {P/x} ⊕ R0 {P/x} R N {P/x}. By (How4), we conclude the following: x ` Q{L/x} RH Q0 {P/x} x ` R{L/x} RH R0 {P/x} x ` Q0 {P/x} ⊕ R0 {P/x} R N {P/x} x ` Q{L/x} ⊕ R{L/x} RH N {P/x} which is equivalent to x ` (Q ⊕ R){L/x} RH N {P/x}. Thus, x ` M {L/x} RH N {P/x} holds. This concludes the proof.  Something is missing, however, before we can conclude that .H is a precongruence, namely transitivity. We also follow Howe here building the transitive closure of a Λ⊕ -relation R as the relation R+ defined by the rules in Figure 4. Then, it is easy to prove R+ of being compatible and closed under term-substitution if R is. Lemma 3.14 If R is compatible, then so is R+ . Proof. We need to prove that (Com1), (Com2), (Com3), and (Com4) hold for R+ : 16 (How4) x ` M R N (TC1) x ` M R+ N x ` M R+ N x ` N R+ L (TC2) + x`M R L Figure 4: Transitive Closure for Λ⊕ . • Proving (Com1) means to show: ∀x ∈ PFIN (X), x ∈ x ⇒ x ` x R x. Since R is compatible, therefore reflexive, x ` x R x holds. Hence x ` x R+ x follows by (TC1). • Proving (Com2) means to show: ∀x ∈ PFIN (X), ∀x ∈ X − x, ∀M, N ∈ Λ⊕ (x ∪ {x}), x ∪ {x} ` M R+ N ⇒ x ` λx.M R+ λx.N. We prove it by induction on the derivation of x ∪ {x} ` M R+ N , looking at the last rule used. The base case has (TC1) as last rule: thus, x ∪ {x} ` M R N holds. Then, since R is compatible, it follows x ` λx.M R λx.N . We conclude applying (TC1) on the latter, obtaining x ` λx.M R+ λx.N . Otherwise, if (TC2) is the last rule used, we get that, for some L ∈ Λ⊕ (x ∪ {x}), x ∪ {x} ` M R+ L and x ∪ {x} ` L R+ N hold. Then, by induction hypothesis on both of them, we have x ` λx.M R+ λx.L and x ` λx.L R+ λx.N . We conclude applying (TC2) on the latter two, obtaining x ` λx.M R+ λx.N . • Proving (Com3) means to show: ∀x ∈ PFIN (X), ∀M, N, L, P ∈ Λ⊕ (x), x ` M R+ N ∧ x ` L R+ P ⇒ x ` M L R+ N P. Firstly, we prove the following two characterizations: ∀M, N, L, P ∈ Λ⊕ (x). x ` M R+ N ∧ x ` L R P ⇒ x ` M L R+ N P, + + ∀M, N, L, P ∈ Λ⊕ (x). x ` M R N ∧ x ` L R P ⇒ x ` M L R N P. (3) (4) In particular, we only prove (3) in details, since (4) is similarly provable. We prove (3) by induction on the derivation x ` M R+ N , looking at the last rule used. The base case has (TC1) as last rule: we get that x ` M R N holds. Then, using R compatibility property and x ` L R P , it follows x ` M L R N P . We conclude applying (TC1) on the latter, obtaining x ` M L R+ N P . Otherwise, if (TC2) is the last rule used, we get that, for some Q ∈ Λ⊕ , x ` M R+ Q and x ` Q R+ N hold. Then, by induction hypothesis on x ` M R+ Q along with x ` L R P , we have x ` M L R+ QP . Then, since R is compatible and so reflexive too, x ` P R P holds. By induction hypothesis on x ` Q R+ N along with the latter, we get x ` QP R+ N P . We conclude applying (TC2) on x ` M L R+ QP and x ` QP R+ N P , obtaining x ` M L R+ N P . Let us focus on the original (Com3) statement. We prove it by induction on the two derivations x ` M R+ N and x ` L R+ P , which we name here as π and ρ respectively. Looking at the last rules used, there are four possible cases as four are the combinations that permit to conclude with π and ρ: 1. (TC1) for both π and ρ; 2. (TC1) for π and (TC2) for ρ; 3. (TC2) for π and (TC1) for ρ; 4. (TC2) for both π and ρ. Observe now that the first three cases are addressed by (3) and (4). Hence, it remains to prove the last case, where both derivations are concluded applying (TC2) rule. According to (TC2) rule definition, we get two additional hypothesis from each derivation. In particular, for π, we get that, for some Q ∈ Λ⊕ (x), x ` M R+ Q and x ` Q R+ N hold. Similarly, for ρ, we get 17 that, for some R ∈ Λ⊕ (x), x ` L R+ R and x ` R R+ P hold. Then, by a double induction hypothesis, firstly on x ` M R+ Q, x ` L R+ R and secondly on x ` Q R+ N , x ` R R+ P , we get x ` M L R+ QR and x ` QR R+ N P respectively. We conclude applying (TC2) on these latter, obtaining x ` M L R+ N P . • Proving (Com4) means to show: ∀x ∈ PFIN (X), ∀M, N, L, P ∈ Λ⊕ (x), x ` M R+ N ∧ x ` L R+ P ⇒ x ` M ⊕ L R+ N ⊕ P. We do not detail the proof since it boils down to that of (Com3), where partial sums play the role of applications. This concludes the proof.  Lemma 3.15 If R is closed under term-substitution, then so is R+ . Proof. We need to prove R+ of being closed under term-substitution: for all x ∈ PFIN (X), x ∈ X−x, M, N ∈ Λ⊕ (x ∪ {x}) and L, P ∈ Λ⊕ (x), x ∪ {x} ` M R+ N ∧ L ∈ Λ⊕ (x) ⇒ x ` M {L/x} R+ N {L/x}. We prove the latter by induction on the derivation of x ∪ {x} ` M R+ N , looking at the last rule used. The base case has (TC1) as last rule: we get that x ∪ {x} ` M R N holds. Then, since R is closed under term-substitution, it follows x ` M {L/x} R N {L/x}. We conclude applying (TC1) on the latter, obtaining x ` M {L/x} R+ N {L/x}. Otherwise, if (TC2) is the last rule used, we get that, for some P ∈ Λ⊕ (x ∪ {x}), x ∪ {x} ` M R+ P and x ∪ {x} ` P R+ N hold. Then, by induction hypothesis on both of them, we have x ` M {L/x} R+ P {L/x} and x ` P {L/x} R+ N {L/x}. We conclude applying (TC2) on the latter two, obtaining x ` M {L/x} R+ N {L/x}.  It is important to note that the transitive closure of an already Howe’s lifted relation is a preorder if the starting relation is. Lemma 3.16 If a Λ⊕ -relation R is a preorder relation, then so is (RH )+ . Proof. We need to show (RH )+ of being reflexive and transitive. Of course, being a transitive closure, (RH )+ is a a transitive relation. Moreover, since R is reflexive, by Lemma 3.10, RH is reflexive too because compatible. Then, by Lemma 3.14, so is (RH )+ .  This is just the first half of the story: we also need to prove that (.H )+ is a simulation. As we already know it is a preorder, the following lemma gives us the missing bit: Lemma 3.17 (Key Lemma) If M .H N , then for every X ⊆ Λ⊕ (x) it holds that [[M ]](λx.X) ≤ [[N ]](λx.(.H (X))). The proof of this lemma is delicate and is discussed in the next section. From the lemma, using a standard argument we derive the needed substitutivity results, and ultimately the most important result of this section. Theorem 3.18 . is a precongruence relation for Λ⊕ -terms. Proof. We prove the result by observing that (.H )+ is a precongruence and by showing that .= (.H )+ . First of all, Lemma 3.10 and Lemma 3.14 ensure that (.H )+ is compatible and Lemma 3.16 tells us that (.H )+ is a preorder. As a consequence, (.H )+ is a precongruence. Consider now the inclusion .⊆ (.H )+ . By Lemma 3.12 and by definition of transitive closure operator (·)+ , it follows that . ⊆ (.H ) ⊆ (.H )+ . We show the converse by proving that (.H )+ is included in a relation R that is a call-by-name probabilistic applicative simulation, therefore contained in the largest one. In particular, since (.H )+ is closed under term-substitution (Lemma 3.13 and Lemma 3.15), it suffices to show the latter only on the closed version of terms and cloned values. R acts like (.H )+ on terms, while given two cloned values νx.M and νx.N , (νx.M )R(νx.N ) iff M (.H )+ N . Since we already know that (.H )+ is a preorder (and thus R is itself a preorder), all that remain to be checked are the following two points: 18 • If M (.H )+ N , then for every X ⊆ Λ⊕ (x) it holds that P⊕ (M, τ, νx.X) ≤ P⊕ (N, τ, R(νx.X)). (5) Let us proceed by induction on the structure of the proof of M (.H )+ N : • The base case has (TC1) as last rule: we get that ∅ ` M .H N holds. Then, in particular by Lemma 3.17, P⊕ (M, τ, νx.X) = [[M ]](λx.X) ≤ [[N ]](λx..H (X)) ≤ [[N ]](λx.(.H )+ (X)) ≤ [[N ]](R(νx.X)) = P⊕ (N, τ, R(νx.X)). • If (TC2) is the last rule used, we obtain that, for some P ∈ Λ⊕ (∅), ∅ ` M (.H )+ P and ∅ ` P (.H )+ N hold. Then, by induction hypothesis, we get P⊕ (M, τ, X) ≤ P⊕ (P, τ, R(X)), P⊕ (P, τ, R(X)) ≤ P⊕ (N, τ, R(R(X))). But of course R(R(X)) ⊆ R(X), and as a consequence: P⊕ (M, τ, X) ≤ P⊕ (N, τ, R(X)) and (5) is satisfied. • If M (.H )+ N , then for every L ∈ Λ⊕ (∅) and for every X ⊆ Λ⊕ (∅) it holds that P⊕ (νx.M, L, X) ≤ P⊕ (νx.N, L, R(X)). But if M (.H )+ N , then M {L/x}(.H )+ N {L/x}. This is means that whenever M {L/x} ∈ X, N {L/x} ∈ .H (X) ⊆ (.H )+ (X) and ultimately P⊕ (νx.M, L, X) = 1 = P⊕ (νx.N, L, (.H )+ (X)) = P⊕ (νx.N, L, R(X)). If M {L/x} ∈ / X, on the other hand, P⊕ (νx.M, L, X) = 0 ≤ P⊕ (νx.N, L, R(X)). This concludes the proof.  Corollary 3.19 ∼ is a congruence relation for Λ⊕ -terms. Proof. ∼ is an equivalence relation by definition, in particular a symmetric relation. Since ∼=. ∩ .op by Proposition 2.13, ∼ is also compatible as a consequence of Theorem 3.18.  3.2 Proof of the Key Lemma As we have already said, Lemma 3.17 is indeed a crucial step towards showing that probabilistic applicative simulation is a precongruence. Proving the Key Lemma 3.17 turns out to be much more difficult than for deterministic or nondeterministic cases. In particular, the case when M is an application relies on another technical lemma we are now going to give, which itself can be proved by tools from linear programming. The combinatorial problem we will face while proving the Key Lemma can actually be decontextualized and understood independently. Suppose we have n = 3 non-disjoint sets X1 , X2 , X3 19 X2 1 16 1 8 1 64 1 32 1 16 X3 1 64 1 32 X1 (a) Y1 1 32 1 64 Y2 1 8 0 1 32 1 32 Y3 1 32 1 32 0 1 64 1 64 1 64 (b) Figure 5: Disentangling Sets whose elements are labelled with real numbers. As an example, we could be in a situation like the one in Figure 5(a) (where for the sake of simplicity only the labels are indicated). We fix def 5 64 , three real numbers p1 = it holds that def 3 16 , p2 = def 5 p3 = 64 . It is routine to check that for every I ⊆ {1, 2, 3} X [ pi ≤ || Xi ||, i∈I i∈I where ||X|| is the sum of the labels of the elements of X. Let us observe that it is of course possible to turn the three sets X1 , X2 , X3 into three disjoint sets Y1 , Y2 and Y3 where each Yi contains (copies of) the elements of Xi whose labels, however, are obtained by splitting the ones of the original elements. Examples of those sets are in Figure 5(b): if you superpose the three sets, you obtain the Venn diagram we started from. Quite remarkably, however, the examples from Figure 5 have an additional property, namely that for every i ∈ {1, 2, 3} it holds that pi ≤ ||Yi ||. We now show that finding sets satisfying the properties above is always possible, even when n is arbitrary. Suppose p1 , . . . , pn ∈ R[0,1] , and suppose that for each P I ⊆ {1, . . . ,P n} a real number rI ∈ R[0,1] is defined such that for every such I it holds that p ≤ i∈I i J∩I6=∅ rJ ≤ 1. Then ({pi }1≤i≤n , {rI }I⊆{1,...,n} ) is said to be a probability assignment for {1, . . . , n}. Is it always possible to “disentangle” probability assignments? The answer is positive. The following is a formulation of Max-Flow-Min-Cut Theorem: Theorem 3.20 (Max-Flow-Min-Cut) For any flow network, the value of the maximum flow is equal to the capacity of the minimum cut. def Lemma 3.21 (Disentangling Probability Assignments) Let P = ({pi }1≤i≤n , {rI }I⊆{1,...,n} ) be a probability assignment. Then for every nonempty I ⊆ {1, . . . , n} and for every k ∈ I there is sk,I ∈ R[0,1] such that the following conditions all hold: P 1. for every I, it holds that k∈I sk,I ≤ 1; P 2. for every k ∈ {1, . . . , n}, it holds that pk ≤ k∈I sk,I · rI . Proof. For every probability assignment P, let us define the flow network of P as the digraph def NP = (VP , EP ) where: def • VP = (P({1, . . . , n}) − ∅) ∪ {s, t}, where s, t are a distinguished source and target, respectively; 20 • EP is composed by three kinds of edges: • (s, {i}) for every i ∈ {1, . . . , n}, with an assigned capacity of pi ; • (I, I ∪ {i}), for every nonempty I ⊆ {1, . . . , n} and i 6∈ I, with an assigned capacity of 1; • (I, t), for every nonempty I ⊆ {1, . . . , n}, with an assigned capacity of rI . We prove the following two lemmas on NP which together entail the result. P • Lemma 3.22 If NP admits a flow summing to i∈{1,...,n} pi , then the sk,I exist for which conditions 1. and 2. hold. def P Proof. Let us fix p = i∈{1,...,n} pi . The idea then is to start with a flow of value p in input to the source s, which by hypothesis is admitted by NP and the maximum one can get, and split it into portions going to singleton vertices {i}, for every i ∈ I, each of value pi . Afterwards, for every other vertex I ⊆ {1, . . . , n}, values of flows on the incoming edges are summed up and then distributed to the outgoing adges as one wishes, thanks to conservation property of the flow. Formally, a flow f : Ep → R[0,1] is turned into a function f : Ep → (R[0,1] )n defined as follows: def • For every i ∈ {1, . . . , n}, f (s,{i}) = (0, . . . , f(s,{i}) , . . . , 0), where the only possibly nonnull component is exactly the i-th; • For every nonempty I ⊆ {1, . . . , n}, as soon as f has been defined on all ingoing edges of I, we can define it on all its outgoing ones, by just splitting each component as we want. This is possible, of course, because f is a flow and, as such, ingoing and outgoing values are the def P same. More formally, let us fix f (∗,I) = K⊆{1,...,n} f (K,I) and indicate with f (∗,I),k its def k-th component. Then, for every i 6∈ I, we set f (I,I∪{i}) = (q1,i · f (∗,I),1 , . . . , qn,i · f (∗,I),n ) P where, for every j ∈ {1, . . . , n}, qj,i ∈ R[0,1] are such that i6∈I qj,i · f (∗,I),j = f (∗,I),j and Pn j=1 qj,i · f (∗,I),j = f(I,I∪{i}) . Of course, a similar definition can be given to f (I,t) , for every nonempty I ⊆ {1, . . . , n}. Notice that, the way we have just defined f guarantees that the sum of all components of f e is always equal to fe , for every e ∈ EP . Now, for every nonempty I ⊆ {1, . . . , n}, fix sk,I to be the ratio qk of f (I,t) ; i.e., the k-th component of f (I,t) (or 0 if the first is itself 0). On the one hand, P for every nonempty I ⊆ {1, . . . , n}, k∈I sk,I is obviously less or equal to 1, hence condition 1. holds. On the other, each component of f is itself a flow, since it satisfies the capacity and conservation constraints. Moreover, NP is structured in such a way that the k-th component of f (I,t) is 0 whenever k 6∈ I. As a consequence, since f satisfies the capacity constraint, for every k ∈ {1, . . . , n}, X X pk ≤ sk,I · f (I,t) ≤ sk,I · rI k∈I k∈I and so condition 2. holds too.  P • Lemma 3.23 NP admits a flow summing to i∈I pi . Proof. We prove the result by means of Theorem 3.20. In particular, we just prove that the def P capacity of any cut must be at least p = i∈{1,...,n} pi . A cut (S, A) is said to be degenerate if there are I ⊆ {1, . . . , n} and i ∈ {1, . . . , n} such that I ∈ S and I ∪ {i} ∈ A. It is easy to verify that every degenerate cut has capacity greater or equal to 1, thus greater or equal to p. As a consequence, we can just concentrate on non-degenerate cuts and prove that all of them have def def capacity at least p. Given two cuts C = (S, A) and D = (T, B), S we say that C ≤ D iff S ≤ T . Then, given I ⊆ {1, . . . , n}, we call I-cut any cut (S, A) such that {i}∈S {i} = I. The canonical def I-cut is the unique I-cut CI = (S, A) such that S = {s} ∪ {J ⊆ {1, . . . , n} | J ∩ I 6= ∅}. Please observe that, by definition, CI is non-degenerate and that the capacity c(CI ) of CI is at least p, because the forward edges in CI (those connecting elements of S to those of A) are those going from s to the singletons not in S, plus the edges going from any J ∈ S to t. The sum of the capacities of such edges are greater or equal to p by hypothesis. We now need to prove the following two lemmas. • Lemma 3.24 For every non-degenerate I-cuts C, D such that C > D, there is a nondegenerate I-cut E such that C ≥ E > D and c(E) ≥ c(D). 21 def def Proof. Let C = (S, A) and D = (T, B). Moreover, let J be any element of S\T . Then, def consider E = (T ∪ {K ⊆ {1, . . . , n} | J ⊆ K}, B\{K ⊆ {1, . . . , n} | J ⊆ K}) and verify that E is the cut we are looking for. Indeed, E is non-degenerate because it is obtained from D, which is non-degenerate by hypothesis, by adding to it J and all its supersets. Of course, E > D. Moreover, C ≥ E holds since J ∈ S and C is non-degenerate, which implies C contains all supersets of J as well. It is also easy to check that c(E) ≥ c(D). In fact, in the process of constructing E from D we do not lose any forward edges coming from s, since J cannot be a singleton with C and D both I-cuts, or any other edge coming from some element of T , since D is non-degenerate.  • Lemma 3.25 For every non-degenerate I-cuts C, D such that C ≥ D, c(C) ≥ c(D). def def Proof. Let C = (S, A) and D = (T, B). We prove the result by induction on the def n = |S| − |T |. If n = 0, then C = D and the thesis follows. If n > 0, then C > D and, by Lemma 3.24, there is a non-degenerate I-cut E such that C ≥ E > D and c(E) ≥ c(D). By induction hypothesis on C and E, it follows that c(C) ≥ c(E). Thus, c(C) ≥ c(D).  The two lemmas above permit to conclude. Indeed, for every non-degenerate cut D, there is of course a I such that D is a I-cut (possibly with I as the empty set). Then, let us consider the canonical CI . On the one hand, c(CI ) ≥ p. On the other, since CI is non-degenerate, c(D) ≥ c(CI ) by Lemma 3.25. Hence, c(D) ≥ p.  This concludes the main proof.  In the coming proof of Lemma 3.17 we will widely, and often implicitly, use the following technical Lemmas. We denote with νx. . (X) the set of distinguished values {νx.M | ∃N ∈ X. N . M }. Lemma 3.26 For every X ⊆ Λ⊕ (x), . (νx.X) = νx. . (X). Proof. νx.M ∈. (νx.X) ⇔ ∃N ∈ X. νx.N . νx.M ⇔ ∃N ∈ X. N . M ⇔ νx.M ∈ νx. . (X). This concludes the proof.  Lemma 3.27 If M . N , then for every X ∈ Λ⊕ (x), [[M ]](λx.X) ≤ [[N ]](λx. . (X)). Proof. If M . N , then by definition [[M ]](νx.X) ≤ [[N ]](. (νx.X)). Therefore, by Lemma 3.26, [[N ]](. (νx.X)) ≤ [[N ]](νx. . (X)).  Remark 3.28 Throughout the following proof we will implicitly use a routine result stating that M . N implies [[M ]](λx.X) ≤ [[N ]](λx..(X)), for every X ⊆ Λ⊕ (x). The property needed by the latter is precisely the reason why we have formulated Λ⊕ as a multisorted labelled Markov chain: .(νx.X) consists of distinguished values only, and is nothing but νx..(X). Proof. [of Lemma 3.17] This is equivalent to proving that if M .H N , then for every X ⊆ Λ⊕ (x) the following implication holds: if M ⇓ D, then D(λx.X) ≤ [[N ]](λx.(.H (X))). This is an induction on the structure of the proof of M ⇓ D. • If D = ∅, then of course D(λx.X) = 0 ≤ [[N ]](λx.Y ) for every X, Y ⊆ Λ⊕ (x). • If M is a value λx.L and D(λx.L) = 1, then the proof of M .H N necessarily ends as follows: {x} ` L .H P ∅ ` λx.P . N ∅ ` λx.L .H N Let X be any subset of Λ⊕ (x). Now, if L 6∈ X, then D(λx.X) = 0 and the inequality trivially holds. If, on the contrary, L ∈ X, then P ∈ .H (X). Consider . (P ), the set of terms that 22 are in relation with P via .. We have that for every Q ∈ . (P ), both {x} ` L .H P and {x} ` P . Q hold, and as a consequence {x} ` L .H Q does (this is a consequence of a H property of (·) , see [9]). In other words, . (P ) ⊆ .H (X). But then, by Lemma 3.27, [[N ]](λx..H (X)) ≥ [[N ]](λx. . (P )) ≥ [[λx.P ]](λx.P ) = 1. • If M is an application LP , then M ⇓ D is obtained as follows: L⇓F {Q{P/x} ⇓ HQ,P }Q,P P LP ⇓ Q F (λx.Q) · HQ,P Moreover, the proof of ∅ ` M .H N must end as follows: ∅ ` L .H R ∅ ` P .H S ∅ ` LP . H ∅ ` RS . N N Now, since L ⇓ F and ∅ ` L .H R, by induction hypothesis we get that for every Y ⊆ Λ⊕ (x) it holds that F (λx.Y ) ≤ [[R]](λx..H (Y )). Let us now take a look at the distribution X D= F (λx.Q) · HQ,P . Q Since F is a finite distribution, the sum above is actually the sum of finitely many summands. Let the support S(F ) of F be {λx.Q1 , . . . , λx.Qn }. It is now time to put the above into a form that is amenable to treatment by Lemma 3.21. Let us consider the n sets .H (Q1 ), . . . , .H (Qn ); to each term U in them we can associate the probability [[R]](λx.U ). We are then in the scope of Lemma 3.21, since by induction hypothesis we know that for every Y ⊆ Λ⊕ (x), F (λx.X) ≤ [[R]](λx..H (X)). We can then conclude that for every U ∈ .H ({Q1 , . . . , Qn }) = [ .H (Qi ) 1≤i≤n there are n real numbers r1U,R , . . . , rnU,R such that: X U,R [ ri ∀U ∈ .H (Qi ); [[R]](λx.U ) ≥ 1≤i≤n 1≤i≤n X F (λx.Qi ) ≤ riU,R ∀ 1 ≤ i ≤ n. U ∈.H (Qi ) So, we can conclude that  D≤ X riU,R  · HQi ,P  1≤i≤n =  X X H U ∈. (Qi ) X riU,R · HQi ,P . 1≤i≤n U ∈.H (Qi ) Now, whenever Qi .H U and P .H S, we know that, by Lemma 3.13, Qi {P/x}.H U {S/x}. We can then apply the inductive hypothesis to the n derivations of Qi {P/x} ⇓ HQi ,P , obtaining 23 that, for every X ⊆ Λ⊕ (x), X D(λx.X) ≤ riU,R · [[U {S/x}]](λx..H (X)) X 1≤i≤n U ∈.H (Qi ) ≤ X riU,R · [[U {S/x}]](λx..H (X)) X 1≤i≤n U ∈.H ({Q 1 ,...,Qn }) X = U ∈.H ({Q riU,R · [[U {S/x}]](λx..H (X)) X 1≤i≤n 1 ,...,Qn })   X = X  U ∈.H ({Q1 ,...,Qn }) · [[U {S/x}]](λx..H (X)) 1≤i≤n [[R]](λx.U ) · [[U {S/x}]](λx..H (X)) X ≤ riU,R  U ∈.H ({Q1 ,...,Qn }) ≤ X [[R]](λx.U ) · [[U {S/x}]](λx..H (X)) U ∈Λ⊕ (x) = [[RS]](λx..H (X)) ≤ [[N ]](λx. . ((.H )(X))) ≤ [[N ]](λx..H (X)), which is the thesis. • If M is a probabilistic sum L ⊕ P , then M ⇓ D is obtained as follows: L⇓F P ⇓G L ⊕ P ⇓ 12 · F + 12 · G Moreover, the proof of ∅ ` M .H N must end as follows: ∅ ` L .H R ∅ ` P .H S ∅`L⊕P . ∅`R⊕S . N H N Now: • Since L ⇓ F and ∅ ` L .H R, by induction hypothesis we get that for every Y ⊆ Λ⊕ (x) it holds that F (λx.Y ) ≤ [[R]](λx..H (Y )); • Similarly, since P ⇓ G and ∅ ` P .H S, by induction hypothesis we get that for every Y ⊆ Λ⊕ (x) it holds that G (λx.Y ) ≤ [[S]](λx..H (Y )). Let us now take a look at the distribution D= 1 1 ·F + ·G. 2 2 The idea then is to prove that, for every X ⊆ Λ⊕ (x), it holds D(λx.X) ≤ [[R ⊕ S]](λx..H (X)). In fact, since [[R ⊕ S]](λx..H (X)) ≤ [[N ]](λx..H (X)), the latter would imply the thesis D(λx.X) ≤ [[N ]](λx..H (X)). But by induction hypothesis and Lemma 2.3: 1 1 · F (λx.X) + · G (λx.X) 2 2 1 1 H ≤ · [[R]](λx.. (X)) + · [[S]](λx..H (X)) 2 2 = [[R ⊕ S]](λx..H (X)). D(λx.X) = This concludes the proof. 3.3  Context Equivalence We now formally introduce probabilistic context equivalence and prove it to be coarser than probabilistic applicative bisimilarity. 24 Definition 3.29 A Λ⊕ -term context is a syntax tree with a unique “hole” [·], generated as follows: C, D ∈ CΛ⊕ ::= [·] | λx.C | CM | M C | C ⊕ M | M ⊕ C. We denote with C[N ] the Λ⊕ -term that results from filling the hole with a Λ⊕ -term N : def [·][N ] = N ; def (λx.C)[N ] = λx.C[N ]; def (CM )[N ] = C[N ]M ; def (M C)[N ] = M C[N ]; def (C ⊕ M )[N ] = C[N ] ⊕ M ; def (M ⊕ C)[N ] = M ⊕ C[N ]. We also write C[D] for the context resulting from replacing the occurrence of [·] in the syntax tree C by the tree D. We continue to keep track of free variables by sets x of variables and we inductively define subsets CΛ⊕ (x ; y) of contexts by the following rules: [·] ∈ CΛ⊕ (x ; x) (Ctx1) C ∈ CΛ⊕ (x ; y ∪ {x}) x 6∈ y (Ctx2) λx.C ∈ CΛ⊕ (x ; y) C ∈ CΛ⊕ (x ; y) M ∈ Λ⊕ (y) (Ctx3) CM ∈ CΛ⊕ (x ; y) M ∈ Λ⊕ (y) C ∈ CΛ⊕ (x ; y) (Ctx4) M C ∈ CΛ⊕ (x ; y) M ∈ Λ⊕ (y) C ∈ CΛ⊕ (x ; y) (Ctx5) C ⊕ M ∈ CΛ⊕ (x ; y) M ∈ Λ⊕ (y) C ∈ CΛ⊕ (x ; y) (Ctx6) M ⊕ C ∈ CΛ⊕ (x ; y) We use double indexing over x and y to indicate the sets of free variables before and after the filling of the hole by a term. The two following properties explain this idea. Lemma 3.30 If M ∈ Λ⊕ (x) and C ∈ CΛ⊕ (x ; y), then C[M ] ∈ Λ⊕ (y). Proof. By induction on the derivation of C ∈ CΛ⊕ (x ; y) from the rules (Ctx1)-(Ctx6).  Lemma 3.31 If C ∈ CΛ⊕ (x ; y) and D ∈ CΛ⊕ (y ; y), then D[C] ∈ CΛ⊕ (x ; y). Proof. By induction on the derivation of D ∈ CΛ⊕ (y ; y) from the rules (Ctx1)-(Ctx6).  Let us recall here the definition of context preorder and equivalence. Definition 3.32 The probabilistic context preorder with respect to call-by-name evaluation is the Λ⊕ -relation given by x ` M ≤⊕ N iff ∀ C ∈ CΛ⊕ (x ; ∅), C[M ]⇓p implies C[N ]⇓q with p ≤ q. The Λ⊕ -relation of probabilistic context equivalence, denoted x ` M '⊕ N , holds iff x ` M ≤⊕ N and x ` N ≤⊕ M do. 25 Lemma 3.33 The context preorder ≤⊕ is a precongruence relation. Proof. Proving ≤⊕ being a precongruence relation means to prove it transitive and compatible. We start by proving ≤⊕ being transitive, that is, for every x ∈ PFIN (X) and for every M, N, L ∈ Λ⊕ (x), x ` M ≤⊕ N and x ` N ≤⊕ L imply x ` M ≤⊕ L. By Definition 3.32, the latter boils down to prove that, the following hypotheses • For every C, C[M ]⇓p implies C[N ]⇓q , with p ≤ q; • For every C, C[N ]⇓p implies C[L]⇓q , with p ≤ q, • D[M ]⇓r imply D[L]⇓s , with r ≤ s. We can easily apply the first hypothesis when C is just D, then the second hypothesis (again with C equal to D), and get the thesis. We prove ≤⊕ of being a compatible relation starting from (Com2) property because (Com1) is trivially valid. In particular, we must show that, for every x ∈ PFIN (X), for every x ∈ X − {x} and for every M, N ∈ Λ⊕ (x ∪ {x}), if x ∪ {x} ` M ≤⊕ N then x ` λx.M ≤⊕ λx.N . By Definition 3.32, the latter boils down to prove that, the following hypotheses • For every C, C[M ]⇓p implies C[N ]⇓q , with p ≤ q, • D[λx.M ]⇓r imply D[λx.N ]⇓s , with r ≤ s. Since D ∈ CΛ⊕ (x ; ∅), let us consider the context λx.[·] ∈ CΛ⊕ (x ∪ {x} ; x). Then, by Lemma 3.31, the context E of the form D[λx.[·]] is in CΛ⊕ (x ∪ {x} ; ∅). Please note that, by Definition 3.29, D[λx.M ] = E[M ] and, therefore, the second hypothesis can be rewritten as E[M ]⇓r . Thus, it follows that E[N ]⇓s , with r ≤ s. Moreover, observe that E[N ] is nothing else than D[λx.N ]. Since we have just proved ≤⊕ of being transitive, we prove (Com3) property by showing that (Com3L) and (Com3R) hold. In fact, recall that by Lemma 3.8, the latter two, together, imply the former. In particular, to prove (Com3L) we must show that, for every x ∈ PFIN (X) and for every M, N, L ∈ Λ⊕ (x), if x ` M ≤⊕ N then x ` M L ≤⊕ N L. By Definition 3.32, the latter boils down to prove that, the following hypothesis • For every C, C[M ]⇓p implies C[N ]⇓q , with p ≤ q, • D[M L]⇓r imply D[N L]⇓s , with r ≤ s. Since D ∈ CΛ⊕ (x ; ∅), let us consider the context [·]L ∈ CΛ⊕ (x ; x). Then, by Lemma 3.31, the context E of the form D[[·]L] is in CΛ⊕ (x ; ∅). Please note that, by Definition 3.29, D[M L] = E[M ] and, therefore, the second hypothesis can be rewritten as E[M ]⇓r . Thus, it follows that E[N ]⇓s , with r ≤ s. Moreover, observe that E[N ] is nothing else than D[λx.N ]. We do not detail the proof for (Com3R) that follows the reasoning made for (Com3L), but considering E as the context D[L[·]]. Proving (Com4) follows the same pattern resulted for (Com3). In fact, by Lemma 3.9, (Com4L) and (Com4R) together imply (Com4). We do not detail the proofs since they proceed the reasoning made for (Com3L), considering the appropriate context each time. This concludes the proof.  Corollary 3.34 The context equivalence '⊕ is a congruence relation. Proof. Straightforward consequence of the definition '⊕ = ≤⊕ ∩ ≤⊕ op .  Lemma 3.35 Let R be a compatible Λ⊕ -relation. If x ` M R N and C ∈ CΛ⊕ (x ; y), then y ` C[M ] R C[N ]. Proof. By induction on the derivation of C ∈ CΛ⊕ (x ; y): • If C is due to (Ctx1) then C = [·]. Thus, C[M ] = M , C[N ] = N and the result trivially holds. • If (Ctx2) is the last rule used, then C = λx.D, with D ∈ CΛ⊕ (x ; y ∪ {x}). By induction hypothesis, it holds that y ∪ {x} ` D[M ] R D[N ]. Since R is a compatible relation, it follows y ` λx.D[M ] R λx.D[N ], that is y ` C[M ] R C[N ]. • If (Ctx3) is the last rule used, then C = DL, with D ∈ CΛ⊕ (x ; y) and L ∈ Λ⊕ (y). By induction hypothesis, it holds that y ` D[M ] R D[N ]. Since R is a compatible relation, it follows y ` D[M ]L R D[N ]L, which by definition means y ` (DL)[M ] R (DL)[N ]. Hence, the result y ` C[M ] R C[N ] holds. The case of rule (Ctx4) holds by a similar reasoning. 26 • If (Ctx5) is the last rule used, then C = D ⊕ L, with D ∈ CΛ⊕ (x ; y) and L ∈ Λ⊕ (y). By induction hypothesis, it holds that y ` D[M ] R D[N ]. Since R is a compatible relation, it follows y ` D[M ] ⊕ L R D[N ] ⊕ L, which by definition means y ` (D ⊕ L)[M ] R (D ⊕ L)[N ]. Hence, the result y ` C[M ] R C[N ] holds. The case of rule (Ctx6) holds by a similar reasoning. This concludes the proof.  Lemma 3.36 If x ` M ∼ N and C ∈ CΛ⊕ (x ; y), then y ` C[M ] ∼ C[N ]. Proof. Since ∼=. ∩ .op by Proposition 2.13, x ` M ∼ N implies x ` M . N and x ` N . M . Since, by Theorem 3.18, . is a precongruence hence a compatible relation, y ` C[M ] . C[N ] and y ` C[N ] . C[M ] follow by Lemma 3.35, i.e. y ` C[M ] ∼ C[N ].  Theorem 3.37 For all x ∈ PFIN (X) and every M, N ∈ Λ⊕ (x), x ` M ∼ N implies x ` M '⊕ N . Proof. If x ` M ∼ N , then for every ∅ ` C[M ] ∼ C[N ] follows by Lemma 3.36. P C ∈ CΛ⊕ (x ; ∅),P By Lemma 3.5, the latter implies [[C[M ]]] = p = [[C[N ]]]. This means in particular that C[M ]⇓p iff C[N ]⇓p , which is equivalent to x ` M '⊕ N by definition.  The converse inclusion fails. A counterexample is described in the following. def def Example 3.38 For M = λx.L⊕P and N = (λx.L)⊕(λx.P ) (where L is λy.Ω and P is λy.λz.Ω), we have M 6. N , hence M ∼ 6 N , but M '⊕ N . We prove that the above two terms are context equivalent by means of CIU-equivalence. This is a relation that can be shown to coincide with context equivalence by a Context Lemma, itself proved by the Howe’s technique. See Section 4 and Section 5 for supplementary details on the above counterexample. 4 Context Free Context Equivalence We present here a way of treating the problem of too concrete representations of contexts: right now, we cannot basically work up-to α-equivalence classes of contexts. Let us dispense with them entirely, and work instead with a coinductive characterization of the context preorder, and equivalence, phrased in terms of Λ⊕ -relations. Definition 4.1 A Λ⊕ -relation R is said to be adequate if, for every M, N ∈ Λ⊕ (∅), ∅ ` M R N implies M ⇓p and N ⇓q , with p ≤ q. Let us indicate with CA the collection of all compatible and adequate Λ⊕ -relations and let def ≤ca ⊕ = [ CA. (6) It turns out that the context preorder ≤⊕ is the largest Λ⊕ -relation that is both compatible and adequate, that is ≤⊕ = ≤ca ⊕ . Let us proceed towards a proof for the latter. Lemma 4.2 For every R, T ∈ CA, R ◦ T ∈ CA. Proof. We need to show that R ◦ T = {(M, N ) | ∃ L ∈ Λ⊕ (x). x ` M R L ∧ x ` L T N } is a compatible and adequate Λ⊕ -relation. Obviously, R ◦ T is adequate: for every (M, N ) ∈ R ◦ T , there exists a term L such that M ⇓p ⇒ L⇓q ⇒ N ⇓r , with p ≤ q ≤ r. Then, M ⇓p ⇒ N ⇓r , with def p ≤ r. Note that the identity relation ID = {(M, M ) | M ∈ Λ⊕ (x)} is in R ◦ T . Then, R ◦ T is reflexive and, in particular, satisfies compatibility property (Com1). Proving (Com2) means to show that, if x ∪ {x} ` M (R ◦ T ) N , then x ` λx.M (R ◦ T ) λx.N . From the hypothesis, it follows that there exists a term L such that x ∪ {x} ` M R L and x ∪ {x} ` L T N . Since both R and T are in CA, hence compatible, it holds x ` λx.M R λx.L and x ` λx.L T λx.N . The latter 27 together imply x ` λx.M (R ◦ T ) λx.N . Proving (Com3) means to show that, if x ` M (R ◦ T ) N and x ` Q (R ◦ T ) R, then x ` M Q (R ◦ T ) N R. From the hypothesis, it follows that there exist two terms L, P such that, on the one hand, x ` M R L and x ` L T N , and on the other hand, x ` Q R P and x ` P T R. Since both R and T are in CA, hence compatible, it holds: x ` M R L ∧ x ` Q R P ⇒ x ` M Q R LP ; x ` L T N ∧ x ` P T R ⇒ x ` LP T N R. The two together imply x ` M Q (R ◦ T ) N R. Proceeding in the same fashion, one can easily prove property (Com4).  Lemma 4.3 Λ⊕ -relation ≤ca ⊕ is adequate. Proof. It suffices to note that the property of being adequate is closed under taking unions of relations. Indeed, if R, T are adequate relations, then it is easy to see that the union R ∪ T is: for every couple (M, N ) ∈ R ∪ T , either x ` M R N or x ` M T N . Either way, M ⇓p ⇒ N ⇓q , with p ≤ q, implying R ∪ T of being adequate.  Lemma 4.4 Λ⊕ -relation ≤ca ⊕ is a precongruence. Proof. We need to show that ≤ca ⊕ is a transitive and compatible relation. By Lemma 4.2, ca ca ca ≤ca ◦ ≤ ⊆ ≤ which implies ≤ of being transitive. Let us now prove that ≤ca ⊕ ⊕ ⊕ ⊕ ⊕ is also compatible. Note that the identity relation ID = {(M, M ) | M ∈ Λ⊕ (x)} is in CA, which implies reflexivity of ≤ca ⊕ and hence, in particular, it satisfies property (Com1). It is clear that property (Com2) is closed under taking unions of relations, so that ≤ca ⊕ satisfies (Com2) too. The same is not true for properties (Com3) and (Com4). By Lemma 3.8 (respectively, Lemma 3.9), for (Com3) (resp., (Com4)) it suffices to show that ≤ca ⊕ satisfies (Com3L) and (Com3R) (resp., (Com4L) and (Com4R)). This is obvious: contrary to (Com3) (resp., (Com4)), these properties clearly are closed under taking unions of relations. This concludes the proof.  Corollary 4.5 ≤ca ⊕ is the largest compatible and adequate Λ⊕ -relation. Proof. Straightforward consequence of Lemma 4.3 and Lemma 4.4.  Lemma 4.6 Λ⊕ -relations ≤⊕ and ≤ca ⊕ coincide. Proof. By Definition 3.32, it is immediate that ≤⊕ is adequate. Moreover, by Lemma 3.33, ≤⊕ is a precongruence. Therefore ≤⊕ ∈ CA implying ≤⊕ ⊆ ≤ca ⊕ . Let us prove the converse. Since, by Lemma 4.4, ≤ca is a precongruence hence a compatible relation, it holds that, for every ⊕ M, N ∈ Λ⊕ (x) and for every C ∈ CΛ⊕ (x ; y), x ` M ≤ca N implies y ` C[M ] ≤ca ⊕ ⊕ C[N ]. Therefore, for every M, N ∈ Λ⊕ (x) and for every C ∈ CΛ⊕ (x ; ∅), ca x ` M ≤ca ⊕ N ⇒ ∅ ` C[M ] ≤⊕ C[N ] which implies, by the fact that ≤ca ⊕ is adequate, C[M ]⇓p ⇒ C[N ]⇓q , with p ≤ q that is, by Definition 3.32, x ` M ≤⊕ N. This concludes the proof.  28 5 CIU-Equivalence CIU-equivalence is a simpler characterization of that kind of program equivalence we are interested in, i.e., context equivalence. In fact, we will prove that the two notions coincide. While context equivalence envisages a quantification over all contexts, CIU-equivalence relaxes such constraint to a restricted class of contexts without affecting the associated notion of program equivalence. Such a class of contexts is that of evaluation contexts. In particular, we use a different representation of evaluation contexts, seeing them as a stack of evaluation frames. Definition 5.1 The set of frame stacks is given by the following set of rules: | S, T ::= nil [·]M :: S. The set of free variables of a frame stack S can be easily defined as the union of the variables occurring free in the terms embedded into it. Given a set of variables x, define FS(x) as the set of frame stacks whose free variables are all from x. Given a frame stack S ∈ FS(x) and a term M ∈ Λ⊕ (x), we define the term ES (M ) ∈ Λ⊕ (x) as follows: def Enil (M ) = M ; def E[·]M ::S (N ) = ES (N M ). We now define a binary relation the same form: n between pairs of the form (S, M ) and sequences of pairs in (S, M N ) n ([·]N :: S, M ); (S, M ⊕ N ) n (S, M ), (S, N ); ([·]M :: S, λx.N ) n (S, N {M/x}). Finally, we define a formal system whose judgments are in the form (S, M ) ↓pn and whose rules are as follows: (empty) (S, M ) ↓0n (nil, V ) ↓1n (S, M ) n (value) (T1 , N1 ), . . . , (Tn , Nn ) 1 (S, M ) ↓nn Pn i=1 (Ti , Ni ) ↓pni pi (term) The expression C(S, M ) stands for the real number supp∈R (S, M ) ↓pn . Lemma 5.2 For all closed frame stacks S ∈ FS(∅) and closed Λ⊕ -terms M ∈ Λ⊕ (∅), C(S, M ) = p iff ES (M )⇓p . In particular, M ⇓p holds iff C(nil, M ) = p. Proof. First of all, we recall here that the work of Dal Lago and Zorzi [10] provides various call-by-name inductive semantics, either big-steps or small-steps, which are all equivalent. Then, the result can be deduced from the following properties: P 1. For all S ∈ FS(∅), if (S, M ) ↓pn then ∃D. ES (M ) ⇒IN D with D = p. Proof. By induction on the derivation of (S, M ) ↓pn , looking at the last rule used. def • (empty) rule used: (S, M ) ↓0n . Then, consider the empty distribution D = ∅ and observe that ES (M ) ⇒IN D by sen rule. • (value) rule used: (S, M ) ↓1n implies S = nil and M of being a value, say V . Then, def 1 consider the Pdistribution D = {V } and observe that Enil (V ) = V ⇒IN D by svn rule. Of course, D = 1 = p. 29 1 Pn p • (term) rule used: (S, M ) ↓nn i=1 i obtained from (S, M ) n (T1 , N1 ), . . . , (Tn , Nn ) and, for every i ∈ {1, . . . , n}, (Ti , Ni ) P ↓npi . Then, by induction hypothesis, there exist E1 , . . . , En such that ETi (Ni ) ⇒IN Ei with Ei = p i . Let us now proceed by cases according to the structure of M . • If M = λx.L, then S = [·]P :: T implying n = 1, T1 = T and N1 = L{P/x}. def Then, consider the distribution D = E1 and observe that ES (M ) = E[·]P ::T (λx.L) = ET ((λx.L)P ET (L{P/x}) =PET1 (N1 ). Hence, ES (M ) ⇒IN D by smn rule. P) 7→n P n Moreover, D= E1 = p1 = n1 i=1 pi = p. • If M = L ⊕ P , then n = 2, T1 = T2 = S, N1 = L and N2 = P . Then, condef P2 1 sider the distribution D = i=1 2 Ei and observe that ES (M ) = ES (L ⊕ P ) 7→n E (L), ES (P ) = ET1 (N1 ), ET2 (N2 ). Hence, ES (M ) ⇒IN D by smn rule. Moreover, PS P P2 1 P2 P P2 1 D= Ei = 12 i=1 pi = p. i=1 2 Ei = 2 i=1 • If M = LP , then n = 1, T1 = [·]P :: S and N1 = L. Then, consider the distribution def D = E1 and observe that E[·]P ::S (L) ⇒IN E1 implies ES (M ) ⇒IN D. Moreover, P P Pn D= E1 = p1 = n1 i=1 pi = p. This concludes the proof.  2. For all D, if M ⇒IN D then ∃S, N. ES (N ) = M and (S, N ) ↓pn with P D = p. Proof. By induction on the derivation of M ⇒IN D, looking at the last rule used. (We refer here to the inductive schema of inference rules gave in [10] for small-step call-by-name semantics of Λ⊕ .) 0 • sen rule used: M ⇒IN ∅. Then, P for every S and every N such that ES (N ) = M , (S, N ) ↓n by (empty) rule. Of course, D = 0 = p. • svn rule used: M is a value, say V , and D = {V 1 } with V ⇒IN {V 1 }. Then, consider def def S = nil and N P = V : by definition ES (N ) = Enil (V ) = V = M . By (value) rule, (nil, V ) ↓1n hence DP = 1 = p. n • svn rule used: M ⇒IN i=1 n1 Ei from M 7→n Q1 , . . . , Qn with, for every i ∈ {1, . . . , n}, Qi ⇒IN Ei . By induction hypothesis, for every P i ∈ {1, . . . , n}, there exist Ti and Ni such that ETi (Ni ) = Qi and (Ti , Ni ) ↓pni with Ei = pi . Let us proceed by cases according to the structure of M . def • If M = (λx.L)P , then n = 1 and Q1 = L{P/x}. Hence, consider S = [·]P :: nil and def N = λx.L: by definition, ES (N ) = E[·]P ::nil (λx.L) = Enil ((λx.L)P ) = (λx.L)P = M . By (term) rule, (S, N ) = ([·]P :: nil, λx.L) n (nil, L{P/x}) with, by induction P p1 p1 P hypothesis D= P Pn 1 result, P(nil, L{ /x}) ↓n . The latter implies (S, N ) ↓n . Moreover, E = E = p = p. i 1 1 i=1 n def • If M = L ⊕ P , then n = 2, Q1 = L and Q2 = P . Hence, consider S = nil def and N = L ⊕ P : by definition, ES (N ) = Enil (L ⊕ P ) = L ⊕ P = M . By (term) rule, (S, N ) = (nil, L ⊕ P ) hypothesis n (nil, L), (nil, P ) with, by induction P 1 2 p result, (nil, L) ↓pn1 and (nil, P ) ↓pn2 . The latter implies (S, N ) ↓n2 i=1 i . Moreover, P P Pn 1 P Pn 1 P2 P P2 1 D= Ei = 12 i=1 pi = p. i=1 n Ei = i=1 2 Ei = 2 i=1 • If M = LP and L 7→n R1 , . . . , Rn , then Qi = Ri P for every i ∈ {1, . . . , n}. Hence, def def consider S = [·]P :: nil and N = L: by definition, ES (N ) = E[·]P ::nil (L) = Enil (LP ) = LP = M . By (term) rule, (S, N ) = ([·]P :: nil, L) n ([·]P :: nil, R1 ), . . . , ([·]P :: nil, Rn ) with, by induction hypothesis result, ([·]P :: nil, Ri ) ↓pni Pn 1 P i=1 pi n for every i ∈ {1, P . . . , n}. The latter . Moreover, D = PP Pn implies (S, N ) ↓n n P n 1 1 1 E = E = p = p. i i=1 n i i=1 i=1 i n n This concludes the proof.  30 Generally speaking, the two properties above prove the following double implication: X (S, M ) ↓pn ⇐⇒ ES (M ) ⇓IN D with D = p. (7) Then, p = C(S, M ) = sup(S, M ) ↓qn = q∈R = X sup ES (M )⇓IN D X sup ES (M )⇓IN D D= X D [[ES (M )]] = ES (M )⇓p , which concludes the proof.  Given M, N ∈ Λ⊕ (∅), we define M CIU N iff for every S, C(S, M ) ≤ C(S, N ). This relation can be extended to a relation on open terms in the usual way. Moreover, we stipulate M ∼ =CIU N CIU CIU iff both M  N and N  M. Since CIU is a preorder, proving it to be a precongruence boils down to show the following implication: H M (CIU ) N ⇒ M CIU N. Indeed, the converse implication is a consequence of Lemma 3.12 and the obvious reflexivity of CIU relation. To do that, we extend Howe’s construction to frame stacks in a natural way: nilRH nil (Howstk1) ∅ ` M RH N SRH T (Howstk2) H ([·]M :: S)R ([·]N :: T) Lemma 5.3 For every x ∈ PFIN (X), it holds x ` (λx.M )N ∼ =CIU M {N/x}. Proof. We need to show that both x ` (λx.M )N CIU M {N/x} and x ` M {N/x} CIU (λx.M )N hold. Since CIU is defined on open terms by taking closing term-substitutions, it suffices to show the result for close Λ⊕ -terms only: (λx.M )N CIU M {N/x} and M {N/x} CIU (λx.M )N . Let us start with (λx.M )N CIU M {N/x} and prove that, for every close frame stack S, C(S, (λx.M )N ) ≤ C(S, M {N/x}). The latter is an obvious consequence of the fact that (S, (λx.M )N ) reduces to (S, M {N/x}). Let us look into the details distinguishing two cases: • If S = nil, then (S, (λx.M )N ) n ([·]N :: S, λx.M ) n (S, M {N/x}) which implies that C(S, (λx.M )N ) = supp∈R (S, (λx.M )N ) ↓pn = supp∈R (S, M {N/x}) ↓pn = C(S, M {N/x}). • If S = [·]L :: T, then we can proceed similarly. Similarly, to prove the converse, M {N/x} CIU (λx.M )N , let us fix p as (S, M {N/x}) ↓pn and distinguish two cases: • If S = nil and p = 0, then (S, (λx.M )N ) ↓0n holds too by (empty) rule. Otherwise, (S, M ) n ([·]N :: S, λx.M ) n (S, M {N/x}) (S, M {N/x}) ↓pn (term) ([·]N :: S, λx.M ) ↓pn ([·]N :: S, λx.M ) (term) (S, (λx.M )N ) ↓pn which implies C(S, M {N/x}) = supp∈R (S, M {N/x}) ↓pn = supp∈R (S, (λx.M )N ) ↓pn = C(S, (λx.M )N ). • If S = [·]L :: T, then we can proceed similarly. This concludes the proof.  H H Lemma 5.4 For every S, T ∈ FS(∅) and M, N ∈ Λ⊕ (∅), if S(CIU ) T and M (CIU ) N and (S, M ) ↓pn , then C(T, N ) ≥ p. Proof. We go by induction on the structure of the proof of (S, M ) ↓pn , looking at the last rule used. 31 • If (S, M ) ↓0n , then trivially C(T, N ) ≥ 0. H H • If S = nil, M = λx.L and p = 1, then T = nil since S(CIU ) T. From M (CIU ) N , it H follows that there is P with x ` L (CIU ) P and ∅ ` λx.P CIU N . But the latter implies that C(nil, N ) ≥ 1, which is the thesis. • Otherwise, (term) rule is used and suppose we are in the following situation (S, M ) n (U1 , L1 ), . . . , (Un , Ln ) 1 n (S, M ) ↓n Pn i=1 (Ui , Li ) ↓pni pi (term) Let us distinguish the following cases as in definition of n : H • If M = P Q, then n = 1, U1 = [·]Q :: S and L1 = P . From M (CIU ) N it follows that H H there are R, S with ∅ ` P (CIU ) R, ∅ ` Q (CIU ) S and ∅ ` RS CIU N . But then we can form the following: ∅ ` Q (CIU ) H S ∅ ` U1 ( H ∅ ` S (CIU ) CIU H ) T (Howstk2) [·]S :: T and, by the induction hypothesis, conclude that C([·]S :: T, R) ≥ p. Now observe that (T, RS) n ([·]S :: T, R), and, as a consequence, C(T, RS) ≥ p, from which the thesis easily follows given that ∅ ` RS CIU N . H • If M = P ⊕ Q, then n = 2, U1 = U2 = S and L1 = P , L2 = Q. From S(CIU ) T, we H H H get that U1 (CIU ) T and U2 (CIU ) T. From M (CIU ) N it follows that there are R, S H H with ∅ ` P (CIU ) R, ∅ ` Q (CIU ) S and ∅ ` R ⊕ S CIU N . Then, by a double induction hypothesis, it follows C(T, R) ≥ p and C(T, S) ≥ p. The latter together imply C(T, R ⊕ S) ≥ p, from which the thesis easily follows given that ∅ ` R ⊕ S CIU N . • If M = λx.P , then S = [·]Q :: U because the only case left. Hence n = 1, U1 = U and H H L1 = P {Q/x}. From S(CIU ) T, we get that T = [·]R :: V where ∅ ` Q (CIU ) R and H H H U(CIU ) V. From M (CIU ) N , it follows that for some S, it holds that x ` P (CIU ) S and ∅ ` λx.S CIU N . Now: (T, λx.S) = ([·]R :: V, λx.S) H n (V, S{R/x}). (8) H From x ` P (CIU ) S and ∅ ` Q (CIU ) R, by substitutivity of CIU , follow that ∅ ` H P {Q/x} (CIU ) S{R/x} holds. By induction hypothesis, it follows that C(V, S{R/x}) ≥ p. Then, from (8) and ∅ ` λx.S CIU N , the thesis easily follows: C(T, N ) ≥ C(T, λx.S) = C(V, S{R/x}) ≥ p. This concludes the proof.  Theorem 5.5 For all x ∈ PFIN (X) and for all M, N ∈ Λ⊕ (x), x ` M CIU N iff x ` M ≤⊕ N . Proof. (⇒) Since CIU is defined on open terms by taking closing term-substitutions, by Lemma 3.13 H both it and (CIU ) are closed under term-substitution. Then, it suffices to show the result for closed Λ⊕ -terms: for all M, N ∈ Λ⊕ (∅), if ∅ ` M CIU N , then ∅ ` M ≤⊕ N . Since CIU is H reflexive, by Lemma 3.10 follows that (CIU ) is compatible, hence reflexive too. Taking T = S in H Lemma 5.4, we conclude that ∅ ` M (CIU ) N implies ∅ ` M CIU N . As we have remarked H before the lemma, the latter entails that (CIU ) =CIU which implies CIU of being compatible. Moreover, from Lemma 5.2 immediately follows that CIU is also adequate. Thus, CIU is contained 32 CIU in the largest compatible adequate Λ⊕ -relation, ≤ca is actually ⊕ . From Lemma 4.6 follows that  CIU contained in ≤⊕ . In particular, the latter means ∅ ` M  N implies ∅ ` M ≤⊕ N . (⇐) First of all, please observe that, since context preorder is compatible, if ∅ ` M ≤⊕ N then, for all S ∈ FS(∅), ∅ ` ES (M ) ≤⊕ ES (N ) by Lemma 3.35. Then, by adequacy property of ≤⊕ and Lemma 5.2, the latter implies ∅ ` M CIU N . Ultimately, it holds that ∅ ` M ≤⊕ N implies ∅ ` M CIU N . Let us take into account the general case of open terms. If x ` M ≤⊕ N , then by compatibility property of ≤⊕ it follows ∅ ` λx.M ≤⊕ λx.N and hence ∅ ` λx.M CIU λx.N . Then, from the fact that CIU is compatible (as established in (⇒) part of this proof) and Lemma 5.3, for every suitable L ⊆ Λ⊕ (∅), it holds ∅ ` M {L/x} CIU N {L/x}, i.e. x ` M CIU N .  Corollary 5.6 ∼ =CIU coincides with '⊕ . Proof. Straightforward consequence of Theorem 5.5.  Proposition 5.7 ≤⊕ and . do not coincide. Proof. We will prove that M CIU N but M 6. N , where def M = λx.λy.x ⊕ y; def N = (λx.λy.x) ⊕ (λx.λy.y). M 6. N can be easily verified, so let us concentrate on M CIU N , and prove that for every S, C(S, M ) ≤ C(S, N ). Let us distinguish three cases: • If S = nil, then (S, M ) cannot be further reduced and (S, N ) n (S, λx.λy.x), (S, λx.λy.y), where the last two pairs cannot be reduced. As a consequence, C(S, M ) = 0 = C(S, N ). • If S = [·]L :: T, then we can proceed similarly. • If S = [·]L :: [·]P :: T, then observe that (S, M ) n ([·]P :: T, λy.L ⊕ y) n (T, L ⊕ P ) n (T, L), (T, P ); (S, N ) n (S, λx.λy.x), (S, λx.λy.y); (S, λx.λy.x) n ([·]P :: T, λy.L) n (T, L); (S, λx.λy.y) n ([·]P :: T, λy.y) n (T, P ). As a consequence, C(S, M ) = 1 1 C(T, L) + C(T, P ) = C(S, N ). 2 2 This concludes the proof.  Example 5.8 We consider again the programs from Example 2.6. Terms expone and exptwo only differ because the former performs all probabilistic choices on natural numbers obtained by applying a function to its argument, while in the latter choices are done at the functional level, and the argument to those functions is provided only at a later stage. As a consequence, the two terms are not applicative bisimilar, and the reason is akin to that for the inequality of the terms in Example 3.38. In contrast, the bisimilarity between expone and expthree k, where k is any natural number, intuitively holds because both expone and expthree k evaluate to a single term when fed with a function, while they start evolving in a genuinely probabilistic way only after the second argument is provided. At that point, the two functions evolve in very different ways, but their semantics (in the sense of Section 2) is the same (cf., Lemma 3.4). As a bisimulation one can use the equivalence generated by the relation [  {(expone, expthree k)} ∪ {(M, N ) | [[M ]] = [[N ]]} k ∪ [  {(λn.B{L/f}, λn.C{L/f})} L 33 using B and C for the body of expone and expthree respectively. 6 The Discriminating Power of Probabilistic Contexts We show here that applicative bisimilarity and context equivalence collapse if the tested terms are pure, deterministic, λ-terms. In other words, if the probabilistic choices are brought into the terms only through the inputs supplied to the tested functions, applicative bisimilarity and context equivalence yield exactly the same discriminating power. To show this, we prove that, on pure λ-terms, both relations coincide with the Levy-Longo tree equality, which equates terms with the same Levy-Longo tree (briefly LLT) [14]. LLT’s are the lazy variant of Böhm Trees (briefly BT), the most popular tree structure in the λ-calculus. BT’s only correctly express the computational content of λ-terms in a strong regime, while they fail to do so in the lazy one. For instance, the term λx.Ω and Ω, as both unsolvable [4], have identical BT’s, but in a lazy regime we would always distinguish between them; hence they have different LLT’s. LLT’s were introduced by Longo [30], developing an original idea by Levy [29]. The Levy-Longo tree of M , LT (M ), is coinductively constructed as follows: def def LT (M ) = λx1 . . . . xn .⊥ if M is an unsolvable of order n; LT (M ) = > if M is an unsolvable of order ∞; finally if M has principal head normal form λx1 . . . . xn .yM1 . . . Mm , then LT (M ) is a tree with root λx1 . . . . xn .y and with LT (M1 ), . . . , LT (Mm ) as subtrees. Being defined coinductively, LLT’s can of course be infinite. We write M =LL N iff LT (M ) = LT (N ). def Example 6.1 Let Ξ be an unsolvable of order ∞ such as Ξ = (λx.λy.(xx))(λx.λy.(xx)), and consider the terms def M = λx.(x(λy.(xΞΩy))Ξ); def N = λx.(x(xΞΩ)Ξ). These terms have been used to prove non-full-abstraction results in a canonical model for the lazy λ-calculus by Abramsky and Ong [2]. For this, they show that in the model the convergence test is definable (this operator, when it receives an argument, would return the identity function if the supplied argument is convergent, and would diverge otherwise). The convergence test, ∇, can distinguish between the two terms, as M ∇ reduces to an abstraction, whereas N ∇ diverges. However, no pure λ-term can make the same distinction. The two terms also have different LL trees: LT (M ) = λx.x @ λy.x > @ > ⊥ y LT (N ) = λx.x @ x > @ > ⊥ Although in Λ⊕ , as in Λ, the convergence test operator is not definable, M and N can be separated using probabilities by running them in a context C that would feed Ω ⊕ λz.λu.z as argument; then C[M ]⇓ 12 whereas C[N ]⇓ 14 . Example 6.2 Abramsky’s canonical model is itself coarser than LLT equality. For instance, the def def terms M = λx.xx and N = λx.(xλy.(xy)), have different LLT’s but are equal in Abramsky’s model (and hence equal for context equivalence in Λ). They are separated by context equivalence in def Λ⊕ , for instance using the context C = [·](I ⊕ Ω), since C[M ]⇓ 14 whereas C[N ]⇓ 12 . We already know that on full Λ⊕ , applicative bisimilarity (∼) implies context equivalence ('⊕ ). Hence, to prove that on pure λ-terms the two equivalences collapse to LLT equality (=LL ), it suffices to prove that, for those pure terms, '⊕ implies =LL , and that =LL implies ∼. The first implication is obtained by a variation on the Böhm-out technique, a powerful methodology for separation results in the λ-calculus, often employed in proofs about local structure 34 characterisation theorems of λ-models. For this we exploit an inductive characterisation of LLT equality via stratification approximants (Definition 6.5). The key Lemma 6.7 shows that any difference on the trees of two λ-terms within level n can be observed by a suitable context of the probabilistic λ-calculus. We write ]M as an abbreviation for the term Ω ⊕ M . We denote by Qn , n > 0, the term λx1 . . . . λxn .xn x1 x2 · · · xn−1 . This is usually called the Böhm permutator of degree n. Böhm permutators play a key role in the Böhm-out technique. A variant of them, the ]-permutators, play a pivotal role in Lemma 6.7 below. A term M ∈ Λ⊕ is a ]-permutator of degree n if either M = Qn or there exists 0 ≤ r < n such that M = λx1 . . . . λxr . ] λxr+1 · · · λxn .xn x1 · · · xn−1 . Finally, a function f from the positive integers to λ-terms is a ]-permutator function if, for all n, f (n) is a ]-permutator of degree n. Before giving the main technical lemma, it is useful some auxiliary concepts. The definitions below rely on two notions of reduction: M −→p N means that M call-by-name reduces to N in one step with probability p. (As a matter of fact, p can be either 1 or 12 .) Then =⇒ is obtained by composing −→ zero or more times (and multiplying the corresponding real numbers). If p = 1 (because, e.g., we are dealing with pure λ-terms) =⇒p can be abbreviated just as =⇒. With a slight abuse of notation, we also denote with =⇒ the multi-step lazy reduction relation of pure, open terms. The specialised form of probabilistic choice ]M can be thought of as a new syntactic construct. Thus Λ] is the set of pure λ-terms extended with the ] operator. As ] is a derived operator, its operational rules are the expected ones: ]M −→ 21 Ω ]L ]M −→ 12 M ]R The restriction on =⇒ in which ]R, but not ]L, can be applied, is called V. In the following, we need the following lemma: P P ] Lemma 6.3 Let M,P N, L, P be P closed Λ terms. Suppose [[M ]] = [[N ]], that M Vp L and N Vp P . Then also [[L]] = [[P ]]. P P P P Proof. Of course, p = 21n for some integer n ∈ N. Then [[L]] = 2n [[M ]] = 2n [[N ]] = [[P ]].  The proof of the key Lemma 6.7 below makes essential use of a characterization of =LL by a bisimulation-like form of relation: Definition 6.4 (Open Bisimulation) A relation R on pure λ-terms is an open bisimulation if M R N implies: 1. if M =⇒ λx.L, then N =⇒ λx.P and L R P ; 2. if M =⇒ xL1 · · · Lm , then P1 , . . . , Pm exist such that N =⇒ xP1 · · · Pm and Li R Pi for every 1 ≤ i ≤ m; and conversely on reductions from N . Open bisimilarity, written ∼O , is the union of all open bisimulations. Open bisimulation has the advantage of very easily providing a notion of approximation: Definition 6.5 (Approximants of ∼O ) We set: def • ∼O 0 = Λ × Λ; • M ∼O n+1 N when 1. if M =⇒ λx.L, then P exists such that N =⇒ λx.P and L ∼O n P; 2. if M =⇒ xL1 · · · Lm , then P1 , . . . , Pm exist such that N =⇒ xP1 · · · Pm and Li ∼O n Pi , for each 1 ≤ i ≤ m; and conversely on the reductions from N . Please observe that: 35 Lemma 6.6 On pure λ-terms, the relations =LL , ∼O and ( T n∈N ∼O n ) all coincide. We are now ready to state and prove the key technical lemma: Lemma 6.7 Suppose M 6∼O n N for some n, and let {x1 , . . . , xr } be the free variables in M, N . Then there are integers mx1 , . . . , mxr and k, and permutator functions fx1 , . . . , fxr such that, for all m > k, there are closed terms Rm such that the following holds: if M {fx1 (m + mx1 )/x1 } . . . {fxr (m + mxr )/xr }Rm ⇓r and N {fx1 (m + mx1 )/x1 } . . . {fxr (m + mxr )/xr }Rm ⇓s , then r 6= s. f Proof. The proof proceeds by induction on the least n such that M 6∼O n N . For any term M , M f (m + m ) f (m + m ) x x x x r r /xr } where x1 . . . xr are the free variables in will stand for M { 1 1 /x1 } . . . { M . We also write Ωm for a sequence of m occurrences of Ω: so, e.g., M Ω3 is M ΩΩΩ. Finally, for any term M , we write M ⇑ to denote the fact that M does not converge. • Basic case. M 6∼O 1 N . There are a few cases to consider (their symmetric ones are analogous). • The case where only one of the two terms diverges is easy. • M =⇒ xM1 · · · Mt and N =⇒ xN1 · · · Ns with t < s. Take mx = s and fx (n) = Qn (the Böhm permutator of degree n). The values of the other integers (k, my for y 6= x) and of def the other permutation functions are irrelevant. Set Rm = Ωm . We have M f Ωm =⇒ Qm+s M1f . . . Mtf Ωm ⇓1 since t + m < s + m. We also have N f Ωm =⇒ Qm+s N1f . . . Nsf Ωm ⇑ since m > 0 and therefore an Ω term will be end up at the head of the term. • M =⇒ xM1 · · · Mt and N =⇒ yN1 · · · Ns with x 6= y. Assume t ≤ s without loss of generality. Take mx = s + 1, my = s, and fx (n) = fy (n) = Qn . The values of the other def integers and permutation functions are irrelevant. Set Rm = Ωm . We have M f Ωm =⇒ Qm+s+1 M1f . . . Mtf Ωm ⇓1 since m + s + 1 > t + m. We also have N f Ωm =⇒ Qm+s N1f . . . Nsf Ωm ⇑ since m > 0 and therefore an Ω term will be end up at the head of the term. • M =⇒ λx.M 0 and N =⇒ yN , for some y and N . The values of the integers and permutator def def functions are irrelevant. Set Rm = ∅ (the empty sequence), and fy (n) = ]Qn . We have f M f =⇒ λx.M 0 ⇓1 , whereas N f =⇒ ]Qm+my N f ⇓<1 • Inductive case: M 6∼O n+1 N . There are two cases to look at. • M =⇒ xM1 · · · Ms , N =⇒ xN1 · · · Ns and for some i, Mi 6∼O n Ni . By induction, (for all variables y) there are integers my , k and permutator functions fy , such that for all m > k P P there are Sm and we have [[Mif Sm ]] 6= [[Nif Sm ]]. Redefine k if necessary so to make sure def that k > s. Set Rm = Ωm+mx −s−1 (λx1 . . . xm+mx .xi )Sm . We have: M f Rm =⇒ fx (m + mx )M1f . . . Msf Ωm+mx −s−1 (λx1 . . . xm+mx .xi )Sm =⇒p Mif Sm whereas N f Rm =⇒ fx (m + mx )N1f . . . Nsf Ωm+mx −s−1 (λx1 . . . xm+mx .xi )Sm =⇒p Nif Sm where p is 12 or 1 depending on whether fx contains ] or not. In any case, in both derivations, rule ]L has not been used. By Lemma 6.3 and the inductive assumption P f P P P [[Mi Sm ]] 6= [[Nif Sm ]] we derive that [[M f Rm ]] 6= [[N f Rm ]] too. 36 0 • M =⇒ λx.M 0 , N =⇒ λx.N 0 and M 0 6∼O n N . By induction, (for all variables y) there are integers my , k and permutator functions fy , such that for all m > k there are Sm and we P P def have [[M 0f Sm ]] 6= [[N 0f Sm ]]. Set Rm = fx (m + mx )Sm . Below for a term L, Lf −x is defined as Lf except that variable x is left uninstantiated. We have: M f Rm =⇒ (λx.M 0 f −x )fx (m + mx )Sm −→ (M 0 f −x )fx (m + mx )Sm −→ (N 0 f −x f {fx (m + mx )/x})Sm = M 0 Sm whereas N f Rm =⇒ (λx.N 0 f −x f {fx (m + mx )/x})Sm = N 0 Sm Again, by Lemma 6.3 and the inductive hypothesis, we derive This concludes the proof. P [[M f Rm ]] 6= P f [[N Rm ]].  The fact the Böhm-out technique actually works implies that the discriminating power of probabilistic contexts is at least as strong as the one of LLT’s. Corollary 6.8 For M, N ∈ Λ, M '⊕ N implies M =LL N . To show that LLT equality is included in probabilistic applicative bisimilarity, we proceed as follows. First we define a refinement of the latter, essentially one in which we observe all probabilistic choices. As a consequence, the underlying bisimulation game may ignore probabilities. The obtained notion of equivalence is strictly finer than probabilistic applicative bisimilarity. The advantage of the refinement is that both the inclusion of LLT equality in the refinement, and the inclusion of the latter in probabilistic applicative bisimilarity turn out to be relatively easy to prove. A direct proof of the inclusion of LLT equality in probabilistic applicative bisimilarity would have been harder, as it would have required extending the notion of a Levy-Longo tree to Λ⊕ , then reasoning on substitution closures of such trees. Definition 6.9 A relation R ⊆ Λ⊕ (∅) × Λ⊕ (∅) is a strict applicative bisimulation whenever M R N implies 1. if M −→1 P , then N =⇒1 Q and P R Q; 2. if M −→ 12 P , then N =⇒ 12 Q and P R Q; 3. if M = λx.P , then N =⇒1 λx.Q and P {L/x} R Q{L/x} for all L ∈ Λ⊕ (∅); 4. the converse of 1., 2. and 3.. Strict applicative bisimilarity is the union of all strict applicative bisimulations. If two terms have the same LLT, then passing them the same argument M ∈ Λ⊕ produces exactly the same choice structure: intuitively, whenever the first term finds (a copy of) M in head position, also the second will find M . Lemma 6.10 If M =LL N then M R N , for some strict applicative bisimulation R. Terms which are strict applicative bisimilar cannot be distinguished by applicative bisimilarity proper, since the requirements induced by the latter are less strict than the ones the former imposes: Lemma 6.11 Strict applicative bisimilarity is included in applicative bisimilarity. Since we now know that for pure, deterministic λ-terms, =LL is included in ∼ (by Lemma 6.10 and Lemma 6.11), that ∼ is included in '⊕ (by Theorem 3.37) and that the latter is included in =LL (Corollary 6.8), we can conclude: Corollary 6.12 The relations =LL , ∼, and '⊕ coincide in Λ. 37 7 Coupled Logical Bisimulation In this section we derive a coinductive characterisation of probabilistic context equivalence on the whole language Λ⊕ (as opposed to the subset of sum-free λ-terms as in Section 6). For this, we need to manipulate formal weighted sums. Thus we work with an extension of Λ⊕ in which such weighted sums may appear in redex position. An advantage of having formal sums is that the transition system on the extended language can be small-step and deterministic — any closed term that is not a value will have exactly one possible internal transition. This will make it possible to pursue the logical bisimulation method, in which the congruence of bisimilarity is proved using a standard induction argument over all contexts. The refinement of the method handling probabilities, called coupled logical bisimulation, uses pairs of relations, as we need to distinguish between ordinary terms and terms possibly containing formal sums. Technically, in the proof of congruence we first prove a correspondence between the transition system on extended terms and the original one for Λ⊕ ; we then derive a few up-to techniques for coupled logical bisimulations that are needed in the following proofs; finally, we show that coupled logical bisimulations are preserved by the closure of the first relation with any context, and the closure of the second relation with any evaluation context. We preferred to follow logical bisimulations rather then environmental bisimulations because the former admit a simpler definition (in the latter, each pair of terms is enriched with an environment, that is, an extra set of pairs of terms). Moreover it is unclear what environments should be when one also considers formal sums. We leave this for future work. Formal sums are a tool for representing the behaviour of running Λ⊕ terms. Thus, on terms with formal sums, only the results for closed terms interest us. However, the characterization of contextual equivalence in Λ⊕ as coupled logical bisimulation also holds on open terms. 7.1 Notation and Terminology We write ΛFS ⊕ for the extension of Λ⊕ in which formal sums may appear in redex position. Terms of ΛFS are defined as follows (M, N being Λ⊕ -terms): ⊕ E, F ::= EM | Σi∈I hMi , pi i | M ⊕N | λx.M. P In a formal sum Σi∈I hMi , pi i, I is a countable (possibly empty) set of indices such that i∈I pi ≤ 1. We use + for binary formal sums. Formal sums are ranged over by metavariables like H, K. When each Mi is a value (i.e., an abstraction) then Σi∈I hMi , pi i is a (formally summed ) value; such values are ranged over by Z, Y, X. If H = Σi∈I hMi , pi i and K = Σj∈J hMj , pj i where I and J are disjoint, then H ⊕ K abbreviates Σr∈I∪J hMr , p2r i. Similarly, if for every j ∈ J Hj is Σi∈I hMi,j , pi,j i, then Σ Pj hHj , pj i stands for Σ(i,j) hMi,j , pi,j · pj i. For H = Σi hMi , pi i we write Σ(H) for the real number N i pi . If Z = Σi hλx.Mi , pi i, then Z • N stands for Σi hMi { /x}, pi i. The set of closed terms is FS Λ⊕ (∅). Any partial value distribution D (in the sense of Section 2) can be seen as the formal sum Σ hV, D(V )i. Similarly, any formal sum H = Σi∈I hMi , pi i can be mapped to the distribution V ∈VΛ ⊕ P i∈I pi · [[Mi ]], that we indicate with [[H]]. Reduction between ΛFS F , is defined by the rules in Figure 6; these rules ⊕ terms, written E are given on top of the operational semantics for Λ⊕ as defined in Section 2, which is invoked in the premise of rule spc (if there is a i with Mi not a value). The reduction relation is deterministic and strongly normalizing. We use for its reflexive and transitive closure. Lemma 7.1 shows the agreement between the new reduction relation and the original one. Lemma 7.1 For all M ∈ Λ⊕ (∅) there is a value Z such that M Z and [[M ]] = [[Z]]. Proof. One first show that for all E there is n such that E n Z. Then one reasons with a double induction: an induction on n, and a transition induction, exploiting the determinism of .  38 hM, 12 i + hN, 21 i M ⊕N λx.M hλx.M, 1i ZM [[Mi ]] = Di spc Σi hMi , pi i Σi hDi , pi i sl Z •M ss E EM sp F sa FM Figure 6: Reduction Rules for ΛFS ⊕ 7.2 Context Equivalence and Bisimulation In ΛFS ⊕ certain terms (i.e., formal sums) may only appear in redex position; ordinary terms (i.e., terms in Λ⊕ ), by contrast, may appear in arbitrary position. When extending context equivalence to ΛFS ⊕ we therefore have to distinguish these two cases. Moreover, as our main objective is the characterisation of context equivalence in Λ⊕ , we set a somewhat constrained context equivalence FS in ΛFS ⊕ in which contexts may not contain formal sums (thus the Λ⊕ contexts are the same as FS the Λ⊕ contexts). We call these simple Λ⊕ contexts, whereas we call general ΛFS ⊕ context an unconstrained context, i.e., a ΛFS term in which the hole [·] may appear in any places where a term ⊕ from Λ⊕ was expected — including within a formal sum. (Later we will see that allowing general contexts does not affect the resulting context equivalence.) Terms possibly containing formal sums are tested in evaluation contexts, i.e., contexts of the form [·]M . We write Ep if E Z and Σ(Z) = p (recall that Z is unique, for a given E). Definition 7.2 (Context Equivalence in ΛFS ⊕ ) Two Λ⊕ -terms M and N are context equivaFS FS lent in ΛFS ⊕ , written M '⊕ N , if for all (closing) simple Λ⊕ contexts C, we have C[M ]p iff FS C[N ]p . Two Λ⊕ -terms E and F are evaluation-context equivalent, written E uFS ⊕ F , if for all (closing) ΛFS ⊕ evaluation contexts C, we have C[E]p iff C[F ]p . In virtue of Lemma 7.1, context equivalence in Λ⊕ coincides with context equivalence in ΛFS ⊕ . We now introduce a bisimulation that yields a coinductive characterisation of context equivalence (and also of evaluation-context equivalence). A coupled relation is a pair (V, E) where: V ⊆ FS Λ⊕ (∅) × Λ⊕ (∅), E ⊆ ΛFS ⊕ (∅) × Λ⊕ (∅), and V ⊆ E. Intuitively, we place in V the pairs of terms that should be preserved by all contexts, and in E those that should be preserved by evaluation contexts. For a coupled relation R = (V, E) we write R1 for V and R2 for E. The union of coupled relations is defined componentwise: e.g., if R and SS are coupled relations, then the coupled def def relation R ∪ SS has (R ∪ SS)1 = R1 ∪ SS1 and (R ∪ SS)2 = R2 ∪ SS2 . If V is a relation C on Λ⊕ , then V is the context closure of V in Λ⊕ , i.e., the set of all (closed) terms of the form (C[M ], C[N ]) where C is a multi-hole Λ⊕ context and M V N . Definition 7.3 A coupled relation R is a coupled logical bisimulation if whenever E R2 F we have: 1. if E D, then F G, where D R2 G; 2. if E is a formally summed value, then F Y with Σ(E) = Σ(Y ), and for all M RC 1 N we have (E • M ) R2 (Y • N ); 3. the converse of 1. and 2.. Coupled logical bisimilarity, ≈, is the union of all coupled logical bisimulations (hence ≈1 is the union of the first component of all coupled logical bisimulations, and similarly for ≈2 ). In a coupled bisimulation (R1 , R2 ), the bisimulation game is only played on the pairs in R2 . However, the first relation R1 is relevant, as inputs for tested functions are built using R1 (Clause 2. of Definition 7.3). Actually, also the pairs in R1 are tested, because in any coupled relations it must be R1 ⊆ R2 . The values produced by the bisimulation game for coupled bisimulation on R2 are formal sums (not plain λ-terms), and this is why we do not require them to be in R1 : formal 39 sums should only appear in redex position, but terms in R1 can be used as arguments to bisimilar functions and can therefore end up in arbitrary positions. We will see below another aspect of the relevance of R1 : the proof technique of logical bisimulation only allows us to prove substitutivity of the bisimilarity in arbitrary contexts for the pairs of terms in R1 . For pairs in R2 but not in R1 the proof technique only allows us to derive preservation in evaluation contexts. In the proof of congruence of coupled logical bisimilarity we will push “as many terms as possible” into the first relation, i.e., the first relation will be as large as possible. However, in proofs of bisimilarity for concrete terms, the first relation may be very small, possibly a singleton or even empty. Then the bisimulation clauses become similar to those of applicative bisimulation (as inputs of tested function are “almost” identical). Summing up, in coupled logical bisimulation the use of two relations gives us more flexibility than in ordinary logical bisimulation: depending on the needs, we can tune the size of the first relation. It is possible that some of the above aspects of coupled logical bisimilarity be specific to call-by-name, and that the call-by-value version would require non-trivial modifications. Remark 7.4 In a coupled logical bisimulation, the first relation is used to construct the inputs for the tested functions (the formally summed values produced in the bisimulation game for the second relation). Therefore, such first relation may be thought of as a “global” environment— global because it is the same for each pair of terms on which the bisimulation game is played. As a consequence, coupled logical bisimulation remains quite different from environmental bisimulation [45], where the “environment” for constructing inputs is local to each pair of tested terms. Coupled logical bisimulation follows ordinary logical bisimulation [44], in which there is only one global environment; in ordinary logical bisimulation, however, the global environment coincides with the set of tested terms. The similarity with logical bisimulation is also revealed by non-monotonicity of the associated functional (in contrast, the functional associated to environmental bisimulation is monotone); see Remark 7.17. As an example of use of coupled logical bisimulation, we revisit the counterexample 3.38 to the completeness of applicative bisimilarity with respect to contextual equivalence. Example 7.5 We consider the terms of Example 3.38 and show that they are in ≈1 , hence also in '⊕ (contextual equivalence of Λ⊕ ), by Corollary 7.12 and 'FS ⊕ = '⊕ . Recall that the def def def def terms are M = λx.(L ⊕ P ) and N = (λx.L) ⊕ (λx.P ) for L = λz.Ω and P = λy.λz.Ω. We set R1 to contain only (M, N ) (this is the pair that interests us), and R2 to contain the pairs (M, N ), (hM, 1i, hλx.L, 21 i + hλx.P, 12 i), (hL + P, 1i, hL, 12 i + hP, 21 i), and a set of pairs with identical components, namely (hL, 12 i+hP, 12 i, hL, 12 i+hP, 12 i), (hΩ, 21 i+hλu.Ω, 21 i, hΩ, 21 i+hλu.Ω, 12 i), (hλu.Ω, 12 i, hλu.Ω, 21 i), (hΩ, 12 i, hΩ, 12 i), (∅, ∅), where ∅ is the empty formal sum. Thus (R1 , R2 ) is a coupled logical bisimulation. The main challenge towards the goal of relating coupled logical bisimilarity and context equivalence is the substitutivity of bisimulation. We establish the latter exploiting some up-to techniques for bisimulation. We only give the definitions of the techniques, omitting the statements about their soundness. The first up-to technique allows us to drop the bisimulation game on silent actions: Definition 7.6 (Big-Step Bisimulation) A coupled relation R is a big-step coupled logical bisimulation if whenever E R2 F , the following holds: if E Z then F Y with Σ(Z) = Σ(Y ), and for all M RC 1 N we have (Z • M ) R2 (Y • N ). Lemma 7.7 If R is a big-step coupled logical bisimulation, then R ⊆ SS for some coupled logical bisimulation SS. In the reduction , computation is performed at the level of formal sums; and this is reflected, in coupled bisimulation, by the application of values to formal sums only. The following up-to technique allows computation, and application of input values, also with ordinary terms. In the 40 definition, we extract a formal sum from a term E in ΛFS ⊕ using the function D(·) inductively as follows: def D(EM ) = Σi hMi M, pi i whenever D(E) = Σi hMi , pi i; def def D(M ) = hM, 1i; D(H) = H. Definition 7.8 A coupled relation R is a bisimulation up-to formal sums if, whenever E R2 F , then either (one of the bisimulation clauses of Definition 7.3 applies), or (E, F ∈ Λ⊕ and one of the following clauses applies): 1. E D with D(D) = hM, 12 i + hN, 21 i, and F G with D(G) = hL, 21 i + hP, 21 i, M R2 L, and N R2 P ; P Q 2. E = λx.M and F = λx.N , and for all P RC 1 Q we have M { /x} R2 N { /x}; P Q 3. E = (λx.M )P M and F = (λx.N )QN , and M { /x}M R2 N { /x}N . According to Definition 7.8, in the bisimulation game for a coupled relation, given a pair (E, F ) ∈ R2 , we can either choose to follow the bisimulation game in the original Definition 7.3; or, if E and F do not contain formal sums, we can try one of the new clauses above. The advantage of the first new clause is that it allows us to make a split on the derivatives of the original terms. The advantage of the other two new clauses is that they allow us to directly handle the given λ-terms, without using the operational rules of Figure 6 and therefore without introducing formal sums. To understand the def def def first clause, suppose E = (M ⊕ N )L and F = P ⊕ Q. We have E (hM, 12 i + hN, 21 i)L = G with def D(G) = hM L, 12 i + hN L, 12 i, and F hP, 21 i + hQ, 12 i = H, with D(H) = H, and it is sufficient now to ensure (M L) R2 P , and (N L) R2 Q. Lemma 7.9 If R is a bisimulation up-to formal sums, then R ⊆ SS for some coupled logical bisimulation SS. Proof. We show that the coupled relation SS, with SS1 = R1 and def SS2 = R2 ∪{(Σi hHi , pi i, Σi hKi , pi i) s.t. for each i, either Hi R2 Ki or Hi = hMi , 1i, Ki = hNi , 1i and Mi R2 Ni }, is a big-step bisimulation and then apply Lemma 7.7. The key point for this is to show that whenever M R2 N , if M Z and N Y , then ZSS2 Y . For this, roughly, we reason on the tree whose nodes are the pairs of terms produced by the up-to bisimulation game for R2 and with root a pair (M, N ) in R2 (and with the proviso that a node (E, F ), if not a pair of values, and not a pair of Λ⊕ -terms, has one only child, namely (Z, Y ) for Z, Y s.t. E Z and F Y ). Certain paths in the tree may be divergent; those that reach a leaf give the formal sums that M and N produce. Thus, if M =⇒ Z and N =⇒ Y , then we can write Z = Σi hZi , pi i and Y = Σi hYi , pi i, for Zi , Yi , pi s.t. {(Zi , Yi , pi )} represent exactly the multiset of the leaves in the tree together with the probability of the path reaching each leaf.  Using the above proof technique, we can prove the necessary substitutivity property for bisimulation. The use of up-to techniques, and the way bisimulation is defined (in particular the presence of a clause for τ -steps and the possibility of using the pairs in the bisimulation itself to construct inputs for functions), make it possible to use a standard argument by induction over contexts. Lemma 7.10 If R is a bisimulation then the context closure SS with def SS1 = RC 1; def C SS2 = R2 ∪ RC 1 ∪ {(EM , F N ) s.t. E R2 F and Mi R1 Ni }; is a bisimulation up-to formal sums. 41 Corollary 7.11 1. M ≈1 N implies C[M ] ≈1 C[N ], for all C 2. E ≈2 F implies C[E] ≈2 C[F ], for all evaluation contexts C. Using Lemma 7.10 we can prove the inclusion in context equivalence. FS Corollary 7.12 If M ≈1 N then M 'FS ⊕ N . Moreover, if E ≈2 F then E u⊕ F . The converse of Corollary 7.12 is proved exploiting a few simple properties of uFS ⊕ (e.g., its transitivity, the inclusion ⊆ uFS ). ⊕ Lemma 7.13 E Proof. If E 0 E 0 implies E uFS ⊕ E . 0 E 0 then E ≈2 E 0 hence E uFS ⊕ E .  FS Lemma 7.14 Z uFS ⊕ Y implies Z • M u⊕ Y • M for all M . FS Proof. Follows from definition of uFS ⊕ , transitivity of u⊕ , and Lemma 7.13.  FS Lemma 7.15 If Mi 'FS ⊕ Ni for each i, then Σi hMi , pi i u⊕ Σi hNi , pi i Proof. Suppose Σi hMi , pi iM Z and Σi hNi , pi iM Y . We have to show Σ(Z) = Σ(Y ). We have Z = Σi hZi , pi i for Zi with Mi Zi . Similarly Y = Σi hYi , pi i for Yi with Ni Ni . Then the result follows from Σ(Zi ) = Σ(Yi ).  FS Theorem 7.16 We have 'FS ⊕ ⊆ ≈1 , and u⊕ ⊆ ≈2 . Proof. We take the coupled relation R with R1 def = {(M, N ) s.t. M 'FS ⊕ N} R2 def {(E, F ) s.t. E uFS ⊕ F }} = and show that R is a bisimulation. For clause (1), one uses Lemma 7.13 and transitivity of uFS ⊕ . For clause (2), consider a term Z FS with Z uFS F . By definition of u , F Y with Σ(Z) = Σ(Y ). Take now arguments M 'FS ⊕ ⊕ ⊕ N C FS FS (which is sufficient, since 'FS ⊕ ⊆'⊕ ). By Lemma 7.14, Z • M u⊕ Y • N . By Lemma 7.15, FS FS W • M u⊕ Y • N . Hence also Z • M u⊕ Y • N , and we have Z • M R2 Y • N .  It also holds that coupled logical bisimilarity is preserved by the formal sum construct; i.e., Mi ≈1 Ni for each i ∈ I implies Σi∈I hMi , pi i ≈2 Σi∈I hNi , pi i. As a consequence, context equivalence defined on general ΛFS ⊕ contexts is the same as that set on simple contexts (Definition 7.2). Remark 7.17 The functional induced by coupled logical bisimulation is not monotone. For instance, if V ⊆ W, then a pair of terms may satisfy the bisimulation clauses on (V, E), for some E, but not on (W, E), because the input for functions may be taken from the larger relation W. (Recall that coupled relations are pairs of relations. Hence operations on coupled relations, such as union and inclusion, are defined component-wise.) However, Corollary 7.12 and Theorem 7.16 tell FS us that there is indeed a largest bisimulation, namely the pair ('FS ⊕ , u⊕ ). With logical (as well as environmental) bisimulations, up-to techniques are particularly important to relieve the burden of proving concrete equalities. A powerful up-to technique in higher-order languages is up-to contexts. We present a form of up-to contexts combined with the big-step version of logical bisimilarity. Below, for a relation R on Λ⊕ , we write RCFS for the closure of the relation under general (closing) ΛFS ⊕ contexts. Definition 7.18 A coupled relation R is a big-step coupled logical bisimulation up-to contexts if whenever E R2 F , the following holds: if E Z then F Y with Σ(Z) = Σ(Y ), and for all CFS M RC (Y • N ). 1 N , we have (Z • M ) R1 42 For the soundness proof, we first derive the soundness of a small-step up-to context technique, whose proof, in turn, is similar to that of Lemma 7.10 (the up-to-formal-sums technique of Definition 7.8 already allows some context manipulation; we need this technique for the proof of the up-to-contexts technique). Example 7.19 We have seen that the terms expone and exptwo of Example 2.6 are not applicative bisimilar. We can show that they are context equivalent, by proving that they are coupled bisimilar. We sketch a proof of this, in which we employ the up-to technique from Definition 7.18. We use the def def coupled relation R in which R1 = {(expone, exptwo)}, and R2 = R1 ∪ {(AM , BN ) | M RC 1 N} def def where AM = λn.((M n) ⊕ (expone M (n + 1))), and BN = (λx.N x) ⊕ (exptwo (λx.N (x + 1))). This is a big-step coupled logical bisimulation up-to contexts. The interesting part is the matching argument for the terms AM , BN ; upon receiving an argument m they yield the summed values Σi hM (m + 1), pi i and Σi hN (m + 1), pi i (for some pi ’s), and these are in RCFS . 1 8 Beyond Call-by-Name Reduction So far, we have studied the problem of giving sound (and sometime complete) coinductive methods for program equivalence in a probabilistic λ-calculus endowed with call-by-name reduction. One may wonder whether what we have obtained can be adapted to other notions of reduction, and in particular to call-by-value reduction (e.g., the call-by-value operational semantics of Λ⊕ from [10]). Since our construction of a labelled Markov chain for Λ⊕ is somehow independent on the underlying operational semantics, defining a call-by-value probabilistic applicative bisimulation is effortless. The proofs of congruence of the bisimilarity and its soundness in this paper can also be transplanted to call-by-value. In defining Λ⊕ as a multisorted labelled Markov chain for the strict regime, one should recall that functions are applied to values only. Definition 8.1 Λ⊕ can be seen as a multisorted labelled Markov chain (Λ⊕ (∅) ] VΛ⊕ , VΛ⊕ ] {τ }, P⊕ ) that we denote with Λ⊕ v . Please observe that, contrary to how we gave Definition 3.1 for call-by-name semantics, labels here are either values, which model parameter passing, or τ , that models evaluation. We define the transition probability matrix P⊕ as follows: • For every term M and for every distinguished value νx.N , def P⊕ (M, τ, νx.N ) = [[M ]](νx.N ); • For every value V and for every distinguished value νx.N , def P⊕ (νx.N, V, N {V /x}) = 1; • In all other cases, P⊕ returns 0. Then, similarly to the call-by-name case, one can define both probabilistic applicative simulation and bisimulation notions as probabilistic simulation and bisimulation on Λ⊕ v . This way one can define probabilistic applicative bisimilarity, which is denoted ∼v , and probabilistic applicative similarity, denoted .v . Proving that .v is a precongruence, follows the reasoning we have outlined for the lazy regime. Of course, one must prove a Key Lemma first. Lemma 8.2 If M .v H N , then for every X ⊆ Λ⊕ (x) it holds that [[M ]](λx.X) ≤ [[N ]](λx.(.v H (X))). As the statement, the proof is not particularly different from the one we have provided for Lemma 3.17. The only delicate case is obviously that of application. This is due to its operational semantics that, now, takes into account also the distribution of values the parameter reduces to. Anyway, one can prove ∼v of implying context equivalence. When we restrict our attention to pure λ-terms, as we do in Section 6, we are strongly relying on call-by-name evaluation: LLT’s only reflect term equivalence in a call-by-name lazy regime. We 43 leave the task of generalizing the results to eager evaluation to future work, but we conjecture that, in that setting, probabilistic choice alone does not give contexts the same discriminating power as probabilistic bisimulation. Similarly we have not investigated the call-by-value version of coupled logical bisimilarity, as our current proofs rely on the appearance of formal sums only in redex position, a constraint that would probably have to be lifted for call-by-value. 9 A Comparison with Nondeterminism Syntactically, Λ⊕ is identical to an eponymous language introduced by de’Liguoro and Piperno [13]. The semantics we present here, however, is quantitative, and this has of course a great impact on context equivalence. While in a nondeterministic setting what one observes is the possibility of converging (or of diverging, or both), terms with different convergence probabilities are considered different in an essential way here. Actually, nondeterministic context equivalence and probabilistic context equivalence are incomparable. As an example of terms that are context equivalent in the must sense but not probabilistically, we can take I ⊕ (I ⊕ Ω) and I ⊕ Ω. Conversely, I is probabilistically equivalent to any term M that reduces to I ⊕ M (which can be defined using fixed-point combinators), while I and M are not equivalent in the must sense, since the latter can diverge (the divergence is irrelevant probabilistically because it has probability zero). May context equivalence, in contrast, is coarser than probabilistic context equivalence. Despite the differences, the two semantics have similarities. Analogously to what happens in nondeterministic λ-calculi, applicative bisimulation and context equivalence do not coincide in the probabilistic setting, at least if call-by-name is considered. The counterexamples to full abstraction are much more complicated in call-by-value λ-calculi [27], and cannot be easily adapted to the probabilistic setting. 10 Conclusions This is the first paper in which bisimulation techniques for program equivalence are shown to be applicable to probabilistic λ-calculi. On the one hand, Abramsky’s idea of seeing interaction as application is shown to be amenable to a probabilistic treatment, giving rise to a congruence relation that is sound for context equivalence. Completeness, however, fails: the way probabilistic applicative bisimulation is defined allows one to distinguish terms that are context equivalent, but which behave differently as for when choices and interactions are performed. On the other, a notion of coupled logical bisimulation is introduced and proved to precisely characterise context equivalence for Λ⊕ . Along the way, applicative bisimilarity is proved to coincide with context equivalence on pure λ-terms, yielding the Levy-Longo tree equality. The crucial difference between the two main bisimulations studied in the paper is not the style (applicative vis-à-vis logical), but rather the fact that while applicative bisimulation insists on relating only individual terms, coupled logical bisimulation is more flexible and allows us to relate formal sums (which we may think as distributions). This also explains why we need distinct reduction rules for the two bisimulations. See examples 3.38 and 7.5. While not complete, applicative bisimulation, as it stands, is simpler to use than coupled logical bisimulation. Moreover it is a natural form of bisimulation, and it should be interesting trying to transport the techniques for handling it onto variants or extensions of the language. Topics for future work abound — some have already been hinted at in earlier sections. Among the most interesting ones, one can mention the transport of applicative bisimulation onto the language ΛFS ⊕ . We conjecture that the resulting relation would coincide with coupled logical bisimilarity and context equivalence, but going through Howe’s technique seems more difficult than for Λ⊕ , given the infinitary nature of formal sums and their confinement to redex positions. Also interesting would be a more effective notion of equivalence: even if the two introduced notions of bisimulation avoid universal quantifications over all possible contexts, they refer to an 44 essentially infinitary operational semantics in which the meaning of a term is obtained as the least upper bound of all its finite approximations. Would it be possible to define bisimulation in terms of approximations without getting too fine grained? Bisimulations in the style of logical bisimulation (or environmental bisimulation) are known to require up-to techniques in order to avoid tedious equality proofs on concrete terms. In the paper we have introduced some up-to techniques for coupled logical bisimilarity, but additional techniques would be useful. Up-to techniques could also be developed for applicative bisimilarity. More in the long-run, we would like to develop sound operational techniques for so-called computational indistinguishability, a key notion in modern cryptography. Computational indistinguishability is defined similarly to context equivalence; the context is however required to work within appropriate resource bounds, while the two terms can have different observable behaviors (although with negligible probability). We see this work as a very first step in this direction: complexity bounds are not yet there, but probabilistic behaviour, an essential ingredient, is correctly taken into account. References [1] S. Abramsky. The Lazy λ-Calculus. In D. Turner, editor, Research Topics in Functional Programming, pages 65–117. Addison Wesley, 1990. [2] Samson Abramsky and C.-H. Luke Ong. Full abstraction in the lazy lambda calculus. Inf. Comput., 105(2):159–267, 1993. [3] Egidio Astesiano and Gerardo Costa. Distributive semantics for nondeterministic typed lambda-calculi. Theor. Comput. Sci., 32:121–156, 1984. [4] Hendrik Pieter Barendregt. The Lambda Calculus – Its Syntax and Semantics, volume 103 of Studies in Logic and the Foundations of Mathematics. North-Holland, 1984. [5] Marco Bernardo, Rocco De Nicola, and Michele Loreti. A uniform framework for modeling nondeterministic, probabilistic, stochastic, or mixed processes and their behavioral equivalences. Inf. Comput., 225:29–82, 2013. [6] G. Boudol and C. Laneve. The discriminating power of the λ-calculus with multiplicities. Inf. Comput., 126(1):83–102, 1996. [7] Gérard Boudol. Lambda-calculi for (strict) parallel functions. Inf. Comput., 108(1):51–127, 1994. [8] Dorin Comaniciu, Visvanathan Ramesh, and Peter Meer. Kernel-based object tracking. IEEE Trans. on Pattern Analysis and Machine Intelligence,, 25(5):564–577, 2003. [9] Ugo Dal Lago, Davide Sangiorgi, and Michele Alberti. On coinductive equivalences for probabilistic higher-order functional programs (long version). Available at http://arxiv..., 2013. [10] Ugo Dal Lago and Margherita Zorzi. Probabilistic operational semantics for the lambda calculus. RAIRO - Theor. Inf. and Applic., 46(3):413–450, 2012. [11] Vincent Danos and Russell Harmer. Probabilistic game semantics. ACM Trans. Comput. Log., 3(3):359–382, 2002. [12] Rocco De Nicola and Matthew Hennessy. Testing equivalences for processes. Theor. Comput. Sci., 34:83–133, 1984. [13] Ugo de’Liguoro and Adolfo Piperno. Non deterministic extensions of untyped lambda-calculus. Inf. Comput., 122(2):149–177, 1995. 45 [14] M. Dezani-Ciancaglini and E. Giovannetti. From bohm’s theorem to observational equivalences: an informal account. Electr. Notes Theor. Comput. Sci., 50(2):83–116, 2001. [15] M. Dezani-Ciancaglini, J. Tiuryn, and P. Urzyczyn. Discrimination by parallel observers: The algorithm. Inf. Comput., 150(2):153–186, 1999. [16] Thomas Ehrhard, Michele Pagani, and Christine Tasson. The computational meaning of probabilistic coherence spaces. In LICS, pages 87–96, 2011. [17] Shafi Goldwasser and Silvio Micali. Probabilistic encryption. J. Comput. Syst. Sci., 28(2):270– 299, 1984. [18] Noah D. Goodman. The principles and practice of probabilistic programming. In POPL, pages 399–402, 2013. [19] Andrew D. Gordon. Bisimilarity as a theory of functional programming. Electr. Notes Theor. Comput. Sci., 1:232–252, 1995. [20] Andrew D. Gordon, Mihhail Aizatulin, Johannes Borgström, Guillaume Claret, Thore Graepel, Aditya V. Nori, Sriram K. Rajamani, and Claudio V. Russo. A model-learner pattern for bayesian reasoning. In POPL, pages 403–416, 2013. [21] Matthew Hennessy. Exploring probabilistic bisimulations, part I. Formal Asp. Comput., 24(4-6):749–768, 2012. [22] Douglas J. Howe. Proving congruence of bisimulation in functional programming languages. Inf. Comput., 124(2):103–112, 1996. [23] Radha Jagadeesan and Prakash Panangaden. A domain-theoretic model for a higher-order process calculus. In ICALP, pages 181–194, 1990. [24] C. Jones and Gordon D. Plotkin. A probabilistic powerdomain of evaluations. In LICS, pages 186–195, 1989. [25] V. Koutavas, P.B̃. Levy, and E. Sumii. From applicative to environmental bisimulation. Electr. Notes Theor. Comput. Sci., 276:215–235, 2011. [26] Kim Guldstrand Larsen and Arne Skou. Bisimulation through probabilistic testing. Inf. Comput., 94(1):1–28, 1991. [27] S. B. Lassen. Relational Reasoning about Functions and Nondeterminism. PhD thesis, University of Aarhus, 1998. [28] Sergueı̈ Lenglet, Alan Schmitt, and Jean-Bernard Stefani. Howe’s method for calculi with passivation. In CONCUR, pages 448–462, 2009. [29] Jean-Jacques Lévy. An algebraic interpretation of equality in some models of the lambda calculus. In C. Böhm, editor, Lambda Calculus and Computer Science Theory, volume 37 of LNCS, pages 147–165. Springer-Verlag, 1975. [30] Giuseppe Longo. Set-theoretical models of lambda calculus: Theories, expansions and isomorphisms. Ann. Pure Appl. Logic, 24:153–188, 1983. [31] Christopher D Manning and Hinrich Schütze. Foundations of statistical natural language processing, volume 999. MIT Press, 1999. [32] J. Morris. Lambda Calculus Models of Programming Languages. PhD thesis, MIT, 1969. [33] C.-H. Luke Ong. Non-determinism in a functional setting. In LICS, pages 275–286, 1993. [34] Prakash Panangaden. Labelled Markov Processes. Imperial College Press, 2009. 46 [35] Sungwoo Park, Frank Pfenning, and Sebastian Thrun. A probabilistic language based on sampling functions. ACM Trans. Program. Lang. Syst., 31(1), 2008. [36] Judea Pearl. Probabilistic reasoning in intelligent systems: networks of plausible inference. Morgan Kaufmann, 1988. [37] Avi Pfeffer. IBAL: A probabilistic rational programming language. In IJCAI, pages 733–740. Morgan Kaufmann, 2001. [38] A. M. Pitts. Howe’s method for higher-order languages. In D. Sangiorgi and J. Rutten, editors, Advanced Topics in Bisimulation and Coinduction, pages 197–232. Cambridge University Press, 2011. [39] Andrew M. Pitts. Operationally-based theories of program equivalence. In Semantics and Logics of Computation, pages 241–298. Cambridge University Press, 1997. [40] Norman Ramsey and Avi Pfeffer. Stochastic lambda calculus and monads of probability distributions. In POPL, pages 154–165, 2002. [41] N. Saheb-Djahromi. Probabilistic LCF. In MFCS, volume 64 of LNCS, pages 442–451, 1978. [42] David Sands. From SOS rules to proof principles: An operational metatheory for functional languages. In POPL, pages 428–441, 1997. [43] D. Sangiorgi. The lazy lambda calculus in a concurrency scenario. Inf. and Comp., 111(1):120– 153, 1994. [44] Davide Sangiorgi, Naoki Kobayashi, and Eijiro Sumii. Logical bisimulations and functional languages. In FSEN, volume 4767 of LNCS, pages 364–379, 2007. [45] Davide Sangiorgi, Naoki Kobayashi, and Eijiro Sumii. Environmental bisimulations for higher-order languages. ACM Trans. Program. Lang. Syst., 33(1):5, 2011. [46] Davide Sangiorgi and David Walker. The pi-Calculus – a theory of mobile processes. Cambridge University Press, 2001. [47] Kurt Sieber. Call-by-value and nondeterminism. In TLCA, volume 664 of LNCS, pages 376–390, 1993. [48] Sebastian Thrun. Robotic mapping: A survey. Exploring artificial intelligence in the new millennium, pages 1–35, 2002. 47
6cs.PL
An Empirical Study of AI Population Dynamics with Million-agent Reinforcement Learning Yaodong Yang†⇤ , Lantao Yu‡⇤ , Yiwei Bai‡⇤ , Jun Wang† , Weinan Zhang‡ , Ying Wen† , Yong Yu‡ arXiv:1709.04511v3 [cs.AI] 5 Oct 2017 † University College London, ‡ Shanghai Jiao Tong University Abstract In this paper, we conduct an empirical study on discovering the ordered collective dynamics obtained by a population of artificial intelligence (AI) agents. Our intention is to put AI agents into a simulated natural context, and then to understand their induced dynamics at the population level. In particular, we aim to verify if the principles developed in the real world could also be used in understanding an artificiallycreated intelligent population. To achieve this, we simulate a large-scale predator-prey world, where the laws of the world are designed by only the findings or logical equivalence that have been discovered in nature. We endow the agents with the intelligence based on deep reinforcement learning, and scale the population size up to millions. Our results show that the population dynamics of AI agents, driven only by each agent’s individual self interest, reveals an ordered pattern that is similar to the Lotka-Volterra model studied in population biology. We further discover the emergent behaviors of collective adaptations in studying how the agents’ grouping behaviors will change with the environmental resources. Both of the two findings could be explained by the self-organization theory in nature. Introduction By employing the modeling power of deep learning, singleagent reinforcement learning (RL) has started to display, even surpass, human-level intelligence on a wide variety of tasks, ranging from playing the games of Labyrinth (Mnih et al. 2016), Atari (Mnih et al. 2015), and Go (Silver et al. 2016) to other tasks such as continuous control on locomotions (Lillicrap et al. 2015), text generation (Yu et al. 2017), and neural architecture design (Zoph and Le 2016). Very recently, multi-agent RL algorithms have further broadened the use of RL and demonstrated their potentials in the setting where both of the agents’ incentives and economical constraints exist. For example, the studies (Mordatch and Abbeel 2017; Lazaridou, Peysakhovich, and Baroni 2016; Wang, Liang, and Manning 2016; de Vries et al. 2016) have shown that with different multi-agent cooperative learning environments, the compositional language naturally emerges. Researchers in (Peng et al. 2017; ⇤ The first three authors have equal contributions. Correspondence to Jun Wang, [email protected], Weinan Zhang, [email protected]. Foerster et al. 2017; Usunier et al. 2016) have also demonstrated that multiple agents can be trained to play the combat game in StarCraft, and the agents have mastered collaborative strategies that are similar to those of experienced human players. Nonetheless, all of the aforementioned RL systems so far have been limited to less than tens of agents, and the focuses of their studies are rather in the optimization of a micro and individual level policy. Macro-level studies about the resulting collective behaviors and dynamics emerging from a large population of AI agents remain untouched. Yet, on the other hand, real-world populations exhibit certain orders and regularity on collective behaviors: honey bees use specific waggle dance to transmit signals, a trail of ants transfer food by leaving chemical marks on the routes, V-shaped formations of bird flocks during migration, or particular sizes of fish schools in the deep ocean. Even human beings can easily show ordered macro dynamics, for example, the rhythmical audience applause after the concerts, the periodical human waves in the fanatic football game, etc. A stream of research on the theory of self-organization (Ashby 1991) explores a new approach to explaining the emergence of orders in nature. In fact, the self-organizing dynamics appears in many other disciplines of natural sciences (Bak 2013). The theory of self-organization suggests that the ordered global dynamics, no matter how complex, are induced from repeated interactions between local individual parts of a system that are initially disordered, without external supervisions or interventions. The concept has proven important in multiple fields in nature sciences (Camazine 2003; Sumpter 2006; Kauffman 1993). As once the ancient philosopher Lucretius said: “A designing intelligence is necessary to create orders in nature.” (Palmer 2014), an interesting question for us is to understand what kinds of ordered macro dynamics, if any, that a community of artificially-created agents would possess when they are together put into the natural context. In this paper, we fill the research gap by conducting an empirical study on the above questions. We aim to understand whether the principles, e.g., self-organization theory (Ashby 1991), that are developed in the real world could also be applied on understanding an AI population. In order to achieve these, we argue that the key to this study is to have a clear methodology of introducing the micro-level intelligence; therefore, we simulate a predator-prey world where each individual AI agent is endowed with intelligence through a large-scale deep reinforcement learning framework. The population size is scaled up to million level. To maximize the generality, the laws of the predator-prey world are designed by only incorporating the natural findings or logic equivalence; miscellaneous potential dynamics can thus be studied. We first study the macro dynamics of the population size for both the predators and preys, and then we investigate the emergence of one most fundamental collective behavior – grouping. In particular, we compare the statistics and dynamics of the intelligent population with the theories and models from the real-world biological studies. Interestingly, we find that the artificial predator-prey ecosystem, with individual intelligence incorporated, reaches an ordered pattern on dynamics that is similar to what the Lotka-Volterra model indicates in population biology. Also, we discover the emergence of the collective adaptations on grouping behaviors when the environment changes. Both of the two findings can be well explained based on the self-organization theory. The results could potentially open up an interesting research direction of understanding AI population using the natural science principles from the real world. Related Work Reinforcement learning (RL) (Sutton and Barto 1998) employs a goal-oriented learning scheme that reinforces an agent to maximize its cumulative rewards through sequentially interacting with the environment. The intelligence evolves by agent’s learning from the past experiences and trying to perform better in the future. Recently, deep neural networks succeed in marrying the RL algorithms; in particular, they show remarkable performance in approximating the value function (Mnih et al. 2013), the policy function (Lillicrap et al. 2015), or both the value and policy function (a.k.a. actor-critic) (Mnih et al. 2016), all of which increase the “intelligence” of traditional RL methods. Single-agent RL methods have been extended to the multi-agent settings where multiple agents exist and interact with each other. Q-learning methods such as minimax Q-learning (Hu, Wellman, and others 1998) and Nash Qlearning (Hu and Wellman 2003) have been proposed. A fundamental question to answer in multi-agent RL is how different agents should communicate so as to reach a coherent goal. Several differentiable communication protocols have been proposed (Foerster et al. 2016; Sukhbaatar, Fergus, and others 2016), which can be easily embedded into the error back-propagation training scheme. The work in (Peng et al. 2017) employed bidirectional recurrent neural networks to coordinate groups of agents to play StarCraft combat games, and achieved human-level micromanagement skills. Beyond pursuing high performance on playing video games, researchers recently start to shift the focus onto studying the community of AI agents, and its corresponding attributes. A few concurrent studies (Mordatch and Abbeel 2017; Lazaridou, Peysakhovich, and Baroni 2016; Wang, Liang, and Manning 2016; de Vries et al. 2016) were conducted in different cooperative learning environments, through which the emergence of compositional language has been found. Leibo et al. introduced agents’ self-interested policy learning into solving sequential social dilemmas, and discovered how agents’ behaviors would be influenced by the environmental factors, and when conflicts would emerge from competing over shared resources. Nonetheless, the multi-agent systems in those studies consider no more than tens of agents; it is thus unfair to generalize the findings to the population level. Macro dynamics of large AI population remain to be disclosed. While our subject is computerized artifacts, our work is also related to the research conducted in natural sciences. The theory of self-organization proposed in (Ashby 1991) serves as a fundamental approach to understanding the emergence of orders in natural sciences. Self-organization theory believers think that the global ordered dynamics of a system can originate from numerous interactions between local individuals that are initially disordered, with no needs for external interventions. The theory predicts the existence of the ordered dynamics in the population. In fact, the self-organizing phenomena have been observed in multiple fields in natural sciences (Camazine 2003; Sumpter 2006; Kauffman 1993). For example, in population biology, one important discovery is the ordered harmonic dynamics of the population sizes between predators and preys (e.g., the lynx and snowshoe hare (Gilpin 1973)), which is summarized into the Lotka-Volterra model (Lotka 1925). It basically describes the fact that there is 90 lag in the phase space between the population sizes of predators and preys. Even though explained by the self-organization theory, the Lotka-Volterra models are summarized based on the statistics from the ecological field studies. There is essentially no learning process or individual intelligence involved. In this work, we chose a different approach by incorporating the individual intelligence into the population dynamics studies where each agent is endowed with the intelligence to make its own decision rather than is considered as homogeneous and rule-based. Our intention is to find out whether an AI population still creates ordered dynamics such as the LotkaVolterra equations, if so, whether the dynamics is explainable from the perspective of the self-organization theory. In multiple disciplines of natural sciences spanning from zoology, psycholog, to economy (Sumpter 2006; Dunbar 2016; Guillen 2000), one of the most fundamental thus important collective behaviors to study is: grouping – a population of units aggregate together for collective decisionmaking. Grouping is believed to imply the emergence of sociality and to induce other collective behaviors (Javarone and Marinazzo 2016). In studying the grouping behaviors, traditional approaches include setting up a game with rigid and reductive predefined interactive rules for each agent and then conduct simulations based on the ad-hoc game (Fryxell et al. 2007; Niwa 1994; Inada and Kawachi 2002). Rulebased games might work well on biological organisms that inherit the same characteristics from their ancestors; however, they show limits on studying the large-scale heterogeneous agents (Boccaletti et al. 2006). In contrast to rulebased games with no learning process involved, here we investigate the formation of grouping behaviors on a millionlevel AI population driven by RL algorithms. Our intention is to find out how the grouping behaviors in AI population 1 2. Negative Feedback. Negative feedback leads to homeostasis. It helps stabilize the collective behaviors produced in favor of the positive feedback from going to extremes. 1 2 2 3 4 3 4 6 6 Predator Prey 4. Response Threshold. Response threshold is the threshold beyond which individuals will change their behaviors as a response to the stimulus. 5 5 Timestep t Timestep t+1 Obstacle Health 3 ID Group1 3. Individual Variation. Individual variation is of the essence to guarantee the continual explorations of new solutions to the same problem within a population. Group2 Figure 1: Illustration of the predator-prey world. In the 2-D world, there exist preys, predators, and obstacles. Predators hunt the prey so as to survive from starvation. Each predator has its own health bar and limited eyesight view. Predators can form a group to hunt the prey so that the chance of capturing can increase, but this also means that the captured prey will be shared among all group members. When there are multiple group targeting the same prey, the largest group within capture radius will win. In this example, predators {2, 3, 4} form a group and win the prey over the group {5, 6}. Predator 5 soon dies because of starvation. emerge and change w.r.t. the environmental factors such as the food resources, and if there is any other collective behaviors emerging based on grouping. Design of the Large-scale Predator-prey World In this paper, we try to understand: 1) whether AI population create any ordered patterns on population dynamics, and 2) the dynamics of the collective grouping behaviors. Predatorprey interaction is one fundamental relationship observed in nature. Here we intend to simulate a predator-prey world with million-level agents (shown in Fig. 1). The world is deigned to be easily adaptable to incorporate other environmental complexity to investigate the miscellaneous dynamics as well as collective behaviors of AI population where each individual agent is driven by purely self interest. The Axioms of Natural Environments To avoid introducing any specific rules that could harm the generality of the observed results, we design the laws of the world by only considering those real findings or logical equivalence that have been observed in the natural system. We regard those laws as the axioms of studying population dynamics and collective behaviors. Here we briefly review the axioms accepted. We refer the corresponding natural evidence to the Appendix. Note that these axioms should not be treated separately, we consider instead how the combination of these different axioms could produce and affect collective dynamics. 1. Positive Feedback. Positive feedback enhances particular behaviors through reinforcement. It helps spread the information of a meaningful action quickly between the individuals. 5. Redundancy. Redundancy ensures functional continuity of the whole population even when a catastrophic event happens. 6. Synchronization. Synchronization is a special kind of positive feedback in time rather than space. An example would be how individual with unique frequency of applause affect the frequency of the crowd in a concert. 7. Selfishness. Individuals always tend to maximize their own utility. One will not behave altruistically for others until he can benefit more from behaving collectively than acting alone. The Realization We realize the predator-prey world via designing a Markov Game. Here we list the detailed rules of the game and the corresponding axiom it refers to. Population Dynamics. In the predator-prey world (see Fig. 1), the goal for the predator species is to survive in the ecosystem and procreate their next generations (Axiom.7). Positions of predator/prey/obstacles in the world are all initialized randomly at the beginning. The environment is considered under an infinite horizon. While the population of both preys and predators can be boomed by breeding offsprings (Axiom.5), they however face the hazards of either being hunted as preys, or dying of starvation as predators (Axiom.2). To realize the idea of starvation, we make the health status of predator decrease with time by a constant factor, which can also be restored by capturing and eating preys (Axiom.1). Predators are assumed to have infinite appetite; the logical equivalence in nature is that a predator normally has the ability of storing food resource for future survival. Each predator can have unique characteristics, e.g., identity vector, eyesight and health status (Axiom.3). The unique characteristics of each agent represents the diversity of the population. Each individual agent can make independent decision, and behave differently even given the same scenario. Predators can form a group to increase the chance of capturing a prey (Axiom.1,4). Group members are visible to predators within its view. If a single agent chooses the action of “join a group”, the environment will select a group within its view randomly, and the agent will become a member of that group until it decides to “leave the current group” afterwards. Note that a single predator may hunt for the prey alone as well as hunt as a group member. As illustrated in Fig. 1, each prey is assigned a square capture area with a capture radius ⇢, which reflects the difficulty of being hunted (Axiom.4). Groups of predators, or singles, will only be able to hunt the prey if they manage to stay within the capture radius. Apart from the capture radius, another parameter, the capture threshold k, also reflects the capturing difficulty of each prey (Axiom.4). Within the capture area, only meeting the threshold will a group of predators become a valid candidate. When there are multiple valid candidate groups targeting at the same prey, the group with the largest group size will be the winner, which mimics the law of jungle. When a group wins over other candidates, all the members in that group will share the prey equally (Axiom.2). The trade-off here is, in the pursuit of preys, grouping is encouraged as large group can help increase the probability of capturing a prey; however, huge group size will also be inhibited due to the less proportion of prey each group member obtains from the sharing (Axiom.7). Grouping Behaviors. Considering synchronization (Axiom.6) and selfishness (Axiom.7), we incorporate a second type of prey that can be captured by an individual predator alone, which means we set the capture threshold k to 1 for that species. An analogy here is to think of tigers as the predators, sheep as the preys whose captures require collaborative grouping between predators, and rabbits as the preys that can be captured by a single predator. These two kinds of preys can be considered as an abstraction of individual reward and grouping reward respectively. Predators have to make a decision to either join a group for hunting the sheep or conduct hunting the rabbit by itself in order to maximize its long-term reward and the probability of survival (Axiom.1,2,7), which introduces a trade-off between acting alone and collaborating with others. We keep alternating the environments by feeding these two kinds of preys one after another (Axiom.6) and examine the dynamics of grouping behaviors. To emphasize the dynamics of grouping behaviors and also to avoid the influences from the systematic preferences for grouping as a result of the changing population size, we keep the population size of predators fixed by endowing them with eternal longevity, which can also be considered as a short-term observation during which there is little change of the predator population size. Under the environment, the optimal strategy for each agent continuously varies over time and the predator population has to learn to adapt their collective strategy correspondingly. AI Population Built by Multi-agent Deep Reinforcement Learning In the designed predator-prey world, we build AI population under the multi-agent deep reinforcement learning setting. The size of AI population starts from 3000 up to 2 million. Each agent plays an infinite-horizon Markov game and has only partial observation in their local environment. Agents in the predators population have to learn a policy to capture more preys and also to coexist with its population. Formally, the predator-prey partially observable Markov game is denoted by a tuple {S, A, T , R, , ⇢0 }. S denotes the set of environmental states. For each agent i, the state sit contains its observation Oti at time step t as well as its identity v i , i.e., sit = (Oti , v i ). Each individual agent is supposed to make independent decisions, and behave differently based on its lo- ID embedding action (Obs, ID) (Obs, ID) Q-network Q-value (s , a , r , s ) t t t t+1 Q-value updates .. . (Obs, ID) reward 1 2 action Q-value 3 Experience Buffer (s , a , r , s ) t t t t+1 (Obs, ID) Q-value (s , a , r , s ) t t t t+1 .. . 4 reward action 6 5 reward Figure 2: Million-agent Q-learning System in the Predatorprey World. cal observation as well as ID embeddings as inputs. Identity embedding v i 2 R5 is a fixed-length real-valued vector that is unique to each individual. The observation Oti 2 Rm⇥n⇥5 is dependent on the agent’s current position and orientation. The agent’s eyesight ranges from m 1 grids ahead and n 1 2 grids to both sides. Within the horizon, there are five channels for the observation Oti . Different objects (predators/preys/obstacles/blank areas) on the map occupy the first three channels, which are the raw RGB pixels. The fourth channel is an indicator of whether or not that object is a group member. The fifth channel is the health status h 2 R if the object is an agent, otherwise padded with zero. At each time step, each agent can take an action ait selected from the action space A: {forward, backward, left, right, rotate left, rotate right, stand still, join a group, and leave a group}. It is considered as invalid if a predator takes the “join a group” action as a group member already, or takes the “leave a group” action as a single individual. It is also invalid if an agent tries to cross the map boarders. Invalid actions will not be settled in each time step. The transition function between states, T : S ⇥ A ! S, is deterministic given the joint actions and states of all agents. Ri : S ⇥ A ! R is the reward function for each agent. denotes the discount factor of reward and ⇢0 (S) denotes the initial state distribution. An agent gains “intelligence” by learning a policy ⇡✓ (at |st ), that could maximize its expected cumulative reward, through interacting with the predator-prey environment in trial-and-error way. Let P ⌘(⇡) denote the expected cumulative reward: ⌘(⇡) = 1 E⌧ [ t=0 t R(st , at )], where ⌧ = (s0 , a0 , r0 , s1 , ...) denotes the trajectory sampled from agent’s policy at ⇠ ⇡✓ (at |st ), initial state distribution s0 ⇠ ⇢0 (s0 ), and deterministic (as the game rules are fixed) state transition function st+1 ⇠ T (st , at ). For each agent, its goal is to learn ✓⇤ := argmax✓ ⌘(⇡). Considering the exploration in the action space, we apply ✏-greedy methods on selecting the action, i.e., ⇡✓ (at |st ) = ✏-greedy(Qit (sit , ait )). In the multi-agent setting, agents share a common Qvalue function approximated by a deep neural network: Qt (sit , ait ) = Qt ((Oti , v i ), ait ). We refer the standard setting of DQN to Mnih et al.. Parameters sharing is one way to make the million-agent learning task computationally tractable. Each individual agent, however, still can make independent decision, and behave differently based on its local observation and its unique identity embeddings. In fact, the embedding represents agents unique characteristics, and could help fire different hidden states in the Q-network. On the other hand, it is also reasonable to let the whole population share the same network, as biologically speaking, individuals of species tend to inherit the same characteristics from their ancestors (Fryxell et al. 2007; Niwa 1994; Inada and Kawachi 2002), therefore, it is safe to assume that the intelligence level of each predator is the same, namely, to share a common Q-value network. At each time step, all agents contribute its experienced transitions (sit , ait , rti , sit+1 ) to the buffer, as shown in Fig. 2, which is a system design considering efficiency. We collect all the agents’ experience of one time step in parallel and then update shared Q-network using them at the same time to increase the utilization of the GPU. Based on experience coming from the buffer, the shared Q-network is updated as: Q(sit , ait ) Q(sit , ait )+↵[rti + max Q(sit+1 , a0 ) Q(sit , ait )]. 0 a 2A (1) It is worth mentioning that the experience buffer in Fig. 2 stores the experience from the agents only for the current time step; this is different from the replay buffer that is commonly used in the traditional DQN where the buffer maintains a first-in-first-out queue across different time steps. Unlike in the single-agent RL setting, using the off-policy replay buffer will typically lead to the non-stationarity issue for the mutli-agent learning tasks (Lowe et al. 2017). On the other hand, Mnih et al. introduced the replay buffer aiming at disrupting the auto-correlations between the consecutive examples. In our million-agent RL setting, the experiences are sampled concurrently from millions of agents, each individual agent with different states and policies; therefore, there is naturally no strong auto-correlations between the training examples. Thirdly, it is unlikely that the unwanted feedback loops arise since the sampled experiences will not be dominated by single agent’s decisions. Therefore, our design of the experience buffer is reasonable, and proves to be robust. Experiments and Findings Two sets of experiments have been conducted. The codes for the reproducible experimental results are provided on the Github1 Understanding the Population Dynamics We first study the population dynamics with a community of predators and preys by tracking the population size of each species over time. Specifically, we initialize 10,000 predators and 5,000 preys randomly scattered over a map of size 1, 000 ⇥ 1, 000. All predators’ health status is set to 1.0 initially and decays by 0.01 at each time step. In two comparing settings, the birth rates of preys are set to 0.006 and 0.01 respectively. The Q-network has two hidden layers, each with 32 hidden units, interleaved with sigmoid non-linear layers, which then project to 9-dimensional outputs, one for each potential action. During training, the predators learn in an 1 The code on Github: https://github.com/geek-ai/ 1m-agents. off-policy reinforcement learning scheme, with exploratory parameter ✏ being 0.1. Surprisingly, we find that the AI population reveals an ordered pattern when measuring the population dynamics. As shown in Fig. 3, the population sizes of both predators and preys reach a dynamic equilibrium where both curves present a wax-and-wane shape, but with a 90 lag in the phase, i.e., the crest of one is aligned with the trough of the other. The underlying logic of such ordered dynamics could be that when the predators’ population grows because they learn to know how to hunt efficiently, as a consequence of more preys being captured, the preys’ population shrinks, which will later cause the predators’ population also shrinks due to the lack of food supply, and with the help of less predators, the population of preys will recover from the shrinkage and start to regrow. Such logic drives the 2-D contour of population sizes (see the green-blue traits in the 2nd row in Fig. 3) into harmonic cycles, and the circle patterns become stable with the increasing level of intelligence agents acquire from the reinforcement learning. As it will be shown later in the ablation study, enabling the individual intelligence is the key to observe these ordered patterns in the population dynamics. In fact, the population dynamics possessed by AI agents are consistent with the Lotka-Volterra (LV) model studied in biology (shown by the orange traits in Fig. 3). In population biology, the LV model (Lotka 1925) describes a Hamiltonian system with two-species interactions, e.g., predators and preys. In the LV model, the population size of predators q and of preys p change over time based on the following pair of nonlinear differential equations: 1 dp =↵ p dt q, 1 dq = p q dt . (2) The preys are assumed to have an unlimited food resource and thus can reproduce exponentially with rate ↵, until meeting predation, which is proportional to the rate at which the predators and the prey meet, represented by q. The predators have an exponential decay in the population due to natural death denoted by . Meanwhile, they can also boost the population by hunting the prey, represented by p. The solution to the equations is a harmonic function (wax-and-wane shaped) with the population size of predators lagging that of preys by 90 in the phase. On the phase space plot, it shows as a series of periodical circle V = p + ln(p) q + ↵ ln(q), with V dependent on initial conditions. In other words, which equilibrium cycle to reach depends on where the ecosystem starts. Similar patterns on the population dynamics might indicate that the orders from an AI population is induced from the same logic as the ecosystem that LV model describes. However, the key difference here is that, unlike the LV equations that model the observed macro dynamics directly, we start from a microcosmic point of view – the AI population is only driven by the self interest (powered by RL) of each individual agent, and then reaching the macroscopic principles. To further test the robustness of our findings, we perform an ablation study on three of the most important factors that we think of are critical to the generation of the ordered dy- (a) (b) Figure 3: Population dynamics in both the time space (1st row) and the phase space (2nd row). The orange circles the theoretical solutions to the Lotka-Volterra equation, with the red spot as the equilibrium. The green-blue circles the simulation results. a): The simulated birth rate of preys is 0.006. Fitted LV model: ↵ = 0.0067, = 3.75 ⇥ 10 6.11 ⇥ 10 7 , = 0.001. b): The simulated birth rate of preys is 0.01. Fitted LV model: ↵ = 0.0086, = 3.57 ⇥ 10 9.47 ⇥ 10 7 , = 0.0012, where ↵ in the LV model represents the birth rate. denote denote 7 , = 7 , = namics. First, we analyze whether the observed pattern is restricted by the specific settings of the predator-prey world. We expose the predator models, which are trained in the environment where the birth rate of preys is 0.006 in Fig. 3(a), into a new environment where the birth rate of preys is 0.01. Fig. 3(b) shows that after a period of time for adjustment, the predators adapt to the new environment, and the AI agents as a whole manage to maintain the patterns. Second, we break the binary predator-prey relationships by introducing a second type of prey that does not require group hunting. As shown in Fig. 4, in the case of three species which the LV model may find challenging to analyze, we can still observe the ordered harmonic circles in 3-D space. Third, we investigate the role of individual intelligence by disabling the learning function in the setting of Fig. 3(b). Fig. 5 shows that the AI population does not possess any ordered dynamics anymore if the intelligence of each individual agent is disabled. As such, the whole ecosystem explodes. The reason why predator goes extinct is that the increased birth rate of preys leads to new distributions on the states, thus the observations; consequently, the original optimal policy of predators becomes suboptimal in the new environment. Given that the number of preys increases exponentially, and the map size is limited, the sheep will soon cover all the blank spaces and the predators can barely aggregate any valid groups for hunting and finally die of starvation. ing, which we refer to as the “group proportion”. In the face of two kinds of preys (one requires group hunting and the other does not), the predators have to make a decision to either join a group for hunting a sheep or hunt a rabbit itself alone. We conduct two experiments with the predator population size equaling 10 thousands and 2 millions, the map size equaling 103 ⇥ 103 and 104 ⇥ 104 respectively. Acting like a “zoo-keeper”, we supplement the number of preys to a fixed amount if the number drops below a certain threshold. For each supplement, we alternate the types of preys to feed in. Suppose the number of species A is below the threshold, we supply species B. The setting of Q-network is the same as in the study on population dynamics. As the preys are alternatively fed, the predator’s policy needs to react correspondingly to the new environment so as to survive. As shown in Fig. 6(a) and 6(b), the moment right after the rabbits are fed into the environment, the proportion of groups drastically drop down to nearly 0. Predators collectively behave to be selfish rather than to be altruistic to the group. With the number of rabbits being captured, the proportion of grouping behaviors increases mildly again, and meets a spike soon after the sheep are fed into the environment, and reaches another dynamic equilibrium. In a highlyvariable environment, the population of predators show the intelligence of adapting their hunting strategies collectively without any external supervisions or controls. Understanding the Grouping Behaviors Discussions Next, we investigate the dynamics of the collective grouping behaviors. In particular, we intend to find out the relationship between environmental food resources and the proportion of the predators that participate in the group hunt- Judging from the ordered patterns of the AI population in the predator-prey world, we have reasons to agree with Lucretius that a designing intelligence is necessary to create orders in nature. In fact, in understanding the emergence of Figure 4: Population dynamics in the time space and the phase space. A new type of prey (green line) is introduced, which can be captured by a single agent. The AI population shows ordered dynamics in the 3-D phase space. Figure 5: Population dynamics with the learning function of AI population disabled. The simulation follows the same setting as Fig. 3(b). No ordered dynamics are found. Group proportion (a) ↑ ↑ ↑ ↑ ↑ ↑ (b) Figure 6: a) Grouping proportion in the predator-prey world where two kinds of preys are fed alternatively. " points out the time step that preys are fed. It tells that when the number of the prey sheep (that requires group hunting) increases, the proportion of groups in AI population increases, and adapting to grouping becomes collective behaviors. Vice verse to the case when the prey rabbit are fed. b) The same experiment on two-million AI population. orders in a system, the theory of self-organization proposed in (Ashby 1991) considers that the global ordered dynamics of a system can spontaneously originate from numerous interactions between local individuals that are initially disordered, with no needs of external interventions. The theory predicts the existence of the ordered dynamics from numerous local interactions between the individuals and the system. This could potentially explain the ordered patterns observed on our AI population that has been tested. Meanwhile, according to the theory, the created order is independent of the complexity of the individual involved. For example, the Lotka-Volterra dynamics also hold for other natural systems such as the herbivore and the plants, or the parasite and the host. Even though the LV models are based on a set of equations with fixed interaction terms, while our findings depend on intelligent agents driven by consistent learning process, the generalization of the resulting dynamics onto an AI population still leads us to imagine a general law that could unify the artificially created agents with the population we have studied in the natural sciences for long time. Arguably, in contrast to the self-organization theory, reductionist scientists hold a different view that order can only be created by transferring it from external systems. A typical example is The Second Law of Thermodynamics (Boltzmann 1974) stating that the total entropy (the level of disorder) will always increase over time in a closed system. Such an idea has widely been accepted, particularly in physics where quantitative analysis is feasible. However, we argue that our findings from the AI population do not go against this law. RL-based agents are not exceptions simply because the environment they “live” in are not closed. Whenever a system can exchange matter with its environment, an entropy decrease of that system (orders emerge) is still compatible with the second law. A further discussion on entropy and life (Schrodinger 1943) certainly goes beyond this topic, and we leave it for future work. Conclusions We conduct an empirical study on an AI population by simulating a predator-prey world where each individual agent is empowered by deep reinforcement learning, and the number of agents is up to millions. We find that the AI population possesses the ordered population dynamics consistent with the Lotka-Volterra model in ecology. We also discover the emergent collective adaptations when the environmental resources change over time. Importantly, both of the findings could be well explained by the self-organization theory from natural sciences. Next, we intend to understanding many other more AI population dynamics, and expect our findings could enlighten an interesting research direction of interpreting the RL-based AI population using the natural science principles developed in the real world. References [Ashby 1991] Ashby, W. R. 1991. Principles of the self-organizing system. In Facets of Systems Science. Springer. 521–536. [Bak 2013] Bak, P. 2013. How nature works: the science of selforganized criticality. Springer Science & Business Media. [Boccaletti et al. 2006] Boccaletti, S.; Latora, V.; Moreno, Y.; Chavez, M.; and Hwang, D.-U. 2006. Complex networks: Structure and dynamics. Physics reports 424(4):175–308. [Boltzmann 1974] Boltzmann, L. 1974. The second law of thermodynamics. In Theoretical physics and philosophical problems. Springer. 13–32. [Camazine 2003] Camazine, S. 2003. Self-organization in biological systems. Princeton University Press. [de Vries et al. 2016] de Vries, H.; Strub, F.; Chandar, S.; Pietquin, O.; Larochelle, H.; and Courville, A. 2016. GuessWhat?! Visual object discovery through multi-modal dialogue. [Dunbar 2016] Dunbar, R. 2016. Group size, vocal grooming and the origins of language. Psychonomic Bulletin & Review 1–4. [Foerster et al. 2016] Foerster, J.; Assael, Y. M.; de Freitas, N.; and Whiteson, S. 2016. Learning to communicate with deep multiagent reinforcement learning. In Advances in Neural Information Processing Systems, 2137–2145. [Foerster et al. 2017] Foerster, J.; Nardelli, N.; Farquhar, G.; Torr, P.; Kohli, P.; Whiteson, S.; et al. 2017. Stabilising experience replay for deep multi-agent reinforcement learning. arXiv preprint arXiv:1702.08887. [Fryxell et al. 2007] Fryxell, J. M.; Mosser, A.; Sinclair, A. R.; and Packer, C. 2007. Group formation stabilizes predator–prey dynamics. Nature 449(7165):1041–1043. [Gilpin 1973] Gilpin, M. E. 1973. Do hares eat lynx? The American Naturalist 107(957):727–730. [Guillen 2000] Guillen, M. F. 2000. Business groups in emerging economies: A resource-based view. academy of Management Journal 43(3):362–380. [Hu and Wellman 2003] Hu, J., and Wellman, M. P. 2003. Nash q-learning for general-sum stochastic games. Journal of Machine learning research 4(Nov):1039–1069. [Hu, Wellman, and others 1998] Hu, J.; Wellman, M. P.; et al. 1998. Multiagent reinforcement learning: theoretical framework and an algorithm. In ICML, volume 98, 242–250. Citeseer. [Inada and Kawachi 2002] Inada, Y., and Kawachi, K. 2002. Order and flexibility in the motion of fish schools. Journal of theoretical Biology 214(3):371–387. [Javarone and Marinazzo 2016] Javarone, M. A., and Marinazzo, D. 2016. Evolutionary dynamics of group formation. arXiv preprint arXiv:1612.03834. [Kauffman 1993] Kauffman, S. A. 1993. The origins of order: Selforganization and selection in evolution. Oxford University Press, USA. [Lazaridou, Peysakhovich, and Baroni 2016] Lazaridou, A.; Peysakhovich, A.; and Baroni, M. 2016. Multi-agent cooperation and the emergence of (natural) language. CoRR abs/1612.07182. [Leibo et al. 2017] Leibo, J. Z.; Zambaldi, V.; Lanctot, M.; Marecki, J.; and Graepel, T. 2017. Multi-agent reinforcement learning in sequential social dilemmas. arXiv preprint arXiv:1702.03037. [Lillicrap et al. 2015] Lillicrap, T. P.; Hunt, J. J.; Pritzel, A.; Heess, N.; Erez, T.; Tassa, Y.; Silver, D.; and Wierstra, D. 2015. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971. [Lotka 1925] Lotka, A. J. 1925. Elements of physical biology. [Lowe et al. 2017] Lowe, R.; Wu, Y.; Tamar, A.; Harb, J.; Abbeel, P.; and Mordatch, I. 2017. Multi-agent actor-critic for mixed cooperative-competitive environments. arXiv preprint arXiv:1706.02275. [Mnih et al. 2013] Mnih, V.; Kavukcuoglu, K.; Silver, D.; Graves, A.; Antonoglou, I.; Wierstra, D.; and Riedmiller, M. 2013. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602. [Mnih et al. 2015] Mnih, V.; Kavukcuoglu, K.; Silver, D.; Rusu, A. A.; Veness, J.; Bellemare, M. G.; Graves, A.; Riedmiller, M.; Fidjeland, A. K.; Ostrovski, G.; et al. 2015. Human-level control through deep reinforcement learning. Nature 518(7540):529–533. [Mnih et al. 2016] Mnih, V.; Badia, A. P.; Mirza, M.; Graves, A.; Lillicrap, T.; Harley, T.; Silver, D.; and Kavukcuoglu, K. 2016. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, 1928–1937. [Mordatch and Abbeel 2017] Mordatch, I., and Abbeel, P. 2017. Emergence of Grounded Compositional Language in Multi-Agent Populations. [Niwa 1994] Niwa, H.-S. 1994. Self-organizing dynamic model of fish schooling. Journal of theoretical Biology 171(2):123–136. [Palmer 2014] Palmer, A. 2014. Reading Lucretius in the Renaissance, volume 16. Harvard University Press. [Peng et al. 2017] Peng, P.; Yuan, Q.; Wen, Y.; Yang, Y.; Tang, Z.; Long, H.; and Wang, J. 2017. Multiagent bidirectionallycoordinated nets for learning to play starcraft combat games. arXiv preprint arXiv:1703.10069. [Schrodinger 1943] Schrodinger, E. 1943. What is life? University Press: Cambridge. [Silver et al. 2016] Silver, D.; Huang, A.; Maddison, C. J.; Guez, A.; Sifre, L.; Van Den Driessche, G.; Schrittwieser, J.; Antonoglou, I.; Panneershelvam, V.; Lanctot, M.; et al. 2016. Mastering the game of go with deep neural networks and tree search. Nature 529(7587):484–489. [Sukhbaatar, Fergus, and others 2016] Sukhbaatar, S.; Fergus, R.; et al. 2016. Learning multiagent communication with backpropagation. In Advances in Neural Information Processing Systems, 2244–2252. [Sumpter 2006] Sumpter, D. J. 2006. The principles of collective animal behaviour. Philosophical Transactions of the Royal Society of London B: Biological Sciences 361(1465):5–22. [Sutton and Barto 1998] Sutton, R. S., and Barto, A. G. 1998. Reinforcement learning: An introduction, volume 1. MIT press Cambridge. [Usunier et al. 2016] Usunier, N.; Synnaeve, G.; Lin, Z.; and Chintala, S. 2016. Episodic exploration for deep deterministic policies: An application to starcraft micromanagement tasks. arXiv preprint arXiv:1609.02993. [Wang, Liang, and Manning 2016] Wang, S. I.; Liang, P.; and Manning, C. D. 2016. Learning language games through interaction. arXiv preprint arXiv:1606.02447. [Yu et al. 2017] Yu, L.; Zhang, W.; Wang, J.; and Yu, Y. 2017. Seqgan: Sequence generative adversarial nets with policy gradient. In AAAI, 2852–2858. [Zoph and Le 2016] Zoph, B., and Le, Q. V. 2016. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578. Appendix Table 1: The Axioms of the Simulated Predator-prey World Axiom Positive Feedback Negative Feedback Individual Variation Response Threshold Redundancy Synchronisation Selfishness Description Example in Nature Positive feedback enhances partic- One backup in nature comes from the observations from ular behaviors through reinforce- ants [1, 2]. When an ant discovers a food source through ment. It helps spread the informa- a particular search trail, the path to the food will soon tion of a meaningful action quickly serve as the trigger for a positive feedback through between the individuals. which other ants start to follow. Negative feedback leads to home- In the ant’s case, as the population size of ants is limited, ostasis. It helps stabilize the collec- with increasing number of ants forage the food from tive behaviors produced in favor of outside, the distribution of ants between food sources the positive feedback from going to will be stable. extremes. Individual variation is of the One evidence comes from the honey bees [3, 4]. Social essence to guarantee the continual insects as honey bees are evolved to be highly variable in explorations of new solutions to the the directional sense, response to sucrose, level of focus same problem within a population. in food collection in order to ensure the diversification in ways of food collection, otherwise one single food resource will be depleted quickly. Response threshold is the thresh- An evidence found in nature is that, bumble bees will old beyond which individuals will start to fan so as to cool down the hive when the temperchange their behaviors as a re- ature inside goes above a threshold level [5]. sponse to the stimulus. Redundancy ensures functional In the kingdom of bees, if the community suffers a continuity of the whole population drastic reduction in the number of worker bees, younger even when a catastrophic event hap- bees will soon replace their positions to guarantee that pens. the whole community function well [6]. Synchronization is a special kind An example would be how individual with unique freof positive feedback in time rather quency of applause affect the frequency of the crowd than space. in a concert. Empirical evidence includes audience applause are often achieved through adjustments by individuals having an unique, frequency among local average. Selfishness means that agents Easily observable in nature. should always maximise their own utility. References [1] Edward O Wilson et al. The insect societies. The insect societies., 1971. [2] Eric Bonabeau, Guy Theraulaz, Jean-Louls Deneubourg, Serge Aron, and Scott Camazine. Self-organization in social insects. Trends in Ecology & Evolution, 12(5):188–193, 1997. [3] Tanya Pankiw and Robert E Page Jr. Response thresholds to sucrose predict foraging division of labor in honeybees. Behavioral Ecology and Sociobiology, 47(4):265–267, 2000. [4] Robert L Jeanne. Interindividual behavioral variability in social insects. Westview Press, 1988. [5] Anja Weidenmüller. The control of nest climate in bumblebee (bombus terrestris) colonies: interindividual variability and self reinforcement in fanning response. Behavioral Ecology, 15(1):120–128, 2004. [6] Thomas D Seeley. The wisdom of the hive: the social physiology of honey bee colonies. Harvard University Press, 2009.
2cs.AI
Zeros of irreducible characters in factorised groups arXiv:1803.00432v1 [math.GR] 1 Mar 2018 M. J. Felipe · A. Martı́nez-Pastor · V. M. Ortiz-Sotomayor ∗ Abstract An element g of a finite group G is said to be vanishing in G if there exists an irreducible character χ of G such that χ(g) = 0; in this case, g is also called a zero of G. The aim of this paper is to obtain structural properties of a factorised group G = AB when we impose some conditions on prime power order elements g ∈ A ∪ B which are (non-)vanishing in G. Keywords Finite groups · Products of groups · Irreducible characters · Conjugacy classes · Vanishing elements 2010 MSC 20D40 · 20C15 · 20E45 1 Introduction Within finite group theory, the close relationship between character theory and the study of conjugacy classes is widely known. Regarding this last topic, several authors have investigated the connection between certain conjugacy class sizes (also called indices of elements) of a group G and its structure. Further, recent results show up that the conjugacy classes of the elements in the factors of a factorised group exert a strong impact on the structure of the whole group (see [3, 10, 15, 16]). In character theory, a celebrated Burnside’s result asserts: every row in a character table of a finite group which corresponds to a non-linear complex character has a zero entry [17, Theorem 3.15]. Nevertheless, a non-central conjugacy class column may not contain a zero. This fact somehow violates the standard duality arising in many cases between the two referred research lines. Therefore, in [18] the authors introduce the next concept: an element g ∈ G is vanishing in G if there exists an irreducible character ∗ The first author is supported by Proyecto Prometeo II/2015/011, Generalitat Valenciana (Spain). The second author is supported by Proyecto MTM 2014-54707-C3-1-P, Ministerio de Economı́a, Industria y Competitividad (Spain), and by Proyecto Prometeo/2017/057, Generalitat Valenciana (Spain). The third author acknowledges the predoctoral grant ACIF/2016/170, Generalitat Valenciana (Spain). Instituto Universitario de Matemtica Pura y Aplicada (IUMPA-UPV), Universitat Politècnica de València, Camino de Vera s/n, 46022 Valencia, Spain B: [email protected], [email protected], [email protected] ORCID iDs: 0000-0002-6699-3135, 0000-0002-0208-4098, 0000-0001-8649-5742 1 χ of G such that χ(g) = 0 (in the literature, g is also called a zero of χ). Otherwise the element g is said to be non-vanishing in G. As an immediate consequence of the cited Burnside’s result, we get that a group has no vanishing elements if and only if it is abelian. It is to be said that various questions concerning (non-)vanishing elements have been studied by numerous authors (in particular, those appearing as references in this paper). It is therefore natural to wonder whether results based on conjugacy class sizes remain true if we restrict focus only to those indices that correspond to vanishing elements, i.e. if we consider only the vanishing indices. In this spirit, some researchers have recently obtained positive results in certain cases. For instance, in 2010, Dolfi, Pacifici and Sanus proved that if a prime p does not divide each vanishing index of a group G, then G has a normal p-complement and abelian Sylow p-subgroups [13, Theorem A]. In 2016, Brough showed that for a fixed prime p such that (p − 1, |G|) = 1, if all vanishing indices of G are not divisible by p2 , then G is soluble [7, Theorem A]. Moreover, if each vanishing index of G is square-free, then G is supersoluble [7, Theorem B]. The last two results turn to be the “vanishing versions” of [11, Theorem 1] and [11, Theorem 2], respectively. Besides, Brough and Kong have also showed in [8] that the hypotheses in the previous results can be weakened to vanishing indices of prime power order elements. We remark that the classification of finite simple groups (CFSG) is used in this development. In this paper, we are interested in combining as a novelty the research on irreducible characters with the study of products of groups. More concretely, we want to analyse which information of a factorised group G can be obtained from its character table when we consider the conjugacy classes in G of elements in the factors. In particular, inspired by the aforementioned investigations, we deal with factorised groups having irreducible characters which evaluate zero on some elements in the factors. It is worthwhile to note that the product of two vanishing elements needs not to be vanishing in general. Moreover, an element in a (normal) subgroup can be vanishing in the whole group but not in that subgroup (see Example 3.6). Focusing in products of groups, along the last decades, some relations of permutability between the factors have been considered by many authors, as for instance total permutability, mutual permutability (see [4]) and tcc-permutability (see [2, 1]). These last permutability relations are inherited by quotients, and they ensure the existence of a minimal normal subgroup contained in one of the factors. We are principally concerned about products of groups that satisfy both particular conditions, which we will name core-factorisations (see Definition 2.1). In this framework, our purpose is to get a better understanding of how the vanishing elements in the factors control the structure of a group with a core-factorisation. Moreover, we will also deal with arithmetical conditions on the indices of those elements. The paper is structured in the following way: Firstly, core-factorisations are defined in Section 2 and some properties of them, which will be crucial along the paper, are proved. In Section 3, we analyse the case that a group with a core-factorisation has no vanishing p-elements in the factors for a prime p (see Theorem 3.8). As a consequence, we obtain information of a factorised group when all prime divisors of its order are 2 considered, that is, when there are no vanishing prime power order elements in the factors (see Corollary 3.12). Later on we obtain structural properties of groups with a core-factorisation from the vanishing indices in the whole group of some elements in the factors. Concretely, in Section 4, we study the case when those vanishing indices are prime powers (Theorem 4.6 and Corollary 4.8). Next, we focus in Section 5 on the case that the indices are not divisible by a prime p (see Theorem 5.1). The situation when those indices are square-free is also handled in this last section (see Theorems 5.5 and 5.9). In particular, we highlight that an affirmative answer to a question posed by Brough in [7] is given (Corollary 5.6). It is significant to mention again that all the previous results for core-factorisations will remain true when the factors are either totally, mutually or tcc-permutable (see Example 2.3). We remark that, in order to avoid repeating arguments from previous papers, when some proof runs as in the one of a known result with suitable changes, we refer to the corresponding one. Throughout this paper, every group is assumed to be finite. The terminology here is as follows: for a group G and an element x ∈ G, we call iG (x) the index of x in G, that is, iG (x) = |G : CG (x)| is the size of the conjugacy class xG . The set of prime divisors of the order of G is denoted by π(G). If p is a prime, then x ∈ G is a p-regular element if its order is not divisible by p. As customary, the set of all Sylow p-subgroups of G is denoted by Sylp (G), whilst Hallπ (G) is the set of all Hall π-subgroups of G for a set of primes π. We write Irr(G) for the set of all irreducible complex characters of G. Given a group G = AB which is the product of the subgroups A and B, a subgroup S is called prefactorised (with respect to this factorisation) if S = (S ∩ A)(S ∩ B) (see [4]). We recall that a subgroup U covers a section V /W of a group G if W (U ∩ V ) = V . The remainder notation is standard, and it is taken mainly from [12]. In particular, a normal subgroup N of a group G such that N 6= G is denoted symbolically by N ⊳ G. We also refer to [12] for details about classes of groups. 2 Core-factorisations: definition and properties We analyse in this section the kind of factorisations we manage along the paper. Definition 2.1. Let 1 6= G = AB be the product of the subgroups A and B. We say that G = AB is a core-factorisation if for every proper normal subgroup K of G it holds that there exists a normal subgroup 1 6= M/K of G/K such that either M/K 6 AK/K or M/K 6 BK/K (i.e. either A or B covers M/K). Note that if we adopt the bar convention for the quotients over K, the above condition means that AG B G 6= 1, where HX denotes the core in a group X of a subgroup H. This illustrates the given name for such factorisations. Remark 2.2. Let state some immediate facts: 1. If either 1 6= G = A or 1 6= G = B, then G = AB is always a core-factorisation. 2. If G = AB is a core-factorisation of a simple group G, then either G = A or G = B. 3 3. If we take K = 1 in the above definition, then there exists a (minimal) normal subgroup of G = AB contained in either A or B. We present now some non-trivial examples. Example 2.3. Let 1 6= G = AB be the product of the subgroups A and B, and let assume that A and B satisfy one of the following permutability properties: (i) A and B are mutually permutable, that is, A permutes with every subgroup of B and B permutes with every subgroup of A. (ii) A and B are tcc-permutable, that is, if for every subgroup X of A and every subgroup Y of B, there exists g ∈ hX, Y i such that X permutes with Y g . (iii) A and B are totally permutable, that is, every subgroup of A permutes with every subgroup of B. (In particular, if this property holds, then A and B satisfy both (i) and (ii).) Applying [4, Theorem 4.3.11] in (i) and [2, Lemma 2.5] in (ii), it can be seen that AG BG 6= 1. Also, the above permutability properties are clearly inherited by quotients. Thus G = AB is a core-factorisation in all cases. We shall see later in Example 2.6 a group with with a core-factorisation whose factors are neither mutually permutable nor tcc-permutable. Now we prove that the quotients of core-factorisations inherit the property. Lemma 2.4. Let G = AB be a core-factorisation, and let M be a proper normal subgroup of G. Then G/M = (AM/M )(BM/M ) is also a core-factorisation. Proof. Let use the bar convention to denote the quotients over M . We take a normal subgroup K ⊳ G, and we claim that there exists a normal subgroup 1 6= N /K of G/K covered by either A or B. As G = AB is a core-factorisation, then G/K has a normal subgroup 1 6= N/K such that either N/K is covered by either A or B. It follows 1 6= N/M AK/M (AM/M )(K/M ) N AK = , 6 = = K/M K/M K/M K K or analogously the same is valid for B instead of A. The lemma below is a characterisation of core-factorisations via normal series. Lemma 2.5. Let 1 6= G = AB be the product of the subgroups A and B. The following statements are pairwise equivalent: (i) G = AB is a core-factorisation. (ii) There exists a normal series 1 = N0 E N1 E · · · E Nn−1 E Nn = G such that either Ni /Ni−1 6 ANi−1 /Ni−1 or Ni /Ni−1 6 BNi−1 /Ni−1 , for each 1 ≤ i ≤ n (i.e. Ni /Ni−1 is covered by either A or B). 4 (iii) There exists a chief series 1 = N0 E N1 E · · · E Nn−1 E Nn = G such that either Ni /Ni−1 6 ANi−1 /Ni−1 or Ni /Ni−1 6 BNi−1 /Ni−1 , for each 1 ≤ i ≤ n (i.e. Ni /Ni−1 is covered by either A or B). Further, each term Ni of such (chief ) normal series is prefactorised and Ni = (Ni ∩ A)(Ni ∩ B) is also a core-factorisation. Proof. (i) implies (ii): Let 1 6= N1 E G such that either N1 6 A or N1 6 B, so 1 ⊳ N1 E G. Next, take G/N1 = (AN1 /N1 )(BN1 /N1 ). If G/N1 = 1, then we have the desired series. If 1 6= G/N1 , then it is again a core-factorisation by the previous lemma. Therefore, there exists 1 6= N2 /N1 E G/N1 such that either N2 /N1 6 AN1 /N1 or N2 /N1 6 BN1 /N1 . So we get the series 1 ⊳ N1 ⊳ N2 E G. Repeating this process until we reach a trivial quotient G/Nj , we get the desired series. (ii) implies (iii): If we refine the series in (ii) to a chief series, then we get for each factor that there exist Ni = T0 E T1 E T2 E · · · E Tk = Ni+1 such that each Tj /Tj−1 is a minimal normal subgroup of G/Tj−1 . Let see that either Tj /Tj−1 6 ATj−1 /Tj−1 or Tj /Tj−1 6 BTj−1 /Tj−1 . We may assume for instance Ni+1 6 ANi . Thus Tj = Tj ∩ Ni+1 6 Ni (Tj ∩ A) 6 Tj−1 A, and so Tj /Tj−1 6 ATj−1 /Tj−1 . (iii) implies (i): We have to show that for each K ⊳ G, there exists a non-trivial normal subgroup of G/K covered by either A or B. Let 1 ≤ r ≤ n be the minimum number such that Nr K. Then 1 6= Nr K/K is normal in G/K. Let suppose for instance that Nr /Nr−1 6 ANr−1 /Nr−1 , so Nr 6 ANr−1 . By the minimality of r it follows Nr K/K 6 AK/K. Now we claim that each Ni in such (chief) normal series is prefactorised, and we work by induction on i. The case i = 1 is clear since either N1 6 A or N1 6 B. Now we assume that Ni−1 = (Ni−1 ∩ A)(Ni−1 ∩ B) and we want to show that Ni is also prefactorised. We may consider Ni 6 ANi−1 , and then Ni = (Ni ∩ A)Ni−1 = (Ni ∩ A)(Ni−1 ∩ A)(Ni−1 ∩ B) ⊆ (Ni ∩ A)(Ni ∩ B) ⊆ Ni . Fix a prefactorised Ni = (Ni ∩ A)(Ni ∩ B) of a (chief) normal series of G like in (ii) or (iii), for some i ∈ {1, . . . , n}. We are showing that Ni = (Ni ∩ A)(Ni ∩ B) is a core-factorisation. Consider the following portion of such (chief) normal series 1 = N0 E N1 E · · ·E Ni . Let m ∈ {1, . . . , i}. We claim that Nm satisfies either Nm 6 (Ni ∩ A)Nm−1 or Nm 6 (Ni ∩ B)Nm−1 in order to apply the equivalence between (ii) and (i). We have by assumption that for instance Nm 6 Nm−1 A, so Nm 6 Nm−1 A ∩ Ni = Nm−1 (A ∩ Ni ). The lemma is now established. We point out that if N is an arbitrary prefactorised normal subgroup of a corefactorisation G = AB, then N = (N ∩ A)(N ∩ B) might not be a core-factorisation, as the next example shows. Example 2.6. Consider G = Sym(4) × hxi, where Sym(4) denotes the symmetric group of 4 letters and o(x) = 2. If A = h((1, 2), x), ((3, 4), x), ((1, 3)(2, 4), x)i and B = h((2, 3, 4), 1), ((3, 4), 1), (1, x)i, then G = AB is a core-factorisation, and N = Sym(4) = (N ∩ A)(N ∩ B) is not a core-factorisation, since there is no minimal normal subgroup of N neither in N ∩ A nor in N ∩ B. Moreover, it can be seen that A and B are not either mutually nor tcc-permutable. 5 3 On vanishing elements The main objective of this section is to prove Theorem 3.8 and Corollary 3.12. Let state first some key ingredients for locating vanishing elements in a given group. Lemma 3.1. [14, Lemma 2.9] Let N 6 M 6 G, with N and M normal in G and (|N | , |M/N |) = 1. If N is minimal normal in G, CM (N ) 6 N and M/N is abelian, then every element in M r N is vanishing in G. In 2017, Bianchi, Brough, Camina and Pacifici obtained the subsequent result. Lemma 3.2. [5, Corollary 4.4] Let G be a group, and K an abelian minimal normal subgroup of G. Let M/N be a chief factor of G such that (|K| , |M/N |) = 1, and N = CM (K). Then every element of M r N is a vanishing element of G. Let p be a prime, and χ ∈ Irr(G). Recall that χ is of p-defect zero if p does not divide A well-known result of Brauer [17, Theorem 8.17] highlights the significance that this property has for vanishing elements: if χ is an irreducible character of p-defect zero of G then, for every g ∈ G such that p divides the order of g, it holds χ(g) = 0. The following lemma yields elements of normal subgroups that vanish in the whole group. |G| χ(1) . Lemma 3.3. [7, Lemma 2.2] Let N be a normal subgroup of a group G. If N has an irreducible character of p-defect zero, then every element of N of order divisible by p is a vanishing element in G. We now focus on vanishing elements in simple groups. The combination of some results in [14], which use the classification, gives the following. Proposition 3.4. Let S be a non-abelian simple group, and let p ∈ π(S). Then, either there exists χ ∈ Irr(S) such that χ is of p-defect zero, or there exists a p-element x ∈ S and χ ∈ Irr(S) such that χ extends to Aut(S) and χ vanishes on x. Proof. If either S is a group of Lie type or p ≥ 5, then [14, Proposition 2.1] applies and S has an irreducible character of p-defect zero (note that this case includes the groups A5 ∼ = P SL(2, 5) and A6 ∼ = P SL(2, 9)). Hence it remains to consider sporadic simple groups and alternating groups, and p ∈ {2, 3}. Firstly, in virtue of [14, Lemma 2.3], for a sporadic simple group S there exists always an irreducible character which extends to Aut(S) and it vanishes on a p-element. For alternating groups An with n ≥ 7, it is known by [14, Proposition 2.4] that An has two irreducible characters χ2 , χ3 such that χ2 vanishes on a 2-element and χ3 vanishes on an element of order 3. Further, both χ2 and χ3 extend to Aut(An ). An argument included within the proof of [14, Theorem A] provides the following proposition, which turns to be essential in the remainder of the section. Proposition 3.5. Let N be a non-abelian minimal normal subgroup of a finite group G, and let p ∈ π(N ). Then there exists a p-element in N which is vanishing in G. 6 Proof. We have that N = S1 ×· · ·×Sk , where each Si is isomorphic to a non-abelian simple group S with p dividing its order. If S has a character θ of p-defect zero, then χ := θ × · · · × θ ∈ Irr(N ) and it is clear that χ is also of p-defect zero. Let 1 6= xi ∈ Si be a p-element. Then 1 6= x := x1 · · · xk ∈ N is a p-element and Lemma 3.3 provides that x is vanishing in G. Let i ∈ {1, . . . , k} and suppose that Si does not have a character of p-defect zero. By Proposition 3.4, there exists θ ∈ Irr(Si ) and a p-element yi ∈ Si such that θ(yi ) = 0 (so 1 6= yi ) and θ extends to Aut(Si ). Thus 1 6= y := y1 · · · yk ∈ N is a p-element, and by [14, Proposition 2.2] it follows that χ := θ × · · · × θ ∈ Irr(N ) extends to G. Moreover, χ(y) = 0, and the result is now established. From now on we deal with (non-)vanishing elements in factorised groups. The next example gives insight into occurring phenomena. Example 3.6. Let G = Sym(4) × hxi = AB be the factorised group as in Example 2.6. Note that although ((3, 4), x) is vanishing in A and ((3, 4), 1) is vanishing in B, the product ((3, 4), x)((3, 4), 1) = (1, x) ∈ Z(G) and so it is non-vanishing in G. On the other hand, ((2, 3, 4), 1) is a non-vanishing element in B which is vanishing in G. Remark 3.7. We claim that the hypotheses regarding vanishing elements of the results stated from now on are inherited by every non-trivial quotient of a group G, where G = AB is a core-factorisation. Indeed, let N be a proper normal subgroup of G. Note that G/N = (AN/N )(BN/N ) is also a core-factorisation by Lemma 2.4. Since there exists a bijection between Irr(G) and the set of all characters in Irr(G/N ) containing N in their kernel, if xN ∈ AN/N ∪ BN/N is a vanishing (prime power order) element of G/N , then we can assume x ∈ A ∪ B, and that x is also a vanishing (prime power order) element of G. This fact will be used in the sequel, sometimes with no reference. Our first significant result analyses core-factorisations with no vanishing p-elements in the factors. We remark that the CFSG is needed. Theorem 3.8. Let G = AB be a core-factorisation, and let p be a prime. If every p-element in A ∪ B is non-vanishing in G, then G has a normal Sylow p-subgroup. Proof. Let G be a counterexample of minimal order to the result, and take P ∈ Sylp (G). Clearly we can assume that Op (G) is proper in G. Hence by Remark 3.7 and the minimality of G we may suppose Op (G) = 1. Since G = AB is a core-factorisation, we can consider a minimal normal subgroup N of G such that N 6 A, for instance. Let suppose that p divides its order. Then N is non-abelian, and by Proposition 3.5 there is a p-element x ∈ N which is vanishing in G, a contradiction. So p does not divide the order of N . In particular, we may assume that N is proper in G. By minimality and Remark 3.7 we obtain that P N/N is normal in G/N , and then G is p-separable. We can choose by Lemma 2.5 a chief series 1 = N0 E N1 = N E · · · E Nn−1 E Nn = G such that each chief factor Ni /Ni−1 is covered by either A or B. Let j ∈ {2, . . . , n} be the minimum number such that p divides |Nj /Nj−1 |. Then Nj /Nj−1 is a minimal normal subgroup of G/Nj−1 and it is p-elementary abelian. It follows that Nj /N = 7 Nj−1 /N × P0 /N , where 1 6= P0 /N = P N/N ∩ Nj /N is the unique Sylow p-subgroup (and elementary abelian) of Nj /N . We claim that every element of P0 r N is vanishing in G. Note that P0 /N is abelian and normal in G/N . It also holds (|N | , |P0 /N |) = 1. In addition, since N = Op′ (P0 ) and Op (P0 ) 6 Op (G) = 1, then CP0 (N ) 6 N . Lemma 3.1 yields that every element in P0 r N is vanishing in G. Therefore, it remains to find a p-element in P0 r N lying in either A or B in order to get the final contradiction. Since Nj = (Nj ∩ A)(Nj ∩ B) by Lemma 2.5, applying [16, Lemma 2] we can affirm that the unique Sylow p-subgroup P0 /N of Nj /N is also prefactorised, that is, P0 /N = (P0 /N ∩ (Nj ∩ A)/N )(P0 /N ∩ (Nj ∩ B)N/N ). Let X ∈ {A, B} such that 1 6= P0 /N ∩ (Nj ∩ X)N/N = (P0 ∩ Nj ∩ X)N/N . If we pick a p-element 1 6= x ∈ (P0 ∩ Nj ∩ X) r N , then x is vanishing in G. Hence the result is established. As an immediate consequence, when we take the trivial factorisation G = A = B in the above theorem, we obtain [14, Theorem A]. In their proof, the authors apply Lemma 3.1 to the centre of a Sylow subgroup in order to get the final contradiction. We highlight that the centre subgroup may not be prefactorised (see [4, Example 4.1.43]) and so our reasonings differ. Another consequence of Theorem 3.8 is the following. Corollary 3.9. Let G = AB be a core-factorisation, and let σ be a set of primes. If every σ-element of prime power order in A ∪ B is non-vanishing in G, then G has a nilpotent normal Hall σ-subgroup. Proof. Apply Theorem 3.8 for each prime in σ. Note that if σ = p′ in the above result, then it generalises [14, Corollary B]. Indeed, the next corollary extends [14, Corollary C] for factorised groups. Corollary 3.10. Let G = AB be a core-factorisation, and let {p, q} ⊆ π(G). If every element in A ∪ B vanishing in G has order a {p, q}-number, then G is soluble. Proof. We denote by σ := {p, q}′ . In virtue of Corollary 3.9, G has a nilpotent normal Hall σ-subgroup N . Now, G/N is soluble because it is a {p, q}-group, so G is also soluble. If we consider the case when the hypotheses in Theorem 3.8 hold for all primes, then it follows clearly that those groups are nilpotent. But actually we obtain the stronger fact that they are abelian. The next result is essential in its proof. Proposition 3.11. [18, Theorem B] If G is supersoluble, then every element in G r Z(F(G)) is vanishing in G. In particular, if G is nilpotent, then all elements in Gr Z(G) are vanishing in G. Corollary 3.12. Let G = AB be a core-factorisation. The following statements are pairwise equivalent: (1) Every element x ∈ A ∪ B is non-vanishing in G. 8 (2) Every prime power order element x ∈ A ∪ B is non-vanishing in G. (3) G is abelian. Proof. There is no doubt in the implications (1) ⇒ (2) and (3) ⇒ (1), so let prove (2) ⇒ (3). Clearly, by Theorem 3.8, G is nilpotent. Since we are assuming that every prime power order element lying in A ∪ B is non-vanishing in G, then Proposition 3.11 provides that every Sylow subgroup of A and B lies below Z(G), and thus G = AB 6 Z(G). As it has been said before, from Burnside’s result quoted in the introduction it is elementary to show that a group is abelian if and only if it has no vanishing elements. Indeed, it is enough to consider in this last characterisation only prime power order elements, as we directly deduce by taking the trivial factorisation in the previous corollary. This claim can be also obtained from [19, Theorem B], which asserts that a non-linear complex character vanishes on a prime power order element (it also uses the CFSG). In any case, both proofs emphasize the difficulty of handling only prime power order elements. Moreover, observe that [19, Theorem B] does not imply directly Corollary 3.12, since we cannot assure in a factorised group that a vanishing prime power order element lies in one of the factors. 4 Prime power vanishing indices In [9], Camina and Camina analysed the structure of the so-called p-Baer groups, i.e. groups all of whose p-elements have prime power indices for a given prime p. Next, in [16] we extended this study through products of two arbitrary groups. Thus, as stated in the introduction, it seems natural to address the corresponding vanishing problem, i.e. vanishing indices which are prime powers, in particular for factorised groups. Let enunciate first some preliminary results. The subsequent well-established one is due to Wielandt. Lemma 4.1. Let G be a finite group and p a prime. If x ∈ G is a p-element and iG (x) is a p-number, then x ∈ Op (G). In [9], Camina and Camina proved the next proposition, which extends both the above lemma and the celebrated Burnside’s result about the non-simplicity of groups with a conjugacy class of prime power size. Proposition 4.2. [9, Theorem 1] All elements of prime power index of a finite group G lie in F2 (G), the second term of the Fitting series of G. The main result of [6] is the following one. Proposition 4.3. Let G be a group which contains a non-trivial normal p-subgroup N for p a prime. Then each x ∈ N such that p does not divide iG (x) is non-vanishing in G. 9 Finally, the lemma below is elementary. Lemma 4.4. Let N be a normal subgroup of a group G, and A be a subgroup of G. Let p be a prime. We have: (a) iN (x) divides iG (x), for any x ∈ N . (b) iG/N (xN ) divides iG (x), for any x ∈ G. Remark 4.5. Note that, hereafter, in the results stated the arithmetical hypotheses on the indices are inherited by non-trivial quotients of core-factorisations. Indeed, let G = AB be a core-factorisation and suppose for an element x ∈ A ∪ B that iG (x) is a prime power, square-free, or not divisible by a given prime, respectively. Since iG/N (xN ) divides iG (x) by the above lemma, we get that iG/N (xN ) is also a prime power, squarefree, or not divisible by such prime, respectively. We are now ready to prove the following vanishing versions of [16, Theorem A (1-2)] and [16, Theorem B (1)] for core-factorisations, respectively. We emphasize that the techniques used in that approach are not valid when we work with zeros of irreducible characters. Theorem 4.6. Let G = AB be a core-factorisation. Let p be a prime, and P ∈ Sylp (G). Assume that every p-element x ∈ A ∪ B vanishing in G has prime power index. Then: (1) If all the considered indices are p-numbers, then P is normal in G. (2) G/ CG (Op (G)) has a normal Sylow p-subgroup. (3) G/ F(G) has a normal Sylow p-subgroup. (4) G/ Op′ (G) has a normal Sylow p-subgroup. So G is p-soluble of p-length 1. Proof. (1) If all the indices of vanishing p-elements x ∈ A ∪ B are p-numbers, then it is enough to reproduce the proof of Theorem 3.8. Notice that the contradictions now will be derived from Lemma 4.1. (2) Let denote G := G/ CG (Op (G)). We may assume G 6= 1. We show next that for every p-element 1 6= x = x CG (Op (G)) ∈ A ∪ B vanishing in G it holds that iG (x) is a p-number, and then (1) applies. Since by Remark 3.7 we can suppose that x ∈ A ∪ B is a p-element vanishing in G, by assumptions we get that iG (x) is a prime power (actually a p-number, because x ∈ / CG (Op (G))). Therefore iG (x) is also a p-number and we are done. (3) Let denote G := G/ F(G), and let assume G 6= 1. If the statement is false, then by Theorem 3.8 there exists a vanishing p-element 1 6= x = x F(G) in A ∪ B. By Remark 3.7, x ∈ / F(G) is a vanishing p-element in A∪ B, and so iG (x) is a power of a prime q 6= p. It follows x ∈ F2 (G) by Proposition 4.2, so 1 6= x ∈ Op (G). Proposition 4.3 implies that p divides iG (x), and so p divides iG (x), the final contradiction. 10 (4) We proceed by induction on |G| in order to show that P Op′ (G) is normal in G. We may assume Op′ (G) = 1, and by (3) we get that P F(G) = P is normal in G. The second assertion about the p-solubility of G follows directly. We remark that the vanishing analogue of [16, Theorem B (2)] is not true, that is, if the considered vanishing indices are powers of primes distinct from p, then the Sylow p-subgroup might not be abelian: Example 4.7. Let G be a Suzuki group of degree 8, and let H be the normaliser of a Sylow 2-subgroup of G. Then H is a core-factorisation of its Sylow subgroup of order 2 and a Sylow subgroup of order 7, and H does not have vanishing 2-elements. Nevertheless, the Sylow 2-subgroup of H is non-abelian. Moreover, [16, Theorem B] asserts that if all the p-elements in a factor have prime power indices in the whole factorised group, then there is a unique prime that divides all the considered indices. However, we do not know if the vanishing version of this fact is true. Finally, note that if we consider the assumptions in Theorem 4.6 for every prime in π(G), then the third statement tells us that G/ F(G) is nilpotent. In fact, the following result shows that G/ F(G) is abelian for such a group (compare with [16, Corollary C (1)]). Corollary 4.8. Let G = AB be a core-factorisation. If every prime power order element x ∈ A ∪ B vanishing in G has prime power index, then G/ F(G) is abelian. In particular, if these prime powers are actually p-numbers for a prime p, then G has a normal Sylow p-subgroup and abelian Hall p′ -subgroups. Proof. G/ F(G) is nilpotent by Theorem 4.6 (3). Let denote by G := G/ F(G), and let assume that G 6= 1 and that there exists 1 6= x = x F(G) a prime power order element in A ∪ B vanishing in G. Then x is a p-element for some prime p, and we may suppose x ∈ (A ∪ B) r F(G) is a p-element vanishing in G. By assumption, we have that iG (x) is a prime power. Since G is nilpotent, then by Proposition 4.3 it follows that iG (x) is a p-number, and so is iG (x). It follows by Wielandt’s lemma that x ∈ Op (G), so x = 1, a contradiction. Thus G does not have any vanishing prime power order element in A ∪ B, and by Corollary 3.12 we get that it is abelian. For the second assertion, note that P is the unique Sylow p-subgroup of G by Theorem 4.6 (1), so we claim that H ∼ = G/P is an abelian Hall p′ -subgroup of G. Let denote G̃ := G/P , so G̃ = ÃB̃. Hence, G̃ does not have any vanishing prime power order element in à ∪ B̃, since otherwise those elements are central by our assumptions, a contradiction. So it follows by Corollary 3.12 that G̃ = G/P ∼ = H is abelian. 5 Square-free vanishing indices In this last section we focus on vanishing indices in factorised groups which are square-free, motivated by previous developments in [7, 8, 13]. The next theorem treats 11 the most extreme square-free case: when the vanishing indices are not divisible by a fixed prime p. We should comment that, although some arguments in the proof of the first statement are similar to those in [8, Theorem 3.3], we include them here for the sake of comprehensiveness. Theorem 5.1. Let G = AB be a core-factorisation. (1) Assume that p does not divide iG (x) for every p-regular element of prime power order x ∈ A ∪ B vanishing in G. Then G is p-nilpotent. (2) If p does not divide iG (x) for every prime power order element x ∈ A∪B vanishing in G, then G is p-nilpotent with abelian Sylow p-subgroups. Proof. (1) Assume the result is false. We argue with G a minimal counterexample to the theorem. By minimality, we may suppose that Op′ (G) = 1. Let N be a minimal normal subgroup of G such that N 6 A, for instance. If N is soluble, since p divides its order it follows that N is a p-group. We can assume that N is proper in G since otherwise G is a p-group, so by minimality we get that G/N is p-nilpotent. Hence G is p-separable, and CG (Op (G)) 6 Op (G). This last fact and our assumptions produce that there are no p-regular elements of prime power order x ∈ A ∪ B vanishing in G, and Corollary 3.9 applies with σ = p′ . Thus N is non-soluble, and applying the same arguments as in the second paragraph in the proof of [8, Theorem 3.3], it can be obtained a p-regular element of prime power order in N 6 A which is vanishing in G and whose conjugacy class size in G is divisible by p, the final contradiction. (2) G is p-nilpotent by (1). Let denote G̃ := G/H where H is the unique Hall p′ subgroup of G, and then G̃ = ÃB̃. Then, G̃ does not have any vanishing prime power order element in à ∪ B̃, because otherwise the hypotheses imply that those elements are central, a contradiction. Now in virtue of Corollary 3.12 we get that G̃ is abelian. Note that Theorem 5.1 provides a vanishing version of [3, Theorem 1.1] for products of two groups, even relaxing the mutual permutability of the factors. We also remark that [8, Theorem 3.3] is Theorem 5.1 (1) for the trivial factorisation. Indeed, (2) implies the next corollary, which improves the main result of [13] by considering only vanishing indices of prime power order elements: Corollary 5.2. Let G be a group, and p be a prime. If p does not divide any vanishing index of a prime power order element, then G is p-nilpotent with abelian Sylow p-subgroups. Regarding square-free vanishing indices, we first analyse those which are not divisible by p2 , for a fixed prime p. The next proposition is actually the vanishing version of [15, Theorem A]. We point out that this result is valid for any arbitrary factorisation of a p-group. Proposition 5.3. Let p be a prime number and let P = AB be a p-group such that p2 does not divide iP (x) for all x ∈ A ∪ B vanishing in P . Then P ′ 6 Φ(P ) 6 Z(P ), P ′ is elementary abelian and |P ′ | ≤ p2 . 12 Proof. Since the non-vanishing elements of a p-group lie in its centre because of Proposition 3.11, we can apply directly [15, Theorem A] in order to get the thesis. The following lemma will be essential in the sequel. Lemma 5.4. [3, Lemma 2.4] Let p be a prime, and Q be a p′ -group acting faithfully on an elementary abelian p-group N with |[x, N ]| = p, for all 1 6= x ∈ Q. Then Q is cyclic. In [7], the author posed the following question: a group such that all its vanishing indices are not divisible by p2 , for a prime satisfying (p−1, |G|) = 1, must be p-nilpotent? The following theorem gives a positive answer to this question, even for some factorised groups (see Corollary 5.6 for the case G = A = B). Theorem 5.5. Let G = AB be a core-factorisation, and let p be a prime such that (p − 1, |G|) = 1. Suppose that iG (x) is not divisible by p2 for every prime power order element x ∈ A ∪ B vanishing in G. It follows that: (1) G is soluble. (2) G is p-nilpotent. (3) If P ∈ Sylp (G), then P ′ 6 Φ(P ) 6 Z(P ), P ′ is elementary abelian and |P ′ | ≤ p2 . Proof. (1) Suppose that the result is false and let G be a counterexample of minimal order. Since every group of odd order is soluble, we may assume that p = 2 because (p − 1, |G|) = 1. The class of soluble groups is a saturated formation, so we can suppose that there exists a unique minimal normal subgroup N . Moreover, N is non-soluble. We have for instance N 6 A, because G = AB is a core-factorisation. Then it is enough to reproduce the arguments in the proof of [8, Theorem 3.1] to obtain a prime power order element in N 6 A which is vanishing in G and whose conjugacy class size is divisible by 4, a contradiction. (2) Assume that the result is not true and let G be a counterexample of least possible order. By the minimality of G we may suppose that Op′ (G) = 1. Let N be a minimal normal subgroup of G. Thus p divides its order and, since G is soluble by (1), then N is p-elementary abelian. Moreover, the class of p-nilpotent groups is a saturated formation, so N is the unique minimal normal subgroup of G and by [12, A - 15.6, 15.8] we get N = Op (G) = F(G) = CG (N ). We can consider N 6 A, for instance. We take K/N a minimal normal subgroup of G/N such that it is covered by either A or B. We claim that each element in K r N is vanishing in G. Since N = Op (G), then K/N is q-elementary abelian for some prime q 6= p. Indeed, we get CK (N ) 6 CG (N ) = N . It follows by Lemma 3.1 that every element in K r N is vanishing in G. Note that K = [N ]Q where Q ∈ Sylq (K) is elementary abelian. If we take 1 6= xN ∈ K/N , then we can assume that x ∈ K r N is a q-element in A ∪ B by conjugation. Hence p2 does not divide iG (x) = |G : CG (x)|. Note that the p-number 1 6= |N : CN (x)| divides iG (x). On the other hand, x acts coprimely on N , which is abelian, so N = CN (x) × [N, x]. It follows |[N, x]| = p. Observe that CQ (N ) = Q ∩ CG (N ) = 1, so Q acts faithfully and coprimely on N . Further, if 1 6= y ∈ Q, then y ∈ K r N and 13 by the previous argument we get |[N, y]| = p. Now Lemma 5.4 leads to the fact that Q is cyclic, so |K/N | = q and K = N hxi. Hence CN (x) = CN (K) is normal in G. Since CN (x) < N , by the minimality of N we obtain CN (x) = 1 and so N = [N, x] has order p. Now G/N = NG (N )/ CG (N ) is isomorphich to a subgroup of Aut(N ), which is isomorphic to Cp−1 . It follows that |G/N | divides both p − 1 and |G|, the final contradiction. (3) Notice that P ∈ Sylp (G) is isomorphic to G/ Op′ (G) by the previous assertion. Hence the result follows by Proposition 5.3. Corollary 5.6. Let G be a group, and let p be a prime such that (p−1, |G|) = 1. Assume that p2 does not divide iG (x) for each prime power order element x vanishing in G. Then G is a soluble p-nilpotent group. Moreover, if P ∈ Sylp (G), then P ′ 6 Φ(P ) 6 Z(P ), P ′ is elementary abelian and |P ′ | ≤ p2 . In [15, Theorem B (c)] it is proved the following: “Let G = AB be the product of the mutually permutable subgroups A and B. Let p be a fixed prime satisfying (p − 1, |G|) = 1. If all p-regular prime power order elements in A ∪ B have iG (x) not divisible by p2 , then G/ Op (G) has elementary abelian Sylow p-subroups”. We point out that this property does not remain true under the hypotheses of Theorem 5.5, as the following example shows: Example 5.7. Let G = [A]B be the semidirect product of a cyclic group B of order 4 which acts transitively on a cyclic group A of order 5. Let the prime p = 2. Then G = AB is a core-factorisation, and all the vanishing elements of G (not only those lying in A ∪ B) have index not divisible by 4. However, O2 (G) = 1 and G/ O2 (G) does not have elementary abelian Sylow 2-subgroups. We highlight that the arguments used in [15, Theorem C] can be generalised in order to obtain the following more general result for core-factorisations. Theorem 5.8. Let G = AB be a core-factorisation, and let p be a prime. Suppose that for every prime power order p-regular element x ∈ A ∪ B vanishing in G, iG (x) is not divisible by p2 . If G is p-soluble, then G is p-supersoluble. Proof. It is sufficient to follow the proof of [15, Theorem C]. Notice that, in this case, we can use Lemma 3.2 with a minimal normal subgroup Z/N of G/N such that it lies in either AN/N or BN/N . Thus, we can affirm that every element in Z r N is vanishing in G, in order to apply the assumption that iG (x) is not divisible by p2 for every prime power order p-regular element x ∈ Z r N . When we consider square-free indices for all primes in π(G), we get: Theorem 5.9. Let G = AB be a core-factorisation. Suppose that iG (x) is square-free for every prime power order element x ∈ A ∪ B vanishing in G. Then: (1) G is supersoluble. (2) G′ is abelian. 14 (3) G′ has elementary abelian Sylow subgroups. (4) F(G)′ has Sylow p-subgroups of order at most p2 , for each prime p. The statements (2-3-4) above are immediate consequences of the next more general result for an arbitrary factorisation of a supersoluble group. Theorem 5.10. Let G = AB be the product of the subgroups A and B, and assume that G is supersoluble. Suppose that iG (x) is square-free for every prime power order element x ∈ A ∪ B vanishing in G. Then: (1) G′ is abelian. (2) G′ has elementary abelian Sylow subgroups. (3) F(G)′ has Sylow p-subgroups of order at most p2 , for each prime p. Proof. We adapt the proof of [15, Theorem D] for our hypotheses regarding vanishing elements. To prove either (1) or (2), arguing by minimal counterexample in each case we can assume that there exists a prime p such that F(G) = Op (G) = P is a Sylow p-subgroup of G. Since G is supersoluble, then Proposition 3.11 yields that every q-element (q 6= p) x ∈ A ∪ B is vanishing in G. Thus we can apply for such an element the class size hypothesis as in [15, Theorem D (1-2)]. On the other hand, following the proof of [15, Theorem D (1)], we need to assure that if N is a prefactorised normal subgroup of G which contains P as a Sylow p-subgroup, then N inherits the assumptions. Let see that this fact also holds in our case. First, such an N is clearly supersoluble and N = P H = (N ∩ A)(N ∩ B) where H ∈ Hallp′ (N ). Hence, if we take a p-element x ∈ (N ∩ A) ∪ (B ∩ B) vanishing in N , then it follows that x is vanishing in G; otherwise we get by Proposition 3.11 that x ∈ Z(P ) because F(G) = Op (G) = P 6= 1, and so Proposition 4.3 leads to the fact that x is non-vanishing in N , a contradiction. Moreover, all the q-elements in (N ∩ A) ∪ (N ∩ B) are vanishing in G by the above paragraph. Thus, in both cases, iN (x) divides iG (x) which is square-free. Note that, in particular, if H = 1, then N = P satisfies the hypotheses of Proposition 5.3. The statement (3) runs as in the proof [15, Theorem D (3)], but applying Proposition 5.3, which is the vanishing version of [15, Theorem A]. Proof of Theorem 5.9. (1) Considering the smallest prime divisor of |G| and Theorem 5.5 (1), we conclude that G is soluble. Hence, it is p-soluble for each prime p. Applying Theorem 5.8, we get that G is p-supersoluble for each prime p, so it is supersoluble. (2-4) These assertions follow from the previous theorem. In [8, Theorem 3.2] the author gives a supersolubility criterion for a group such that every vanishing index of a prime power order element is square-free. We want to highlight that the following consequence of Theorem 5.9 gives more information on the structure of such a group. Moreover, our techniques differ from those used in [8, Theorem 3.2]. 15 Corollary 5.11. Let G be a group, and let assume that iG (x) is square-free for each prime power order element x vanishing in G. Then G is supersoluble, and G′ is abelian with elementary abelian Sylow subgroups. Further, F(G)′ has Sylow p-subgroups of order at most p2 , for each prime p. References [1] M. Arroyo-Jordá, P. Arroyo-Jordá, A. Martı́nez-Pastor and M.D. Pérez-Ramos: On conditional permutability and factorized groups. Ann. Mat. Pura Appl. 193 (2014) 1123–1138. [2] M. Arroyo-Jordá, P. Arroyo-Jordá and M.D. Pérez-Ramos: On conditional permutability and saturated formations. Proc. Edinb. Math. Soc. 54 (2011) 309–319. [3] A. Ballester-Bolinches, J. Cossey and Y. Li: Mutually permutable products and conjugacy classes. Monatsh. Math. 170 (2012) 305–310. [4] A. Ballester-Bolinches, R. Esteban-Romero and M. Asaad: Products of finite groups. Vol. 53 of de Gruyter Expositions in Mathematics, Berlin (2010). [5] M. Bianchi, J. Brough, R.D. Camina and E. Pacifici: On vanishing class sizes in finite groups. J. Algebra 489 (2017) 446–459. [6] J. Brough: Non-vanishing elements in finite groups. J. Algebra 460 (2016) 387–391. [7] J. Brough: On vanishing criteria that control finite group structure. J. Algebra 458 (2016) 207–215. [8] J. Brough and Q. Kong: On vanishing criteria that control finite group structure II. (2017). https://arxiv.org/abs/1702.03179 [9] A.R. Camina and R.D. Camina: Implications of conjugacy class size. J. Group Theory 1(3) (1998) 257–269. [10] J. Cossey and Y. Li: On the structure of mutable product of finite groups. Acta Math. https://doi.org/10.1007/s10474-018-0796-9 a mutually perHungar. (2018). [11] J. Cossey and Y. Wang: Remarks on the length of conjugacy classes of finite groups. Commun. Algebra 27 (1999) 4347–4353. [12] K. Doerk and T. Hawkes: Finite Soluble Groups. Vol. 4 of de Gruyter Expositions in Mathematics, Berlin (1992). [13] S. Dolfi, E. Pacifici and L. Sanus: Groups whose vanishing class sizes are not divisible by a given prime. Arch. Math. (Basel) 94 (2010) 311-317. 16 [14] S. Dolfi, E. Pacifici, L. Sanus and P. Spiga: On the orders of zeros of irreducible characters. J. Algebra 321 (2009) 345-352. [15] M.J. Felipe, A. Martı́nez-Pastor and V.M. Ortiz-Sotomayor: Square-free class sizes in products of groups. J. Algebra 491 (2017) 190–206. [16] M.J. Felipe, A. Martı́nez-Pastor and V.M. Ortiz-Sotomayor: Prime power indices in factorised groups. Mediterr. J. Math. 14(6) (2017) article: 225. [17] I.M. Isaacs: Character theory of finite groups. Academic Press Inc., London (1976). [18] I.M. Isaacs, G. Navarro and T.R. Wolf: Finite group elements where no irreducible character vanishes. J. Algebra 222 (1999) 413–423. [19] G. Malle, G. Navarro and J.B. Olson: Zeros of characters of finite groups. J. Group Theory 3 (2000) 353–368. 17
4math.GR
arXiv:1511.00822v1 [math.CV] 3 Nov 2015 SOME CURIOSITIES OF THE ALGEBRA OF BOUNDED DIRICHLET SERIES RAYMOND MORTINI AND AMOL SASANE Abstract. It is shown that the algebra H ∞ of bounded Dirichlet series is not a coherent ring, and has infinite Bass stable rank. As corollaries of the latter result, it is derived that H ∞ has infinite topological stable rank and infinite Krull dimension. 1. Introduction The aim of this short note is to make explicit two observations about algebraic properties of the ring H ∞ of bounded Dirichlet series. In particular we will show that (1) H ∞ is not a coherent ring. (This is essentially an immediate consequence of Eric Amar’s proof of the noncoherence of the Hardy algebra H ∞ (Dn ) of the polydisk Dn for n ≥ 3 [1].) (2) H ∞ has infinite Bass stable rank. (This is a straightforward adaptation of the first author’s proof of the fact that the stable rank of the infinite polydisk algebra is infinite [12]). As corollaries, we obtain that H ∞ has infinite topological stable rank, and infinite Krull dimension. Before giving the relevant definitions, we briefly mention that H ∞ is a closed Banach subalgebra of the classical Hardy algebra H ∞ (C>0 ) consisting of all bounded and holomorphic functions in the open right half plane C>0 := {s ∈ C : Re(s) > 0}, and it is striking to compare our findings with the corresponding results for H ∞ (C>0 ): Coherent? Bass stable rank Topological stable rank Krull dimension H ∞ (C>0 ) H∞ Yes (See [11]) No 1 (See [17]) ∞ 2 (See [16]) ∞ ∞ (See [13]) ∞ 1991 Mathematics Subject Classification. Primary 11M41; Secondary 30H05, 13E99. Key words and phrases. coherent ring, Hardy algebra, Dirichlet series, Bass stable rank, topological stable rank, Krull dimension, K-theory. 1 2 RAYMOND MORTINI AND AMOL SASANE Nevertheless the above results for H ∞ lend support to Harald Bohr’s idea of interpreting Dirichlet series as functions of infinitely many complex variables, a key theme used in the proofs of the main results in this note. We recall the pertinent definitions below. 1.1. The algebra H set of Dirichlet series ∞ of bounded Dirichlet series. H ∞ denotes the f (s) = ∞ X an ns n=1 (1.1) , where (an )n∈N is a sequence of complex numbers, such that f is holomorphic and bounded in C>0 . Equipped with pointwise operations and the supremum norm, kf k∞ := sup |f (s)|, f ∈ H ∞ , s∈C>0 H ∞ is a unital commutative Banach algebra. In [8, Theorem 3.1], it was shown that the Banach algebra H ∞ is precisely the multiplier space of the Hilbert space H of Dirichlet series ∞ X an f (s) = ns n=1 for which kf k2H := ∞ X |an |2 < ∞. n=1 The importance of the Hilbert space H stems from the fact that its kernel function KH (z, w) is related to the Riemann zeta function ζ: KH (z, w) = ζ(z + w). be the closed subalgebra of H ∞ consisting of Dirichlet For m ∈ N, let series of the form (1.1) involving only integers n generated by the first m primes 2, 3, · · · , pm . Hm∞ 1.2. H ∞ = H ∞ (D∞ ). In [8, Lemma 2.3 and the proof of Theorem 3.1], it was established that H ∞ is isometrically (Banach algebra) isomorphic to H ∞ (D∞ ), a certain algebra of functions analytic in the infinite dimensional polydisk, defined below. As this plays a central role in what follows, we give an outline of this based on [8], [15] and [10]. A seminal observation made by H. Bohr [3], is that if we put 1 1 1 1 z1 = s , z2 = s , z3 = s , · · · , zn = s , · · · , 2 3 5 pn where pn denotes the nth prime, then, in view of the Fundamental Theorem of Arithmetic, formally a Dirichlet series in Hn∞ or H ∞ can be considered as a power series of infinitely many variables. Indeed, each n has a unique expansion α (n) n = p1 1 α r(n) · · · pr(n) (n) , ON THE ALGEBRA OF BOUNDED DIRICHLET SERIES 3 with nonnegative αj (n)s, and so, from (1.1), we obtain the formal power series ∞ X αr(n) (n) α (n) , (1.2) an z1 1 · · · zr(n) F (z) = n=1 where z = (z1 , · · · , zm ) or z = (z1 , z2 , z3 , · · · ) depending on whether f is a function in Hm∞ or in H ∞ . Let us recall Kronecker’s Theorem on diophantine approximation [7, Chapter XXIII]: Proposition 1.1. For each m ∈ N, the map m t 7→ (2−it , 3−it , · · · , p−it m ) : (0, ∞) → T has dense range in Tm , where T := {z ∈ C : |z| = 1}. Using the above and the Maximum Principle, it can be shown that for f ∈ Hm∞ , kf k∞ = kF k∞ , (1.3) ∞ m ∞ where the norm on the right hand side is the H (D ) norm. Here H (Dm ) denotes the usual Hardy algebra of bounded holomorphic functions on the polydisk Dm , endowed with the supremum norm: kF k∞ := sup |F (z)|, F ∈ H ∞ (Dm ). z∈Dm In [8], it was shown that this result also holds in the infinite dimensional case. In order to describe this result, we introduce some notation. Let c0 be the Banach space of complex sequences tending to 0 at infinity, with the induced norm from ℓ∞ , and let B be the open unit ball of that Banach space. Thus with N := {1, 2, 3, · · · } and D := {z ∈ C : |z| < 1}, B = c0 ∩ DN . For a point z = (z1 , · · · , zm , · · · ) ∈ B, we set z(m) := (z1 , · · · , zm , 0, · · · ), that is, zk = 0 for k > m. Substituting z(m) in the argument of F given formally by (1.2), we obtain a function (z1 , · · · , zm ) 7→ F (z(m) ), which we call the mth-section Fm (after Bohr’s terminology “mte abschnitt”). F is said to be in H ∞ (D∞ ) if the H ∞ norm of these functions Fm are uniformly bounded, and denote the supremum of these norms to be kF k∞ . Using Schwarz’s Lemma for the polydisk, it can be seen that for m < ℓ, |F (z(m) ) − F (z(ℓ) )| ≤ 2kf k∞ · max{|zj | : m < j ≤ ℓ}, and so we may define F (z) = lim F (z(m) ). m→∞ It was shown in [8] that (1.3) remains true in the infinite dimensional case, and so we may associate H ∞ with H ∞ (D∞ ). Proposition 1.2 ([8]). There exists a Banach algebra isometric isomorphism ι : H ∞ → H ∞ (D∞ ). 4 RAYMOND MORTINI AND AMOL SASANE 1.3. Coherence. Definition 1.3. Let R be a unital commutative ring, and for n ∈ N, let Rn = R × · · · × R (n times). For f = (f1 , · · · , fn ) ∈ Rn , a relation g on f is an n-tuple g = (g1 , · · · , gn ) in Rn such that g1 f1 + · · · + gn fn = 0. The set of all relations on f is denoted by f ⊥ . The ring R is said to be coherent if for each n and each f ∈ Rn , the R-module f ⊥ is finitely generated. A property which is equivalent to coherence is that the intersection of any two finitely generated ideals in R is finitely generated, and the annihilator of any element is finitely generated [4]. We refer the reader to the article [5] and the monograph [6] for the relevance of the property of coherence in commutative algebra. All Noetherian rings are coherent, but not all coherent rings are Noetherian. (For example, the polynomial ring C[x1 , x2 , x3 , · · · ] is not Noetherian because the sequence of ideals hx1 i ⊂ hx1 , x2 i ⊂ hx1 , x2 , x3 i ⊂ · · · is ascending and not stationary, but C[x1 , x2 , x3 , · · · ] is coherent [6, Corollary 2.3.4].) In the context of algebras of holomorphic functions in the unit disk D, we mention [11], where it was shown that the Hardy algebra H ∞ (D) is coherent, while the disk algebra A(D) isn’t. For n ≥ 3, Amar [1] showed that the Hardy algebra H ∞ (Dn ) is not coherent. (It is worth mentioning that whether the Hardy algebra H ∞ (D2 ) of the bidisk is coherent or not seems to be an open problem.) Using Amar’s result, we will prove the following result: Theorem 1.4. H ∞ is not coherent. 1.4. Stable rank. In algebraic K-theory, the notion of (Bass) stable rank of a ring was introduced in order to facilitate K-theoretic computations [2]. Definition 1.5. Let R be a commutative ring with an identity element (denoted by 1). An element (a1 , · · · , an ) ∈ Rn is called unimodular if there exist elements b1 , · · · , bn in R such that b1 a1 + · · · + bn an = 1. The set of all unimodular elements of Rn is denoted by Un (R). We say that a = (a1 , · · · , an+1 ) ∈ Un+1 (R) is reducible if there exists an element (x1 , · · · , xn ) ∈ Rn such that (a1 + x1 an+1 , · · · , an + xn an+1 ) ∈ Un (R). The Bass stable rank of R is the least integer n ∈ N for which every a ∈ Un+1 (R) is reducible. If there is no such integer n, we say that R has infinite stable rank. ON THE ALGEBRA OF BOUNDED DIRICHLET SERIES 5 Using the same idea as in [12, Proposition 1] (that the infinite polydisk algebra A(D∞ ) has infinite Bass stable rank), we show the following. Theorem 1.6. The Bass stable rank of H ∞ is infinite. For Banach algebras, an analogue of the Bass stable rank, called the topological stable rank, was introduced by Marc Rieffel in [14]. Definition 1.7. Let R be a commutative complex Banach algebra with unit element 1. The least integer n for which Un (R) is dense in Rn is called the topological stable rank of R. We say R has infinite topological stable rank if no such integer n exists. Corollary 1.8. The topological stable rank of H ∞ is infinite. Proof. This follows from the inequality that the Bass stable rank of a commutative unital semisimple complex Banach algebra is at most equal to its topological stable rank; see [14, Corollary 2.4].  Definition 1.9. The Krull dimension of a commutative ring R is the supremum of the lengths of chains of distinct proper prime ideals of R. Corollary 1.10. The Krull dimension of H ∞ is infinite. Proof. This follows from the fact that if a ring has Krull dimension d, then its Bass stable rank is at most d + 2; see [9].  2. Noncoherence of H ∞ We will use the following fact due to Amar [1, Proof of Theorem 1.(ii)]. Proposition 2.1. (z1 − z2 , z2 − z3 )⊥ is not a finitely generated H ∞ (D3 )module. Proof of Theorem 1.4. The main idea of the proof is that, using the isomorphism ι, essentially we boil the problem down to working with H ∞ (D∞ ). Let 1 1 − s, f1 := s 2 3 1 1 f2 := − . 3s 5s Then ι(f1 ) = z1 − z2 and ι(f2 ) = z2 − z3 . Suppose that (f1 , f2 )⊥ is a finitely generated H ∞ -module, say by " # " # (1) (1) g1 gr ,··· , ∈ (H ∞ )2 . (2) (2) g1 gr We will show that the 3rd section of the image under ι of the above elements generate (z1 − z2 , z2 − z3 )⊥ in H ∞ (D3 ), contradicting Proposition 2.1. If  (1)  G ∈ (H ∞ (D3 ))2 ∩ (F1 , F2 )⊥ , G(2) 6 RAYMOND MORTINI AND AMOL SASANE then F1 G(1) + F2 G(2) = 0, and by applying ι−1 , we see that  −1 (1)  ι G ∈ (f1 , f2 )⊥ . ι−1 G(2) So there exist α(1) , · · · , α(r) ∈ H ∞ such that " " # #  −1 (1)  (1) (1) ι G g g r 1 = α(1) + · · · + α(r) . (2) (2) ι−1 G(2) g1 gr Applying ι, we obtain " # " #  (1)  (1) (1) G ι(g1 ) ι(gr ) (1) (r) = ι(α ) + · · · + ι(α ) . (2) (2) G(2) ι(g1 ) ι(gr ) Finally taking the 3rd section, we obtain " #  X  (1) r (1) (ι(gj ))(z(3) ) G (z1 , z2 , z3 ) (j) (3) (ι(α ))(z ) = . (2) G(2) (z1 , z2 , z3 ) (ι(gj ))(z(3) ) j=1 So it follows that " (1) (ι(g1 ))(z(3) ) (2) (ι(g1 ))(z(3) ) # ,··· , " (1) (ι(gr ))(z(3) ) (2) (ι(gr ))(z(3) ) # generate (z1 −z2 , z2 −z3 )⊥ , a contradiction to Amar’s result, Proposition 2.1.  3. Stable rank of H ∞ The proof of Theorem 1.6 is a straightforward adaptation of the first author’s proof of the fact that the Bass stable rank of the infinite polydisk algebra is infinite [12, Proposition 1]. In [12], the infinite polydisk algebra A(D∞ ) is the uniform closure of the algebra generated by the coordinate functions z1 , z2 , z3 , · · · on the countably infinite polydisk D × D × D × · · · . Proof of Theorem 1.6: Fix n ∈ N. Let g ∈ H ∞ be given by n   Y 1 ∈ H ∞. 1− g(s) := (pj pn+j )s (3.1) j=1 Set 1 1  , · · · , , g ∈ (H ∞ )n+1 . 2s psn We will show that f ∈ Un+1 (H ∞ ) is not reducible. First let us note that f is unimodular. Indeed, by expanding the product on the right hand side of (3.1), we obtain 1 1 g = 1 + s · g1 + · · · + s · gn , 2 pn f := ON THE ALGEBRA OF BOUNDED DIRICHLET SERIES 7 for some appropriate g1 , · · · , gn ∈ H ∞ . Now suppose that f is reducible, and that there exist h1 , · · · , hn ∈ H ∞ such that  1 1 ∞ ). + gh , · · · , + gh 1 n ∈ Un (H 2s psn Let y1 , · · · , yn ∈ H ∞ be such that 1  1  y + · · · + yn = 1. + gh + gh 1 1 n 2s psn Applying ι, we obtain (z1 + ι(g)ι(h1 ))ι(y1 ) + · · · + (zn + ι(g)ι(hn ))ι(yn ) = 1. (3.2) Let h := (ι(h1 ), · · · , ι(hn )). For z = (z1 , · · · , zn ) ∈ Cn , we define  n Y    −h(z1 , · · · , zn , z1 , · · · , zn , 0, · · · ) (1 − |zj |2 )     j=1 for |zj | < 1, j = 1, · · · , n, Φ(z) =        0 otherwise. Then Φ is a continuous map from Cn into Cn . But Φ vanishes outside Dn , and so maxn kΦ(z)k2 = sup kΦ(z)k2 . z∈Cn z∈D n This implies that there must exist an r ≥ 1 such that Φ maps K := rD into K. As K is compact and convex, by Brouwer’s Fixed Point Theorem it follows that there exists a z∗ ∈ K such that Φ(z∗ ) = z∗ . Since Φ is zero outside Dn , we see that z∗ ∈ Dn . Let z∗ = (ζ1 , · · · , ζn ). Then for each j ∈ {1, · · · , n}, we obtain 0 = ζj + (ι(hj ))(ζ1 , · · · , ζn , ζ1 , · · · , ζn , 0, · · · ) n Y (1 − |ζk |2 ) k=1 = ζj + (ι(hj )ι(g))(ζ1 , · · · , ζn , ζ1 , · · · , ζn , 0, · · · ). (3.3) But from (3.2), we know that n X (zj + ι(hj )ι(g))ι(yj ) = 1, j=1 and this contradicts (3.3). As the choice of n ∈ N was arbitrary, it follows that the Bass stable rank of H ∞ is infinite.  Acknowledgement: Useful discussions with Anders Olofsson (Lund University) are gratefully acknowledged by the second author. 8 RAYMOND MORTINI AND AMOL SASANE References [1] E. Amar. Non cohérence de certains anneaux de fonctions holomorphes. Illinois Journal of Mathematics, 25:68-73, no. 1, 1981. [2] H. Bass. Algebraic K-theory. W.A. Benjamin, Inc., New York-Amsterdam, 1968. [3] H. Bohr. Über die Bedeutung der unendlich vieler Variabeln in der ThePPotenzreihen orie der Dirichletscher Reihen an /ns . Nachr. Ges. Wiss. Göttingen Math. Phys., 1913:441488, 1913. [4] S.U. Chase. Direct products of modules. Transactions of the American Mathematical Society, 97:457-473, 1960. [5] S. Glaz. Commutative coherent rings: historical perspective and current developments. Nieuw Archief voor Wiskunde (4), 10:37-56, no. 1-2, 1992. [6] S. Glaz. Commutative coherent rings. Lecture Notes in Mathematics, 1371, SpringerVerlag, Berlin, 1989. [7] G.H. Hardy and E.M. Wright. An introduction to the theory of numbers. 3rd ed. Oxford, at the Clarendon Press, 1954. [8] H. Hedenmalm, P. Lindqvist and K. Seip. A Hilbert space of Dirichlet series and systems of dilated functions in L2 (0, 1). Duke Mathematical Journal, 86:1-37, no. 1, 1997. [9] R.C. Heitmann. Generating ideals in Prüfer domains. Pacific Journal of Mathematics, 62:117-126, no. 1, 1976. [10] B. Maurizi and H. Queffélec. Some remarks on the algebra of bounded Dirichlet series. Journal of Fourier Analysis and Applications, 16:676-692, no. 5, 2010. [11] W.S. McVoy and L.A. Rubel. Coherence of some rings of functions. Journal of Functional Analysis, 21:76-87, no. 1, 1976. [12] R. Mortini. An example of a subalgebra of H on the unit disk whose stable rank is not finite. Studia Mathematica, 103:275-281, no. 3, 1992. [13] M. von Renteln. Primideale in der topologischen Algebra H ∞ (β). Mathematische Zeitschrift, 157:7982, 1977. [14] M.A. Rieffel. Dimension and stable rank in the K-theory of C -algebras. Proceedings of the London Mathematical Society (3), 46:301-333, no. 2, 1983. [15] K. Seip. Interpolation by Dirichlet series in H ∞ . In Linear and complex analysis, 153-164, Amer. Math. Soc. Transl. Ser. 2, 226, Amer. Math. Soc., Providence, RI, 2009. [16] D. Suárez. Trivial Gleason parts and the topological stable rank of H ∞ . American Journal of Mathematics, 118:879-904, no. 4, 1996. [17] S. Treil. The stable rank of the algebra H ∞ equals 1. Journal of Functional Analysis, 109:130-154, no. 1, 1992. Université de Lorraine, Département de Mathématiques et Institut Élie Cartan de Lorraine, UMR 7502, Ile du Saulcy, F-57045 Metz, France E-mail address: [email protected] Department of Mathematics, London School of Economics, Houghton Street, London WC2A 2AE, U.K. E-mail address: [email protected]
0math.AC
Vanishing ideals of binary Hamming spheres arXiv:1802.02875v1 [math.AC] 8 Feb 2018 Alessio Meneghetti University of Trento, Department of Mathematics, Trento, Italy Abstract We show how to efficiently obtain the Algebraic Normal Form of Boolean functions vanishing on Hamming spheres centred at zero. By exploiting the symmetry of the problem we obtain formulas for particular cases, and a computational method to address the general case. A list of all the polynomials corresponding to spheres of radius up to 64 is provided. Moreover, we explicitly provide a connection to the binary Möbius transform of the elementary symmetric functions. We conclude by presenting a method based on polynomial evaluation to compute the minimum distance of binary linear codes. Keywords: Binary polynomials, binary Möbius transform, elementary symmetric functions, minimum distance, linear codes 1. Introduction Many computationally hard problems can be described by Boolean polynomial systems, and the standard approach is the computation of the Gröbner Basis of the corresponding ideal. Since it is a quite common scenario, we will restrict ourselves to ideals of F2 [x1 , . . . , xn ] containing the entire set of field equations {x2i + xi }i . To ease the notation, our work environment will therefore be the quotient ring R = F2 [x1 , . . . , xn ]/(x21 +x1 , . . . , x2n +xn ). Moreover, most of our results do not depend on the number n of variables, and when not otherwise specified we consider R to be defined in infinitely many variables. We denote with X the set of our variables. In this work we characterise the vanishing ideal It of the set of binary vectors contained in the Hamming sphere of radius t − 1. This characterisation corresponds to the explicit construction of the square-free polynomial φt whose roots are exactly the set of points of weight at most t−1. It is worth mentioning that this polynomial corresponds to the Algebraic Normal Form (ANF) of Preprint submitted to Elsevier February 9, 2018 the Boolean function which vanishes inside the Hamming sphere. See Carlet (2010) for a thorough discussion about Boolean functions. A direct application of our work would be the possibility to add φt to the generating system of an ideal, and therefore to force the corresponding variety to live in the Hamming sphere of radius t − 1. A less straightforward application will be presented in Section 5, where we show a novel method to check whether the minimum distance of a linear code is in a given range. We believe that the ideas presented in Section 5 could eventually be a starting point for new algebraic algorithms for the computation of the minimum distance of linear codes. This would however require the design of dedicated procedures to minimize the computational complexity of such algorithms, and this is beyond the aim of this paper. The reader can find similar methods in Guerrini et al. (2010), where the authors proposed a technique to compute the distance distribution of systematic non-linear codes by relying on polynomial ideals. Other interesting results, obtained however to deal only with particular classes of codes, can be find in Garcia-Villalba et al. (1999) and Hu et al. (2004). The main difference between previously known algorithms and the ideas presented in this work is that we do not need to rely on brute-force like methods, nor we require the computation of a Gröbner basis. For a comprehensive work on the utilisation of computational methods to address problems in algebra and geometry, see Cox et al. (2007), while for everything regarding Coding Theory, we refer to MacWilliams and Sloane (1977). We remark that it is possible to construct φt by applying the binary Möbius transform to the right evaluation vector. Using standard tools, this approach would however require to restrict oneself to a specific number of variables, and then to run one of the known algorithms for its computation. Presently, the corresponding complexity is in the general case exponential in the number of variables. The utilisation of the binary Möbius transform to compute the ANF of a Boolean function is a standard approach, and can be found for example in Carlet (2010). For a survey on the binary Möbius transform the reader can refer to Pieprzyk and Zhang (2007). The paper is organised as follows. In Section 2 we introduce the notation and provide some properties of binary symmetric functions, and in Section 3 we discuss the binary Möbius transform. These preliminary results will then be used in the remaining Sections 4 and 5, where we respectively discuss about the generating polynomials of the vanishing ideals of Hamming spheres, and their application to the com2 putation of the distance of linear codes. 2. Binary symmetric functions The vanishing ideal of a Hamming sphere of radius t − 1 is generated in R = F2 [x1 , . . . , xn ]/(x21 + x1 , . . . , x2n + xn ) by a single binary polynomial which we denote with φt . To be precise, φt is the Algebraic Normal Form of the map (F2 )n → F2 whose zeros are all and only the binary vectors v whose Hamming weight w(v) is less than t, i.e. v has less than t ones. By definition, φt (X) depends uniquely on the weight of X, hence φt is a symmetric polynomial, which can therefore P be written in terms of the elementary symmetric functions (ESFs) σi = m∈Mi m, where Mi is the set of all monomials of degree i. We recall that in our set-up each m ∈ Mi is a square-free monomials; this implies that any monomial of degree iis the multiplication of i distinct variables. In case of n variables, |Mi | = ni . In this section we look more closely to the behaviour of ESFs when working in the quotient R. The properties described in this section will then be used in Section 4 to derive further results on φ. Definition 1. We denote with b(n) the binary representation of the nonnegative integer n. Even though the length s of b(n) is usually equal to ⌈log2 (n)⌉, we consider it to be equal to the minimum number of bits required by the context. As an example, if we need to perform an operation involving the binary representation of two integers n1 and n2 with n1 ≤ 2s1 ≤ 2s2 −1 < n2 ≤ 2s2 , we consider the length of both b(n1 ) and b(n2 ) to be equal to s2 . Definition 2. Let b1 and b2 be two binary vectors. We say that b1 ⊆ b2 if b1 ∧ b2 = b1 , namely if the support of b1 is contained in the support of b2 . The following Theorem on the parity of binomial coefficients will be extensively used in the remaining part of this section. We refer to MacWilliams and Sloane (1977) for its applications to the binary Möbius transform.  Theorem 1 (Lucas’ Theorem). wi = 1 mod 2 if and only if b(i) ⊆ b(w) . Lemma 2. Let p ∈ R be a symmetric polynomial. Then p is a linear combination of elementary symmetric functions. 3 Proof. It follows from the fact that p is a square-free polynomial. Theorem 3. Let σi and σj be defined in the quotient R. Then σi · σj = σh , with b(h) = b(i) ∨ b(j) Proof. Let i < j. From Lemma 2 it follows that the product of σi and σj is a linear combination of ESFs. Given m1 and m2 in R, the degree of m1 · m2 is at least Pmax(deg(m1 ), deg(m1 )) and at most deg(m1 ) + deg(m2 ), namely σi · σj = i+j h=j ch σh . Since σi and σj are symmetric polynomials, if a monomial mh of degree h appears in their product, then ch = 1. Observe that mh is a monomial in σi · σj if and only if the cardinality of the set {(mi , mj ) : mi · mj = mh , mi ∈ Mi , mj ∈ Mj } is odd. The number of these pairs (mi , mj ) is equal    i h , (1) N= i+j−h i where the first term is equal to the ways of choosing i variables (the monomial mi ) from a set of h variables (the monomial mh ), and the second term corresponds to choosing j − (h − i) variables among the i which appear in mi (obtaining the   monomial mj ). n n Since k = n−k , the second binomial coefficient in Equation 1 can also be  i written as h−j . The product N in Equation 1 is odd if and only if both binomial coefficients are odd, hence if b(i) ⊆ b(h) and b(h − j) ⊆ b(i). We write b(h) as b(i) ∨ b(j) + b1 + b2 , with b1 , b2 binary vectors such that b1 ⊆ b(i) ∨ b(j) and b2 ∧ (b(i) ∨ b(j)) = 0. We have three possible cases: 1. b1 = b2 = 0 2. b1 = 0 and b2 6= 0 3. b1 6= 0 In the first case, b(h) = b(i) ∨ b(j), then both conditions are satisfied and this implies that ch = 1. In the other cases, at least one of the binomial coefficients in Equation (1) is even. This implies that if b(h) 6= b(i) ∨ b(j) then ch = 0. While Lemma 2 assure us that any binary symmetric polynomial in R can be written as a linear combination of {1, σ1 , . . . , σn , . . .}, an interesting consequence of Theorem 3 is that to represent the same polynomial we do not really need all the ESFs. All such polynomials can indeed be defined in terms of {1, σ1 , σ21 , σ22 , . . . , σ2s , . . .}. 4 Corollary 4. The set of all square-free binary symmetric polynomials in n variables is equivalent to F2 [y0 , . . . , ys ], with s = ⌊log2 n⌋. Proof. We apply Lemma 2 and Theorem 3. Equivalently, we can start from a polynomial f ∈ F2 [y0 , . . . , ys ] and compute f (1, σ21 , . . . , σ2s ). Proposition 5. if w(v) < i then σi (v) = 0. Proof. σi (X) contains only monomials of degree i. Each of these monomials are trivially zero when evaluated on a vector with strictly less then i non-zero coordinates.  Proposition 6. Let w(v) = w. σi (v) = 1 if and only if wi = 1 mod 2. Proof. Let {i1 , . . . , iw } be the support of v, and let m = xj1 · · · xji be a monomial of degree i. Then m(v) = 1 if and only if {j1 , . . . , ji } ⊆ {i1 , . . ., iw }. There are exactly wi such monomials of degree i, hence σi (v) = wi = 1 mod 2. Corollary 7. Let w(v) = w and let b(w) and b(i) be the binary representations of w and i. σi (v) = 1 if and only if b(i) ⊆ b(w). Proof. It follows directly from Proposition 6 and Theorem 1. Proposition 8. Let i, j and s be integers for which 2s−1 < i ≤ j ≤ 2s . If v1 is a vector of weight j and v2 is a vector such that w(v2 ) − w(v1 ) = w − j is a multiple of 2s , then σi (v1 ) = σi (v2 ). Proof. Let b1 = b(w(v1 )), b2 = b(w(v2 )) and bi = b(i) be the binary representations of w(v1 ), w(v2 ) and i. By Corollary 7, σi (v2 ) = 1 if and only if bi ⊆ b1 . Since w(v2 ) − w(v1 ) = 0 mod 2s , then we also have b1 ⊆ b2 . The two inclusions directly imply bi ⊆ b1 ⊆ b2 , hence σi (v1 ) = σi (v2 ). 3. The binary Möbius transform We present in this section a closed formula for the binary Möbius transform, and in the next section we will use it to describe φt . 5 Theorem 9. Let f : (F2 )n → F2 be a Boolean function. Then its binary Möbius transform is   x x 1 n f¯ = (1 + x1 ) · · · (1 + xn ) · f ,..., , (2) 1 + x1 1 + xn where the fractions are symbolic, since their denominators vanish together with the corresponding term in the product on the left. We provide an example before proving the formula. Let f (x1 , x2 ) = x1 +x1 x2 . Then h i x1 x1 x2 ¯ f (x1 , x2 ) = (1 + x1 ) (1 + x2 ) 1+x1 + (1+x1 )(1+x2 ) x2 x1 + (1 + x1 ) (1 + x2 ) (1+xx11)(1+x = (1 + x1 ) (1 + x2 ) 1+x 1 2) = (1 + x2 ) x1 + x1 x2 , namely f¯ = x1 . Proof. The binary Möbius transform of f is the Boolean function whose evaluation vector corresponds to the coefficients of f . To be more precise, a point b = (b1 , . . . , bn ) ∈ (F2 )n can be identified with the monomial mb = X b = xb11 · · · xbnn , where x1i = xi , while with x0i we mean that xi does not appear in mb . Hence, by definition, f¯(b) = 1 if and only if mb = X b is a monomial of f . We consider then a generic monomial mb = X b in f , and we observe that by formula (2) we obtain m̄b = (1 + x1 )1+b1 · · · (1 + xn )1+bn · xb11 · · · xbnn , namely we obtain m̄b = (1 + X)1+b · X b . It can easily be checked that the polynomial m̄b assume value 1 only when evaluated at b. Then, to each monomial mb in f , it corresponds a polynomial m̄b in f¯ for which m̄b (b) = 1, while it is zero everywhere else. So the evaluation vector of f¯ is exactly the vector of coefficients of f . 4. The Vanishing ideal of a Hamming sphere In this section we provide a description of φt . Theorem 9 allows to write a formula for φt directly from its definition. Let us denote with ht the polynomial whose coefficients correspond to the binary vectors of weight at least t, and let us apply the binary Möbius transform to it. 6 Theorem 10. Let n ≥ t, and let ht = Pn i=t σi . Then φt = h̄t . The proof is a straightforward application of the definition of φt and we observe that Equation (2) gives us a formula for φt . We also remark that the theorem does not really depend on the number n of variables, since we can always assume that a set of n variables is obtained by restriction from a larger set. By combining Theorems 9 and 10 we still obtain a somewhat implicit formula, since by Lemma 2 we would like to write it explicitly as a linear combination of ESFs: φt = ∞ X ai σi . (3) i=1 To explicitly determine φt we need to determine all ai appearing in Equation (3). Lemma 11. ai = 0 for each i < t. Proof. It follows from Proposition 5. Lemma 12. at = 1 Proof. Due to Lemma 11, φt = at σt + r, with r being a linear combination of ESFs of degree at least t + 1. Due to Proposition 5, r(v) = 0 for each vector of weight at most t. It follows that φt (v) = 0 if w(v) < t and φt (v) = at if w(v) = t, and this forces at to be equal to 1. Lemma 13. Let s = ⌈log2 (t)⌉. Then a2s = 1 Proof. φt = r1 +a2s σ2s +r2 , where r1 (r2 ) is a symmetric polynomial of degree strictly less (larger) then 2s . Both r1 and r2 are zero on a vector v of weight 2s : • r1 is the sum of the σi with i < 2s . If i < 2s then b(i) 6⊆ b(2s ), which implies that ri (v) = 0. • r2 is the sum of ESFs of degree strictly larger than 2s , hence r2 (v) = 0. Since φt (v) = r1 (v) + a2s σ2s (v) + r2 (v) = 1 and both r1 and r2 are zero, then a2s = 1. Corollary 14. Let s = ⌈log2 (t)⌉. Then aj2s = 1 for each j ≥ 1. 7 Proof. Let v be a vector whose weight is a multiple of 2s . Firstly, let us observe that σi (v) = 0 whenever w(v) = 0 mod 2s and i 6= 0 mod 2s . Lemma 13 proves the case j = 1. Let j̃ be the smallest j for which aj2s = 0, namely aj2s = 1 for each j < j̃ and aj̃2s = 0. The value of φt (v) is therefore equal to the parity of number of 0 < j < j̃ such that b(j) ⊆ bj̃, which is equal to 2w(b(j̃)) − 2, hence φt (v) = 0. This contradicts the definition itself of φt , hence aj2s = 1 for each j. Lemma 15. Let t and s be such that 2s−1 < t ≤ 2s . Then s φt = ∞ X 2 X ai σi+j2s . j=0 i=1 Proof. We will prove that if the lemma does not hold, then we also contradict the definition itself of φt . Assume by contradiction the existence of i and j such that ai+j2s 6= ai . Let ĩ and j̃ correspond to the smallest integer ĩ + j̃2s with this property, and let ṽ be a vector of weight equal to ĩ + j̃2s . Corollary 14 proves the case ĩ = 0, so assume ĩ > 0. We start by considering ĩ < t. By Lemma 11 the coefficients a0 , . . . , at−1 are equal 0, then we have aĩ+j̃2s = 1. Moreover, ai+j̃2s = 0 for each i < ĩ and ai+j2s = 0 for each j < j̃. We also remark that b(i + j2s ) 6⊆ b(ĩ + j̃2s ) for each ĩ < i < 2s and P j < j̃, hence the value φt (ṽ) is equal to j̃j=1 σj2s (ṽ) + aĩ+j̃2s = 1. Since the number of indicesj for which σj2s (ṽ)= 1 is equal to 2w(b(j̃)) − 1, it follows that aĩ+j̃2s = 1 + 2w(b(j̃)) − 1 mod 2 = 0. We have proved that, if ĩ and j̃ exist, then t ≤ ĩ < 2s , and it follows that for any vector v of weight ĩ, φt (v) = 1. This is the same as saying that the number of ai σi (v) = 1 with t ≤ i ≤ ĩ is odd, which implies that ĩ X ai σi (ṽ) = 1. (4) i=t Moreover, ĩ X ai σi+j2s (ṽ) = 1 ⇐⇒ b(j) ⊆ b(j̃). (5) i=t We write now explicitly the evaluation of φt at ṽ as φt (ṽ) = S1 + S2 + S3 + aĩ+j̃2s , 8 (6) with S1 = Pĩ ai σi (ṽ)  Pĩ Pi=t s (ṽ) s (ṽ) + a σ σ S2 = j̃−1 i i+j2 j2 i=t j=1 Pĩ−1 S3 = σj̃2s + i=t ai σi+j̃2s (ṽ). (7) We look now at the term S2 defined in Equation (7), where it appears the evaluation of σj2s . We apply Corollary 7, finding out that σj2s (ṽ) is equal to 1 if and only if b(j) ⊆ b(j̃), which is the same requirement of Equation (5). It follows that ĩ X (8) ai σi+j2s (ṽ) σj2s (ṽ) = i=t for each j ∈ {1, . . . , j̃ − 1}. Using Equation (8) we find out that S2 = 0, and we already knew that S1 = 1 by looking at Equation (4). We can therefore simplify Equation (6), obtaining φt (ṽ) = 1 + 0 + S3 + aĩ+j̃2s . (9) If the last term aĩ+j̃2s would have been equal to aĩ , then we would have been in the same situation of Equation (8), meaning that S3 + aĩ+j̃2s would have been equal to 0. In our case we have instead assumed by contradiction that aĩ+j̃2s 6= aĩ , and this implies that S3 + aĩ+j̃2s = 1, which by looking at Equation (9) gives us φt (ṽ) = 0, namely there is a vector of weight larger than t for which φt vanishes, which by definition is not possible. P Corollary 16. φ2s = σ2s + σ2·2s + σ3·2s + . . . = j σj2s . Proof. Lemma 11 implies that no symmetric polynomial with degree less s than 2s appears in φ2s , Lemmas 12 P and 13 say that a2 = 1, and finally Lemma 15 allows us to write φt = j σj2s . The following Lemma is directly implied by Lucas’ Theorem, we state it here because it will be useful to prove a particular property of φt for t even.  Lemma 17. Let i > j be two integers equal to 0 mod 2e . Then ji mod 2 =  i+b for each b < 2e . j Proposition 18. Let t = 0 mod 2e . Then ai = 0 for each i 6= 0 9 mod 2e . (10) Proof. The case i < t follows from Lemma 11, so let i > t and let ĩ = j2e be such that ĩ < i < ĩ + 2e . We will proceed by induction. Assume that Equation (18) holds till the coefficient ai−1 . In this case we can write φt = P j aj2e σj2e + ai σi + R. We recall that Lemma 2 states that R is a linear combination of ESFs of degree larger that i. By definition, φt (v) = 1 whenever w(v) ≥ t, so in particular we have both φt (v) = 1 with v of weight i and φt (ṽ) = 1 with w(ṽ) = ĩ: P  φt (ṽ) = j aj2e σj2e (ṽ) = 1 P φt (v) = j aj2e σj2e (v) + ai σi (v) = 1. By Lemma 17 it follows that σj2e (v) = σj2e (ṽ) for each j, so φt (v) = 1 + ai σi (v) = 1, hence ai = 0. We summarise most of the results that we presented up to this point into Theorems 19 and 20, which are methods to compute φt respectively for odd and even values of t. Theorem 19. Let t be an odd integer, and let s be such that 2s−1 < t ≤ 2s . Let at,t = 1 and for i ∈ {t + 1, . . . , 2s } define at,i = 1 + i−1 X at,j j=t Then φt = P∞ P2s j=0 i=t   i · j mod 2. (11) at,i σi+j2s . Proof. Lemmas 11, 12, 13 and 15, imply that φt is completely determined by the coefficients at+1 , . . . , a2s −1 . Equation (11) derives from the definition of φt and from Proposition 6. Theorem 20. Let t = r2e , with r being an odd integer. Let s be such that 2s−1 < r ≤ 2s . Let {ar,i }i be the sequence of coefficients of φr , as defined in P P2s Theorem 19. Then φt = ∞ i=r ar,i σi2e +j2e 2s . j=0 Proof. We apply first Proposition 18, and then Theorem 19. From Theorem 19 we can derive explicit formulas for some particular cases, related to φ2s in Corollary 16. 10 Corollary 21. Let t− = 2s − 1 and let t+ = 2s−1 + 1. Then P φt− = j (σ2s −1+j2s + σ2s +j2s ) P Ps φt+ = j 2i=t σi+j2s . As a consequence of Theorem 3, since b(j2s ) ∧ b(i) = 0 for each i < 2s , we have σi+j2s = σi · σj2s . We can use this to give a more concise formula for φt , stated in the next corollary. Ps Corollary 22. Let ψ2s = φ2s + 1 and ηt = 2i=t ai σi . Then φt = ψ2s · ηt . In the remaining part of this section we use φt to derive another family of symmetric polynomials. Let us consider the set of point of weight exactly t, and the polynomial ρt vanishing at each point outside of this set. Proposition 23. ρt = φt+1 + φt = φt · (1 + φt+1 ). Proof. Apply the definition of φt and ρt and use φt1 · φt2 = φmax(t1 ,t2 ) Corollary 24. Let t− = 2s − 1. Then P P s+1 ρ2s = j 2i=2s−1 σi+j2s+1 P ρt− = j σ2s −1+j2s Proof. We apply Proposition 23 to Corollary 16 and Corollary 21. Theorem 25. ρt is equal to the binary Möbius transform of σt . Proof. The transform of σt is exactly the polynomial vanishing at all points whose weight is different from t. We conclude this section with the following generalisation of the idea behind the derivation of ρt . A related result is shown in Carlet (2010) to characterise the Numerical Normal Form of binary symmetric functions. Theorem 26. {φt } and {ρt } are bases for the vector space of symmetric Boolean functions. 11 Proof. A symmetric Boolean function f assumes the same value on points whose Hamming weights are the same, so to completely determine the function we require an evaluation on a point for each possible weight. In case of n variables, we need therefore n + 1 values. If we write fi to denote the value of f on a point of weight i we have the formula f = f0 ρ0 + f1 ρ1 + . . . + fn ρn . (12) Since we can define ρt in terms of φt and φt−1 we also can write f as a linear combination of φ1 , . . . , φn . 5. An application to linear codes We show now a way to determine the minimum distance of a code by using φt . A related approach was proposed in Guerrini et al. (2010) to the systematic nonlinear case. The ideas behind the two methods are indeed similar, even though the results of this section do not require the computation of a Gröbner Basis. (n) We denote with φt the restriction of φt to the case of n variables. Let C be an (n, k)2 code, and let F : (F2 )k → (F2 )n be its generator map, namely C is the image of F . Let d and w be the minimum distance and minimum weight of C. Without loss of generality we can assume that F (0) = 0, so that 0 ∈ C and d ≤ w. (n) (k) Theorem 27. w ≥ t if and only if φt ◦ F = φ1 . k Proof. w ≥ t means that w (F (v)) ≥ t for each vector v 6= 0 ∈ Fk2 , which can be written as k (n) φt (F (v)) = 1 for each v 6= 0 ∈ Fk2 . (n) This means that φt ◦ F is the Boolean function in k unknowns for which (k) 0 7→ 0 and 0 6= v 7→ 1, and this is exactly the definition of φt . (n) (k) Corollary 28. d < t if φt ◦ F 6= φ1 . (n) Proof. If φt d ≤ w. (k) ◦ F 6= φ1 , then by Theorem 27 w < t, and by definition 12 We remark that Corollary 28 is just a sufficient condition to bound d, since d can indeed be strictly smaller than w. By applying Theorem 27 at most log2 (n) times, we can determine precisely w, while we would only bound d. We can however restrict ourselves to linear codes, so that the minimum weight corresponds to the minimum distance. We obtain Corollary 29, whose proof is a straightforward application of Theorem 27 to the linear case. Let G be the generator matrix of a linear [n, k, d]2 code C. Observe that the generator map F (X) is in this case the linear map X · G. (n) (k) Corollary 29. In the linear case, d ≥ t if and only if φt ◦ F = φ1 . 6. Conclusions From a theoretical point of view, the explicit description of φt allows the formulation of problems in which the solutions have requirements on their weight. Even though it is quite straightforward to simply check the weight of a given solution, in particular cases it could be an advantage to just add the right linear combination of ρ0 . . . , ρn to the generating system of the ideal. Other than a theoretical overview of several properties of the polynomials φt and ρt , we have shown here how to obtain them either by applying the binary Möbius function or through an algorithm. At the end of this work the reader can find a list of polynomials for small numbers of variables, i.e. we provide φt and ρt for t = 1, . . . , 63 (See Table 1). Finally, in Section 5 we have shown an application of our results to Coding Theory, a novel theoretical method to check the minimum distance of a linear binary code. We conclude by giving some remarks on our contribution to Coding Theory, even though the construction of dedicated algorithms and a study of the complexity of such procedures is beyond the purpose of this work. In the general case we deal with an [n, k] code with no structure, i.e. the generator matrix of C is chosen randomly. Then, since we are working with length n  n codewords, the number of monomials in σi is equal to i . The computation  n of σi ◦ F requires therefore i multiplications, each one involving i linear polynomials. This is however the worst case scenario. Dedicated algorithms could instead take advantage of the symmetric nature of φt , and be designed to compute the minimum distance of particular classes of codes. 13 Acknowledgements The author would like to thank Prof. Massimiliano Sala for the interesting hints on polynomial ideals and their applications to Coding Theory. References Carlet, C., 2010. Boolean functions for cryptography and error correcting codes. Boolean models and methods in mathematics, computer science, and engineering 2, 257–397. Cox, D., Little, J., O’Shea, D., 2007. Ideals, varieties, and algorithms, 3rd Edition. Springer, an introduction to computational algebraic geometry and commutative algebra. Garcia-Villalba, L. J., Rodriguez-Palanquex, M. C., Montoya-Vitini, F., Sep 1999. Algorithm for computing minimum distance. Electronics Letters 35 (18), 1534–1535. Guerrini, E., Orsini, M., Sala, M., 2010. Computing the distance distribution of systematic non-linear codes. Journal of Algebra and Its Applications 9 (2), 241–256. Hu, X.-Y., Fossorier, M. P. C., Eleftheriou, E., June 2004. On the computation of the minimum distance of low-density parity-check codes. In: 2004 IEEE International Conference on Communications (IEEE Cat. No.04CH37577). Vol. 2. pp. 767–771 Vol.2. MacWilliams, F. J., Sloane, N. J. A., 1977. The theory of error-correcting codes. I and II. North-Holland Publishing Co. Pieprzyk, J., Zhang, X., 2007. Computing möbius transforms of boolean functions and characterising coincident boolean functions. In: Proceedings of the International Conference on Boolean Functions: Cryptography and Applications. 14 t τ φt τ ρt 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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 1 2 4 4 8 8 8 8 16 16 16 16 16 16 16 16 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 1 2 3,4 4 5 ··· 8 6,8 7,8 8 9 · · · 16 10,12,14,16 11,12,15,16 12,16 13 · · · 16 14,16 15,16 16 17 · · · 32 18,20,22,24,26,28,30,32 19,20,23,24,27,28,31,32 20,24,28,32 21 · · · 24,29 · · · 32 22,24,30,32 23,24,31,32 24,32 25 · · · 32 26,28,30,32 27,28,31,32 28,32 29 · · · 32 30,32 31,32 32 33 · · · 64 34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64 35,36,39,40,43,44,47,48,51,52,55,56,59,60,63,64 36,40,44,48,52,56,60,64 37 · · · 40,45 · · · 48,53 · · · 56,61 · · · 64 38,40,46,48,54,56,62,64 39,40,47,48,55,56,63,64 40,48,56,64 41 · · · 48,57 · · · 64 42,44,46,48,58,60,62,64 43,44,47,48,59,60,63,64 44,48,60,64 45 · · · 48,61 · · · 64 46,48,62,64 47,48,63,64 48,64 49 · · · 64 50,52,54,56,58,60,62,64 51,52,55,56,59,60,63,64 52,56,60,64 53 · · · 56,61 · · · 64 54,56,62,64 55,56,63,64 56,64 57 · · · 64 58,60,62,64 59,60,63,64 60,64 61 · · · 64 62,64 63,64 2 4 4 8 8 8 8 16 16 16 16 16 16 16 16 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 64 1 2,3 3 4 ··· 7 5,7 6,7 7 8 · · · 15 9,11,13,15 10,11,14,15 11,15 12 · · · 15 13,15 14,15 15 16 · · · 31 17,19,21,23,25,27,29,31 18,19,22,23,26,27,30,31 19,23,27,31 20 · · · 23,28 · · · 31 21,23,29,31 22,23,30,31 23,31 24 · · · 31 25,27,29,31 26,27,30,31 27,31 28 · · · 31 29,31 30,31 31 32 · · · 63 33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63 34,35,38,39,42,43,46,47,50,51,54,55,58,59,62,63 35,39,43,47,51,55,59,63 36,37,38,39,44,45,46,47,52,53,54,55,60,61,62,63 37,39,45,47,53,55,61,63 38,39,46,47,54,55,62,63 39,47,55,63 40 · · · 47,56 · · · 63 41,43,45,47,57,59,61,63 42,43,46,47,58,59,62,63 43,47,59,63 44 · · · 47,60 · · · 63 45,47,61,63 46,47,62,63 47,63 48 · · · 63 49,51,53,55,57,59,61,63 50,51,54,55,58,59,62,63 51,55,59,63 52 · · · 55,60 · · · 63 53,55,61,63 54,55,62,63 55,63 56 · · · 63 57,59,61,63 58,59,62,63 59,63 60 · · · 63 61,63 62,63 63 Table 1: Indices for which ai = 1 in the representation of φt and ρt as in Equation 3. By Lemma 15, we only need the values of ai from t to the smallest power of 2 larger than t, which is given in the column marked as τ . Then, for any multiple of τ we have ai = ai+jτ . The notation a · · · b denote the presence of all integers between a and b. Example: for t = 7, τ = 8 and P the given indices are 7 and 8: then φ7 = σ7 + σ8 + σ15 + σ16 + . . . ; similarly, ρ7 = j σ7+8j . 15
0math.AC
The reinterpretation of standard deviation concept Ye xiaoming1,2 1 School of Geodesy and Geomatics, Wuhan University, Wuhan, Hubei, China, 430079. Key Laboratory of Precision Engineering & Industry Surveying, State Bureau of Surveying and Mapping, Wuhan, Hubei, China, 430079 2 Abstract: Existing mathematical theory interprets the concept of standard deviation as the dispersion degree. Therefore, in measurement theory, both uncertainty concept and precision concept, which are expressed with standard deviation or times standard deviation, are also defined as the dispersion of measurement result, so that the concept logic is tangled. Through comparative analysis of the standard deviation concept and re-interpreting the measurement error evaluation principle, this paper points out that the concept of standard deviation is actually single error’s probability interval value instead of dispersion degree, and that the error with any regularity can be evaluated by standard deviation, corrected this mathematical concept, and gave the correction direction of measurement concept logic. These will bring a global change to measurement theory system. Keywords: measurement error; standard deviation; variance; covariance; probability theory 1. Introduction In existing measurement theory, both the precision concept and the uncertainty concept are expressed with standard deviation or times standard deviation. However, because mathematical theory interprets the concept of standard deviation as the dispersion degree, the measurement concepts of precision and uncertainty are also defined as the dispersion connotation [1][2][3][4][5]. Both of them are standard deviation, and are dispersion, then, what is the difference between these two concepts? Of course, these can lead people to understand them as the same concept. So that the concept controversy is took place [6]. Also, this dispersion concept actually also cannot justify. For example: the State Bureau of Surveying and Mapping of China announced the Mount Everest elevation is 8844.43 m with the standard deviation (precision) of ±0.21 m in 2005. Ordinary people’s understanding are, the error of measurement result 8844.43m is a constant deviation, and the precision of ±0.21m is the existence interval of this error. However, the measurement professionals usually don’t take this understanding, and they will say that the precision is the dispersion degree of measurement result or random error; When you point out that a single 8844.43 result cannot be discrete, he would say, in the future, the results of repeated measurements are discrete. The strange aspect of this "logic" is, not only the current measurement result isn’t interpreted to be clear, but also the other measurements in future are pulled together. Actually, this “future dispersion theory” is also not tenable. If taking the same measurement conditions as current measurement in future repeated measurements(all the processes and conditions including internal and external of instruments are exactly the same as current measurement), every measurement result will be the exactly same as current result of 8844.43 m and cannot be discrete, and the standard deviation of every result is still ±0.21m, because the same source and the same process certainly cause the same result; If the conditions in future repeated measurements are different from current measurement, this discussion is even more pointless to current measurement, because these different future measurements have no any relation with current measurement and their dispersion is not a matter which is needed to care about by current measurement. Next, by discussing the variance concept and re-interpreting the error evaluation principle, the author will point out the concept nature of standard deviation is not the dispersion, correct this mathematical concept, and specify the correction direction of measurement theory concept logic. 2. The understanding of standard deviation concept As mentioned above, the dispersion concept actually makes the measurement issue is hardly to explain. So, what is the actual standard deviation concept? The definition of variance (standard deviation) given by existing probability theory is: (2-1)  x2  E ( x  Ex )2 Here Ex is the mathematical expectation of random variable x , and is defined as n x Ex  lim  i . ( xi is measurement results sequence.) n  i 1 n  [email protected] 1 In order to correctly understand the concept of standard deviation, we clarify several understandings at first: 1. The measurement sequence’s mutual dispersion is because there are some process differences in the forming process of each measurement result, and these differences of process are fuzzy and uncertain to us, but the fuzziness and uncertainty of the process are finite degree. 2. The basic method of probability theory is to not pay attention to the fuzzy processes and only do statistical analysis to final results, and to infer the probability interval of an unknown numerical value by analyzing the dispersion of many known numerical values. 3. The purpose of probability theory is to infer an unknown value's probability interval, instead of to evaluate the dispersion of a known sequence. 4. It is neither logic nor necessary to contrarily re-explain a numerical value’s probability interval as the dispersion of other future sequence, because positive proposition cannot prove its inverse proposition. That is to say, although the standard deviation is from the dispersion analysis of measurement sequence, its meaning is actually the probability interval value of any a deviation x  Ex . That is, when using a xi as the final measurement result, the standard deviation  x is the probability interval evaluation value of a single deviation xi  Exi , or the single deviation xi  Exi exists within the probability interval with standard deviation  x . Taking normal distribution as an example, standard deviation  x expresses the deviation xi  Exi is within the scope of [   x ,   x ] under the confidence probability of 68%. It is because that the standard deviation is xi  Exi ’s probability interval value instead of xi ’s dispersion, so the strict expression of the formula (2-1) must be:  2x  E ( x  Ex )2 In equation (2-2), x refers to any an error xi  xi  Exi . (2-2) It is because the standard deviation  x is the probability interval value of error xi  Exi , the error sample directly involved in statistic naturally should be the sequence xi  Exi . That is, the formula (2-2) can only be approximated as n  2x  E ( x  Ex ) 2  ( x i  Exi ) 2 n  (x ) 2 i (2-3)  i 1 n n Obviously, because the error x is one member in the sequence consisting of the n errors xi , it has no any logical trouble to interpret the dispersion interval of the n existing error values as the probability interval evaluation of the error x . But contrarily, it is neither logic nor necessary to re-explain one error’s standard deviation as the dispersion of future other measurement sequence. The probability interval value of deviation between result and expectation can be expressed by standard deviation. Then, how is the deviation between expectation and true value? The answer, of course, is yes, and its standard deviation can be obtained by tracing upstream measurements forming this deviation, because any error comes from measurement. That is to say, the xi in formula (2-3) not only expresses the deviation between the result and expectation, but also may express the deviation between expectation and true value, even may express the deviation between the result and the true value. Using the dispersion of error sequence in which the error is located express the probability range of the error, which is the standard deviation meaning. Besides, in some cases, the error x also may be viewed as one member in existing other error sequence, and can obtain a different standard deviation value. These showed, the standard deviation is a subjective concept of expressing human cognition, and it is very normal that different cognitive method causes different standard deviation evaluation. For example, measure the size of a workpiece with a caliper. The error of measurement result can be regarded as one member in the sequence consisting of all the errors of the whole measurement range of the caliper, also can be regarded as those of all the calipers of the same model, and also can be regarded as those of all calipers. As a result, the same error may get three different standard deviation values. Obviously, when a standard deviation value of this error is given, it is neither logic nor necessary to explain it as the dispersion of other future repeated measurement. i 1 2 Therefore, the standard deviation is the probability interval evaluation value of a single error, is a concept of error range with probability meaning, and expresses an error’s possible deviation degree. Standard deviation is precisely associated with a single deviation. That is to say, it is in order to evaluate the probability interval of an unknown event instead of the dispersion of a sample sequence that probability theory do statistical analysis to a number of known events! It is not appropriate to interpret the standard deviation as dispersion degree. It is precisely correct that general public understand the Mount Everest elevation’s precision as the error’s possible range. n It can be seen from formula (2-3), only when the  ( xi ) 2 is minimum, the standard deviation i 1 is minimum. This is the basic idea of the least squares principle. That is to say, the concept of variance not only gives the method of evaluating error’s probability interval, but also gives the least square principle of getting the best measurement result. 3. Covariance and covariance propagation law The definition of variance is actually to use the self-correlation of all the errors of the group in which the error is located to evaluate the probability range of one error, and another problem is that there may be cross-correlations between two different error groups. Therefore, considering the case of multiple errors, the definition of variance is further extended to: (3-1) DX  E (X )( X )T That is DX  ii2   x1      x2  x1  E        x   t    112     21     t1 is the variance of error xi , x2     xt     (3-2)  12   1t   2  22   12    t2      tt2  and the  ij is the co-variance of error xi and error x j . Then, what is meaning of co-variance? It is assumed that the errors k, p and q are uncorrelated with each other, and that their standard deviations are  k , p and  q respectively. Now, there are two errors   k  p and   k  q , therefore, their variance is respectively:  2   k2   p2 (3-3)  2   k2   q2 (3-4) According to the definition of covariance:    E ( )  E ( k  p )( k  q)  (3-5)  Ek  E kp  E kq  E  pq  2 Because the errors k, p and q are uncorrelated with each other, and Ek   k , the equation (57) becomes into:     k2 (3-6) It can be seen that the mathematical meaning of covariance is the variance of the communal error component among two errors. As long as there are communal error component among different errors, there must be a covariance between them. For example: the two measurement result’s errors measured by the same instrument, the two instrument’s errors made by the same manufacturer, and so on. 2 2 3 In existing measurement theory, the covariance propagation law is proved by dispersion concept, and it actually only aims at the deviation between the measurement result and the mathematical expectation. Now, the variance and covariance has been extended to all errors, naturally, covariance propagation law is extended to all errors, and its proof process also become more simple. For example: the linear functions are Z  K X  K0 t 1 t nn 1 (3-7) t 1  k11 k12    k1n   Z1   k10  k k   Z  k 22    k 2 n  21 20 2   ,K  , K0    Z  t 1   t n     t 1           kt1 kt 2    ktn   kt 0   Zt  Take total differential for (3-7) equation: Z  K  X t 1 (3-8) t n n 1 Therefore, the covariance matrix of the error sequence Z is t 1  DZ  E Z Z  t t  T   E K  X K  X  T    KE X X  K T T  That is DZ  K DX K t t T (3-9) t n n n n t 4. The standard deviation of regular error The standard deviation is the probability interval value of an error. The first concept change brought is that the regular error can also be evaluated by the standard deviation. In the past, we only noticed that the error sample sequence is random discrete, Noise voltage or that the discrete error sample sequence is δ random regularity. For example, the f(δ) electronic noise error in electronic instruments is a random function of time, as t shown in Fig 1. However, it also makes people form a serious misconception: only the error with random regularity can be Fig. 1 The random distribution of noise error evaluated by the standard deviation, but error with certain regularity cannot. The front has said, that probability theory study error’s probability interval is to only do statistic analysis to the results sequence by ignoring process. The various regularities in process are actually artificially ignored, which does not mean that the objective process must be random regularity. The error with certain regularity also shows random regularity when its certain regularity is ignored, and the random regularity and the certain regularity are different ways to observe things. In measurement practice, it is a common fact that various regular errors are incorporated into statistical models to process. For example: the cyclic error of phase photoelectric distance meter [ 7 ][8 ] and the disc eccentricity error of theodolite [9][10] are sine regularity, and its function model is   asin s . Now, phase s is unknown, and is considered as an equal probability distribution, then, the error  4 will inevitably exist within the probability interval  a,  a  , but is not equal probability distribution. See Fig 2. It can be derived that the distribution density function f ( ) is: 1   2 f ( )   a   2 0     a δ f(δ)  a s Its standard deviation is   a 2 Fig. 2 The random distribution of sine error It can be seen, when relating error  with phase s to observe, the error shows sine regularity; when the phase s is viewed as arbitrary, the sine cycle error is also to follow a random distribution, and the standard deviation of any an error is   . Another example: The rounding error is a cycle error of sawtooth regularity. As shown in Fig 3. When relating error  with the actual value w to observe, the error  shows sawtooth cycle regularity; when the actual value w is viewed as arbitrary, the error is also to follow a random distribution, and its distribution density function is: 1  f ( )   2a  0    a δ  a a f(δ) Its standard deviation is w a .   3 -a Another example: there is certain Fig. 3 The random distribution of sawtooth error regularity between the frequency error δ of quartz crystal and temperature T. However, δ when the temperature is viewed to be arbitrary, and because the temperature f(δ) value is within a T1 probability interval [T1, T2 T T2], the corresponding error δ also exists within a certain probability interval. See Fig 4. Fig. 4 The random distribution of quartz crystal frequency error That is, the standard deviation is the evaluation value of the probability interval of an error, any error can be evaluated by the standard deviation, and it is incorrect to think that regular error has no standard deviation. 5. Statistical method of standard deviation in measurement 5.1. Error model vi  xi  y Because vi  xi  y , there is Exi  Ey , and formula (2-3) becomes into: n   (x i i 1  Ey )2 (5-1) n That is,  x is the probability interval value of an error xi  xi  Ey . First, for the measurement errors sequence {vi  xi  y} , the final result given by least square 2 x method is n y i 1 xi n (5-2) 5 Because every error xi  xi  Ey is independent from each other and every error’s variance is  , according to the law of variance propagation, then there is: 2 x  2y   2x n Next, we separate the error xi  xi  Ey into two parts of xi  y and y  Ey , that is xi  ( xi  y )  ( y  Ey ) (5-4)  vi  ( y  Ey ) According to the formula (5-1), there must be: 1 n  2x   xi2 n i 1  (5-3) 1 n  (vi  y  Ey )2 n i 1 (5-5) n 1 n 2 2 v  ( y  Ey ) vi  ( y  Ey ) 2 i n  n i 1 i 1 The key question comes out, error y  Ey is unknown. However, according to equation (5-  2), we already know  2y  E ( y  Ey ) 2   2x . Thus, take mathematical expectation for both sides n of the equation (5-5), and be aware of E ( y  Ey )  Ey  Ey  0 , Then get: 1 n E 2x  E (  vi2 )  E ( y  Ey )2 n i 1 That is:  2x   1 n 2 vi   2y  n i 1 1 n 2  2x  vi  n n i 1 n Therefore:  x  v i 1 2 i (5-6) n 1 This is the famous Bessel formula. Finally, by formula (5-3), the standard deviation  y , which is the probability interval evaluation value of error y  Ey , is:  y   x (5-7) n Visible, the most critical step in the reasoning process is  2y  E ( y  Ey ) 2   2x . If n according to the existing dispersion concept, it may be possible to explain  x as the dispersion of sequence xi , but explaining  y as the dispersion of a unique final measurement result y is illogical, and this equation cannot be established. Only the  x and  y are respectively interpreted as the probability interval values of error xi  Exi and y  Ey , all the logic is fluent. 5.2. Error model vi  xi  ai y Because vi  xi  ai y , there is Exi  Eai y , and formula (2-3) becomes into: n  2x  (x i 1 i  Eai y )2 (5-8) n That is,  x is the probability interval value of an error xi  xi  Eai y . Next, for the error model vi  xi  ai y , the final result given by least square method is: 6 n y a x i i i 1 n a i 1 (5-9) 2 i So, the variance propagation relation is:  2y   2x (5-10) n a 2 i i 1 Therefore, the derivation process evolves into: xi  xi  Eai y  ( xi  ai y )  ai ( y  Ey ) Because vi  xi  ai y Equation (5-11) is transformed into: xi  vi  ai ( y  Ey ) According to the formula (5-8), there must be: 1 n  2x   xi2 n i 1 n 1   ( vi  ai ( y  Ey )) 2 n i 1 n n 1 n 2 1   vi2  ( y  Ey ) vi ai  ( y  Ey ) 2  ai2 n i 1 n n i 1 i 1 Take mathematical expectation for both sides of the equation (5-13): (5-11) (5-12) (5-13) n  n 2 x 1   vi2  n i 1 a i 1 n 2 i E ( y  Ey ) 2 n ai2 1 n 2  i 1   vi   2y n i 1 n Substitute the equation (5-10) into above equation: n  2x  v 2 i i 1 n   2x n n  x  v i 1 2 i (5-14) n 1 The form of Bessel formula still remains unchanged. Finally, by formula (5-10), the standard deviation  y , which is the probability interval evaluation value of error y  Ey , is:  y   x a i 1 Similarly,  2y (5-15) n 2 i the most critical step in the reasoning process is the equation 2   y as the  E ( y  Ey ) 2  n x . If according to existing dispersion concept, explaining a i 1 2 i dispersion of a unique final measurement result y is also illogical. Also, because xi  ai y according to vi  xi  ai y , the dispersion of sequence xi  mainly depends on the dispersion of sequence ai  and is unable to equal to  x , naturally, it is impossible to explain  x as the dispersion of sequence xi . 7 For example, error equation is v1  10  1 y  v2  20  2 y   v3  30  3 y   v4  40  4 y  v5  50  5 y   v6  60  6 y  The solution of this equation is obtained: y  10,  x  0,  y  0 . Obviously, although the sequence 10,20,30,40,50,60 is discrete, its dispersion is actually not equal to  x ! The standard deviation  x and the dispersion of sequence xi  are two different things. Therefore, only the  x and  y are respectively interpreted as the probability interval values of error xi  Exi and y  Ey , all the logic is fluent. t 5.3. Multivariate error model vi  xi   aij y j j 1 t Because vi  xi   aij y j , there is Exi  E  aij y j , and formula (2-3) becomes into: t j 1 j 1 n  2x  t (x i 1  E  aij y j )2 i j 1 (5-16) n t That is,  x is the probability interval value of an error xi  xi  E  aij y j . j 1 Next, the error equation of general adjustment principle is:  v1   x1   a11 a12       v2   x2   a 21 a 22               v n   x n   a n1 a n 2 VX  a1t  y1     a 2 t  y 2         a nt  yt   AY That is According to the principle of least squares, its normal equation is: AT AY  AT X   1 (5-17) (5-18) Its measurement results: (5-19) Y A A A X According to the covariance propagation law, the covariance matrix of final measurement results is: Now, the covariance matrix of X DX Therefore,  T  Here, the A A 1 T  T  1 DY  AT A DX (5-20) is:   2x   0     0  0  2 x  0 0    0        2x     DY   2x AT A 1 (5-21) is called the co factor matrix. 8 Replace the measurement results y1 , y2 , yt into the error equation (5-17), and obtain the numerical value v1 , v2 ,…, vn of each residual error. They are:  v1   x1   a11       v2   x2   a 21               v n   x n   a n1 V a12  a1t  y1    a 22  a 2 t  y 2        a n 2  a nt  yt   X  AY That is (5-22) Please note, the residual V is relative to the final measurement result Y instead of the mathematical expectation EY, and we cannot guarantee Y=EY. So make That is So there is  x1   x1   a11 a12  a1t  Ey1          x2   x2   a 21 a 22  a 2 t  Ey 2                      xn   xn   a n1 a n 2  a nt  Ey t  X  X  AEY X  X  AY  AY  AEY  V  A(Y  EY ) (5-23) (5-24)  x1   v1   a11 a12  a1t  y1  Ey1          x2   v2   a 21 a 22  a 2 t  y 2  Ey 2  That is                    xn   vn   a n1 a n 2  a nt  yt  Ey t  Make y j  y j  Ey j  x1   v1   a11 a12  a1t  y1          x2   v2   a21 a22  a2 t  y2                      xn   vn   an1 an 2  ant  yt  Take the squares sum for both sides of the equation, so there is:  y1    y 2  2 2 T xi   vi  y1 y2  yt AA  (5-25)    i 1 i 1    yt   v1 ( y1a11  y2 a12    yt a1t )   According to the formula (5-16), the equation (5-25) evolves into:  y1    n n y2  2 2 2 T  n x   xi   vi  y1 y2  yt A A (5-26)   i 1 i 1    yt   v1 ( y1a11  y2 a12    yt a1t )   Take mathematical expectation for both sides of the equation (5-26), and be aware of Ey j  E ( y j  Ey j )  Ey j  Ey j  0 . Then get: n n 9   y1      y2    2 2 T  n x   vi  E  y1 y2  yt A A   i 1        yt     A11 A12  A1t    Make T  A21 A22  A2 t  , there is: A A         At1 At 2  Att  n   A11 A12  A1t  y1         A21 A22  A2t  y 2   2 2 n x   v i  E  y1 y 2  y t          i 1         At1 At 2  Att  y t    n t t t         vi2  E  y1  A j1 y j   E  y 2  A j 2 y j     E  y t  A jt y j  i 1 j 1 j 1 j 1       n Now, let's see the matrix AT ADY , and please note that  A11 A12  A1t   12  12   2  A21 A22  A2 t   21  2 T A ADY              At1 At 2  Att   t1  t 2   A11   A  E   21    A   t1 A12  A1t  y1y1  A22  A2t  y2 y1       At 2  Att  yt y1 (5-27) AT A is a symmetric matrix.   1t     2t        t2  y1y2  y1yt    y2 y2  y2 yt        yt y2  yt yt   t t t         E  y1  A j1y j  E  y1  A j 2 y j   E  y1  Ait y j           j 1 j 1 j 1         t t t      E  y 2  A j1y j  E  y2  A j 2 y j   E  y 2  Ait y j          j 1 j 1 j 1               t t t  E  y  A y  E  y  A y   E  y  A y   t j 1 j t j 2 j t i t j        j 1 j 1 j 1        However, according to the formula (5-20), there is:   2x 0  0    2  0  x  0  T A ADY  DX           0 0   2x   Make equal substitution for equation (5-28) and equation (5-29): t t t         E  y1  A j1y j  E  y1  A j 2 y j   E  y1  Ait y j           j 1 j 1 j 1       2 0  0      x  t t t       E  y2  A j1y j  E  y2  A j 2 y j   E  y2  Ait y j    0  2x  0           j 1 j 1 j 1                   2     0 0   t t t  x   E  y  A y  E  y  A y   E  y  A y   j2 j it j   t  t   t j 1 j1 j  j 1 j 1        (5-28) (5-29) (5-30) It can be seen from the equation (5-30) that the t elements on the main diagonal are equal to ,  that is 2 x 10 t t t       E  y1  Aj1y j   E  y2  Aj 2 y j     E  yt  Ajt y j    2x j 1 j 1 j 1       Replace equation (5-31) into the equation (5-27): n t t t       n 2x   vi2  E  y1  Aj1y j   E  y2  Aj 2 y j     E  yt  Ajt y j  i 1 j 1 j 1 j 1       (5-31) n   vi2   2x   2x     2x (5-32) i 1 n   v  t i 1 2 i 2 x n v  x  Therefore i 1 2 i (5-33) nt In the case of unequal weights, because they are transformed into equal weights before adjustment, a similar formula can be obtained by the same derivation process. It will be: n pv  x  2 i i i 1 nt (5-34) This is the Bessel formula in multivariate adjustment. Finally, the covariance matrix DY of final measurement result’s errors Y  EY is obtained by formula (5-21). Similarly, the most critical step in the reasoning process is the formula (5-21), that is   1 DY   2x AT A . If according to existing dispersion concept, people's thinking still fall into the trap that a single value (final measurement result y j ) has no dispersion, and this equation is illogical. t t j 1 j 1 Also, because xi   aij y j according to vi  xi   aij y j , the dispersion of sequence xi  mainly depends on all the aij and is unable to equal to  x , naturally, it is impossible to explain  x as the dispersion of sequence xi  . Therefore, only the standard deviation is interpreted as error’s probability interval value, all the logic is fluent. 6. The total standard deviation of final measurement result In section 4, the standard deviation, which is obtained by Bessel formula and variance propagation law, is actually the probability interval value of the constant deviation between final measurement result and its mathematical expectation. Now, we use  A to express this constant deviation, and use  A to express its standard deviation. Further, for the final measurement result, the difference between mathematical expectation and the true value is also a constant deviation, and is expressed as  B , which is different from  A and doesn’t come from the dispersion of sequence vi . 1. For the error model vi  xi  y , the final result given by least square method is n xi (6-1) i 1 n When every measurement result xi contains the same error  B , the final measurement result y y is added an error component  B but the dispersion of sequence vi  isn’t affected. 2. For the error model vi  xi  ai y , the final result given by least square method is n y a x i 1 n i i a i 1 (6-2) 2 i 11 When each measurement result xi contains an error i  ai  B respectively, the final measurement result y is added an error component  B but the dispersion of sequence vi  isn’t affected. t 3. For the error model vi  xi   aij y j , the final results given by least square method are j 1   Y  AT A 1 AT X (6-3) t When each measurement result xi contains an error i   aij  Bj respectively, the each final j 1 measurement result y j is added an error component  Bj respectively but the dispersion of sequence vi  isn’t affected. More importantly, the standard deviation  B (or  Bj ) of this deviation  B (or  Bj ) can also be obtained by seeking its upstream measurement(the historical measurement of forming this error)[11], because there is no essential difference between upstream measurement and current measurement, and we can obtain any error’s standard deviation as long as tracing its source. In this way, the final measurement result’s total error is: (6-4)    A  B According to variance propagation law, the total standard deviation is:    A2   B2 (6-5) In the equation (6-4), both  A and  B are constant deviation, are generated by measurement, have respective variance, and have no difference in nature, naturally, there actually is not the error classification issue of systematic error and random error. Therefore, in the existing measurement theory, all the conceptual thinking, such as interpreting  A as random error which is random discrete, interpreting  B as systematic error which does not follow random distribution and has no standard deviation, and corresponding precision and trueness concept logic, naturally should be abolished[11][12][13][14]. In the equation (6-5), this total standard deviation is the total error’s probability interval evaluation value of final measurement result. That is to say, as long as we consider all the upstream measurements and current measurement as a whole, the error between final measurement result and its true value can be evaluated by the total standard deviation. Naturally, existing measurement error evaluation concept should be redefined according to the concept connotation of standard deviation. 7. Conclusion The concept of standard deviation is actually the probability interval evaluation value of an error (deviation). Based on this concept, the quantitative evaluation method of unknown error is realized. Because any error’s probability interval can be evaluated by standard deviation, all the conceptual thinking based on error classification philosophy should be abandoned and existing measurement error evaluation concept should be redefined according to the concept connotation of standard deviation. These will bring a global change to measurement theory system. [1]. International vocabulary of metrology — Basic and general concepts and associated terms (VIM) JCGM 200:2012 [2]. Guide to the Expression of Uncertainty in Measurement, International Organization for Standard, First edition corrected and reprinted,2008,ISBN92-67-10188-9 [3]. JJF1001-2011 General Terms in Metrology and Their Definitions [4]. JJF1059-2012 Evaluation and Expression of Uncertainty in Measurement [5]. GB/T14911-2008 Basic Terms of Surveying and Mapping [6]. Schmidt,H.Warum GUM?-Kritische Anmerkungen zur Normdefinition der “Messunsicherheit” und zu verzerrten “Elementarfehlermodellen” [EB/OL]. http://www.gia.rwthaachen.de/Forschung/AngwStatistik/warum_gum/warum_gum_zfv.pdf [7]. JJG703-2003, Electro-optical Distance Meter (EDM instruments) [8]. ISO 17123-4:2012,Optics and optical instruments -- Field procedures for testing geodetic and surveying instruments -- Part 4: Electro-optical distance meters (EDM measurements to reflectors) [9]. JJG414-2003, Optical Theodolites [10]. ISO 17123-3:2005, Optics and optical instruments - Field procedures for testing geodetic and surveying instruments - Part 3: Theodolites 12 [11]. Ye Xiao-ming, Xiao Xue-bin, Shi Jun-bo, Ling Mo. The new concepts of measurement error theory, Measurement, Volume 83, April 2016, Pages 96–105 [12]. Ye Xiao-ming. Errors Classification Philosophy Critique [C]// Proceedings of National Doctoral Forum on Surveying and Mapping. 2011 [13]. Ye Xiao-ming, Ling Mo, Zhou Qiang, Wang Wei-nong, Xiao Xue-bin. The New Philosophical View about Measurement Error Theory. Acta Metrologica Sinica, 2015, 36(6): 666-670. [14]. Ye Xiao-ming, Liu Hai-bo, Ling Mo, Xiao Xue-bin. The new concepts of measurement error's regularities and effect characteristics, arXiv:1703.08648 13
10math.ST
A Distributional Representation Model For Collaborative Filtering Zhang Junlin,Cai Heng ,Huang Tongwen, Xue Huiping Chanjet.com {zhangjlh,caiheng,huangtw,xuehp}@chanjet.com Abstract In this paper, we propose a very concise deep learning approach for collaborative filtering that jointly models distributional representation for users and items. The proposed framework obtains better performance when compared against current state-of-art algorithms and that made the distributional representation model a promising direction for further research in the collaborative filtering. 1. Introduction Recommender systems are best known for their usage on e-commerce websites. By bringing much more extra profit for the website, better recommendation algorithms have attracted attention both from the industry and the academic community. Collaborative Filtering (CF) is one of the most popular approaches among the recommendation algorithms. It utilizes user feedback to infer relations between users, between items, and ultimately relate users to items they like. On the other side, recent years have witnessed the breakthrough of applying the deep learning algorithms into the object recognition[1][2] and speech recognition[3][4]. The NLP is another filed in which the deep learning is widely used. Inspired by successful application of deep learning in NLP tasks [5][6][7][8][9], especially the distributional representation method, we want to explore the distributional representation of users and items for collaborative filtering. In this paper, we proposed the framework which combines the three-layer neutral network with the distributional representation of the users and items for collaborative filtering. By explicitly encoding the features into vectors, we can explore the complex nonlinearity interdependencies of features through this neutral network. Though seems to be simple, the method has been proved to be effective in recommendation domain by experiment results. The main contributions of this work can be summarized as following: We propose a distributional representation approach for recommender system which, to the best of our knowledge, is the first study to introduce the word embedding concept into collaborative filtering. The experiment results show that it’s a promising direction for further research. Section 2 describes the distributional representation framework for collaborative filtering. In Section 3, we present the experiment results which indicate the proposed method outperforms many commonly used algorithms in this research field. Section 4 presents a brief overview of related work. The Final section is the conclusion of this paper. 2. Distributional Representation Model For Recommendation Output Layer 3.8 Hidden Layer ……… Input Layer ……… Input Features ……… Lookup Table ……… Concatenation User i Item j Fig 1. Neutral network structure of distributional representation model Collaborative Filtering is one of the most popular approaches for building recommendation systems. CF mostly relies on past user’s behavior such as their previous transactions or product ratings (For convenience, we will call the transaction or product as item in the following part of this paper). In order to identify new user-item associations, It analyzes relationships between users and interdependencies among items. Our proposed model explicitly transforms the user and item into vectors which encode the latent features and then it uses the combined vectors as neutral network’s input to explore the complex nonlinearity interdependencies of features. We regard the CF as a regression problem by the proposed model. The figure 1 shows the main structure of this distributional representation model. 2.1 Transforming the user and item into vectors Each user i ∈ 𝐷𝑢𝑠𝑒𝑟 is embedding into a d-dimensional space by checking lookup table 𝐿𝑇𝑊(.) : 𝐿𝑇𝑊(𝑖) = 𝑊𝑖𝑈 Where 𝑊 𝑈 ∈ ℝ𝑑×𝐷 𝑢 is the parameter matrix that needs to be learned through training, 𝑊𝑖𝑈 ∈ ℝ𝑑 is the 𝑖 𝑡ℎ column of 𝑊 𝑈 and d is the vector size defined as hyper-parameter. On the other hand, Each item j ∈ 𝐷𝐼𝑡𝑒𝑚 can also be represented as d-dimensional vector by mapping the lookup table 𝐿𝑇𝑊(.) : 𝐿𝑇𝑊(𝑗) = 𝑊𝑗𝐼 Where 𝑊 𝐼 ∈ ℝ𝑑×𝐷 𝑖𝑡𝑒𝑚 is the parameter matrix and 𝑊𝑗𝐼 ∈ ℝ𝑑 is the 𝑗𝑡ℎ column of 𝑊 𝐼 . When the user i and item j are given as input of the recommendation system to predict the score of item j for user i , we can concatenate the user vector and item vector into a longer vector {𝑊𝑖𝑈 , 𝑊𝑗𝐼 } by applying the lookup-table to each of them. 2.2 Neutral Network Structure Our proposed neutral network has three layers---an input layer, a hidden layer and an output layer. As mentioned above, the input layer is the concatenation vector {𝑊𝑖𝑈 , 𝑊𝑗𝐼 }.The node of hidden layer has a full connection to the nodes in input layer and it transforms the features encoded in the user vector and item vector into real-value number by nonlinearity function. The hyperbolic tangent, or tanh, function is used as nonlinearity function as following: f(z) = tanh(z) = 𝑒 𝑧 −𝑒 −𝑧 𝑒 𝑧 +𝑒 −𝑧 The tanh(z) function is a rescaled version of the sigmoid, and its output range is [ − 1,1] instead of [0,1]. Here z is the linear function of input vector{𝑊𝑖𝑈 , 𝑊𝑗𝐼 } and edge weight parameter 𝑊 𝐿1 which connect the nodes between the input layer and hidden layer. The output of the hidden layer is used as features for a logistic regression classier (the output layer) which will return the probability that means the predicted scores for item j by user i. The sigmoid function is used as the nonlinearity function which scales the output range in [0,1] and the bigger score obviously means more preference. However, the real-life applications always prefer a score in the range [0,k],say k=5. We can rescale the output of the neutral network to the right range just by multiplying result by factor k. 2.3Training We can see from the section 2.2 that the following parameters need to be trained: θ = {𝑊 𝑈 , 𝑊 𝐼 , 𝑊 𝐿1 , 𝑊 𝐿2 } is the edge weight of nodes between the output layer and Here 𝑊 𝐿2 hidden layer. The rating records of users can be used as the training set and the training data takes the form of [𝑈𝑖 , 𝐼𝑗 , y] triplet .Here y is the rating of user 𝑈𝑖 for the item 𝐼𝑗 . The full learning objective takes the following form of the structural risk minimization which tries to minimize the prediction error during the training: 1 𝒥(θ) = ∑𝑛𝑖=1(𝑓̂(θ) − 𝑦)2 + λ‖θ‖ 22 2 Where 𝑓̂(θ) is the predicting function of distributional representation model which sequentially consists of tanh function and sigmoid function. We use standard L2 regularization of all the parameters, weighted by the hyper-parameter λ. General back-propagation is used to train the model by taking derivatives with respect to the four groups of parameters. We use mini-batched L-BFGS for optimization which converges to a local optimum of objective function. 3. Experiment 3.1 Datasets For evaluating our proposed model, we use the MovieLens 1M[10] and EachMovie datasets [11]. MovieLens 1M dataset contains 1000209 ratings of approximately 3900 movies made by 6040 MovieLens user and EachMovie contains 2,811,983 ratings entered by 72,916 user for 1628 different movies. For all the experiments, Ninety percentage of the rating data were randomly chosen for training and the rest 10% were used as the test set . 3.2 Experiment Results RMSE is a commonly used evaluation standard for recommendation system and we use it through all experiments. In order to compare the performance of distributional representation model (DR model) with the state-of-the-art CF algorithms, we use mahout[12] as the test bed. The most commonly used recommendation algorithms such as classical KNN based model ,SlopeOne,ALS,SVD++ and improved KNN based model which was proposed by Koren[] were elaborately tuned to get as good performance as we can. The experiment results are listed in the table 1. The best run of DR Model has the following parameters: both the length of the user vector and item vector are 24 and the number of nodes in hidden layer is 40. These results indicate consistently good performance from our DR model in both datasets and that made the distributional representation model a promising direction for further research in the collaborative filtering. Table 1.RMSE results of MovieLens and EachMovie datasets Model RMSE(MovieLens Dataset) RMSE(EachMovie Dataset) User-Based KNN 1.0476 0.2930 Item-Based KNN 1.0084 0.2618 SlopeOne 0.9370 0.2486 ALS 0.9550 0.2628 SVD++ 0.9495 0.2991 0.9234 0.2564 0.9037 0.2409 Koren’s Item-based KNN DR Model 4. Related Works Many popular CF algorithms have been proposed in recent years. Among them, the improved item-based KNN proposed by Koren[13] and latent factor CF[14] shows great performance advantages. Latent factor CF models explain ratings by characterizing both items and users in terms of factors inferred from the pattern of ratings. One of the most successful realizations of latent factor models is based on matrix factorization[15] such as SVD and SVD++.Our proposed distributional representation model can be categorized into the latent factor CF because it explicitly encodes the latent features of users and items into the word embedding vectors. Compared with the SVD++-like matrix factorization, distributional representation model directly combine the latent factor vectors with the neutral network structure and it can explore the complex nonlinearity interdependencies of features under this framework. As for the neutral network method or deep leaning approach in CF, RBM[16][17] and Wang’s model[18] show different network structures or different optimization target compared with our proposed model. 5. Conclusion We present in this paper a concise distributional representation model for collaborative filtering. To the best of our knowledge, this is the first study on the use of word embedding to the recommendation system. We can conclude from the experiment results that this model outperforms the state-of-the-art algorithms in many cases. That made the distributional representation model a promising direction for further research in collaborative filtering. If we introduce the tensor into the DR model, It’s natural to regard this DR model as a special case of Tensor-based DR model. We will further explore this more general tensor-based deep leaning model in the future work. References [1]Rifai, S., Dauphin, Y., Vincent, P., Bengio, Y., and Muller, X.(2011). The manifold tangent classifier. In NIPS’2011. [2] Krizhevsky, A., Sutskever, I., and Hinton, G. (2012). ImageNetclassification with deep convolutional neural networks. InAdvances in Neural Information Processing Systems 25(NIPS’2012). [3] Dahl, G. E., Yu, D., Deng, L., and Acero, A. (2012). Context dependent pre-trained deep neural networks for large vocabulary speech recognition. IEEE Transactions on Audio, Speech, and Language Processing, 20(1), 33–42. [4] Mohamed, A., Dahl, G., and Hinton, G. (2012). Acoustic modeling using deep belief networks. IEEE Trans. on Audio,Speech and Language Processing, 20(1), 14–22. [5]Ronan Collobert and Jason Weston. 2008. A unified architecture for natural language processing: Deep neural networks with multitask learning. In Proceedings of the 25th international conference onMachine learning, pages 160–167. ACM [6]Ronan Collobert, Jason Weston, ĹeonBottou, MichaelKarlen, KorayKavukcuoglu, and Pavel Kuksa.2011.Natural language processing (almost) from scratch.The Journal of Machine Learning Re-search, 12:2493–2537. [7] J. Turian, L. Ratinov, and Y. Bengio. Word representations: a simple and general method for semi-supervised learning. In Proceedings of ACL, pages 384–394, 2010. [8] Y. Bengio, R. Ducharme, P. Vincent, and C. Janvin.A neural probabilistic language model.J.Mach.Learn. Res., 3, March 2003. [9] E. H. Huang, R. Socher, C. D. Manning, and A. Y. Ng. Improving Word Representations via Global Context and Multiple Word Prototypes. In ACL2012, 2012. [10]MovieLens dataset, http://grouplens.org/datasets/movielens/ [11]EachMovie dataset, http://grouplens.org/datasets/eachmovie/ [12] Apache Mahout. http://mahout.apache.org/ [13] R. Bell and Y. Koren. Scalable collaborative filtering with jointly derived neighborhood interpolation weights. In IEEE International Conference on Data Mining. KDD-Cup07, 2007. [14] Y. Koren. Factorization meets the neighborhood: a multifaceted collaborative filtering model. InKDD '08: Proceeding of the 14th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 426{434, New York, NY, USA, 2008. ACM. [15]Y. Koren, R. Bell and C. Volinsky. Matrix Factorization Techniques for Recommender Systems. IEEE Computer42:8, 30–37, 2009. [16]Ruslan Salakhutdinov, Andriy Mnih, and Geoffrey Hinton. 2007. Restricted boltzmann machines for collaborative filtering. In Proceedings of the 24th international conference on Machine learning, pages791–798.ACM. [17] R. Salakhutdinov and G. E. Hinton.Deep Boltzmann machines.In AISTATS, pages 448–455, 2009. [18]Hao Wang, Naiyan Wang, Dit-Yan Yeung, Collaborative Deep Learning for Recommender Systems.arXiv:1409.2944.2014.
9cs.NE
arXiv:1803.03622v1 [cs.NI] 9 Mar 2018 Virtual Network Embedding Approximations: Leveraging Randomized Rounding Matthias Rost Stefan Schmid TU Berlin, Germany Email: [email protected] University of Vienna, Austria Email: stefan [email protected] Abstract—The Virtual Network Embedding Problem (VNEP) captures the essence of many resource allocation problems of today’s Cloud Providers, which offer their physical computation and networking resources to customers. Customers request resources in the form of Virtual Networks, i.e. as a directed graph, specifying computational requirements at the nodes and bandwidth requirements on the edges. An embedding of a Virtual Network on the shared physical infrastructure is the joint mapping of (virtual) nodes to suitable physical servers together with the mapping of (virtual) edges onto paths in the physical network connecting the respective servers. We study the offline setting of the VNEP in which multiple requests are given and the task is to find the most profitable set of requests to embed while not exceeding the physical resource capacities. This paper initiates the study of approximation algorithms for the VNEP by employing randomized rounding of Linear Programming solutions. We show that the standard Linear Programming formulation exhibits an inherent structural deficit, yielding large (or even infinite) integrality gaps. In turn, focusing on the class of cactus graphs for virtual networks, we devise a novel Linear Programming formulation together with an algorithm to decompose fractional solutions into convex combinations of valid embeddings. Applying randomized rounding, we obtain the first tri-criteria approximation algorithm in the classic resource augmentation model. I. I NTRODUCTION Cloud applications usually consist of multiple distributed components (e.g., virtual machines, containers), which results in substantial communication requirements. If the provider fails to ensure that these communication requirements are met, the performance can suffer dramatically [14]. Consequently, over the last years, several proposals have been made to jointly provision the computational functionality (e.g. virtual machines) together with appropriate network resources. The Virtual Network Embedding Problem captures the core of this problem: given a directed graph specifying computational requirements at the nodes and bandwidth requirements on the edges, this Virtual Network must be embedded in the physical network, such that both the computational and the network requirements are met. Figure 1 illustrates two incarnations of virtual networks: service chains [13] and virtual clusters [2]. In this paper, we study the objective of maximizing the profit by deciding which requests to embed and how to embed the selected requests, such that the capacities of the physical (substrate) network are not violated. We note that our results can also be extended to the objective of minimizing the overall cost of embedding all requests [18]. LB1 Customer LB2 NAT FW Cache Internet VM1 VM5 VM4 VM2 VM3 Fig. 1. Examples for virtual networks ‘in the wild’. The left graph shows a use case of Service Chains for mobile operators [15]. In the particular example load-balancers are used to route (parts) of the traffic through a cache using load-balancers to optimize the user experience. Furthermore, a firewall and a network-address translation are used for security concerns. The right graph depicts the Virtual Cluster abstraction used for provisioning virtual machines in data centers. The abstraction provides connectivity guarantees via a virtualized switch in the center, that each virtual machine connects to [2]. A. Formal Problem Statement In the light of the recent interest in Service Chaining [13], we extend the VNEP’s general definition [9] by considering different types of computational nodes. Accordingly, a physical network GS = (VS , ES ) offering a set T of computational types is considered. This set of types may contain e.g., ‘FW’ (firewall), ‘x86 server’, etc. We refer to the physical network as the substrate network. For a type τ ∈ T , the set VSτ ⊆ VS denotes the substrate nodes that can host functionality of type τ . Denoting the node resources by RSV = {(τ, u) |τ ∈ T , u ∈ VSτ } and all substrate resources by RS = RSV ∪ ES , the capacity of nodes and edges is denoted by dS (x, y) > 0 for (x, y) ∈ RS . The set of request is denoted by R. For each request r ∈ R, a directed graph Gr = (Vr , Er ) is given. We refer to the nodes of these graphs as virtual or request nodes and to the edges as virtual or request edges. Using τr : Vr → T to indicate the virtual node types, the mapping of a virtual node i ∈ Vr is τ (i) restricted to a set VSr,i ⊆ VS r , while the mapping of a virtual edge (i, j) is restricted to ESr,i,j ⊆ ES . Each virtual node i ∈ Vr and each edge (i, j) ∈ Er is attributed with a resource demand dr (i) ≥ 0 and dr (i, j) ≥ 0, respectively. Virtual nodes and edges can only be mapped on substrate nodes and edges of τ (i) sufficient capacity and we have VSr,i ⊆ {u ∈ VS r |dS (u) ≥ r,i,j dr (i)} and ES ⊆ {(u, v) ∈ ES |dS (u, v) ≥ dr (i, j)}. Each request r ∈ R is attributed with a benefit br ∈ R≥0 . We denote by dmax (r, x, y) the maximal demand that a request r may impose on a resource (x, y) ∈ RS : dmax (r, τ, u) = maxi∈Vr :u∈V r,i dr (i) for (τ, u) ∈ RSV and dmax (r, u, v) = S max(i,j)∈Er :(u,v)∈E r,i,j dr (i, j) for (u, v) ∈ ES . S In the following the notions of valid mappings (respecting mapping constraints) and feasible embeddings (respecting resource constraints) are introduced to formalize the VNEP. Definition 1 (Valid Mapping). A valid mapping mr of reV quest r ∈ R is a tuple (mVr , mE r ) of functions mr : Vr → VS E and mr : Er → P(ES ), such that the following holds: • Virtual nodes are mapped to allowed substrate nodes: mVr (i) ∈ VSr,i holds for all i ∈ Vr . E • The mapping mr (i, j) of virtual edge (i, j) ∈ Er is an edge-path connecting mVr (i) to mVr (j) only using r,i,j allowed edges, i.e. mE ) holds. r (i, j) ⊆ P(ES We denote by Mr the set of valid mappings of request r ∈ R. Definition 2 (Allocations of a Valid Mapping). The allocation A(mr , x, y) induced by mapping mr on resource (x, P y) ∈ RS is defined as follows: V A(mr , τ, u) = V (i)=u dr (i) for (τ, u) ∈ RS i∈Vr ,τ (i)=τ,mP r and A(mr , u, v) = dr (i, j) (i,j)∈Er ,(u,v)∈mE r (i,j) for (u, v) ∈ ES . The maximal allocation that a valid mapping of request r ∈ R may impose on a substrate resource (x, y) ∈ RS is denoted by Amax (r, x, y) = maxmkr ∈Mr A(mr , x, y). Definition 3 (Feasible Embedding). A feasible embedding of a subset of requests R0 ⊆ R is a collection of valid mappings {mr0 }r0 ∈R0 with mr0 ∈ Mr0 , such that the cumulative allocations on nodes P and edges does not exceed the substrate capacities, i.e. r∈R0 A(mr , x, y) ≤ dS (x, y) holds for all resources (x, y) ∈ RS . Definition 4 (Virtual Network Embedding Problem). The VNEP asks for a finding a feasible embedding {mP r 0 }r 0 ∈R0 for a subset of requests R0 ⊆ R maximizing the profit r0 ∈R0 br0 . B. Related Work In the last decade, the VNEP has attracted much attention due to its many applications and a survey from 2013 already lists more than 80 different algorithms for its many variations [9]. The VNEP is known to be strongly N Phard and Amaldi et al. have recently shown in [1] that it cannot be approximated within a factor of |VS |1/2−ε for any ε > 0 (unless P = N P holds). Based on the hardness of the VNEP, most works consider heuristics without any performance guarantee [5], [21]. Other works proposed exact methods as integer or constraint programming, coming at the cost of an exponential runtime [16], [19]. Acknowledging the hardness of the general VNEP and the diversity of applications, several subproblems of the VNEP have been studied recently by considering restricted graph classes for the virtual networks and the substrate graph. For example, virtual clusters with uniform demands are studied in [17], [20], line requests are studied in [7], [8], [12] and tree requests were studied in [3], [8]. Considering approximation algorithms, Even et al. employed randomized rounding in [8] to obtain a constant approximation for embedding line requests on arbitrary substrate graphs. The approximation guarantee however comes at the price of strong assumptions on both the benefits and the capacities. In their interesting work, Bansal et al. [3] give an nO(d) time O(d2 log (nd))-approximation algorithm for minimizing the load of embedding d-depth trees based on a strong LP relaxation inspired by the Sherali-Adams hierarchy. To the best of our knowledge, no approximation algorithms are known for arbitrary substrate graphs and classes of virtual networks beyond trees. Lastly, our work is closely related to the unsplittable flow problems (USFP). There exist several approximation results for the USFP (cf. [4], [10], [11]). Similar to the inapproximability result for VNEP, USFP cannot be approximated within a factor of |E|1/2−ε , for any ε > 0, as proven in [10] and Baveja and Srinivasan gave an approximation algorithm matching this bound in [4]. As shown by Guruswami et al. in [10], the USFP can be approximated by randomized rounding to within p a factor of O( |E| log 3/2|E|) with high probability under the assumption that the demands are polynomially bounded. Here, with high probability refers to a success probability of 1−O(1/poly(N )) for a parameter N ∈ N, such that a solution can be found almost certainly by setting N large enough. A preliminary version of this work was published by us as a technical report [18]. In this work, we essentially obtain the same results using a much simpler formulation. Furthermore, in this paper we only focus on approximating the profit variant of the VNEP, while the technical report [18] also details approximations for the cost variant. C. Outline of Randomized Rounding for the VNEP We shortly revisit the concept of randomized rounding. Given an Integer Program (IP) for a certain problem, randomized rounding works by (i) computing a solution to the linear relaxation of the IP, (ii) decomposing this solution into convex combinations of elementary solutions, and (iii) probabilistically choosing any of the elementary solutions based on their weight. Denoting the set of all valid mappings for request r ∈ R by Mr , a convex combination of valid mappings Dr = {(frk , mkr )|mkr ∈ Mr , frk > 0} must be recovered from the Linear Programming solution for each request r ∈ R, such that (i) the profit of these convex combinations equals the profit achieved by the Linear Program and (ii) the convex combinations do not violate substrate capacities. D. Results and Organization This paper initiates the study of approximation algorithms for the VNEP on general substrates and general virtual networks (beyond lines and trees). Specifically, we employ randomized rounding to obtain the first constant factor approximation algorithm for the non-trivial class of cactus graph requests in the resource augmentation model. Studying the classic multi-commodity flow (MCF) formulation for the VNEP in Section II, we show that for tree requests, the linear solutions can be decomposed into convex combinations of valid mappings, hence allowing for the application of randomized rounding. In contrast to the result for tree requests, we show that requests containing cycles can in general not be decomposed into valid mappings. This result has ramifications beyond the inability to apply randomized rounding, as we prove that the MCF formulation exhibits very large or even infinite integrality gaps. Investigating the root cause for this surprising result, we devise a novel Linear Programming formulation, such that convex combinations of valid mappings can be recovered for the class of cactus graph requests (see Section III). Given the ability to decompose the linear programming solutions, we present and analyze the performance of our randomized rounding algorithm in Section IV, obtaining the first approximation algorithm for the Virtual Network Embedding Problem. II. T HE C LASSIC M ULTI -C OMMODITY F ORMULATION FOR THE VNEP AND ITS L IMITS In this section, we study the relaxation of the standard Multi-Commodity Flow (MCF) formulation for solving the VNEP (cf. [5], [13], [19]). We first show the positive result that the formulation is sufficient to decompose virtual networks being trees into convex combinations of valid mappings. Subsequently, we show that the formulation fails to allow for the decomposition of cyclic requests. This not only prohibits the randomized rounding approach but yields an integrality gap of Ω(|VS |) at best. A. The classic Multi-Commodity Formulation Formulation 1 presents the classic MCF formulation for VNEP [5], [13], [19]. We first describe its integer variant, which computes a single valid mapping for each request by using binary variables. The Linear Programming variant is obtained by relaxing the binary variables’ domain to [0, 1]. The variable xr ∈ {0, 1} indicates whether request r ∈ R is u embedded or not. The variable yr,i ∈ {0, 1} indicates whether virtual node i ∈ Vr was mapped on substrate node u ∈ VS . u,v Similarly, the flow variable zr,i,j ∈ {0, 1} indicates whether the substrate edge (u, v) ∈ ES is used to realize the virtual edge (i, j) ∈ Er . The variable ax,y ≥ 0 denotes the cumulative r allocations that the embedding of request r ∈ R induces on resource (x, y) ∈ RS . By Constraint 2, the virtual node i ∈ Vr of request r ∈ R must be placed on any of the suitable substrate nodes in VSr,i iff. xr = 1 holds and Constraint 3 forbids the mapping on nodes which may not host the respective virtual node. Constraint 4 induces an unsplittable unit flow for each virtual edge (i, j) ∈ Er from the substrate location onto which i was mapped to the substrate location onto which j was mapped. By Constraint 5, virtual edges may only be mapped on allowed substrate edges. Constraints 6 and 7 compute the cumulative allocations for nodes and edges respectively and Constraint 8 guarantees that the capacities of the substrate resources are respected. We state the following lemma formalizing the connectivity property enforced by Constraints 4 and 5. Lemma 5 (Local Connectivity Property of Formulation 1). The MCF formulation safeguards the following connectivity property. For any virtual edge (i, j) ∈ Er and any substrate u,v u node u ∈ VSr,i with yr,i > 0, there exists a path Pr,i,j in GS r,j v from u to v ∈ VS with yr,j > 0, such that the flow along any u,v ·,· edge of Pr,i,j with respect to the variables zr,i,j is greater 0. u,v The path Pr,i,j can be computed in polynomial time. P u Proof. First, note that by Constraint 2, u∈VSr,i yr,i = P v v∈VSr,j yr,i holds and hence both virtual nodes i and j must be mapped to an equal extent on suitable substrate nodes. Fix u any substrate node u ∈ VSr,i with yr,i > 0. If j is also partially u mapped on u, i.e. if yr,j > 0 holds, then the result follows directly, as u connects to u using (and allowing) the empty u,u u path Pr,i,j = hi. If, on the other hand, yr,j = 0 holds, then Formulation 1: Classic MCF Formulation for the VNEP X max br x r (1) r∈R X u yr,i = xr ∀r ∈ R, i ∈ Vr (2) u yr,i =0 ∀r ∈ R, i ∈ Vr (3) u∈VSr,i X u∈VS \VSr,i X X u,v zr,i,j − v,u u u zr,i,j = yr,i − yr,j ∀r ∈ R, (i, j) ∈ Er , u ∈ VS (4) (v,u)∈δ − (u) (u,v)∈δ + (u) u,v zr,i,j =0 X ∀r ∈ R, (i, j) ∈ Er , (u, v) ∈ ES \ ESr,i,j (5) u dr (i) · yr,i = aτ,u r ∀r ∈ R, (τ, u) ∈ RSV (6) u,v dr (i, j) · zr,i,j = au,v r ∀r ∈ R, (u, v) ∈ ES (7) ∀(x, y) ∈ RS (8) i∈Vr ,τr (i)=τ X (i,j)∈Er X r∈R ax,y r ≤ dS (x, y) u at u. As the right hand Constraint 4 induces a flow of value yr,i side of Constraint 4 may only attain negative values at nodes v v ∈ VSr,j for which yr,j > 0 holds, the flow emitted at node v u must eventually reach a node v ∈ VSr,j with yr,j > 0 and u,v hence the result follows. The path Pr,i,j can be constructed in polynomial-time by a simple breadth-first search that only u0 ,v 0 considers edges (u0 , v 0 ) for which zr,i,j > 0 holds. B. Decomposing Solutions for Tree Requests Given Lemma 5, we now present Algorithm 1 to decompose solutions to the LP Formulation 1 into convex combinations of valid mappings, if the underlying undirected graph is a tree. Note again that in the LP formulation the binary variables are relaxed to take any value in the interval [0, 1]. Given a virtual network r ∈ R, the algorithm processes all virtual edges according to an acyclic representation GA r = (Vr , ErA , rr ) of the undirected interpretation of Gr being rooted at rr ∈ Vr . As we consider tree requests for now, GA r is an arborescence and can be computed by a simple breadthfirst search of the underlying undirected graph starting at rr . ← − A We denote by E A r = Er \ Er the edges of the request, whose orientations were reversed in the process of computing GA r . Algorithm 1: Decomposition algorithm of MCF solutions for Tree Requests Input : Tree request r ∈ R, solution (xr , ~yr , ~zr , ~ar ) to LP A Formulation 1, acyclic reorientation GA r = (Vr , Er , rr ) k k k Output: Convex combination Dr = {Dr = (fr , mr )}k 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 set Dr ← ∅ and k ← 1 while xr > 0 do set mkr = (mVr , mE r ) ← (∅, ∅) set Q = {rr } u > 0 and set mVr (rr ) ← u choose u ∈ VSr,rr with yr,r r while |Q| > 0 do choose i ∈ Q and set Q ← Q \ {i} foreach (i, j) ∈ ErA do if (i, j) ∈ Er then → − V compute P u,v r,i,j connecting mr (i) = u to r,j v ∈ VS according to Lemma 5 → − u,v set mVr (j) = v and mE r (i.j) = P r,i,j else 0 ,u0 u0 ,v 0 − let ← z vr,i,j , zr,j,i for all (u0 , v 0 ) ∈ ES ← −v,u compute P r,i,j connecting mVr (i) = v to u ∈ VSr,j according to Lemma 5 ← −v,u → − set P u,v r,j,i = reverse( P r,i,j ) → − u,v set mVr (i) = u and mE r (j, i) = P r,j,i 18 19 20 21 22 23 Lemma 6. Given a virtual network request r ∈ R, whose underlying undirected graph is a tree, Algorithm 1 decomposes a solution (xr , ~yr , ~zr , ~ar ) to the LP Formulation 2 into valid mappings Dr = {(mkr , frk )}k , such that the following holds: P k • The decomposition is complete, i.e. xr = k fr holds. • The decomposition’s resource allocations are bounded P k by ~ar , i.e. ax,y ≥ r k fr · A(mr , x, y) holds for each resource (x, y) ∈ RS . set Q ← Q ∪ {j} 17 mV (i) {yr,ir |i ∈ u,v {zr,i,j |(i, j) C. Limits of the Classic MCF Formulation ! Vr } set Vk ← {xr } ∪ ∪ ∈ Er , (u, v) ∈ mE r (i, j)} set frk ← min Vk set v ← v − frk for all v ∈ Vk k k set ax,y ← ax,y r r − fr · A(mr , x, y) for all (x, y) ∈ RS add Drk = (frk , mkr ) to Dr and set k ← k + 1 return Dr The algorithm extracts mappings mkr of value frk iteratively, as long as xr > 0 holds. Initially, in the k-th iteration, none of the virtual nodes and edges are mapped. As xr > 0 holds, by Constraint 2 there must exist a node u ∈ VSr,i u with yr,i > 0 and the algorithm sets mVr (rr ) = u. Given this initial fixing, the algorithm iteratively extracts nodes from the queue Q which have been already mapped and considers all outgoing virtual edges (i, j) ∈ ErA . If an outgoing edge (i, j) is contained in Er , Lemma 5 can be readily applied to obtain a mapping of both the edge (i, j) and the node j. ← − If the edge’s orientation was reversed, i.e. iff. (i, j) ∈ E A r holds, we apply Lemma 5 while reversing the flow’s direc0 0 ,v − tion. Concretely, flow variables ← z ur,j,i (interpreted over the reversed substrate edges) are introduced and Lemma 5 allows ← − us to construct a path P v,u r,i,j in the reversed substrate, such u that v = mVr (i) and yr,j > 0 holds. By reversing the path ← − P v,u = h(w , w ), (w n n−1 n−1 , wn−2 ), . . . , (w2 , w1 )i, the path r,i,j → − u,v P r,j,i = h(w1 , w2 ), (w2 , w3 ), . . . , (wn−1 , wn )i is obtained, → − such that P u,v r,j,i correctly connects the (now mapped) node mVr (j) to mVr (i) according to the original edge’s orientation. Note that the mapping of each virtual node and each virtual edge is valid by construction. Furthermore, as Gr is an arborescence, each edge and each node of Gr will eventually be mapped and hence mkr is a valid mapping. The mapping value frk is computed as the minimum of the mapping variables Vk used for constructing mkr . Reducing the values of the mapping variables together with the allocation variables ~ar , the Constraints 2-7 continue to hold. As the decomposition process continues as long as xr > 0 holds and in the k-th step at least one variable’s value is set to 0, it is easy to check that (i) the algorithm terminates with P a complete decomposition for which Drk ∈Dr frk = xr holds and (ii) the algorithm has polynomial runtime, as the number of variables for request r is bounded by O(|Er | · |ES |). Lastly, by the above observations, we note the following lemma relating the MCF solution (xr , ~yr , ~zr , ~ar ) to the decomposition Dr computed by Algorithm 1. Lemma 6 has shown constructively that the relaxations of the classic MCF formulation can be decomposed into convex combinations of valid mappings, if the underlying graph is a tree. We now show that this is not the case anymore, if virtual networks contain cycles. Theorem 7. Fractional solutions to the standard multicommodity flow formulation can in general not be decomposed Request Gr LP Solution u1 i k Substrate GS j 0.5i Partial Decomposition 0.5i u6 u2 0.5k 0.5j 0.5j u5 u3 0.5j 0.5k 0.5k u4 0.5i 0.5i Fig. 2. Example showing that linear relaxations of Integer Program 1 are in general not decomposable into convex combinations of valid mappings. Request r is a simple cyclic graph which shall be mapped on the substrate graph GS . We assume that VSr,i = {u1 , u4 }, VSr,j = {u2 , u5 }, VSr,k = {u3 , u6 } holds. The LP solution with xr = 1 is depicted as follows. Substrate nodes are annotated with the mapping of virtual nodes. Hence, 0.5i at node u1 u1 indicates yr,i = 1/2, i.e. that virtual node i is mapped with 0.5 on substrate node u1 . Substrate edges are dashed according to the dash style of the virtual links mapped onto it. Virtual links are also mapped using flow values 1/2. The dash style of substrate edge (u1 , u2 ) therefore implies that u1 ,u2 = 1/2 holds. zr,i,j into convex combinations of valid mappings, if the virtual networks contain cycles. Proof. In Figure 2 we visually depict an example of a solution to the LP Formulation 1 from which not a single valid mapping can be extracted. The validity of the depicted solution follows from the fact that the virtual node mappings sum to 1 and each virtual node connects to its neighboring node with half a unit of flow. Assume for the sake of contradiction that the depicted solution can be decomposed. As virtual node i ∈ Vr is mapped onto substrate node u1 ∈ VS , and u2 ∈ VS ·,· is the only neighboring node w.r.t. zr,i,j that hosts j ∈ Vr , E V there must exist a mapping (mr , mr ) with mVr (i) = u1 and mVr (j) = u2 . Similarly, mVr (k) = u3 must hold. However, the flow of virtual edge (k, i) ∈ Er leaving u3 ∈ VS only leads to u4 ∈ VS , and hence the virtual node i ∈ Vr must be mapped both on u1 and u4 . As this is not possible, and the same argument holds when considering the mapping of i onto u4 , no valid mapping can be extracted. The non-decomposability of the solutions also yields an high or unbounded integrality gap, as is proven below. Theorem 8. The integrality gap of the MCF formulation is unbounded when considering edge mapping restrictions. This even holds if the capacities of the substrate are infinite. Proof. We again consider the example of Figure 2. We introduce the following restrictions for mapping the virtual links: ESr,i,j = {(u1 , u2 ), (u4 , u5 )}, ESr,j,k = {(u2 , u3 ), (u5 , u6 )}, ESr,k,i = {(u3 , u4 ), (u6 , u1 )}. Note that the LP solution depicted in Figure 2 is still feasible and hence the LP will attain an objective of br . On the other hand, there does not exist a valid mapping of request r and the optimal solution achieves a profit of 0. Hence, the integrality gap is unbounded. Theorem 9. The integrality gap of the MCF formulation lies in Ω(|VS |), when only considering node mapping restrictions. Proof. Consider the following instance. The substrate is a cycle of an even number of n nodes ui , with 1 ≤ i ≤ n and edges {(u1 , u2 ), (u2 , u3 ), . . . , (un , u1 )}. We consider unit edge capacities, i.e. we set dS (e) = 1 for e ∈ ES . Consider now a request r with Vr = {i, j} and edges Er {(i, j), (j, i)} and unit bandwidth demands dr (i, j) = dr (j, i) = 1. Assume that i can only be mapped on substrate nodes having an uneven index and that j can only be mapped on substrate nodes of even index. Clearly, any valid mapping of this request will use all edge resources. Consider now the following MCF solution with xr = 1: nodes i and j are, together with the respective edges, mapped in an alternating fashion: u v yr,i = yr,j = 2/n holds for all u ∈ VSr,i = {u1 , u3 , . . . } and r,j e0 e = zr,j,i = 2/n all v ∈ VS = {u2 , u4 , . . . }. Similarly, zr,i,j is set for all edges e and e0 originating at uneven and even nodes, respectively. This mapping induces allocations of 2/n on each edge. Hence, n/2 ∈ Θ(|VS |) many copies of this request may be embedded in the MCF solution, while the optimal solution may only embed a single request and the integrality gap therefore lies in Ω(|VS |). III. D ECOMPOSABLE LP F ORMULATION While the MCF formulation suffices to compute decomposable solutions for tree requests (cf. Lemma 6), we now consider requests that may contain cycles. Concretely, from now on, we consider virtual networks whose undirected interpretation is a cactus graph, such that any two (undirected) cycles intersect in at most a single virtual node. A. Partitioning Cactus Requests Let r ∈ R be a request whose underlying undirected interpretation of Gr is a cactus graph. Consider any acyclic A reorientation GA r = (Vr , Er , rr ) of Gr rooted at rr ∈ Vr . The following can be easily seen. Lemma 10. Any graph GA r of a cactus request Gr can be uniquely partitioned into a set of ‘cyclic’ subgraphs Cr = k {C1 , . . . , Cn } with corresponding graphs GA,C and a forest r A,F Fr of corresponding graph Gr . 1) Each edge (i, j) ∈ ErA is contained in exactly one of the graphs of Cr or in GA,F . r 2) The edge set ErA,Ck of each cycle Ck ∈ Cr can itself be partitioned into two branches B1Ck and B2Ck , such that A,Ck k and end at both branches start at the node sC r ∈ Vr Ck A,Ck . the node tr ∈ Vr k Note that GA,C and GrA,F are subgraphs of GA r r and may contain edges whose orientation have been reversed w.r.t. the F k original edge set Er . We denote by GC r and Gr the respective subgraphs that agree with Er on the edge orientation. To illustrate this partitioning, we consider the partition of the request of Figure 2 with ErA = {(i, j), (j, k), (i, k)}. The k = GA partition consists of a single cyclic subgraph GA,C r , 1 C1 C1 1 with sC = i and t = k. Furthermore, note that G = G r r r r holds. To shorten notation, we denote the potential mapping Ck k locations of the target tC of cycle Ck ∈ Cr by VS,t , i.e. we r Ck Ck set VS,t = VSr,tr . B. Novel LP Formulation for Cactus Requests GA r Our novel Formulation 2 uses the a priori partition of (cf. Lemma 10) into a set of cycles Cr and the forest Fr to construct partial embedding formulations for the respective subgraphs: for each request r and each corresponding forest Fr the MCF formulation is employed to compute mappings of the subgraph GF r (cf. Constraint 10). We refer to the associated variables of this sub-LP by xr [Fr ], ~yr [Fr ], etc. Similarly, for each request r ∈ R, each cycle Ck ∈ Cr , and each potential k target node for the mapping of tC a sub-LP of the MCF r formulation is constructed (cf. Constraint 11). Again, we use square brackets to reference the specifc cycle and target node a variable belongs to. To bind together these (at first) independent formulations for the mappings of the respective subgraphs, we reuse the variables ~x, ~y , and ~a introduced already for the MCF formulation. We refer to these variables, which are defined outside of the sub-LP formulations, as global variables and mark them as such by not using square brackets. Note that all variables used in the LP formulation are continuous. Binding together the different sub-formulations for mapping the subgraphs is done as follows. Similar to Constraint 2 of Formulation 1, we employ Constraint 12 to enforce the setting of the (global) node mapping variables. By Constraints 13 and 14, the node mappings of the sub-LPs for mapping the subgraphs must agree with the global node mapping variables. Ck As there exist |VS,t | many copies for the embedding of the k cyclic subgraph GC r , the sum of the node mappings of these formulations must agree with the global one. Constraint 15 is of crucial importance for the decomposability: considering the Ck sub-LP for cycle Ck and target node w ∈ VS,t , it enforces that Ck the target node tr of the cycle Ck may only be mapped on w. Lastly, the allocation variables are computed as follows: (i) for the node mappings the global node mapping variables are considered (cf. Constraint 6 of IP 1) and (ii) the global edge allocations are set to be the sum of the edge allocations of the sub-LP formulations. C. Decomposing Solutions to the Novel LP Formulation We now show how to adapt the decomposition algorithm for tree requests (cf. Algorithm 1) to also enable the decomposition of cactus requests. First, note that for the construction of the LP an (arbitrary) acyclic interpretation GA r was used for each of the requests. To decompose the request, exactly the same graph GA r needs to be handed over to the decomposition algorithm. Second, as the LP formulation does not contain (global) edge mapping variables, the edge mapping variables used in Lines 10 and 13 of Algorithm 1 must be substituted by edge mapping variables of the respective sub-LP formulations. Concretely, as each edge of the request Gr is covered exactly once, it is clear whether a virtual edge (i, j) ∈ Er is part of Ck F GF r or a cyclic subgraph Gr . If (i, j) ∈ Gr holds, then the ·,· edge mapping variables zr,i,j [Fr ] are used. If on the other hand k the edge (i, j) ∈ Er is covered in the cyclic subgraph GC r , Ck then there exist |VS,t | many sub-LPs to choose the respective edge mapping variables from. To ensure the decomposability, we proceed as follows. C • If the edge (i, j) ∈ Er is the first edge of Gr k to be mapped in the k-th iteration, we employ the mapping ·,· variables zr,i,j [Ck , w] belonging to an arbitrary target mV (i) • node w for which yr,ir [Ck , w] > 0 holds. Such a subLP must exist by Constraint 14. If another edge (i0 , j 0 ) of the same cycle was already mapped in the k-th iteration and the commodity [Ck , w] Formulation 2: Decomposable Formulation for Cactus Requests X max br x r (9) r∈R (2) - (7) for GF yr , ~zr , ~ar )[Fr ] for r ∈ R r over variables (xr , ~ k GC r (2) - (7) for over variables (xr , ~yr , ~zr , ~ar )[Ck , w] for r ∈ R, Ck ∈ Cr , w ∈ X u yr,i = xr ∀r ∈ R, i ∈ Vr (10) Ck VS,t (11) (12) u∈VSr,i ∀r ∈ R, i ∈ VrF , u ∈ VSr,i u u yr,i = yr,i [F] X u u yr,i = yr,i [Ck , w] ∀r ∈ R, i ∈ Vr , Ck ∈ Cr : i ∈ (13) VrCk , u ∈ VSr,i (14) C w∈tr k yu C r,tr k Ck Ck , u ∈ VS,t \ {w} (15) ∀r ∈ R, Ck ∈ Cr , w ∈ VS,t [Ck , w]= 0 aτ,u r = X u dr (i) · yr,i ∀r ∈ R, (τ, u) ∈ RSV (16) ∀r ∈ R, (u, v) ∈ ES (17) ∀(x, y) ∈ RS (18) i∈Vr ,τr (i)=τ u,v au,v r = ar [F] + X au,v r [Ck , w] C Ck ∈Cr ,w∈VS,tk X r∈R ax,y r ≤ dS (x, y) was chosen, the variables of the same commodity are employed. With the above minor additions valid mappings for cactus requests can indeed be recovered. By construction of the algorithm, all edge mappings will be valid as these are extracted from valid sub-LPs. Hence, we only need to check that the mapping of nodes agrees with previous node mappings. Considering GA r , only the virtual target nodes of cycles Cr are mapped more than once. As the mapping decisions for the target node of cycles is anticipated by deciding once which sub-LPs variables to consider, the branches of any cycle will always lead to the same substrate node. Lastly, we note that the steps taken in Lines 18 - 21 of Algorithm 1 must be slightly adapted to also decrement the sub-LP variables and that Lemma 6 still holds with respect to the obtained decompositions for cactus requests and we state the following without proof. Theorem 11. Given a solution (xr , ~yr , ~zr , ~ar ) to the novel LP Formulation 2 for a cactus request r, the solution can be decomposed into a convex combination of valid mappings Dr ={Drk = (mkr , frk )}k in polynomial-time, s.t. the following holds: P k • The decomposition is complete, i.e. xr = k fr holds. • The decomposition’s resource allocations are bounded P k by ~ar , i.e. ax,y ≥ r k fr · A(mr , x, y) holds for each resource (x, y) ∈ RS . IV. A PPROXIMATION VIA R ANDOMIZED ROUNDING Above we have shown how optimal convex combinations for the VNEP can be computed for cactus requests. We turn now to the approximation algorithm for the VNEP whose pseudo-code for the profit is presented as Algorithm 2. The algorithm first performs preprocessing in Lines 1-3 by removing all requests which cannot be fully (fractionally) embedded in the absence of other requests. As these requests cannot be fully embedded, the respective requests can never be part of any feasible solution and can hence be removed. In Lines 4-8 the randomized rounding scheme is applied: an LP solution to the Formulation 2 is computed, decomposed and then rounded. The rounding procedure is iterated as long as the constructed solution is not of sufficient quality or until the number of maximal rounding tries is exceeded. Concretely, we seek (α, β, γ)-approximate solutions which achieve at least a factor of α < 1 times the optimal (LP) profit and exceed node and edge capacities by at most factors of β ≥ 1 and γ ≥ 1, respectively. In the following we discuss the parameters α, β, and γ for which solutions can be found with high probability. Note that Algorithm 2 is indeed a polynomial-time algorithm, as the novel LP formulation is at most |VS | times larger than the MCF formulation and can hence be solved in polynomial-time by e.g. the Ellipsoid algorithm. Furthermore, both the decomposition and constructing a solution using rounding can be performed in polynomial-time. A. Probabilistic Guarantee for the Profit For bounding the profit achieved by the randomized rounding scheme, we recast the profit achieved in terms of random variables. The discrete random variable Yr ∈ {0, br } models the profit achieved by (potentially) embedding request r ∈ R. The probability that any request P r ∈ R is embedded and the profit br is obtained, equals f k . Accordingly, P Drk ∈Dr k r we have P(Yr = 0) = 1 − DP fr and the profit k r ∈Dr achieved overall hence equals B = r∈R Yr with E(B) = P P k . As the decomposition is complete (cf. b · f k r∈R r Dr ∈Dr r Lemma 6), we have that BLP = E(B), where BLP denotes the profit of an optimal LP solution. To bound the probability of achieving a fraction of the profit of the optimal solution, we make use of the Chernoff-Bound over continuous random variables. Pn Theorem 12 (Chernoff-Bound [6]). Let X = i=1 Xi be a sum of n independent random variables Xi ∈ [0, 1], 1 ≤ i ≤ n. Then P X ≤ (1 − ε) · E(X) ≤ exp(−ε2 · E(X)/2) holds for 0 < ε < 1. By preprocessing the requests and removing all requests, which cannot be embedded in the absence of the other requests, we know that the LP will attain at least the maximal profit over all requests. Lemma 13. E(B) = BLP ≥ maxr∈R br . Acknowledging that the objective value of the linear program is an upper bound for the objective of any integral embedding and applying the Chernoff-Bound we obtain the following. Algorithm 2: Randomized Rounding Algorithm for the VNEP 1 2 3 4 5 6 7 8 foreach r ∈ R do // preprocess requests compute LP solution to Formulation 2 for the request set {r} maximizing xr remove request r from the set R if xr < 1 holds P compute LP solution to Formulation 2 for request set R maximizing r∈R br · xr decompose LP solution into convex combinations Dr = {Drk = (frk , mkr )}k for all r ∈ R do // perform randomized rounding construct solution by choosing mapping mkr with probability frk for all r ∈ R while the solution is not (α, β, γ)-approximate and maximal rounding tries are not exceeded; Theorem 14. The probability of achieving less than 1/3 of the profit of an optimal solution is upper bounded by exp(−2/9) ≈ 0.8007. Proof. Let b̂ = maxr∈R br denote the maximum benefit of the requests. We consider the random variables Yr0 = Yr /b̂, P 0 0 0 such that Yr ∈ [0, 1] holds. Let B = r∈R Yr denote the total profit achieved after scaling down the profits. As E(B) = BLP ≥ b̂ holds (cf. Lemma 13), we have E(B 0 ) ≥ 1. Choosing ε = 2/3 and applying Theorem 12 on B 0 we obtain P B 0 ≤ (1/3) · E(B 0 ) ≤ exp(−2 · E(B 0 )/9). Plugging in the minimal value of E(B 0), i.e., 1, into the equation we obtain: P B 0 ≤ (1/3) ·E(B 0 ) ≤ exp(−2/9) and accordingly P B ≤ (1/3) · E(B) ≤ exp(−2/9). As mentioned before we have E(B) = BLP . Denoting the optimal profit of the integer program, i.e. an optimal solution, by BIP and observing that BIP ≤ BLP holds as the IP’s solution is contained in the solution space of the LP, we have BIP /3 ≤ BLP/3 = E(B)/3. Accordingly, we obtain P B ≤ (1/3) · BIP ≤ P B ≤ (1/3) · E(B)/3 ≤ exp(−2/9) , completing the proof. B. Probabilistic Guarantees for Capacities In the following, we analyze the probability that a randomly rounded solution violates substrate capacities by a certain factor. We employ Hoeffding’s Inequality: Theorem 15 (Hoeffding’s Inequality [6]). Let {Xi }i be indeP pendent random variables, s.t. Xi ∈ [ai , bi ], then P i Xi −   P P E( i Xi ) ≥ t ≤ exp − 2t2 /( i (bi − ai )2 ) holds. As VSr,i and ESr,i,j contain only substrate elements that can actually support the mapping of virtual node i ∈ Vr and virtual edge (i, j) ∈ Er in terms of resources, respectively, we have: Lemma 16. dmax (r, x, y) ≤ dS (x, y) ∀(x, y) ∈ RS We model the allocation on resource (x, y) ∈ RS for request r ∈ R as random variable Ar,x,y ∈ [0, Amax (r, x, y)]. We = 0) = 1 − have = A(r, x, y)) = frk and P(Ar,x,y P P P(Ar,x,y k . Furthermore, we denote by A = f x,y Drk ∈Dr r r∈R Ar,x,y the random variable describing the overall allocations on resource (x, y) ∈ RSPafter P rounding a solution. k As E(Ax,y ) = r∈R Drk ∈Dr fr · A(r, x, y) holds by definition and using Theorem 11 we obtain that E(Ax,y ) ≤ dS (x, y) holds for all resources (x, y) ∈ RS . Using the above, we can apply Hoeffding’s Inequality to bound the node and edge resource violations. Lemma 17. Consider a node resource (τ, u) ∈ RSV . Choose 0 < ε ≤ 1, such that for P dmax (r, τ, u)/dS (τ, u) ≤ ε holds 2 r ∈ R. Let ∆ = (A (r, τ, u)/d (r, τ, u)) and V max max r∈R p β = 1+ε· 2 · ∆V · log(|V S | · |T |). Then the following holds:  P Aτ,u ≥ β · dS (τ, u) ≤(|VS | · |T |)−4 . p Proof. We choose t = ε · 2 · ∆V · log(|VS | · |T |) · dS (τ, u) and apply Hoeffding:   P Aτ,u − E(Aτ,u ) ≥ t −4 · ε2 · log(|VS | · |T |) · ∆V · d2S (τ, u) P ≤ exp 2 r∈R (Amax (r, τ, u)) ! −4 · ε2 · log(|VS | · |T |) · ∆V · d2S (τ, u) ≤ exp P 2 r∈R (ε · dS (τ, u) · Amax (r, τ, u)/dmax (r, τ, u)) ! −4 · ε2 · log(|VS | · |T |) · ∆V · d2S (τ, u) ≤ exp ε2 · d2S (τ, u) · ∆V ! = (|VS | · |T |)−4 For the second inequality Amax (r, τ, u) ≤ ε · dS (τ, u) · Amax (r, τ, u)/dmax (r, τ, u) was used, which follows from dmax (r, τ, u) ≤ ε · dS (τ, u). In the next step we factored out ε2 ·d2S (τ, u) in the denominator and plugged in the definition of ∆V . Lastly, we utilize that the expected load E(Aτ,u ) is upper bounded by the resource’s capacity dS(τ, u) to obtain the  lemma’s statement: P Aτ,u ≥β·dS (τ, u) ≤(|VS |·|T |)−4 . It should be noted that if network functions are unique within a request, then ∆V equals the number of requests |R|, since in this case Amax (r, τ, u) = dmax (r, τ, u) holds. If all the virtual nodes share the same type and may all bePmapped on the same substrate nodes, then ∆V is bounded by r∈R |Vr |2 . For edge resource violations, essentially the same result can be obtained: Lemma 18. We consider a single edge (u, v) ∈ ES . Choose 0 < ε ≤ 1, such that dmax P(r, u, v)/dS (u, v) ≤ ε holds for2 all r ∈ R. Let ∆p E = r∈R (Amax (r, u, v)/dmax (r, u, v)) and γ = 1 + ε · 2 · ∆E · log |VS |. The probability that the capacity of a p (u, v) ∈ ES is exceeded by more than a factor γ = (1 + ε · 2 · ∆E · log |VS |) is bounded by |VS |−4 . C. Main Result By applying a union bound, the joint probability to either not achieve enough profit (less than an α = 1/3 fraction), or to violate any resource’s capacity by more than a factor β (nodes) or γ (edges), can be bounded by 19/20. Hence, the probability to not return a solution within N ∈ N rounds is bounded by (19/20)N and we obtain the following theorem. Theorem 19. Assume |VS | ≥ 3. Let 0 < ε ≤ 1 be chosen minimally, such that dmax (r, x, y)/dS (x, y) ≤ ε holds for (x, y) ∈ RS and r ∈ R. Algorithm 2 is a (α, β, γ) approximation algorithm for the VNEP, such that it finds a solution with high probabiliy of at least an α = 1/3 fraction of the optimal profit, and cumulative allocations within factors of β (nodes) q and γ (edges) of the original capacities, for β = 1 + ε · 2 · ∆(RSV ) · log(|VS | · |T |) and γ = 1 + ε · p 2 · ∆(ES ) · log |VS | with ∆ : P(RS ) → R≥0 being defined 2  P max (r,x,y) as ∆(X) = max(x,y)∈X r∈R A . dmax (r,x,y) Proof. We apply a union bound argument. First, note that β and γ are defined using the function ∆, such that the maximum is taken over all ∆V and ∆E values occurring in Lemmas 17 and 18. Accordingly, the probability that the cumulative allocations on any node resource (τ, u) ∈ RSV are larger than β · dS (τ, u) is less than (|VS | · |T |)−4 (cf. Lemma 17). Given that there are maximally |VS | · |T | many network resources overall, the probability that any of these exceeds the capacity by a factor above β is less than (|VS | · |T |)−3 ≤ |VS |−3 . Similarly, by Lemma 18 the probability that the cumulative allocations on any edge (u, v) ∈ ES surpass γ · dS (u, v) is less than |VS |−4 . As there are at most |VS |2 edges, the probability that the allocations on any of the edges exceeds γ·dS (u, v) is upper bounded by |VS |−2 . Lastly, by Theorem 14 the probability of not finding a solution having an α-fraction of the optimal objective is less or equal to exp(−2/9) ≈ 0.8007. The probability to not find a suitable solution, satisfying the objective and the capacity criteria, within a single round is therefore upper bounded by exp(−2/9)−1/9−1/27 ≤ 19/20, if |VS | ≥ 3 holds. The probability to find a suitable solution within N ∈ N many rounds is hence lower bounded by 1−(19/20)N for |VS | ≥ 3 and hence the randomized rounding scheme yields a solution with high probability. The ∆(RSV ) Pand ∆(ES ) are bounded by P factors 2 O( r∈R |Vr | ) and O( r∈R |Er |2 ), respectively. Letting κ ∈ N denote the maximal size of any request contained in R, we obtain ∆V , ∆E ∈ O(κ2 · |R|). Under the realistic assumption that the number of considered types is constant, i.e. if |VSτ | ∈po(1) holds, we obtain resource violation bounds O(1 +  · κ · log |VS | · |R|) for β and γ, respectively. Hence, we obtain the following corollary. Corollary 20. Let κ denote the maximal size of any request graph. Under the assumption that the number of node τ types is constant, i.e. that |V pS | ∈ o(1) holds, and that dS (x, y)/dmax (r, x, y) ∈ Ω( log |VS | · |R|) holds for all resources (x, y) ∈ RS and each request r ∈ R, randomized rounding yields a (1/3, O(1+κ), O(1+κ)) approximation for VNEP with high probability. Assuming furthermore, that the maximal size of any virtual network request is bounded by a constant, i.e. that κ ∈ o(1) holds, randomized rounding yields a constant approximation (w.r.t. the profit and the resource violations) with high probability. V. C ONCLUSION This paper has initiated the study of approximation algorithms for the Virtual Network Embedding Problem supporting arbitrary substrate graphs and supporting virtual networks containing cycles. To obtain the approximation we have extended the classic multi-commodity formulation, which can surprisingly not be decomposed into convex combinations, to enable the decomposability of cactus requests. While our novel Linear Programming formulation relies on the cactus nature of the requests, the analysis of the performance of the randomized rounding scheme is independent of how the convex combinations are computed. Hence, we hope to extend the presented LP formulation and the corresponding decomposition algorithm to obtain approximations for even larger graph classes in the future. Acknowledgements. This work was partially supported by Aalborg University’s PreLytics project as well as by the German BMBF Software Campus grant 01IS1205. The authors would like to thank Elias Döhne and Alexander Elvers for proof-reading parts of the paper and contributing significantly to the implementation found at https: //vnep-approx.github.io/. R EFERENCES [1] Edoardo Amaldi, Stefano Coniglio, Arie MCA Koster, and Martin Tieves. On the computational complexity of the virtual network embedding problem. Electronic Notes in Discrete Mathematics, 52:213– 220, 2016. [2] Hitesh Ballani, Paolo Costa, Thomas Karagiannis, and Ant Rowstron. Towards predictable datacenter networks. In ACM SIGCOMM Computer Communication Review, volume 41, pages 242–253. ACM, 2011. [3] Nikhil Bansal, Kang-Won Lee, Viswanath Nagarajan, and Murtaza Zafer. Minimum congestion mapping in a cloud. In Proc. ACM PODC, 2011. [4] Alok Baveja and Aravind Srinivasan. Approximation algorithms for disjoint paths and related routing and packing problems. Mathematics of Operations Research, 25(2):255–280, 2000. [5] N. Chowdhury, M.R. Rahman, and R. Boutaba. Virtual network embedding with coordinated node and link mapping. In Proc. IEEE INFOCOM, 2009. [6] Devdatt P Dubhashi and Alessandro Panconesi. Concentration of measure for the analysis of randomized algorithms. Cambridge University Press, 2009. [7] Guy Even, Moti Medina, and Boaz Patt-Shamir. Online path computation and function placement in sdns. In Proc. International Symposium on Stabilization, Safety, and Security of Distributed Systems (SSS), 2016. [8] Guy Even, Matthias Rost, and Stefan Schmid. An approximation algorithm for path computation and function placement in sdns. In Proc. SIROCCO, 2016. [9] A. Fischer, J.F. Botero, M. Till Beck, H. de Meer, and X. Hesselbach. Virtual network embedding: A survey. Comm. Surveys Tutorials, IEEE, 15(4), 2013. [10] Venkatesan Guruswami, Sanjeev Khanna, Rajmohan Rajaraman, Bruce Shepherd, and Mihalis Yannakakis. Near-optimal hardness results and approximation algorithms for edge-disjoint paths and related problems. Journal of Computer and System Sciences, 67(3):473–496, 2003. [11] Jon M. Kleinberg. Decision algorithms for unsplittable flow and the half-disjoint paths problem. In Proc. 30th Annual ACM Symposium on Theory of Computing (STOC), pages 530–539, 1998. [12] Tamas Lukovszki and Stefan Schmid. Online admission control and embedding of service chains. In Proc. 22nd International Colloquium on Structural Information and Communication Complexity (SIROCCO), 2015. [13] Sevil Mehraghdam, Matthias Keller, and Holger Karl. Specifying and placing chains of virtual network functions. In Proc. 3rd IEEE CloudNet, October 2014. [14] Jeffrey C. Mogul and Lucian Popa. What we talk about when we talk about cloud network performance. ACM SIGCOMM CCR, 42(5), 2012. [15] J. Napper, W. Haeffner, M. Stiemerling, D. R. Lopez, and J. Uttaro. Service Function Chaining Use Cases in Mobile Networks. Internet-draft, April 2016. URL: https://tools.ietf.org/html/ draft-ietf-sfc-use-case-mobility-06. [16] R. Hartert et al. A declarative and expressive approach to control forwarding paths in carrier-grade networks. In SIGCOMM, 2015. [17] Matthias Rost, Carlo Fuerst, and Stefan Schmid. Beyond the stars: Revisiting virtual cluster embeddings. In Proc. ACM SIGCOMM Computer Communication Review (CCR), 2015. [18] Matthias Rost and Stefan Schmid. Service chain and virtual network embeddings: Approximations using randomized rounding. CoRR, abs/1604.02180, 2016. URL: http://arxiv.org/abs/1604.02180. [19] Matthias Rost, Stefan Schmid, and Anja Feldmann. It’s About Time: On Optimal Virtual Network Embeddings under Temporal Flexibilities. In Proc. IEEE IPDPS, pages 17–26, 2014. [20] Di Xie, Ning Ding, Y Charlie Hu, and Ramana Kompella. The only constant is change: incorporating time-varying network reservations in data centers. Proc. ACM SIGCOMM, 2012. [21] Minlan Yu, Yung Yi, Jennifer Rexford, and Mung Chiang. Rethinking virtual network embedding: Substrate support for path splitting and migration. SIGCOMM Comput. Commun. Rev., 38(2):17–29, 2008.
8cs.DS
THE SQUARING OPERATION FOR COMMUTATIVE DG RINGS arXiv:1412.4229v4 [math.KT] 24 Oct 2015 AMNON YEKUTIELI Abstract. Let A → B be a homomorphism of commutative rings. The squaring operation is a functor SqB/A from the derived category D(B) of complexes of B-modules into itself. This operation is needed for the definition of rigid complexes (in the sense of Van den Bergh), that in turn leads to a new approach to Grothendieck duality for rings, schemes and even DM stacks. In our paper with J.J. Zhang from 2008 we introduced the squaring operation, and explored some of its properties. Unfortunately some of the proofs in that paper had severe gaps in them. In the present paper we reproduce the construction of the squaring operation. This is done in a more general context than in the first paper: here we consider a homomorphism A → B of commutative DG rings. Our first main result is that the square SqB/A (M ) of a DG B-module M is independent of the resolutions used to present it. Our second main result is on the trace functoriality of the squaring operation. We give precise statements and complete correct proofs. In a subsequent paper we will reproduce the remaining parts of the 2008 paper that require fixing. This will allow us to proceed with the other papers, mentioned in the bibliography, on the rigid approach to Grothendieck duality. The proofs of the main results require a substantial amount of foundational work on commutative and noncommutative DG rings, including a study of semi-free DG rings, their lifting properties, and their homotopies. This part of the paper could be of independent interest. Contents 0. Introduction 1. Some Facts on DG Rings and Modules 2. Resolutions of DG Modules 3. Central Pairs of DG Rings and their Resolutions 4. DG Ring Homotopies 5. Pairs of DG Modules, Compound Resolutions, and Rectangles 6. The Rectangle Operation 7. The Squaring Operation References 1 7 12 16 23 26 32 38 43 0. Introduction 0.1. Background: Rigid Dualizing Complexes. The concept of rigid dualizing complex was introduced by M. Van den Bergh in his influential paper [VdB] from 1997. This was done for a noncommutative ring A over a base field K. Let us recall Date: 24 October 2015. Key words and phrases. DG rings, DG modules, derived categories, derived functors, resolutions. Mathematics Subject Classification 2010. Primary: 16E45. Secondary: 16E35, 18G10, 13D03, 18E30. Supported by the Israel Science Foundation grant no. 253/13. 1 2 AMNON YEKUTIELI the definition; but to simplify matters (and because here we are interested in the commutative situation), we shall state it for a commutative ring A. So let K be a field and A a commutative K-ring. We denote by D(A) the derived category of A-modules. Given a complex M ∈ D(A), its square is the complex (0.1.1) SqA/K (M ) := RHomA⊗K A (A, M ⊗K M ) ∈ D(A). The A-module structure on SqA/K (M ) comes from the first argument of RHom. Note that if M is a single module, then  Hq SqA/K (M ) = HHq (A, M ⊗K M ), the q-th Hochschild cohomology of the A-bimodule M ⊗K M . Now assume A is finitely generated over K (and hence it is noetherian). A rigid dualizing complex over A relative to K is a pair (R, ρ), where R ∈ D(A) is a dualizing complex (in the sense of [RD]), and (0.1.2) ' ρ:R− → SqA/K (R) is an isomorphism in D(A). Van den Bergh proved that a rigid dualizing complex (R, ρ) exists, and it is unique up to isomorphism. Further work in this direction was done by J.J. Zhang and the author in a series of papers; see [YZ1] and its references. (These papers dealt with the noncommutative situation, which is significantly more complicated.) In the current paper we are interested in commutative rings, but in a relative situation: instead of a base field K, we have a homomorphism A → B of commutative rings, and we want to produce a useful theory of squaring and rigidity. If the homomorphism A → B is flat, then there is a pretty easy way to generalize (0.1.1), as follows. Given a complex M ∈ D(B), we may define (0.1.3) SqB/A (M ) := RHomB⊗A B (B, M ⊗LA M ) ∈ D(B). However, when A → B is not flat, formula (0.1.3) is meaningless, since there is no way to interpret M ⊗LA M as an object of D(B ⊗A B) ! In our paper with Zhang [YZ2], we proposed to solve the flatness problem by replacing the ring B with a flat DG ring resolution B̃ → B over A. Further work on rigid dualizing complexes over commutative rings was done in the paper [YZ3], and more is outlined in the survey paper [Ye1]. There is work in progress ([Ye6] and [Ye7]) about rigid dualizing on schemes and Deligne-Mumford stacks. Indeed, the rigid approach to Grothendieck duality allows, for the first time, to state and prove global duality for a proper map between DM stacks. The ideas are outlined in the lecture notes [Ye3]. Unfortunately, there were serious flaws in the proofs in [YZ2], as explained in Subsection 0.5 of the Introduction. The discovery of these flaws forced us to go back and repair the foundations. Thus, in the present paper we provide a comprehensive and correct treatment of the squaring operation, using the DG ring method. The companion paper [Ye5] is destined to repair further problems in [YZ2], and to enhance the results of [YZ3]. Once the repairs to the foundations are done, we intend to proceed with the geometric application of rigid dualizing complexes (namely the papers in progress [Ye6] and [Ye7]). L 0.2. DG Rings and their Resolutions. Let A = i∈Z Ai be a DG ring, where as usual “DG” is short for “differential graded”. (Most other texts would call A a unital associative DG algebra over Z; see Remark 1.4 for a discussion of nomenclature.) We say that A is nonpositive if Ai = 0 for i > 0. The DG ring A is called strongly commutative if a · b = (−1)ij · b · a for a ∈ Ai and b ∈ Aj , and a · a = 0 if i is odd. We THE SQUARING OPERATION 3 call A a commutative DG ring if it is both nonpositive and strongly commutative. This is the term appearing in the title of the paper. We denote by DGR≤0 sc the category of commutative DG rings. Observe that the category of commutative rings is a full subcategory of DGR≤0 sc , since a ring can be seen as a DG ring concentrated in degree 0. All DG rings appearing in the Introduction are commutative (with the exception of Subsections 0.4 and 0.5). However, in the paper itself we must deal with noncommutative DG rings, as explained in Subsection 0.4. Even though our motivation is the squaring operation for commutative rings, we develop the squaring operation more generally for commutative DG rings, and this is the way we shall present the results in the Introduction. The reason is twofold: first, there is no added difficulty in working with commutative DG rings (as compared to commutative rings); and second, the presentation is cleaner when working totally in the commutative DG framework. u Let A − → B be a homomorphism of commutative DG rings, i.e. a morphism in u DGR≤0 → B as a pair of commutative DG rings, with notation sc . We refer to A − u0 B/A. These pairs form a category: given another pair B 0 /A0 = (A0 −→ B 0 ), a morphism of pairs w/v : B 0 /A0 → B/A is a commutative diagram A0 (0.2.1) u0 / B0 u  /B w v  A ≤0 in DGR≤0 sc . The resulting category is denoted by PDGRsc . ≤0 Consider a pair B/A in PDGRsc . A K-flat resolution of B/A is a morphism s/r : B̃/à → B/A in PDGR≤0 sc , such that B̃ is K-flat as a DG Ã-module, r : à → A is a quasi-isomorphism, and s : B̃ → B is a surjective quasi-isomorphism. (See Section 2 for a review of various kinds of DG module resolutions, including K-flat ones.) K-flat (0.2.2) qu-isom à ũ / B̃ s r  A surj qu-isom u  /B Let w/v : B 0 /A0 → B/A be a morphism in PDGR≤0 sc . A K-flat resolution of w/v is a commutative diagram (0.2.3) B̃ 0 /Ã0 w̃/ṽ s0 /r 0  B 0 /A0 / B̃/à s/r w/v  / B/A 0 0 in PDGR≤0 sc , where the vertical arrows s/r and s /r are K-flat resolutions. We also say that w̃/ṽ is a morphism of resolutions above w/v. In case B 0 /A0 = B/A, and w/v is the identity automorphism of this pair, we say that w̃/ṽ is a morphism of resolutions of B/A. According to Proposition 7.2, K-flat resolutions of pairs, and of morphisms between pairs, exist. 4 AMNON YEKUTIELI u v Let A − → B − → C be homomorphisms in DGR≤0 sc . We refer to this data as a triple of commutative DG rings. A K-flat resolution of this triple is a commutative diagram à (0.2.4) ũ / B̃ u  /B r  A ṽ / C̃ v  /C s t in DGR≤0 sc , such that B̃/à is a K-flat resolution of the pair B/A, and C̃/à is a K-flat resolution of the pair C/A. The first triple above can be viewed as a morphism of pairs v/idA : B/A → C/A; and ṽ/idà : B̃/à → C̃/à can be viewed as a K-flat resolution of v/idA . Such resolutions exist by Proposition 7.9. 0.3. The Squaring Operation. Recall that our DG rings are all commutative. To a DG ring A we associate the category of DG A-modules M(A), and its derived category D(A). There is an additive functor Q : M(A) → D(A), which is the identity on objects, and which sends quasi-isomorphisms to isomorphisms. In Sections 1 and 2 we recall some facts about DG modules, their resolutions, and related derived functors. u Let A − → B be a homomorphism of DG rings, namely an object B/A of PDGR≤0 sc . Given a DG B-module M , and a K-flat resolution B̃/à of B/A, we let (0.3.1) B̃/à SqB/A (M ) := RHomB̃⊗à B̃ (B, M ⊗Là M ) ∈ D(B). In Proposition 5.15 and Definition 7.3 we provide an explicit presentation of B̃/à SqB/A (M ), in terms of compound resolutions. See Remark 7.5 regarding symmetric compound resolutions. Consider a morphism of pairs w/v : B 0 /A0 → B/A, a DG module M ∈ D(B), a DG module M 0 ∈ D(B 0 ), and a morphism θ : M → M 0 in D(B 0 ). Clarification: actually θ is a morphism Forw (M ) → M 0 , where Forw : D(B) → D(B 0 ) is the forgetful functor (restriction of scalars) corresponding to the DG ring homomorphism w : B 0 → B. However, most of the time we shall suppress these forgetful functors, for the sake of clarity. Given a K-flat resolution w̃/ṽ : B̃ 0 /Ã0 → B̃/à of w/v, there is a morphism (0.3.2) w̃/ṽ B̃ 0 /Ã0 B̃/à Sqw/v (θ) : SqB/A (M ) → SqB 0 /A0 (M 0 ) w̃/ṽ in D(B 0 ). The morphism Sqw/v (θ) is constructed using compound resolutions – see Proposition 5.16 and Definition 7.4. This construction is functorial in all arguments. By this we mean that if w0 /v 0 : B 00 /A00 → B 0 /A0 is another morphism in PDGR≤0 sc , with K-flat resolution w̃0 /ṽ 0 : B̃ 00 /Ã00 → B̃ 0 /Ã0 , and if θ0 : M 0 → M 00 is a morphism in D(B 00 ), then (w̃/ṽ)◦(w̃0 /ṽ 0 ) w̃0 /ṽ 0 w̃/ṽ Sq(w/v)◦(w0 /v0 ) (θ0 ◦ θ) = Sqw0 /v0 (θ0 ) ◦ Sqw/v (θ), as morphisms B̃/à B̃ 00 /Ã00 SqB/A (M ) → SqB 00 /A00 (M 00 ) in D(B 00 ). See Proposition 5.17. Here is the key technical result of our paper. It is repeated as Theorem 7.6 in the body of the paper, and proved there. A brief discussion of the proof can be found in Subsection 0.4 of the Introduction. THE SQUARING OPERATION 5 Theorem 0.3.3 (Homotopy Invariance). Let w/v : B 0 /A0 → B/A be a morphism 0 0 0 in PDGR≤0 sc , let M ∈ D(B), let M ∈ D(B ), and let θ : M → M be a mor0 0 0 phism in D(B ). Suppose B̃/à and B̃ /à are K-flat resolutions of B/A and B 0 /A0 respectively in PDGR≤0 sc , and w̃0 /ṽ0 , w̃1 /ṽ1 : B̃ 0 /Ã0 → B̃/à are morphisms of resolutions above w/v. Then the morphisms w̃ /ṽ w̃ /ṽ B̃ 0 /Ã0 B̃/à 0 0 1 1 Sqw/v (θ), Sqw/v (θ) : SqB/A (M ) → SqB 0 /A0 (M 0 ) in D(B 0 ) are equal. Here is the first main theorem of our paper. Theorem 0.3.4 (Existence of Squares). Let A → B be a homomorphism of commutative DG rings, and let M be a DG B-module. There is a DG B-module SqB/A (M ), unique up to a unique isomorphism in D(B), together with an isomorphism ' B̃/à sqB̃/à : SqB/A (M ) − → SqB/A (M ) in D(B) for any K-flat resolution B̃/à of B/A, satisfying the following condition. (∗) For any morphism w̃/ṽ : B̃ 0 /Ã0 → B̃/à of resolutions of B/A, the diagram SqB/A (M ) sqB̃ sqB̃/à 0 /Ã0  ( B̃/à SqB/A (M ) w̃/ṽ Sqid/id (idM ) / SqB̃ /à (M ) B/A 0 0 of isomorphisms in D(B) is commutative. The DG module SqB/A (M ) is called the square of M over B relative to A. This theorem is repeated as Theorem 7.7 in the body of the paper. As we already mentioned, this assertion (for rings only, not DG rings) appeared as [YZ2, Theorem 2.2]; but the proof there had a large gap in it. For a discussion, and a comparison to [AILN, Theorem 3.2], see Subsection 0.5 below. Here is the second main theorem of the paper. v Theorem 0.3.5 (Trace Functoriality). Let A → B − → C be homomorphisms of commutative DG rings, let M ∈ D(B), let N ∈ D(C), and let θ : N → M be a morphism in D(B). There is a unique morphism Sqv/idA (θ) : SqC/A (N ) → SqB/A (M ) in D(B), satisfying the condition: ṽ v (∗∗) For any K-flat resolution à → B̃ − → C̃ of the triple A → B − → C, the diagram SqC/A (N ) Sqv/id (θ) sqC̃/à / SqB/A (M ) sqB̃/à  C̃/à SqC/A (N ) in D(B) is commutative. ṽ/id Sqv/id (θ)  / SqB̃/à (M ) B/A 6 AMNON YEKUTIELI This theorem is repeated as Theorem 7.10. The statement already appeared as [YZ2, Theorem 2.3] (for rings only, not DG rings). But the proof in loc. cit. was also incorrect. B̃/à The known functoriality of the operation SqB/A (from Section 5) now implies that the assignments M 7→ SqB/A (M ) and θ 7→ SqidB /idA (θ) are a functor SqB/A : D(B) → D(B), called the squaring operation over B relative to A. The functor SqB/A is not linear; in fact it is a quadratic functor, in the following sense. Given a morphism θ : N → M in D(B) and an element b ∈ H0 (B), we have SqB/A (b · θ) = b2 · SqB/A (θ), as morphisms SqB/A (N ) → SqB/A (M ) in D(B). See Theorem 7.16 for a slightly more general statement. 0.4. On the Proofs. Theorems 0.3.4 and 0.3.5 are rather easy to prove, once we know Theorem 0.3.3 (and the existence of resolutions). However, the proof of Theorem 0.3.3 is quite long and difficult. As its name suggests, it involves a homotopy between the homomorphisms w̃0 , w̃1 : B̃ 0 → B̃. The only way we know to produce a homotopy w̃0 ⇒ w̃1 is when the DG ring B̃ 0 is noncommutative semi-free over Ã0 , and there is equality ṽ0 = ṽ1 . See Definition 4.1 and Theorem 4.3. We are thus forced to deal with noncommutative DG rings. Instead of the pairs of commutative DG rings that were discussed above, the relevant noncommutative object is a central pair of DG rings, namely a central homomorphism u : A → B with commutative source A. See Definitions 1.6 and 3.6. Let B/A be a central pair of DG rings. A K-flat resolution of it is a central pair of DG rings B̃/Ã, such that B̃ is a K-flat DG Ã-module, together with a quasiisomorphism B̃/à → B/A as in diagram (0.2.2). Now B is a DG bimodule over B̃, namely it is a DG module over the enveloping DG ring B̃ ⊗à B̃ op . Because of this, we must replace the single DG module M by a pair (M l , M r ), consisting of a left DG B-module M l and a right DG B-module M r . In this situation, instead of a “square” we have a “rectangle”: (0.4.1) B̃/à RectB/A (M l , M r ) := RHomB̃⊗à B̃ op (B, M l ⊗Là M r ). This object lives in the derived category D(B ce ), where B ce is the center of B (in the graded sense, see Definition 1.6). In the noncommutative situation, the Homotopy Theorem (the noncommutative version of Theorem 0.3.3) is Theorem 6.11. It is proved in two stages. First, an important special case (B̃ 0 /Ã0 is noncommutative semi-free and ṽ0 = ṽ1 ) is done in Lemma 6.7. The proof of this lemma relies on Theorem 4.3, and uses the cylinder DG ring. The general case is then reduced to that special case. Theorem 6.15 (Existence of Rectangles) is the noncommutative version of Theorem 0.3.4. The rectangle operation is interesting on its own, even when B/A is a commutative pair of rings. This is due to its connection with the monoidal operation ⊗! . See Remark 6.16. 0.5. Discussion of Related Papers. Early versions of Theorems 0.3.4 and 0.3.5 had already appeared in our paper [YZ2] with Zhang, as Theorems 2.2 and 2.3 respectively. However, to our great embarrassment, the proofs of these results in [YZ2] had severe gaps in them. The h gapsi are well-hidden in the text; but one clear error is this: the homomorphism φ0 0 0 φ1 in the middle of page 3225 (in the proof of Theorem 2.2) does not make any sense (unless φ0 = φ1 ). In order to give a THE SQUARING OPERATION 7 correct treatment, it is necessary to work with noncommutative semi-free DG ring resolutions, as explained in Subsection 0.4 above. The mistake in the proof of [YZ2, Theorem 2.2] was discovered by Avramov, Iyengar, Lipman and Nayak [AILN]. They also found a way to fix it, and their [AILN, Theorem 3.2] is a generalization of our [YZ2, Theorem 2.2]. Indeed, [AILN, Theorem 3.2] establishes the rectangle operation in the case when A → B is a central pair of rings. The proof of [AILN, Theorem 3.2] relies on the Quillen model structure on the category DGR /ce A of noncommutative DG rings, central over a commutative base ring A, following [BP]. More on this aspect can be found in Remark 4.6. Note that our Theorem 6.11 (the noncommutative version of Theorem 0.3.4) is stronger than [AILN, Theorem 3.2], because we allow A → B be a central pair of nonpositive DG rings. Our goals are different from those of [AILN], and hence we adopt a different strategy. For us the relative situation of a homomorphism of commutative rings A → B is crucial, and we must consider triples of commutative rings A → B → C. For this reason we stick to commutative K-flat DG ring resolutions, relying on Theorem 0.3.3. We do not know whether the methods of [AILN] can be adapted to yield the trace functoriality of the squaring operation (Theorem 0.3.5). Acknowledgments. I wish to thank James Zhang, Bernhard Keller, Vladimir Hinich, Liran Shaul, Rishi Vyas, Asaf Yekutieli and Sharon Hollander for their help in writing this paper. 1. Some Facts on DG Rings and Modules In this section we review some known facts about DG rings and modules. We talk about central homomorphisms of DG rings. Finally, we introduce the cylinder construction for DG rings and modules. L A differential graded ring, or DG ring for short, is a graded ring A = i∈Z Ai , together with an additive endomorphism dA of degree 1 called the differential. The differential dA satisfies dA ◦ dA = 0, and it is a graded derivation of A, namely it satisfies the graded Leibniz rule (1.1) dA (a · b) = dA (a) · b + (−1)i · a · dA (b) for a ∈ Ai and b ∈ Aj . (Most other texts would call such A an associative unital DG algebra.) Definition 1.2. We denote by DGR the category of all DG rings, where the morphisms are the graded ring homomorphisms u : A → B that commute with the differentials. We consider rings as DG rings concentrated in degree 0. Thus the category of rings becomes a full subcategory of DGR. Definition 1.3. Let A be a DG ring. A DG ring over A, or a DG A-ring, is a pair (B, u), where B is a DG ring and u : A → B is a DG ring homomorphism. Suppose (B, u) and (B 0 , u0 ) are DG rings over A. A homomorphism of DG rings over A, or a DG A-ring homomorphism, is a homomorphism of DG rings v : B → B 0 such that u0 = v ◦ u. We denote by DGR /A the category of DG rings over A. Thus DGR /A is the usual “coslice category”, except that we say “over” instead of “under”. See Remark 1.28 regarding the direction of arrows. There is an obvious forgetful functor DGR /A → DGR. A morphism v in DGR /A is shown in this 8 AMNON YEKUTIELI commutative diagram: BO u / B0 > v u0 A Remark 1.4. We should probably justify the use of “DG ring”, instead of the traditional “DG algebra”. We maintain that more generally, whenever we have a homomorphism A → B in the category of rings, then B ought to be called an A-ring. Below is an explanation. Consider a commutative base ring K. Given a ring homomorphism K → A such that the target A is commutative, we simply say that “A is a commutative K-ring”. In the noncommutative context things are more delicate. When one says that “A is a K-algebra” (associative and unital), the meaning is that the ring homomorphism K → A is central; namely the image of K is in the center of A. We suggest instead to use “A is a central K-ring”. In the DG context, one says that “A is a DG K-algebra” (again associative and unital) if the image of K lies inside the subring of degree 0 central cocycles of A. We propose to use “central DG K-ring” instead, as in Definition 1.6 below. Notice that the name “ring” allows us to drop the adjectives “associative” and “unital”; and it also separates DG rings from DG Lie algebras etc. In the present paper we actually need to consider DG ring homomorphisms u : A → B, where the source A is a genuine DG ring, and in some cases it is even noncommutative. Thus u(A) is sometimes not in the center of B, nor in the subring of cocycles, and we can’t say that “B is a DG A-algebra”. But we can, and do, say that “B is a DG A-ring”. The homomorphism u might be central nonetheless, as in Definition 1.6. Consider a graded ring A. For homogeneous elements a ∈ Ai and b ∈ Aj we define the graded commutator to be (1.5) ad(a)(b) := a · b − (−1)ij · b · a. This extends to all a, b ∈ A using bilinearity. Namely, if a = with ak ∈ Aik and bl ∈ Ajl , then X ad(a)(b) := ad(ak )(bl ). P k ak and b = P l bl , k,l Often the notation [a, b] is used for the graded commutator. Definition 1.6. Let A be a DG ring. (1) The center of A is the DG subring Ace := {a ∈ A | ad(a)(b) = 0 for all b ∈ A}. (2) The DG ring A is called weakly commutative if Ace = A. In other words, if a · b = (−1)ij · b · a for all a ∈ Ai and b ∈ Aj . (3) A homomorphism u : A → B in DGR is called central if u(Ace ) ⊆ B ce . In this case, the resulting DG ring homomorphism Ace → B ce is denoted by uce . (4) We denote by DGR /ce A to be the the full subcategory of DGR /A consisting of pairs (B, u) such that u : A → B is central. THE SQUARING OPERATION 9 Implicit in item (1) of the definition above is the (easy to check) fact that Ace is indeed a DG subring of A. The DG ring Ace itself is weakly commutative. As for item (4): a morphism v : B → B 0 in the category DGR /ce A is not required to be u u0 central; the centrality condition is only on A − → B and A −→ B 0 . If u : A → B and v : B → C are central homomorphisms in DGR, then v ◦ u : A → C is also central. Thus we get a subcategory DGRce ~ of DGR, consisting of all objects, but only the central homomorphisms. Letting DGRwc be the full subcategory of DGR on the weakly commutative DG rings, we get a functor (−)ce : DGRce ~ → DGRwc . LetL A be a DG ring. Recall that a left DG A-module is a left graded A-module M = i∈Z M i , with differential dM of degree 1, that satisfies dM ◦ dM = 0 and the graded Leibniz rule (equation (1.1), but with m ∈ M j instead of b). Right DG A-modules are defined similarly. By default all DG modules in this paper are left DG modules. Let A be a DG ring, let M and N be left DG A-modules, and let φ : M → N be a degree k additive (i.e. Z-linear) homomorphism. We say that φ is A-linear if φ(a · m) = (−1)ik · a · φ(m) (1.7) for all a ∈ Ai and m ∈ M j . (This is the sign convention of [ML].) The abelian group of A-linear homomorphisms of degree k is denoted by HomA (M, N )k , and we let M (1.8) HomA (M, N ) := HomA (M, N )k . k∈Z The graded abelian group HomA (M, N ) has a differential d given by d(φ) := dN ◦ φ − (−1)k · φ ◦ dM (1.9) for φ ∈ HomA (M, N )k . In particular, for N = M we get a DG ring EndA (M ) := HomA (M, M ). (1.10) Suppose A is a DG ring and M a DG abelian group (i.e. a DG Z-module). From (1.7) we see that a DG A-module structure on M is the same as a DG ring homomorphism A → EndZ (M ). If M is a right DG A-module and N is a left DG A-module, then the usual tensor product M ⊗A N is a graded abelian group: M M ⊗A N = (M ⊗A N )k , k∈Z k where (M ⊗A N ) is the subgroup generated by the tensors m⊗n such that m ∈ M i and n ∈ N k−i . The graded abelian group M ⊗A N has a differential d satisfying (1.11) d(m ⊗ n) := dM (m) ⊗ n + (−1)i · m ⊗ dN (n) for m, n as above. Let A and B be DG rings. The tensor product A ⊗Z B is a DG ring, with multiplication (1.12) (a1 ⊗ b1 ) · (a2 ⊗ b2 ) := (−1)i2 j1 · (a1 · a2 ) ⊗ (b1 · b2 ) for ak ∈ Aik and bk ∈ B jk , and with differential like in (1.11). Let B be a DG ring. Its opposite DG ring B op is the same DG abelian group, but we denote its elements by bop , b ∈ B. The multiplication in B op is op j1 j2 · (b2 · b1 )op bop 1 · b2 := (−1) for bk ∈ B jk . Note that the centers satisfy (B op )ce = (B ce )op , and B op = B iff B is weakly commutative. 10 AMNON YEKUTIELI If M is a right DG B-module, then it can be seen as a left DG B op -module, with action bop · m := (−1)kj · m · b for b ∈ B j and m ∈ M k . Because of this observation, working only with left DG modules is not a limitation. We shall switch between notations according to convenience. Now consider a DG A-B-bimodule M , namely M has a left A action and a right B action, and they commute, i.e. a · (m · b) = (a · m) · b. Then M can be viewed as a left A ⊗Z B op -module with action (a ⊗ bop ) · m := (−1)kj · a · m · b (1.13) for a ∈ Ai , b ∈ B j and m ∈ M k . Thus a DG A-B-bimodule structure on a DG abelian group M is the same as a homomorphism of DG rings A ⊗Z B op → EndZ (M ). Let A be a weakly commutative DG ring. Any B ∈ DGR /ce A is a DG Abimodule. If B, C ∈ DGR /ce A, then the DG A-module B ⊗A C has an obvious DG ring structure, and moreover B ⊗A C ∈ DGR /ce A. Given a DG B-module M and and a DG C-module N , the tensor product M ⊗A N is a DG module over B ⊗A C, with action (b ⊗ c) · (m ⊗ n) := (−1)ij · (b · m) ⊗ (c · n) for c ∈ C i and m ∈ M j . Definition 1.14. Let A be a DG ring. We denote by DGMod A the category of left DG A-modules, where the morphisms are the A-linear homomorphisms φ : M → N of degree 0 that commute with the differentials. Since the name is too long, we mostly use the abbreviation M(A) := DGMod A. The category M(A) is abelian. The set M(A) also has a DG category structure on it, in which the set of morphisms M → N is the DG abelian group HomA (M, N ). The relation between these structures is  (1.15) HomM(A) (M, N ) = Z0 HomA (M, N ) , the group ofL 0-cocycles. Let M = i∈Z M i be a graded abelian group. Recall that the shift (or twist, or L translation, or suspension) of M is the graded abelian group T(M ) = i∈Z T(M )i defined as follows. The graded component of degree i of T(M ) is T(M )i := M i+1 . Note that as (ungraded) abelian groups we have T(M ) = M , but the gradings are different. Thus the identity automorphism of M becomes a degree −1 invertible homomorphism of graded abelian groups t : M → T(M ). We shall usually represent elements of T(M )i as t(m), with m ∈ M i+1 . If M is a DG A-module, then T(M ) has the following structure of DG A-module. The differential dT(M ) is (1.16) dT(M ) (t(m)) := − t(dM (m)) = t(−dM (m)) for m ∈ M k . The action of A is (1.17) a · t(m) := (−1)i · t(a · m) = t((−1)i · a · m) for a ∈ Ai . If M is a DG right module, or a DG bimodule, then the structure of T(M ) is determined by (1.16), (1.17) and (1.13). Concretely, a · t(m) · b = (−1)i · t(a · m · b) THE SQUARING OPERATION 11 for a ∈ Ai , m ∈ M k and b ∈ Aj . Note that our sign conventions for the shift are such that the canonical bijection T(Z) ⊗Z M → T(M ), t(c) ⊗ m 7→ t(c · m) = c · t(m), for c ∈ Z and m ∈ M , is an isomorphism of DG A-bimodules. For any k ∈ Z, the k-th power of T is denoted by Tk . There is a corresponding degree −k homomorphism of graded abelian groups (1.18) tk : M → Tk (M ), which is the identity on the underlying ungraded abelian group. Note that Tl (Tk (M )) = Tk+l (M ), and Tk is an automorphism of the category M(A). As usual, we write M [k] := Tk (M ). We now recall the cone construction, as it looks using the operator t. Let A be a DG ring, and let φ : M → N be a homomorphism in M(A). The cone of φ is the DG A-module Cone(φ)  := N ⊕ M [1], whose differential, when we express this module as the column MN[1] , is left multiplication by the matrix of degree 1 i h −1 abelian group homomorphisms d0N φ◦t dM [1] . We learned the concept of cylinder DG ring, defined below, from B. Keller. It appears (without this name) in his [Ke2]. Consider the matrix DG ring   n  o Z Z[−1] a0 b · ξ (1.19) Cyl(Z) := = a0 , a1 , b ∈ Z , 0 Z 0 a1 where the element ξ := t−1 (1) ∈ Z[−1] has degree 1. The multiplication is    0    a0 b · ξ a b0 · ξ a0 · a00 (a0 · b0 + b · a01 ) · ξ (1.20) · 0 := 0 a1 0 a01 0 a1 · a01   where a00 , a01 , b0 ∈ Z. The differential is dcyl := ad( 00 0ξ ), the graded commutator   with the element 00 0ξ . Explicitly we have     a b·ξ 0 (−a0 + a1 ) · ξ (1.21) dcyl ( 0 )= . 0 a1 0 0  ηi There are DG ring homomorphisms Z → − Cyl(Z) −→ Z, for i = 0, 1, with formulas     a 0 a0 b · ξ (1.22) (a) := and ηi ( ) := ai . 0 a 0 a1 It is easy to see that  and ηi are quasi-isomorphisms, and ηi ◦  = idZ , the identity automorphism of Z. Definition 1.23. Let A be a DG ring. The cylinder of A is the DG ring   A A[−1] ∼ Cyl(A) := Cyl(Z) ⊗Z A = , 0 A with multiplication induced from (1.20), and differential induced from (1.21), using formulas (1.12) and (1.11).   It will be convenient to denote elements of Cyl(A) as matrices a00 ξa·0b , rather than as tensors. Note that the element ξ is central and has degree 1, so b · ξ = (−1)k · ξ · b for b ∈ Ak . Proposition 1.24. Let A be a DG ring. Consider the induced DG ring homomorηi  phisms A → − Cyl(A) −→ A. (1) The homomorphisms  and ηi are DG ring quasi-isomorphisms. (2) The homomorphisms  and ηi are central, and moreover the induced homomorphisms ce : Ace → − Cyl(A)ce and ηice : Cyl(A)ce → Ace are bijective. 12 AMNON YEKUTIELI Proof. Since Cyl(Z) is a free graded Z-module (via , and forgetting the differential), these are direct consequences of the corresponding assertions for Z; and those are clear.  Definition 1.25. Let A be a DG ring and M a DG A-module. The cylinder of M is the DG Cyl(A)-module   ∼ M M [−1] , Cyl(M ) := Cyl(Z) ⊗Z M ∼ = Cyl(A) ⊗A M = 0 M with multiplication induced from (1.20), and differential induced from (1.21). The definition above relates also to right DG modules and to bimodules, as explained in (1.13). Proposition 1.26. Let A be a DG ring and let M be a DG A-module. The induced DG module homomorphisms  : M → Cyl(M ) and ηi : Cyl(M ) → M are quasiisomorphisms. When considering the homomorphism  : M → Cyl(M ), we view Cyl(M ) as a DG A-module via the DG ring homomorphism  : A → Cyl(A). Likewise, when considering the homomorphism ηi : Cyl(M ) → M , we view M as a DG Cyl(A)module via the DG ring homomorphism ηi : Cyl(A) → A. Proof. As in Proposition 1.24(1), this is immediate from the fact that  : Z → Cyl(Z) and ηi : Cyl(Z) → Z are quasi-isomorphisms.  The cylinder operation (on DG rings and modules) has the following functoriality. If u : A → B is a DG ring homomorphism, then there is an induced DG ring homomorphism Cyl(u) : Cyl(A) → Cyl(B), Cyl(u) := idCyl(Z) ⊗ u. Explicitly the formula is     a ξ·b u(a0 ) ξ · u(b) (1.27) Cyl(u)( 0 )= . 0 a1 0 u(a1 ) Likewise for modules. Remark 1.28. In the abstract categorical sense, the DG ring Cyl(A) plays a role dual to that of a cylinder; so perhaps we should have called it “the path object of A”. Indeed, this is precisely the path object described on page 503 of [ScSh]. We decided to adhere to the name “cylinder” for two reasons. First, this is the name used in [YZ2]. The second reason is that we are dealing with rings here, and so (as happens in algebraic geometry) arrows tend to be reversed. The same reversal occurs in Definition 1.3: we talk about “DG rings over A”, rather than about “DG rings under A”, as the categorical convention would dictate. 2. Resolutions of DG Modules Let A be a DG ring. We already mentioned that M(A) = DGMod A is a DG category, equipped with a translation automorphism T. The homotopy category of DGMod A is K̃(DGMod A), where by definition  (2.1) HomK̃(DGMod A) (M, N ) := H0 HomA (M, N ) . This is a triangulated category. The derived category D̃(DGMod A) is gotten from K̃(DGMod A) by inverting the quasi-isomorphisms. The localization functor (identity on objects) is (2.2) Q : DGMod A → D̃(DGMod A). If A is a ring, i.e. A = A0 , with module category Mod A, then DGMod A = C(Mod A), K̃(DGMod A) = K(Mod A) and D̃(DGMod A) = D(Mod A). Here are THE SQUARING OPERATION 13 some references for the derived category of DG modules: [BL, Section 10], [Ke1, Section 2], and [SP, Section 09KV]. Another reference is our course notes [Ye4], but there (in Sections 4 and 9) the DG category C(M), associated to an abelian category M, should be replaced by the DG category DGMod A. Definition 2.3. We shall use the following abbreviations for the triangulated categories related to a DG ring A: K(A) := K̃(DGMod A) and D(A) := D̃(DGMod A). Let us recall a few facts about resolutions of DG A-modules. A DG module N is called acyclic if H(N ) = 0. A DG A-module P (resp. I) is called K-projective (resp. K-injective) if for any acyclic DG A-module N , the DG Z-module HomA (P, N ) (resp. HomA (N, I)) is also acyclic. The DG module P is called K-flat if for every acyclic DG Aop -module N , the Z-module N ⊗A P is acyclic. As in the “classical” situation, K-projective implies K-flat. These definitions were introduced in [Sp]. In [Ke1, Section 3] it is shown that “K-projective” is the same as “having property (P)”, and “K-injective” is the same as “having property (I)”. Every M ∈ M(A) admits K-projective resolutions P → M and K-injective resolutions M → I. See also [BL], [BN], [AFH] and [SP, Chapter 09JD]. (Semi-free DG modules will be discussed in Section 3.) Recall that a diagram φ0 $ M :N φ1 in M(A) is called commutative up to homotopy if the homomorphisms φ0 and φ1 are homotopic. Or in other words, if the corresponding diagram in K(A) is commutative. The next proposition is essentially a standard fact. We state it here because it will play a key role, especially in Section 5. Proposition 2.4. Let P, I ∈ M(A). Assume either P is K-projective or I is Kinjective. (1) The additive homomorphism Q : HomM(A) (P, I) → HomD(A) (P, I) is surjective, and its kernel is the group B0 (HomA (P, I)) of null-homotopic homomorphisms. (2) Let ψ : P → I be a morphism in D(A). There exists a homomorphism φ : P → I in M(A), unique up to homotopy, such that Q(φ) = ψ. (3) Let φ0 , φ1 : P → I be homomorphisms in M(A). The homomorphisms φ0 and φ1 are homotopic iff Q(φ0 ) = Q(φ1 ) in D(A). In other words, item (2) says that given a morphism ψ in D(A), as in the first diagram below, there exists a homomorphism φ in M(A) making that diagram commutative; and such φ is unique up to homotopy. Item (3) says that the second diagram below, in M(A), is commutative up to homotopy, iff the third diagram below, in D(A), is commutative. ψ # ;I P Q(φ) Q(φ0 ) φ0 ! =I P φ1 ! P Q(φ1 ) =I 14 AMNON YEKUTIELI Proof. (1) According to [Sp, Propositions 1.4 and 1.5], the additive homomorphism HomK(A) (P, I) = H0 (HomA (P, I)) → HomD(A) (P, I) is bijective. Note that in [Sp] A is a ring; but the definitions and proofs pass without change to the case of a DG ring.  (2, 3) These are immediate from (1). A DG ring homomorphism u : A → B induces the forgetful (or restriction of scalars) functor Foru : M(B) → M(A), which is exact, and hence gives rise to a triangulated functor Foru : D(B) → D(A). We usually do not mention the functor Foru explicitly, unless it is important for the discussion at hand. If u : A → B is a quasi-isomorphism then Foru : D(B) → D(A) is an equivalence, with quasi-inverse M 7→ B ⊗LA M . For any M0 ∈ D(Aop ) and M1 , M2 ∈ D(A) there ∼ M0 ⊗L M1 and RHomA (M1 , M2 ) ∼ are bi-functorial isomorphisms M0 ⊗LA M1 = = B RHomB (M1 , M2 ) in D(Z); cf. [YZ2, Proposition 1.4]. Here is a result that will be used a lot in our paper. The restriction functors are suppressed in it. The easy proof is left to the reader. u u v v 1 2 1 2 Proposition 2.5. Let A0 −→ A1 −→ A2 and B0 −→ B1 −→ B2 be homomorphisms in DGR. For k = 0, 1, 2 let Mk ∈ M(Bk ⊗Z Ak ) and Nk ∈ M(Bk ); and for k = 1, 2 let ζk : Mk−1 → Mk and θk : Nk → Nk−1 be homomorphisms in M(Bk−1 ⊗Z Ak−1 ) and M(Bk−1 ) respectively. (1) The abelian group HomB0 (M0 , N0 ) is a DG Aop 0 -module, with action (φ · a)(m) := φ(a · m) for φ ∈ HomB0 (M0 , N0 ), a ∈ A0 and m ∈ M0 . (2) The function Homv1 (ζ1 , θ1 ) : HomB1 (M1 , N1 ) → HomB0 (M0 , N0 ), with formula Homv1 (ζ1 , θ1 )(φ) := θ1 ◦ φ ◦ ζ1 for φ ∈ HomB1 (M1 , N1 ), is a homomorphism in M(Aop 0 ). (3) There is equality Homv1 (ζ1 , θ1 ) ◦ Homv2 (ζ2 , θ2 ) = Homv2 ◦v1 (ζ2 ◦ ζ1 , θ1 ◦ θ2 ). (4) Say ζ10 : M0 → M1 and θ10 : N1 → N0 are also homomorphisms in M(B0 ⊗Z A0 ) and M(B0 ) respectively, and there are homotopies ζ1 ⇒ ζ10 and θ1 ⇒ θ10 in M(B0 ⊗Z A0 ) and M(B0 ) respectively. Then there is a homotopy Homv1 (ζ1 , θ1 ) ⇒ Homv1 (ζ10 , θ10 ) in M(Aop 0 ). Item (2) of the proposition is illustrated here: M0 ζ1 Homv1 (ζ1 ,θ1 )(φ)  N0 o / M1 φ θ1  N1 Proposition 2.6. Let v : A0 → A be a quasi-isomorphism between DG rings. Let Q, I ∈ M(A), P ∈ M(Aop ), Q0 , I 0 ∈ M(A0 ) and P 0 ∈ M(A0 op ). Let φ : P 0 → P be a quasi-isomorphism in M(A0 op ), and let ψ : Q0 → Q and χ : I → I 0 be quasiisomorphisms in M(A0 ). THE SQUARING OPERATION 15 (1) If ((P is K-flat over Aop or Q is K-flat over A) and (P 0 is K-flat over A0 op or Q0 is K-flat over A0 )) then φ ⊗v ψ : P 0 ⊗A0 Q0 → P ⊗A Q is a quasi-isomorphism. (2) If ((Q is K-projective or I is K-injective over A) and (Q0 is K-projective or I 0 is K-injective over A0 )) then Homv (ψ, χ) : HomA (Q, I) → HomA0 (Q0 , I 0 ) is a quasi-isomorphism. Proof. This is implicit in the proof of [YZ2, Proposition 1.4]. Here is a detailed proof. (1) By the symmetry of the situation we can assume that either P 0 and P are K-flat (over the respective DG rings), or that Q0 and P are K-flat. We begin by reducing the second case to the first case. Choose a K-flat resolution µ : P̃ 0 → P 0 . Then P̃ 0 ⊗A0 Q0 → P 0 ⊗A0 Q0 is a quasi-isomorphism, and it suffices to prove that (φ ◦ µ) ⊗v ψ : P̃ 0 ⊗A0 Q0 → P ⊗A Q is a quasi-isomorphism, which is the first case. Now we assume that P 0 and P are K-flat. Consider the homomorphism φ · idA : 0 P ⊗A0 A → P , (φ · idA )(p0 ⊗ a) := φ(p0 ) · a. We claim this is a quasi-isomorphism. To see why, let us look at the first commutative diagram below. The homomorphism idP 0 ⊗v is a quasi-isomorphism since v is a quasi-isomorphism and P 0 is K-flat; the homomorphism idP 0 · idA0 is an isomorphism; and φ is a quasi-isomorphism; therefore φ · idA is a quasi-isomorphism. P 0 ⊗ A 0 A0 idP 0 · idA0 idP 0 ⊗v / P0  P 0 ⊗A0 A P 0 ⊗A0 Q0 idP 0 ⊗ψ φ  P 0 ⊗A0 Q  /P φ · idA / P ⊗A Q O φ⊗v ψ (φ · idA )⊗idQ λ / P 0 ⊗A0 A ⊗A Q Next look at the second commutative diagram above. The homomorphism λ, defined by λ(p0 ⊗ q) := p0 ⊗ 1 ⊗ q, is an isomorphism. The homomorphism idP 0 ⊗ψ is a quasi-isomorphism because ψ is a quasi-isomorphism and P 0 is K-flat; and (φ · idA ) ⊗ idQ is a quasi-isomorphism because φ · idA a quasi-isomorphism between K-flat DG Aop -modules. Therefore φ ⊗v ψ is a quasi-isomorphism. (2) Choose K-projective resolutions α : Q̃ → Q and α0 : Q̃0 → Q0 , and K-injective resolutions β : I → I˜ and β 0 : I 0 → I˜0 , in M(A) and M(A0 ) respectively. By Proposition 2.4, we can lift ψ and χ to quasi-isomorphisms ψ̃ and χ̃, such that the diagrams ψ̃ Q̃0 α0 / Q̃ I˜O ψ  /Q / I˜0 O β0 β α  Q0 χ̃ I χ / I0 in M(A0 ) are commutative up to homotopy. We get a diagram (2.7) HomA (Q, I) Homid (α,β)  ˜ HomA (Q̃, I) Homv (ψ,χ) / HomA0 (Q0 , I 0 ) Homid (α0 ,β 0 ) Homv (ψ̃,χ̃)  / HomA0 (Q̃0 , I˜0 ) 16 AMNON YEKUTIELI in M(Z) that is commutative up to homotopy. Now let us examine the commutative diagram HomA (Q, I) Homid (α,idI ) / HomA (Q̃, I) Homid (α,β) Homid (idQ ,β)  ˜ HomA (Q, I) Homid (α,idĨ ) Homid (idQ̃ ,β) (  ˜ / HomA (Q̃, I) in M(Z). The homomorphisms Homid (α, idI˜) and Homid (idQ̃ , β) are both quasiisomorphisms. At least one of the homomorphisms Homid (idQ , β) and Homid (α, idI ) is a quasi-isomorphism. It follows that the diagonal homomorphism Homid (α, β) is a quasi-isomorphism. A similar argument shows that Homid (α0 , β 0 ) is a quasiisomorphism. Going back to diagram (2.7), we see that it is enough to prove that Homv (ψ̃, χ̃) is a quasi-isomorphism. Let λ : I˜ → HomA0 (A, I˜0 ) be the homomorphism λ(i)(a) := χ̃(a · i) in M(A). It fits into a commutative diagram I˜ λ / HomA0 (A, I˜0 ) can  HomA0 (A0 , I˜0 ) χ̃  I˜0 o Homid (v,id) in M(A0 ), where can is the canonical isomorphism. Because χ̃ and v are quasiisomorphisms, and I˜0 is K-injective, we see that λ is a quasi-isomorphism. Finally, consider the commutative diagram ˜ HomA (Q̃, I) Homv (ψ̃,χ̃) Homid (id,λ)  HomA (Q̃, HomA0 (A, I˜0 )) / HomA0 (Q̃0 , I˜0 ) O Homid (ψ̃,id) adj / HomA0 (Q̃, I˜0 ) in M(Z), where adj is the adjunction isomorphism. Since λ and ψ̃ are quasiisomorphisms, Q̃ is K-projective, and I˜0 is K-injective, it follows that Homv (ψ̃, χ̃) is a quasi-isomorphism.  3. Central Pairs of DG Rings and their Resolutions In this section we introduce several special kinds of DG rings and homomorphisms. Recall that DGR is the category of DG rings. L i i Definition 3.1. A DG ring A = i∈Z A is called nonpositive if A = 0 for all i > 0. The full subcategory of DGR consisting of nonpositive DG rings is denoted by DGR≤0 . L i Definition 3.2. A DG ring A = i∈Z A is called strongly commutative if it satisfies these two conditions: (i) A is weakly commutative (Definition 1.6(2)), namely b · a = (−1)ij · a · b for all a ∈ Ai and b ∈ Aj . (ii) a · a = 0 for all a ∈ Ai and i odd. We denote by DGRsc the full subcategory of DGR on the strongly commutative DG rings. THE SQUARING OPERATION 17 Definition 3.3. A DG ring A is called a commutative DG ring if it is both nonpositive and strongly commutative. The full subcategory of DGR consisting of commutative DG rings is denoted by DGR≤0 sc . In other words, ≤0 DGR≤0 ∩ DGRsc . sc = DGR Example 3.4. A commutative DG ring A concentrated in degree 0 (i.e. A = A0 ) is just a commutative ring. Remark 3.5. The name “strongly commutative DG ring” was suggested to us by J. Palmieri. In an earlier version of this paper we used the name “strictly commutative DG ring”, following [ML]; and in [YZ2] it was “super-commutative DG algebra”. The name “weakly commutative DG ring” is “commutative DG algebra” in [ML], and “graded-commutative DG algebra” in [AILN]. Of course when the number 2 is invertible in A0 (e.g. if A0 contains Q), then condition (i) of Definition 3.2 implies condition (ii), so that the distinction between weak and strong commutativity disappears. See also Remark 3.14. Central homomorphisms were introduced in Definition 1.6(3). Definition 3.6. A central pair of DG rings is a central homomorphism u : A → B in DGR, where the DG ring A is commutative. We usually denote this pair by B/A, keeping u implicit. u u0 Suppose A − → B and A0 −→ B 0 are central pairs of DG rings. A morphism of central pairs w/v : B 0 /A0 → B/A consists of homomorphisms v : A0 → A and w : B 0 → B in DGR, such that u ◦ v = w ◦ u0 . The resulting category is called the category of central pairs of DG rings, and is denoted by PDGR. A morphism w/v in PDGR is shown in diagram (0.2.1). We do not require the homomorphism w : B 0 → B to be central. The homomorphism v : A0 → A is automatically central, because A is commutative. Definition 3.7. (1) A nonpositive central pair is a central pair B/A such that both A and B are nonpositive DG rings. The full subcategory of nonpositive central pairs is denoted by PDGR≤0 . (2) A commutative central pair is a central pair B/A such that the DG ring B is also commutative. The full subcategory of commutative central pairs is denoted by PDGR≤0 sc . (3) A morphism w/v : B 0 /A0 → B/A in PDGR is called central if the homomorphism w : B 0 → B is central. The subcategory of PDGR on all objects, but only with central homomorphisms, is denoted by PDGRce ~. (4) A morphism w/v : B 0 /A0 → B/A in PDGR is called a quasi-isomorphism if the homomorphisms v : A0 → A and w : B 0 → B are both quasiisomorphisms. Definition 3.8. Let B/A be a central pair of DG rings. A resolution of B/A is a morphism s/r : B̃/à → B/A in PDGR, such that: • r : à → A is a quasi-isomorphism. • s : B̃ → B is a surjective quasi-isomorphism. The resolution is called strict if à = A and r = idA , the identity automorphism of A. See diagram (0.2.2) for an illustration. 18 AMNON YEKUTIELI Definition 3.9. Let w/v : B 0 /A0 → B/A be a morphism in PDGR, let s/r : B̃/à → B/A be a resolution of B/A, and let s0 /r0 : B̃ 0 /Ã0 → B 0 /A0 be a resolution of B 0 /A0 . A morphism w̃/ṽ : B̃ 0 /Ã0 → B̃/à in PDGR is said to be morphism of resolutions above w/v if (w/v) ◦ (s0 /r0 ) = (s/r) ◦ (w̃/ṽ) in PDGR. In this case, we also say that w̃/ṽ is a resolution of w/v. If B 0 /A0 = B/A and w/v is the identity automorphism, then we say that w̃/ṽ is a morphism of resolutions of B/A. A morphism w̃/ṽ is shown in diagram (0.2.3). ` By graded set we mean a set X with a partition X = i∈Z X i ; the elements of X i are said to have degree i. We say that X is a nonpositive graded set if X i = ∅ for all i > 0. A filtered graded set is a graded set X, S with an ascending filtration F = {Fj (X)}j∈Z by graded subsets, such that X = j Fj (X) and F−1 (X) = ∅. Let A be a DG ring. We denote by A\ the graded ring gotten from A by forgetting the differential. The same for DG modules. When talking about free modules, we assume the DG ring A is nonzero (to avoid nonsense). For a variable x of degree i, we let A ⊗ x := A[−i], the shift by −i of the DG A-module A. For any element a ∈ Aj we denote by a ⊗ x or a · x the element t−i (a) ∈ A[−i]j+i ; cf. (1.18). Note that d(x) = 0, and d(a · x) = d(a) · x for any a ∈ A. Now consider a graded set of variables X. The free DG A-module on X is M A ⊗ X := A ⊗ x. x∈X A free DG A-module is a DG A-module P that is isomorphic to A ⊗ X for some graded set of variables X. The image of X in P is called a basis of P . Let P be a DG A-module. A semi-free filtration on P isSan ascending filtration F = {Fj (P )}j∈Z of P by DG submodules, such that P = j Fj (P ), F−1 (P ) = 0, and each grF j (P ) := Fj (P )/Fj−1 (P ) is a free DG A-module. We say that P is a semi-free DG A-module if it admits some semi-free filtration. See [AFH] and [Hi]. A semi-free DG module is K-projective, and hence also K-flat. Let P be a semi-free DG A-module, with semi-free filtration F . For each j ≥ 0 F choose a graded subset Yj ⊆ Fj (P ) whose ` image Ȳj in grj (P ) is a basis ofSthis free DG A-module. The graded set X := i∈Z Yj is filtered by Fj (X) := j 0 ≤j Yj 0 . Such a filtered graded set is called a semi-basis of P . Note that for every j there is an isomorphism of graded A\ -modules A\ ⊗ Fj (X) ∼ = Fj (P )\ ; and so A\ ⊗ X ∼ = P \. F For any element y ∈ Yj , its image ȳ ∈ Ȳj ⊆ grj (P ) satisfies d(ȳ) = 0; and hence d(y) ∈ Fj−1 (X). We see that d(Fj (X)) ⊆ Fj−1 (X). Given a graded set of variables X, we can form the noncommutative polynomial ring ZhXi over Z, which is the free Z-module on the set of monomials x1 · · · xm in the elements of X, and with the obvious multiplication and grading. The next definition is not standard. Its first occurrence seems to have been in [YZ2]. ` Definition 3.10. Let X = i∈Z X i be a graded set of variables. The strongly commutative polynomial ring Z[X] is the quotient of ZhXi by the two-sided ideal generated by the elements y · x − (−1)ij · x · y and z 2 , for all x ∈ X i , y ∈ X j and z ∈ X k , with i, j, k ∈ Z and k odd. u Definition 3.11. Consider a nonpositive central pair of DG rings A − → B. (1) We say that B is a commutative semi-free DG ring over A, that u is a commutative semi-free DG ring homomorphism, and that B/A is a commutative semi-free pair of DG rings, if there is an isomorphism of graded THE SQUARING OPERATION 19 ∼ A\ ⊗Z Z[X], where X is a nonpositive graded set, and Z[X] A\ -rings B \ = is the strongly commutative polynomial ring. Such a graded set X is called a set of commutative semi-free ring generators of B over A. (2) We say that B is a noncommutative semi-free DG ring over A, that u is a noncommutative semi-free DG ring homomorphism, and that B/A is a noncommutative semi-free pair of DG rings, if there is an isomorphism of graded A\ -rings B \ ∼ = A\ ⊗Z ZhXi, where X is a nonpositive graded set, and ZhXi is the noncommutative polynomial ring. Such a graded set X is called a set of noncommutative semi-free ring generators of B over A. (3) We say that B is a K-flat DG ring over A, that u is a K-flat DG ring homomorphism, and that B/A is a K-flat pair of DG rings, if B is K-flat as a DG A-module (left or right – it does not matter). Proposition 3.12. Let u : A → B a nonpositive central pair of DG rings, which is either commutative semi-free or a noncommutative semi-free. Then u : A → B is K-flat. Proof. In the noncommutative case, let X be a set of noncommutative semi-free ring generators of B over A. Then the monomials x1 · · · xm , with x1 , . . . , xm ∈ X, are a semi-basis for the DG A-module B. We are using the fact that the graded set X is nonpositive. In the commutative case, let X be a set of commutative semi-free ring generators of B over A. Choose some ordering of the set X. Then the monomials x1 · · · xm , with x1 ≤ · · · ≤ xm in X, and xi < xi+1 if xi is odd, are a semi-basis for the DG A-module B. Again, we are using the fact that the graded set X is nonpositive. We see that in both cases B is a semi-free DG A-module, and thus it is K-flat.  Example 3.13. Let A be a commutative ring, and let a = (a1 , . . . , an ) be a sequence of elements in A. The Koszul complex B := K(A; a) associated to this sequence is a commutative semi-free DG ring over A. It has a set of commutative semi-free ring generators X = {x1 , . . . , xn } of degree −1, such that dB (xi ) = ai . Remark 3.14. The strongly commutative polynomial ring Z[X] is a free graded Z-module. This is what makes Proposition 3.12 work. The “weakly commutative polynomial ring”, which is the quotient of ZhXi by the two-sided ideal generated by the elements y · x − (−1)ij · x · y for all x ∈ X i and y ∈ X j , is not flat over Z. Indeed, for any odd element z ∈ X we have z 2 6= 0 but 2 · z 2 = 0. Definition 3.15. Let B/A be a central pair of DG rings, and let s/r : B̃/à → B/A be a resolution of B/A (Definition 3.8). (1) Assume B/A is a commutative pair. We say that B̃/à is a commutative semi-free resolution of B/A if the pair B̃/à is commutative semi-free (Definition 3.11(1)). (2) We say that B̃/à is a noncommutative semi-free resolution of B/A if the pair B̃/à is noncommutative semi-free (Definition 3.11(2)). (3) We say that B̃/à is a K-flat resolution of B/A if the pair B̃/à is K-flat (Definition 3.11(3)). Example 3.16. If B is K-flat over A, then B/A is a K-flat ring resolution of itself. It is terminal among all K-flat ring resolutions of B/A. Example 3.17. Let u : A → B be a surjective homomorphism of commutative rings, and let a = (a1 , . . . , an ) be a sequence of elements of A that generates the ideal Ker(u). Assume that the sequence a is regular. Define B̃ := K(A; a), the Koszul complex. Then B̃/A is a strict commutative semi-free DG ring resolution of B/A. 20 AMNON YEKUTIELI Remark 3.18. In [YZ2] we did not require the quasi-isomorphism w to be surjective. That omission was not significant there, because we were mostly concerned with the case when B is a ring (cf. [YZ2, Proposition 1.8]). When B has nonzero negative components, the surjectivity is needed (cf. proof of Theorem 3.21 below). The next results in this section are enhanced versions of [YZ2, Propositions 1.7 and 1.8]. The category DGR≤0 /ce A was introduced in Definition 1.6(4). Lemma 3.19. Let A be a commutative DG ring, and let B, B 0 ∈ DGR≤0 /ce A. Assume either of these two conditions holds: (i) B is commutative, and B 0 is commutative semi-free over A, with commutative semi-free ring generating set X. (ii) B 0 is noncommutative semi-free over A, with noncommutative semi-free ring generating set X. Let w : X → B be a degree 0 function. Then: (1) The function w extends uniquely to a graded A\ -ring homomorphism w : B0 \ → B\. (2) The graded ring homomorphism w : B 0 \ → B \ extends to a DG ring homomorphism w : B 0 → B iff d(w(x)) = w(d(x)) for all x ∈ X. Proof. This is an easy exercise.  Lemma 3.20. Let X be a nonpositive graded set, and let A be a commutative DG ring. Consider the graded ring B := A\ ⊗Z Z[X] or B := A\ ⊗Z ZhXi. (1) Let dX : X → B be a degree 1 function. The function dX extends uniquely to a degree 1 derivation dB : B → B, such that dB |A = dA , the differential of A. (2) The derivation dB is a differential on B, i.e. dB ◦dB = 0, iff (dB ◦dB )(x) = 0 for all x ∈ X. Proof. (1) Take elements xj ∈ X nj for j = 1, . . . , m, and consider the monomial x1 · · · xm ∈ Z[X] (resp. in ZhXi). We let dB (x1 · · · xm ) := m X (−1)n1 +···nj−1 · x1 · · · xj−1 · dX (xj ) · xj+1 · · · xm ∈ B. j=1 This is well-defined in the commutative case (and there is nothing to check in the noncommutative case). Extending it additively we obtain a degree 1 Z-linear homomorphism Z[X] → B (resp. ZhXi → B). This extends to a degree 1 A-linear homomorphism dB : B → B that satisfies the graded Leibniz rule. (2) This is an easy exercise.  L i For a DG ring A we denote by Z(A) = i Z (A) the set of cocycles, and by L i B(A) = i B (A) the set of coboundaries (i.e. the kernel and image of dA , respectively). So Z(A) a DG subring of A (with zero differential of course), and B(A) is a two-sided graded ideal of Z(A). u Theorem 3.21. Let A − → B be a nonpositive central pair of DG rings. (1) If B is commutative, then there exists a strict commutative semi-free DG ũ u ring resolution A − → B̃ of A − → B. ũ (2) There exists a strict noncommutative semi-free DG ring resolution A − → B̃ u of A − → B. THE SQUARING OPERATION 21 Proof. (1) We are looking for a commutative semi-free DG A-ring B̃, with a quasiisomorphism v : B̃ → B in DGR≤0 sc /A. We shall construct an increasing sequence of commutative DG A-rings F0 (B̃) ⊆ F1 (B̃) ⊆ · · · . The differential of Fi (B̃) will be denoted by di . At the same time we shall construct an increasing sequence of graded sets F0 (X) ⊆ F1 (X) ⊆ · · · , with a compatible sequence of isomorphisms Fi (B̃)\ ∼ = A\ ⊗Z Z[Fi (X)]. We shall also construct a compatibleSsequence of DG ring homomorphisms vi : Fi (B̃) → B. The DG A-ring B̃ := i Fi (B̃) and the homomorphism v := limi→ vi will have the desired properties. The construction is by recursion on i ∈ N. Moreover, for every i the following conditions will hold: (i) The homomorphisms vi : Fi (B̃) → B, B(vi ) : B(Fi (B̃)) → B(B) and H(vi ) : H(Fi (B̃)) → H(B) are surjective in degrees ≥ −i. (ii) The homomorphism H(vi ) : H(Fi (B̃)) → H(B) is bijective in degrees ≥ −i + 1. We start by choosing a set Z000 of degree −1 elements, and a function v0 : Z000 → B , such that the set dB (v0 (Z000 )) generates B0 (B) as an A0 -module. Let Y000 be a set of degree 0 elements, with a bijection d0 : Z000 → Y000 . Let v0 : Y000 → B 0 be the unique function such that v0 (d0 (z)) = dB (v0 (z)) for all z ∈ Z000 . Choose a set Y00 of degree 0 elements, and a function v0 : Y00 → B 0 , such that the set v0 (Y00 t Y000 ) generates B 0 as an A0 -ring. Define the graded set F0 (X) := Y00 t Y000 t Z000 , and the graded ring F0 (B̃)\ := A\ ⊗Z Z[F0 (X)]. Setting d0 (y) := 0 for y ∈ Y00 t Y000 gives a degree 1 function d0 : F0 (X) → F0 (B̃)\ . According to Lemma 3.20 we get a differential d0 on the graded ring F0 (B̃)\ , and it becomes the DG A-ring F0 (B̃). Lemma 3.19 says that the function v0 : F0 (X) → B extends uniquely to a DG A-ring homomorphism v0 : F0 (B̃) → B. Condition (i) holds, and condition (ii) holds trivially, for i = 0. Now take any i ≥ 0, and assume that vi : Fi (B̃) → B is already defined, and 0 it satisfies conditions (i)-(ii). Choose a graded set Yi+1 of degree −i − 1 elements, −i−1 0 and a function vi+1 : Yi+1 → Z (B), such that the cohomology classes of the 0 0 elements of vi+1 (Yi+1 ) generate H−i−1 (B) as H0 (A)-module. For y ∈ Yi+1 let di+1 (y) := 0 ∈ Fi (B̃). Consider the A0 -module  Ji+1 := b ∈ Z−i (Fi (B̃)) | H−i (vi )(b) = 0 . −1 000 000 Choose a graded set Yi+1 of degree −i − 1 elements, and a function di+1 : Yi+1 → 000 Ji+1 , such that the cohomology classes of the elements of di+1 (Yi+1 ) generate the H0 (A)-module  Ker H−i (vi ) : H−i (Fi (B̃)) → H−i (B) . 000 For any y ∈ Yi+1 there exists some b ∈ B −i−1 such that vi (di+1 (y)) = d(b), and we let vi+1 (y) := b. 00 00 Choose a graded set Zi+1 of degree −i−2 elements, and a function vi+1 : Zi+1 → −i−1 −i−2 00 0 B , such that the set dB (vi+1 (Zi+1 )) generates B (B) as A -module. Let 00 00 00 Yi+1 be a set of degree −i − 1 elements, with a bijection di+1 : Zi+1 → Yi+1 . Let 00 −i−1 vi+1 : Yi+1 → B be the unique function such that vi+1 (di+1 (z)) = dB (vi+1 (z)) 00 00 for all z ∈ Zi+1 . For y ∈ Yi+1 we define di+1 (y) := 0. 0 Lastly choose a graded set Yi+1 of degree −i − 1 elements, and a function vi+1 : 0 Yi+1 → B −i−1 , such that, letting 0 00 000 Yi+1 := Yi+1 t Yi+1 t Yi+1 , 22 AMNON YEKUTIELI the set vi+1 (Yi+1 ) generates B −i−1 as an A0 -module. Since vi : B−i (Fi (B̃)) → 0 B−i (B) is surjective, for any y ∈ Yi+1 there exists b ∈ Fi (B̃)−i such that vi (b) = dB (vi+1 (y)), and we define di+1 (y) := b. Define the graded set 00 Fi+1 (X) := Fi (X) t Yi+1 t Zi+1 and the commutative graded ring Fi+1 (B̃)\ := A\ ⊗Z Z[Fi+1 (X)]. There is a degree 1 function di+1 : Fi+1 (X) → Fi+1 (B̃)\ such that di+1 |Fi (X) = di . According to Lemma 3.20 the function di+1 induces a differential di+1 on Fi+1 (B̃)\ ; so we get a DG ring Fi+1 (B̃). Likewise we have a degree 0 function vi+1 : Fi+1 (X) → B such that vi+1 |Fi (X) = vi |Fi (X) . By Lemma 3.19 there is an induced DG A-ring homomorphism vi+1 : Fi+1 (B̃) → B, and it satisfies vi+1 |Fi (B̃) = vi . (2) Here we are looking for a noncommutative semi-free DG A-ring B̃, with a quasiisomorphism v : B̃ → B in DGR≤0 /ce A. The proof here is the same as in part (1), except that we now replace Z[Fi (X)] with ZhFi (X)i everywhere.  u Theorem 3.22. Let A − → B be a central pair of nonpositive DG rings. Suppose we ũ v ũ0 v0 are given two factorizations A − → B̃ − → B and A −→ B̃ 0 −→ B of u in DGR≤0 /ce A, such that v is a surjective quasi-isomorphism, and either of these two conditions holds: (i) The DG ring B̃ is commutative, and the DG ring B̃ 0 is commutative semifree over A. (ii) The DG ring B̃ 0 is noncommutative semi-free over A. Then there exists a homomorphism w : B̃ 0 → B̃ in DGR≤0 /ce A such that w ◦ ũ0 = ũ and v ◦ w = v 0 . The situation is shown in this commutative diagram in DGR /ce A below. (3.23) semi-free ũ 0 >B̃ 0 v 0 v ũ >B̃ 0 ũ /B > u A 0 B̃ A v0 >B w ũ  B̃ v surj qu-isom ` Proof. The proof is similar to that of [YZ2, Proposition 1.8]. Let X = i≤0 X i be a set of commutative (resp. noncommutative) semi-free DG A-ring generators S of B̃ 0 over A. Define Fi (X) := −i≤j≤0 X i , and let Fi (B̃ 0 ) be the A-subring of B̃ 0 generated by the set Fi (X). So Fi (B̃ 0 ) is a DG Fi (B̃ 0 )\ ∼ = A\ ⊗ Z S A-ring, 0 \ ∼ \ 0 0 Z[Fi (X)] (resp. Fi (B̃ ) = A ⊗Z ZhFi (X)i), and B̃ = i Fi (B̃ ). We will construct a consistent sequence of homomorphisms wi : Fi (B̃ 0 ) → B̃ in DGR≤0 /ce A, satisfying wi ◦ ũ0 = ũ and v ◦ wi = v 0 . The construction is by recursion on i ∈ N. Then w := limi→ wi will have the required properties. We start with i = 0. Take any x ∈ X 0 . Since v is surjective, there exists b ∈ B̃ 0 such that v(b) = v 0 (x) in B 0 . We let w0 (x) := b. The resulting function w0 : X 0 → B̃ extends uniquely to a DG A-ring homomorphism w0 : Fi (B̃ 0 ) → B̃, by Lemma 3.19. THE SQUARING OPERATION 23 Next consider any i ∈ N, and assume a DG A-ring homomorphism wi : Fi (B̃ 0 ) → B̃ is defined, satisfying the required conditions. Take any element x ∈ X −i−1 . Since v is surjective, there exists b ∈ B̃ −i−1 such that v(b) = v 0 (x) in B −i−1 . Now d(x) ∈ Fi (B̃ 0 )−i is a cocycle in Fi (B̃ 0 ), so wi (d(x)) ∈ B̃ −i is a cocycle. Let c := wi (d(x)) − d(b) ∈ B̃ −i , which is also a cocycle. We have v(c) = v(wi (d(x)) − v(d(b)) = v 0 (d(x)) − v(d(b)) = d(v 0 (x) − v(b)) = 0. Thus the cohomology class [c] satisfies H(v)([c]) = [v(c)] = 0. Because H(v) is bijective we conclude that [c] = 0 in H−i (B̃). Hence there is some b0 ∈ B̃ −i−1 such that d(b0 ) = c. We define wi+1 (x) := b + b0 . Then (3.24) d(wi+1 (x)) = d(b + b0 ) = d(b) + c = wi (d(x)). In this way we obtain a function wi+1 : Fi+1 (X) → B̃ that extends wi . According to Lemma 3.19(1), the function wi+1 extends uniquely to a homomorphism of graded A\ -rings Fi+1 (w) : Fi+1 (B̃ 0 )\ → B̃ \ . Equation (3.24) and Lemma 3.19(2) imply that wi+1 : Fi+1 (B̃ 0 ) → B̃ is in fact a homomorphism of DG rings.  Corollary 3.25. (1) Any object B/A of PDGR≤0 admits a nonpositive K-flat resolution B̃/Ã. (2) Any morphism w/v : B 0 /A0 → B/A in PDGR≤0 admits a nonpositive K-flat resolution w̃/ṽ. Proof. (1) Let B̃ be a noncommutative semi-free DG ring resolution of B over A. See Theorem 3.21. Then B̃/A is strict nonpositive K-flat resolution of B/A. (2) Let B̃ 0 be a noncommutative semi-free DG ring resolution of B 0 over A0 , and let à be a commutative semi-free DG ring resolution of A over A0 . Next, let B̃ be a noncommutative semi-free DG ring resolution of B over Ã. So B̃ 0 /A0 is a K-flat resolution of B 0 /A0 , and B̃/à is a K-flat resolution of B/A. Also, we have a homomorphism ṽ : A0 → à above v : A0 → A. Finally, according to Theorem 3.22, we can find a homomorphism w̃ : B̃ 0 → B̃ that respects all other homomorphisms.  4. DG Ring Homotopies In this section we introduce the concept of homotopy between DG ring homomorphisms. Many of the ideas in this section were communicated to us privately by B. Keller (but of course the responsibility for correctness is ours). Definition 4.1. Suppose u0 , u1 : A → B are homomorphisms of DG rings. (1) An additive homomorphism γ : A → B of degree −1 is called a u0 -u1 derivation if it satisfies this twisted graded Leibniz formula γ(a0 · a1 ) = γ(a0 ) · u1 (a1 ) + (−1)k0 · u0 (a0 ) · γ(a1 ) for all ai ∈ Aki . (2) A DG ring homotopy γ : u0 ⇒ u1 is u0 -u1 -derivation γ : A → B of degree −1, satisfying the homotopy formula dB ◦ γ + γ ◦ dA = u1 − u0 . Here are homotopy results, that are only valid for noncommutative semi-free DG rings (Definition 3.11(2)). Recall the notions of commutative DG ring, central homomorphism, and the category DGR≤0 /ce A, from Definitions 1.6 and 3.3. Lemma 4.2. Let A be a commutative DG ring, and let w0 , w1 : B̃ 0 → B̃ be homomorphisms in DGR≤0 /ce A. Assume that B̃ 0 is noncommutative semi-free over A, with set of noncommutative semi-free ring generators X. Let γ : X → B̃ be a degree −1 function. 24 AMNON YEKUTIELI (1) There is a unique A-linear w0 -w1 -derivation γ : B̃ 0 → B̃ of degree −1 that extends γ : X → B̃. (2) The homomorphism γ : B̃ 0 → B̃ is a DG ring homotopy w0 ⇒ w1 iff (d ◦ γ + γ ◦ d)(x) = (w1 − w0 )(x) for all x ∈ X. Proof. (1) Define an additive homomorphism γ : ZhXi → B̃ of degree −1 by letting γ(x1 · · · xm ) := m X (−1)k1 +···+ki−1 · w0 (x1 ) · · · w0 (xi−1 ) · γ(xi ) · w1 (xi+1 ) · · · w1 (xm ) i=1 for elements xi ∈ X ki . (Here is where we need B̃ 0 to be noncommutative semi-free – this won’t work for Z[X] unless w0 = w1 .) Then extend γ A-linearly to all elements of B̃ 0 , using the isomorphism B̃ 0 \ ∼ = A\ ⊗Z ZhXi. (2) An easy calculation, using induction on m, shows that (d ◦ γ + γ ◦ d)(a · x1 · · · xm ) = (w1 − w0 )(a · x1 · · · xm ) for all a ∈ A and xi ∈ X.  Theorem 4.3. Let A be a commutative DG ring, and let u : A → B be a central hoũ v momorphism in DGR≤0 . Suppose we are given two factorizations A − → B̃ − → B and ũ0 v0 A −→ B̃ 0 −→ B of u in DGR≤0 /ce A, such that v is a surjective quasi-isomorphism, and ũ0 is noncommutative semi-free. Let w0 , w1 : B̃ 0 → B̃ be homomorphisms in DGR≤0 /ce A that satisfy wi ◦ ũ0 = ũ and v ◦ wi = v 0 . Then there is an A-linear DG ring homotopy γ : w0 ⇒ w1 , that satisfies v ◦ γ = 0. The situation is depicted in the commutative diagrams below, where i = 0, 1. (4.4) NC semi-free 0 >B̃ 0 ũ v /B > u A i=0,1 0 v ũ B̃ ũ 0 A >B̃ 0 v0 >B wi ũ  B̃ v surj qu-isom ` Proof. Choose a set of noncommutative semi-free ring generators X = i≤0 X i 0 0\ ∼ \ for as graded rings. For any k ≥ 0 let Fk (X) := S B̃ ; so iB̃ = A ⊗Z ZhXi 0 , and let F ( B̃ ) be the A-subring of B̃ 0 generated by Fk (X). Thus X k −k≤i≤0 Fk (B̃ 0 ) is in DGR≤0 /ce A, and Fk (B̃ 0 )\ ∼ = A\ ⊗Z ZhFk (X)i. We will define an A0 linear homomorphism γk : Fk (B̃ ) → B̃ of degree −1, which is a DG ring homotopy w0 |Fk (B̃ 0 ) ⇒ w1 |Fk (B̃ 0 ) , recursively on k, such that γk |Fk−1 (B̃ 0 ) = γk−1 if k ≥ 1, and v ◦ γk = 0. Then we take γ := limk→ γk . Since v ◦ wi = v 0 it follows that H(v) ◦ H(wi ) = H(v 0 ). Because H(v) is an isomorphism of graded rings, we see that H(w0 ) = H(w1 ). Let us construct γ0 . We will use the fact that all elements of B̃ 0 0 , B̃ 0 and B 0 are cocycles. Take any x ∈ X 0 , and define c := w0 (x) − w1 (x) ∈ B̃ 0 . Since v(c) = 0, so is its cohomology class [v(c)] ∈ H0 (B). Because H(v) is an isomorphism, we see that [c] = 0 in H0 (B̃). Therefore c = d(b) for some b ∈ B̃ −1 . Consider the element v(b) ∈ B −1 . We have d(v(b)) = v(c) = 0, namely v(b) is a cocycle. Again using the fact that H(v) is bijective, we can find a cocycle b0 ∈ B̃ −1 such that H(v)([b0 ]) = [v(b)] in H−1 (B). But then [v(b − b0 )] = 0 in H−1 (B), so there exists THE SQUARING OPERATION 25 some a ∈ B −2 such that d(a) = v(b − b0 ). The surjectivity of v says that there is some a0 ∈ B̃ −2 with v(a0 ) = a. We define γ0 (x) := b − b0 − d(a0 ) ∈ B̃ −1 . Then d(γ0 (x)) = d(b) = c = w0 (x) − w1 (x), and v(γ0 (x)) = v(b − b0 ) − d(a) = 0. In this way we get a function γ0 : X 0 → B̃ −1 . Lemma 4.2 shows that this function extends uniquely to a homomorphism γ0 : F0 (B̃ 0 ) → B̃, which is a DG ring homotopy w0 |F0 (B̃ 0 ) ⇒ w1 |F0 (B̃ 0 ) , and v ◦ γ0 = 0. Now consider k ≥ 1, and assume we already have γk−1 . Take any x ∈ X −k . Note that d(x) ∈ Fk−1 (B̃ 0 ). We claim that the element c := w0 (x) − w1 (x) − γk−1 (d(x)) ∈ B̃ −k is a cocycle. Indeed, since γk−1 is a DG ring homotopy w0 |Fk−1 (B̃ 0 ) ⇒ w1 |Fk−1 (B̃ 0 ) , we have (d ◦ γk−1 + γk−1 ◦ d)(d(x)) = (w0 − w1 )(d(x)). But d(d(x)) = 0 and wi (d(x)) = d(wi (x)), so d(c) = 0 as claimed. From here the proof is just like in the case k = 0. Because v ◦ wi = v 0 and v ◦ γk−1 = 0, we see that v(c) = 0. Therefore the cohomology class [v(c)] ∈ H−k (B) is 0. Using the fact that H(v) is an isomorphism, we conclude that [c] = 0 in H−k (B̃). Hence there is some b ∈ B̃ −k−1 such that d(b) = c. Now d(v(b)) = v(d(b)) = v(c) = 0, so v(b) ∈ B −k−1 is a cocycle. Again using the fact that H(v) is bijective, we can find a cocycle b0 ∈ B̃ −k−1 such that H(v)([b0 ]) = [v(b)] in H−k−1 (B). But then [v(b − b0 )] = 0 in H−k−1 (B), so there exists some a ∈ B −k−2 such that d(a) = v(b − b0 ). The surjectivity of v says that there is some a0 ∈ B̃ −k−2 with v(a0 ) = a. We define γk (x) := b − b0 − d(a0 ) ∈ B̃ −k−1 . Then (d ◦ γk + γk−1 ◦ d)(x) = c + γk−1 (d(x)) = w0 (x) − w1 (x), and v(γk (x)) = 0. In this way we get a function γk : X −k → B̃ −k−1 . We extend it to a function γk : Fk (X) → B̃ by defining γk (x) := γk−1 (x) for x ∈ Fk−1 (X). Lemma 4.2 shows that this function extends uniquely to an A-linear homomorphism γk : Fk (B̃ 0 ) → B̃, which is a DG ring homotopy wk |Fk (B̃ 0 ) ⇒ w1 |Fk (B̃ 0 ) , and v ◦ γk = 0.  DG ring homotopies can be expressed using the cylinder construction (see Definition 1.23). The next result is similar to [Ke3, Theorem 4.3(c)]. Proposition 4.5. Let u0 , u1 : A → B be DG ring homomorphisms, and let γ : A → B be a Z-linear homomorphism of degree −1. The following conditions are equivalent. (i) The homomorphism γ is a DG ring homotopy γ : u0 ⇒ u1 . (ii) The Z-linear homomorphism ucyl : A → Cyl(B) with formula " # u0 (a) ξ · γ(a) ucyl (a) := 0 u1 (a) is a DG ring homomorphism. Proof. This is a straightforward calculation.  26 AMNON YEKUTIELI Remark 4.6. Let A be a commutative DG ring. If A is a ring (i.e. A = A0 ), then the categories DGR≤0 /ce A and DGR /ce A admit Quillen model structures, in which the quasi-isomorphisms are the weak equivalences, and the noncommutative semi-free DG rings are cofibrant; see [BP, Theorem A.3.1]. We think it is quite plausible that the same is true even when A is not a ring (i.e. it has a nontrivial negative part). Evidence for this is provided by Theorems 3.21, 3.22 and 4.3. On the other hand, we do not know whether the categories DGR≤0 sc /A and DGRsc /A admit similar Quillen model structures. A negative indication is that Theorem 4.3 does not seem to hold for commutative semi-free DG rings. Another negative indication is that even when A is a ring, this is not known (except when A contains Q; see [Hi]). Recall [AILN, Theorem 3.2], that was discussed in Subsection 0.5 of the Introduction. It deals with a commutative base ring A. The proof of this theorem hinges on the Quillen model structure on DGR≤0 /ce A that was produced in [BP]. If such a model structure does exist in the more general case of a commutative DG ring A (as we predict above), then it would most likely imply Theorem 0.3.4 (by a proof similar to that in [AILN]). However, even if we had model structures on the categories DGR≤0 /ce A and DGR≤0 sc /A, that would probably not be sufficient to imply Theorem 0.3.5. This is because the proof of Theorem 0.3.5 (actually, the proof of the noncommutative variant Theorem 6.11) requires a very delicate treatment of central morphisms of central pairs (see Setup 6.1 and Definition 3.7), something that a Quillen model structure (being a rather coarse structure) does not appear able to provide. 5. Pairs of DG Modules, Compound Resolutions, and Rectangles Recall that PDGR is the category of central pairs DG rings. See Definition 3.6. Resolutions in PDGR were defined in Definition 3.8 and 3.15. The category of central DG A-rings DGR /ce A was defined in Definition 1.6(4). Definition 5.1. Let B̃/à be an object of PDGR. The enveloping DG ring of B̃ over à is the DG ring B̃ en := B̃ ⊗à B̃ op ∈ DGR /ce Ã. Let w̃/ṽ : B̃1 /Ã1 → B̃0 /Ã0 be a morphism in PDGR. There is an induced DG ring homomorphism w̃en := w̃ ⊗ṽ w̃op : B̃1en → B̃0en in DGR /ce Ã1 . In this way we obtain a functor PDGR → DGR. Lemma 5.2. Let w/v : B1 /A1 → B0 /A0 be a quasi-isomorphism in PDGR, and let w̃/ṽ : B̃1 /Ã1 → B̃0 /Ã0 be a K-flat resolution of w/v. Then w̃en : B̃1en → B̃0en is a quasi-isomorphism. Proof. The homomorphisms ṽ : Ã1 → Ã0 and w̃ : B̃1 → B̃0 are also quasi-isomorphisms. We can forget the DG rings structures of B̃0 and B̃1 , and just view them as K-flat DG modules over Ã0 and Ã1 respectively. Then Proposition 2.6(1) applies.  Definition 5.3. Let B̃/à be an object of PDGR, and let (M̃ l , M̃ r ) be an object of M(B̃) × M(B̃ op ); namely M̃ l is a left DG B̃-module, and M̃ r is a right DG B̃-module. We define the DG module M̃ en := M̃ l ⊗à M̃ r ∈ M(B̃ en ). THE SQUARING OPERATION 27 Let w̃/ṽ : B̃1 /Ã1 → B̃0 /Ã0 be a morphism in PDGR, let (M̃kl , M̃kr ) ∈ M(B̃k ) × M(B̃kop ) for k = 0, 1, and let (θ̃l , θ̃r ) : (M̃0l , M̃0r ) → (M̃1l , M̃1r ) be a morphism in M(B̃1 ) × M(B̃1op ). We define the morphism θ̃en := θ̃l ⊗ṽ θ̃r : M̃0en → M̃1en in M(B̃1en ). Remark 5.4. We have omitted reference to the forgetful functors in the definition above. Thus, the homomorphism θ̃l in M(B̃1 ) is actually a homomorphism θ̃l : Forw (M̃0l ) → M1l ; and the homomorphism θ̃r in M(B̃1op ) is actually a homomorphism θ̃r : Forwop (M̃0r ) → M1r . We shall continue with these omissions, for the sake of clarity. The forgetful functors will only be made explicit when there is more than one given homomorphism between two DG rings. We hope this shortcut will not be a cause for confusion. Definition 5.5. Let B/A be an object of PDGR, let (M l , M r ) be an object of D(B) × D(B op ), and let B̃/à be a K-flat resolution of B/A. A compound resolution of (M l , M r ) over B̃/à is the following data: • A K-flat resolution αl : P̃ l → M l in M(B̃). • A K-flat resolution αr : P̃ r → M r in M(B̃ op ). • A K-injective resolution β : P̃ en → I˜ in M(B̃ en ). We denote this compound resolution by ˜ αl , αr , β). P := (P̃ l , P̃ r , I; It is easy to see that compound resolutions exist. Consider a K-flat resolution s/r : B̃/à → B/A in PDGR. The left and right actions of B̃ on B commute with each other, and they commute with the action of B ce on B (all in the graded sense). Thus B is a DG module over B̃ en ⊗à B ce . Hence we can make the next definition, in the spirit of Proposition 2.5. Definition 5.6. In the situation of Definition 5.5, we define the DG module B̃/à ˜ ∈ M(B ce ). RectB/A (P ) := HomB en (B, I) The next setup shall be used in the rest of this section. Setup 5.7. For k = 0, 1, 2 we are given a central pair Bk /Ak ∈ PDGR, a K-flat resolution B̃k /Ãk → Bk /Ak in PDGR, and a pair of DG modules (Mkl , Mkr ) ∈ D(Bk ) × D(Bkop ). For k = 1, 2 we are given a central morphism wk /vk : Bk /Ak → Bk−1 /Ak−1 in PDGR (i.e. a morphism in PDGRce ~ , see Definition 3.7(3)), a morphism l r (θkl , θkr ) : (Mk−1 , Mk−1 ) → (Mkl , Mkr ) in D(Bk ) × D(Bkop ), and a morphism w̃k /ṽk : B̃k /Ãk → B̃k−1 /Ãk−1 above wk /vk . When we only consider k = 0, 1, the index 1 on the morphisms w1 , v1 , θ1l , θ1r , w̃1 and ṽ1 is redundant, and hence we will suppress it. 28 AMNON YEKUTIELI Definition 5.8. Consider Setup 5.7, with k = 0, 1 only. Let P k be a compound resolution of (Mkl , Mkr ) over B̃k /Ãk . A compound morphism η : P 0 → P 1 above (θl , θr ) and w̃/ṽ is the following data: • K-projective resolutions γ0l : Q̃l0 → P̃0l and γ0r : Q̃r0 → P̃0r in M(B̃1 ) and M(B̃1op ) respectively. • Homomorphisms θ̃l : Q̃l0 → P̃1l and θ̃r : Q̃r0 → P̃1r in M(B̃1 ) and M(B̃1op ) respectively, such that θl ◦ Q(α0l ) ◦ Q(γ0l ) = Q(α1l ) ◦ Q(θ̃l ) and θr ◦ Q(α0r ) ◦ Q(γ0r ) = Q(α1r ) ◦ Q(θ̃r ) in D(B̃1 ) and D(B̃1op ) respectively. • A homomorphism η : I˜0 → I˜1 in M(B̃1en ), such that Q(η) ◦ Q(β0 ) ◦ Q(γ0l ⊗ṽ γ0r ) = Q(β1 ) ◦ Q(θ̃en ), as morphisms Q̃l0 ⊗Ã1 Q̃r0 → I˜1 in D(B̃1en ). We denote this compound morphism by η = (Q̃l0 , Q̃r0 ; γ0l , γ0r , θ̃l , θ̃r , η). We also say that η is a compound resolution of (θl , θr ). This definition is illustrated in the next diagrams, that are commutative diagrams in the categories D(B̃1 ), D(B̃1op ) and D(B̃1en ) respectively. The vertical arrows in these diagrams (namely those whose names do not contain the letters “θ” or “η”) are isomorphisms. (Note that the letter Q denotes the localization functor, not to be confused with the DG modules Q̃l0 etc.) Q̃r0 Q̃l0 Q(γ0l ) Q(θ̃ l )  P̃0l Q(αl0 )  M0l ! Q(γ0r ) P̃1l Q(αl1 ) θl  / M1r Q̃l0 ⊗Ã1 Q̃r0 Q(θ̃ r )  P̃0r Q(αr0 )  M0r  P̃1r Q(αr1 ) θr  / M1r Q(γ0l ⊗ṽ γ0r ) Q(θ̃ en )  P̃0en Q(β0 )  I˜0 $ P̃1en Q(β1 ) Q(η)  / I˜1 There is no composition rule for the compound morphisms η; but this is taken care of by the following lemmas. Lemma 5.9. In the situation of Definition 5.8, compound resolutions η of the morphism (θl , θr ) exist. Proof. The homomorphisms θ̃l and θ̃r exist because Q̃l0 and Q̃r0 are K-projective in the respective categories. The homomorphism η exists because I˜1 is K-injective. See Proposition 2.4.  In the next definition, it is crucial that the homomorphism w : B1 → B0 is central; this is guaranteed by Setup 5.7, in which we demand that w/v is a morphism ce in PDGRce : ~ . Since w is central, we get an induced DG ring homomorphism w ce ce B1 → B0 . So Proposition 2.5(2) applies. THE SQUARING OPERATION 29 Definition 5.10. In the situation of Definition 5.8, we let w̃/ṽ B̃ /à B̃ /à Rectw/v (η) : RectB00 /A00 (P 0 ) → RectB11 /A11 (P 1 ) be the morphism w̃/ṽ Rectw/v (η) := Q Homwen (w, η)  in D(B1ce ). w̃/ṽ Lemma 5.11. The morphism Rectw/v (η) is independent of the compound resolution η. Namely, if η 0 is another compound resolution of (θl , θr ), then there is equality w̃/ṽ w̃/ṽ Rectw/v (η) = Rectw/v (η 0 ) of morphisms B̃ /à B̃ /à RectB00 /A00 (P 0 ) → RectB11 /A11 (P 1 ) in D(B1ce ). Proof. Say η 0 = (Q̃00l , Q̃00r ; γ00 l , γ00 r , θ̃0 l , θ̃0 r , η 0 ). The DG modules Q̃00l and Q̃l0 are homotopy equivalent in M(B̃1 ), and under this equivalence the homomorphisms θ̃0 l : Q̃00l → P̃1l and θ̃l : Q̃l0 → P̃1l are homotopic. Likewise for “r”. Therefore the DG modules Q̃00en and Q̃en 0 are homotopy equivalent in M(B̃1en ), and under this equivalence the homomorphisms θ̃0 en : Q̃00en → P̃1en and en 0 θ̃en : Q̃en 0 → P̃1 are homotopic. This implies that the homomorphisms η and η are homotopic.  Lemma 5.12. Assume that B1 /A1 = B0 /A0 , B̃1 /Ã1 = B̃0 /Ã0 , (M1l , M1r ) = (M0l , M0r ), and all the morphisms between them are the identities. Also assume that P 1 = P 0 . Then for any compound morphism η : P 0 → P 0 above (idM0l , idM0r ), the B̃ /à id/id morphism Rectid/id (η) is the identity automorphism of RectB00 /A00 (P 0 ).  Proof. Clear. Lemma 5.13. Consider Setup 5.7, with k = 0, 1, 2. We are given a compound resolution P k of (Mkl , Mkr ) over B̃/Ã. For k = 1, 2 we are given a compound morphism η k : P k−1 → P k above (θkl , θkr ) and w̃k /ṽk . Also, we are given a compound morphism η 0,2 : P 0 → P 2 above (θ2l , θ2r ) ◦ (θ1l , θ1r ) and (w̃1 /ṽ1 ) ◦ (w̃2 /ṽ2 ). Then there is equality (w̃ /ṽ )◦(w̃ /ṽ ) w̃ /ṽ w̃ /ṽ Rect(w11 /v11 )◦(w22 /v22 ) (η 0,2 ) = Rectw22 /v22 (η 2 ) ◦ Rectw11 /v11 (η 1 ) of morphisms B̃ /à B̃ /à RectB00 /A00 (P 0 ) → RectB22 /A22 (P 2 ) in D(B2ce ). Proof. By choosing homomorphisms Q̃l0 → Q̃l1 and Q̃r0 → Q̃r1 that lift θ1l and θ1r respectively, we can concoct a “composed” morphism η 2 ◦ η 1 , well-defined up to homotopy, whose component I˜0 → I˜2 is η2 ◦ η1 . Thus (w̃ /ṽ )◦(w̃ /ṽ ) w̃ /ṽ w̃ /ṽ Rect(w11 /v11 )◦(w22 /v22 ) (η 2 ◦ η 1 ) = Rectw22 /v22 (η 2 ) ◦ Rectw11 /v11 (η 1 ). On the other hand, by Lemma 5.11 we know that (w̃ /ṽ )◦(w̃ /ṽ ) (w̃ /ṽ )◦(w̃ /ṽ ) Rect(w11 /v11 )◦(w22 /v22 ) (η 2 ◦ η 1 ) = Rect(w11 /v11 )◦(w22 /v22 ) (η 0,2 ).  30 AMNON YEKUTIELI Lemma 5.14. If w/v : B1 /A1 → B0 /A0 is a quasi-isomorphism in PDGR, and if (θl , θr ) : (M0l , M0r ) → (M1l , M1r ) w̃/ṽ is an isomorphism in D(B1 ) × D(B1op ), then Rectw/v (η) is an isomorphism in D(B1ce ). Proof. Here w : B1 → B0 , w̃en : B1en → B0en , θ̃l , θ̃r , θ̃en and η : I˜0 → I˜1 are quasi-isomorphism. According to Proposition 2.6(2), Homwen (w, η) is a quasi-isomorphism.  Proposition 5.15. Let B/A be a pair in PDGR, with K-flat resolution B̃/Ã. Let (M l , M r ) be a pair in D(B) × D(B op ). There is an object B̃/à RectB/A (M l , M r ) ∈ D(B ce ), unique up to a unique isomorphism, together with an isomorphism ' B̃/à B̃/à rect(P ) : RectB/A (M l , M r ) − → RectB/A (P ) in D(B ce ) for every compound resolution P of the pair (M l , M r ) over B̃/Ã, satisfying this condition: (†) Let P 0 and P 1 be compound resolutions of the pair (M l , M r ) over B̃/Ã, and let η : P 0 → P 1 be a compound morphism above (idM l , idM r ) and idB̃ / idà . Then the diagram B̃/à RectB/A (M l , M r ) rect(P 1 ) rect(P 0 )  B̃/à RectB/A (P 0 ) id/id Rectid/id (η) ) / RectB̃/à (P 1 ) B/A of isomorphisms in D(B ce ) is commutative. Proof. The uniqueness is clear. As for existence, let us fix some resolution P of (M l , M r ), and define B̃/à B̃/à RectB/A (M l , M r ) := RectB/A (P ). The isomorphism rect(P ) is the identity. Given any resolution P 0 of (M l , M r ), let η 0 : P → P 0 be any morphism above the identity. Define the isomorphism id/id rect(P 0 ) := Rectid/id (η 0 ). By Lemma 5.11 this does not depend on the choice of η 0 . To verify condition (†), let η 1 : P → P 1 be any morphism above the identity. Then, according to Lemma 5.13, we have id/id id/id id/id Rectid/id (η 1 ) = Rectid/id (η) ◦ Rectid/id (η 0 ).  Proposition 5.16. In the situation of Setup 5.7, with k = 0, 1 only, there is a unique morphism w̃/ṽ B̃ /à B̃ /à Rectw/v (θl , θr ) : RectB00 /A00 (M0l , M0r ) → RectB11 /A11 (M1l , M1r ) in D(B1ce ) satisfying this condition: THE SQUARING OPERATION 31 (††) For k = 0, 1 let P k be a compound resolution of (Mkl , Mkr ) over B̃k /Ãk , and let η : P 0 → P 1 be a compound morphism above (θl , θr ) and w̃/ṽ. Then the diagram w̃/ṽ B̃ /à RectB00 /A00 (M0l , M0r ) rect(P 0 )  Rectw/v (θ l ,θ r ) / RectB̃1 /Ã1 (M1l , M1r ) B1 /A1  w̃/ṽ Rectw/v (η) B̃ /à RectB00 /A00 (P 0 ) rect(P 1 ) / RectB̃1 /Ã1 (P 1 ) B1 /A1 of morphisms in D(B1ce ) is commutative. l r Proof. Choose a compound resolution P bs k of (Mk , Mk ) over B̃k /Ãk , for k = 0, 1. bs bs bs Then choose a compound morphism η : P 0 → P 1 . (The superscript “bs” stands w̃/ṽ for “basic”.) This can be done by Lemma 5.9. Let Rectw/v (θl , θr ) be the the unique morphism for which condition (††) holds, with respect to these choices. We have to prove that condition (††) holds for an arbitrary choice of compound resolutions P k and a compound morphism η. Let us choose compound morphisms η k : P bs k → P k above (idM l , idM r ) and idB̃k / idÃk . Consider the following diagram in D(B1ce ). w̃/ṽ B̃ /à RectB00 /A00 (M0l , M0r ) Rectw/v (θ l ,θ r ) rect(P bs 1 ) rect(P bs 0 )  B̃ /à RectB00 /A00 (P bs 0 ) w̃/ṽ Rectw/v (η bs ) Rectid/id (η 0 )  " B̃ /à RectB00 /A00 (P 0 )  / RectB̃1 /Ã1 (P bs 1 ) B1 /A1 id/id id/id rect(P 0 ) / RectB̃1 /Ã1 (M1l , M1r ) B1 /A1 rect(P 1 ) Rectid/id (η 1 ) w̃/ṽ Rectw/v (η)  | / RectB̃1 /Ã1 (P 1 ) B1 /A1 The top square is commutative by definition. The bottom square is commutative by Lemmas 5.9 and 5.13. The half-moons are commutative by condition (†) of Proposition 5.15. Therefore the outer paths are equal; and this is what we had to prove.  Proposition 5.17. In the situation of Setup 5.7, with k = 0, 1, 2, the diagram w̃ /ṽ B̃ /à RectB00 /A00 (M0l , M0r ) Rectw1 /v1 (θ1l ,θ1r ) 1 1 / RectB̃1 /Ã1 (M1l , M1r ) B1 /A1 w̃ /ṽ (w̃ /ṽ )◦(w̃ /ṽ ) Rect(w1 /v1 )◦(w2 /v2 ) (θ2l ◦θ1l ,θ2r ◦θ1r ) 1 1 2 2 Rectw2 /v2 (θ2l ,θ2r ) 2 2 *  B̃ /à RectB22 /A22 (M2l , M2r ) of morphisms in D(B2ce ) is commutative. If B1 /A1 = B0 /A0 , B̃1 /Ã1 = B̃0 /Ã0 , (M1l , M1r ) = (M0l , M0r ), and the morphisms w̃ /ṽ w1 /v1 , w̃1 /ṽ1 and (θ1l , θ1r ) are the identity automorphisms, then Rectw11 /v11 (θ1l , θ1r ) B̃ /à is the identity automorphism of RectB00 /A00 (M0l , M0r ). 32 AMNON YEKUTIELI Proof. The triangular diagram is commutative by Lemmas 5.9 and 5.13, with condition (††) of Proposition 5.16. The assertion about the identity automorphisms is true by Lemma 5.12.  Remark 5.18. We could have defined the rectangle object directly as B̃/à RectB/A (M l , M r ) := RHomB̃ en (B, M l ⊗Là M r ) ∈ D(B ce ), i.e. as the composition of these three functors: For × For : D(B) × D(B op ) → D(B̃) × D(B̃ op ), − ⊗Là − : D(B̃) × D(B̃ op ) → D(B̃ en ) and RHomB̃ en (B, −) : D(B̃ en ) → D(B ce ). In other words, Proposition 5.15 would have become a definition. However, this approach would have made it hard to make precise sense of the w̃/ṽ morphism Rectw/v (θl , θr ), and to prove the functoriality result (Proposition 5.17). 6. The Rectangle Operation In this section we continue with the material of Section 5, but with slightly different notation. Recall that PDGR is the category of central pairs of DG rings, and PDGR≤0 is the full subcategory of nonpositive central pairs. See Definitions 3.6 and 3.7. The main result here is Theorem 6.11. Throughout this section we work in the following setup. Setup 6.1. We are given: (1) A central morphism w/v : B 0 /A0 → B/A in PDGR≤0 (namely a morphism in PDGR≤0 ce ~ , see Definition 3.7(3)). (2) K-flat resolutions s/r : B̃/à → B/A and s0 /r0 : B̃ 0 /Ã0 → B 0 /A0 in PDGR≤0 , and morphisms w̃0 /ṽ0 , w̃1 /ṽ1 : B̃ 0 /Ã0 → B̃/à in PDGR≤0 above w/v. See Definitions 3.8, 3.9 and 3.15. (3) An object (M l , M r ) in D(B) × D(B op ), an object (M 0 l , M 0 r ) in D(B 0 ) × D(B 0 op ), and a morphism (θl , θr ) : (M l , M r ) → (M 0 l , M 0 r ) in D(B 0 ) × D(B 0 op ). The DG ring input is depicted in the following commutative diagram in the category PDGR≤0 , for i = 0, 1. B̃ 0 /Ã0 w̃i /ṽi s0 /r 0  B 0 /A0 / B̃/à s/r w/v  / B/A The four central homomorphisms, belonging to the four central pairs above, are u : A → B, u0 : A0 → B 0 , ũ : à → B̃ and ũ0 : Ã0 → B̃ 0 . From here until Lemma 6.7 (inclusive), we also assume the next condition. Condition 6.2. (i) The homomorphism ũ0 : Ã0 → B̃ 0 is noncommutative semi-free (Definition 3.11(2)). THE SQUARING OPERATION 33 (ii) The homomorphisms ṽ0 , ṽ1 : Ã0 → à are equal. In view of item (ii) in Condition 6.2, we may write ṽ := ṽ0 = ṽ1 ; this is a 0 homomorphism ṽ : Ã0 → à in DGR≤0 sc , lying above v : A → A. The DG ring input of Setup 6.1 and Condition 6.2 can be summarized as the following commutative diagrams in the category DGR≤0 /ce Ã0 , for i = 0, 1: ũ0 > B̃ 0 w◦s0  Ã0 ũ0 /B ? 0 w◦s0  Ã0 s ũ◦ṽ > B̃ w̃i  B̃ ũ◦ṽ B̃ ?B s Recall the cylinder DG ring from Definition 1.23. Lemma 6.3. Under Condition 6.2, there is a homomorphism w̃cyl : B̃ 0 → Cyl(B̃) in DGR /ce Ã0 , such that diagram (6.4) is commutative for i = 0, 1. w̃i (6.4) B̃ 0 w̃cyl s0  B0 / Cyl(B̃) ηi s Cyl(s) ◦w  / Cyl(B)  / B̃ ηi  /B Proof. We know that ũ0 : Ã0 → B̃ 0 is noncommutative semi-free, and s is a surjective quasi-isomorphism. So Theorem 4.3 applies. We obtain an Ã0 -linear DG ring homotopy γ : w̃0 ⇒ w̃1 such that s ◦ γ = 0. By Proposition 4.5 we deduce the existence of a DG ring homomorphism w̃cyl : B̃ 0 → Cyl(B̃). The formula, for b ∈ B̃ 0 , is " # w̃0 (b) ξ · γ(b) w̃cyl (b) = . 0 w̃1 (b) This shows the commutativity of the half-moon in the diagram. Next, because the element ξ commutes with the homomorphism s, and because s ◦ γ = 0, we have " #   s(w̃0 (b)) s(ξ · γ(b)) w(s0 (b)) 0 Cyl(s)(w̃cyl (b)) = = . 0 w(s0 (b)) 0 s(w̃1 (b)) We deduce the commutativity of the first square in the diagram. The second square is trivially commutative.  There are central homomorphisms  ◦ u : A → Cyl(B) and  ◦ ũ : à → Cyl(B̃), and thus two more central pairs Cyl(B)/A and Cyl(B̃)/Ã. These central pairs fit into a commutative diagram 34 AMNON YEKUTIELI w̃i /ṽ B̃ 0 /Ã0 (6.5) w̃cyl /ṽ s0 /r 0 / Cyl(B̃)/à ηi / id s/r Cyl(s)/r  B 0 /A0 (◦w)/v  / B̃/à  / Cyl(B)/A ηi / id  / B/A B w/v in the category PDGR, for i = 0, 1. Moreover, the morphisms between the pairs in the lower row are central, namely they are in PDGRce ~ . The pairs in the upper row are K-flat, and the vertical morphisms are quasi-isomorphisms. Consider the DG module Cyl(M l ) ∈ M(Cyl(B)). Define homomorphisms   m 0 η0∨ : M l → Cyl(M l ), η0∨ (m) := 0 0 and η1∨ : M l → Cyl(M l ), η1∨ (m) :=  0 0  0 . m Then ηi∨ : Forηi (M l ) → Cyl(M l ) is a homomorphism in M(Cyl(B)). Next, define a homomorphism   m n ∨ : Cyl(M l ) → M l , ∨ ( 0 ) := m0 + m1 . 0 m1 Then ∨ : For (Cyl(M l )) → M l is a homomorphism in M(B). And ∨ ◦ ηi∨ = id. All this can be done for M r too. Consider the next commutative diagram, for i = 0, 1, in the category D(B 0 ) × D(B 0 op ). (6.6) (θ l ◦∨ ,θ r ◦∨ ) (M 0 l , M 0 r ) o c  Cyl(M l ), Cyl(M r ) o (ηi∨ ,ηi∨ ) (M l , M r ) (θ l ,θ r ) Lemma 6.7. Under Condition 6.2, there is equality w̃ /ṽ w̃ /ṽ 0 1 Rectw/v (θl , θr ) = Rectw/v (θl , θr ) (6.8) of morphisms B̃/à B̃ 0 /Ã0 RectB/A (M l , M r ) → RectB 0 /A0 (M 0 l , M 0 r ) in D(B 0 ce ). Proof. Step 1. Here we assume that B 0 /A0 = B/A, B̃ 0 /Ã0 = B̃/Ã, the morphisms w/v, w̃0 /ṽ and w̃1 /ṽ are the identity automorphisms, and there is equality s0 /r0 = s/r. Also we assume that (M 0 l , M 0 r ) = (M l , M r ), and the morphism (θl , θr ) is the identity automorphism. We may also assume that w̃cyl =  ◦ w̃, but that is not important. By functoriality (Proposition 5.17), we have (6.9) w̃ /ṽ η / id w̃ /ṽ cyl i Rect◦w/v (θl ◦ ∨ , θr ◦ ∨ ) ◦ Rectηii / id (ηi∨ , ηi∨ ) = Rectw/v (θl , θr ), THE SQUARING OPERATION 35 in D(B ce ), for i = 0, 1. Compare to diagrams (6.5) and (6.6). By Lemma 5.14, all three morphisms above are isomorphisms. Some caution is needed here: the morη / id phism Rectηii / id (ηi∨ , ηi∨ ) is actually in the category D(Cyl(B)ce ), and the forgetful functor Force : D(Cyl(B)ce ) → D(B ce ) has been hidden. But but we know (see Proposition 1.24) that the DG ring homomorphism  : B → Cyl(B) induces an isomorphism ce : B ce → Cyl(B)ce . Therefore the functor Force is an equivalence. Since w̃1 = w̃0 here, formula (6.9) for i = 0, 1 leads us to conclude that η / id η / id Rectη11 / id (η1∨ , η1∨ ) = Rectη00 / id (η0∨ , η0∨ ), (6.10) as isomorphisms B̃/à Cyl(B̃)/à RectB/A (M l , M r ) → RectCyl(B)/A Cyl(M l ), Cyl(M r )  in D(Cyl(B)ce ). Step 2. Now there are no special assumptions. We choose a homomorphism w̃cyl as in Lemma 6.3. By functoriality, we again have the equalities (6.9), for i = 0, 1. Formula (6.10) from part (1) applies here, because it does not depend on B 0 /A0 . We deduce that (6.8) holds.  Here is the key technical result of the paper (the noncommutative version). Theorem 6.11 (Homotopy Invariance). In the situation of Setup 6.1, there is equality w̃0 /ṽ0 l r w̃1 /ṽ1 l r Rectw/v (θ , θ ) = Rectw/v (θ , θ ) of morphisms B̃ 0 /Ã0 B̃/à RectB/A (M l , M r ) → RectB 0 /A0 (M 0 l , M 0 r ) in D(B 0 ce ). Proof. Choose the following resolutions in PDGR≤0 : a strict K-flat resolution s♦ /id : B̃ ♦ /A → B/A, a strict noncommutative semi-free resolution s♥ /id : B̃ ♥ /à → B̃/Ã, and a strict noncommutative semi-free resolution s0 ♦ /id : B̃ 0 ♦ /Ã0 → B̃ 0 /Ã0 . These exist by Theorem 3.21. There is a homomorphism s† : B̃ ♥ → B̃ ♦ in DGR≤0 /ce à such that s♦ ◦ s† = s ◦ s♥ . For i = 0, 1 there is a homomorphism w̃i♦ : B̃ 0 ♦ → B̃ ♥ in DGR≤0 /ce Ã0 , such that s♥ ◦ w̃i♦ = w̃i ◦ s0 ♦ . These homomorphisms exist by Theorem 3.22. The resolutions and the homomorphisms between them, from the two paragraphs above, fit into the following commutative diagram in PDGR≤0 , for i = 0, 1. The central pairs B̃ 0 ♦ /Ã0 and B̃ 0 /Ã0 are K-flat resolutions of B 0 /A0 , and the central pairs B̃ ♥ /Ã, B̃ ♦ /A and B̃/à are K-flat resolutions of B/A. (6.12) 0 B̃ ♥ /à w̃i♦ /ṽi s† /r s♥ /id B̃ 0 ♦ /Ã0 s0 ♦ /id (s0 ◦s0 ♦ )/r 0 / B̃ 0 /Ã0 w̃i /ṽi s0 /r 0 %  B 0 /A0 s/r w/v $  / B̃/à  z / B/A s♦ /id B̃ ♦ /A 36 AMNON YEKUTIELI Let us introduce the temporary abbreviations B̃/à R(B̃/Ã) := RectB/A (M l , M r ), w̃ /ṽ B̃ 0 /Ã0 R(B̃ 0 /Ã0 ) := RectB 0 /A0 (M 0 l , M 0 r ), i i R(w̃i /ṽi ) := Rectw/v (θl , θr ), s† /r R(s† /r) := Rectid/id (id, id), etc. Applying functoriality (Proposition 5.17) to the commutative diagram (6.12), we obtain a commutative diagram (6.13) R(B̃ ♥ /Ã) O f R(w̃i♦ /ṽi ) R(s† /r) R(s♥ /id) x R(B̃ 0 ♦ /Ã0 ) o R(s0 ♦ /id) R(B̃ 0 /Ã0 ) o R(w̃i /ṽi ) R(B̃ ♦ /A) R(B̃/Ã) in D(B 0 ce ), for i = 0, 1. All the morphisms whose names contain the letter “s” are isomorphisms. Note that r ◦ ṽi = v ◦ r0 . We get a commutative diagram (6.14) R(w̃i♦ /ṽi ) R(B̃ ♥ /Ã) f R(s† /r) { R(B̃ 0 ♦ /Ã0 ) o R((s† ◦w̃i♦ )/(v◦r 0 )) R(B̃ ♦ /A) in D(B 0 ce ), for i = 0, 1. Because Condition 6.2 is satisfied for the morphisms of resolutions (s† ◦ w̃i♦ )/(v ◦ r0 ) : B̃ 0 ♦ /Ã0 → B̃ ♦ /A, Lemma 6.7 tells us that R((s† ◦ w̃0♦ )/(v ◦ r0 )) = R((s† ◦ w̃1♦ )/(v ◦ r0 )). Since R(y † /r) is an isomorphism, we conclude that R(w̃0♦ /ṽ0 ) = R(w̃1♦ /ṽ1 ). Going back to diagram (6.13), and using the fact that both R(s♥ /id) and R(s0 ♦ /id) are isomorphisms, we see that R(w̃0 /ṽ0 ) = R(w̃1 /ṽ1 ).  Theorem 6.15 (Existence of Rectangles). Let A be a commutative DG ring, and let A → B be a central homomorphism of nonpositive DG rings. Given a pair (M l , M r ) ∈ D(B) × D(B op ), there is a DG module RectB/A (M l , M r ) ∈ D(B ce ), unique up to a unique isomorphism, together with an isomorphism ' B̃/à rectB̃/à : RectB/A (M l , M r ) − → RectB/A (M l , M r ) for every K-flat resolution B̃/à of B/A in PDGR≤0 , such that the following condition holds. THE SQUARING OPERATION 37 (∗) Let w̃/ṽ : B̃ 0 /Ã0 → B̃/à be a morphism of K-flat resolutions of B/A in PDGR≤0 . Then the diagram RectB/A (M l , M r ) rectB̃ rectB̃/à  B̃/à RectB/A (M l , M r ) 0 /Ã0 w̃/ṽ Rectw/v (idM l ,idM r ) * 0 0 / RectB̃ /à (M l , M r ) B/A of isomorphisms in D(B ce ) is commutative. Proof. Choose a commutative semi-free resolution Ãun /Z of A/Z, and then choose a noncommutative semi-free resolution B̃un /Ãun of B/Ãun , both in PDGR≤0 . This is possible by Theorem 3.21. (The subscript “un” stands for “universal”.) Note that B̃un /Ãun is a K-flat resolution of B/A. Define B̃ /Ãun un RectB/A (M l , M r ) := RectB/A (M l , M r ). Consider any K-flat resolution B̃/à of B/A. According to Theorem 3.22 there is a morphism w̃un /ṽun : B̃un /Ãun → B̃/à of resolutions of B/A. We define B̃ /Ãun un rectB̃/à : RectB/A ' B̃/à (M l , M r ) − → RectB/A (M l , M r ) to be w̃ /ṽun un rectB̃/à := Rectid/id (idM l , idM r )−1 . Theorem 6.11 tells us that the isomorphism rectB̃/à does not depend on the choice of w̃un /ṽun . It remains to verify condition (∗). Suppose B̃ 0 /Ã0 is another K-flat resolution of B/A, and w̃/ṽ : B̃ 0 /Ã0 → B̃/à is a morphism of resolutions of B/A. Choose a morphism of resolutions 0 0 w̃un /ṽun : B̃un /Ãun → B̃ 0 /Ã0 . We have a diagram B̃ /Ãun un RectB/A O (M l , M r ) j w̃0 0 /ṽun un Rectid/id w̃un /ṽun Rectid/id (id,id) (id,id) / RectB̃ /à (M l , M r ) B/A 0 B̃/à RectB/A (M l , M r ) w̃/ṽ Rectw/v (id,id) 0 of isomorphisms in D(B ce ). Proposition 5.17 says that 0 w̃0 /ṽun un Rectid/id w̃/ṽ 0 (w̃◦w̃0 )/(ṽ◦ṽun ) (id, id) ◦ Rectw/v (id, id) = Rectid/id un (id, id). Finally, Theorem 6.11 says that 0 (w̃◦w̃0 )/(ṽ◦ṽun ) Rectid/id un w̃ /ṽun un (id, id) = Rectid/id (id, id). We that the diagram in condition (∗) is indeed commutative.  38 AMNON YEKUTIELI Remark 6.16. Let K be a regular finite dimensional noetherian commutative ring, and let A be a cohomologically pseudo-noetherian commutative DG ring (see [Ye2, Section 3]). Suppose K → A is a DG ring homomorphism, such that K → H0 (A) is essentially finite type. Let D+ f (A) be the full subcategory of D(A) consisting of DG modules whose cohomology is bounded below, and whose cohomology modules are finite over H0 (A). For M, N ∈ D+ f (A) let us write M ⊗!A/K N := RectA/K (M, N ) ∈ D(A). In [Ga], D. Gaitsgory states that when K is a field of characteristic 0, this is operation makes D+ f (A) into a monoidal category. No proof of this statement is given in [Ga]. Now assume A is a ring (so it is just a noetherian commutative ring, essentially finite type over K). According to [YZ3] and its corrections in [Ye5], there is a rigid dualizing complex RA/K over A relative to K. The functor D := RHomA (−, RA/K ) − is a duality of the category Df (A), and it exchanges D+ f (A) with Df (A). Recently L. Shaul [Sh1] showed that there is a bifunctorial isomorphism  (6.17) M ⊗!A/K N ∼ = D D(M ) ⊗LA D(N ) for M, N ∈ Dbf (A). The proof relies on the reduction formula for Hochschild cohomology [AILN, Theorem 1], [Sh2]. The isomorphism (6.17) implies that the operation − ⊗!A/K − is a monoidal structure on the subcategory Dbf (A)fid of Dbf (A) consisting of complexes with finite injective dimension. The monoidal unit is RA/K . Work in progress by Shaul indicates that the result above should hold in greater generality: A can be as in the first paragraph of the remark, and M, N can be any objects in D+ f (A). 7. The Squaring Operation In this section all DG rings are commutative; namely, we work inside the category ≤0 DGR≤0 sc . See Definition 3.3. The category PDGRsc of commutative pairs of DG rings was introduced in Definition 3.7(2); it is a full subcategory of the category PDGR of central pairs of DG rings. Definition 7.1. (1) Let B/A be an object of PDGR≤0 sc . A K-flat resolution of is a resolution s/r : B̃/ à → B/A in the sense of Definition B/A in PDGR≤0 sc 3.8, such that the pair B̃/à is commutative and K-flat (Definition 3.11(3)). (2) Morphisms of resolutions in PDGR≤0 sc , and resolutions of morphisms in ≤0 PDGRsc , are as in Definition 3.9, but all the pairs are now commutative. Proposition 7.2. Any object and any morphism in PDGR≤0 sc admits a K-flat resolution. Proof. Like the proof of Corollary 3.25, but using commutative semi-free resolutions.  For a commutative DG ring B we have B ce = B of course. This is used in the following definitions. Definition 7.3. Let B/A be a pair of commutative DG rings, and let M be a DG B-module. Given a K-flat resolution B̃/à of B/A in PDGR≤0 sc , we let B̃/à B̃/à SqB/A (M ) := RectB/A (M, M ) ∈ D(B). See Proposition 5.15. THE SQUARING OPERATION 39 Definition 7.4. Let w/v : B 0 /A0 → B/A be a morphism in PDGR≤0 sc , let M ∈ D(B), let M 0 ∈ D(B 0 ), and let θ : M → M 0 be a morphism in D(B 0 ). Given a K-flat resolution w̃/ṽ : B̃ 0 /Ã0 → B̃/à of w/v in PDGR≤0 sc , we define w̃/ṽ B̃ 0 /Ã0 B̃/à Sqw/v (θ) : SqB/A (M ) → SqB 0 /A0 (M 0 ) to be the morphism w̃/ṽ w̃/ṽ Sqw/v (θ) := Rectw/v (θ, θ) in D(B 0 ) from Proposition 5.16. Remark 7.5. As explained in Remark 5.18, we can write B̃/à SqB/A (M ) = RHomB̃ en (B, M ⊗Là M ). w̃/ṽ However, the morphism Sqw/v (θ) in Definition 7.4 is not standard, so we have to use the more explicit approach with compound resolutions, as was done in Section 5. Still, here we can simplify matters by using symmetric compound resolutions. ˜ α, β), A symmetric compound resolution of a DG B-module M is data P = (P̃ , I; consisting of a K-flat resolution α : P̃ → M in M(B̃), and a K-injective resolution β : P̃ en = P̃ ⊗à P̃ → I˜ in M(B̃ en ). Likewise, a morphism θ : M → M 0 can be resolved by a symmetric compound morphism η : P → P 0 , where η = (Q̃; γ, θ̃, η) consists of a K-projective resolution γ : Q̃ → P̃ in M(B̃ 0 ); a homomorphism θ̃ : Q̃ → P̃ 0 in M(B̃ 0 ) lifting θ; and a homomorphism η : I˜ → I˜0 in M(B̃ 0 en ) lifting θ̃ ⊗ θ̃ : Q̃ ⊗Ã0 Q̃ → P̃ 0 ⊗Ã0 P̃ 0 . Here is the key technical result of our paper (Theorem 0.3.3 in the Introduction). Actually, it is just a special case of Theorem 6.11. Theorem 7.6 (Homotopy Invariance). Let w/v : B 0 /A0 → B/A be a morphism 0 0 0 in PDGR≤0 sc , let M ∈ D(B), let M ∈ D(B ), and let θ : M → M be a mor0 0 0 phism in D(B ). Suppose B̃/à and B̃ /à are K-flat resolutions of B/A and B 0 /A0 respectively in PDGR≤0 sc , and w̃0 /ṽ0 , w̃1 /ṽ1 : B̃ 0 /Ã0 → B̃/à are morphisms of resolutions above w/v. Then the morphisms w̃ /ṽ w̃ /ṽ B̃ 0 /Ã0 B̃/à 0 0 1 1 Sqw/v (θ), Sqw/v (θ) : SqB/A (M ) → SqB 0 /A0 (M 0 ) in D(B 0 ) are equal. Proof. Take M l = M r := M , M 0 l = M 0 r := M 0 , and θl = θr := θ in Theorem 6.11.  This brings us to the first main theorem of the paper (which is Theorem 0.3.4 in the Introduction). Theorem 7.7 (Existence of Squares). Let A → B be a homomorphism of commutative DG rings, and let M be a DG B-module. There is a DG module SqB/A (M ), unique up to a unique isomorphism in D(B), together with an isomorphism ' B̃/à sqB̃/à : SqB/A (M ) − → SqB/A (M ) in D(B) for each K-flat resolution B̃/à of B/A in PDGR≤0 sc , satisfying the following condition. 40 AMNON YEKUTIELI (∗) Let w̃/ṽ : B̃ 0 /Ã0 → B̃/à be a morphism of K-flat resolutions of B/A in PDGR≤0 sc . Then there is equality w̃/ṽ Sqid/id (idM ) = sqB̃ /Ã0 ◦ (sqB̃/à )−1 B̃ 0 /Ã0 ' B̃/à 0 of isomorphisms SqB/A (M ) − → SqB/A (M ) in D(B). Proof. The proof is very similar to that of Theorem 6.15: we fix a universal K-flat resolution of B/A; but now it has to be a commutative resolution. So let Ãun /Z be a commutative semi-free resolution of A/Z, and let B̃un /Ãun be a commutative semi-free resolution of B/Ãun , both in PDGR≤0 sc . This is possible by Theorem 3.21. Define B̃un /Ãun (M ). SqB/A (M ) := SqB/A Given any K-flat resolution B̃/à of B/A in PDGR≤0 sc , Theorem 3.22 says there is a morphism of resolutions w̃un /ṽun : B̃un /Ãun → B̃/Ã. We define the isomorphism B̃ /Ãun un sqB̃/à : SqB/A ' B̃/à (M ) − → SqB/A (M ) to be w̃ /ṽun un sqB̃/à := Sqid/id (idM )−1 . The verification of condition (∗) is the same as in the proof of Theorem 6.15, except that here we use Theorem 7.6 instead of Theorem 6.11.  u v →B− →C Definition 7.8. A triple in DGR≤0 sc is the data of homomorphisms A − ≤0 in DGRsc . We refer to this triple as C/B/A. ũ ṽ A commutative K-flat resolution of C/B/A is a triple à − → B̃ − → C̃ in DGR≤0 sc , together with homomorphisms r : à → A, s : B̃ → B and t : C̃ → C in DGR≤0 sc , such that: • r is a quasi-isomorphism, and s, t are surjective quasi-isomorphisms. • s ◦ ũ = u ◦ r and t ◦ ṽ = v ◦ s. • ũ and ṽ ◦ ũ are K-flat. ũ See diagram (0.2.4) in the Introduction. A commutative K-flat resolution à − → ṽ B̃ − → C̃ can be viewed as follows: K-flat resolutions s/r : B̃/à → B/A and t/r : C̃/à → C/A in PDGR≤0 sc , and a morphism of resolutions ṽ/idà : B̃/à → C̃/à above the morphism of pairs v/idA : B/A → C/A. Proposition 7.9. Commutative K-flat resolutions of triples exist. Proof. This follows from Theorems 3.21 and 3.22. Compare to the proof of Corollary 3.25.  Here is the second main theorem of the paper (which is Theorem 0.3.5 in the Introduction). v Theorem 7.10 (Trace Functoriality). Let A → − B − → C be homomorphisms of commutative DG rings, let M ∈ D(B), let N ∈ D(C), and let θ : N → M be a morphism in D(B). There is a unique morphism Sqv/idA (θ) : SqC/A (N ) → SqB/A (M ) in D(B), satisfying the condition: THE SQUARING OPERATION 41 ṽ v (∗∗) For any commutative K-flat resolution à → B̃ − → C̃ of the triple A → B − → C, there is equality ṽ/id Sqv/idà (θ) = sqB̃/à ◦ Sqv/idA (θ) ◦ (sqC̃/à )−1 A C̃/à B̃/à of morphisms SqC/A (N ) → SqB/A (M ) in D(B). u v Proof. We begin by choosing a universal K-flat resolution of the triple A − →B− → C. We choose, in this order, commutative semi-free resolutions run /id : Ãun /Z → A/Z, sun /run : B̃un /Ãun → B/Ãun and tun /sun : C̃un /B̃un → C/B̃un . In this way we ũun ṽun u v obtain a K-flat resolving triple Ãun −− → B̃un −− → C̃un of A − →B − → C. Now we define ṽun /id Sqv/idA (θ) := (sqB̃un /Ãun )−1 ◦ Sqv/idA Ãun (θ) ◦ sqC̃un /Ãun . Let us verify condition (∗∗). We are given an arbitrary commutative K-flat ũ ṽ v resolution à − → B̃ − → C̃ of the triple A → B − → C. According to Theorem 3.22 we can find homomorphisms r̃ : Ãun → Ã, s̃ : B̃un → B̃ and t̃ : C̃un → C̃, such that the diagram below in PDGR≤0 sc is commutative. B̃un /Ãun (7.11) ṽun /id / C̃un /Ãun s̃/r̃  B̃/à sun /run t̃/r̃  / C̃/à ṽ/id  B/A tun /run t/r s/r !  } / C/A v/id Now let us look at the corresponding diagram with the squaring operation. It is a diagram in D(B). ṽ B̃un /Ãun SqB/A (M ) = O o /id un Sqv/id (θ) C̃ /Ãun un SqC/A s̃/r̃ O ] (N ) t̃/r̃ Sqid/id (id) Sqid/id (id) ṽ/id SqB/A (M ) o O B̃/à sqB̃un /Ãun Sqv/id (θ) sqB̃/à SqB/A (M ) o C̃/à SqC/A (N ) O sqC̃/à Sqv/id (θ) sqC̃un /Ãun SqC/A (N ) The top square is commutative by Proposition 5.17 (applied twice). The two half-moons are commutative by condition (∗) of Theorem 7.7. The outer paths are equal by definition of Sqv/id (θ). Because the vertical arrows are isomorphisms, we conclude that the bottom square is commutative. This is what we had to prove.  Corollary 7.12. Let B/A be a pair of commutative DG rings. The assignments M 7→ SqB/A (M ) and θ 7→ SqidB /idA (θ) are a functor SqB/A : D(B) → D(B). 42 AMNON YEKUTIELI θ θ 1 2 Proof. Consider morphisms M0 −→ M1 −→ M2 in D(B). A combination of Proposition 5.17 and condition (∗∗) of Theorem 7.10 shows that Sqid/id (θ2 ) ◦ Sqid/id (θ1 ) = Sqid/id (θ2 ◦ θ1 ).  And by Lemma 5.12, Sqid/id (idM ) = idSqB/A (M ) . Definition 7.13. The object SqB/A (M ) from Theorem 7.7 is called the square of M over B relative to A. The functor SqB/A from Corollary 7.12 is called the squaring operation over B relative to A. The following result says that the squaring operation SqB/A is also functorial in the DG ring B. Proposition 7.14. We are given homomorphisms of commutative DG rings A → v1 v2 B0 , DG modules Mk ∈ D(Bk ), and morphisms θk : Mk−1 → Mk in B1 −→ B2 −→ D(Bk ). Then Sqv2 /idA (θ2 ) ◦ Sqv1 /idA (θ1 ) = Sq(v1 ◦v2 )/idA (θ2 ◦ θ1 ), as morphisms SqB0 /A (M0 ) → SqB2 /A (M2 ) in D(B2 ). ṽ ṽ v v 2 1 2 1 Proof. Choose a K-flat resolution à → − B̃2 −→ B̃1 −→ B̃0 of A → B2 −→ B1 −→ B0 , in the obvious sense that generalizes Definition 7.8. According to condition (∗∗) of Theorem 7.10, it suffices to prove that ṽ /id ṽ /id (ṽ ◦ṽ )/id Sqv22 /id (θ2 ) ◦ Sqv11 /id (θ1 ) = Sq(v11 ◦v22 )/id (θ2 ◦ θ1 ), B̃ /à B̃ /à as morphisms SqB00 /A (M0 ) → SqB22 /A (M2 ) in D(B2 ). This is true by Proposition 5.17.  Proposition 7.15. Let A be a commutative DG ring. The action from Proposition 2.5(1) makes D(A) into an H0 (A)-linear category. Proof. Because A0 is in the center of A, and d(A0 ) = 0, we see that M(A) is an A0 linear category. See formula (1.15). Next, from formula (2.1) we see that K(A) is an H0 (A)-linear category. Hence its localization D(A) is an H0 (A)-linear category.  Given a homomorphism B → C of commutative DG rings, and objects M ∈ D(B) and N ∈ D(C), the set HomD(B) (N, M ) is an H0 (C)-module, with action coming the action of H0 (C) on N as an object of D(C), as in the proposition above. We end the paper with the next result. Theorem 7.16. In the situation of Theorem 7.10, let c ∈ H0 (C). Then Sqv/id (c · θ) = c2 · Sqv/id (θ), as morphisms SqC/A (N ) → SqB/A (M ) in D(B). Proof. Choose a K-flat resolution B̃/à of B/A. Then choose a strict commutative semi-free resolution C̃/B̃ of C/B̃. Putting them together we obtain a K-flat ṽ v resolution à → − B̃ − → C̃ of A → B − → C, where ṽ is commutative semi-free. Let ˜ P M = (P̃M , IM ; αM , βM ) be a symmetric compound resolution of M over B̃/Ã, and let P N = (P̃N , I˜N ; αN , βN ) be a symmetric compound resolution of N over C̃/Ã. See Remark 7.5 and Definition 5.8. Because P̃N is K-projective over B̃, we can find a homomorphism θ̃ : P̃N → P̃M in M(B̃) that lifts θ. We obtain a symmetric compound morphism η : P N → P M , THE SQUARING OPERATION 43 η := (P̃N ; idP̃N , θ̃, η) above θ and ṽ/idà . Specifically, the homomorphism η : I˜N → I˜M in M(B̃ en ) is a lift of θ̃ ⊗ θ̃ : P̃N ⊗à P̃N → P̃M ⊗à P̃M . By Proposition 5.16, Sqv/id (θ) is represented by Homven (v, η) : HomC en (C, I˜N ) → HomB en (B, I˜M ). We remind that B̃ en = B̃ ⊗à B̃ op and C̃ en = C̃ ⊗à C̃ op . Now choose some c̃ ∈ C̃ 0 that represents the cohomology class c ∈ H0 (C) ∼ = 0 H (C̃). Then c̃ · θ̃ : P̃N → P̃M lifts c · θ : N → M , and (c̃ ⊗ c̃) · η : I˜N → I˜M lifts (c̃ · θ̃) ⊗ (c̃ · θ̃). We get a symmetric compound morphism η c : P N → P M ,  η c := P̃N ; idP̃N , c̃ · θ̃, (c̃ ⊗ c̃) · η resolving c · θ. But then the homomorphism Homven (v, (c̃ ⊗ c̃) · η) = Homven (c̃2 · v, η) = c̃2 · Homven (v, η) represents Sqv/id (c · θ).  This theorem shows that the functor SqB/A is a quadratic functor. References [AFH] L.L. Avramov, H.-B. Foxby and S. Halperin, Differential Graded Homological Algebra, preprint dated 21 June 2006, available from the authors. [AILN] L.L. Avramov, S.B. Iyengar, J. Lipman and S. Nayak, Reduction of derived Hochschild functors over commutative algebras and schemes, Advances in Mathematics 223 (2010) 735-772. [AIL] L.L. Avramov, S.B. Iyengar and J. Lipman, Reflexivity and rigidity for complexes, I. Commutative rings, Algebra and Number Theory 4:1 (2010). [BL] J. Bernstein and V. Lunts, Equivariant Sheaves and Functors, Lecture Notes in Mathematics 1578, Springer, 1994. [BN] M. Bokstedt and A. Neeman, Homotopy limits in triangulated categories, Compositio Math. 86 (1993), 209-234. [BP] H.-J. Baues and T. Pirashvili, Shukla cohomology and additive track theories, eprint arXiv:math/0401158. [Ga] D. Gaitsgory, Ind-coherent sheaves, eprint arXiv:1105.4857. [Hi] V. Hinich, Homological algebra of homotopy algebras, Communications in Algebra 25 (1997), 3291-3323. Erratum arXiv:math/0309453. [Ke1] B. Keller, Deriving DG categories, Ann. Sci. École Norm. Sup. (4) 27(1) (1994), 63-102. [Ke2] B. Keller, On the cyclic homology of exact categories, Journal of Pure and Applied Algebra 136 (1999), 1-56. Correction at author’s web page. [Ke3] B. Keller, A-infinity algebras, modules and functor categories, eprint arXiv:math/0510508v3. [Mi] J.S. Milne, “Étale Cohomology”, Princeton University Press, 1980. [ML] S. Maclane, “Homology”, Springer-Verlag, 1994 (reprint). [RD] R. Hartshorne, “Residues and Duality,” Lecture Notes in Math. 20, Springer-Verlag, Berlin, 1966. [Sh1] L. Shaul, The Hochschild category of commutative algebras via twisting, eprint arXiv:1401.6678, to appear in Comm. Algebra. [Sh2] L. Shaul, Reduction of Hochschild cohomology over algebras finite over their center, J. Pure and Applied Algebra 219 (2015), 4368-4377. [ScSh] S. Schwede and B.E. Shipley, Algebras and Modules in Monoidal Model Categories, Proc. London Math. Soc. (3) 80 (2000), 491-511. [Sp] N. Spaltenstein, Resolutions of unbounded complexes, Compositio Math. 65 (1988), no. 2, 121-154. [SP] “The Stacks Project”, an online reference, J.A. de Jong (Editor), http://stacks.math. columbia.edu. [VdB] M. Van den Bergh, Existence theorems for dualizing complexes over non-commutative graded and filtered ring, J. Algebra 195 (1997), no. 2, 662-679. [Ye1] A. Yekutieli, Rigid Dualizing Complexes via Differential Graded Algebras (Survey), in “Triangulated Categories”, LMS Lecture Note Series 375, 2010. 44 AMNON YEKUTIELI [Ye2] [Ye3] [Ye4] [Ye5] [Ye6] [Ye7] [YZ1] [YZ2] [YZ3] A. Yekutieli, Duality and Tilting for Commutative DG Rings, eprint arXiv:1312.6411. A. Yekutieli, Residues and Duality for Schemes and Stacks, lecture notes, at: http: //www.math.bgu.ac.il/~amyekut/lectures/resid-stacks/handout.pdf. A. Yekutieli, A Course on Derived Categories, http://arxiv.org/abs/1206.6632. A. Yekutieli, Rigid Complexes over Commutative Rings, Revisited, in preparation. A. Yekutieli, Rigidity, Residues and Duality for Schemes, in preparation. A. Yekutieli, Rigidity, Residues and Duality for DM Stacks, in preparation. A. Yekutieli and J.J. Zhang, Dualizing Complexes and Perverse Sheaves on Noncommutative Ringed Schemes, Selecta Math. 12 (2006), 137-177. A. Yekutieli and J.J. Zhang, Rigid Complexes via DG Algebras, Trans. AMS 360 no. 6 (2008), 3211-3248. A. Yekutieli and J.J. Zhang, Rigid Dualizing Complexes over Commutative Rings, Algebras and Representation Theory 12, Number 1 (2009), 19-52 Department of Mathematics, Ben Gurion University, Be’er Sheva 84105, Israel E-mail address: [email protected]
0math.AC
A Popperian Falsification of AI - Lighthill’s Argument Defended Steven Meyer [email protected] February 15, 2017 Abstract The area of computation called artificial intelligence (AI) is falsified by describing a previous 1972 falsification of AI by British applied mathematician James Lighthill. It is explained how Lighthill’s arguments continue to apply to current AI. It is argued that AI should use the Popperian scientific method in which it is the duty of every scientist to attempt to falsify theories and if theories are falsified to replace or modify them. The paper describes the Popperian method in detail and discusses Paul Nurse’s application of the method to cell biology that also involves questions of mechanism and behavior. Arguments used by Lighthill in his original 1972 report that falsifed AI are discussed. The Lighthill arguments are then shown to apply to current AI. The argument uses recent scholarship to explain Lighthill’s assumptions and to show how the arguments based on those assumptions continue to falsify modern AI. An iimportant focus of the argument involves Hilbert’s philosophical programme that defined knowledge and truth as provable formal sentences. Current AI takes the Hilbert programme as dogma beyond criticism while Lighthill as a mid 20th century applied mathematician had abandoned it. The paper uses recent scholarship to explain John von Neumann’s criticism of AI that I claim was assumed by Lighthill. The paper discusses computer chess programs to show Lighthill’s combinatorial explosion still applies to AI but not humans. An argument showing that Turing Machines (TM) are not the correct description of computation is given. The paper concludes by advocating studying computation as Peter Naur’s Dataology. 1. Introduction This paper applies the method of falsification discovered by Karl Popper to show that artificial intelligence (AI) programs are not intelligent and in fact are just normal computer programs in which programmers express their ideas by writing computer code. AI is meaningless metaphysics in the Popperian sense of metaphysics based on a number of incorrect assumptions and dogmas that was falsified by James Lighthill in his evaluation of AI for the British science funding agency (Lighthill[1972]). This paper defends Lighthill’s 20th century falsification of AI and explains how it applies to current AI. This paper presents material the author developed from being encouraged to criticize AI as a 1960s Stanford University undergraduate and from a talk given to Paul Feyerabend’s philosophy of science seminar while the author was a computer science (CS) student at UC Berkeley. In order to understand why Lighthill’s criticism falsifies AI and why his arguments still apply to AI now in the second decade of the 21st century in spite of vast improvements in computer speed and capacity, it is necessary to understand the development of modern computers primarily by physicists after WWII. The paper uses recent historical scholarship to explain Lighthill’s background assumptions and shows how that background knowledge also falsifies current AI. 2. What is Popperian falsification Falsification is a method discovered by Karl Popper that argues general statements do not -2- have scientific merit. Only singular statements Popper calls basic statements that have simple structure have meaning. Such statements can be disproven either by scientific experiments or by logic (Popper[1968], p. 74). Popper’s major contribution to the philosophy of science is to insist that it is the duty of every scientist to criticizes one’s own theories to the fullest extent possible so that false theories can be modified or replaced. Popperians believe scientific method consists of numerous bold conjectures that are then tested and if falsified, eliminated or modified. Popper’s method calls for bold conjecture followed by stringent criticism. Popper’s original falsification theory developed in the late 1920s and early 1930s is called naive falsification (Lakatos[1999], pp. 64-85). The theory was improved and generalized by Popper and his colleagues during most of the 20th century. I am using the term Popperian philosophy in a sense that includes the modifications and improvement to Popper’s theory mostly carried out at the London School of Economics not just by Popper but also by: Imre Lakatos, Paul Feyerabend and Thomas Kuhn. The other aspects of Popperian methodology is most clearly expressed by Imre Lakatos as the Methodology of Scientific Research Programmes (MSRP) (Lakatos[1970]). There were disagreements among the Popperians about questions of emphasis but not about methodology or importance of rationality in science. James Lighthill, as holder of the Lucasian chair in applied mathematics at Cambridge University, was familiar with and part of the milieu that developed Popperian theory. Falsification as a theory in the philosophy of science is usually discussed in terms of physics because the developers were trained as physicists. Physics is possibly not a good fit for study of AI methodology because there is no mechanism or functional explanation involved in attempting to understand physical reality (describe fields or particle interactions for example). The connection to cell biology that attempts to understand and utilize the mechanisms of cell behavior is closer. Paul Nurse in his 2016 Popper Memorial Lecture discusses the importance of bold conjectures and diligent attempts to eliminate incorrect theory by falsification (Nurse[2016]). Nurse also discussed data analysis in cell biology. For readers unfamiliar with Popperian falsification, the Nurse lecture provides an excellent introduction. Falsification of AI is important because it is claimed that computational intelligence is now so successful that discussions of ethical issues involving how inferior humans will deal with the superior intellect of AI robots are required. The author believes the primary obligation of scientists is to eliminate false theories. 3. Lighthill’s falsification of AI Lighthill’s falsification of AI is quite simple (Lighthill[1972]) and I claim continues to apply to AI in spite of changes mostly in vastly faster computers that execute machine instructions in parallel and new names for algorithms such as "deep learning" that replaces alpha beta heuristics to improve logic resolution algorithms to implement intelligence. Lighthill argues AI is just CS described using the language of human intelligence and views computers and computation as tools for expressing people’s ideas. Lighthill divides AI into three areas. Category A: Automation (feedback control engineering), Category C: computer based studies of the central nervous system, and Category B: the bridge area between A and B this is supposedly going to provide the magic synergy that allow creation of intelligent robots (p. 3). For example, current deep learning would fall into areas A and B. It falls into category B because it involves automatic logical deduction without any need for a person to program ideas into the algorithm, but also it is in category A because it "looks beyond conventional data processing to the problems involved in large-scale data banking and retrieval." (p. 5) I think Lighthill is arguing here that AI studies normal computer science but -3- rephrases problems in terms of human attributes (p. 7 paragraph 2). According to Lighthill for control engineering it should not matter how the engineering is accomplished. Lighthill writes in the section discussing category A: "Nevertheless it (AI) must be looked at as a natural extension of previous work of automation of human activities, and be judged by essentially the same criteria." (p. 4 paragraph 4). After more than 40 years of computer development, programmable digital computers are usually the best choice for control engineering. In modern terms current feedback control engineering is based on improvements in camera technology allowing more precise location measurements and more complex feedback. Advances and cost reductions in computer and storage technology allow large amounts of data to be processed faster and at lower cost. In criticizing AI’s approach to area C since obviously it makes sense to study neurophysiology, Lighthill distinguishes syntactic automation as advocated currently by AI versus conceptual automation (p. 6). He asks if "a device that mimics some human function somehow assists in studying and making a theory of the function of the central nervous system." (p. 6 paragraph 4) Lighthill criticizes the use of mathematical logic in AI by arguing practical use runs into a combinatorial explosion (p. 10 paragraph 5) and argues there are difficulties in storing axioms favored by logicians versus heuristic knowledge favored by AI (p. 10, paragraph 6). In my view this is the crucial falsifier of AI. Namely, although Lighthill was attempting to provide a neutral assessment of AI, he did not believe in the Hilbert Programme that is the central tenet of AI. Lighthill also discusses organization problems with AI methodology. He questions claims such as "robots better than humans by 2000" (p. 13) (now probably replace with 2030). Lighthill as an applied mathematician also discusses the combinatorial explosion that humans solve but can not be solved by formal algorithms. 3.1 Understanding Lighthill’s falsification in modern terms In 1972 Lighthill falsified AI by showing its individual claims were false and by arguing there was no unified subject but rather just normal problems in the are of computation involving computer applications and study of data. AI researchers were not convinced at the time, I think, because Lighthill did not make his Popperian view of science clear. The remainder of this paper discusses how 1970s scientific background knowledge especially in the physics and applied mathematics areas falsifies current AI methods. The discussion is possible because of recent scholarship especially in the areas of Hilbert’s philosophical programme and in the study of John von Neumann’s thinking during the development of digital computers. 4. Skepticism toward Hilbert’s programme of truth as formal proof In the 1920s, mathematician David Hilbert conjectured that knowledge and truth consists solely of all sentences that can be proven from axioms. Hilbert’s original conjecture was a mathematical problem. However, it was interpreted as a philosophical theory in which truth became formal proof from axioms. A paradigmatic example is the Birkhoff and Von Neumann formalization of quantum mechanics as axiomatized logic (Birkhoff[1936], Popper]1968] attempted to falsify it). Hilbert’s programme as the basic assumption of AI is that knowledge about the world can be expresses as formal sentences. Knowledge is then expressed as formulas that can be derived using logic (usually predicate calculus) from other sentences about the world that are true. In addition to the belief that knowledge is formal sentences, the foundation of AI is the belief that the Church’-Turing Thesis (Copeland[2015]) is true. Namely, that nothing can exist -4- outside of formally proven sentences. proven from axioms. In the AI community this dogma is beyond criticism. However, the philosophical Hilbert programme was abandoned starting in the 1930s for various reasons. The reason most often given is that Goedel’s incompleteness results showed the Hilbert programme could not succeed. The Hilbert programme is still believed in the logic area and AI seems to be grasping at the straw of attempts to mitigate the Goedel disproof by finding in practice areas where Goedel’s results do not apply. Zach[2015] Stanford Encyclopedia of Philosophy article discusses some attempts to mitigate Goedel’s results. See Detlefsen[2017]) for a more skeptical view of Hilbert’s programme. There were a number of other reasons Hilbert’s philosophical programme was rejected. These other reasons explain why the AI argument that since people have intelligence computer programs can also have intelligence. In the view of AI, the problem is just building faster computers and developing better algorithms so that computers can discover and learn the formal sentences in people’s heads. In fact the other reasons the Hilbert programme was abandoned show why Lighthill’s falsification is correct and why AI is meaningless metaphysics. 4.1 Von Neumann’s argument automata and neural networks useless at high levels of complexity During the second half of the 20th century, John von Neumann’s work on computers and computations was widely accepted. Publication of Von Neumann’s work on computing did not occur until years after Lighthill’s falsification was written (in particular Aspray[1990], Neumann[2005] and Kohler[2001]). However Lighthill as an applied mathematician was certainly familiar with Von Neumann’s work. John Von Neumann studied automata and neural networks when he was developing his Von Neumann computer architecture. Von Neumann combined all his skepticism toward linguistics and automata as sources of AI algorithms in discussing problems with formal neural networks when he wrote: The insight that a formal neuron network can do anything which you can describe in words a very important insight and simplifies matters enormously at low complication levels. It is by no means certain that it is a simplification on high complication levels. It is perfectly possible that on high complication levels the value of the theorem is in the reverse direction, namely, that you can express logics in terms of these efforts and the converse may not be true (Von Neumann[1966], quoted in Aspray[1990], note 94, p. 321). Von Neumann also considered and rejected current AI methodology when he developed the Von Neumann computer architecture. In a 1946 paper with Herman Goldstine on the design of a digital computer Von Neumann believed that some sort of intuition had to be built into programs instead of using brute force searching (Aspray[1990], p. 62). Edward Kohler (Kohler[2000]), p. 118) describes von Neumann’s discovery in developing modern computer architecture in an article "Why von Neumann Rejected Carnap’s Duality of Information Concepts" as: Most readers are tempted to regard the claim as trivial that automata can simulate arbitrarily complex behavior, assuming it is described exactly enough. But in fact, describing behavior exactly in the first place constitutes genuine scientific creativity. It is just such a prima facie superficial task which von Neumann achieved in his [1945] famous explication of the "von Neumann machine" regarded as the standard architecture for most post World-War-II computers. The problem context in the area of operations research solution space searching that influenced both von Neumann and Lighthill was pre computer algorithmic operations research experience (see Budiansky[2013] for the detailed story). Understanding the limitations of -5- combinatorial explosion arises naturally from that experience. 4.2 Skepticism toward linguistics and formal languages in computing Starting with Ludwig Wittgenstein in the late 1930s, skepticism toward linguistics and especially formal languages become prevalent. Wittgenstein’s claim was that mathematical (and other) language was nothing more than pointing (Wittgenstein[1930]). The Popperians and English science in general were receptive to Wittgenstein and his "pointing" philosophy of mathematics. Popperians avoid linguistic philosophy because they viewed it as creating more problems than it solved. I read Lighthill’s falsification as assuming this attitude toward language. Modern AI still claims knowledge and truth is limited to provable formal sentences. 5. Physicist skepticism towards mathematics as axiomatized logic In my view there was a more important reason for the rejection of Hilbert’s programme. Physicists were always skeptical toward axiomatized mathematics. Albert Einstein in his 1921 lecture on geometry expresses this skepticism. Einstein believed that formal mathematics was incomplete and disconnected from physical reality. Einstein stated: This view of axioms, advocated by modern axiomatics, purges mathematics of all extraneous elements. ... such an expurgated exposition of mathematics makes it also evident that mathematics as such cannot predicate anything about objects of our intuition or real objects (Einstein[1921]). Niels Bohr argued that first comes the conceptual theory then the calculation. 6. Finsler’s rejection of axiomatics and general 1926 inconsistency result In addition to skepticism toward axiomatics, there was also skepticism toward set theory and its core claim that only sentences that are derivable from axioms (Zermelo Fraenkel probably) can exist. Swiss mathematician Paul Finsler believed that mathematics exists outside of language (formal sentences). Finsler claimed to have shown incompleteness in formal systems before Goedel in 1925 and that his proof was superior because it was not tied to Russell’s logic as Goedel’s was. See "A Restoration the failed: Paul Finsler’s theory of sets" in Breger[1996], p. 257 for discussion of Finsler’s result on undecidability and formal proofs and its history (also Finsler[1996] and Finsler[1969]. 7. Chess - elite human players response to chess programs Superiority of chess programs over even the best human chess players is cited as evidence that in the future AI robots will be superior in all areas involving intelligence. In fact the situation is more complicated. The response by the world’s best chess players shows that Lighthill’s claims that even in a formal sentenced based toy world, combinatorial explosion limits problem solving ability of algorithms. Study of chess playing programs and evaluation of their efficacy show the problems with recent claims of AI successes in general. In 1997, the Deep Blue chess program defeated then world champion Gary Kasperov. Since then the world’s best chess players have adjusted to computer chess programs. In the December 31 Financial Times newspaper chess column, Leonard Barton referring to US champion Fabiano Caruana writes: The US champion and world No. 2 unleashed a brilliant opening novelty, which incidentally showed the limitations of the most powerful computers (Barton[2016]). It has taken two decades and Caruana was only five years old when Kasperov lost to Deep Blue, but it appears computer algorithms will run into the combinatorial explosion problems and more -6- and more of the best players will defeat computers. Possibly more interesting is how the claims show problems with AI scientific methodology and emphasize the lack of diligent attempts to falsify AI theory. First, the financial incentive structure of the challenge meant that Kasperov made more money by losing rather than by winning. From Kasperov’s viewpoint he could win and go back to collecting meager chess tournament prize money or lose and collect a large appearance fee plus receiving numerous other appearance fees as a marketing representative. Many AI claims of success involving human competition with computers follow this pattern. At a minimum, AI tests of this type need to use double blind protocols. A better method for determining if computers can defeat the best human players would be to use double blind tournaments where opponents may be humans or computers and participants and officials were not allowed to know who was who. Even better would be a system where chess player’s natural competitiveness was utilized so that losing to a lower rated human player would result in a large deduction of rating points. Finally, progress in chess playing computer programs shows that chess programs are normal data processing applications in the Lighthill sense in which human knowledge of chess can be expressed and amplified by injecting it into a computer by writing a computer program. 8. Turing Machine incorrect model for computation The central argument for AI is based on the Church Turing thesis. Namely that Turing machines (TM) are universal and anything that involves intelligence can be calculated by TMs. Applying Lighthill’s combinatorial explosion arguments, it seems to me that TMs are the wrong model of computation. Instead a different computational model called MRAMS (random access machines with unit multiply and a bounded number of unbounded size memory cells) is a better model of computation (Meyer[2016]). Von Neumann understood the need for random access memory in his design of the von Neumann architecture (ibid. pp. 5-6). For MRAM machines deterministic and non deterministic computations are both solvable in polynomial bound time so at least for some problems in the class NP, the combinatorial explosion is mitigated. This suggests that algorithms should be studied as normal data processing because AI’s assumption that heuristics and guessing will somehow improve algorithms is problematic. 9. Conclusion - suggestion to replace AI with Naur’s Dataology A problem with this paper is that people trained to perform advanced computational research before the 1970s primarily by physicists can’t imagine AI as having any content, but people trained after CS became formalized as object oriented programming, computer programs verified by correctness proofs and axiomatized proofs of algorithm efficiency can’t imagine anything but computation as formalized logic. Computation researchers trained after the 1970s are unable to imagine alternatives to the AI dogmas. My suggestion is to adopt the ideas of Danish computer scientist, who was trained as an astronomer, Peter Naur. Naur argued that computation should be studied as Dataology. Dataology is a theory neutral term for studying data. Naur wrote "mental life during the twentieth century has become entirely misguided into an ideological position such that only discussions that adopt the computer inspired form" are accepted. (Naur[2007], 87). In the 1990s, Peter Naur, one of the founders of computer science, realized that CS had become too much formal mathematics separated from reality. Naur advocated the importance of programmer specific program development that does not use preconceptions. I would put it as computation allows people to express their ideas by writing computer programs. The clearest explanation for Naur’s method appears in the book Conversations - Pluralism -7- in Software Engineering (Naur[2011]). This books amplifies the program development method Naur described in his 2005 Turing Award lecture (Naur[2007]). In Naur[2011] page 30, the interviewer asks "... you basically say that there are no foundations, there is no such thing as computer science, and we must not formalize for the sake of formalization alone." Naur answers, "I am not sure I see it this way. I see these techniques as tools which are applicable in some cases, but which definitely are not basic in any sense." Naur continues (p. 44) "The programmer has to realize what these alternatives are and then choose the one that suits his understanding best. This has nothing to do with formal proofs." Dataology without preconceptions and predictions of imminent replacement of human intelligence by robots would improve the scientific study of computation. The next step for advocates of AI would be to try to falsify Naur’s Dataology. 10. References Aspray[1990] Barton[2016] Birkhoff[1936] Breger[1992] Budiansky[2013] Copeland[2015] Aspray, W. John von Neumann and The Origins of Modern Computing. MIT Press, 1990. Barton, L. Chess column, Financial Times. Games page weekend life and style section, Dec. 30 and Jan. 1 edition, 2016. Birkhoff, G. and Von Neumann, J. The Logic of Quantum Mechanics. Annals of Math. 27, no. 4 (1936), 721-734. Breger, H. A Restoration that failed: Paul Finsler’s theory of sets. In Gillies, D. ed. Revolutions in Mathematics. Oxford, 1992, 249-264. Budiansky, S. Blackett’s War: The Men Who Defeated the Nazi U-Boats and Brought Sciene to the Art of Warfare. Knopf, 2013. Copeland, J. The Church-turing thesis. The Stanford Encyclopedia of Philosophy (Summer 2015 Edition), 2015. URL Feb. 2017: plato.stanford.edu/archives/sum2015/entries/church-turing Detlefsen[2017] Detlefsen, M. Encyclopedia Hilbert’s programme of Philosophy. www.rep.routledge.com/articles/thematic/ formalism/v-1 Einstein[1921] and formalism. Routledge Feb. 2017 URL: Hilbert’s-programme-and- Einstein, A. Geometry and Experience. Lecture before Prussian Academy of Sciences. Berlin, January 27, 1921, Feb. 2017 URL: www.relativitycalculator.com/pdfs/einstein_geometry_and_experience_1921.pdf Finsler[1969] Finsler[1996] Kohler[2001] Lakatos[1970] Lakatos[1999] Lighthill[1973] Finsler, P. Ueber die Unabhaengigkeit der Continuumshypothese. Dialectica 23, 1969, 67-78. Finsler, P. Finsler set theory: Platonism and circularity. D. Booth and R. Ziegler eds. Birkhauser, 1996. Kohler, E. Why Von Neumann Rejected Carnap’s Duality of Information Concepts. In Redei, M. and Stoltzner, M. eds. John von Neumann and the Foundations of Quantum Physics. Vienna Circle Institute Yearbook 8, Kluwer, 2001, 97-134. Lakatos, I. Falsification and the methodology of scientific research programmes. in I. Lakatos and A. Musgrave eds. Criticism and the growth of knowledge., Cambridge Press, 1970, 91-196. Lakatos, I. and Feyerabend P. For and against method. M. Motterlini ed. University of Chicago Press, 1999. Lighthill, J. "Artificial Intelligence: A General Survey" in Artificial Intelligence: a paper symposium. UK Science Research Council, 1973. URL Feb. 2017: -8- www.math.snu.ac.kr/~hichoi/infomath/Articles/Lighthill%20Report.pdf Meyer[2013] Meyer[2016] Naur[1995] Naur[2005] Meyer, S. Adding Methodological Testing to Naur’s Anti-formalism. IACAP 2013 Proceedings, College Park Maryland, 2013. Meyer, S. Philosophical Solution to P=?NP: P is equal to NP, ArXiv:1603:06018, 2016, also solution No. 113 on the P-versus-NP page. Naur, P. Knowing and the mystique of logic and rules. Kluwer Academic, 1995. Naur, P., 2005. "Computing as science", in An anatomy of human mental life. naur.com Publishing, Appendix 2, 208-217, 2005. URL Feb. 2017: www.Naur.com/Nauranat-ref.html Naur[2007] Naur[2011] Neumann[2005] Nurse[2016] Naur, P. Computing versus human thinking. Comm. ACM 50(1), 2007, 85-94. Naur, P. Conversations - pluralism in software engineering. E. Daylight ed. Belgium:Lonely Scholar Publishing, 2011. Von Neumann, J. Redei, M. ed. John Von Neumann: Selected Letters. History of Mathematics Series, Vol. 27, American Mathematical Society, 2005. Nurse, P. "How Philosophy Drives Discovery: A scientists view of Popper" 2016 Popper Memorial Lecture, London School of Economics Podcast, 2016. URL Feb. 2017: http://richmedia.lse.ac.uk/publiclecturesandevents/20160928_1830_howPhilosophyDrivesDiscovery.mp3 Popper[1934] Popper[1968] Wittgenstein[1939] Zach[2015] Popper, K. The Logic of Scientific Discovery. Harper Row, 1968 (original in german 1934). Popper, K. Birkhoff and Von Neumann’s Interpretation of Quantum Mechanics. Nature 219(1968), 682-685. Wittgenstein, L. Wittgenstein’s Lectures on the foundations of mathematics Cambridge 1939. C. Diamond ed. University of Chicago Press, 1939. Zach, R. Hilberts Program. The Stanford Encyclopedia of Philosophy (Spring 2016 Edition), 2016. URL Feb. 2017: https://plato.stanford.edu/entries/hilbert-program/
2cs.AI
MIS in the Congested Clique Model in O(log log ∆) Rounds⋆ Christian Konrad arXiv:1802.07647v1 [cs.DC] 21 Feb 2018 Department of Computer Science, Centre for Discrete Mathematics and its Applications (DIMAP), University of Warwick, Coventry, UK, [email protected] Abstract. We give a maximal independent set (MIS) algorithm that runs in O(log log ∆) rounds in the congested clique model, where ∆ is the maximum degree of the input graph. This improves log ∆ √ upon the O( log(∆)·log + log log ∆) rounds algorithm of [Ghaffari, PODC ’17], where n is the log n number of vertices of the input graph. In the first stage of our algorithm, we simulate the first O( polynlog n ) iterations of the sequential random order Greedy algorithm for MIS in the congested clique model in O(log log ∆) rounds. This thins out the input graph relatively quickly: After this stage, the maximum degree of the residual graph is poly-logarithmic. In the second stage, we run the MIS algorithm of [Ghaffari, PODC ’17] on the residual graph, which completes in O(log log ∆) rounds on graphs of poly-logarithmic degree. 1 Introduction The LOCAL and CONGEST Models. The LOCAL [19,23] and CONGEST [23] models are the most studied computational models for distributed graph algorithms. In these models, a communication network is represented by an n-vertex graph G = (V, E), which also constitutes the input to a computational graph problem. Each vertex (or network node) v ∈ V hosts a computational unit and is identified by a unique ID ∈ Θ(log n). Initially, besides its ID, every vertex knows its neighbors (and their IDs). All network nodes simultaneously commence the execution of a distributed algorithm. Such an algorithm proceeds in synchronous rounds, where each round consists of two phases. In the computation phase, every vertex may execute unlimited computations. This is followed by the communication phase, where vertices may exchange individual messages with their neighbors. While message lengths are unbounded in the LOCAL model, in the CONGEST model every message is of length O(log n). The goal is to design algorithms that employ as few communication rounds as possible. The output is typically distributed. For independent set problems, which are the focus of this paper, upon termination of the algorithm, every vertex knows whether it participates in the independent set. The LOCAL model provides an abstraction that allows for the study of the locality of a distributed problem, i.e., how far network nodes need to be able to look into the network in order to complete a certain task. In addition to the locality constraint, the CONGEST model also addresses the issue of congestion. For example, while in the LOCAL model, network nodes can learn their distance-r neighborhoods in r rounds, this is generally not possible in the CONGEST model due to the limitation of message sizes. The CONGESTED-CLIQUE Model. In recent years, the CONGESTED-CLIQUE model [20], a variant of the CONGEST model, has received significant attention (e.g. [13,8,14,9,17,4,12,5,11,18]). It differs from the CONGEST model in that every pair of vertices (as opposed to only every pair of adjacent vertices) can exchange messages of sizes O(log n) in the communication phase. The focus of this model thus solely lies on the issue of congestion, since non-local message exchanges are now possible. This model is at least as powerful as the CONGEST model, and many problems, such as computing a minimum spanning tree [13,9] or computing the size of a maximum ⋆ C. Konrad is supported by the Centre for Discrete Mathematics and its Applications (DIMAP) at Warwick University and by EPSRC award EP/N011163/1. matching [17], can in fact be solved much faster than in the CONGEST model. In [8], Ghaffari asks whether any of the classic local problems - maximal independent set (MIS), maximal matching, (∆ + 1)-vertex-coloring, and (2∆ − 1)-edge-coloring - can be solved much faster in the CONGESTED-CLIQUE model than in the CONGEST model, where ∆ is the maximum degree of log ∆ √ +log log ∆) the input graph. Ghaffari made progress on this question and gave a O( log(∆)·log log n rounds MIS algorithm in the CONGESTED-CLIQUE model, while the best known CONGEST √ model algorithm runs in O(log ∆) + 2O( log log n) rounds [7]. This algorithm separates q the two models with regards to the MIS problem, since it is known that Ω(min{ logloglog∆∆ , rounds are required for MIS in the CONGEST model [16,15] 1 . log n log log n }) Result. While Ghaffari gave a roughly quadratic improvement over the best CONGEST model MIS algorithm, in this paper, we show that an exponential improvement is possible. Our main result is as follows: Theorem 1 (Main Result). Let G = (V, E) be a graph with maximum degree ∆. There is a randomized algorithm in the CONGESTED-CLIQUE model that operates in (deterministic) O(log log ∆) rounds and outputs a maximal independent set in G with high probability. Techniques. Ghaffari gave a variant of his MIS algorithm that runs in O(log log ∆) rounds on graphs G with poly-logarithmic maximum degree, i.e., ∆(G) = O(polylog n) (Lemma 2.15. in [8]) 2 . To achieve a runtime of O(log log ∆) rounds even on graphs with arbitrarily large maximum degree, we give a O(log log ∆) rounds algorithm that computes an independent set I such that the residual graph G \ ΓG [I] (ΓG [I] denotes the inclusive neighborhood of I in G) has poly-logarithmic maximum degree. We then run Ghaffari’s algorithm on the residual graph to complete the independent set computation. Our algorithm is an implementation of the sequential Greedy algorithm for MIS in the CONGESTED-CLIQUE model. Greedy processes the vertices of the input graph in arbitrary order and adds the current vertex to an initially empty independent set if non of its neighbors have previously been added. The key idea is to simulate multiple iterations of Greedy in O(1) √ rounds in the CONGESTED-CLIQUE model. A simulation of n iterations in O(1) rounds can be done as follows: Let v1 v2 . . . vn be an arbitrary ordering of the vertices (e.g. by their IDs). √ Observe that the subgraph G[{v1 , . . . , v√n }] induced by the first n vertices has at most n edges. Lenzen gave a routing protocol that can be used to collect these n edges at one distinguished √ vertex u in O(1) rounds. Vertex u then simulates the first n iterations of Greedy locally (observe that the knowledge of G[{v1 , . . . , v√n }] is sufficient to do this) and then notifies the nodes chosen into the independent set about their selection. √ The presented simulation can be used to obtain a O( n) rounds MIS algorithm in the CONGESTED-CLIQUE model. To reduce the number of rounds to O(log log n), we identify a residual sparsity property of the Greedy algorithm: If Greedy processes the vertices in uniform random order, then the maximum degree of the residual graph after having processed the kth vertex is O( nk log n) with high probability (Lemma 1). To make use of this property, we will thus first compute a uniform random ordering of the vertices. Then, after having processed √ √ the first n vertices as above, the maximum degree in the residual graph is Õ( n)3 . This allows us to increase the block size and simulate the next Õ(n3/4 ) iterations in O(1) rounds: Using √ the fact that the maximum degree in the residual graph is Õ( n), it is not hard to see that 1 2 3 This lower bound even holds in the LOCAL model. √ This variant works in fact on graphs with maximum degree bounded by 2c log n , for a sufficiently small constant c, but a poly-logarithmic degree bound is sufficient for our purposes. We use the notation Õ(.), which equals the usual O() notation where all poly-logarithmic factors are ignored. 2 3 the subgraph induced by the next Θ̃(n 4 ) random vertices has a maximum degree of Õ(n1/4 ) with high probability (and thus contains O(n) edges). Pursuing this approach further, we can 1 process Θ̃(n1− 2i ) vertices in the ith block, since, by the residual sparsity lemma, the maximum 1 degree in the ith residual graph is Õ(n 2i ). Hence, after having processed O(log log n) blocks, the maximum degree becomes poly-logarithmic. In Section 4, we give slightly more involved arguments that show that O(log log ∆) iterations (as opposed to O(log log n) iterations) are in fact enough. The Residual Sparsity Property of Greedy. The author is not aware of any work that exploits or mentions the residual sparsity property of the random order Greedy algorithm for MIS. In the context of correlation clustering in the data streaming model, a similar property of a Greedy clustering algorithm was used in [1] (Lemma 19). Their lemma is in fact strong enough and can give the version required in this paper. Since [1] does not provide a proof, and the residual sparsity property is central to the functioning of our algorithm, we give a proof that follows the main idea of [1] 4 adapted to our needs. Further Related Work. The maximal independent set problem is one of the classic symmetry breaking problems in distributed computing. Without all-to-all communication, Luby [22] and independently Alon et al. [2] gave O(log n) rounds distributed algorithms more than 30 years ago.√ Barenboim et al. [3] improved on this for certain ranges of ∆ and gave a O(log2 ∆) + algorithm. The currently fastest algorithm is by Ghaffari [7] and runs in 2O( log log n) rounds √ O( log log n) rounds. O(log ∆) + 2 The only MIS algorithm designed in the CONGESTED-CLIQUE model is the previously mentioned algorithm by Ghaffari [8]. Ghaffari shows how multiple rounds of a CONGEST model algorithm can be simulated in much fewer rounds in the CONGESTED-CLIQUE model. This is similar to the approach taken in this paper, however, while in our algorithm the simulation of multiple iterations of the sequential Greedy algorithm is performed at one distinguished node, every node participates in the simulation of the CONGEST model algorithm in Ghaffari’s algorithm. Outline. We proceed as follows. First, we give necessary definitions and notation, and we state known results that we employ in this paper (Section 2). We then give a proof of the residual sparsity property of the sequential Greedy algorithm (Section 3). Our O(log log ∆) rounds MIS algorithm is subsequently presented (Section 4), followed by a brief conclusion (Section 5). 2 Preliminaries We assume that G = (V, E) is a simple unweighted n-vertex graph. For a node v ∈ V , we write ΓG (v) to denote v’s (exclusive) neighborhood, and we write degG (v) := |ΓG (v)|. The inclusive neighborhood is defined as ΓG [v] := Γ (v)∪{v}. Inclusive neighborhoods are extended to subsets U ⊆ V as ΓG [U ] := ∪u∈U ΓG [u]. Given a subset of vertices U ⊆ V , the subgraph induced by U is denoted by G[U ]. Independent Sets. An independent set I ⊆ V is a subset of non-adjacent vertices. An independent set I is maximal if for every v ∈ V \ I, I ∪ {v} is not an independent set. Given an independent set I, we call the graph G′ = G[V \ ΓG [I]] the residual graph with respect to I. If clear from the context, we may simple call G′ the residual graph. We say that a vertex u ∈ V is uncovered with respect to I, if u is not adjacent to a vertex in I, i.e., u ∈ V \ ΓG [I]. Again, if clear from the context, we simply say u is uncovered without specifying I explicitly. Ghaffari gave the following result that we will reuse in this paper: 4 The authors of [1] kindly shared an extended version of their paper with me. 3 Theorem 2 (Ghaffari [8]). Let G be a n-vertex graph with ∆(G) = poly log(n). Then there is a distributed algorithm that runs in the CONGESTED-CLIQUE model and computes a MIS on G in O(log log ∆) rounds. Routing. As a subroutine, our algorithm needs to solve the following simple routing task: Let u ∈ V be an arbitrary vertex. Suppose that every other vertex v ∈ V \ {u} holds P0 ≤ nv ≤ n messages each of size O(log n) that it wants to deliver to u. We are guaranteed that v∈V nv ≤ n. Lenzen proved that in the CONGESTED-CLIQUE model there is a deterministic routing scheme that achieves this task in O(1) rounds [18]. In the following, we will refer to this scheme as Lenzen’s routing scheme. Concentration Bound for Dependent Variables. In the analysis of our algorithm, we require a Chernoff bound for dependent variables (see for example [6]): Theorem 3 (Chernoff Bound for Dependent Variables, e.g. [6]). Let X1 , X2 , . . . , Xn be 0/1 random variables for which there is a p ∈ [0, 1] such that for all k ∈ [n] and all a1 , . . . , ak−1 ∈ {0, 1} the inequality P [Xk = 1 | X1 = a1 , X2 = a2 , . . . , Xk−1 = ak−1 ] ≤ p holds. Let further µ ≥ p · n. Then, for every δ > 0: " n #  X P Xi ≥ (1 + δ)µ ≤ i=1 eδ (1 + δ)1+δ µ . Last, we say that an event occurs with high probability if the probability of the event not occuring is at most n1 . 3 Sequential Random Order Greedy Algorithm for MIS The Greedy algorithm for maximal independent set processes the vertices of the input graph in arbitrary order. It adds the current vertex under consideration to an initially empty independent set I if none of its neighbors are already in I. This algorithm progressively thins out the input graph, and the rate at which the graph loses edges depends heavily on the order in which the vertices are considered. If the vertices are processed in uniform random order (Algorithm 1), then the number of edges in the residual graph decreases relatively quickly. A variant of the next lemma was proved in [1] in the context of correlation clustering in the streaming model: Lemma 1. Let t be an integer with 1 ≤ t < n. Let Ui be the set U at the beginning of iteration i of Algorithm 1. Then with probability at least 1 − n−9 the following holds: ∆(G[Ut ]) ≤ 10 ln(n) n . t Proof. Fix an arbitrary index j ≥ t. We will prove that either vertex vj is not in Ut , or it has at most 10 ln(n) nt neighbors in G[Ut ], with probability at least 1 − n−10 . The result follows by a union bound over the error probabilities of all n vertices. We consider the following process in which the random order of the vertices is determined. First, reveal vj . Then, reveal vertices vi just before iteration i of the algorithm. Let Ni := 4 Input: G = (V, E) is an n-vertex graph 1. Let v1 , v2 , . . . , vn be a uniform random ordering of V 2. I ← {}, U ← V (U is the set of uncovered elements) 3. for i ← 1, 2, . . . , n do if vi ∈ U then I ← I ∪ {vi } U ← U \ ΓG [vi ] 4. return I Algorithm 1. Random order Greedy algorithm for MIS. ΓG (vj ) ∩ Ui be the set of neighbors of vj that are uncovered in the beginning of iteration i, and let di = |Ni |. For every 1 ≤ i ≤ t − 1, the following holds: P [vi ∈ Ni | vj , v1 , . . . , vi−1 ] = di di ≥ , n − 1 − (i − 1) n since vi can be one of the not yet revealed n − 1 − (i − 1) vertices. We now distinguish two cases. First, suppose that dt−1 ≤ 10 ln(n) nt . Then the result follows immediately since, by construction, dt ≤ dt−1 (the sequence (di )i is decreasing). Suppose next that dt−1 > 10 ln(n) nt . Then, we will prove that with high probability there is one iteration i′ ≤ t − 1 in which a neighbor of vj is considered by the algorithm, i.e., vi′ ∈ Ni′ . This in turn implies that vj is not in Ut . We have: P [∀i < t : vi ∈ / N i | vj ] ≤ Y i<t P [vi ∈ / Ni | vj , v1 , . . . , vi−1 ] ≤ Y di (1 − ) n i<t dt−1 (t−1) dt−1 t−1 ) ≤e n ≤ n−10 . ≤ (1 − n ⊔ ⊓ 4 4.1 MIS Algorithm in the Congest Clique Model Algorithm Our MIS algorithm, depicted in Algorithm 2, consists of three parts: First, all vertices agree on a uniform random order as follows. The vertex with the smallest ID choses a uniform random order locally and informs all other vertices about their positions within the order. Then, all vertices broadcast their positions to all other vertices. As a result, all vertices know the entire order. Let v1 , v2 , . . . , vn be this order. Next, we simulate Greedy until the maximum degree of the residual graph is at most log4 n (this bound is chosen only for convenience; any poly-logarithmic number in n is equally suitable). To this end, in each iteration of the while-loop, we first determine a number k as a function of the maximum degree ∆(G′ ) of the current residual graph G′ so that the subgraph of G′ induced by the yet uncovered vertices of {v1 , . . . , vk } has at most n edges w.h.p. (see Lemma 3). Using Lenzen’s routing protocol, these edges are collected at vertex v1 , which continues the simulation of Greedy up to iteration k. It then informs the chosen vertices about their selection, who in turn inform their neighbors about their selection. Vertices then compute the new residual graph and its maximum degree and proceed with the next iteration of the while-loop. We prove 5 Input: G = (V, E) is an n-vertex graph with maximum degree ∆ := ∆(G) Set parameter C = 5 1. Nodes agree on random order. All vertices exchange their IDs in one round. Let u ∈ V be the vertex with the smallest ID. Vertex u choses a uniform random order of V and informs every vertex v ∈ V \ {u} about its position rv within the order. Then, every vertex v ∈ V broadcasts rv to all other vertices. As a result, all vertices know the order. Let v1 , v2 , . . . , vn be the resulting order. 2. Simulate sequential Greedy. Every vertex vi sets ui ← true indicating that vi is uncovered. Let G′ := G. Every vertex vi broadcasts degG′ (vi ) to all other vertices so that every vertex knows ∆(G′ ). while ∆(G′ ) > log4 n do (a) Let k ← √ n ′ ∆(G )C (b) Every vertex vi with ui = true and i ≤ k sends all its incident edges vi vj with uj = true and j < i to v1 using Lenzen’s routing protocol in O(1) rounds. (c) Vertex v1 knows the subgraph H of uncovered vertices vj with j ≤ k, i.e., H := G′ [{vj : j ≤ k and uj = true}] . It continues the simulation of Greedy up to iteration k using H. Let I ′ be the vertices selected into the independent set. (d) Vertex v1 informs nodes I ′ about their selection in one round. Nodes I ′ inform their neighbors about their selection in one round. (e) Every node vi ∈ ΓG [I ′ ] sets ui ← f alse. (f) Let G′ := G[{vi ∈ V : ui = true}]. Every vertex vi broadcasts ui to all other vertices. Then every vertex vi computes degG′ (vi ) locally and broadcasts degG′ (vi ) to all other vertices. As a result, every vertex knows ∆(G′ ). end while 3. Run Ghaffari’s algorithm. Run Ghaffari’s MIS algorithm on G′ in O(log log ∆) rounds. Algorithm 2. O(log log ∆) rounds MIS algorithm in the CONGESTED-CLIQUE model. in Lemma 2 that only O(log log ∆) iterations of the while-loop are necessary until ∆(G′ ) drops below log4 n. Last, we run Ghaffari’s algorithm on G′ which completes the maximal independent set computation. 4.2 Analysis Let G′i denote the graph G′ at the beginning of iteration i of the while-loop. Notice that G′1 = G. Let ∆i := ∆(G′i ) and let ki = √∆n C be the value of k in iteration i. Observe that the while-loop i is only executed if ∆i > log4 n and hence ki ≥ n log nC 2 6 (1) holds for every iteration i of the while-loop. Further let Hi be the graph H in iteration i of the while-loop. To establish the runtime of our algorithm, we need to bound the number of iterations of the while-loop. To this end, in the next lemma we bound ∆i for every 1 ≤ 1 ≤ n and conclude that ∆j ≤ log4 n, for some j ∈ O(log log ∆). Lemma 2. With probability at least 1 − n−8 , for every i ≤ n, the maximum degree in G′i is bounded as follows: 1 ∆i ≤ ∆ 2i−1 · 100C ln2 n . Proof. We prove the statement by induction. Observe that ∆1 = ∆ and the statement is thus trivially true for i = 1. Suppose that the statement holds up to some index i − 1. Recall that G′i is the residual graph obtained by running Greedy on vertices v1 , . . . , vki−1 . Hence, by applying Lemma 1, the following holds with probability 1 − n−9 : ∆i ≤ 10 ln(n) n ki−1 = 10 ln(n)n p = ∆i−1 · 10C ln n . √ n ∆i−1 C Resolving the recursion, we obtain ∆i = ∆ 1 2i−1 · i−2 Y j=0 1 Pi−2 1 (10C ln n) 2j = ∆ 2i−1 · (10C ln n) 1 j=0 2j 1 ≤ ∆ 2i−1 · 100C 2 ln2 n . Observe that we invoked n times Lemma 1. Thus, by the union bound, the result holds with probability 1 − n−8 . ⊔ ⊓ Corollary 1. ∆i = O(log2 n) for some i ∈ O(log log ∆). To establish correctness of the algorithm, we need to ensure that we can apply Lenzen’s routing protocol to collect the edges of Hi at vertex v1 . For this to be feasible, we need to prove that, for every i, Hi contains at most n edges with high probability. Lemma 3. With probability at least 1 − n−9 , graph Hi has at most n edges. Proof. Let Ui be the vertex set of G′i , i.e., the set of uncovered vertices at the beginning of iteration i. We will prove now that, with probability at least 1 − n10 , for every vj ∈ Ui , the following holds d(vj ) := |ΓG′i (vj ) ∩ {vki−1 +1 , . . . , vk }| ≤ n . ki (2) Since the vertex set of Hi is a subset of at most ki − ki−1 ≤ ki vertices of Ui , the result follows by applying the union bound on the error probabilities for every vertex of G′i . To prove Inequality 2, observe that graph G′i is solely determined by vertices v1 , v2 , . . . , vki−1 , and the execution of the algorithm so far was not affected by the outcome of the random variables vki−1 +1 , . . . , vn . Thus, by the principle of deferred decision, for every ki−1 + 1 ≤ l ≤ ki , vertex vl can be seen as a uniform random vertex chosen from V \ {v1 , . . . , vl−1 }. For 1 ≤ l ≤ ki − P ki−1 , let Xl be the indicator variable of the event “vki−1 +l ∈ ΓG′i (vj )”. Observe that d(vj ) = l Xl and E [d(vj )] = degG′i (vj ) · ki ki − ki−1 . ≤ degG′i (vj ) · n − ki−1 n 7 (3) Furthermore, observe that for every 1 ≤ l ≤ ki − ki−1 , and all a1 , . . . , al−1 ∈ {0, 1}, the inequality P [Xl = 1 | X1 = a1 , X2 = a2 , . . . , Xl−1 = al−1 ] ≤ degG′i (vj ) ≤ 2 · degG′i (vj ) n − ki n holds (using the bound ki ≤ n/2, which follows from Inequality 1), since in the worst case, we have a1 = a2 = · · · = al−1 = 0, which implies that there are degG′i (vj ) choices left out of at least n − ki possibilities such that Xl = 1. We can thus use the Chernoff bound for dependent variables as stated in Theorem 3 in order to bound the probability that d(vj ) deviates from its expectation. We distinguish two cases. First, suppose that E [d(vj )] ≥ 4 log n. Then by Theorem 3 (setting µ = 2E [d(vj )] and δ = 8), 8 log n  e8 ≤ n−10 . P [d(vj ) ≥ 18 · E[d(vj )]] ≤ exp (1 + 8)1+8 Thus, using Inequality 3, with high probability, d(vj ) ≤ 18 · E [d(vj )] ≤ 18 · degG′i (vj ) ∆i n n ki ≤ 18 · √ ≤ , ≤ 18 · n ki C 2 ki ∆i C since C ≥ 5. Suppose now that E [d(vj )] < 4 log n. Then, by Theorem 3 (setting µ = 8 log n and δ = 8), P [d(vj ) ≥ 72 log n] ≤ n−10 , by the same calculation as above. Since ki ≤ completes the proof. n log2 n·C (Inequality 1), we have d(vj ) ≤ n ki , which ⊔ ⊓ Theorem 1 (restated) Algorithm 2 operates in O(log log ∆) rounds in the CONGESTEDCLIQUE model and outputs a maximal independent set with high probability. Proof. Concerning the runtime, Step 1 of the algorithm requires O(1) communication rounds. Observe that every iteration of the while-loop requires O(1) rounds. The while-loop terminates in O(log log ∆) rounds with high probability, by Corollary 1. Since Ghaffari’s algorithm requires O(log log ∆′ ) = O(log log ∆) rounds, where ∆′ is the maximum degree in the residual as computed in the last iteration of the while-loop (or in case ∆ < log4 n then ∆′ = ∆), the overall runtime is bounded by O(log log ∆). Concerning the correctness of the algorithm, the only non-trivial step is the collection of graph Hi at vertex v1 . This is achieved using Lenzen’s routing protocol, which can be used since we proved in Lemma 3 that graph Hi has at most n vertices with high probability. ⊔ ⊓ 5 Conclusion In this paper, we gave a O(log log ∆) rounds MIS algorithm that runs in the CONGESTEDCLIQUE model. We simulated the sequential random order Greedy algorithm, exploiting the residual sparsity property of Greedy. It is conceivable that the round complexity can be reduced further - there are no lower bounds known for MIS in the CONGESTED-CLIQUE model. Results on other problems, such as the minimum weight spanning tree problem where the O(log log n) rounds algorithm of Lotker et al. [21] has subsequently been improved to O(log log log n) rounds [10], O(log∗ n) rounds [9], and finally to O(1) rounds [13], give hope that similar improvements may be possible for MIS as well. Can we simulate other centralized Greedy algorithms in few rounds in the CONGESTEDCLIQUE model? 8 Acknowledgements The author thanks Amit Chakrabarti, Anthony Wirth, and Graham Cormode for discussions about the residual sparsity property of the clustering algorithm given in [1]. References 1. Ahn, K.J., Cormode, G., Guha, S., McGregor, A., Wirth, A.: Correlation clustering in data streams. In: Proceedings of the 32Nd International Conference on International Conference on Machine Learning - Volume 37. pp. 2237–2246. ICML’15, JMLR.org (2015), http://dl.acm.org/citation.cfm?id=3045118.3045356 2. Alon, N., Babai, L., Itai, A.: A fast and simple randomized parallel algorithm for the maximal independent set problem. J. Algorithms 7(4), 567–583 (Dec 1986), http://dx.doi.org/10.1016/0196-6774(86)90019-2 3. Barenboim, L., Elkin, M., Pettie, S., Schneider, J.: The locality of distributed symmetry breaking. J. ACM 63(3), 20:1–20:45 (Jun 2016), http://doi.acm.org/10.1145/2903137 4. Censor-Hillel, K., Kaski, P., Korhonen, J.H., Lenzen, C., Paz, A., Suomela, J.: Algebraic methods in the congested clique. In: Proceedings of the 2015 ACM Symposium on Principles of Distributed Computing. pp. 143–152. PODC ’15, ACM, New York, NY, USA (2015), http://doi.acm.org/10.1145/2767386.2767414 5. Drucker, A., Kuhn, F., Oshman, R.: On the power of the congested clique model. In: Proceedings of the 2014 ACM Symposium on Principles of Distributed Computing. pp. 367–376. PODC ’14, ACM, New York, NY, USA (2014), http://doi.acm.org/10.1145/2611462.2611493 6. Fanghänel, A., Kesselheim, T., Vöcking, B.: Improved algorithms for latency minimization in wireless networks. Theor. Comput. Sci. 412(24), 2657–2667 (May 2011), http://dx.doi.org/10.1016/j.tcs.2010.05.004 7. Ghaffari, M.: An improved distributed algorithm for maximal independent set. In: Proceedings of the Twenty-seventh Annual ACM-SIAM Symposium on Discrete Algorithms. pp. 270– 277. SODA ’16, Society for Industrial and Applied Mathematics, Philadelphia, PA, USA (2016), http://dl.acm.org/citation.cfm?id=2884435.2884455 8. Ghaffari, M.: Distributed mis via all-to-all communication. In: Proceedings of the ACM Symposium on Principles of Distributed Computing. pp. 141–149. PODC ’17, ACM, New York, NY, USA (2017), http://doi.acm.org/10.1145/3087801.3087830 9. Ghaffari, M., Parter, M.: Mst in log-star rounds of congested clique. In: Proceedings of the 2016 ACM Symposium on Principles of Distributed Computing. pp. 19–28. PODC ’16, ACM, New York, NY, USA (2016), http://doi.acm.org/10.1145/2933057.2933103 10. Hegeman, J.W., Pandurangan, G., Pemmaraju, S.V., Sardeshmukh, V.B., Scquizzato, M.: Toward optimal bounds in the congested clique: Graph connectivity and mst. In: Proceedings of the 2015 ACM Symposium on Principles of Distributed Computing. pp. 91–100. PODC ’15, ACM, New York, NY, USA (2015), http://doi.acm.org/10.1145/2767386.2767434 11. Hegeman, J.W., Pemmaraju, S.V.: Lessons from the congested clique applied to mapreduce. In: Halldórsson, M.M. (ed.) Structural Information and Communication Complexity. pp. 149–164. Springer International Publishing, Cham (2014) 12. Hegeman, J.W., Pemmaraju, S.V., Sardeshmukh, V.B.: Near-constant-time distributed algorithms on a congested clique. In: Kuhn, F. (ed.) Distributed Computing. pp. 514–530. Springer Berlin Heidelberg, Berlin, Heidelberg (2014) 13. Jurdzinski, T., Nowicki, K.: MST in O(1) rounds of congested clique. In: Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2018, New Orleans, LA, USA, January 7-10, 2018. pp. 2620–2632 (2018), https://doi.org/10.1137/1.9781611975031.167 14. Korhonen, J.H., Suomela, J.: Brief announcement: Towards a complexity theory for the congested clique. In: 31st International Symposium on Distributed Computing, DISC 2017, October 16-20, 2017, Vienna, Austria. pp. 55:1–55:3 (2017), https://doi.org/10.4230/LIPIcs.DISC.2017.55 15. Kuhn, F., Moscibroda, T., Wattenhofer, R.: Local computation: Lower and upper bounds. J. ACM 63(2), 17:1–17:44 (Mar 2016), http://doi.acm.org/10.1145/2742012 16. Kuhn, F., Moscibroda, T., Wattenhofer, R.: What cannot be computed locally! In: Proceedings of the Twentythird Annual ACM Symposium on Principles of Distributed Computing. pp. 300–309. PODC ’04, ACM, New York, NY, USA (2004), http://doi.acm.org/10.1145/1011767.1011811 17. Le Gall, F.: Further algebraic algorithms in the congested clique model and applications to graph-theoretic problems. In: Gavoille, C., Ilcinkas, D. (eds.) Distributed Computing. pp. 57–70. Springer Berlin Heidelberg, Berlin, Heidelberg (2016) 18. Lenzen, C.: Optimal deterministic routing and sorting on the congested clique. In: Proceedings of the 2013 ACM Symposium on Principles of Distributed Computing. pp. 42–50. PODC ’13, ACM, New York, NY, USA (2013), http://doi.acm.org/10.1145/2484239.2501983 9 19. Linial, N.: Distributive graph algorithms-global solutions from local data. In: 28th Annual Symposium on Foundations of Computer Science, Los Angeles, California, USA, 27-29 October 1987. pp. 331–335 (1987), https://doi.org/10.1109/SFCS.1987.20 20. Lotker, Z., Patt-Shamir, B., Pavlov, E., Peleg, D.: Minimum-weight spanning tree construction in o(log log n) communication rounds. SIAM J. Comput. 35(1), 120–131 (Jul 2005), https://doi.org/10.1137/S0097539704441848 21. Lotker, Z., Pavlov, E., Patt-Shamir, B., Peleg, D.: Mst construction in o(log log n) communication rounds. In: Proceedings of the Fifteenth Annual ACM Symposium on Parallel Algorithms and Architectures. pp. 94–100. SPAA ’03, ACM, New York, NY, USA (2003), http://doi.acm.org/10.1145/777412.777428 22. Luby, M.: A simple parallel algorithm for the maximal independent set problem. In: Proceedings of the Seventeenth Annual ACM Symposium on Theory of Computing. pp. 1–10. STOC ’85, ACM, New York, NY, USA (1985), http://doi.acm.org/10.1145/22145.22146 23. Peleg, D.: Distributed Computing: A Locality-sensitive Approach. Society for Industrial and Applied Mathematics, Philadelphia, PA, USA (2000) 10
8cs.DS
ON MODULES WITH SELF TOR VANISHING arXiv:1803.09233v1 [math.AC] 25 Mar 2018 OLGUR CELIKBAS AND HENRIK HOLM A BSTRACT. The long-standing Auslander and Reiten Conjecture states that a finitely generated module M over a finite-dimensional algebra A with ExtAi (M, M) = ExtAi (M, A) = 0 for all i > 0 must be projective. Inspired by work of Avramov, Buchweitz, Jorgensen, Şega, and others, we consider in this paper a possible counterpart of the conjecture for commutative local rings, in terms of vanishing of Tor. Our main result shows that the class of local rings that does satisfy this counterpart is closed under standard procedures in ring theory. 1. I NTRODUCTION Throughout R denotes a commutative noetherian local ring with unique maximal ideal m and residue field k. Our purpose is to establish a result, and also to give some observations and examples, which might be useful in further studies of the following open problem: 1.1 Question. If M is a finitely generated R-module with ToriR (M, M) = 0 for all i ≫ 0, then must M have finite projective dimension? This question, if true for all rings R, may be considered as the “homology counterpart” of the celebrated Auslander and Reiten Conjecture [2] for commutative rings. Question 1.1 was previously studied by several people, and various partial results were recently obtained for special cases; see, for example, [6, 18, 19, 20]. It is likely that a complete solution to the question above will yield a new go and perspective on homological commutative algebra. Question 1.1 appears implicitly in Şega’s paper [22, paragraph preceding Thm. 2.6], and in Thm. 2 in loc. cit. a positive answer is given in the case where R is Gorenstein, admits an exact zero divisor, and m4 = 0. Other classes of rings over which Question 1.1 is known to be true include complete intersection rings [15, Cor. (1.2)] (see also [4, Thm. IV] and [14, Thm. 1.9]) and Golod rings [16, Thm. 3.1]. To further the study of the question we consider the following condition on R: (TP) Every finitely generated R-module M satisfying ToriR (M, M) = 0 for all i ≫ 0 has finite projective dimension, that is, pdR (M) < ∞. To the best of our knowledge, our approach to Question 1.1 is different from that of the papers in the literature: instead of determining specific conditions that give an affirmative answer to Question 1.1, we show that the property (TP) is preserved by standard procedures in local algebra. Our main result can be stated as follows: 1.2 Theorem. The following conditions are equivalent: (i) (ii) (iii) (iv) R satisfies (TP). b satisfies (TP). R R[[X1 , . . . , Xn ]] satisfies (TP). R[X1 , . . ., Xn ](m,X1 ,...,Xn ) satisfies (TP). 2010 Mathematics Subject Classification. 13D05, 13D07. Key words and phrases. G-dimension; projective dimension; vanishing of Tor. 1 2 OLGUR CELIKBAS AND HENRIK HOLM One can use Theorem 1.2 (in conjunction with Lemma 2.6) to construct new examples of rings satisfying (TP); see Example 2.7. We point out that our work is motivated by [10] where a result, similar to the one above, is proved for the so-called Auslander’s condition. However, our arguments are quite different since the techniques used in loc. cit. do not work in our setting; see Remark 2.3 and [10, Cor. (2.2)]. In Section 2 we prove Theorem 1.2 and show how to construct examples of local rings satisfying (TP). Furthermore, we give a way to obtain certain kinds of regular sequences in power series rings, which might be of independent interest. In Section 3 we consider a slightly weaker version of the condition (TP), which we call (TG); this condition is related to the Gorenstein dimension. We prove a result similar to Theorem 1.2, and show that some results from Section 2 can be strengthened in this new setting. 2. M AIN RESULTS 2.1 Lemma. Let (R, m, k) → (S , n, ℓ) be a local homomorphism of commutative noetherian local rings. If S satisfies (TP) and has finite flat dimension over R, then R satisfies (TP). Proof. Assume S satisfies (TP) and let M be a finitely generated R-module such that ToriR (M, M) = 0 for all i ≫ 0. We have ToriR (M, S ) = 0 for each i > d, where d is the flat dimension of S over R. Replacing M by a sufficiently high syzygy we can (by dimension shifting) assume that ToriR (M, M) = 0 and ToriR (M, S ) = 0 for every i > 0. In this case there is an isomorphism M ⊗LR S ∼ = M ⊗R S in the derived category over S . This yields: (M ⊗LR M) ⊗LR S ∼ = (M ⊗R S ) ⊗LS (M ⊗R S ) . = (M ⊗LR S ) ⊗LS (M ⊗LR S ) ∼ As the complex M ⊗LR M is homologically bounded (its homology is even concentrated in degree zero) and since S has finite flat dimension over R, the left-hand side is homologically bounded, and hence so is the right-hand side. That is, ToriS (M ⊗R S , M ⊗R S ) = 0 for all i ≫ 0. As S satisfies (TP), it follows that M ⊗R S ∼ = M ⊗LR S has finite projective dimension over S . It follows from [5, (1.5.3)] that pdR (M) is finite.  2.2 Proposition. Let (R, m, k) be a commutative noetherian local ring and let x = x1 , . . . , xn be an R-regular sequence. If R/( x) satisfies (TP), then R satisfies (TP). The converse is true / m2 + ( x1 , . . . , xi−1 ) holds for every i = 1, . . . , n. if xi ∈ Proof. The first statement is a special case of Lemma 2.1. We now prove the (partial) converse. By assumption, x̄i is a non zero-divisor on R/( x1 , . . . , xi−1 ), which has the maximal ideal m̄ = m/( x1 , . . . , xi−1 ). Since xi ∈ / m2 + ( x1 , . . . , xi−1 ) we have x̄i ∈ / m̄2 , so by induction it suffices to consider the case where n = 1. Assume that R satisfies (TP) and let x ∈ m r m2 be a non zero-divisor on R. To see that R/( x) satisfies (TP), let N be a finitely generated R/( x)-module with ToriR/(x) (N, N) = 0 for all i ≫ 0. By [21, 11.65] (see also [13, Lem. 2.1]) there is a long exact sequence, R/( x) · · · −→ Tori−1 (N, N) −→ ToriR (N, N) −→ ToriR/( x) (N, N) −→ · · · . Therefore ToriR (N, N) = 0 for all i ≫ 0. Since R satisfies (TP), we get that pdR (N) is finite. As x ∈ / m2 , it follows that pdR/( x) (N) is finite; see, for example, [3, Prop. 3.3.5(1)].  2.3 Remark. It would be interesting to know if the last assertion in Proposition 2.2 holds without the assumption xi ∈ / m2 + (x1 , . . . , xi−1 ), i.e. if the property (TP) is preserved when passing to the quotient by an ideal generated by any regular sequence; cf. Proposition 3.1. ON MODULES WITH SELF TOR VANISHING 3 2.4 Remark. The sequence X1 , . . . , Xn is regular on R[[X1 , . . . , Xn ]] and Xi does not belong to (m, X1 , . . . , Xn )2 + (X1 , . . . , Xi−1 ). It follows from Proposition 2.2 that R safisfies (TP) if and only if R[[X1 , . . . , Xn ]] safisfies (TP). Proposition 2.2 can be used to construct new examples of rings satisfying (TP) from known examples; see Example 2.7. However, to do so it is useful to have a concrete way of constructing regular sequences with the property mentioned in 2.2. In Lemma 2.6 below we give one such construction. If A is a commutative ring and a is an element in A, then it can happen, perhaps surprisingly, that X − a is a zero-divisor on A[[X]]; see [12, p. 146] for an example. However, as is well-known, if A is noetherian, then the situation is much nicer: 2.5. Let A be a commutative noetherian ring and consider an elemement f = f (X1 , . . . , Xn ) in A[[X1 , . . . , Xn ]]. It follows from [11, Thm. 5] that if f has some coefficient which is a unit in A, then f is a non zero-divisor on A[[X1 , . . . , Xn ]]. 2.6 Lemma. Let (R, m, k) be a commutative noetherian local ring. Consider the power series ring S = R[[X1 , . . . , Xn ]] and write n = (m, X1 , . . . , Xn ) for its unique maximal ideal. Let 0 = m0 < m1 < · · · < mt−1 < mt = n be integers and let f1 , . . . , ft ∈ n be elements such that, for every i = 1, . . ., t, the following conditions hold: (a) fi ∈ R[[X1 , . . . , Xmi ]] ⊆ S . ∂ fi (0, . . . , 0) ∈ R is a unit for some mi−1 < j. (b) The element ∂X j Then f1 , . . . , ft is a regular sequence on R[[X1 , . . . , Xn ]] with fi ∈ / n2 + ( f1 , . . . , fi−1 ) for all i. Proof. First note that condition (b) implies: The power series fi (0, . . . , 0, Xmi−1 +1 , . . ., Xn ) has a coefficient which is a unit in R. (2.1) ∂ fi (0, . . . , 0) is a coefficient in fi (0, . . . , 0, Xmi−1 +1 , . . . , Xn ). Indeed, if mi−1 < j, then ∂X j Next we show that f1 , . . . , ft is a regular sequence. With i = 1 condition (2.1) says that f1 (X1 , . . . , Xn ) has a coefficient which is a unit in R, and so f1 is a non zero-divisor on S by 2.5. Next we show that fi+1 is a non zero-divisor on S /( f1 , . . . , fi ) where i > 1. Write vmi +1 v fi+1 = ∑vm +1 ,...,vn hvmi +1 ,...,vn Xmi +1 · · · Xnn ∈ S ∼ = R[[X1 , . . . , Xmi ]][[Xmi +1 , . . . , Xn ]] i (2.2) with h∗ ∈ R[[X1 , . . . , Xmi ]]. As f1 , . . . , fi ∈ R[[X1 , . . . , Xmi ]] by (a) there is an isomorphism:  S /( f1 , . . . , fi ) ∼ (2.3) = R[[X1 , . . . , Xmi ]]/( f1 , . . . , fi ) [[Xmi +1 , . . . , Xn ]] . In particular, the image f¯i+1 of fi+1 in S /( f1 , . . . , fi ) can be identified with the element vmi +1 v f¯i+1 = ∑vm +1 ,...,vn h̃vmi +1 ,...,vn Xmi +1 · · · Xnn i in the right-hand side of (2.3), where h̃∗ is the image of h∗ in R[[X1 , . . . , Xmi ]]/( f1 , . . . , fi ). Hence, to show that f¯i+1 is a non zero-divisor, it suffices by 2.5 to argue that one of the coefficients h̃∗ is a unit. By (2.1) we know that fi+1 (0, . . ., 0, Xmi +1 , . . ., Xn ) has a coefficient which is a unit in R, and by (2.2) this means that one of the elements hvmi +1 ,...,vn (0, . . . , 0) ∈ R is a unit. Consequently hvmi +1 ,...,vn = hvmi +1 ,...,vn (X1 , . . . , Xmi ) will be a unit in R[[X1 , . . . , Xmi ]], so its image h̃vmi +1 ,...,vn is also a unit, as desired. Next we show that fi ∈ / n2 + ( f1 , . . . , fi−1 ) holds for all i. Suppose for contradiction that: fi = ∑v pv qv + ∑i−1 w=1 gw fw , where pv , qv ∈ n and gw ∈ S . 4 OLGUR CELIKBAS AND HENRIK HOLM ∂ fi (0, . . ., 0) ∈ R is a unit for some mi−1 < j. It follows By assumption (b) we have that ∂X j from the identity above that:     ∂ fi ∂gw ∂qv ∂ fw ∂pv i−1 ∂Xj (0) = ∑v ∂Xj (0) qv (0) + pv (0) ∂Xj (0) + ∑w=1 ∂Xj (0) fw (0) + gw (0) ∂Xj (0) . As already mentioned, the left-hand side is a unit, and this contradicts that the right-hand side belongs to m. Indeed, we have pv (0), qv (0), fw (0) ∈ m as pv , qv , fw ∈ n. Furthermore, f1 , . . . , fi−1 only depend on the variables X1 , . . . , Xmi−1 by (a), so every ∂∂Xfwj is zero.  2.7 Example. In R[[U, V, W]] the following (more or less arbitrarily chosen) sequence, corresponding to t = 2 and m1 = 2, satisfies the assumptions of Lemma 2.6: f1 = a + U 3 +UV +V and f2 = b + UV 2 +W +W 2 (a, b ∈ m) . ∂ f2 (0, 0, 0). So Proposition 2.2 Indeed, (a) is clear and (b) holds since ∂∂Vf1 (0, 0, 0) = 1 = ∂W implies that if R satisfies (TP), then so does A = R[[U, V, W]]/( f1 , f2 ). Note that the fiber product ring R = k[[X]]/(X 4 ) ×k k[[Y]]/(Y 3 ) ∼ = k[[X, Y]]/(X 4 , Y 3 , XY) is artinian, not Gorenstein, and by [18, Thm. 1.1] it satisfies (TP). Hence (TP) also holds for the following ring (where we have chosen a = Y 2 and b = X 2 ): A = k[[X, Y, U, V, W]]/(X 4 , Y 3 , XY, Y 2 +U 3 +UV +V, X 2 +UV 2 +W + W 2 ) .  Proof of Theorem 1.2. The equivalence (i) ⇔ (iii) is noted in Remark 2.4. Let a1 , . . . , an b∼ be a set of elements that generate m. We have R = R[[X1 , . . . , Xn ]]/(X1 − a1, . . . , Xn − an ) by [17, Thm. 8.12]. The sequence fi = Xi − ai clearly satisfies the assumptions in Lemma 2.6, so the equivalence (i) ⇔ (ii) follows. Note that R[X1 , . . . , Xn ](m,X1 ,...,Xn ) and R[[X1 , . . . , Xn ]] b 1 , . . . , Xn ]]), so the equivalence have isomorphic completions (both are isomorphic to R[[X (iii) ⇔ (iv) follows from the already established equivalence between (i) and (ii).  3. C ONNECTIONS WITH THE G ORENSTEIN DIMENSION In this section, we give a few remarks and observations pertaining Aulander’s G-dimension [1] and self Tor vanishing. For a commutative noetherian local ring R, we consider the following variant of the condition (TP). (TG) Every finitely generated R-module M satisfying ToriR (M, M) = 0 for all i ≫ 0 has finite G-dimension, that is, G-dimR (M) < ∞. In general, (TG) is weaker than (TP), see [9, Prop. (1.2.10)], but the two conditions are equivalent if the maximal ideal m of R is decomposable; see [19, Thm. 5.5]. Testing finiteness of the G-dimension via the vanishing of Tor, in some form, is an idea pursued in a number of papers. For example, in [7, Thm. 3.11] it was proved that a finitely generated module M over a commutative noetherian ring R has finite G-dimension if and f R (M, R) vanishes for every i ∈ Z. Furthermore, finitely only if the stable homology Tor i generated modules testing finiteness of the G-dimension via the vanishing of absolute homology, i.e. Tor, were also examined in [8]. For the property (TG) we have the following stronger version of Proposition 2.2. 3.1 Proposition. Let (R, m, k) be a commutative noetherian local ring and let x = x1 , . . . , xn be an R-regular sequence. Then R satisfies (TG) if and only if R/( x) satisfies (TG). ON MODULES WITH SELF TOR VANISHING 5 Proof. For the “if” part we proceed as in the proof of Lemma 2.1 with S = R/( x). Note that having replaced M with a sufficiently high syzygy, the sequence x becomes regular on M (this is standard but see also [20, Lem. 5.1]). From the finiteness of G-dimR/( x) (M/( x) M) we infer the finiteness of G-dimR (M) from [9, Cor. (1.4.6)]. For the “only if” part proceed as in the proof of Proposition 2.2. From the finiteness of G-dimR (N) one always gets finiteness of G-dimR/( x) (N) (the assumption x ∈ / m2 is not needed) by [9, Thm. p. 39].  Now the arguments in the proof of Theorem 1.2 applies and give the following. 3.2 Theorem. Let (R, m, k) be a commutative noetherian local ring. The following conditions are equivalent: (i) (ii) (iii) (iv) R satisfies (TG). b satisfies (TG). R R[[X1 , . . . , Xn ]] satisfies (TG). R[X1 , . . ., Xn ](m,X1 ,...,Xn ) satisfies (TG).  ACKNOWLEDGMENTS Part of this work was completed when Holm visited West Virginia University in March 2018. He is grateful for the kind hospitality of the WVU Department of Mathematics. R EFERENCES [1] Maurice Auslander, Anneaux de Gorenstein, et torsion en algèbre commutative, Secrétariat mathématique, Paris, 1967, Séminaire d’Algèbre Commutative dirigé par Pierre Samuel, 1966/67. Texte rédigé, d’après des exposés de Maurice Auslander, par Marquerite Mangeney, Christian Peskine et Lucien Szpiro. École Normale Supérieure de Jeunes Filles. Available at http://www.numdam.org. MR0225844 [2] Maurice Auslander and Idun Reiten, On a generalized version of the Nakayama conjecture, Proc. Amer. Math. Soc. 52 (1975), 69–74. MR0389977 [3] Luchezar L. Avramov, Infinite free resolutions, Six lectures on commutative algebra (Bellaterra, 1996), Progr. Math., vol. 166, Birkhäuser, Basel, 1998, pp. 1–118. MR1648664 [4] Luchezar L. Avramov and Ragnar-Olaf Buchweitz, Support varieties and cohomology over complete intersections, Invent. Math. 142 (2000), no. 2, 285–318. MR1794064 [5] Luchezar L. Avramov and Hans-Bjørn Foxby, Ring homomorphisms and finite Gorenstein dimension, Proc. London Math. Soc. (3) 75 (1997), no. 2, 241–270. MR1455856 [6] Luchezar L. Avramov, Srikanth B. Iyengar, Saeed Nasseh, and Sean Sather-Wagstaff, Homology over trivial extensions of commutative dg algebras, 2015, arXiv:1508.00748v1 [math.AC]. [7] Olgur Celikbas, Lars Winther Christensen, Li Liang, and Greg Piepmeyer, Stable homology over associative rings, Trans. Amer. Math. Soc. 369 (2017), no. 11, 8061–8086. MR3695854 [8] Olgur Celikbas and Sean Sather-Wagstaff, Testing for the Gorenstein property, Collect. Math. 67 (2016), no. 3, 555–568. MR3536062 [9] Lars Winther Christensen, Gorenstein dimensions, Lecture Notes in Math., vol. 1747, Springer-Verlag, Berlin, 2000. MR1799866 [10] Lars Winther Christensen and Henrik Holm, Vanishing of cohomology over Cohen–Macaulay rings, Manuscripta Math. 139 (2012), no. 3-4, 535–544. MR2974289 [11] David E. Fields, Zero divisors and nilpotent elements in power series rings, Proc. Amer. Math. Soc. 27 (1971), 427–433. MR0271100 [12] Robert Gilmer, Anne Grams, and Tom Parker, Zero divisors in power series rings, J. Reine Angew. Math. 278/279 (1975), 145–164. MR0387274 [13] Craig Huneke and Roger Wiegand, Tensor products of modules and the rigidity of Tor, Math. Ann. 299 (1994), no. 3, 449–476. MR1282227 , Tensor products of modules, rigidity and local cohomology, Math. Scand. 81 (1997), no. 2, 161– [14] 183. MR1612887 [15] David A. Jorgensen, Tor and torsion on a complete intersection, J. Algebra 195 (1997), no. 2, 526–537. MR1469637 6 OLGUR CELIKBAS AND HENRIK HOLM [16] [17] [18] [19] [20] [21] [22] , A generalization of the Auslander-Buchsbaum formula, J. Pure Appl. Algebra 144 (1999), no. 2, 145–155. MR1732626 Hideyuki Matsumura, Commutative ring theory, second ed., Cambridge Stud. Adv. Math., vol. 8, Cambridge University Press, Cambridge, 1989, Translated from the Japanese by M. Reid. MR1011461 Saeed Nasseh and Sean Sather-Wagstaff, Vanishing of Ext and Tor over fiber products, Proc. Amer. Math. Soc. 145 (2017), no. 11, 4661–4674. MR3691985 Saeed Nasseh and Ryo Takahashi, Structure of irreducible homomorphisms to/from free modules, to in appear in Algebr. Represent. Theory, 2016, arXiv:1606.02621v2 [math.AC]. , Local rings with quasi-decomposable maximal ideal, preprint, 2017, arXiv:1704.00719v1 [math.AC]. Joseph J. Rotman, An introduction to homological algebra, Pure and Applied Mathematics, vol. 85, Academic Press Inc. [Harcourt Brace Jovanovich Publishers], New York, 1979. MR538169 Liana M. Şega, Self-tests for freeness over commutative Artinian rings, J. Pure Appl. Algebra 215 (2011), no. 6, 1263–1269. MR2769231 D EPARTMENT OF M ATHEMATICS , W EST V IRGINIA U NIVERSITY, M ORGANTOWN , WV 26506 U.S.A E-mail address: [email protected] D EPARTMENT OF M ATHEMATICAL S CIENCES , U NIVERSITETSPARKEN 5, U NIVERSITY OF C OPENHAGEN , 2100 C OPENHAGEN Ø, D ENMARK E-mail address: [email protected] URL: http://www.math.ku.dk/~holm/
0math.AC
arXiv:1412.6161v2 [cs.SY] 19 Oct 2017 GRAPH-BASED DWELL TIME COMPUTATION METHODS FOR DISCRETE-TIME SWITCHED LINEAR SYSTEMS F. İlhan and Ö. Karabacak 12 September 2015 Abstract Analytical computation methods are proposed for evaluating the minimum dwell time and average dwell time guaranteeing the asymptotic stability of a discrete-time switched linear system whose switchings are assumed to respect a given directed graph. The minimum and average dwell time can be found using the graph that governs the switchings, and the associated weights. This approach, which is used in a previous work for continuous-time systems having non-defective subsystems, has been adapted to discrete-time switched systems and generalized to allow defective subsystems. Moreover, we present a method to improve the dwell time estimation in the case of bimodal switched systems. In this method, scaling algorithms to minimize the condition number are used to give better minimum dwell time and average dwell time estimates. Keywords: Switched systems, minimum dwell time, average dwell time, optimum cycle ratio, asymptotic stability, switching graph. 1 Introduction Problems regarding the stability of switched linear systems have been attracted the interest of many researchers in the last two decades [1]. A well-known approach to the stability of switched linear systems is to impose constraints on the set of switching signals so as to guarantee the stability [2, 3, 4, 5]. Mainly, two kinds of constraints have been considered: minimum dwell time constraint and average dwell time constraint. For the former, intervals between two consecutive switchings are assumed to be larger than or equal to a number called minimum dwell time, whereas for the latter, these intervals are assumed to be, on average, larger than or equal to a number called average dwell time. In the literature, there are many methods to find the minimum dwell time and/or the average dwell time that guarantee stability of a given switched system [6]. However, in general, there is no method that gives the smallest possible 1 minimum (or average) dwell time in terms of subsystem properties. The most efficient methods that can be used to approximate the minimum (or average) dwell time are based on linear matrix inequalities [3, 7] and therefore, they do not give any insight in the relationship between the subsystem properties and the minimum (or average) dwell time [8]. For continuous-time switched systems with non-defective subsystem matrices, an estimate of the minimum (or average) dwell time explicitly depending on the subsystem properties has been derived in [9, 10], where the minimum dwell time is found as a function of the subsystem eigenvalues and eigenvectors. The method in [9] is based on viewing a switching signal as a walk in the complete directed graph (digraph) whose nodes correspond to subsystems and whose arcs correspond to switching events. In [10], a more general problem has been considered, namely finding the minimum dwell time for switched systems whose switchings are governed by a digraph (called switching graph). Note that the special case of this problem where the switching graph is complete corresponds to the standard dwell time problem in the literature. On the other hand, the general problem is important because switched systems whose switchings are governed by a digraph can be encountered in control engineering applications [11, 12, 13]. Theoretically, such systems are first considered in the switched system literature, to the best of our knowledge, in [14], where stability conditions are reduced to the conditions on the strongly connected components of the digraph. Later on, the second author of this paper presents sufficient conditions for the stability of constrained switched systems using the properties of the digraph that governs the switchings [10]. This method has been improved in a conference paper [15] for continuoustime systems so as to cover systems with defective subsystem matrices. Recently, in [16], stabilization of switched systems whose switchings are governed by a digraph has been considered. Digraphs are also used in [17], where the multiple Lyapunov function method has been generalized. In this paper, we apply the method proposed in [10] to discrete-time switched linear systems and waive the non-defectiveness condition by considering the Jordan form of subsystem matrices. In addition, we improve the minimum dwell time estimate for bimodal systems by applying a scaling algorithm that minimizes the condition number of the matrices. In the sequel, we first explain how the switching graph arises naturally considering a bound on the norm of the solution of a linear switched system. In Section 2, we define the switching graph which will be used to estimate the minimum (or average) dwell time. Based on the switching graph, methods for minimum dwell time and average dwell time computation are given in Section 3 and Section 4, respectively. Finally, we will discuss on possible future research in this area in Section 6. Notation: R and N denote the set of real numbers and the set of positive integers, respectively. k · k denotes the 2-norm for vectors and the spectral norm for matrices. 2 2 Switched Systems and the Switching Graph We consider discrete-time switched linear systems of the form x(t + 1) = Aσ(t) x(t), σ ∈ S, t ∈ N, (1) where x ∈ RN is the state of the system, {Ai ∈ RN ×N }i∈{1,...,M} is a finite set of Schur stable subsystem matrices, M is the number of subsystems, N is the dimension of the state space, {1, . . . , M } is the index set for the subsystems and S denotes the set of admissible switching signals. Assume as switching instants 0 = t0 < t1 < . . . , where tk ∈ N and denote the index of the active subsystem from time tk to time tk+1 − 1 by σk . Let Nσ (t) denote the number of switchings in the time interval [0, t). Two different sets of switching signals are considered: Smin [τ ] = {σ|tk − tk−1 ≥ τ } (2) t } (3) τ Smin [τ ] consists of the switching signals for which the interval between two consecutive switchings is always larger than τ , whereas Save [τ, N0 ] is the set of switching signals with the property that at each time t the number of past switchings Nσ (t) satisfies the average dwell time condition Nσ (t) ≤ N0 + τt . For a given initial condition x(0), the solution of the discrete-time switched linear system (1) for t ∈ {tn , . . . , tn+1 − 1} can be written as ! n Y (t−tn ) (tk −tk−1 ) x(t) = Aσn+1 Aσk x(0). (4) Save [τ, N0 ] = {σ|Nσ (t) ≤ N0 + k=1 Let us consider the Jordan matrix decomposition Ai = Pi Ji Pi−1 where Pi is the generalized eigenvector matrix of Ai and Ji is the Jordan matrix. We use the fact that the 1’s above the diagonal in the Jordan matrix are conventional and can be replaced by any constant ǫ. To explain this, let us assume that the Jordan form J consists of one Jordan block, matrices with a Jordan form that consists of more than one Jordan block can be treated similarly. Then, by changing the generalized eigenvector matrix from P = [p0 |p1 |p2 | . . . ] to P (ǫ) = [p0 |ǫp1 |ǫ2 p2 | . . . ], the matrix A can be written as A = P (ǫ) · J (ǫ) · P (ǫ) −1 , (5) where J (ǫ) is in Jordan form with ǫ’s in place of 1’s. It is known that kJ (ǫ) k ≤ kDk + kN (ǫ) k where kDk denotes the diagonal part of J (ǫ) and N (ǫ) denotes the nilpotent part of J (ǫ) . Then, kN (ǫ) k = ǫ. For a Schur stable matrix A, kDk < 1, and we can choose an ǫ such that 0 < ǫ < 1 − kDk. Then, one gets kJ (ǫ) k < 1. For a matrix whose Jordan form consists of more than one Jordan blocks J1 , J2 , . . . , let us choose a sufficiently small ǫ satisfying ǫ < 1 − kDk k 3 (6) for each k, where Dk is the diagonal part of the Jordan block Jk . Since kJ (ǫ) k = (ǫ) maxk kJk k, we obtain kJ (ǫ) k < 1. (7) Moreover, since kDk = maxk kDk k, the condition (6) is equivalent to ǫ < 1 − kDk. (8) For each subsystem matrix Ai , we choose a generalized Jordan decomposition (ǫi ) (ǫi ) (ǫi ) −1 Ji Pi Ai = Pi with a sufficiently small ǫi satisfying ǫi < 1 − kDi k, (9) (ǫ ) where Di is the diagonal part of Ji . Then, we have kJi i k < 1. In the following we drop the superscript (ǫ) from matrices P (ǫ) and J (ǫ) for the simplicity of notation, unless it is necessary to indicate the dependence on ǫ. Note that for a non-defective subsystem matrix Ai , the Jordan form is diagonal and the Schur stability implies that kJi k = kDi k < 1. Substituting Ai = Pi Ji Pi −1 in (4), and using norm inequalities we have kx(t)k = n Y n Aσt−t n+1 Aσ(tkk −tk−1 ) k=1 ! n Y n) = Pσn+1 Jσ(t−t n+1 x(0) Pσ−1 P J (tk −tk−1 ) k+1 σk σk k=1 ! x(0) Pσ−1 1 kkJσn+1 k(t−tn ) · ≤ kPσn+1 kkPσ−1 1 n Y kPσ−1 P kkJσk k(tk −tk−1 ) k+1 σk k=1 ! · kx(0)k, (10) (ǫ ) (ǫ ) Let us define ρi i := kJi i k. Note that, if Ai is non-defective, then Ji is diagonal, and hence ρi is equal to the spectral radius of Ai . Then, writing the term between parentheses in Inequality (10) in exponential form, we have n) · kρσ(t−t kx(t)k ≤ kPσn+1 kkPσ−1 n+1 1 e Pn k=1  ln kPσ−1 k+1 n) e ≤ γρσ(t−t n+1 Pσ k+(tk −tk−1 ) ln ρσk k  −1 k=1 ln kPσ Pn k+1  kx(0)k Pσ k+(tk −tk−1 ) ln ρσk k  kx(0)k, (11) where γ = maxi,j∈{1,...,M} kPi kkPj−1 k. Since each subsystem is Schur stable, from (7) we have ln ρi = ln kJi k < 0, 4 (12) (t−t ) for all i. Then, using ρσn+1n < 1 and τ ≤ tk − tk−1 for σ ∈ Smin [τ ], we can write kx(t)k ≤ γ e Pn k=1  ln kPσ−1 k+1 Pσ k+τ ln ρσk k  kx(0)k = γeα(n) kx(0)k, (13) where α(n) = n X ln kPσ−1 P k + τ ln ρσk . k+1 σk (14) k=1 In the following, we show that the function α(n) can be seen as the weight of a walk (of length n) on a doubly weighted digraph called the switching graph. 2.1 Definition of a switching graph For some switched systems, transitions between subsystems are restricted by a digraph, whose nodes represent subsystems and whose directed edges represent admissible transitions between subsystems. As a consequence of this idea, a switching signal σ can be viewed as a walk on such a graph. It can be easily seen that each transition from subsystem i to subsystem j gives a contribution to α function which is a function of the ordered pair (i, j), namely (ǫ ) −1 (ǫ ) ln k(Pj j ) Pi i k + τ ln ρǫi i . These values can be assigned as the weights of the directed edges for all admissible transitions between subsystems. Consider (ǫj ) −1 + ωij = ln k(Pj ) − ωij (ǫi ) Pi k as the gain of the transition from subsystem i to sub(ǫ ) system j and = − ln ρi i as the loss of the dwelling at subsystem i per unit time. Then, we have a doubly weighted graph as follows. A switching graph of a switched linear system (1) is a doubly weighted digraph G = {V, E, ω + , ω − }. (15) Here, V is the set of nodes which is isomorphic to the index set of subsystems. E is the set of the directed edges that represent admissible transitions between subsystems. This set is given by E = {(i, j)|i 6= j, i, j ∈ V} in the case of no restriction imposed on transitions between subsystems, namely we have a fully connected switching graph. ω + and ω − are the real-valued weight functions defined on the set E as (ǫj ) −1 + ωij = ln k(Pj ) (ǫi ) − ωij = − ln ρi (ǫi ) Pi k (16) (17) For a switched system with four subsystems, the switching graph is shown in Figure 1. Assume that the switchings in the switched system under consideration should respect a directed graph. In this case, the set of admissible switching signals S is restricted by the directed edges of the switching graph. We 5 ρ4 ln ,− ρ2 4k ln P 1 ,− − 2 2 ln kP 4 − 1 P ln 2k kP ln kP2−1 P1 k, − ln ρ1 1 ln kP3−1 P2 k, − ln ρ2 ln kP1−1 P4 k, − ln ρ4 ln kP4−1 P1 k, − ln ρ1 ln kP − 2 1 P ln 4k kP ,− − 4 1 ln P ρ4 2k ,− ln ρ2 ln kP2−1 P3 k, − ln ρ3 ln kP1−1 P2 k, − ln ρ2 ln kP3−1 P4 k, − ln ρ4 4 3 ln kP4−1 P3 k, − ln ρ3 Figure 1: The switching graph (G1 ) of a switched system with four subsystems. On each edge, ω + and ω − are shown, respectively. denote by SG,min [τ ] = {σ ∈ Smin [τ ]|(σk , σk+1 ) ∈ E} (18) the set Smin [τ ] restricted by the switching graph G. This set of switching signals contains the switching signals that respect the given digraph G and satisfies the minimum dwell time property. Similarly, we have SG,ave [τ, N0 ] = {σ ∈ Save [τ, N0 ]|(σk , σk+1 ) ∈ E}. 2.2 (19) Maximum cycle ratio Consider a weighted digraph G = {V, E, ω}, where ω is a real-valued weight function defined on E. A walk W of length s can be defined as W = ((p1 , p2 ), (p2 , p3 ), . . . , (ps , ps+1 )) where (pi , pi+1 ) ∈ E for all i = 1, . . . , s. A path is a walk ((p1 , p2 ), (p2 , p3 ), . . . , (ps , ps+1 )) where p1 , . . . , ps are distinct and a P cycle is a path with ps+1 = p1 . The weight s of a walk W is defined as ω(W) = k=1 ω((pk , pk+1 )). Now consider a doubly weighted graph G = {V, E, ω + , ω − }. The ratio of a + cycle C in G is defined as ν(C) = ωω− (C) (C) . The maximum cycle ratio ν is defined as ν(G) = max ν(C) = max C∈C C∈C P|C| k=1 = max P|C| C∈C k=1 ω + (C) ω − (C) + ω ((pk , pk+1 )) ω − ((pk , pk+1 )) (20) where C denotes the set of all cycles in G and |C| is the length of the cycle C = (p1 , . . . , p|C| ). Similarly, the mean of a cycle is defined as µ(C) = cycle mean µ is defined as µ(G) = max µ(C) = max C∈C C∈C 6 ω + (C) . |C| ω + (C) |C| . The maximum (21) The optimum (minimum or maximum) cycle ratio, also known as profit-totime ratio, and the optimum cycle mean have been considered in graph theory literature [18, 19, 20, 21], and have many applications in different areas such as scheduling problems [22, 23, 24] and performance analysis of digital systems [25]. There are many algorithms that can be used to find the optimum cycle ratio and the optimum cycle mean for a given doubly weighted digraph (See [21]). In terms of practical complexity, one of the fastest algorithms is given in [20]. In the sequel, we use this algorithm for which a C code is available in Ali Dasdan’s personal web page [26]. 3 Minimum Dwell Time Computation In this section, we consider the switched linear system whose switchings are governed by the digraph G and the time interval between any consecutive switching instants is larger than or equal to the minimum dwell time τ . As a special case, the non-defective bimodal case is discussed in Subsection 3.1. Theorem 1 Let {Ai }i=1,...,M be a family of Schur stable matrices and let G be a switching graph. Then the switched linear system given by x(t + 1) = Aσ(t) x(t), σ ∈ SG,min [τ ], t∈N (22) is asymptotically stable if τ > ν(G), (23) where the maximum cycle ratio ν is found using the weights given in (16) and (17) with parameters ǫi satisfying (9). Proof. Note that a switching signal σ can be represented by a walk W in the switching graph. If the length of the walk is finite, last subsystem stays active forever thus guaranteeing the asymptotic stability of the switched linear system. Hence, we consider walks with infinite length, which represent switching signals having infinitely many switchings. Using Eq. (14), it is seen that α(n) is the weight of the walk Wn := (σ1 , σ2 ), (σ2 , σ3 ), . . . , (σn , σn+1 ) (24) + − for the weight function ωij = ωij − τ ωij . Using the fact that any walk on a digraph with M nodes can be decomposed into the union of some cycles and a path of length at most M − 1, α(n) is decomposed as α(n) = α∗ (n) + α2 (n) + α3 (n) + · · · + αM (n). Here α∗ (n) is the weight of the path and αk (n) is the sum of the weights of all k−cycles. Note that the assumption τ > ν(G) implies ω(C) := ω + (C) − τ ω − (C) < 0 for any cycle C. Namely, weights of all cycles are negative. Since V is finite, α(n) is bounded, and therefore, α(n) → −∞ as n → ∞. This is valid for all σ ∈ SG,min [τ ]. Hence, the switched linear system (22) is asymptotically stable. Remark 1 If all subsystem matrices are non-defective, then Theorem 1 reduces to the discrete-time version of Theorem 1 in [10]. 7 3.1 Bimodal case Theorem 1 can be enhanced for bimodal non-defective switched systems, namely switched systems with two non-defective subsystems. Since there is only one cycle in the graph associated with the bimodal case, the maximum cycle ratio is ln(kP2−1 P1 k · kP1−1 P2 k) ln(κ(P2−1 P1 )) ν(G) = = , (25) − ln(ρ1 ρ2 ) − ln(ρ1 ρ2 ) where κ denotes the condition number for the spectral norm, namely κ(A) = kAkkA−1 k. Therefore, using Theorem 1, the bimodal switched system is stable if ln(κ(P2−1 P1 )) τ> . (26) − ln(ρ1 ρ2 ) It is known that eigenvectors can be scaled by any nonzero scalar. Then, an eigenvector matrix multiplied on the right by a nonsingular diagonal matrix is also an eigenvector matrix. Let D denote the set of nonsingular diagonal matrices. Consider the eigenvector matrices P1 , P2 . Let P̄1 , P̄2 be the new eigenvector matrices obtained by scaling columns of P1 , P2 using D1 , D2 ∈ D, respectively. Then, we have P̄2−1 P̄1 = D2−1 P2−1 P1 D1 . (27) Hence, the condition (26) in Theorem 1 can be replaced by a stronger condition τ> ln(minDL ,DR ∈D κ(DL P2−1 P1 DR )) . − ln(ρ1 ρ2 ) (28) There is no analytical method for minimizing the condition number for the spectral norm by scaling rows and columns, but algorithmic methods are available [27, 28]. Corollary 1 The switched linear system (22) with two Schur stable subsystems is asymptotically stable if τ> ln(minDL ,DR ∈D κ(DL P2−1 P1 DR )) . − ln(ρ1 ρ2 ) (29) One can use any other p-norm in Inequality (10). The non-defectiveness condition implies that J is diagonal, hence kJkp = ρ(J), where ρ denotes the spectral radius and k · kp denotes the p-norm. Using the fact that p-norm is sub-multiplicative, one can similarly obtain the condition τ> ln κp (P2−1 P1 ) , − ln(ρ1 ρ2 ) (30) where, κp (A) = kAkp kA−1 kp . There is an analytical method [29] for minimizing the condition number for norms k · k1 and k · k∞ by scaling rows and columns. According to this method, for p = 1, ∞, min DL ,DR ∈D κp (DL ADR ) = ρ(|A||A−1 |) 8 (31) where |A| denotes the matrix whose elements are absolute value of the corresponding elements of A, and ρ denotes spectral radius. Hence, we have the following result: Corollary 2 The switched linear system (22) with M = 2 is asymptotically stable if ln(ρ(|P2−1 P1 ||P1−1 P2 |)) τ> . (32) − ln(ρ1 ρ2 ) 4 Average Dwell Time Computation In this section, the average dwell time problem is considered, namely finding the smallest possible value τ for which the switched system (1) is asymptotically stable for the average dwell time set (3). As a special case, the non-defective bimodal case is discussed in Subsection 4.1. Theorem 2 Let {Ai }i=1,...,M be a family of non-defective Schur stable matrices and let G be a switching graph. Then the switched linear system given by x(t + 1) = Aσ(t) x(t), σ ∈ SG,ave [τ, N0 ], t∈N (33) is asymptotically stable for all N0 if τ> µ(G) , − ln ρmax (34) where ρmax = maxi ρi and the maximum cycle mean µ is found using the weights given in (16) and (17) with parameters ǫi satisfying (9). Proof. For t ∈ {tn , . . . , tn+1 − 1} we have the Inequality (11), which can be written as (35) kx(t)k ≤ γeα(n)+t ln ρmax kx(0)k, Pn −1 where α(n) = k=1 ln kPσk+1 Pσk k. Consider the walk associated to the switching signal σ Wn := (σ1 , σ2 ), (σ2 , σ3 ), . . . , (σn , σn+1 ) (36) it is seen that the ω + -weight of the walk Wn is equal to α(n). Since a walk can be decomposed into the union of some cycles and a path of length less than M , where M is the number of nodes, α(n) = α∗ (n) + α2 (n) + α3 (n) + · · · + αM (n) (37) where α∗ (n) is the ω + -weight of the path of length less than M , say M∗ , and αk (n) is the sum of the ω + -weights of all cycles of length k. Defining γ̄ = + γemaxW ω (W) where W varies over all possible paths, we get kx(t)k ≤ γ̄eα2 (n)+α3 (n)+···+αM (n)+t ln ρmax kx(0)k. 9 (38) Consider the maximum cycle mean of the switching graph G, namely µ(G) = + (C) maxC∈C ω |C| , where |C| denotes the length of the cycle and C is the set of all cycles in G. Then, it is obtained that ω + (C) ≤ |C|µ(G). Since α2 (n), . . . , αM (n) are cycle weights, we get α2 (n) + · · · + αM (n) ≤ (Nσ (t) − M∗ )µ(G) t · µ(G) . ≤ (N0 − M∗ )µ(G) + τ (39) (40) Substituting this into (38) and defining γ̄¯ = γ̄eN0 µ(G) , we obtain kx(t)k ≤ γ̄¯ e( Since µ(G) τ µ(G) τ +ln ρmax )t kx(0)k. (41) + ln ρmax < 0 by assumption, we conclude that kx(t)k → 0 Remark 2 If all subsystem matrices are non-defective, then Theorem 2 reduces to the discrete-time version of Theorem 2 in [10]. 4.1 Bimodal case Similarly to the minimum dwell time case, the average dwell time method can be improved for non-defective bimodal switched systems. As there is only one + cycle in a bimodal system, µ(G) = ω 2(C) . Then, the average dwell time satisfies + ln κ (P −1 P ) µ(G) ω (C) p 1 2 τ > − ln ρmax = −2 ln ρmax = −2 ln ρmax . Hence, the method in Subsection 3.1 can be applied to the computation of the average dwell time. 5 Illustrative Examples We apply the obtained minimum dwell time computation method to two illustrative examples and compare the results with two different methods in the literature: The method given by Morse in [2], which finds a minimum dwell time guaranteeing each subsystem to be contractive, and the method given by Geromel & Colaneri in [30], which uses linear matrix inequalities based on a multiple Lyapunov function technique. We skip the comparison of the obtained average dwell time computation with other methods in the literature since they either require a specified convergence rate as in [31] or they refer to in modedependent form as in [32], namely for each subsystem a certain average dwell time condition is imposed. Example 1 Consider a switched system consisting of four linear subsystems whose matrices are given by Ak = (U −1 )k · A · U k , k = 0, . . . , 3 Here, 10 (42) ln kP2−1 P1 k, −lnρ1 ln kP3−1 P2 k, −lnρ2 2 ln kP1−1 P4 k, −lnρ4 1 ln kP4−1 P3 k, −lnρ3 4 3 Figure 2: The one-sided ring switching graph (G2 ) considered in Example 1. On each edge, ω + and ω − are shown, respectively. ln kP2−1 P1 k, −lnρ1 1 2 ln kP3−1 P2 k, −lnρ2 ln kP2−1 P3 k, −lnρ3 ln kP4−1 P1 k, −lnρ1 ln kP1−1 P4 k, −lnρ4 ln kP1−1 P2 k, −lnρ2 ln kP3−1 P4 k, −lnρ4 4 3 ln kP4−1 P3 k, −lnρ3 Figure 3: The two-sided ring switching graph (G3 ) considered in Example 1. On each edge, ω + and ω − are shown, respectively. A= and U=  −0.2 1 0 −1 1.4 0 0 0 −0.4  1.2  0 0 π 0 cos( π 3 ) sin( 3 ) π ) cos( 0 − sin( π 3 3)  . Assume that the switchings respect one of the switching graphs: fully connected G1 (Fig. 1), one-sided ring G2 (Fig. 2) and two-sided ring G3 (Fig. 3). For different switching graphs, minimum dwell time values are computed using Theorem 1 in Table 1. It can be seen that the results are better than the results obtained by the method given by Morse in [2]. Comparing the results with the method given by Geromel&Colaneri in [30], it can be seen that only for the switching graph G3 , Theorem 1 gives a worse result. 11 Let us consider a bimodal system for which we can use Corollary 1 and the two-sided equilibration method in [28] to compute a better value for the minimum dwell time than the one obtained by Theorem 1. Example 2 Let A1 and A2 given below be the subsystem matrices of a switched system:  −0.38 0.2 0.1  A1 = −0.16 0.72 0.16 −0.24 0.24 0.8  −0.8 −0.07 0.04  A2 = 0.1 −1 0.05 −0.1 −0.06 −0.34 τ is calculated as 7 using the condition given in Theorem 1. However, applying Corollary 1, τ is calculated as 1 which is equal to the value found by linear matrix inequalities method [30]. Here, we use the two sided equilibration method in [28] which is based on the idea that the condition number can be reduced by making norms of rows as well as norms of columns equal. The row scaling matrix DL and the column scaling matrix DR are calculated as below:  0.8528 0  0 0 0.7178 0 DR = 0 DL = 6 0  1.8805 0 0 1.9789 0 0 0.4700 0 0 1.8803  . Conclusion A method for the computation of the minimum dwell time that guarantees the asymptotic stability of a switched system has been presented. The method is applicable to systems whose switchings are governed by a digraph. The graphtheoretical nature of the method allows fast computation of an estimate of the minimum dwell time using the maximum cycle ratio algorithms in graph theory. We note that there are many problems that can be considered for the switched systems whose switchings are governed by digraphs. The role that the nature of the switching digraph plays on the dynamics of the switched system should be considered further. We have shown that the average dwell time can be computed using the minimum cycle mean of the switching graph. This approach can be improved in two different ways: Firstly, one can introduce the mode-dependent average dwell time as in [32], and try to find sufficient conditions on the mode-dependent average dwell times for a given switching graph. Secondly, one can consider a preassumed convergence rate as in [31] to calculate the average dwell time of a given switching graph in a less conservative method. Acknowledgement This research was supported by TÜBİTAK (The Scientific and Technological Research Council of Turkey), project no: 115E475. 12 Table 1: The minimum dwell time values computed for Example 1. Minimum dwell time Switching Geromel Graph Theorem 1 Morse[2] Colaneri[30] τ τ τ G1 7 8 7 G2 7 8 7 G3 5 8 2 References [1] Hespanha J. Uniform stability of switched linear systems: extensions of LaSalle’s invariance principle. IEEE Trans on Auto Cont. 2004;49(4):470– 482. [2] Morse S. Supervisory control of families of linear set-point conrollers-part 1: exact matching. IEEE Trans on Auto Cont. 1996;41(10):1413–1431. [3] Geromel J, Colaneri P. Stability and stabilization of continuous-time switched linear systems. SIAM J on Contr Optim. 2006;45(5):1915–1930. [4] Guo R, Wang Y. Stability analysis for a class of switched linear systems. Asian J Control. 2012;14:817–826. [5] Cai C, Mijanovic S. LMI-based stability analysis of linear hybrid systems with application to switched control of a refrigeration process. Asian J Control. 2012;14:12–22. [6] Shorten R, Wirth F, Mason O, Wulff K, King C. Stability Criteria for Switched and Hybrid Systems. SIAM Review. 2007 Jan;49(4):545–592. Available from: http://epubs.siam.org/doi/abs/10.1137/05063516X. [7] Graziano C, Colaneri P, Geromel J, Middleton R, Shorten R. A nonconservative LMI condition for stability of switched systems with guaranteed dwell time. IEEE Trans on Auto Cont. 2012;57(5):1297–1302. [8] Haimovich H, Braslavsky J, Felicioni F. Feedback stabilization of switching discrete-time systems via Lie-algebraic techniques. IEEE Trans on Auto Cont. 2011;56(5):1129–1135. [9] Karabacak O, Şengör N. A dwell time approach to the stability of switched linear systems based on the distance between eigenvector sets. Int J System Science. 2009;40(8):845–853. [10] Karabacak Ö. Dwell time and average dwell time methods based on the cycle ratio of the switching graph. Syst Control Lett. 2013;62(11):1032– 1037. 13 [11] Hou Y, Dong C, Wang Q. Stability analysis of switched linear systems with locally overlapped switching law. J Guid Control Dyn. 2010;33(2):396–403. [12] Xu L, Wang Q, Li W, Hou Y. Stability analysis and stabilisation of fullenvelope networked flight control systems: switched system approach. IET Control Theory A. 2012;6(2):286–296. [13] Zhang W, Hou Y, Liu X, Zhou Y. Switched control of three-phase voltage source PWM rectifier under a wide-range rapidly varying active load. IEEE Trans Power Electron. 2012;27(2):881–890. [14] Mancilla-Aguilar J, Garcia R, Sontag E, Wang Y. Uniform stability properties of switched systems with switchings governed by digraphs. Nonlinear Anal-Theor. 2005;63(3):472–490. [15] Karabacak O, Ilhan F, Öner I. Explicit sufficient stability conditions on dwell time of linear switched systems. In: Proc of the 53rd Conf on Decision and Control. Los Angeles, California; 2014. . [16] Kundu A, Balachandran N, Chatterjee D. Algorithmic synthesis of stabilizing switching signals for discrete-time switched linear systems. 2014;arXiv:1405.1857 [cs.SY]. Available from: http://arxiv.org/abs/1405.1857. [17] Ahmadi A, Jungers R, Parrilo P, Roozbehani M. Analysis of the Joint Spectral Radius via Lyapunov Functions on Path-Complete Graphs. SIAM J on Contr Optim. 2014;52(1):687–917. [18] Karp R. Characterization of minimum cycle mean in a digraph. Discrete Math. 1978;23(3):309–311. [19] Golitschek M. Optimal cycles in doubly weighted graphs and approximation of bivariate functions by univariate ones. Numer Math. 1982;39(1):65–84. [20] Dasdan A, Gupta R. Faster maximum and minimum mean cycle algorithms for system-performance analysis. IEEE T Comut Aid D. 1998;17(10):889– 899. [21] Dasdan A. Experimental analysis of the fastest optimum cycle ratio and mean algorithms. ACM Trans Des Autom Electron Syst. 2004;9(4):385– 418. [22] Bouyer P, Brinksma E, Larsen K. Staying alive as cheaply as possible. In: Alur, R and Pappas, GJ, editor. Hybrid Systems: Computation and Control, Proceedings. vol. 2993 of Lect Notes Comput Sc; 2004. p. 203–218. [23] Leus R, Herroelen W. Scheduling for stability in single-machine production systems. J Sched. 2007;10(3):223–235. 14 [24] Kats V, Levner E. Cyclic routing algorithms in graphs: Performance analysis and applications to robot scheduling. Comput Ind Eng. 2011;61(2, SI):279–288. [25] Lu R, Koh C. Performance analysis of latency-insensitive systems. IEEE T Comput Aid D. 2006;25(3):469–483. [26] Dasdan A. Personal webpage;. http://www.dasdan.net/ali/publications.php#journals_submitted. [27] Braatz R, Morari M. Minimizing the euclidean condition number. SIAM J on Contr Optim. 1994;32(6):1763–1768. [28] Liu C. A Two-Side Equilibration Method to Reduce the Condition Number of an Ill-Posed Linear System. CMES-Comp Model Eng. 2013;91(1):17–42. [29] Bauer F. Optimally scaled matrices. Numer Math. 1963;5:73–87. [30] Geromel J, Colaneri P. Stability and stabilization of discrete time switched systems. Int J Control. 2006;79(7):719–728. [31] Zhang W, Yu L. Stability analysis for discrete-time switched timedelay systems. Automatica. 2009;45(10):2265 – 2271. Available from: http://www.sciencedirect.com/science/article/pii/S0005109809002878. [32] Zhang J, Han Z, Zhu F, Huang J. Stability and stabilization of positive switched systems with mode-dependent average dwell time. Nonlinear Analysis: Hybrid Systems. 2013;9(0):42 – 55. Available from: http://www.sciencedirect.com/science/article/pii/S1751570X1300006X. 15
3cs.SY
Modified Soft Brood Crossover in Genetic Programming Hardik M. Parekh Vipul K. Dabhi Information Technology Department Dharmsinh Desai University Nadiad, India [email protected] Information Technology Department Dharmsinh Desai University Nadiad, India [email protected] Abstract – Premature convergence is one of the important issues while using Genetic Programming for data modeling. It can be avoided by improving population diversity. Intelligent genetic operators can help to improve the population diversity. Crossover is an important operator in Genetic Programming. So, we have analyzed number of intelligent crossover operators and proposed an algorithm with the modification of soft brood crossover operator. It will help to improve the population diversity and reduce the premature convergence. We have performed experiments on three different symbolic regression problems. Then we made the performance comparison of our proposed crossover (Modified Soft Brood Crossover) with the existing soft brood crossover and subtree crossover operators. Index Terms – Intelligent Crossover, Genetic Programming, Soft Brood Crossover I. INTRODUCTION Genetic programming is a model of programming which uses the ideas of biological evolution to handle a complex problem. From the number of possible solutions, the most effective solutions survive and compete with other solutions in such a way to reach closer to the needed solution. Premature convergence is one of the most important issues while using Genetic Programming for data modeling. Premature convergence leads to evolution of solutions which are locally optimal. Premature convergence can be avoided by improving population diversity. Population diversity can be improved using intelligent crossover. Our research aim is to improve population diversity using intelligent crossover. We have analyzed different toolkits available for GP and found the JCLEC[3] (Java Class Library for Evolutionary Computation) useful for our research work. JCLEC is an open source, platform independent and implemented in java. convergence leads to evolution of solutions which are locally optimal. To evolve globally optimal solutions, avoidance of premature convergence is required. Our aim is to avoid premature convergence during GP run and hence we have to improve the population diversity. Intelligent crossover operator can be useful to improve population diversity. We have analyzed few intelligent crossover operators like Context Aware Crossover (CAC) [4], Semantic Aware Crossover (SAC) [1], Semantic Similarity based Crossover (SSC) [5], Soft Brood Crossover [2], Approximating Geometric Crossover [6], Selective Crossover [8] and Size Fair Crossover [7]. From the comparison of different crossover operators, bases on different criteria specified in Table 1, we have observed that soft brood crossover operator can be useful to improve the population diversity. TABLE I COMPARISON OF INTELLIGENT CROSSOVER OPERATORS A. Soft Brood Crossover(SBC) II. INTELLIGENT CROSSOVER OPERATORS Crossover is an important operator in genetic programming. Standard crossover may produce the offspring same as their parents. Standard crossover does not having intelligence that how to avoid this problem of generating offspring same as their parents. Intelligent crossover combines the parents in such a way that it can generate the offspring having better fitness than their parents. Premature Soft brood crossover differs from the other crossover operators. The number of crossover performs on the same pair of parents. The performed operations generate the number of offspring. Then each offspring is evaluated based on their fitness. From the generated offspring two best fittest offspring passes into next generation and the rest are discarded. B. Modified Soft Brood Crossover(MSBC) We have proposed a crossover operator that modifies existing soft brood crossover operator. This can help to prevent premature convergence and improve the population diversity. Algorithm1 presents the pseudo code for proposed crossover operator in detail. Algorithm 1: Modified Soft Brood Crossover 1. Select parent P1 and P2 for crossover 2. N random crossover operations are performed to generate a brood of 2N children 3. If generation <= (1/2) Total generation a. The fitness of all children is calculated b. Most two dissimilar (based on fitness) children are copied into next generation and rest are discarded 4. Else a. The evaluated children sorted based on their fitness b. Two best fittest children are copied into next generation and other are discarded. Modified Soft Brood Crossover operator generates the number of offspring from the same pair of parent. For the first half of the generation we are passing two most dissimilar offspring into next generation based on their fitness. And for the rest half generation we are passing two best fittest offspring into next generation. TABLE II RESULTS FOR DIFFERENT RATIO OF GENERATIONS Problem 1: cos (√sin (q)) * cos (p) * sin(x) + tan(r-s) Problem 2: Sextic Polynomial: x6 - 2x4 +x2 Problem 3: 2x2-3x +4 III TOOLKIT We have analyzed the different toolkits available for GP and found JCLEC[3] (Java Class Library for Evolutionary Computation) useful for our research work. JCLEC is an open source, platform independent and implemented in java. We need to specify the GP parameters in the configuration file of JCLEC toolkit which is in XML file format, to run the experiments. (a) Configuration parameters First of all we have to select an algorithm to solve the problem. We have selected SGE (Simple Generational and Elitist Algorithm) which is available in JCLEC specifically for genetic programming. <process SGE”> algorithm-type =”net.sf.jclec.algorithm.classic. Standard GP uses tree representation to represent an individual. We have also used tree representation to represent an individual. Thus, the package net.sf.jclec.exprtree must be used, establishing the minimum tree size, the maximum tree size and the list of terminal symbols and functions. Below we present that how to set the tree size, terminals and functions. <species type =”net.sf.jclec.exprtree.ExprTreeIndividual Species” > <min-tree-size> 3 </min-tree-size> <max-tree-size> 25 </max-tree-size> <terminal class = “ tutorial.symreg.X “/> <function class=”tutorial.symreg.Add”/> <function class=”tutorial.symreg.Sub”/> <function class=”tutorial.symreg.Mul”/> The population is randomly initialized by using expression trees and the class net.sf.jclec.exprtree.ExprTreeCreator. < provider type =”net.sf.jclec.exprtree.ExprTreeCreator”/> We performed 30 runs for each problem using different percentage of generations by passing them into the first and second half of the crossover operator. From the obtained results represented in Table II, we found that passing the 50% of generations in the first half and the 50%of generations in the second half gives the best results. We need to specify the max of generation for stopping criterion. <max-of-generations> 100 </max-of-generations> Selection of parents can be set by using the net.sf.jclec.selector package. Tournament selection gives the better performance, so we have selected the tournament selector as parent selector. <parents-selectors type = “net.sf.jclec.selector. TournamentSelector” tournament-size=”7”/> Fitness function calculated using evaluator. The declaration of evaluator type is mandatory. We use the symbolic regression problem so we specified SymregEvaluator as evaluator type. <evaluator type=”tutorial.symreg.SymregEvaluator”/> (b) packages used for Experiment: net.sf.jclec.fitness This package contains implementations of the IFitness interface. JCLEC does not have the support for soft brood crossover operator. So we have implemented it. Only subtree crossover and tree crossover operators are available in JCLEC for genetic programming. Subtree crossover operators performs the crossover with the branches of tree where as tree crossover performs the crossover with the whole tree. For the implementation of soft brood crossover operator we have modified the SubtreeCrossover class and ExprTreeRecombinator class files. We modified the SubtreeCrossover class file because it contains the logic of crossover point selection and helpful to implement the proposed crossover. The modification of ExprTreeRecombinator class file is required because it contains the method that called the genetic operator which is set into the configuration file that is in xml format. several net.sf.jclec.selector This package has implementations for several selection methods. Boltzmann Selector, Random Selector, Roulette selector, Stochastic remaining selection, Universal stochastic selection, Range selection, Tournament selection are available selectors in this package. net.sf.jclec.exprtree contains the ExprTreeIndividual which defines a type of individual. This package also contains the ExprTreeIndividualSpecies class that defines the structure of individuals and operators to manipulate them continuously. Subtree Crossover, Tree Crossover, AllNodesMutator, DemoteMutator, GrowMutator, OneNodeMutator, PromoteMutator, PromoteMutator, TruncMutator are the available operators for GP in JCLEC. (c) Implementation details: Multi-dimensional symbolic regression problem solving facility was not available in JCLEC. We have implemented it by modifying SymregEvaluator class file. There are only three functions are available, that is Addition, Multiplication and Subtraction. We implemented following functions division, sin, cosine, tan, square root, exponential and log in JCLEC for our experiments. To use the newly created terminals and functions we need to set them in configuration file. We modified the seed generator class file to pass the current time as a seed, rather than the static seed. For the comparing of performance of our proposed crossover operator with standard subtree crossover and soft brood crossover, we have to generate the graphs of fitness versus generation. For that we have modified the PopulationReporter class file that generates the .csv file that contains the generation and fitness. IV EXPERIMENTS We have performed the experiments on three different symbolic regression problems. Problem 1: cos (√sin (q)) * cos (p) * sin(x) + tan(r-s) Problem 2: Sextic Polynomial: x6 - 2x4 +x2 Problem 3: 2x2-3x +4 TABLE III GP PARAMETERS FOR THE ABOVE PROBLEMS Parameters Value Population size 100 Maximum Generation 50 Min Tree Size 3 Max Tree Size 25 Terminal Set for Problem 1 {X,P,Q,R,S} Terminal Set Problem 2 {X} Terminal Set Problem 3 {X, Constants(0 to 1)} Function Set for Problem 1 Function Set for Problem 2 and Problem 3 Parent selector {+, -, *, Sqrt, Sin, Cos, Tan} {+, -, *} Tournament selector with size 7 Crossover Probability 0.8 Mutation Probability 0.1 For the Problem 1, 2 and 3 we have set the GP parameters as shown in the Table III. And we have prepared the results of 30 runs for each problem using subtree crossover, soft brood crossover and modified soft brood crossover operators. Fig. 1 Plot of Generations v/s Fitness for Problem1 using SubtreeCrossover Fig. 4 Plot of Generations v/s Fitness for Problem2 using SubtreeCrossover Fig. 2 Plot of Generations v/s Fitness for Problem 1 using Soft Brood Crossover Fig. 5 Plot of Generations v/s Fitness for Problem2 using Soft Brood Crossover Fig. 3 Plot of Generations v/s Fitness for Problem1 using Modified Soft Brood Crossover. Fig. 6 Plot of Generations v/s Fitness for Problem2 using Modified Soft Brood Crossover Figure 1 shows that best fitness obtained at 48th generation using subtree crossover. Figure 2 shows that best fitness obtained at 39th generation using Soft brood crossover and Figure 3 represents that best fitness obtained at 5th generation using Modified soft brood crossover. For the Problem 1, our proposed crossover gives the best fitness into less number of generations compare to subtree crossover and soft brood crossover operators. Figure 4 shows that best fitness obtained at 27th generation using subtree crossover. Figure 5 shows that best fitness obtained at 43rd generation using Soft brood crossover and Figure 6 represents that modified soft brood crossover obtained best fitness at 5th generation. From the obtained results for Problem 2, we can say that our proposed crossover obtains the best fitness into less number of generations compare to soft brood crossover and subtree crossover operators. CONCLUSIONS Fig. 7 Plot of Generations v/s Fitness for Problem3 using SubtreeCrossover We proposed a new crossover operator for genetic programming that modifies the existing soft brood crossover operator. We have implemented soft brood crossover and proposed crossover (modified soft brood crossover) into the JCLEC toolkit. Then we have performed the experiments on three different symbolic regression problems (high dimension, sextic polynomial, symbolic regression with constants) using subtree crossover, soft brood crossover and modified soft brood crossover operators. From the obtained results for three different problems, we can conclude that our proposed crossover (Modified Soft Brood Crossover) gives good performance than the existing Soft Brood Crossover and Subtree Crossover operators. REFERENCES [1] Q. U. Nguyen, X. H. Nguyen, and M. O. Neill, “Semantic Aware Crossover for Genetic Programming: The Case for Real-Valued Function Regression,” pp. 292–302, 2009. [2] TACKETT, W. A. Recombination, Selection and the Genetic Construction of Computer Programs. PhD thesis, University of Southern California, Department of Electrical Engineering Systems, 1994. [3] S. Ventura, C. Romero, A. Zafra, J. a. Delgado, and C. Hervás, “JCLEC: a Java framework for evolutionary computation,” Soft Computing, vol. 12, no. 4, pp. 381–392, Apr. 2007. Fig. 8 Plot of Generations v/s Fitness for Problem3 using Soft Brood Crossover [4] Hammad Majeed and Conor Ryan. A less destructive, context-aware crossover opera tor for GP. In Proceedings of the 9th European Conference on Genetic Programming, pages 36–48. Lecture Notes in Computer Science, Springer, April 2006. [5] N. Q. Uy, M. O. Neill, N. X. Hoai, B. Mckay, and E. Galv, “Semantic Similarity based Crossover in GP for Real-valued Function Regression.” In Proceedings of the 9th International conference on Artificial evolution, 2010. [6] K. Krawiec and P. Lichocki, “Approximating geometric crossover in semantic space,” Proceedings of the 11th Annual conference on Genetic and evolutionary computation - GECCO ’09, p. 987, 2009. [7] W. B. Langdon, “Size Fair and Homologous Tree Genetic Programming Crossovers It has been known for some time that programs within,” pp. 1–6. [8] S. Hengpraprohm and P. Chongstitvatana. Selective crossover in genetic programming. In Proceedings of ISCIT International Symposium on Communications and Information Technologies, pages 14–16, November 2001. Fig. 9 Plot of Generations v/s Fitness for Problem3 using Modified Soft Brood Crossover Figure 7 shows that subtree crossover obtained the best fitness at 8th generation. Figure 8 shows that Soft brood crossover obtained best fitness at 3rd generation and Figure 9 represents that modified soft brood crossover obtained best fitness at 2nd generation. In the case of Problem 3, modified soft brood crossover obtained the same fitness as soft brood crossover and subtree crossover. But, modified soft brood crossover obtained the fitness in less number of generations than the other two crossover operators. [9] J. H. Holland, C. Langton, S. W. Wilson, and J. H. Holland, Genetic Programming On the Programming of Computers by Means of Natural Selection. MIT Press Cambridge, MA, USA ©1992. pp-76 [10] N. Quang, U. Nguyen, X. Hoai, and E. Galv, “Semantically-based Crossover in Genetic Programming: Application to Real-valued Symbolic Regression”. Journal of Genetic Programming and Evolvable Machines, Volume 12 Issue 2, June 2011. [11] O’Neill, M., Vanneschi, L., Gustafson, S., & Banzhaf, W. (2010). Open issues in genetic programming. Genetic Programming and Evolvable Machines, 11(3-4), 339–363. [12] N. T. Hien and N. X. Hoai, “A Brief Overview of Population Diversity Measures in Genetic Programming”, In: Proceedings of the Third AsianPacific workshop on Genetic Programming Military Technical Academy, Hanoi, VietNam: (2006), pp.128-139.
9cs.NE
arXiv:1706.08708v1 [cs.IT] 27 Jun 2017 Minimum BER Precoding in 1-Bit Massive MIMO Systems Hela Jedda and Josef A. Nossek Amine Mezghani Institute of Circuit Theory and Signal Processing Technische Universität München, 80290 Munich Germany Email: {hela.jedda, josef.a.nossek}@tum.de University of California, Irvine Irvine, CA 92697, USA Email: [email protected] Abstract—1-bit digital-to-analog (DACs) and analog-to-digital converters (ADCs) are gaining more interest in massive MIMO systems for economical and computational efficiency. We present a new precoding technique to mitigate the inter-user-interference (IUI) and the channel distortions in a 1-bit downlink MUMISO system with QPSK symbols. The transmit signal vector is optimized taking into account the 1-bit quantization. We develop a sort of mapping based on a look-up table (LUT) between the input signal and the transmit signal. The LUT is updated for each channel realization. Simulation results show a significant gain in terms of the uncoded bit-error-ratio (BER) compared to the existing linear precoding techniques. I. I NTRODUCTION Massive MIMO systems have been seen as a promising technology for the next generation wireless communication systems [1], [2]. The huge increase in the number of antennas at the base station (BS) can improve spectral efficiency (SE), energy efficiency (EE) and reliability. The BS with large number of antennas, say 100 antennas or more, serves simultaneously a much smaller number of single-antenna users. The price to pay for massive MIMO systems is increased complexity of the hardware (number of radio frequency (RF) and ADC/DAC chains) and the signal processing and resulting increased energy consumption at the transmitter [3]. Several approaches are considered in the literature to decrease the power consumption such as spatial modulation [4], [5], the use of parasitic antennas [6], [7] and the use of low-cost transceivers [8]. One attractive solution to overcome the issues of high complexity and high energy consumption associated with massive MIMO, is the use of very low resolution ADCs and DACs. The power consumption of the ADC and the DAC, one of the most power-hungry devices, can be reduced exponentially by decreasing the resolution [9] and 1bit quantization can drastically simplify other RF-components, e.g., amplifiers and mixers. Therefore, we focus on massive MIMO systems where the resolution of the DACs and ADCs is restricted to 1 bit, e.g. 1-bit massive MIMO systems. With the knowledge of CSI at the BS (CSIT), this large spatial DoF of massive MIMO systems can be exploited to significantly increase the spatial multiplexing/diversity gain using MU-MIMO precoding [10], [11]. In the literature [12], [13] linear precoders are designed for 1-bit massive MIMO systems based on minimum-mean-square-error criterion (MMSE) to mitigate IUI and the distortions due to the coarse quantization. However, the MMSE criterion may be not optimal since the desired receive signals are restricted to discrete QPSK points and they can be corectly detected if they belong to the respective quadrants. Thus, we aim at changing the design criterion to the minimun BER (MBER). The goal is to get the receive signal in the desired quandrant and as far as possible from the decision thresholds. In this contribution, we do not design a precoder but the transmit signal vector. So, we design a sort of mapping based on a LUT between the input signal vector and the transmit signal vector. The LUT is updated for each channel. The entries of the transmit signal vector belong to the square formed by the QPSK constellation points to minimize the quantization distortions at the transmitter. This paper is organized as follows: in Section II we introduce the downlink MU-MISO system model. In Section III we give an overview about the mapping idea. The MBER criterion is illustrated and explained in Section IV. In Section V we formulate the optimization problem based on the MBER criterion and show the derivations and the corresponding solution. We give two linear precoder designs in Section VI, that we aim at comparing with. In Sections VII and VIII we interpret the simulation results and summarize this work. Notation: Bold letters indicate vectors and matrices, nonbold letters express scalars. The operators (.)∗ , (.)T , (.)H , adj(.) and E [.] stand for complex conjugation, the transposition, Hermitian transposition, adjugate and the expectation, respectively. The n × n identity matrix is denoted by In while the zeros (ones) matrix with n rows and m columns is defined as 0n,m (1n,m ). The vector el represents a zero vector with 1 in the l-th position. We define (•)R = ℜ{•}, (•)I = ℑ{•} √ and Q(x) = 1/ 2 (sign(xR ) + j sign(xI )) with sign(0) = 1. Additionally, diag(A) denotes a diagonal matrix containing only the diagonal elements of A. II. S YSTEM M ODEL s OM×1 M x C N ×1 Q(•) xQ ON ×1 r H C M×1 + Q(•) ŝ OM×1 η Fig. 1. Downlink MU-MISO System model with QPSK symbols We consider a 1-bit downlink MU-MISO scenario as depicted in Fig. 1. The BS with N antennas serves M singleantenna users, where N ≫ M . The signal vector s ∈ OM contains the data symbols for each of the M users, where O represents the set of QPSK constellation. We assume that s ∼ O 0M , σs2 IM . In this system we deploy 1-bit quantization Q at the transmitter as well as at the receiver. The use of the 1-bit quantizer at the transmitter delivers a signal xQ ∈ ON . To mitigate the IUI and the distortions due to the coarse quantization, the input signal vector s is mapped to the unquantized transmit signal vector x prior to DAC. This mapping is based on a LUT of size N × 4M , that is generated at the beginning of q each coherence slot. Etx The transmit signal gets scaled with N , where Etx is the available power at the transmitter. The received decoded signal vector  ŝ q ∈ C M×1 of the  M single-antenna users reads as Etx M×N is the channel ŝ = Q N HxQ + η , where H ∈ C desired quadrant, we need to get the receive signal as far as possible from the quantization thresholds to make it less sensitive to the noise. For illustration we consider Fig. 3. The red points designate the QPSK constellation. The solution set for the MBER criterion is represented by the four half-bounded squares. However, the MMSE criterion tries to have the receive signal as close as possible to the desired signal. So we get the green circles. Thus, the MMSE solution set is restricted to a subset of the MBER solution set. When massive MIMO is employed, the signals can get larger magnitude and this is prohibited by MMSE but preserved by MBER. ℑ ℜ matrix with i.i.d. complex-valued entries of zero mean and unit variance and η ∼ CN (0M , Cη = IM ) is the AWG noise vector. III. M APPING : M In this work, we do not design a precoder but we design the transmit vector signal x for a given input signal vector s depending on the channel, while we assume full CSIT. As depicted in Fig. 2, first, an optimization problem is solved for all possible input vectors s to find the optimal transmit vectors x. The used optimization problem is introduced in Section V. Second, the solutions are stored in the LUT of size N × 4M . Since we are restricted to QPSK modulation, we get 4M possible input vectors. Third, we map the given input vector s into a signal vector x according to the LUT, which is updated for each channel. The aim of the optimization problem is to jointly minimize the IUI and the quantization distortions. The optimization criterion is the minimun BER (MBER) under the constraint that x ∈ ON . This constraint leads to a linear behavior of the quantizer at the transmitter, e.g. xQ = x. Thus, the quantization distortions at the transmitter are omitted. LUT Optimization Problem Fig. 3. MMSE vs. MBER criterion In order to explore the MBER criterion, we have to formulate an appropriate mathematical optimization problem. To this end we refer to Fig. 4 for illustration. As mentioned above we aim at making the receive signal r belong to the safe red area. One way is to maximize ℜ{rs∗ } and minimize |φ|, where φ ∈ − π4 , π4 . Fortunately, there is a mathematical expression   that can enable maximizing ℜ{rs∗ } while φ ∈ − π4 , π4 , which is given by 2 max ℜ{(rs∗ ) } = max |r|2 |s|2 cos(2φ) x x s.t. x ∈ ON . The solution of (1)  requires  that cos(2φ) is positive which is achieved by φ ∈ − π4 , π4 . Mapping rℑ 1. 2. (1) ℑ r ℑ{rs∗ } 3. Fig. 2. Processing steps for each channel IV. MBER CRITERION φ A. Single User Scenario To minimize the BER in the case of QPSK symbols, we need to get the receive signal in the same quadrant as the desired signal. Since the receive signal gets distorted with some additive Gaussian noise that may remove it from the rℜ s ℜ{rs∗ } ℜ Fig. 4. Illustration of the optimization problem B. Multi User Scenario For the multi user scenario we make use of the same optimization problem in (1) and apply it for each user 2 max ℜ{(rm s∗m ) } x 2 2 = max |rm | |sm | cos(2φm ), m = 1, 2, ..., M x s.t. x ∈ ON , (2) PM PM where r = m=1 rm em and s = m=1 sm em . The M cost functions can be jointly expressed by the following matrix n 2 o P = ℜ diag rsH n 2 o = ℜ diag HxsH  2        xℜ  xℜ    = diag  Hℜ −Hℑ sℑ T  s ℜ T + Hℑ Hℜ |  {z } xℑ | {z } xℑ | {z } C D x′ −diag   Hℜ −Hℑ 2      xℜ   xℜ sℜ T s ℑ T − Hℑ Hℜ xℑ xℑ 2 ′ T ′ T ′ T = diag(Cx′ sT ℜ + Dx sℑ ) − diag(Cx sℑ − Dx sℜ ) | {z } {z } | A 2 B = A2 − B2 . (3) We end up with M cost functions that have to be jointly maximized with a single transmit vector x. These M cost functions have to be combined to maximize them together. Here the question arises: how to do that? Shall we maximize the sum, the minimal contribution or the product? V. O PTIMIZATION P ROBLEM The optimization problem PN can not be Nconvex since the is non-convex. solution set of x = n=1 xn en ∈ O The optimal solution can be found by exhaustive search. However, the complexity of the exhaustive search increases exponentially with the number of antennas N . To decrease the complexity of the problem and make it solvable with √ linear methods we relax the constraint to |ℜ{x }| ≤ 1/ 2 and n √ |ℑ{xn }| ≤ 1/ 2,Pn = 1, 2, ...N . Since the matrix P is a 2N function of x′ = n=1 x′n en , where the real and imaginary parts of x are stacked in, the constraint is reformulated as √ √ x′n ≤ 1/ 2 and − x′n ≤ 1/ 2, n = 1, 2, ...2N. (4) A. Product-Maximization (PM) Maximizing the sum may lead to maximizing the expression for the user with the highest value at the cost of other users. Maximizing the product seems to be a fairer method, since the product can be maximized only if all the values of all the users contribute considerably. Thus, the relaxed optimization problem reads as max det(P) ′ x √ √ s.t. x′n ≤ 1/ 2 and − x′n ≤ 1/ 2, n = 1, 2, ...2N. (5) For this optimization problem, we resort to the gradient projection algorithm [14] to fulfill the constraint in (4). To this end, we need to find the derivative expression of the cost function with respect to x′ . The gradient is given by ∂ det(P) = 2CT adj (P) (Asℜ − Bsℑ ) ∂x′ + 2DT adj (P) (Asℑ + Bsℜ ) . (6) B. Gradient Projection Algorithm The used algorithm is summarized in Algorithm 1. The initial value of x′(0) depends on the choice of W, where W is chosen as zero-forcing (ZF) precoder −1 . W = HH HHH Algorithm 1 Gradient Projection Algorithm 1: Iteration step µ = µ0 , Tolerable error ǫ = 10−6  T T 2: Initialization x′(0) = ℜ{Ws}T ℑ{Ws}T , i = 0 ( √ √ x′(0),n > 1/ 2 then x′(0),n = 1/ 2 √ √ 3: if −x′(0),n > 1/ 2 then x′(0),n = −1/ 2 4: repeat   ∂ det(P(i) ) 5: x′(i+1) = x′(i) + µ ′ ∂x ( √ √ then x′(i+1),n = 1/ 2 x′(i+1),n > 1/ 2 √ √ 6: if −x′(i+1),n > 1/ 2 then x′(i+1),n = −1/ 2   det(P(i+1) ) < det(P(i) then µ = µ/2 7: if Am,m < 0   Pm,m < 0, m = 1, ..., M 8: i = i + 1  9: until det(P(i+1) ) − det(P(i) ) / det(P(i) ) ≤ ǫ The iteration step start value is denoted by µ0 . If the iteration step is very large such that the cost function decreases instead of increasing or the elements of P or A become negative, the step size has to be reduced in order to ensure the algorithm convergence. This iteration step optimization is performed in step 7. VI. E XISTING LINEAR PRECODERS A. WF precoder This precoder design was introduced in [15]. It is based on the MMSE criterion and is given by  −1 M IN 1 H H H+ HH , WWF = fWF Etx v ! u  −2 u σ2 M IN s t H H tr H H+ ) fWF = H H . Etx Etx The transmit vector reads then as xQ = Q (WWF s). To fulfill the power q constraint the transmit vector xQ is scaled by the Etx factor N , which ensures equal power allocation at the antennas. B. WFQ precoder where ρq = 1 − π2 . This precoder design consists of two stages: the and the analog precoder pdigital precoder WHWFQ 1/2 DWFQ = 2/π diag(WWFQ WWFQ ) . The analog precoder is a diagonal real-valued matrix to assign each antenna a desired amount of power and to optimize the quantization levels. So we end up with xQ = Q (WWFQ s) that has to be multiplied with DWFQ before transmitting. This leads to unequal power allocation at the BS antennas. Uncoded BER PM WFQ WF WF, unq. 10 -2 10 -3 10 -4 0 2 4 6 8 10 12 14 All the simulation results are averaged over 500 channel realizations. The used modulation scheme is QPSK, where σs2 = 1, with Nb = 104 transmit symbols per channel use. We compare our proposed design PM with existing linear precoding techniques WF and WFQ in terms of the uncoded BER and the mutual information (MI) for N = 32 and M = 4. The MI is calculated numerically based on the toolbox proposed in [16]. The ideal case, where the WF precoder is used and no quantization is performed, is denoted by ”WF, unq.”. From Fig. 5 we can see that the proposed mapping method outperforms the existing linear precoders in terms of uncoded BER. At uncoded BER of 10−3 we achieve a gain compared to WFQ of 3dB. In the WFQ design, unequal power allocation at the antennas is performed. This requires a number of power amplifiers (PAs) equal to the number of antennas to adjust the power for each antenna. In our proposed method the power at each antenna is equal which allows to run the PA in the saturation region and thus efficiently use the energy. In Fig. 6 the MI for the different precoder designs are plotted as function of the transmit power. The gain in MI is less significant compared to the uncoded BER. This means that the proposed method requires less perfomant codes to achieve the capacity. Additionally, the complexity of the PM method is studied in terms of the average number of iterations needed to get one optimal solution for x in Table I. As can be drawn from the table, the required number of iterations decreases with larger tolerable error ǫ. We can go to around 10 iterations per algorithm run without degrading much the uncoded BER and the MI. 18 20 Fig. 5. BER performance for a MU-MISO system with N = 32 and M = 4. 8 7.8 7.6 7.4 7.2 PM WFQ WF WF, unq. 7 6.8 VII. S IMULATION R ESULTS 16 Etx (dB) MI This precoder design was presented in [12]. It is an MMSE precoder that takes into account the quantization effects based on the linear covariance approximation. The precoder is expressed by    M IN −1 H 1 HH H−ρq nondiag HH H + H , WWFQ= fWFQ Etx s σs2 (1 − ρq ) · fWFQ = Etx v ! u  −2 u M I N ttr HH H−ρq nondiag (HH H)+ HH H , Etx 10 -1 6.6 6.4 0 1 2 3 4 5 6 7 8 9 10 Etx (dB) Fig. 6. MI performance for a MU-MISO system with N = 32 and M = 4. TABLE I C OMPLEXITY AND PERFORMANCE OF THE PM METHOD ǫ average nb. of iterations SNR @ BER of 10−3 MI 10−3 11 5,3dB 7,92 bpcu 10−4 18 5,45dB 7,92 bpcu 10−6 43 5,08dB 7,92 bpcu VIII. C ONCLUSION We presented a novel precoding technique based on the MBER criterion. Instead of designing a precoder we design the transmit output vector that fulfills the relaxed constraint of QPSK set to minimize the distortions due to the 1-bit quantization at the transmitter based on the MBER criterion. This method gives promising results compared to the existing linear precoding techniques. Although equal power allocation at the BS antennas is performed, we achieve a significant gain of 3dB at BER of 10−3 compared to precoders that allow unequal power allocation at the antennas. Furthermore, the PA can be run in the saturation region to get more energy efficient systems. However, these advantages are achieved with higher complexity of running a nonlinear optimization problem for each input. However, a LUT based implementation is possible for systems with small number of users. R EFERENCES [1] T. Marzetta, “Noncooperative cellular wireless with unlimited numbers of base station antennas,” Wireless Communications, IEEE Transactions on, vol. 9, no. 11, pp. 3590–3600, November 2010. [2] E. Bjornson, M. Kountouris, and M. Debbah, “Massive mimo and small cells: Improving energy efficiency by optimal soft-cell coordination,” in Telecommunications (ICT), 2013 20th International Conference on, May 2013, pp. 1–5. [3] F. Rusek, D. Persson, B. K. Lau, E. Larsson, T. Marzetta, O. Edfors, and F. Tufvesson, “Scaling up mimo: Opportunities and challenges with very large arrays,” Signal Processing Magazine, IEEE, vol. 30, no. 1, pp. 40–60, Jan 2013. [4] M. Di Renzo, H. Haas, A. Ghrayeb, S. Sugiura, and L. Hanzo, “Spatial modulation for generalized mimo: Challenges, opportunities, and implementation,” Proceedings of the IEEE, vol. 102, no. 1, pp. 56– 103, Jan 2014. [5] R. Muller, M. Sedaghat, and G. Fischer, “Load modulated massive mimo,” in Signal and Information Processing (GlobalSIP), 2014 IEEE Global Conference on, Dec 2014, pp. 622–626. [6] A. Kalis, A. Kanatas, and C. Papadias, Parasitic Antenna Arrays for Wireless MIMO Systems. Springer, 2014. [7] M. A. Sedaghat, R. R. Mueller, R. R. Mueller, and G. Fischer, “A novel single-rf transmitter for massive mimo,” in Smart Antennas (WSA), 2014 18th International ITG Workshop on, March 2014, pp. 1–8. [8] E. Bjornson, M. Matthaiou, and M. Debbah, “Massive MIMO with NonIdeal Arbitrary Arrays: Hardware scaling laws and circuit-aware design,” Wireless Communications, IEEE Transactions on, vol. PP, no. 99, pp. 1–1, 2015. [9] C. Svensson, S. Andersson, and P. Bogner, “On the power consumption of analog to digital converters,” in Norchip Conference, 2006. 24th, Nov 2006, pp. 49–52. [10] C. Peel, B. Hochwald, and A. Swindlehurst, “A vector-perturbation technique for near-capacity multiantenna multiuser communication-part i: channel inversion and regularization,” Communications, IEEE Transactions on, vol. 53, no. 1, pp. 195–202, Jan 2005. [11] A. Gershman, N. Sidiropoulos, S. ShahbazPanahi, M. Bengtsson, and B. Ottersten, “Convex optimization-based beamforming,” Signal Processing Magazine, IEEE, vol. 27, no. 3, pp. 62–75, May 2010. [12] A. Mezghani, R. Ghiat, and J. Nossek, “Transmit processing with low resolution d/a-converters,” in Electronics, Circuits, and Systems, 2009. ICECS 2009. 16th IEEE International Conference on, Dec 2009, pp. 683–686. [13] O. Usman, H. Jedda, A. Mezghani, and J. Nossek, “Mmse precoder for massive mimo using 1-bit quantization,” in Acoustics, Speech and Signal Processing, 2016. ICASSP 2016. 41st IEEE International Conference on, 2016. [14] D. P. Bertsekas and J. N. Tsitsiklis, Parallel and Distributed Computation:Numerical Methods. Prentice-Hall, 1989. [15] M. Joham, W. Utschick, and J. Nossek, “Linear transmit processing in mimo communications systems,” Signal Processing, IEEE Transactions on, vol. 53, no. 8, pp. 2700–2712, Aug 2005. [16] G. Brown, A. Pocock, M.-J. Zhao, and L. M., “Conditional likelihood maximisation: A unifying framework for information theoretic feature selection,” Journal of Machine Learning Research, vol. 13, pp. 27–66, Jan 2012.
7cs.IT
1 A Theoretical Assessment of Solution Quality in Evolutionary Algorithms for the Knapsack Problem Jun He, Boris Mitavskiy and Yuren Zhou arXiv:1404.3520v1 [cs.NE] 14 Apr 2014 Abstract Evolutionary algorithms are well suited for solving the knapsack problem. Some empirical studies claim that evolutionary algorithms can produce good solutions to the 0-1 knapsack problem. Nonetheless, few rigorous investigations address the quality of solutions that evolutionary algorithms may produce for the knapsack problem. The current paper focuses on a theoretical investigation of three types of (N+1) evolutionary algorithms that exploit bitwise mutation, truncation selection, plus different repair methods for the 0-1 knapsack problem. It assesses the solution quality in terms of the approximation ratio. Our work indicates that the solution produced by pure strategy and mixed strategy evolutionary algorithms is arbitrarily bad. Nevertheless, the evolutionary algorithm using helper objectives may produce 1/2-approximation solutions to the 0-1 knapsack problem. Index Terms Evolutionary algorithm, approximation algorithm, knapsack problem, solution quality I. I NTRODUCTION The knapsack problem is an NP-hard combinatorial optimisation problem [1], which includes a variety of knapsack-type problems such as the 0-1 knapsack problem and multi-dimensional knapsack problem. In the last two decades, evolutionary algorithms (EAs), especially genetic algorithms (GAs), have been well-adopted for tackling the knapsack problem [2]–[5]. The problem has received a particular interest from the evolutionary computation community for the following two reasons. The first reason is that the binary vector representation of the candidate solutions is a natural encoding of the 0-1 knapsack problem’s search space. Thereby, it provides an ideal setting for the applications of genetic algorithms [6]. On the other hand, the multi-dimensional knapsack problem is a natural multi-objective optimization problem, so that it is often taken as a test problem for studying multi-objective optimization evolutionary algorithms (MOEAs) [7]–[11]. A number of empirical results in the literature (see, for instance, [7]–[12]) assert that EAs can produce “good” solutions to the knapsack problem. A naturally arising question is then how to measure the “goodness” of solutions that EAs may produce? To address the question, the most popular approach is to compare the quality of the solutions generated by EAs via computer experiments. For example, the solution quality of an EA is measured by the best solution found within 500 generations [6]. Such a comparison may help to compare performance of different EAs, yet it seldom provides any information regarding the proximity of the solutions produced by the EAs to the optimum. From the viewpoint of algorithm analysis, it is important to assess how “good” a solution is in terms of the notion of approximation ratio (see [13]). There are several effective approximation algorithms for solving the knapsack problem [1]. For example, a fully polynomial time approximation scheme for the 0-1 knapsack problem has been presented in [14]. Nonetheless, very few rigorous investigations addressing the approximation ratio of EAs on the 0-1 knapsack problem exist. [15] recast the 0-1 knapsack problem into a bi-objective knapsack problem with two conflicting objectives (maximizing profits and minimizing weights). A (1+ǫ)-approximate set of the knapsack problem has been introduced for the bi-objective optimization problem. An MOEA, called Restricted Evolutionary Multiobjective Optimizer, has been designed to obtain the (1+ǫ)-approximate set. A pioneering contribution of [15] is a rigorous runtime analysis of the proposed MOEA. The current paper focuses on investigating the approximation ratio of three types of (N +1) EAs combining bitwise mutation, truncation section and diverse repair mechanisms for the 0-1 knapsack problem. The first type is several pure strategy EAs, where a single repair method is exploited in the EAs. The second type is several mixed strategy EAs, which choose a repair method from a repair method pool randomly. The third type is a multi-objective EA using helper objectives, which is a simplified version of the EA in [16]. The remainder of the paper is organized as follows. The 0-1 knapsack problem is introduced in section II. In section III we analyse pure strategy EAs, while in section IV we analyse mixed strategy EAs. Section V is devoted to analysing an MOEA using helper objectives. Section VI concludes the article. Jun He and Boris Mitavskiy are with Department of Computer Science, Aberystwyth University, Aberystwyth SY23 3DB, U.K. Yuren Zhou is with School of Computer Science and Engineering, South China University of Technology, Guangzhou 510640, China. 2 II. K NAPSACK P ROBLEM AND A PPROXIMATION S OLUTION The 0-1 knapsack problem is the most important knapsack problem and one of the most intensively studied combinatorial optimisation problems [1]. Given an instance of the 0-1 knapsack problem with a set of weights wi , profits pi , and capacity C of a knapsack, the task is to find a binary vector ~x = (x1 · · · xn ) so as to Pn max~x i=1Ppi xi , (1) n subject to i=1 wi xi ≤ C, where xi = 1 if the item i is selected in the knapsack and xi = 0 if the item i is not selected in the knapsack. A feasible solution is a knapsack represented by a binary vector ~x = (x1 x2 · · · xn ) which satisfies the constraint. An infeasible one is an ~x that violates the constraint. The vector (0 · · · 0) represents a null knapsack. In last two decades, evolutionary algorithms, especially genetic algorithms (GAs), have been well adopted for tackling the knapsack problem [2], [3]. In order to assess the quality of solutions in EAs, we follow the classical α-approximation algorithm (see [13] for a detailed exposition) and define an evolutionary approximation algorithm as follows. Definition 1: We say that an EA is an α-approximation algorithm for an optimization problem if for all instances of the problem, the EA can produce a solution within a polynomial runtime, the value of which is within a factor of α of the value of an optimal solution, regardless of the initialization. Here the runtime is measured by the expected number of function evaluations. For instance, in case of the 0-1 knapsack problem, an evolutionary 1/2-approximation algorithm always can find a solution the value of which is at least a half of the optimal value within a polynomial runtime. III. P URE S TRATEGY (N+1) E VOLUTIONARY A LGORITHMS In this section we analyze pure strategy (N + 1) EAs for the 0-1 knapsack problem. Here a pure strategy EA refers to an EA that employs a single repair method. The genetic operators used in (N + 1) EAs are bitwise mutation and truncation selection. • Bitwise Mutation: Flip each bit with probability 1/n. • Truncation Selection: Select the best N individuals from the parent population and the child. A number of diverse methods are available to handle constraints in EAs [6], [17]. Empirical results indicate that repair methods are more efficient than penalty function methods for the knapsack problem [18]. Thus, only the repair methods are investigated in the current paper. The repair procedure [6] is explained as follows. 1: input ~ Pn x ; 2: if i=1 xi wi > C then 3: ~x is infeasible; 4: while (~x is infeasible) do 5: i =: select an item from the knapsack; 6: setP xi = 0; n 7: if i=1 xi wi ≤ C then 8: ~x is feasible; 9: end if 10: end while 11: end if 12: output ~ x. There are several select methods available for the repair procedure, such as the profit-greedy repair, the ratio-greedy repair and the random repair methods. 1) Profit-greedy repair: sort the items xi according to the decreasing order of their corresponding profits pi . Then select the item with the smallest profit and remove it from the knapsack. 2) Ratio-greedy repair: sort the items xi according to the decreasing order of the corresponding ratios pi /wi . Then select the item with the smallest ratio and remove it from the knapsack. 3) Random repair: select an item xi from the knapsack at random and remove it from the knapsack. Thanks to the repair method, all of the infeasible solutions have been repaired into the feasible ones. The fitness function of a feasible solution ~x is f (~x). First, let’s consider a pure strategy (N + 1) EA using ratio-greedy repair for solving the 0-1 knapsack problem, which is described as follows. 1: input an instance of the 0-1 knapsack problem; 2: initialize a population considering of N individuals; 3: for t = 0, 1, 2, · · · do 4: mutate one individual and generate a child; 5: if the child is an infeasible solution then 3 repair it into a feasible solution using the ratio-greedy repair; end if 8: select N individuals from the parent population and the child using truncation selection; 9: end for 10: output the maximum of the fitness function. The following proposition reveals that the (N + 1) EA using the ratio-greedy repair cannot produce a good solution to the 0-1 knapsack problem within a polynomial runtime. Proposition 1: For any constant α ∈ (0, 1), the (N + 1) EA using Ratio-Greedy Repair is not an α-approximation algorithm for the 0-1 knapsack problem. Proof: According to definition 1, it suffices to consider the following instance of the 0-1 knapsack problem: 6: 7: Item i 1 2, · · · , αn αn + 1, · · · , n Profit pi Weight wi n n 1 1 n Capacity 1 αn n n where without loss of generality, suppose αn is a large positive integer for a sufficiently large n. The global optimum for the instance described above is (10 · · · 0), f (10 · · · 0) = n. A local optimum is αn−1 z }| { (01 · · · 10 · · · 0), αn−1 z }| { f (01 · · · 10 · · · 0) = αn − 1. The ratio of fitness between the local optimum and the global optimum is αn − 1 < α. n Suppose that the (N + 1) EA starts at the above local optimum having the 2nd highest fitness. Truncation selection combined with the ratio-greedy repair prevents a mutant solution from entering into the next generation unless the mutant individual is the global optimum itself. Thus, it arrives at the global optimum only if αn − 1 one-valued bits are flipped into zero-valued ones and the bit x1 is flipped from xi = 0 to xi = 1; other zero-valued bits remain unchanged. The probability of this event happening is  αn  n−αn 1 1 1− . n n Thus, we now deduce that the expected runtime is Ω(nαn ), that is exponential in n. This completes the argument. Let the constant α towards 0, proposition 1 tells us that the solution produced by the (N + 1) EA using the ratio-greedy repair after a polynomial runtime may be arbitrarily bad. Next, we consider another pure strategy (N + 1) EA that uses the random-greedy repair to tackle the 0-1 knapsack problem, which is described as follows. 1: input an instance of the 0-1 knapsack problem; 2: initialize a population considering of N individuals; 3: for t = 0, 1, 2, · · · do 4: mutate one individual and generate a child; 5: if the child is an infeasible solution then 6: repair it into a feasible solution using the random-greedy repair; 7: end if 8: select N individuals from the parent population and the child using truncation selection; 9: end for 10: output the maximum of the fitness function. Similarly, we may prove that this EA cannot produce a good solution to the 0-1 knapsack problem within a polynomial runtime using the same instance as that in Proposition 1. Proposition 2: For any constant α ∈ (0, 1), the (N + 1) EA using Random Repair is not an α-approximation algorithm for the 0-1 knapsack problem. Proposition 2 tells us that the solution produced by the (N + 1) EA using random repair is arbitrary bad. Finally we investigate a pure strategy (N + 1) EA using profit-greedy repair for solving the 0-1 knapsack problem, which is described as follows. 4 input an instance of the 0-1 knapsack problem; initialize a population considering of N individuals; 3: for t = 0, 1, 2, · · · do 4: mutate one individual and generate a child; 5: if the child is an infeasible solution then 6: repair it into a feasible solution using the profit-greedy repair; 7: end if 8: select N individuals from the parent population and the child using truncation selection; 9: end for 10: output the maximum of the fitness function. Proposition 3: For any constant α ∈ (0, 1), the (N + 1) EA using profit-greedy repair is not an α-approximation algorithm for the 0-1 knapsack problem. Proof: Let’s consider the following instance: 1: 2: Item i 1 2, · · · , n Profit pi Weight wi α(n − 1) n−1 1 1 Capacity n where without loss of generality, suppose α(n − 1) is a large positive integer for a sufficiently large n. The local optimum is (10 · · · 0), f (10 · · · 0) = α(n − 1). and the global optimum is n n z }| { (01 · · · 1), z }| { f (01 · · · 1) = n − 1. The fitness ratio between the local optimum and the global optimum is α(n − 1) − 1 < α. n−1 Suppose that the (N + 1) EA starts at the local optimum (10 · · · 0). Let’s investigate the following mutually exclusive and exhaustive events: 1) An infeasible solution has been generated. In this case the infeasible solution will be repaired back to (10 · · · 0) by profit-greedy repair. 2) A feasible solution having the fitness smaller than α(n − 1) has been generated. In this case, truncation selection will prevent the new feasible solution from being accepted. 3) A feasible solution is generated having fitness not smaller than α(n − 1). This is the only way in which truncation selection will preserve the new mutant solution. Nonetheless, this event happens only if the first bit of the individual in the initial population, Φ0 , is flipped from x1 = 1 into x1 = 0 while at least α(n − 1) zero-valued bits of this individual, are flipped from xi = 0 into xi = 1. The probability of this event is    k  n−1−k n X 1 1 1 n 1− n k n n k=α(n−1) α(n−1)  e . ≤O α(n − 1) It follows immediately that if the EA starts at the local optimum (10 · · · 0), the expected runtime to produce a better solution is exponential in n. The desired conclusion now follows immediately from definition 1. Proposition 3 tells us that a solution produced by the (N + 1) EA using profit-greedy repair may be arbitrarily bad as well. In summary, we have demonstrated that none of the three pure strategy (N + 1) EAs is an α-approximation algorithm for the 0-1 knapsack problem given any constant α ∈ (0, 1). IV. M IXED S TRATEGY (N+1) E VOLUTIONARY A LGORITHM In this section we analyse mixed strategy evolutionary algorithm which combines several repair methods together. Here a mixed strategy EA refers to an EA employing two or more repairing methods selected with respect to a probability distribution over the set of repairing methods. It may be worth noting that other types of mixed strategy EAs have been considered in the 5 literature. For example,the mixed strategy EA in [19] employs four mutation operators. Naturally, we want to know whether or not a mixed strategy (1+1) EA, combining two or more repair methods together, may produce an approximation solution with a guarantee to the 0-1 knapsack problem. A mixed strategy (1+1) EA for solving the 0-1 knapsack problem is described as follows. The EA combines both, ratio-greedy and profit-greedy repair methods together. 1: input an instance of the 0-1 knapsack problem; 2: initialize a population considering of N individuals; 3: for t = 0, 1, 2, · · · do 4: mutate one individual and generate a child; 5: if the child is an infeasible solution then 6: select either ratio-greedy repair or profit-greedy repair method uniformly at random; 7: repair it into a feasible solution; 8: end if 9: select N individuals from the parent population and the child using truncation selection; 10: end for 11: output the maximum of the fitness function. Unfortunately the quality of solutions in the mixed strategy EA still has no guarantee. Proposition 4: Given any constant α ∈ (0, 1), the mixed strategy (N + 1) EA using ratio-greedy repair and profit-greedy Repair is not an α-approximation algorithm for the 0-1 knapsack problem. Proof: consider the same instance as that in the proof of Proposition 3: Item i 1 2, · · · , n Profit pi Weight wi α(n − 1) n−1 1 1 Capacity n where the local optimum is (10 · · · 0) and f (10 · · · 0) = α(n − 1). The global optimum is (01 · · · 1) and f (01 · · · 1) = n − 1. The fitness ratio between the local optimum and the global optimum is α(n − 1) − 1 < α. n−1 Suppose the (N + 1) EA starts at the local optimum (10 · · · 0). Let’s analyse the following mutually exclusive and exhaustive events that occur upon completion of mutation: 1) A feasible solution is generated the fitness of which is smaller than α(n − 1). In this case, truncation selection will prevent the new feasible solution from entering the next generation. 2) A feasible solution is generated the fitness of which is not smaller than α(n − 1). The truncation selection may allow the new feasible solution to enter the next generation. This event happens only if the first bit is flipped from x1 = 1 to x1 = 0 and at least α(n − 1) zero-valued bits are flipped into one-valued. The probability of the event is then is  α(n−1) e O . α(n − 1) 3) An infeasible solution is generated, but fewer than α(n − 1) zero-valued bits are flipped into the one-valued bits. In this case, either the infeasible solution will be repaired into (10 · · · 0) through the profit-greedy repair; or, it is repaired into a feasible solution where x0 = 0 and fewer than α(n − 1) one-valued bits among the rest of the bits through the ratio-greedy repair. In the later case the fitness of the new feasible solution is smaller than α(n − 1) and, therefore, cannot be accepted by the truncation selection. 4) An infeasible solution is generated but no fewer than α(n − 1) zero-valued bits are flipped into the one-valued bits. This event happens only if at least α(n − 1) zero-valued bits are flipped into the one-valued bits. The probability of the event is then is α(n−1)  e . O α(n − 1) Afterwards, with a positive probability, it is repaired into a feasible solution where x0 = 0 and fewer than α(n − 1) one-valued bits among the rest of the bits by the ratio-greedy repair. In the later case the fitness of the new feasible solution is smaller than α(n − 1) and, therefore, it is prevented from entering the next generation by the truncation selection. 6 Summarizing the four cases described above, we see that when the EA starts at the local optimum (10 · · · 0), it is possible to generate a better solution with probability is  α(n−1) e O . α(n − 1) We then know that the expected runtime to produce a better solution is exponential in n. The conclusion of proposition 4 now follows at once. Proposition 4 above tells us that solutions produced by the mixed strategy (M+1) EA exploiting the ratio-greedy repair and profit-greedy repair may be arbitrarily bad. Furthermore, we can prove, that even the mixed strategy (N + 1) EA combining the ratio-greedy repair, profit-greedy repair and random-repair together, is not an α-approximation algorithm for the 0-1 knapsack problem. Its proof is practically identical to that of Proposition 4. In summary, we have demonstrated that mixed strategy (N + 1) EAs are α-approximation algorithms for the 0-1 knapsack problem given any constant α ∈ (0, 1). V. M ULTI -O BJECTIVE E VOLUTIONARY A LGORITHM So far, we have established several negative results about (N + 1) EAs for the 0-1 knapsack problem. A naturally arising important question is then how we can construct an evolutionary approximation algorithm. The most straightforward approach is to apply an approximation algorithm first to produce a good solution, and, afterwards, to run an EA to seek the global optimum solution. Nonetheless, such EAs sometimes get trapped into the absorbing area of a local optimum, so it is less efficient in seeking the global optimum. Here we analyse a multi-objective EA using helper objectives (denoted by MOEA in short), which is similar to the EA presented in [16], but small changes are made in helper objectives for the sake of analysis. Experiment results in [16] have shown that the MOEA using helper objectives performs better than the simple combination of an approximation algorithm and a GA. The MOEA is designed using the multi-objectivization technique. In multi-objectivization, single-objective optimisation problems are transferred into multi-objective optimisation problems by decomposing the original objective into several components [20] or by adding helper objectives [21]. Multi-objectivization may bring both positive and negative effects [22]–[24]. This approach has been used for solving several combinatorial optimisation problems, for example, the knapsack problem [15], vertex cover problem [25] and minimum label spanning tree problem [26]. Now we describe the MOEA using helper objectives, similar to the EA in [16]. The original single objective optimization problem (1) is recast into a multi-objective optimization problem using three helper objectives. First let’s look at the following instance. Item 1 2 3 4 5 Profit Weight 10 10 10 10 10 10 12 10 12 10 Capacity 20 The global optimum is 00011 in this instance. In the optimal solution, the average profit of packed items is the largest. Thus the first helper objective is to maximize the average profit of items in a knapsack. We don’t use the original value of profits, instead we use the ranking value of profits. Assume that the profit of item i is the kth smallest, then let the ranking value p̂i = k. For example in the above instance, p̂1 = p̂2 = p̂3 = 1 and p̂4 = p̂5 = 2. Then the helper objective function is defined to be n 1 X h1 (~x) = xi p̂i , (2) k ~x k1 i=1 P where k ~x k1 = ni=1 xi . Next we consider another instance. Item 1 2 3 4 5 Profit Weight 15 10 15 10 20 20 20 20 20 20 Capacity 20 The global optimum is 11000 in this instance. In the optimal solution, the average profit-to-weight ratio of packed items is the largest. However, the average profit of these items is not the largest. Then the second helper objective is to maximize the average profit-to-weight ratio of items in a knapsack. We don’t use the original value of profit-to-weight, instead its ranking 7 value. Assume that the profit-to-weight of item i is the kth smallest, then let the ranking value r̂i = k. For example in the above instance, r̂1 = r̂2 = 2 and r̂3 = r̂4 = r̂5 = 1. Then the helper objective function is defined to be h2 (~x) = n 1 X xi r̂i . k ~x k1 i=1 (3) Finally let’s see the following instance. Item 1 2 3 4 5 Profit Weight 40 30 40 30 40 30 40 30 150 100 Capacity 120 The global optimum is 11110 in this instance. In the optimal solution, neither the average profit of packed items nor average profit-to-weight ratio is the largest. Instead the number of packed items is the largest, or the average weight is the smallest. Thus the third helper objectives are to maximize the number of items in a knapsack. The objective functions are h3 (~x) =k ~x k1 . (4) We then consider a multi-objective optimization problem: maxx~ {f (~x), Phn1 (~x), h2 (~x), h3 (~x)}, subject to i=1 wi xi ≤ C. (5) The multi-objective optimisation problem (5) is solved by an EA using bitwise mutation, and multi-criteria truncation selection, plus a mixed strategy of two repair methods. 1: input an instance of the 0-1 knapsack problem; 2: initialize a population considering of N individuals; 3: for t = 0, 1, 2, · · · do 4: mutate one individual and generate a child; 5: if the child is an infeasible solution then 6: select either ratio-greedy repair or profit-greedy repair method uniformly at random; 7: repair it into a feasible solution; 8: end if 9: select N individuals from the parent population and the child using the multi-criterion truncation selection; 10: end for 11: output the maximum of the fitness function. A novel multi-criteria truncation selection operator is adopted in the above EA. Since the target is to maximise several objectives simultaneously, we select a few individuals which have higher function values with respect to each objective function. The pseudo-code of multi-criteria selection is described as follows. 1: input the parent population and the child; 2: merge the parent population and the child into a temporary population which consists of N + 1 individuals; (1) (1) 3: sort all individuals in the temporary population in the descending order of f (~ x), denote them by ~x1 , · · · , ~xN +1 ; (1) (1) (1) (1) (1) 4: select all individuals from left to right (denote them by ~ xk1 , · · · , ~xkm ) which satisfy h1 (~xki ) < h1 (~xki+1 ) or h2 (~xki ) < (1) 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: h2 (~xki+1 ) for any ki . if the number of selected individuals is greater than N3 then truncate them to N3 individuals; end if add the selected individuals into the next generation population; resort all individuals in the temporary population in the descending order of h1 (~x), still denote them by ~x1 , · · · , ~xN +1 ; select all individuals from left to right (still denote them by ~xk1 , · · · , ~xkm ) which satisfy h3 (~xki ) < h3 (~xki+1 ) for any ki . if the number of selected individuals is greater than N3 then truncate them to N3 individuals; end if add the selected individuals into the next generation population; resort all individuals in the temporary population in the descending order of h2 (~x), still denote them by ~x1 , · · · , ~xN +1 ; select all individuals from left to right (still denote them by ~xk1 , · · · , ~xkm ) which satisfy h3 (~xki ) < h3 (~xki+1 ) for any ki . if the number of selected individuals is greater than N3 then truncate them to N3 individuals; 8 end if add these selected individuals into the next generation population; 21: while the next generation population size is less than N do 22: randomly choose an individual from the parent population and child, and add it into the next generation population; 23: end while 24: output a new population Φt+1 . In the above algorithm, Steps 3-4 are for selecting the individuals with higher values of f (~x). In order to preserve diversity, we choose these individuals which have different values of h1 (~x) or h2 (~x). Similarly Steps 9-10 are for selecting the individuals with a higher value of h1 (~x). We choose the individuals which have different values of h3 (~x) for maintaining diversity. Steps 15-16 are for selecting individuals with a higher value of h2 (~x). Again we choose these individuals which have different values of h3 (~x) for preserving diversity. We don’t explicitly select individuals based on h3 (~x). Instead we implicitly do it during Steps 9-10, and Steps 15-16. Using helper objectives and multi-criterion truncation selection brings a benefit of searching along several directions f (~x), h1 (~x), h2 (~x) and implicitly h3 (~x). Hence the MOEA may arrive at a local optimum quickly, but at the same time, does not get trapped into the absorbing area of a local optimum of f (~x). The experiment results [16] have demonstrate the MOEA using helper objectives outperform the simplified combination of an approximation algorithm and a GA. The analysis is based on a fact which is derived from the analysis of the greedy algorithm for the 0-1 knapsack problem (see [1, Section 2.4])). Consider the following algorithm: 1: let ~ a∗ be the feasible solutions with the largest profit item; p p 2: resort all the items via the ratio of their profits to their corresponding weights so that w1 ≥ · · · ≥ wn ; 1 n 3: greedily add the items in the above order to the knapsack as long as adding an item to the knapsack does not exceeding ∗ the capacity of the knapsack. Denote the solution by ~b . Then the fitness of ~a∗ or ~b∗ is not smaller than 1/2 of the fitness of the optimal solution. Based on the above fact, we can prove the following result. Theorem 1: If N ≥ 3n, then the (N + 1) MOEA can produce a feasible solution, which is not worse than ~b∗ and ~a∗ , within O(N n3 ) runtime. Proof: (1) Without loss of generality, let the first item be the most profitable one. First, it suffices to prove that the EA can generate a feasible solution fitting the Holland schema (1 ∗ · · · ∗) (as usual, ∗ stands for the ‘don’t care’ symbol that could be replaced either by a 1 or a 0) within a polynomial runtime. Suppose that the value of h1 of all the individuals in the population are smaller than that of ~a∗ , that is, they fit the Holland schema (0 ∗ · · · ∗). Let ~x be the individual that is chosen for mutation. Through mutation, x1 can be flipped from x1 = 0 to x1 = 1 with probability 1/n. If the child is feasible, then we arrive at the desired individual (denote it by ~y). If the child is infeasible, then, with probability 1/2, the first item will be kept thanks to the profit-greedy repair and a feasible solution is generated (denote it by ~y ). We have now shown that the EA can generate a feasible solution that includes the most profitable item with probability at least 1/(2n). Thus, the EA can generate a feasible solution fitting the Holland schema (1 ∗ · · · ∗) within the expected runtime is at most 2n. (2) Without loss of generality, let pm pn p1 > ··· > > ··· > . w1 wm wn 19: 20: m z }| { and let ~b∗ = (1 · · · 10 · · · 0). We now demonstrate that the EA can reach ~b∗ within a polynomial runtime via objectives h2 and h3 . First we prove that the EA can reach (10 · · · 0) within a polynomial runtime. We exploit drift analysis [27] as a tool to establish the result. For a binary vector ~x = (x1 · · · xn ), define the distance function d(~x) = h2 (10 · · · 0) − h2 (~x). (6) For a population (~x1 , · · · , ~xN ), its distance function is min{d(~x1 ), · · · , d(~xN ).} According to the definition of h2 (~x), the above distance function is upper-bounded by n. Suppose that none of individuals in the current population is (10 · · · 0). Let ~x be the individual, the value of whose distance is the smallest in the current population. The individual belongs to one of the two cases below: Case 1: ~x fits the Holland schema (1 ∗ · · · ∗) where at least one * bit takes the value of 1. Case 2: ~x fits the Holland schema (0 ∗ · · · ∗). The individual will be chosen for mutation with probability N1 . Now we analyse the mutation event related to the above two cases. 9 Analysis of Case 1: one of 1-valued *-bits (but not the first bit) is flipped into 0-valued; other bits are not changed. This event will happen with a probability  n−1 1 1 = Ω(n−1 ). (7) 1− n n Let’s establish how the value of h2 increases during the mutation. Denote the 1-valued bits in ~x by i1 , · · · , ik . Then the objective h2 ’s value is p̂i1 + · · · + p̂ik . k Without loss of generality, the ik th bit is flipped into 0-valued. Then after mutation, the 1-valued bits in ~x becomes i1 , · · · , ik−1 and the objective h2 ’s value is p̂i1 + · · · + p̂ik−1 . k−1 Thus, the value of h2 increases (or equivalently, the value of d decreases) by p̂i1 + · · · + p̂ik−1 p̂i + · · · + p̂ik − 1 = Ω(n−2 ). (8) k−1 k Thanks to the multi-criteria truncation selection, the value of h2 always increases. So there is no negative drift. Therefore the drift in Case 1 is Ω(N −1 n−3 ). (9) Analysis of Case 2: The first bit is flipped into 0-valued; other bits are not changed. The analysis then is identical to Case 1. The drift in Case 2 is Ω(N −1 n−3 ), the same as that in Case 1. Recall that the distance function d(~x) ≤ n. Applying the drift theorem [27, Theorem 1], we deduce that the expected runtime to reach (10 · · · 0) is O(N n3 ). Once (10 · · · 0) is included in the population, it will be kept for ever according to the multi-criteria truncation selection. Next we prove that the EA can reach ~b∗ within a polynomial runtime when starting from (10 · · · 0). Suppose that the current population includes an individual (10 · · · 0) but no individual (110 · · · 0). The individual (10 · · · 0) may be chosen for mutation with a probability N1 , then it can be mutated into (110 · · · 0) with a probability Ω(n−1 ). The individual (110 · · · 0) has the second largest value of h2 , thus, according to the multi-criteria truncation selection, it will be kept in the next generation population. Hence the expected runtime for the EA to reach the individual (110 · · · 0) is O(N n). Similarly we can prove that the EA will reach (1110 · · · 0) within O(N n) runtime, then (11110 · · · 0) within O(N n) runtime, and so on. The expected runtime for the EA to reach ~b∗ is O(N n2 ). Combining the above discussions together, we see that the expected runtime to produce a solution not worse than ~a∗ and ~b∗ is O(N n3 ) + O(N n2 ). If we change helper objective functions h1 (~x) and h2 (~x) to those used in [16], n 1 X h1 (~x) = xi pi , (10) k ~x k1 i=1 h2 (~x) = n 1 X pi xi , k ~x k1 i=1 wi (11) then the above proof doesn’t work, and we need a new proof for obtaining the same conclusion. Furthermore, it should be mentioned that none of the three objectives can be removed; otherwise the MOEA will not produce a solution with a guaranteed approximation ratio. But on the other side, the performance might be better if adding more objectives, for example, n 1 X min h4 (~x) = xi wi . (12) k ~x k1 i=1 VI. C ONCLUSIONS In this work, we have assessed the solution quality in three types of (N + 1) EAs, which exploit bitwise mutation and truncation selection, for solving the knapsack problem. We have proven that the pure strategy EAs using a single repair method and the mixed strategy EA combing two repair methods are not a α-approximation algorithm for any constant α ∈ (0, 1). In other words, solution quality in these EAs may be arbitrarily bad. Nevertheless, we have shown that a multi-objective (N + 1) EA using helper objectives is a 1/2-approximation algorithm. Its runtime is O(N n3 ). Our work demonstrates that using helper objectives is a good approach to design evolutionary approximation algorithms. The advantages of the EA using helper objectives is to search along several directions and also to preserve population diversity. Population-based EAs using other strategies of preserving diversity, such as niching methods, are not investigated in this paper. The extension of this work to such EAs will be the future research. Another work in the future is to study the solution quality of MOEAs for the multi-dimension knapsack problem. 10 Acknowledgements: This work was supported by the EPSRC under Grant No. EP/I009809/1 and by the NSFC under Grant No. 61170081. R EFERENCES [1] S. Martello and P. Toth, Knapsack Problems. Chichester: John Wiley & Sons, 1990. [2] Z. Michalewicz and J. Arabas, “Genetic algorithms for the 0/1 knapsack problem,” in Methodologies for Intelligent Systems. Springer, 1994, pp. 134–143. [3] S. Khuri, T. Bäck, and J. Heitkötter, “The zero/one multiple knapsack problem and genetic algorithms,” in Proceedings of the 1994 ACM Symposium on Applied Computing. ACM, 1994, pp. 188–193. [4] P. C. Chu and J. E. Beasley, “A genetic algorithm for the multidimensional knapsack problem,” Journal of Heuristics, vol. 4, no. 1, pp. 63–86, 1998. [5] G. R. Raidl, “An improved genetic algorithm for the multiconstrained 0-1 knapsack problem,” in Proceedings of the 1998 IEEE World Congress on Computational Intelligence. IEEE, 1998, pp. 207–211. [6] Z. Michalewicz, Genetic Algorithms + Data Structures = Evolution Programs, 3rd ed. New York: Springer Verlag, 1996. [7] E. Zitzler and L. Thiele, “Multiobjective evolutionary algorithms: A comparative case study and the strength pareto approach,” IEEE Transactions on Evolutionary Computation, vol. 3, no. 4, pp. 257–271, 1999. [8] A. Jaszkiewicz, “On the performance of multiple-objective genetic local search on the 0/1 knapsack problem-a comparative experiment,” IEEE Transactions on Evolutionary Computation, vol. 6, no. 4, pp. 402–412, 2002. [9] M. Eugénia Captivo, J. Clı̀maco, J. Figueira, E. Martins, and J. Luis Santos, “Solving bicriteria 0–1 knapsack problems using a labeling algorithm,” Computers & Operations Research, vol. 30, no. 12, pp. 1865–1886, 2003. [10] E. Özcan and C. Başaran, “A case study of memetic algorithms for constraint optimization,” Soft Computing, vol. 13, no. 8, pp. 871–882, 2009. [11] R. Kumar and P. K. Singh, “Assessing solution quality of biobjective 0-1 knapsack problem using evolutionary and heuristic algorithms,” Applied Soft Computing, vol. 10, no. 3, pp. 711–718, 2010. [12] P. Rohlfshagen and J. A. Bullinaria, “Nature inspired genetic algorithms for hard packing problems,” Annals of Operations Research, vol. 179, no. 1, pp. 393–419, 2010. [13] D. P. Williamson and D. B. Shmoys, The Design of Approximation Algorithms. Cambridge University Press, 2011. [14] O. H. Ibarra and C. E. Kim, “Fast approximation algorithms for the knapsack and sum of subset problems,” Journal of the ACM, vol. 22, no. 4, pp. 463–468, 1975. [15] R. Kumar and N. Banerjee, “Analysis of a multiobjective evolutionary algorithm on the 0–1 knapsack problem,” Theoretical Computer Science, vol. 358, no. 1, pp. 104–120, 2006. [16] J. He, F. He, and H. Dong, “A novel genetic algorithm using helper objectives for the 0-1 knapsack problem,” arXiv, vol. 1404.0868, 2014. [17] C. Coello and A. Carlos, “Theoretical and numerical constraint-handling techniques used with evolutionary algorithms: A survey of the state of the art,” Computer Methods in Applied Mechanics and Engineering, vol. 191, no. 11-12, pp. 1245–1287, 2002. [18] J. He and Y. Zhou, “A comparison of GAs using penalizing infeasible solutions and repairing infeasible solutions II,” in Proceedings of the 2nd International Symposium on Intelligence Computation and Applications. Wuhan, China: Springer, 2007, pp. 102–110. [19] J. He, W. Hou, H. Dong, and F. He, “Mixed strategy may outperform pure strategy: An initial study,” in Proceedings of 2013 IEEE Congress on Evolutionary Computation. IEEE, 2013, pp. 562–569. [20] J. D. Knowles, R. A. Watson, and D. W. Corne, “Reducing local optima in single-objective problems by multi-objectivization,” in Evolutionary MultiCriterion Optimization. Springer, 2001, pp. 269–283. [21] M. T. Jensen, “Helper-objectives: Using multi-objective evolutionary algorithms for single-objective optimisation,” Journal of Mathematical Modelling and Algorithms, vol. 3, no. 4, pp. 323–347, 2005. [22] J. Handl, S. C. Lovell, and J. Knowles, “Multiobjectivization by decomposition of scalar cost functions,” in Parallel Problem Solving from Nature–PPSN X. Springer, 2008, pp. 31–40. [23] D. Brockhoff, T. Friedrich, N. Hebbinghaus, C. Klein, F. Neumann, and E. Zitzler, “On the effects of adding objectives to plateau functions,” IEEE Transactions on Evolutionary Computation, vol. 13, no. 3, pp. 591–603, 2009. [24] D. F. Lochtefeld and F. W. Ciarallo, “Helper-objective optimization strategies for the job-shop scheduling problem,” Applied Soft Computing, vol. 11, no. 6, pp. 4161–4174, 2011. [25] T. Friedrich, J. He, N. Hebbinghaus, F. Neumann, and C. Witt, “Approximating covering problems by randomized search heuristics using multi-objective models,” Evolutionary Computation, vol. 18, no. 4, pp. 617–633, 2010. [26] X. Lai, Y. Zhou, J. He, and J. Zhang, “Performance analysis of evolutionary algorithms for the minimum label spanning tree problem,” IEEE Transactions on Evolutionary Computation, 2014, (accpeted, online). [27] J. He and X. Yao, “Drift analysis and average time complexity of evolutionary algorithms,” Artificial Intelligence, vol. 127, no. 1, pp. 57–85, 2001.
9cs.NE
Shafahi, Wang, Haghani 1 SCHOOL BUS ROUTING BY MAXIMIZING TRIP COMPATIBILITY Ali Shafahi PhD Candidate Department of Civil and Environmental Engineering University of Maryland College Park, MD 20742 Email: [email protected] Zhongxiang Wang Graduate Student Department of Civil and Environmental Engineering University of Maryland College Park, MD 20742 Email: [email protected] Ali Haghani Professor Department of Civil and Environmental Engineering 1173 Glenn L. Martin Hall University of Maryland College Park, MD 20742 Phone: (301) 405-1963, Fax: (301) 405-2585 Email: [email protected] Word count: 5,690 words text + (2 tables+ 5 figures) x 250 words (each) = 7,440 words Submission Date July 29, 2016 Shafahi, Wang, Haghani 2 ABSTRACT School bus planning is usually divided into routing and scheduling due to the complexity of solving them concurrently. However, the separation between these two steps may lead to worse solutions with higher overall costs than that from solving them together. When finding the minimal number of trips in the routing problem, neglecting the importance of trip compatibility may increase the number of buses actually needed in the scheduling problem. This paper proposes a new formulation for the multi-school homogeneous fleet routing problem that maximizes trip compatibility while minimizing total travel time. This incorporates the trip compatibility for the scheduling problem in the routing problem. Since the problem is inherently just a routing problem, finding a good solution is not cumbersome. To compare the performance of the model with traditional routing problems, we generate eight mid-size data sets. Through importing the generated trips of the routing problems into the bus scheduling (blocking) problem, it is shown that the proposed model uses up to 13% fewer buses than the common traditional routing models. Keywords: school bus routing, trip compatibility, school bus scheduling, bus blocking Shafahi, Wang, Haghani 3 INTRODUCTION School bus routing and scheduling problem (SBRSP) is traditionally broken into two pieces due to the extra complexity added when they are solved together. The first piece is school bus routing (SBRP) or trip building and the second piece is scheduling or blocking (SBSP). SBRP’s goal is to build a trip that consists of several stops. PM trips usually start from schools and drop off students at different bus stop locations. AM trips are the reverse. SBSP or blocking, on the other hand, ties the trips together and assigns the grouped trips to routes (or blocks). In the blocking problem, it is possible to have buses that serve trips from different schools. If the school is a public school, the county’s department of pupil transportation is the authority in charge of the operation and design of the school bus routes. From a monetary point of view, they are interested in having safe and reliable transportation services while keeping the cost for these services as low as possible. Since the major driving factor of cost is the number of buses (blocks), it is to their benefit to have buses with mixed trips. In a private school setting, if the school owns and operates school buses, all trips of the blocks are for that school. In such setting, solving the routing problem and the scheduling problem independently does not cause any loss in terms of funds. This separation of the problem is thus only beneficiary as it improves the running time required for the search of the optimal solution. In the public school setting, however, the separation of these problems could result in financial losses and overall requirement of more school buses. The number of buses required for the county’s operation is an output of the blocking (scheduling) problem. In the blocking problem, the compatibility of trips is the main influencing factor that helps reduce the overall number of buses. We say trip 𝑏 is compatible with trip 𝑎 if after trip 𝑎 is served, the bus has enough time to drive to trip 𝑏’s initial stop. If trips 𝑎 and 𝑏 are compatible, we can put them in the same block. However, if they are not compatible, they are assigned to separate blocks and this potentially increases the required number of blocks. The compatibility of the trips generated from the routing problem and the trips themselves are essential inputs of the blocking problem. Therefore, it is important that the school bus routing problems somehow generate more compatible trips. The majority of the school bus routing problems, either have minimizing the number of total trips or minimizing the total travel time as their objective. These objectives are somewhat treating the routing problem and blocking problem as independent problems. Consider the example depicted in FIGURE 1.In this example, the three stops 𝑠1, 𝑠2, and 𝑠3 are school bus stops for school 1. The population of school 1 exceeds the capacity of one bus and therefore we need at least two trips for that school. In addition, school 2 ends 2𝑡 times after school 1. Without considering the blocking, the minimum number of trips needed for school 1 is 2. The minimum total duration, 4t, is achieved when trip 1 is: 𝑆𝑐ℎ𝑜𝑜𝑙1 → 𝑠1 → 𝑠2 and trip 2 is: 𝑆𝑐ℎ𝑜𝑜𝑙1 → 𝑠3.. The soonest that any one of the trips can reach school 2 is at time 3𝑡. This is past the end time of school 2 and therefore, neither trip 1 nor trip 2 can be compatible with any of the trips of school 2. Now, consider the case where trip 1 is: 𝑠𝑐ℎ𝑜𝑜𝑙1 → 𝑠1 and trip 2 is: 𝑠𝑐ℎ𝑜𝑜𝑙1 → (𝑠1) → 𝑠2 → 𝑠3. The second trip does not stop at stop 𝑠1. It just passes through it to reach stop 2. In this case the total travel time is 5𝑡 . However, trip 1 could reach school 2 at 2𝑡 and therefore it is compatible with the trips that are built for school 2. Shafahi, Wang, Haghani 4 FIGURE 1 Example that illustrates the importance of treating the school bus routing and scheduling problems as related problems Most existing research solve either SBRP or SBSP. They do not solve them together as it becomes computationally burdensome to find good solutions. However, the choice of a good objective for the school bus routing problem, that considers the SBSP (bus blocking), can potentially reduce cost and increase efficiency. Paper Structure In the next section, a review on school bus routing problem is presented. Then, the new mathematical model is explained. In the next section, computational tests are conducted to evaluate the model’s performance. Finally, the performance of the proposed model, its applications, limitations, and future research directions are presented. LITERATURE REVIEW The whole process of the school bus routing and scheduling problem involves five detailed steps: data preparation, bus stop selection, bus route generation, school bell time adjustment and route scheduling (1). The first two steps can be incorporated and solved by location-allocationrouting (LAR) strategy or allocation-routing-location (ARL) strategy. The difference and application of these two strategies can be referred to (2). The last two steps can be solved as a scheduling problem with time windows. School bus routing problem (SBRP) is always regarded as a variation of Vehicle Routing Problem (VRP). One difference between SBRP and classic VRP is that the travel time from the depot to the first pickup vertex (AM trips) is insignificant (2) as well as the travel time from the last drop-off vertex to the depot (PM trips). School bus service providers are mainly concerned about the ride time for students as opposed to total travel time for the buses. This makes SBRP become very similar to the Open Vehicle Routing Problem (OVRP). More specifically, many consider it to be a capacitated or distance (travel time) constrained OVRP (3). The main difference between OVRP and general VRP is that the former tries to find a set of Hamiltonian paths rather than Hamiltonian cycles as for the classical VRP (4). However, the minimum Hamiltonian path problem is still a NP-hard problem because it can be transferred into a minimum Hamiltonian cycle problem, which is a well-known NP-hard problem (5). Because this Shafahi, Wang, Haghani 5 paper focuses on SBRP, which is similar to VRP, some VRP papers are also listed in the literature review. Characteristics of SBRP The school bus routing problem has been divided in various ways into different categories. Some divide the problem based on the number of schools for which the problem is solved. Another category is based on the area into which that the school(s) fall. The type of fleet is another mean for categorization. In common public school settings, multi-school routing and scheduling is more realistic. However, quite a lot of papers focus on single-school problem due to its simplicity and similarity with classic VRP. When dealing with multi-school problems, many papers divide the problem into single-school problems by assuming each bus trip is exclusive for one school (6). Still, some papers consider mixed load service for multi-school problem. Braca et al. (7) solved the SBRP for multischool bus routing in New York City with a Location Based Heuristic method, which forms routes by inserting the vertex with minimal insertion cost among all un-routed vertices and repeating this procedure by starting at random vertices. They then pick the best solution among all iterations. Another classification is urban school and rural area school bus routing problem. In urban areas, where there tends to be more students in each stop, the bus capacity is usually the binding constraint (7) and stops may need to be served more than once. Therefore, maximum ride time constraint can be relaxed under certain conditions (8). While in rural areas, where each stop tends to have small number of students and the distance between adjacent stops are longer, the maximum ride time is usually a critical constraint. Moreover, vans or smaller vehicles rather than buses might be more economical, thus, vehicle type selection or mix fleet is preferred (9). Homogeneous or heterogeneous fleet becomes important as it affects the bus capacity, the degree of crowding, the allowance of standing etc. National Association of State Directors of Pupil Transportation Services (10) regulates that a maximum of three young students (lower than the third grade) can sit in a typical 39-inch school bus seat. (8) applied 3E (Efficiency, Effectiveness and Equity) criteria proposed by Savas (11) in SBRP. In order to balance the total ride time for each student, afternoon trips could be a replicated sequence (except the school) of the morning trip. Thus, it may be monetarily and temporally efficient to solve a PM (or AM) routing problem and then replicate it for the AM (or PM) trips. Balance of maximal load or maximal ride time is another equity concern, which has been considered as an objective in the formulation (8, 12). Objective The most common objectives of the SBRP are minimizing the total travel distance or travel time (8, 9, 13-24), minimizing the total number of trips (6, 7, 14,15, 25) or minimizing the total cost including bus purchase (fixed) cost and bus operation cost (3, 26, 27, 28). In the latter, the total cost is a combination of the first two objectives considering bus purchase cost is proportional to the number of trips (without scheduling, each trip is assumed to be served by one bus) and bus operation cost is equivalent to the total travel distance. (8) incorporated students’ walking distance in their model. (6) and (25) both tried to minimize the number of buses while minimizing the maximum ride time for students. These two objectives are conflicting because less number of buses would require longer route lengths (6). Another factor in the objective function could be penalty. Penalties are generally added when a hard constraint is relaxed and we allow violation of constraints. This penalty could have various forms including time window violation penalty (19), and capacity or maximum ride time constraints violation penalty (20). Shafahi, Wang, Haghani 6 Constraints Logistic (or degree) constraints are the basic VRP constraints, which formulate trips. They regulate the conservation of flow by assuring that when a vehicle enters a vertex (node), it also exits the same vertex. In addition, each trip starts from a depot and goes back to the depot, each vertex is served exactly once for single-visit cases. Multi-visit is allowed in some cases, but most papers only consider single-visit scenario. Although SBRP is an OVRP as discussed before, it is easier to generate round trips first and then discard the first (AM trips) or last (PM trips) arc of that trip. Capacity constraints are also quite common. All papers about SBRP and most papers about VRP have vehicle capacity constraints. Maximum ride time constraint is also considered, especially in rural areas. Russell and Morrel (13) used 45 minutes as the maximum ride time and Chen et al. (14) limited the ride time to be less than or equal to 75 minutes. Sub-tour elimination constraints are another common set of constraints that prevent the formation of the illegal trips some of which are not connected to the depot (3). The most adopted way to enforce connectivity is to set an appropriate lower bound on the number of vehicles required to visit a subset of vertices (29). Another common method is using an artificial commodity flow and the introduction of flow variables (8). Bektaş and Elmastaş (3) adopted Miller, Tucker and Zemlin (30) subtour elimination constraint to solve SBRP. Chain Barring constraints are only seen in multi-school scenarios. These constraints aim to eliminate the illegal trips that start from one school and end at another school (26). These constraints can be enforced implicitly by simply allowing trips assigned to a school to only stops that are assigned to the same school. Thus, chain barring constraints are considered implicitly in this paper. We should note that an assumption of this implied constraint is that we cannot have a school trip with mixed students from different schools. Yet, this is not a huge shortcoming as in reality mixed students are not popular among school agencies. Time windows is widely incorporated in scheduling rather than route generation. (7) applied time window constraints as school buses must arrive at a school no earlier than 25 minutes before and no later than 5 minutes before the start of school. (28) proposed time window constraints, which prevent the sub-tour formation at the same time. For solving routing and scheduling together, (31) modified several routing heuristic algorithms (saving algorithm, insertion algorithm, nearest neighbor algorithm, and the sweep algorithm) to solve the routing and scheduling problem. However, the optimality of these heuristics cannot be proven nor can they be evaluated due to the lack of optimal solutions from exact algorithms. In this paper, we propose a new mathematical model with a new bi-objective objective function. The proposed model maximizes trip compatibility while minimizing total travel time. It does not solve the routing and scheduling problem simultaneously and hence finding good solutions for the problem is not computationally burdensome. However, it provides a routing solution (a set of trips) with high compatibility. As a result, multi-trip routes that can be served by one bus is more likely to be generated and number of buses that are needed for the entire school operations could be reduced. METHODOLOGY We present a Mixed Integer Programming (MIP) model that aims to maximize the compatibility among trips with the hope of minimizing the overall number of buses as a result. The presented MIP is a novel model that solves the routing problem while considering the bus blocking problem. TABLE 1 summarizes the variables and parameters used in the mathematical model. Shafahi, Wang, Haghani 7 TABLE 1 Notation summary of variables and parameters Variables for school bus routing Variable name 𝑠2𝑡𝑠,𝑡 𝑡2𝑠𝑡,𝑘 𝑝4𝑡𝑠,𝑡 𝑡 𝑥𝑠1,𝑠2 𝑡𝑡𝑡 𝑠𝑡𝑎𝑟𝑡𝑡 𝑒𝑛𝑑𝑡 𝑏𝑡1,𝑡2 𝑑𝑑𝑡1,𝑡2 𝑙𝑠,𝑡 𝑡 𝑐𝑠1,𝑠2 𝑦𝑡1,𝑡2 𝑎𝑡 𝑚𝑡 𝑓𝑡 Parameter name 𝑆𝑐ℎ𝑜𝑜𝑙𝑠 𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 𝑇𝑟𝑖𝑝𝑠 𝑂𝑇𝑟𝑖𝑝𝑠 𝑆𝑡𝑜𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 𝑆𝑡𝑜𝑝𝑠 𝐵𝑢𝑠_𝐶𝑎𝑝 𝑆𝑡𝑢𝑑𝑒𝑛𝑡𝑠𝑠,𝑘 𝑂𝑘 𝐷𝑠1,𝑠2 𝑆𝑐ℎ𝑜𝑜𝑙𝐸𝑛𝑑𝑘 𝐵𝑢𝑓𝑓𝑒𝑟_𝑝𝑖𝑐𝑘𝑢𝑝 𝑀 𝐶𝐵 𝐶𝐶 𝐴 Description Binary decision variable that equals 1 if stop 𝑠 is assigned to trip 𝑡 Binary decision variable that equals 1 if trip 𝑡 is assigned to school 𝑘 Portion of the capacity of the bus doing trip 𝑡 that is filled at stop 𝑠 Binary variable that equals 1 if in trip 𝑡 the bus goes directly from stop 𝑠1 to stop 𝑠2 Travel time (duration) of trip 𝑡 The start time of trip 𝑡 The end time of trip 𝑡 Binary variable that equals 1 if trips 𝑡2 can be served after trip 𝑡1 (they are compatible) The travel deadhead duration from the last stop of trip 𝑡1 to the first stop of trip 𝑡2 Binary variable that equals 1 if the last stop of trip 𝑡 is stop 𝑠 Variable used for subtour elimination – The units of “artificial commodity” that is shipped from stop 𝑠1 to 𝑠2 using trip 𝑡 Variables for bus blocking Binary variable that equals 1 if trip 𝑡2 follows trip 𝑡1 within the same block (tour). This variable is only created for compatible pair of trips. Binary variable that equals 1 if a trip belongs to a tour of size 1 (no trip goes before or after it) A binary variable that equals 1 if trip 𝑡 has a trip that is being served before it and also another trip that is being served afterwards A binary variable that is equal to 1 if trip 𝑡 is served as the first trip in a tour of size greater than 1 Parameters for School bus routing and bus blocking Description Set of schools Set of possible trips dedicated to school 𝑘 Set of all trips The set of outputted trips from school bus routing problems The set of stops in which students for school 𝑘 should go to / come from Set of all stops The capacity of each bus The number of students at stop 𝑠 for school 𝑘 Origin stop for school 𝑘 The duration to drive from stop 𝑠1 to 𝑠2 plus the dwell time required at the stops Time which school 𝑘 closes The allowable buffer for picking up students from the schools = 0 for cases solved due to the trips being PM trips with no flexibilities. A large value (big-M) Penalty for total number of trips = 1000 for the cases solved Coefficient of compatibility = 200 for the cases solved The number of allowable trips over the minimum required trips for each school As explained earlier, the main purpose of the objective function is to simultaneously Shafahi, Wang, Haghani 8 maximize the number of compatible trips while minimizing the number of overall trips required and the travel time. These are done by assigning penalties (positive weights) to total number of trips being used and assigning benefits (negative weights) to compatible pair of trips. min 𝑧 = ∑𝑡∈𝑇𝑟𝑖𝑝𝑠 𝑡𝑡𝑡 + 𝐶𝐵 ∑𝑘∈𝑆𝑐ℎ𝑜𝑜𝑙𝑠 ∑𝑡∈𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 𝑡2𝑠𝑡,𝑘 + 𝐶𝐶 ∑𝑡1∈𝑇𝑟𝑖𝑝𝑠 ∑𝑡2∈𝑇𝑟𝑖𝑝𝑠 𝑏𝑡1,𝑡2 (1) The constraints listed below are in charge of building trips for each school. Each trip is built out of various stops. 𝑠2𝑡𝑠,𝑡 ≤ 𝑡2𝑠𝑡,𝑘 ∀𝑘 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙𝑠, 𝑠 ∈ 𝑆𝑡𝑜𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 , 𝑡 ∈ 𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 ∑𝑠∈𝑆𝑐ℎ𝑜𝑜𝑙_𝑆𝑡𝑜𝑝𝑠𝑘 𝑝4𝑡𝑠,𝑡 ≤ 1 𝑆𝑡𝑢𝑑𝑒𝑛𝑡𝑠𝑠,𝑘 (4) ∀𝑘 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙𝑠, 𝑡 ∈ 𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 , 𝑠 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙_𝑆𝑡𝑜𝑝𝑠𝑘 (5) 𝐵𝑢𝑠_𝐶𝑎𝑝 𝑡 ∑𝑠2∈𝑆𝑡𝑜𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑠𝑐ℎ |𝑠2≠𝑠 𝑥𝑠,𝑠2 = 𝑠2𝑡𝑠,𝑡 ∑𝑠∈𝑆𝑡𝑜𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 𝑥𝑂𝑡 𝑘 ,𝑠 = 𝑡2𝑠𝑡,𝑘 ∀𝑘 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙𝑠, ∀𝑡 ∈ 𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 , ∀𝑠 ∈ 𝑆𝑡𝑜𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 (6) ∀𝑘 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙𝑠, 𝑡 ∈ 𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 𝑡 𝑡 ∑𝑗∈𝑆𝑡𝑜𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 |𝑗≠𝑠 𝑥𝑠,𝑗 = ∑𝑖∈𝑆𝑡𝑜𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 |𝑖≠𝑠 𝑥𝑖,𝑠 𝑡𝑡𝑡 = ∑𝑠1∈𝑆𝑡𝑜𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 ∑𝑠2∈𝑆𝑡𝑜𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 |𝑠2≠𝑂𝑘 𝑥 𝑡 𝑠1,𝑠2 𝑒𝑛𝑑𝑡 = 𝑠𝑡𝑎𝑟𝑡𝑡 + 𝑡𝑡𝑡 ∀𝑘 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙𝑠, 𝑠 ∈ 𝑆𝑡𝑜𝑝𝑠𝑆𝑐ℎ𝑜𝑜𝑙𝑘 , ∀𝑡 ∈ 𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 × 𝐷𝑠1,𝑠2 𝑒𝑛𝑑𝑡1 + 𝑑𝑑𝑡1,𝑡2 − 𝑀 × (1 − 𝑏𝑡1,𝑡2 ) ≤ 𝑠𝑡𝑎𝑟𝑡𝑡2 (10) ∀𝑘 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙𝑠, 𝑡 ∈ 𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 (11) ∀𝑡1, 𝑡2 ∈ 𝑇𝑟𝑖𝑝𝑠 𝑀 ∀𝑘 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙𝑠, 𝑡 ∈ 𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 , 𝑠 ∈ 𝑆𝑡𝑜𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 𝑡2𝑠𝑡1,𝑘 ≥ 𝑡2𝑠𝑡2,𝑘 ∀𝑘 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙𝑠, 𝑡1, 𝑡2 ∈ 𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 | 𝑡2 ≤ 𝑡1 𝑡 𝑡 ∑𝑖∈𝑆𝑡𝑜𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 |𝑖≠𝑠 𝑐𝑖,𝑠 − ∑𝑖∈𝑆𝑡𝑜𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 |𝑖≠𝑠 𝑐𝑠,𝑖 = 𝑠2𝑡𝑠,𝑡 𝑆𝑡𝑜𝑝_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 |𝑠 ≠ 𝑂𝑘 𝑡 𝑡 𝑐𝑠1,𝑠2 ≤ 𝑀 × 𝑥𝑠1,𝑠2 (8) (9) 𝑑𝑑𝑡1,𝑡2 ≥ 2 × (1 − 𝑡2𝑠𝑡1,𝑘1 ) + 2 (1 − 𝑡2𝑠𝑡2,𝑘2 ) + ∑𝑠1∈𝑆𝑡𝑜𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘1 𝐷𝑠1,𝑂𝑘2 × 𝑙𝑠1,𝑡1 𝑆𝑐ℎ𝑜𝑜𝑙𝑠, 𝑡1 ∈ 𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘1 , 𝑡2 ∈ 𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘2 𝑡 𝑥𝑠,𝑂 = 𝑙𝑠,𝑡 𝑘 (7) ∀𝑘 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙𝑠, 𝑡 ∈ 𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 ∀𝑡 ∈ 𝑇𝑟𝑖𝑝𝑠 𝑆𝑐ℎ𝑜𝑜𝑙𝐸𝑛𝑑𝑘 ≤ 𝑠𝑡𝑎𝑟𝑡𝑡 ≤ 𝑆𝑐ℎ𝑜𝑜𝑙𝐸𝑛𝑑𝑘 + 𝐵𝑢𝑓𝑓𝑒𝑟_𝑝𝑖𝑐𝑘𝑢𝑝 𝑀 (3) ∀𝑘 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙𝑠, 𝑠 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙_𝑆𝑡𝑜𝑝𝑠𝑘 ∑𝑡∈𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 𝑝4𝑡𝑠,𝑡 = 𝑝4𝑡𝑠,𝑡 ≤ 𝑠2𝑡𝑠,𝑡 ∀𝑘 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙𝑠, ∀𝑡 ∈ 𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 (2) (12) ∀𝑘1, 𝑘2 ∈ (13) (14) (15) ∀𝑘 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙𝑠, 𝑡 ∈ 𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 , 𝑠 ∈ (16) ∀𝑘 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙𝑠, 𝑡 ∈ 𝑇𝑟𝑖𝑝𝑠_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 , 𝑠1, 𝑠2 ∈ 𝑆𝑡𝑜𝑝_𝑆𝑐ℎ𝑜𝑜𝑙𝑘 (17) Shafahi, Wang, Haghani ⌈ 9 (∑𝑠∈𝑆𝑡𝑜𝑝𝑆𝑐ℎ𝑜𝑜𝑙 𝑆𝑡𝑢𝑑𝑒𝑛𝑡𝑠𝑠,𝑘 ) 𝑘 ⌉ ≤ ∑𝑘∈𝑆𝑐ℎ𝑜𝑜𝑙𝑠 ∑𝑡∈𝑇𝑟𝑖𝑝𝑠𝑆𝑐ℎ𝑜𝑜𝑙 𝑡2𝑠𝑡,𝑘 𝐵𝑢𝑠_𝐶𝑎𝑝 ∀𝑘 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙𝑠 𝑘 ∑𝑘∈𝑆𝑐ℎ𝑜𝑜𝑙𝑠 ∑𝑡∈𝑇𝑟𝑖𝑝𝑠𝑆𝑐ℎ𝑜𝑜𝑙 𝑡2𝑠𝑡,𝑘 ≤ 𝐴 + ⌈ (∑𝑠∈𝑆𝑡𝑜𝑝𝑆𝑐ℎ𝑜𝑜𝑙 𝑆𝑡𝑢𝑑𝑒𝑛𝑡𝑠𝑠,𝑘 ) 𝑘 𝐵𝑢𝑠𝐶𝑎𝑝 𝑘 ⌉ ∀𝑘 ∈ 𝑆𝑐ℎ𝑜𝑜𝑙𝑠 (18) (19) Constraints (2) prevent the assignment of stops to the trips that have not been assigned to their respective schools. These trips are the ones that are not in use. Constraints (3) are trip capacity constraints. Constraints (4) ensure that all students are being served. Constraints (5) disallow the assignment of students to a trip that does not pass the stop in which the students are from there. Constraints (6) assure that if a stop is assigned to a trip, that trip visits that node by traversing the arcs that lead to that node. Constraints (7) enforces each trip to start from the school for PM trips. Conservation of flow is expressed through Constraints (8). Constraints (9) calculate the travel duration of the trips. The trips, start from the school and end at a node, which is the last stop (the stop before going back to the school). Constraints (10) calculate the end time of the trips using the start time and the travel time. The start time is constrained by the time at which the schools close in constraints (11). Constraints (12) are used for identifying the compatible trips. The deadhead between pairs of trips that is used for compatibility calculations is computed using constraints (13). Constraints (14) are used for identifying the last stops for the trips. This last stop is the last actual stop and is the stop right before the school goes back to its start point to complete its fictional closed loop trip. Constraints (15) are for eliminating symmetries. Note that if there is only one trip assigned to a school, the id for this trip could assume many values. These constraints prevent higher trip ids to occur prior to the lower ones and can speed up the search for good solutions. Constraints (16)-(17) are flow subtour elimination constraints. Finally, constraints (18)-(19) are limiting the number of trips assigned to a school to the minimum number needed based on population at each stop. As discussed before, in an urban school setting where bus capacity is the binding constraint, maximum ride time constraint can be relaxed for the sake of improving model efficiency. To compare the trip outcomes from our model versus those from traditional models, we input the trips from all models into a bus blocking problem summarized below: ∑𝑗∈𝑂𝑇𝑟𝑖𝑝𝑠 𝑦𝑡,𝑗 + ∑𝑗∈𝑂𝑇𝑟𝑖𝑝𝑠 𝑦𝑗,𝑡 + 𝑎𝑡 ≥ 1 ∀𝑡 ∈ 𝑂𝑇𝑟𝑖𝑝𝑠 (20) ∑𝑗∈𝑂𝑇𝑟𝑖𝑝𝑠 𝑦𝑡,𝑗 + 𝑎𝑡 ≤ 1 ∀𝑡 ∈ 𝑂𝑇𝑟𝑖𝑝𝑠 (21) ∑𝑗∈𝑂𝑇𝑟𝑖𝑝𝑠 𝑦𝑗,𝑡 + 𝑎𝑡 ≤ 1 ∀𝑡 ∈ 𝑂𝑇𝑟𝑖𝑝𝑠 (22) ∑𝑗∈𝑂𝑇𝑟𝑖𝑝𝑠 𝑦𝑡,𝑗 + ∑𝑗∈𝑂𝑇𝑟𝑖𝑝𝑠 𝑦𝑗,𝑡 ≤ 2 ∀𝑡 ∈ 𝑂𝑇𝑟𝑖𝑝𝑠 ∑𝑗∈𝑂𝑇𝑟𝑖𝑝𝑠 𝑦𝑡,𝑗 + ∑𝑗∈𝑂𝑇𝑟𝑖𝑝𝑠 𝑦𝑗,𝑡 + 𝑎𝑡 = 1 + 𝑚𝑡 ∀𝑡 ∈ 𝑂𝑇𝑟𝑖𝑝𝑠 (23) (24) Constraints (20)-(23) make sure that each trip that is selected and assigned to a school is either served with another trip as a pair or being served alone. Constraints (24) identify the middle trips of blocks. The objective of the blocking problem is minimizing the total number of blocks. This could be achieved by maximizing the number of middle trips, 𝑚𝑡 , and minimizing the number of alone trips, 𝑎𝑡 (25). Alone trips are those trips that are the sole trips in a tour (block) of size one. Shafahi, Wang, Haghani min 𝑧 = − ∑𝑡∈𝑂𝑇𝑟𝑖𝑝𝑠 𝑚𝑡 + ∑𝑡∈𝑂𝑇𝑟𝑖𝑝𝑠 𝑎𝑡 10 (25) It is important to note that the way the objective function is written in (1) may be putting too much importance on the total trip compatibility. Consider a scenario that trip a is compatible with both trips b and c but trips b and c are incompatible. In such a case, one bus can serve either trip b or trip c after trip a, but is no bus can serve them all. Total trip compatibility is equal to two while only one bus can be saved. This implies that trip compatibility is not equal to the number of buses that can be saved. One approach is to have a hybrid model of routing and blocking. However, as mentioned earlier, such a problem will be very complex due to the additional variables and constraints. Such a problem is almost impossible to solve for problems that are not toy problems using exact algorithms. Another approach is to look at compatibility of trips with schools. We have looked into this approach however, upon preliminary investigations, we have did not find any great gain over the proposed model. COMPUTATIONAL RESULT In order to evaluate the model, eight set of randomly generated mid-size problems were generated and tested against typical routing models found from literatures, that are minimizing number of trips (which is same as minimizing number of buses without scheduling) and minimizing total travel time (or distance). The parameters of the distributions used for the randomly generating the cases are mostly based on real world cases. The detailed information for each scenario and the results from different models are shown in TABLE 2. Each scenario has many parameters. The total number of stops (# stops) is an indicator of the problem size, which is the number of vertices in the problem. The number of schools also affects the size of the problem since each school has a certain number of students that require bus transport. The total number of trips that each school needs is bound by the ratio of the total number of students over the capacity of each bus that is 48 for each school. The average number of students at each school that require bus transportation are also different for each scenario. Note that each school has a different population. The Maximum number of stops assigned to each school is another parameter that influences the problem’s complexity. Finally, bus start range for each scenario is the time difference between the earliest and latest school dismissal time. The dismissal times for the schools follow a discrete uniform distribution with 15 minutes time intervals within that range. For each scenario, four objectives are tested: 1) the proposed objective of maximizing trip compatibility while minimizing total travel time (MaxCom+TT); 2) maximizing trip compatibility (MaxCom) by deleting travel time from the proposed objective; 3) minimizing total number of trips (MinN); and 4) minimizing total travel time (MinTT). The problems are solved by commercial solver FICO Mosel XPRESS on five computers with same feature: Intel® Core™ i5-2400 CPU, 3.10 GHz with 4 GB RAM. Due to the slow rate of reduction in the gap, the solution processes for the test problems were terminated after a certain running times (from 30 minutes to 24 hours). The relative performance measure used for each of the models, is the total number of blocks that is the output of the blocking problem when the input trips are the solutions of the respective model. Scenario 1 is for illustrating the impact of “additional allowed trips” (i.e. the A parameter in constraints (19)) on the complexity of the problem and solution time. To perform this sensitivity analysis, we run scenario 1 using four different values for the A parameter (A=0,1,2,3). Recall that if A=2, each school is allowed to use up to two more trips than the minimum number it requires. The minimum number of trips a school requires is easily calculated based on the school’s population and the capacity of each bus. As it can be seen, the more additional trips are allowed, Shafahi, Wang, Haghani 11 the more running time is required. However, better solutions may be found. For example, 30 buses (MaxCom+TT, 2 additional trips after 6 hrs.) is the current best solution in comparison to 3 additional trips with short running time (30 minutes) and all other solutions from 1 and 0 additional trips cases. While keeping in mind the recently mentioned note, for the sake of saving running time, this paper limits all the remaining 7 scenarios to have no additional trips (A=0). It should be noted that in real applications, additional trips should be allowed to try to find the best potential solution by simply allowing the models to run longer. In real applications, the running time for SBRSP is less important than finding the optimal solution. Even one bus saving could be significantly beneficial. TABLE 2 Summary of computational result Scenario # of Stops # of Schools Avg. # of Student to School Max # of Stops to School Bus Service Start Time Range 1 2 3 4 5 6 7 8 100 200 100 100 125 100 200 200 5 20 20 20 25 20 20 20 91.4 89.6 120.7 182.8 90.4 91.6 89.5 91.1 13 16 13 13 13 13 16 14 0-30 0-30 0-30 0-30 0-30 0-90 0-90 0-16 1 0 0 0 0 0 0 0 0 30 2 (6 hrs.) 180 30 30 30 60 600 360 30 60 30 21.1 22.9 6.7 8.4 5.0 6.2 5.3 12.0 2.3 2.4 7.2 1.9 50 52 42 42 41 47 54 75 46 41 47 45 34 34 30 30 31 32 34 45 35 16 24 45 30 30 180 30 30 30 60 600 360 30 60 30 10.7 25.6 7.3 16.1 4.9 5.6 4.9 10.8 1.5 2.7 10.5 1.3 43 54 42 47 41 47 54 75 46 41 47 45 31 34 31 32 30 30 36 45 36 16 24 44 0.38 0.85 0.05 0.14 0.10 0.46 0.04 0.04 0.02 0.20 0.35 0.18 0 0 0 0 0 0 0 0 0 0 0 0 41 41 41 41 41 47 54 75 46 41 47 45 36 35 35 35 38 38 45 60 41 21 26 45 30 30 180 30 30 30 60 600 360 30 60 30 1.1 1.1 0.8 1.1 0.9 3.4 6.2 20.6 0.2 1.4 7.0 15.0 61 58 59 58 41 47 54 75 46 41 47 45 40 40 39 39 32 32 38 52 35 17 RT: Running time (minute); Gap: unit in % NOT; Number of trips (trip); NOB: Number of buses (bus) 24 45 Additional Trips 3 2 RT Gap (%) NOT NOB RT Gap (%) NOT NOB RT Gap (%) NOT NOB RT Gap (%) NOT NOB 30 Max Com +TT Max Com Min N Min TT In Scenario 2, where the number of stops is increased, the model presented in this paper can save 2 buses in comparison to the solution from MinTT and 8 buses can be saved from MinN (FIGURE 2). Considering the higher gap for proposed model under same running time (30 minutes), the result has the potential to be further improved. Scenario 3 is similar with scenario 1, except increasing average number of students for each school from 91.4 students to 120.7 students. Shafahi, Wang, Haghani 12 Based on the result from MaxCom+TT, 2 and 11 buses can be saved compared to that from MinTT and MinN, respectively. Scenario 4 is a further expansion of Scenario 1 and Scenario 3, which has an average of 182.8 students for each school. In this relatively large case, the saving by MaxCom+TT and MaxCom is more significant, 7 buses and 15 bused are saved. In Scenario 5, both number of stops and number of school are increased. In this scenario, MaxCom+TT and MinTT both need 35 buses, but MaxCom needs 36 buses. The reason might be the bigger gap for MaxCom. As it can be seen, in general, MaxCom+TT uses less buses compared to traditional models. Scenario 6 is similar with Scenario 1 except it expands the bus service start time range from 30 minutes to 90 minutes. The purpose of this change is to see how the model performs in comparison to traditional models when many of the trips are going to be easily compatible anyway. Because trips can be easily compatible with each other after increasing start time range, bus saving might be less than smaller time range scenarios. The result in FIGURE 2 proves this hypothesis, only one bus saved in Scenario 6. Scenario 7 is similar to Scenario 1 with a change in the bus service start time range. The range is increased to 90 minutes for Scenario 7. It has similar results to Scenario 1, no additional improvement made by proposed models. Scenario 8 is another experiment, which decreases the bus service start time range to 16 minutes from Scenario 2. Only one bus is saved by MaxCom. In these conditions, the bus service start time range is too small for trips to be compatible. MaxCom would take whatever it need to make it compatible, which leads to extremely long travel time trips (FIGURE 3h). The cross examination reveals the application and limits of proposed objective. That is the proposed objective is not extremely beneficial in comparison to the traditional models for scenarios where the bus service time range falls in a range that is either too big for trips being compatible anyway or too small that trips cannot be compatible. But for the range in between, like school bus service provided by a county’s Department of Pupil Transportation, the proposed objective, MaxCom+TT greatly outperforms the traditional objectives. Another concern in SBRSP is the maximum ride time for each trip. Since the MaxCom model does not have a maximum ride time constraint nor any incentive in minimizing the total travel time, MaxCom only focuses on maximizing the trip compatibility even at the expense of long travel time trips (that could go up to 121 minutes in Scenario 4, which is too long to be a school bus trip). From this perspective, MaxCom+TT makes more sense. FIGURE 3 is the travel time distribution where frequency is calculated in 5 minutes interval and marked at the beginning of each interval. For instance, frequency of interval 0-5 minutes is plotted at travel time (horizontal axis) equals to 0 minutes. The results in FIGURE 3 show that MaxCom+TT tends to have short travel time trips (mostly less than 40 minutes) than MaxCom. FIGURE 4 is the total travel time for different objectives. It shows that in most scenarios, the results from MinTT has the minimal total travel time, and that MaxCom and MinN have long travel times. MaxCom+TT has much less total travel time than those from MaxCom and MinN but the total travel times are slightly higher than that from MinTT. In general, MinN has the worst result. It is because the model would stop right after finding a solution that uses the minimal number of trips. Since the objective cannot be improved furthermore (i.e. it is optimal), the model simply ignores decreasing travel time or increasing trip compatibility, which makes it harder to group them in a block. MamCom+TT tends to have more high-compatible (2- or 3-trips) routes (FIGURE 2). The more high-compatible routes exist, the less buses are needed. Overall, MaxCom+TT generates the best result, which use the least buses and its trips have relatively short travel times. Shafahi, Wang, Haghani 13 (a) (b) (c) (d) (e) (g) FIGURE 2 Summary of school bus blocking result (f) (h) Shafahi, Wang, Haghani 14 (a) (b) (c) (d) (e) (f) (g) (h) FIGURE 3 Travel time distribution Shafahi, Wang, Haghani 15 FIGURE 4 Total travel time comparison It is worth noting that this gain in savings in the number of buses needed for serving the trips does not come free. FIGURE 5 shows the tradeoff between the reduction in the number of buses and the increase in travel time per bus. The comparison is made between the best results from the proposed models (MaxCom & MaxCom+TT) and the best results from traditional models (MinTT & MinN). It can be seen that up to 13.5% buses can be saved at the expense of 5.8 additional travel time minutes per bus (Scenario 4, 7 buses are saved). From a financial point of view, the savings gained by needing fewer buses could easily justify the additional travel times. Note: -1.7 for Scenario 8 means travel time per bus of the solution from new objectives is 1.7 minutes less than that from traditional objectives. FIGURE 5 Tradeoff between decrease of number of buses and travel time increase from best new models and best traditional models Shafahi, Wang, Haghani 16 SUMMARY AND CONCLUSION In this paper, we propose a new mathematical model that optimizes a new objective to solve school bus routing problem. This new objective has a component for maximizing the trip compatibility that can potentially decrease the total number of buses required for the operation. Eight mid-size problems are solved to test the performance, and illustrate the applications and limitations of the proposed method. It is shown that the proposed model outperforms traditional models by requiring fewer buses. The model’s significance is greater when the school dismissal times are within 30 minutes of each other. We recommend using this model for such cases. This research opens the venue for many future studies. One of them is sensitivity analysis for parameters in the proposed objective. Another one is the double counting of compatibility problem that was mentioned at the end of the methodology section. Larger size problem should also be applied to test the performance and efficiency of the proposed model. A heuristic algorithm should also be developed to solve the model for larger problems when needed. REFERENCES 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Desrosiers, J., Ferland, J.A., Rousseau, J.-M., Lapalme, G., Chapleau, L., 1981. An overview of a school busing system. In: Jaiswal, N.K. (Ed.), Scientific Management of Transport Systems. North-Holland, Amsterdam, pp. 235–243. Park, J. and Kim, B.I., 2010. The school bus routing problem: A review. European Journal of operational research, 202(2), pp.311-319. Bektaş, T. and Elmastaş, S., 2007. Solving school bus routing problems through integer programming. Journal of the Operational Research Society, 58(12), pp.1599-1604. Gendreau, M., Potvin, J.Y., Bräumlaysy, O., Hasle, G. and Løkketangen, A., 2008. Metaheuristics for the vehicle routing problem and its extensions: A categorized bibliography. In The vehicle routing problem: latest advances and new challenges (pp. 143-169). Springer US. Syslo MM, Deo N and Kowalik JS (1983). Discrete Optimization Algorithms with Pascal Programs. Prentice-Hall Inc.: New Jersey. Corberán, A., Fernández, E., Laguna, M. and Marti, R.A.F.A.E.L., 2002. Heuristic solutions to the problem of routing school buses with multiple objectives. Journal of the operational research society, 53(4), pp.427-435. Braca, J., Bramel, J., Posner, B. and Simchi-Levi, D., 1994. A Computerized Approach to the New York City School Bus Routing Problem. Bowerman, R., Hall, B. and Calamai, P., 1995. A multi-objective optimization approach to urban school bus routing: Formulation and solution method. Transportation Research Part A: Policy and Practice, 29(2), pp.107-123. Ripplinger, D., 2005. Rural school vehicle routing problem. Transportation Research Record: Journal of the Transportation Research Board, (1922), pp.105-110. National Association of State Directors of Pupil Transportation Services.1999. School Bus Seat Capacity Savas E. 1978. On equity in providing public services. Mangagment Sci., 24, pp.800-808 Li, L.Y.O. and Fu, Z., 2002. The school bus routing problem: a case study. Journal of the Operational Research Society, 53(5), pp.552-558. Russell, R.A. and Morrel, R.B., 1986. Routing special-education school buses. Interfaces, 16(5), pp.56-64. Chen, D.S., Kallsen, H.A., Chen, H.C. and Tseng, V.C., 1990. A bus routing system for rural school districts. Computers & Industrial Engineering, 19(1-4), pp.322-325. Shafahi, Wang, Haghani 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 17 Thangiah, S.R. and Nygard, K.E., 1992, March. School bus routing using genetic algorithms. In Aerospace Sensing (pp. 387-398). International Society for Optics and Photonics. Spada, M., Bierlaire, M., Liebling, Th.M., 2005. Decision-aiding methodology for the school bus routing and scheduling problem. Transportation Science 39, 477–490. Schittekat, P., Sevaux, M., Sörensen, K., 2006. A mathematical formulation for a school bus routing problem. In: Proceedings of the IEEE 2006 International Conference on Service Systems and Service Management, Troyes, France. Díaz-Parra, O., Ruiz-Vanoye, J.A., Buenabad-Arias, Á. and Cocón, F., 2012, November. A vertical transfer algorithm for the school bus routing problem. InNature and Biologically Inspired Computing (NaBIC), 2012 Fourth World Congress on (pp. 66-71). IEEE. Taillard, É., Badeau, P., Gendreau, M., Guertin, F. and Potvin, J.Y., 1997. A tabu search heuristic for the vehicle routing problem with soft time windows.Transportation science, 31(2), pp.170-186. Gendreau, M., Hertz, A. and Laporte, G., 1994. A tabu search heuristic for the vehicle routing problem. Management science, 40(10), pp.1276-1290. Tillman, F.A., 1969. The multiple terminal delivery problem with probabilistic demands. Transportation Science, 3(3), pp.192-204. Held, M. and Karp, R.M., 1970. The traveling-salesman problem and minimum spanning trees. Operations Research, 18(6), pp.1138-1162. Wren, A. and Holliday, A., 1972. Computer scheduling of vehicles from one or more depots to a number of delivery points. Journal of the Operational Research Society, 23(3), pp.333-344. Gillett, B.E. and Miller, L.R., 1974. A heuristic algorithm for the vehicle-dispatch problem. Operations research, 22(2), pp.340-349. Pacheco, J. and Martí, R., 2006. Tabu search for a multi-objective routing problem. Journal of the Operational Research Society, 57(1), pp.29-37. Laporte, G., Nobert, Y. and Arpin, D., 1986. An exact algorithm for solving a capacitated location-routing problem. Annals of Operations Research, 6(9), pp.291-310. Laporte, G., Nobert, Y. and Taillefer, S., 1988. Solving a family of multi-depot vehicle routing and location-routing problems. Transportation science, 22(3), pp.161-172. Desrosiers, J., Sauvé, M. and Soumis, F., 1988. Lagrangian relaxation methods for solving the minimum fleet size multiple traveling salesman problem with time windows. Management Science, 34(8), pp.1005-1022. Laporte, G., 1992. The vehicle routing problem: An overview of exact and approximate algorithms. European Journal of Operational Research, 59(3), pp.345-358. Miller, C., A. Tucker and R. Zemlin. 1960. Integer Programming Formulations and Traveling Sales- man Problems. J. Assoc. Comput. Mach. 7, 326-329. Solomon, M.M., 1987. Algorithms for the vehicle routing and scheduling problems with time window constraints. Operations research, 35(2), pp.254-265.
2cs.AI
Statistical Science 2014, Vol. 29, No. 2, 181–200 DOI: 10.1214/13-STS462 c Institute of Mathematical Statistics, 2014 Enhancing R with Advanced Compilation Tools and Methods arXiv:1409.3144v1 [stat.CO] 9 Sep 2014 Duncan Temple Lang Abstract. I describe an approach to compiling common idioms in R code directly to native machine code and illustrate it with several examples. Not only can this yield significant performance gains, but it allows us to use new approaches to computing in R. Importantly, the compilation requires no changes to R itself, but is done entirely via R packages. This allows others to experiment with different compilation strategies and even to define new domain-specific languages within R. We use the Low-Level Virtual Machine (LLVM ) compiler toolkit to create the native code and perform sophisticated optimizations on the code. By adopting this widely used software within R, we leverage its ability to generate code for different platforms such as CPUs and GPUs, and will continue to benefit from its ongoing development. This approach potentially allows us to develop high-level R code that is also fast, that can be compiled to work with different data representations and sources, and that could even be run outside of R. The approach aims to both provide a compiler for a limited subset of the R language and also to enable R programmers to write other compilers. This is another approach to help us write high-level descriptions of what we want to compute, not how. Key words and phrases: Programming language, efficient computation, compilation, extensible compiler toolkit. ploiting, and coming to terms with, technologies for parallel computing including shared and nonshared Computing with data is in a very interesting pemulti-core processors and GPUs (Graphics Processriod at present and this has significant implications ing Units). These challenge us to innovate and sigfor how we choose to go forward with our computnificantly enhance our existing computing platforms ing platforms and education in statistics and related and to develop new languages and systems so that fields. We are simultaneously (i) leveraging higher- we are able to meet not just tomorrow’s needs, but level, interpreted languages such as R, MATLAB, those of the next decade. Python and recently Julia, (ii) dealing with increasStatisticians play an important role in the “Big ing volume and complexity of data, and (iii) ex- Data” surge, and therefore must pay attention to logistical and performance details of statistical comDuncan Temple Lang is Associate Professor, putations that we could previously ignore. We need Department of Statistics, University of California at to think about how best to meet our own computDavis, 4210 Math Sciences Building, Davis, California ing needs for the near future and also how to best be 95616, USA e-mail: [email protected]. able to participate in multi-disciplinary efforts that require serious computing involving statistical ideas This is an electronic reprint of the original article published by the Institute of Mathematical Statistics in and methods. Are we best served with our own computing platform such as R (R Core Team (2013))? Statistical Science, 2014, Vol. 29, No. 2, 181–200. This Do we need our own system? Can we afford the luxreprint differs from the original in pagination and typographic detail. ury of our own system, given the limited resources 1. BACKGROUND & MOTIVATION 1 2 D. TEMPLE LANG our field has to develop, maintain and innovate with that system? Alternatively, would we be better off reimplementing R or an R-like environment on a system that is developed and supported by other larger communities, for example, Python or Java? Or can we leave it to others to build a new, fast computing environment that we can leverage within the field of statistics? Would “doing it right” give us an opportunity to escape some of the legacy in our current systems and position ourselves for more innovation? Would developing a new system splinter our already small community and reduce our effectiveness in disseminating new statistical methods as effectively as we do through R’s excellent package mechanism? I have wrestled with these questions for over a decade. I don’t believe there is a simple answer as to what is the best way to proceed. It is as much a social issue as a technical one. The R community is an amazing and valuable phenomenon. There is a large R code base of packages and scripts in widespread use for doing important science. Even if new systems do emerge and replace R, this will take several years. We need significant improvements in performance to make R competitive with other systems, at least for the near future. We must improve R’s performance to allow us to continue to deal with larger and more complex data and problems. In this paper, I discuss one direct approach to improve the performance of R code that is extensible and enables many people to further improve it. The essence of the approach I am suggesting is conceptually quite simple and emerged in numerous other languages and platforms, around the same time we first started implementing it for R. The idea is that we compile R code directly to low-level native machine instructions that will run on a CPU or GPU or any device we can target. Instead of insisting that R code be evaluated by the one and only R interpreter, we may generate the code to perform the equivalent computations in a quite different way. We can dynamically compile fast native code by combining information about the code, the data and its representation being processed by that code, the available computing “hardware” (i.e., CPU or GPU or multi-core), the location of the different sources of the data, whether we need to handle missing values (NAs) or not, and so on. This is a form of just-in-time (JIT) compilation. It leverages additional knowledge about the context in which code will be run. It maps the code to low-level machine instructions rather than having it evaluated by a high-level interpreter. The approach presented here is quite different from how programmers typically improve performance for R code. They manually implement the slow, computationally intensive parts in C /C ++, and call these routines from R. I call this “programming around R.” Instead, I am trying to “compile around R.” In this approach, statisticians use familiar R idioms to express the desired computations, but the compiler infrastructure generates optimized instructions to realize the intended computations as efficiently as possible on the hardware platform in use. The input from the statistician or analyst to this process is R code, not low-level C /C ++ code. This is good because humans can more easily understand, debug, adapt and extend code written in R. Furthermore, the compiler can “understand” what is intended in the high-level code and optimize in quite different ways. This also allows the code to be optimized in very different ways in the future. The high-level code says what to do, but not how to do it. How is left to the compiler. What makes this approach feasible and practical now is the availability of the Low-Level Virtual Machine Compiler Infrastructure (LLVM ) (Lattner and Adve (2004)). LLVM is the winner of the 2012 Association for Computing Machinery System Software Award (the same award conferred on the S language in 1999) and is a highly extensible compiler toolkit. LLVM is a C ++ library we can integrate into R (and other languages) to generate native code for various different CPUs, GPUs and other output targets. The ability to integrate this very adaptable and extensible tool into high-level languages is a “game changer” for developing compilation tools and strategies. We can use a technology that will continue to evolve and will be developed by domain experts. We can adapt these to our purposes with our domain knowledge. We do this within an extensible R package rather than in the R interpreter itself. This leaves the compilation infrastructure in “user” space, allowing development of any new compilation strategies to be shared without any changes to the R interpreter. This contrasts with R’s byte-code compiler and the byte-code interpreter which is part of the fixed R executable. The Rllvm (Temple Lang (2010b)) package provides R bindings to the LLVM C ++ API. We can use this to generate arbitrary native code. The RLLVMCompile (Temple Lang and Buffalo (2011)) ENHANCING R WITH ADVANCED COMPILATION TOOLS AND METHODS package provides a simple “compiler” that attempts to translate R code to native code by mapping the R code to instructions in LLVM, leaving LLVM to optimize the code and generate the native machine code. Before we explore some examples of how we can use LLVM in R to improve performance and change our computational strategies for certain types of problems, it is worth thinking a little about the potential implications of fast R code: • Alternative data models. On a practical level, if we can compile scalar (i.e., nonvectorized) R functions so that they are almost as fast as C /C ++ code, we can use them to process individual observations in a streaming or updating manner. This means we can escape the highly-vectorized or “all data in memory” approaches that R strongly rewards. • Exporting code to alternative execution environments. We can write R code and then export it to run in other different systems, for example, databases, Python, JavaScript and Web browsers. We can map the R code to LLVM ’s intermediate representation (IR). We can then use emscripten (Zakai (2010)) to compile this directly to JavaScript code. For other systems, we can share the IR code from R and they can use their own LLVM bindings to compile it to native code for the particular hardware. • Richer data structures. R provides a small number of primitive data types, for example, vectors, lists, functions. We can currently use these to create new aggregate or composite data structures. However, we can only introduce new and different data structures such as linked lists and suffix trees as opaque data types programmed in native (C /C ++) code. When we compile code to native instructions, we also have the opportunity to have that new code use these different data structures and to represent the data differently from R. The same R code can be merged with descriptions of new data types to yield quite different native instructions that are better suited to particular problems. • Templating concepts. Our ability to create native code from R code allows us to think about R functions or expressions differently. They are descriptions of what is to be done, without the specifics of how to do them. An R compiler can rewrite them or generate code that will behave differently from the R interpreter but give the same results 3 (hopefully). The functions are “templates.” The compiler can use knowledge of the particular representation of the data the functions will process to generate the native code in a more intelligent manner. For example, the code may access elements of a two-dimensional data set—rows and columns. There are two very different representations of this in R— data frames and matrices. How the individual elements are accessed for each is very different. The compiler can generate specialized code for each of these and might even change the order of the computations to improve efficiency (cache coherency) for these representations. The function is not tied to a particular data representation. In summary, compiling R programs through LLVM yields novel computational potentials that are directly relevant to improving statistical learning and communication in the big data era. Compiling highlevel code to native code is used in many systems. Julia is an interesting modern project doing this. NumPy (Jones et al. (2001)) in Python is another. Several years ago, Ross Ihaka and I explored using LISP (Ihaka and Temple Lang (2008)) as the platform for a new statistical computing platform. The same ideas have been used there for many years and the performance gains are very impressive. A very important premise underlying the approach in this paper is that the R project and its large code base are important, and will be for at least another 5 years. Users are not likely to immediately change to a new system, even if it is technically superior. For that reason, it is important to improve the performance of R now. It is also important to allow developers outside of the core R development team to contribute to this effort and to avoid many forked/parallel projects. For this, we need an extensible system within R, and not one that requires continual changes to the centralized R source code. In addition to focusing on the immediate and near-term future and improving R, we also need to be exploring new language and computing paradigms within the field of statistics. Julia is an interesting modern project doing this. We need to foster more experiments so new ideas emerge. To do this, we also need to increase the quantity and quality of computing within our curricula. Section 2 constitutes the majority of this paper. In it I explore different examples of computing in R and how compiling code can make the computations more efficient, both by simply obtaining faster 4 D. TEMPLE LANG execution speed and also by allowing us to change how we approach the problem. In Section 3 I discuss some additional general strategies we can exploit to improve computations in the future. I briefly discuss other exciting research projects to improve R’s efficiency and contrast them with the LLVM approach. I outline in Section 6 a road map of the ongoing work on the LLVM approach and other related projects as part of our future activities. The aim of this is to illustrate the feasibility of the entire approach. In this paper I focus on reasonably standard R code and approaches that can be improved by generating native code. The semantics of the generated code are the same as the original R code. The approach also allows us to develop new languages and semantics within the compilation framework and to explore different computational models. However, the examples discussed in this paper stay within R’s existing computational model in order to anchor the discussion and avoid too many degrees of freedom becoming a distraction. I do hope that we will explore new semantics and language features within R via compilation. 2. ENHANCING R WITH ADVANCED COMPILATION TOOLS AND METHODS In this section we’ll explore some examples of how we can write code in R and compile it to machine code. These explore different strategies and illustrate how we can approach computations differently when we have the option to compile code rather than only interpret it. We have chosen the problems for several reasons. They are each reasonably simple to state, and they illustrate the potential benefits of compilation. Like most benchmarks, some of the examples may not reflect typical use cases or how we would do things in R. However, most of these problems are very concrete and practical, and represent ways we would like to be able to program in R, were it not for the performance issues. In this way, the examples illustrate how we can continue to use R with an additional computational model and can overcome some of the interpreter’s performance issues while still using essentially the same R code. Note. In the following subsections, we present absolute and comparative timings for different approaches and implementations to the different tasks. These timings were performed on three different machines. We used a MacBook Pro running OS X (2.66 GHz Intel Core i7, 8 GB 1067 MHz DDR3) and also two Linux machines. The first of these Linux machines is an older 2.8 GHz AMD Opteron, 16 GB. The second is a much more recent and faster machine—3.50 GHz Intel Core i7-2700K, with 32 GB of RAM. Additionally, the different machines have different compilers used to compile R itself and these may impact the timings. We used GCC 4.2.1 on OS X, and GCC 4.3.4 on the first Linux machine and both GCC 4.8.0 and clang on the second Linux box. In all cases, R was compiled with the -O3 optimization level flag. The absolute times are quite different across machines, as we expect, and the withinmachine relative performance of our LLVM generated code to native code differs between OS X and Linux. However, the within-machine results are very similar across Linux machines. Finally, our current steps to optimize the native code we generate with LLVM are quite simple and we expect to improve these in the near future. We have not included the time to compile the code in our measurements. There are two steps in this— compiling the R code to intermediate representation (IR) and then compiling the IR to native code. The former can be done once, and the latter for each R session and is done in LLVM ’s C ++ code. There are several reasons for omitting these steps in the timings. First, our focus is on tasks that take a long time to run in R, for example, many hours or days. Compilation time will be on the order of, at most, a few minutes and so the compilation time is negligible. Second, we expect that the compiled code will be reused in multiple calls and so the overhead of compiling will be amortized across calls. We have also ignored the time to byte-compile R functions, or compile and install C /C ++ code to be used in R packages. 2.1 The Fibonacci Sequence The Fibonacci sequence is an interesting mathematical sequence of integers defined by the recurrence/recursive relation Fn = Fn−1 + Fn−2 , n≥0 with F0 = 0 and F1 = 1. We can implement this as an R function in an easy and obvious manner as fib = function(n) { if (n < 2L) n else fib(n - 1L) + fib(n - 2L) } 5 ENHANCING R WITH ADVANCED COMPILATION TOOLS AND METHODS For simplicity, we don’t verify that n is nonnegative, assuming the caller will provide meaningful inputs. This maps the mathematical description of the sequence to a computational form essentially in a oneto-one manner. This is a good thing, as it makes the code and computations easy to understand, debug and maintain. However, this is a scalar function and not vectorized, meaning that it computes the value of the Fibonacci sequence for a single integer value rather than element-wise for a vector of inputs. This makes it slow in R if we want to compute multiple values from the sequence, for example, apply it to each element of a vector. Instead of implementing the function in this natural form, to gain performance, we would look to other implementations. Since the sequence is described by a recurrence relationship, there is a simple closedform formula for computing the nth value of the sequence which can be easily implemented in R as a vectorized function of n. Alternatively, we might use memoization to remember results computed in previous calls to the function to avoid repeating computations. We might even use a lookup table of precomputed results for common input values, or some combination of these approaches. The key is that to get good performance, we have to think about the problem quite differently. Instead, we’ll explore how we make the simple implementation above perform better and hope to avoid having to change our entire approach or rely on R’s other vectorized operations. We use the function compileFunction() in the RLLVMCompile package to create a native compiled version of the fib() function with fib.ll = compileFunction(fib, Int32Type, list(n = Int32Type)) We have to specify the type of the return value and also the type of the input(s), that is, n in this case. For this function, both the return type and the input are regular integer values corresponding to the 32bit integer type Int32Type. We could use a 64-bit integer by using the type Int64Type if we wanted to deal with larger numbers. In fact, we can create two separate and different versions of this function with different types with two calls to compileFunction(). This is a simple illustration of how easy it is to adapt the same R code to different situations and create different compiled routines with different characteristics. compileFunction() can return an R function which we can invoke directly. However, by default, it currently returns an object representing the compiled routine in LLVM. We can invoke the routine using this object and the .llvm() function, analogous to the .Call() and .C() functions in R. So .llvm(fib.ll, 30) calls our compiled routine and returns the value 832,040. Unlike the .Call()/.C() functions, the .llvm() function knows the expected types of the routine’s parameters and so coerces the inputs to the types expected by the routine. In this case, it converts the R value 30 from what is a numeric value to an integer. After verifying that the routine gives the correct results, we can explore the performance of the code. This recursive function is very computationally intensive. When calculating, for example, fib(30), we calculate fib(28) twice [once for each of fib(30 - 1) and fib(30 - 2)] and, similarly, we compute fib(27) multiple times and so on. This repetition is one of the reasons the code is so slow. We’ll compare the time to evaluate fib(30) using three different versions of the fib() function: the original interpreted function, the LLVM -compiled routine (fib.ll) and a version of fib() that is compiled by R’s byte-compiler. The LLVM -compiled routine is the fastest. Table 1 shows the elapsed times for each and Table 1 Timings for computing Fibonacci Sequence Values OS X Interpreted R code Byte-compiled R code Rllvm-compiled code Linux 1 Linux 2 Time Speedup Time Speedup Time Speedup 80.49 31.70 0.12 1.00 2.53 653.90 112.70 45.85 0.21 1.0 2.5 526.4 51.780 21.620 0.097 1.0 2.4 531.0 These are the timings for a call to fib(30) using the regular R function, the byte-compiled version and the LLVM -compiled version. To improve the accuracy of the timings, we calculate the duration for 20 replications for the two slower functions and 200 replications of the LLVM -compiled routine and divided the duration by 10. The LLVM -compiled version is clearly much faster. 6 D. TEMPLE LANG a ratio of the time for each function relative to the time for the interpreted function. These convey the relative speedup factor. We see that on a Macbook Pro, the LLVM -compiled routine is 600 times faster than the R interpreter. On a Linux machine, the speedup is a bit smaller, but still very significant at a factor of 500. While we have attempted to reduce the variability of these timings, we have observed different speedups ranging from 400 to 600 on OS X and 230 to 540 on Linux. The timings we report here are the most recent (rather than the “best”). Again, this is a simple example and not necessarily very representative of how we would calculate the Fibonacci sequence in production code. However, the ability to express an algorithm in its natural mathematical form makes it easier to program, verify and extend. We would very much like to be able to write code in this manner, without sacrificing good run-time performance. 2.2 2-Dimensional Random Walk Ross Ihaka developed a very instructive example of writing straightforward R code compared with clever, highly vectorized R code as a means to illustrate profiling in R and how to make code efficient. The task is simulating a two-dimensional random walk. It is very natural to write this as a loop with N iterations corresponding to the N steps of the walk. For each step, we toss a coin to determine whether we move horizontally or vertically. Given that choice, we toss another coin to determine whether to move left or right, or up or down. Then we calculate and store the new location. We’ll call this the naı̈ve approach and the code is shown in Figure 1. After several refinements based on profiling and nontrivial knowledge of R, Ihaka defines a very efficient R implementation of the random walk, shown in Figure 2. It removes the explicit loop, samples all N steps in one call to sample(), and determines the positions using two calls to the cumsum() function. This makes very good use of several of R’s vectorized functions which are implemented in C code and therefore fast. We manually compiled the naı̈ve implementation using Rllvm and, similarly, used R’s byte-compiler to create two compiled versions of this function. We then simulated a 10 million step random walk using each of the original naı̈ve function, the byte-code compiled function, the fully vectorized version and the LLVM -compiled version. Table 2 shows the relative speedups. We see that the manually vectorized R function is 175 times faster than the naı̈ve rw2d1 = function(n = 100) { xpos = ypos = numeric(n) truefalse = c(TRUE, FALSE) plusminus1 = c(1, -1) for(i in 2:n) { # Decide whether we are moving # horizontally or vertically. if (sample(truefalse, 1)) { xpos[i] = xpos[i-1] + sample(plusminus1, 1) ypos[i] = ypos[i-1] } else { xpos[i] = xpos[i-1] ypos[i] = ypos[i-1] + sample(plusminus1, 1) } } list(x = xpos, y = ypos) } Fig. 1. The naı̈ve implementation of the 2-D random walk. rw2d5 = # Sample from 4 directions, separately. function(n = 100000) { xsteps = c(-1, 1, 0, 0) ysteps = c( 0, 0, -1, 1) dir = sample(1:4, n - 1, replace = TRUE) xpos = c(0, cumsum(xsteps[dir])) ypos = c(0, cumsum(ysteps[dir])) list(x = xpos, y = ypos) } Fig. 2. The fast, vectorized implementation of the 2-D random walk. implementation, illustrating how important vectorization is to make R code efficient. However, we also see that compiling the naı̈ve implementation with LLVM outperforms even the vectorized version, taking about between 55% to 65% of the time of the vectorized version. This is probably due to the compiled code using a single loop, while the vectorized version has two calls to cumsum() and hence at least one additional C -level loop over the N steps. 2.3 Sampling a Text File Suppose we have one or more large comma-separated value (CSV) files. For example, we can download airline traffic delay data for each year as an approximately 650 megabyte CSV file from the Research and Innovative Technology Administration (RITA), 7 ENHANCING R WITH ADVANCED COMPILATION TOOLS AND METHODS Table 2 Timings for simulating a 2-D Random Walk OS X Interpeted R code Byte compiled code Vectorized R code Rllvm-compiled code Time Speedup Time 171.08 123.92 0.97 0.52 1.0 1.4 176.5 329.3 196.6 120.8 1.8 1.1 Linux 1 Speedup 1.0 1.6 106.8 180.3 Linux 2 Time Speedup 100.3 60.51 0.63 0.40 1.0 1.66 159.46 250.12 We generate 10 million steps for each approach. We compare a manually vectorized implementation in R code with a naı̈ve version written in R, both a byte-compiled and LLVM -compiled version of that naı̈ve function. The vectorized version is 175 times faster than the regular R function. However, the LLVM -compiled version outperforms the vectorized version, most likely by removing one C -level loop. part of the Bureau of Transportation, at http:// www.transtats.bts.gov/DL_SelectFields.asp? Table_ID=236. Rather than working with the entire data set, we might choose to take a random sample of the observations. (We don’t concern ourselves here with the appropriateness of a simple random sample.) We’ll also assume that we know the number of observations in the CSV file. How do we efficiently extract a sample of the lines from the file? We could use UNIX shell tools, but it is difficult to randomly generate and specify the lines to sample. Sampling the indices is something we want to do in R, but then passing all of these to a shell command is awkward, at best. Alternatively, we could do the entire sampling in R. We could read the entire file into memory [via the readLines() function] and then subset the ones we want. However, this requires a significant amount of memory. We first store all of the lines, then make a copy of the ones we want and then discard the larger vector. This may not be feasible, as we may not have enough memory, or it may simply be too slow. We can think of different strategies. One is to first identify the indices of all of the lines we want in our sample, and then read the file in chunks until we get to a line that is in our sample. We store that line and continue to read from where we are up to the next line in our sample, and so on. To make this work, we need to be able to continue to read from where we currently are in the file. We can use an R file connection to do this. Our first step is to generate the vector of the line numbers we want to sample using, for example, lineNum = sort(sample(1:N, sampleSize)) where N is the number of lines in the CSV file. We have sorted the line numbers, as we will read the sample lines in the file sequentially. The next step is to determine how many lines there are between successive lines in our sample. We can compute this in R with lineSkips = diff(c(0, lineNum)) which gives a vector of the pairwise difference between successive elements. For example, suppose the first two lines we want to sample are 60 and 200. The first two elements in lineSkips will be 60 and 140. We can then read the first two lines in our sample with con = file("2012.csv", "r") readLines(con, 60)[60] readLines(con, 140)[140] Each element of lineSkips tells us how many lines to read to get the next line in our sample. So next we need a function that can read that many lines and return the last of these. The following function does this: readTo = function(numLines, con) readLines(con, numLines)[numLines] The final step to obtaining our entire sample is to call readTo() for each element of lineSkips, for example, readSelectedLines = function(lineSkip, file) sapply(lineSkip, readTo, file) To obtain our sample, we call readSelectedLines(), passing it the variable lineSkips and our open connection: con = file("2012.csv", "r") sample = readSelectedLines(lineSkips, con) 8 D. TEMPLE LANG Each of these functions is concise and efficient since sapply() is essentially implemented as a C -level loop within the R interpreter. Using the connection and readLines() to read blocks of lines in readTo() is efficient as it uses C code within R. Unfortunately, it does involve reading, allocating, storing, subsetting and discarding a potentially large character vector returned by each call to readLines(). However, we only want a single line at the end of that vector in each call. While each call involves significantly fewer lines than reading the entire file, allocating a large character vector still slows the computations, as it extensively involves the memory manager in R. A different approach to avoid the memory issue is to change the readTo() function so that it reads each line individually and then returns the last one. We could change it to readTo = function(numLines, con) { ans = "" for(i in 1:numLines) ans = readLines(con, 1) ans } Again, this is straightforward and easy to understand. Unfortunately, it is extremely slow as we are now looping in R over almost every line in the file. The idea of reading one line at a time would work well if we could avoid the overhead of the R loop mechanism. We can do this if we compile this new version of readTo() into native code. We can almost do this now, but we need to have an equivalent of readLines() to read a single line of a file. This is exactly what the standard C routine fgets() does. Similar to a connection, we pass fgets() a pointer to an opaque C -level FILE data structure, and it puts the contents of the next line it reads into a location in memory that we also provide. For simplicity of exposition, we will define our own function Fgets() in R as a proxy to call fgets() with Fgets = function(file) fgets(ptr, 1000L, file) This is R code and it just assumes there is a function named fgets() and that ptr is somehow (the address of) an array in memory with 1000 character elements, that is, space for a long string. We won’t run this code in R, so these variables [ptr, file and fgets()] don’t actually have to exist in R. Instead, we will allocate them in LLVM for the compiled, native routine we generate from Fgets(). We compile the Fgets() function in an LLVM module, a collection of routines and variables, using compileFunction(). We also define the module-level “global” variable ptr to be the pointer to the array we want, after creating the actual array of 1000 characters as another global variable. When compiling Fgets(), we also need to tell the compiler about the signature of the external fgets() routine so that it can make the call to fgets() correctly. We do this via mod = Module() FILEType = pointerType(Int32Type) declareFunction(list(StringType, StringType, Int32Type, FILEType), "fgets", mod) [While we have done this explicitly, we could automate this step using the RCIndex (Temple Lang (2010a)) package to obtain the signature programmatically.] We also need to tell the LLVM run-time engine how to locate the fgets() routine which we do with llvmAddSymbol("fgets") Note that in our Fgets() function, we assumed that the longest line was less than 1000 characters. We can specify a different length if we knew or suspected otherwise. Similarly, we didn’t provide any error checking about whether we had reached the end of the file. This is because we are assuming that the caller knows the total number of lines and is sampling only up to, at most, that number. This is an example of the context-specific shortcuts we can make when compiling the code for a particular situation and not writing general, robust code which can be used in many different situations. We could also tell the compiler to add these tests for us, if we wanted, but can avoid the extra computations when we know they are redundant. How do we obtain the instance of the FILE data type to pass to the compiled Fgets() routine? We can use the C routine fopen() and again, we can write an R function that mimics that and then compile it. However, the RLLVMCompiler package has a function to automate the creation of that proxy function in R, if we know the signature of the C routine of interest. So this example illustrates how we can dynamically create bindings to existing compiled routines in different libraries. In the case of FILE, we 9 ENHANCING R WITH ADVANCED COMPILATION TOOLS AND METHODS Table 3 Timings for sampling a CSV file OS X Interpreted R loop & readLines() Rllvm-compiled loop & Fgets() C code (FastCSVSample) Time Speedup Time 68.93 3.278 3.0 1.0 21.09 22.97 103.25 6.54 6.28 Linux 1 Speedup 1.0 15.8 16.4 Time 42.78 2.59 2.40 Linux 2 Speedup 1.0 16.5 17.8 We use vectorized code in R to read blocks of data and extract the final line of each block. The LLVM approach compiles simple R functions that read one line at a time. The FastCSVSample does the same thing with manually written C code. The compiled approaches avoid the memory usage related to readLines() and see a nontrivial speedup. The C -code in the FastCSVSample package outperforms the LLVM -compiled version, but both approaches outperform the approach using R’s connections and readLines() functionality which are also implemented with C code. can also use the existing function CFILE() in the RCurl (Temple Lang (2002)) package. So now we can read a single line from an open FILE object in R via our compiled Fgets() routine. We can redefine our readTo() function as readTo = function(numLines, con) { ans = "" for(i in 1:numLines) ans = Fgets(con) ans } This is almost identical to the original function above but replaces the call readLines(con, 1) with Fgets(con). Now we can compile this into native code via compileFunction() and the resulting code will be quite fast. We now have a fast replacement for reading up to the next line in our sample. The last step is to make readSelectedLines() fast. Recall that this was implemented simply as sapply(lineSkip, readTo, file). When we compile this as returning an R character vector, our compiler recognizes the sapply() call and converts this into a loop in native code and populates and returns a new R character vector. In summary, we have compiled three R functions [Fgets(), readTo() and readSelectedLines()] and these now allow us to read one line at a time and use the minimal amount of memory to collect the lines for our sample, but using two loops in native code rather than in R. We can now compare the performance of our R-based approach using readLines() to consume chunks of lines and our compiled version that reads one line at a time. In addition to these two approaches, we also have a manual C implementation essentially equivalent to our LLVM -compiled approach in the FastCSVSample package (Temple Lang (2013)). Our timings are based on extracting a sample of one hundred thousand lines uniformly from a CSV file that contains one hundred million lines—the same lines for each approach. The elapsed times are given in Table 3. We see that our compiled approach of reading one line at a time is around twenty times faster than collecting many unnecessary lines with readLines() and looping in R, even with sapply(). The difference between the LLVM and native C approaches may be inherent, but also possibly due to different optimization techniques that we may be able to enhance with LLVM. In short, we can outperform R’s native vectorized code by compiling our relatively straightforward R code. The exposition of this example may make it seem more complicated than it is. Essentially, we want to efficiently read one line of a file at a time in order to get to the next line in our sample. We compiled the Fgets() function for this and then compiled two other functions in R to perform loops over the number of lines. The important implications from this example is that we can sidestep R’s memory management, get fine-grained control over computations using dynamically generated routines, and we can use existing native routines and data structures, such as fgets() and FILE, in our R code that will be compiled. We could already dynamically call native routines directly from R using, for example, rdyncall (Adler (2012)) or Rffi (Temple Lang (2011)). What is important here is that we are also compiling the iterations and not doing them in R. 10 D. TEMPLE LANG 2.4 Fusing Loops Consider computing the log-likelihood for a given vector of observations x and a density function, say, dnorm(). In R, we can write the log-likelihood very efficiently as sum(log(dnorm(x, mu, sigma))) Indeed, we could reduce this to sum(dnorm(x, mu, sigma, log = TRUE)), but the purpose of this example is to consider a general sequence of calls to vectorized R functions. Each of the functions dnorm(), log() and sum() are built-in to R and are implemented in C code, and two of them use the very efficient .Primitive() mechanism. As a result, this code seems to be as fast as it can be. This is true given the way R interprets the expression, one sub-expression at a time. However, there are two ways we can make this more efficient by compiling such an expression. The first is by reducing the number of loops (in C ) from three to one. Generally, if we have n nested-calls to element-wise and vectorized functions, we can reduce n loops to one. Second, we can typically eliminate at least one allocation of a potentially large vector. A third way we might speed up the computations is to use parallel capabilities such as a GPU or multiple cores or CPUs. We won’t discuss this here, but it is conceptually quite straightforward to do generally when we are compiling the code dynamically. Indeed, the ability to programmatically combine a particular function with a general parallel strategy makes it more expedient than writing it ourselves in C /C ++. How does R evaluate the expression above? It uses three separate loops. Ignoring pedantic details, essentially R evaluates the call to dnorm() and so loops over all of the elements of x and computes the density at each of those values. It stores these values in a newly allocated vector and then returns that. This becomes the input to the call to log(). R then iterates over the elements of this vector and computes the log() for each individual value. In this case, R may recognize that it doesn’t need to create a new vector in which to return the results, but that it can reuse the input vector since it is essentially anonymous. The final step in the overall expression is the call to sum() and this iterates over the elements of the vector it receives and returns a single scalar value. Importantly, there are three loops over three vectors all of the same length, and we allocate one new and large vector. We could use a single loop and avoid allocating this intermediate vector by rewriting the code as normalLogLik = function(x, mu = 0, sigma = 1) { ans = 0 for(val in x) ans = ans + log(dnorm(val, mu, sigma)) ans } Instead of the vectorized calls in R, we have put scalar function calls inside a single loop. We have combined the calls to dnorm() and log() together. Then we took the result for each element and added it to the cumulative sum. This combination of operations is called loop fusion and for large vectors can yield significant performance improvements. This new scalar version is faster by avoiding the loop and allocation. Of course, it is evaluated in R and so will be much slower. We could write this in C, but it would be very specific to the log-likelihood for a Normal density. Generally, we would have to write implementations for various sequences of calls, for example, for different density functions [i.e., sum(log(pdf(x, ...)))], and expressions involving other functions [e.g., prod(dchisq(x^2, p))]. This isn’t practical. However, given our ability to dynamically generate native code, we can compile any expression such as our original expression sum(log(dnorm(x, mu, sigma))) into the native equivalent of our scalar code above. To compile the normalLogLik() function above, we need to be able to call scalar versions of the log() and dnorm() routines. The log() function is available in the ubiquitous math library (libm) and we can just refer to it. The Normal density function is not standard. We can arrange for our native code to invoke R’s dnorm() function for each scalar value in the vector. This is both awkward and inefficient. Instead, we can write our own version of dnorm() directly in R. While this would be slow to invoke many times in R, we will compile our dnorm() and normalLogLik() functions together into a single module and both will be fast. Another possible approach, in this case, is to take advantage of the good design and modularity of the Rmath library. It provides the routine dnorm4() as a regular native routine (unconnected with R’s data types, etc.) and so we can invoke it, just as we do the log() routine. For reasons that are not quite clear at present, on the OS X machine, our loop-fused version takes ENHANCING R WITH ADVANCED COMPILATION TOOLS AND METHODS 11 Table 4 Times and relative performance for fusing loops OS X Linux 1 Linux 2 Rllvm-compiled fused loops Interpreted R vectorized functions 0.73 0.52 1.69 2.28 0.84 1.07 Regular R time/Rllvm time 0.71 1.35 1.27 The first two rows show the times for fusing the loops by compiling the R with LLVM and using a sequence of calls to R’s vectorized functions. The final row shows the ratio of the two times within each machine. Fusing the loops is slower on OS X, but faster on Linux. about 40% longer than the R code for 10 million observations and 27% longer for 100 million observations. Again, we suspect that we will be able to improve the LLVM -compiled code by exploring more of its optimization facilities. However, on the Linux machines, we do see a speedup, even for 10 million observations where the LLVM loop-fused code runs in about 75% the time of the R code. The timings and relative performances are given in Table 4. Regardless of the exact numbers, the results indicate that compiling our own code is competitive with manually writing vectorized routines in R, and that we can outperform these built-in C routines. A difference between the two approaches is that R uses the .Primitive() mechanism rather than a standard function call which we have to do via the .llvm() function. However, not only do we reduce three loops to one, but we also avoid dealing with missing values (NAs) and additional parameters such as base for the log() function. So we should be doing even better. If we have access to multiple cores or GPUs, we may be able to execute this code much more efficiently simply via parallel execution. By fusing the loops operations together, we can also avoid three separate transitions from the host to the GPU and transferring memory between the two systems more times than we need. We explicitly wrote the normalLogLik() function to show how to fuse the loops. We could also have written the original expression sum(log(dnorm(x, mu, sigma))) as Reduce(‘+‘, Map(log, Map(dnorm, x, MoreArgs = list(mu, sigma)))) By explicitly using these functional programming concepts, it is easy for us to see how to fuse loops and rewrite the code into the loop above. The RLLVMCompile package can recognize such an expression and compile it to the loop-fused instructions. We can either require R programmers to do this in order to gain the performance from native code or we can try to make the compiler recognize the vectorized nested function call idiom of the form f(g(h(x))). 2.5 Computing Distances between Observations Distances between pairs of observations are important in common statistical techniques such as clustering, multi-dimensional scaling, support vector machines and many methods that use the “kernel trick” (Schölkopf and Smola (2001)). R provides the dist() function that allows us to compute the distance between all pairs of observations in a matrix or data frame, using any of six different metrics. The core computations are implemented in C and are fast. However, there are some issues and rigidities. The dist() function insists that the data passed to the C code are represented as a matrix, and so will make a copy of the data if a data frame is given by the caller. For large data sets, this can be a significant issue as we will essentially have two copies of the data in memory. Also, the dist() function only accepts a single data set and computes the distances between all pairs of observations within it. In contrast, a reasonably common situation is that we start with two separate data sets—X and Y—and want to compute the distance between each observation in X and each observation in Y, but not the distances between pairs of observations within X or within Y. Not only do we risk having three copies of the data in memory (the two separate data frames, the two combined into one data frame and then converted to a matrix), but the dist() function will also perform many unnecessary computations for these within-same-set observations that we will discard. If we have two data sets with n1 and n2 observations, respectively, the dist() function computes (n1 + n2) × (n1 + n2 − 1)/2 distances. We are only 12 D. TEMPLE LANG interested in n1 × n2 of these. As n1 and n2 diverge, the number of unnecessary computations increases, and this is especially burdensome if the number of variables for each observation is large. Another rigidity is that the choice of distance metric is fixed. If we wanted to introduce a new distance metric, it would be useful to be able to reuse the C code underlying dist(). We could do this with a function pointer in C, but the code for dist() would need to be modified to support this. Accordingly, if we want to introduce a new metric, we have to copy or re-implement the entire C code. The C code underlying dist() can use parallel capabilities (OpenMP) if they are detected when R is compiled. We cannot use GPUs or change the parallel strategy within an R session without rewriting the C code. As a result, we would like to be able to express the computations in R and select a different strategy for parallelizing the computations at run-time. In short, as useful as dist() is, we would like it to be much more flexible. We want to be able to compute the distances between two sets of observations, not within a single data set; use a data frame or a matrix or perhaps some other data representation without making a copy of the data; introduce new metrics within the same infrastructure; and use different parallel computing approaches. The current dist() function in R cannot help us meet these goals and is essentially static/fixed code. The package pdist (Wong (2013)) provides a way to compute pairwise distances between two data sets. This avoids the redundant computations. Unfortunately, it only supports the Euclidean metric and also insists on matrices being passed to the C code. Also, it has no support for parallel computing. If we could write the basics of the dist() function in R and make it fast, we could address all of the enhancements we listed above as well as make the code more comprehensible and accessible to users. The basic approach to computing the distance between each pair of observations in two data sets X and Y can be expressed in R with the following quite specific/rigid function (written to aid compiling): dist = function(X, Y, nx = nrow(X), ny = nrow(Y), p = ncol(X)) { ans = numeric(nx * ny) ctr = 1L for(i in 1:nx) { for(j in 1:ny) { total = 0.0 posX = i posY = j for(k in 1:p) { total = total + (X[posX] - Y[posY])^2 posX = posX + nx posY = posY + ny } ans[ctr] = sqrt(total) ctr = ctr + 1L } } ans } The basic steps are to loop over each observation in the first data set (X) and then to loop over each observation in the other data set (Y). For each pair of observations, we compute the distance between them via the third nested loop. We could have made this simpler (and more general) by using a vectorized R expression or calling a function to do this final loop. However, we have inlined the computations directly for a reason. Suppose we had written this part of the computation as (X[i,] - Y[j,])^2. Unfortunately, in R, this would cause us to create two new intermediate vectors, one for each of the specific rows in the two data sets. This is because the row of each data set is not a simple vector containing the elements of interest which we can pass to the subtraction function (-). Instead, we have to arrange the data in each row of the matrix or data frame into a new vector of contiguous values. This is where R is convenient, but inefficient. This does not happen in the C code for R’s builtin dist() routine, or ours, as it uses matrices and knows how to access the elements individually rather than creating a new temporary vector. We use this same approach in our loop. We also could allocate the vectors for the row values just once and reuse them for each observation, but we still have to populate them for each different observation. To avoid the intermediate vectors, our code explicitly accesses the individual elements X[i, k] and Y[j, k] directly. A matrix in R is merely a vector with the elements of the matrix arranged sequentially in column order. Therefore, the first element of observation i in X is at position i in the vector. 13 ENHANCING R WITH ADVANCED COMPILATION TOOLS AND METHODS Table 5 Timings for computing pair-wise distances Rllvm-compiled code R dist() function (calling native code) Speedup factor OS X Linux 1 Linux 2 8.72 14.74 11.94 79.65 6.22 27.37 1.69 6.67 4.4 This shows the total elapsed time for distance computations with 40 variables and 8000 and 1000 observations in the two data sets. In the R approach with the dist() function, there is extra memory allocation and also 80% of the distances computed are discarded. We outperform the native R implementation on both platforms. The second element of the ith observation is at position i + nrow(X), and so on. To compute the distance between the two observations, we loop over the p variables present in each of the observations and compute the difference. The code illustrates these computations for the Euclidean distance. We could easily change this to implement other distance metrics. We could do this by changing the code either manually or programmatically by replacing the expression (X[posX]Y[posY])^2 with, for example, abs(X[posX] Y[posY]). Rewriting code programmatically is a powerful feature that allows us treat R code as a template. We can compile this three-level nested loop R code via RLLVMCompile to native instructions. Our compiler currently works primarily with primitive data types and has limited support for working directly with R objects, for example, knowing the dimensions of an R matrix. Accordingly, we arrange to pass the matrices and their dimensions to the routine and currently have to explicitly specify the signature: distc = compileFunction(dist, REALSXPType, list(X = DoublePtrType, Y = DoublePtrType, nx = Int32Type, ny = Int32Type, p = Int32Type)) In the future, we will allow the caller to specify just the two data sets (X and Y). However, we are making the representation as matrices more explicit here, which is valuable information for the compiler. Now that we have the native code, we can then compare this to using R code that computes the same distances but does so by combining the two data sets, calls dist(), and converts the result to the sub-matrix of interest. This comparison favors our code since this is the form of our inputs and the expected form of the output. However, these are quite reasonable. We timed the functions to compute the distances for two data sets of size 8000 and 1000 observations, each with 40 variables. In this case, 80% of the distances computed using R’s dist() function are irrelevant and discarded. Table 5 shows the results and illustrates that by doing fewer computations, we do indeed outperform the native C code in R, on both platforms. If we had used data sets with similar numbers of observations, the results would have been less dramatic. However, with 3000 observations in Y, the LLVM -generated native code was still three times faster on Linux and only 18% slower on OS X. Comparing the results above to similar native code in the pdist package, the timings again show that native C code in pdist outperforms our LLVM compiled code, 60% faster on one machine and 9 times faster on another. This illustrates that there is room for significant improvement in our LLVM compilation. However, the fact that we can outperform R’s native approach is encouraging. That we can readily adapt this to different purposes and different computational strategies indicates significant opportunities and potential. As a final note, we could remove the third loop and insert a call to a function to compute the distance for these two variables, for example, euclidean(X[i,], Y[j,]). The compiler could recognize that X and Y are matrices and arrange for the compiled version of the euclidean() function to access the elements as we have displayed above, that is, without computing the intermediate vector for each row. If we tell the compiler X and/or Y are data frames, it would generate different code to access the elements so as to avoid these intermediate vectors. Since the compiler 14 D. TEMPLE LANG has the opportunity to compile both the code for the main loop and for the metric function together and knows the representations of the inputs, it can create better code than if we wrote these separately and more rigidly. 3. POSSIBLE COMPILATION ENHANCEMENT STRATEGIES The examples in the previous section explored different ways we could change the way we compute in R with new facilities for generating native code. We considered compiling R code to native routines, reusing existing native routines within these generated routines, and changing the computational strategies we employ within R to embrace these new approaches. There are many other simple examples we could consider to improve the performance of R code. One is the ability to write functions that focus on scalar operations and then to create vectorized versions of these automatically. Given a scalar function f(), we can write a vectorized version as sapply(x, f, ...) or with mapply(). The compiler can then turn this into a native loop. Indeed, many of the performance gains are achieved by making looping faster. They also potentially reduce the necessity to use vectorized code in R and so hopefully make programming in R more intuitive for new users. In addition to handling loops, there are several other aspects of R’s evaluation model that we might be able to improve by choosing different compilation strategies in different contexts. The idea is that the R user compiling the code may have more information about the computations, the data and its representation, or the available computing resources than the compiler does by examining the code. This extra information is important. The programmer may be able to give hints to a compiler, or choose a different compiler function/implementation altogether, to control how the code is understood and the native instructions are generated. The following are some reasonably obvious and general improvements we might be able to infer or make in certain situations. Guided by the R user, different compilers may yield different code, and even different semantics, for the same code. 3.1 Omitting Checks for NA Values Many of the C routines in R loop over the elements of a vector and must check each element to see if it is a missing value (NA). This code is general purpose code and so this test is a fixed part of almost every computation involving that routine. However, when we dynamically generate the code, we may know that there are no missing values in the data set on which we will run that code and so omit the code to perform these additional, redundant tests. Similarly, in our example of sampling a CSV file, we knew the number of lines in a file and we knew that each call to the fgets() routine would succeed. As a result, we did not have to check the return status of the call for reading at the end of the file. We also assumed that the largest line was less than 1000 characters and didn’t validate this in each iteration. The same applies when we are accessing elements of a vector as to whether we first need to check that the index is within the extent of the array or not, that is, bounds checking. When we can verify this conceptually (within a loop over a vector), or by declaration by the user, we can omit these checks. These tests are typically simple and not computationally expensive. However, they can become significant when the instructions are invoked very often, for example, in a loop over elements of a large vector. 3.2 Memory Allocation In our example discussing loop fusion, we saw that not only could we reduce the number of overall iterations in a computation, but we also could reduce memory usage. We avoided creating a vector for the result of the call to dnorm() [and log()]. There are potential opportunities to further reduce memory usage. R uses the concept of pass-by-value in calls to functions. In theory, R makes a copy of each argument in a call to a function. (Lazy evaluation means that some arguments are never evaluated and so not copied.) However, the R interpreter is smarter than this and only copies the object when it is modified, and only if it is not part of another object. When compiling R code, we want to be able to determine that an object is not modified and avoid copying it. By analyzing code, we can detect whether parameters can be considered read-only and so reduce memory consumption in cases where R cannot verify that it is safe to avoid copying an object. We can identify this within regular R code, however, we would have to modify the interpreter to make use of this information. When generating native code ENHANCING R WITH ADVANCED COMPILATION TOOLS AND METHODS with, for example, compileFunction(), we can make use of this information dynamically, bypassing the R interpreter. Another example where we can reduce the memory footprint of code is when we can reuse the same memory from a different computation. For example, consider a simple bootstrap computation something like the following R pseudo-code: for(i in 1:B) { d.star = data[sample(1:n, n, replace = TRUE), ] ans[[i]] = T(d.star, ...) } In R’s computational model, we will allocate a new data frame d.star for each bootstrap sample. This is unnecessary. We can reuse the same memory for each sample, as each sample has the same structure and only differs in the values in each cell. By analyzing the sequence of commands rather than executing each one separately without knowledege of the others, we can take advantage of this opportunity to reuse the memory. We can also reuse the same vector to store the result of the repeated calls to sample(). It is reasonably clear that this is what we would do if we wrote this code in C, reusing the same data structure instances. However, this is not possible within R, as the individual computations are not as connected as they are in the large-picture C code. When we dynamically generate native code, we can utilize this large-scale information. Similarly, some R scripts create a large object, perform several computations on it and then move to other tasks. Code analysis can allow us to identify that the object is no longer being used and so we can insert calls to remove the object. However, we may be able to recognize that the object is no longer needed, but that subsequent tasks can reuse the same data format and representation. In that case, we can reuse the memory or at least parts of it. 3.3 Data Representations The small number of fundamental data types in R makes computational reasoning quite simple, both to use and to implement. Of course, the choice of data type and structure can be important for many computations. Sequences, for example, 1:n or seq(along = x), are common in R code and these are represented in R as explicit vectors containing all of the values in the sequence. We have seen that 15 we can avoid creating the sequence vector and populating it when it is used as a loop counter. Similarly, we can represent a regular sequence with the start, end and stride, that is, the increment between elements. When generating the code, we then access elements of such a sequence using appropriate calculations specialized to that sequence type. In many cases, R’s simple data types cause us to use an integer when we only need a byte, or even just a few bits, to represent a few possible values/states. The snpStats (Clayton (2011)) package does this successfully using bytes to reduce the memory footprint for large genomic data. Again, the operations to subset data in this different format need to be modified from the default. Doing this element-wise in R is excessively slow. However, when we generate native code, we are free to use different ways to access the individual elements. This idea is important. We specify what to do in the code, but not precisely how to do it. When generating the code, we combine the code and information about how to represent the data and generate different code strategies and realizations. This is somewhat similar to template functions in C ++, but more dynamic due to runtime compilation/generation with more contextual information. There are several other aspects of R code that we can compile, for example, matching named arguments at compile time rather than at run time. 4. OVERVIEW OF GENERATING CODE WITH LLVM In this section we will briefly describe the basic ideas of how we generate code with LLVM, Rllvm and RLLVMCompile. This is a little more technical and low level than our examples and readers do not need to understand this material to understand the main ideas of this paper or to use the compiler or the compiled code. We are describing it here to illustrate how other R programmers can readily experiment with these tools to generate code in different ways. We’ll use the Fibonacci sequence and the fib() function example again, as it illustrates a few different aspects of generating code. Our fib() function in R expects an integer value and returns an integer. The body consists of a single if–else expression. This contains a condition to test and two blocks of code, one of which will be evaluated depending on the outcome of that condition. To map this code to LLVM concepts, we need to create 16 D. TEMPLE LANG ; ModuleID = ’fib’ define i32 @fib(i32 %n) { entry: %0 = icmp slt i32 %n, 2 br i1 %0, label %"body.n < 2L", label %body.last "body.n < 2L": ret i32 %n ; preds = %entry body.last: ; preds = %entry %"n - 1L" = sub i32 %n, 1 %1 = call i32 @fib(i32 %"n - 1L") %"n - 2L" = sub i32 %n, 2 %2 = call i32 @fib(i32 %"n - 2L") %"fib(n - 1L) + fib(n - 2L)" = add i32 %1, %2 ret i32 %"fib(n - 1L) + fib(n - 2L)" } Fig. 3. Intermediate Representation for the compiled fib() routine. We create the Function and Block objects and create and insert LLVM instruction objects corresponding to the expressions and sub-expressions in the R function. The result is this low-level description in intermediate form which LLVM can optimize and compile to native code for different targets, for example, a CPU or GPU. The different blocks have a label (e.g., body.last) and correspond to different parts of an if statement or possibly parts of a loop, generally. different instruction blocks, each of which contains one or more instructions. When we call the routine, the evaluation starts in the first instruction block and executes each of its instructions sequentially. The end of each instruction block has a terminator which identifies the next block to which to jump, or returns from the routine. Jumping between blocks allows us to implement conditional branching, loops, etc. For our fib() function, we start with an entry block that might create any local variables for the computations. In our function, this block simply contains code to evaluate the condition n < 2 and, depending on the value of this test, the instruction to branch to one of two other blocks corresponding to the expressions in the if and the else parts. In the if block (i.e., n is less than 2), we add a single instruction to return the value of the variable n. In the block corresponding to the else part, we add several lowlevel instructions. We start by computing n - 1L and then call fib() with that value and store the result in a local variable. Then we calculate n - 2L, call fib() and store that result. Then we add these two local intermediate results and store the result. Finally we return that result. Figure 3 shows the code in what is called Intermediate Representation (IR) form that LLVM uses. This illustrates the lowlevel computations. While the code for this function is reasonably simple, there are many details involved in generating the native code, such as defining the routine and its parameters, creating the instruction blocks, loading and storing values, and creating instructions to perform subtraction, call the fib() function and return a value. The LLVM C ++ API (Application Programming Interface) provides numerous classes and methods that allow us to create instances of these conceptual items such as Functions, Block s, many different types of instructions and so on. The Rllvm package provides an R interface to these C ++ classes and methods and allows us to create and manipulate these objects directly within R. For example, the following code shows how we can define the function, the entry instruction block and generate the call fib(n - 1): mod = Module() f = Function("fib", Int32Type, list(n = Int32Type), mod) start = Block(f) ir = IRBuilder(start) parms = getParameters(f) n.minus.1 = binOp(ir, Sub, parms$n, createConstant(ir, 1L)) createCall(ir, f, n.minus.1) We don’t want to write this code manually ourselves in R, although Rllvm enables us to do so. Instead, we want to programmatically transform the R code in the fib() function to create the LLVM objects. The RLLVMCompile package does this. Since R functions are regular R objects which we can query and manipulate directly in R, we can traverse the expressions in the body of a function, analyze each one and perform a simple-minded translation from R concepts to LLVM concepts. This is the basic way the compileFunction() generates the code, using customizable handler functions for the different types of expressions. These recognize calls to functions, accessing global variables, arithmetic operations, if statements, loops and so on. They use the functions in Rllvm to create the corresponding LLVM objects and instructions. Once the compiler has finished defining the instructions for our routine, LLVM has a description of what we want to do in the form of these blocks and instructions. This description is in this intermediate representation (IR). We can look at this “code” and it will look something similar to that ENHANCING R WITH ADVANCED COMPILATION TOOLS AND METHODS shown in Figure 3. The IR code shows the somewhat low-level details of the blocks and instructions as we described above. We see the three blocks labeled entry, body.n < 2L and body.last. Again, it is not important to understand these details to be able to use the compiled routine translated from the R function. I show it here to illustrate the different steps in the compilation process and to indicate that an R programmer can chose to change any of these steps. Next, we instruct LLVM to verify and optimize the code. At this point, we can call the new routine via the .llvm() function in Rllvm which corresponds to a method in the LLVM API. The first time the code is used, LLVM generates the native code from the IR form. 17 enhancements and patches with enthusiasm. Therefore, this approach tends to be the work of one person and so has limited resources. Ra JIT Compiler : The Ra extension to R and the associated jit package is another approach to using JIT (Just-in-Time) compilation in R. This focuses on compiling loops and arithmetic expressions in loops. Like the byte-code compiler above, Ra requires almost no change to existing R code by R users—only the call to the function jit() before evaluating the code. The performance gain on some problems can be apparently as high as a factor of 27. (See http://www.milbo.users.sonic.net/ ra/times9.html.) Unfortunately, this is no longer maintained on CRAN, the primary central repository of R packages. This approach suffers from the fact that it requires a modified version of the R in5. CONTRASTS WITH RELATED RESEARCH terpreter, again compiled from the C -level source. There have been several projects exploring how This places a burden on the author of Ra to continto improve the performance of R code. We discuss ually update Ra as R itself changes. Also, it requires users trust Ra and take the time to build the relesome of these in this section. Byte-Compiler : One of the most visible projects is vant binary installations of Ra. As we mentioned previously, important motivatthe byte-code compiler developed by Luke Tierney ing goals in our work are to avoid modifying R it(Tierney (2001)). This consists of an R package that provides the compiler and some support in the core self, to allow other people to build on and adapt R interpreter to execute the resulting byte-compiled our tools, and to directly leverage the ongoing work code. The compiler maps the R code to instructions of domain experts in compiler technology by intein the same spirit as LLVM ’s instructions and in- grating their tools to perform the compilation. Our termediate representation. These instructions are at approach differs from both the byte-compiler and a higher-level than LLVM ’s and are more specific Ra in these respects. R on the Java Virtual Machine: There are several to R. The typical speedup provided by the byte-compiler projects working on developing an implementation is a factor of between 2 and 5, with much larger of R using the Java programming language and virspeedups on some problems. This may not be suf- tual machine. One is FastR (https://github.com/ ficient to obviate the need for writing code in allr/fastr), which is being developed by a collabC /C ++. We probably need to see a factor of more oration between researchers at Purdue, Oracle and INRIA. Another is Renjin (https://code.google. than 10 and closer to 100 for common tasks. The byte-code compiler is written in R and so com/p/renjin/). Having R run on the Java virtual others can adapt and extend it. However, the de- machine offers several benefits. There are many intails of how the resulting byte-code it generates is teresting large-data projects implemented in Java, evaluated is tightly embedded in the C -language im- for example, Apache’s Hadoop and Mahout. Inteplementation of the R engine. This means that if one grating R code and such projects and their funcwants to change the byte-code interpreter, one has tionality would be much tighter and effective if they to modify the R interpreter itself. While one can do are all on the same platform and share the same this with a private version of R, one cannot make computational engine. Importantly, R would benethese changes available to others without them also fit from passively acquiring features in Java and its compiling a modified version of R. In other words, libraries, for example, security, threads. One very the byte-code interpreter is not extensible at run- interesting development is that researchers in Oratime or by regular R users. Furthermore, the R core cle, collaborating with the developers of FastR, are development team does not always greet suggested creating a tool Graal (http://openjdk.java.net/ 18 D. TEMPLE LANG projects/graal/) for compiling the code ordinarily interpreted by a high-level virtual machine, for example, FastR. This could yield the performance gains we seek, but by passively leveraging the general work of others merely by using widespread technologies. This contrasts with the ongoing development of R by a relatively small community and having to actively and manually import new technologies, features and ideas from other languages, systems and communities. Translating R code to C : Another approach is to translate R code to C /C ++ code. This is attractive, as it would give us similar speedup as we can get with LLVM, potentially produces human-readable code, and allows us to leverage the standard tools for these languages such as compilers, linkers and, importantly, debuggers. We can also potentially reuse (some of) the generated code outside of R. Simon Urbanek’s r2c package (Urbanek (2007)) is an example of exploring translation of R code to C code. The Rcpp (Eddelbuettel and François (2011)) (and inline) package are widely used in R to improve performance. The packages provide a way to include high-level C ++ code within R code and to compile and call it within the R code. The C ++ code uses an R-like syntax to make it relatively easier to write the C ++ code. This has been a valuable addition to R to obtain performant code. The approaches that compile R code directly are preferable if they can get the same performance. The first reason is because the programmer does not have to program in C ++. It is also harder for other programmers to read the code and understand what it does. The second reason is because the C ++ code is essentially opaque to any R code analysis or compiler. If we do manage to generally compile R code effectively or implement an automated parallel computing strategy for R code, the C ++ code cannot easily be part of this. For example, if we can map the R code to run as a GPU kernel on many cores, we cannot easily combine the R and C ++ code to take advantage of these cores. Parallel Speedup: There are several interesting projects that have aimed at improving the performance of R exclusively by running the code in parallel. This is very important and in some sense orthogonal to compilation of R code. If we speed up the computations on a single CPU, that speedup will benefit running code on each CPU. However, we also want to compile R code to take advantage of multiple CPU/GPUs. We hope to be able to in- tegrate ideas from these projects into our compilation strategies. Unfortunately, some of them are no longer active projects, for example, pR and taskPR. This illustrates one aspect we have observed in the R community. Some researchers implement some ideas in R, sometimes as a PhD thesis, and then move on to other projects. One of the terrific aspects of R is the ongoing commitment to support the R community. This is probably a very significant reason for R’s widespread use and an important consideration when developing new environments and languages. It is one of the forces motivating our continued work within R, even if developing a new system would be intellectually more stimulating. A very important aspect of all this work is to recognize that there are many positive ways to make R faster and more efficient. While one of these approaches may dominate others in the future, it is very important that we should pursue comparative approaches and continue to motivate each other’s work. There is much to be learned from these different approaches that will improve the others. 6. FUTURE WORK Compiling (subsets of) R code and other Domain Specific Languages (DSLs) within R using LLVM is a promising approach that is certainly worth vigorously pursuing in the near term. The work is currently in its infancy—we started it in the summer of 2010, but have only recently returned to it after an almost three-year hiatus due to other projects (ours and other people’s). However, the foundations of many of the important components are in place, that is, the Rllvm package, and the basics of the extensible and adaptable compiler mechanism in RLLVMCompile should allow us and others to make relatively quick progress, programming almost entirely in R to develop compilation strategies. However, there are many other tasks to do to make these transparent and reliable, and many related projects that will make them more powerful and convenient. One of the immediate tasks we will undertake is to program some rich examples explicitly in R code. We are implementing R code versions of recursive partitioning trees, random forests and boosting. We also plan to explore compiling code for the Expectation Maximization (EM) algorithm and particle filters to run on GPUs. The aim is to share these sample R projects with the other researchers investigating different compilation strategies for R so that we compare approaches on substantive and real tasks we want to program in pure R code. ENHANCING R WITH ADVANCED COMPILATION TOOLS AND METHODS We plan to add some of the functionality available in LLVM that does not yet have bindings in Rllvm. This includes topics such as different optimization passes and adding meta data to the instructions. We have also developed the initial infrastructure to compile R code as kernel routines that can be used on GPUs, that is, PTX (Parallel Thread Execution) code. Being able to generate kernel functions from R code, along with the existing R-CUDA bindings to manage memory and launch kernels from the host device, allows us to program GPUs directly within high-level R code. This contrasts with the low-level C code developed for existing R packages that target GPUs, for example, gputools (Buckner et al. (2009)) and rgpu (Kempenaar and Dijkstra (2010)). We will also be exploring different approaches to compiling the R code to run in parallel and distributed settings. We think that being able to use information about the distribution of the data to generate/compile the code will be important so that we can minimize the movement of data and keep the CPUs/GPUs busy on the actual computations rather than transferring the inputs and outputs to and from the computations. Being able to write R code that directly calls C routines is very powerful. As we saw in relation to the fgets() routine in Section 2.3, we need to specify the signature for the routines we want to call. It is preferable to be able to programmatically identify these signatures rather than require R programmers to explicitly specify them. The RCIndex package is an R interface to libclang (Carruth et al. (2007)), the parsing facilities for the clang compiler. This already allows us to read C and C ++ code in R and to identify the different elements it contains. This allows to not only determine the signatures of routines, but also discover different data structures, enumerated constants, etc. We can also go further and understand more about how the routines manipulate their arguments and whether they perform the memory management or leave it to the caller. As we saw in each of our examples, information about the types of each parameter and local variable is a necessity to being able to compile using LLVM. Currently, the R programmer must specify this information not only for the function she is compiling, but also for all of the functions it calls. Again, we want to make this transparent, or at least only require the R programmer to specify this information when there is ambiguity. To this end, we are working on a type inference package for R. This 19 starts with a known set of fundamental functions and their signatures. From this, we can determine the signatures of many higher level calls. As always, we cannot deal with many features of the language such as nonstandard evaluation, but we most likely can get much of the type information we need programmatically. Since R’s types are so flexible with different return types based on not only the types of the inputs, but also the content of the inputs, we need a flexible way to specify types. Perhaps the existing TypeInfo package (Temple Lang and Gentleman (2005)) or lambda.r package will help here. To analyze code for type information and for variable dependencies, we will build upon the CodeDepends (Temple Lang, Peng and Nolan (2007)) and codetools (Tierney (2011)) packages. While these are some of the related activities we envisage working on, we also encourage others to collaborate with us or work independently using LLVM and optionally Rllvm and RLLVMCompile so that our community ends up with better tools. 7. CONCLUSION We have described one approach to making some parts of the R language fast. We leverage the compiler toolkit infrastructure LLVM to generate native code. This allows us to incorporate technical knowledge from another community, both now and in the future. We can generate code for CPUs, GPUs and other targets. We can dynamically specialize R functions to different computational approaches, data representations and sources, and contextual knowledge, giving us a new and very flexible approach to thinking about high-level computing. We are developing a simple but extensible and customizable compiler in R that can translate R code to native code. Not only does this make the code run fast, but it also allows us to compute in quite different ways than when we interpret the R code in the usual way. We can even outperform some of R’s own native code. In no way should this work be considered a general compiler for all of the R language. There are many aspects of the R language we have not yet dealt with or considered. Vectorized subsetting, recycling, lazy evaluation and nonstandard evaluation are examples. We, or others, can add facilities to the compiler to support these when they make sense and are feasible. The initial results from this simple approach are very encouraging. An important implication of this 20 D. TEMPLE LANG and other efforts to make R code efficient is that we can be benefit from writing high-level code that describes what to compute, not how. We then use smart interpreters or compilers to generate efficient code, simultaneously freeing R programmers to concentrate on their tasks and leveraging domain expertise for executing the code. We hope others will be able to use these basic building blocks to improve matters and also to explore quite different approaches and new languages within the R environment. ACKNOWLEDGMENTS Vincent Buffalo made valuable contributions to designing and developing the RLLVMCompile package in the initial work. Vincent Carey has provided important ideas, insights, advice and motivation and I am very grateful to him for organizing this collection of papers and the session at the 2012 Joint Statistical Meetings. Also, I appreciate the very useful comments on the initial draft of this paper by the three reviewers and also John Chambers. SUPPLEMENTARY MATERIAL The code for the examples in this paper, along with the timing results and their meta-data, are available from https://github.com/duncantl/ RllvmTimings as a git repository. The versions of the Rllvm and RLLVMCompile packages involved in the timings can also be retrieved from their respective git repositories. The specific code used is associated with the git tag StatSciPaper. REFERENCES Adler, D. (2012). rdyncall: Improved foreign function interface (FFI) and dynamic bindings to C libraries. R package version 0.7.5. Buckner, J., Wilson, J., Seligman, M., Athey, B., Watson, S. and Meng, F. (2009). The gputools package enables GPU computing in R. Bioinformatics 26 135–135. Available at http://cran.r-project.org/web/packages/ gputools/index.html. Carruth, C., Christopher, E., Gregor, D., Korobeynikov, A., Kremenek, T., McCall, J., Rosier, C. and Smith, R. (2007). libclang: C /C ++ translation unit parser library. Available at http:// clang.llvm.org. Clayton, D. (2011). snpstats: SnpMatrix and XSnpMatrix classes and methods. R package version 1.5.0. Eddelbuettel, D. and François, R. (2011). Rcpp: Seamless R and C++ integration. Journal of Statistical Software 40 1–18. Ihaka, R. and Temple Lang, D. (2008). Back to the future: Lisp as a base for a statistical computing system. In Proceedings in Computational Statistics 21–33. Springer, Heidelberg. Jones, E., Oliphant, T. and Peterson, P. et al. (2001). SciPy: Open source scientific tools for Python. Kempenaar, M. and Dijkstra, M. (2010). R/GPU: Using the Graphics Processing Unit to speedup bioinformatics analysis with R. Available at https://trac.nbic.nl/ rgpu/. Lattner, C. and Adve, V. (2004). LLVM: A compilation framework for lifelong program analysis and transformation. In Proc. of the 2004 International Symposium on Code Generation and Optimization (CGO’04), San Jose, CA, USA 75–88. IEEE Computer Society, Washington, DC. Available at http://llvm.org/. R Core Team (2013). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. Schölkopf, B. and Smola, A. (2001). Learning with Kernels. MIT Press, Cambridge, MA. Temple Lang, D. (2002). RCurl: General network (http/ftp/. . . ) client interface for R. R package version 1.95-4. Temple Lang, D. (2010a). RCIndex: R interface to the clang parser’s C API. Available at https://github.com/ omegahat/RClangSimple. Temple Lang, D. (2010b). Rllvm: R interface to the LowLevel Virtual Machine API. Available at https://github. com/duncantl/Rllvm. Temple Lang, D. (2011). Rffi: Interface to libffi to dynamically invoke arbitrary compiled routines at run-time without compiled bindings. R package version 0.3-0. Temple Lang, D. (2013). FastCSVSample: An R package to sample lines from a text file. Available at https://github. com/duncantl/FastCSVSample. Temple Lang, D. and Buffalo, V. (2011). RLLVMCompile: A simple LLVM-based compiler for R code. Available at https://github.com/duncantl/RLLVMCompile. Temple Lang, D. and Gentleman, R. (2005). TypeInfo: Optional type specification prototype. R package version 1.27.0. Temple Lang, D., Peng, R. and Nolan, D. (2007). CodeDepends: Analysis of R code for reproducible research and code comprehension. Available at https://github.com/ duncantl/CodeDepends. Tierney, L. (2001). Compiling R: A preliminary report. In Proceedings of the 2nd International Workshop on Distributed Statistical Computing, March 15–17, 2001 (K. Hornik and F. Leisch, eds.). Technische Universität Wien, Vienna, Austria. Tierney, L. (2011). codetools: Code analysis tools for R. R package version 0.2-8. Urbanek, S. (2007). R to C compiler. Available at http:// www.rforge.net/r2c/index.html. Wong, J. (2013). pdist: Partitioned distance function. R package version 1.2. Zakai, A. (2010). Emscripten: An LLVM-to-JavaScript compiler. Available at https://github.com/kripken/ emscripten/wiki.
6cs.PL
International Journal of Computer Applications (0975 – 8887) Volume 34– No.6, November 2011 An Effective Evolutionary Clustering Algorithm: Hepatitis C case study M. H. Marghny Rasha M. Abd El-Aziz Ahmed I. Taloba Computer Science Department, Faculty of Computer and Information, Assiut University, Egypt. Computer Science Department, Faculty of Science, Assiut University, Egypt. Computer Science Department, Faculty of Computer and Information, Assiut University, Egypt. ABSTRACT Clustering analysis plays an important role in scientific research and commercial application. K-means algorithm is a widely used partition method in clustering. However, it is known that the K-means algorithm may get stuck at suboptimal solutions, depending on the choice of the initial cluster centers. In this article, we propose a technique to handle large scale data, which can select initial clustering center purposefully using Genetic algorithms (GAs), reduce the sensitivity to isolated point, avoid dissevering big cluster, and overcome deflexion of data in some degree that caused by the disproportion in data partitioning owing to adoption of multi-sampling. We applied our method to some public datasets these show the advantages of the proposed approach for example Hepatitis C dataset that has been taken from the machine learning warehouse of University of California. Our aim is to evaluate hepatitis dataset. In order to evaluate this dataset we did some preprocessing operation, the reason to preprocessing is to summarize the data in the best and suitable way for our algorithm. Missing values of the instances are adjusted using local mean method. General Terms Data Mining. Keywords Genetic algorithms, Clustering, K-means algorithm, Squarederror criterion, hepatitis-C Virus (HCV). 1. INTRODUCTION Data mining is supported by a host of models capture the character of data in several different ways. Clustering is one of these models, where clustering is to find groups that are different from each other’s, and whose members are very similar to each other. Clustering is a process in which a group of unlabeled patterns are partitioned into a number of sets so that similar patterns are assigned to the same cluster, and dissimilar patterns are assigned to different clusters. There are two goals for clustering algorithms: determining good clusters and doing so efficiently. A popular category of clustering algorithms dealing with kcenter clustering problems is the so-called K-means clustering. The conventional K-means algorithm classifies data by minimizing the MSE objective function. However, the clustering procedure assumes that data must be presented with a known number of clusters, which in turn allows for a simple implementation of K-means clustering. However, the classical K-means suffers from several flaws. First, the algorithm is very sensitive on the choice of the initial cluster centers. Second, k-means can't deal with massive data. Nowadays, people who have been affected from hepatitis virus are found all over the world. Liver‘s swelling and redness without indicating any particular reason is referred to as Hepatitis [1].It is currently estimated that approximately 170300 million people worldwide (roughly 3 % of the present global population) are infected with HCV and the global burden of disease attributable to HCV-related chronic liver diseases is substantial [2]. In this paper, we present an improved genetic k-means algorithm (IGK) to handle large scale data, which can select initial clustering center purposefully using genetic algorithms (GAs). GAs based clustering technique provides an optimal clustering with respect to the clustering metric being considered. A Genetic algorithms (GAs) is a procedure used to find approximate solutions to search problems through the application of the principles of evolutionary biology. Genetic algorithms use biologically inspired techniques, such as genetic inheritance, natural selection, mutation, and sexual reproduction (recombination, or crossover) [3]. An excellent survey of GAs along with the programming structure used can be found in [4]. Genetic algorithms have been applied to many classification and performance tuning applications in the domain of knowledge discovery in databases (KDD). 2. CLUSTERING Cluster analysis, an important technology in data mining, is an effective method of analyzing and discovering useful information from numerous data [5-11]. Cluster algorithm groups the data into classes or clusters so that objects within a cluster have high similarity in comparison to one another, but are very dissimilar to objects in other clusters [12]. Dissimilarities are assessed based on the attribute values describing the objects. Often, distance measures are used. As a branch of statistics and an example of unsupervised learning, clustering provides us an exact and subtle analysis tool from the mathematic view. 1 International Journal of Computer Applications (0975 – 8887) Volume 34– No.6, November 2011 The K-means algorithm [12-14] is by far the most popular clustering tool used in scientific and industrial applications [3]. It proceeds as follows. First, it randomly selects k objects, each of which initially represents a cluster mean or center. For each of the remaining objects, an object is assigned to the cluster to which it is the most similar, based on the distance between the object and the cluster mean. It then computes the new mean for each cluster. This process iterates until the criterion function converges. Typically, the squared-error criterion is used, defined as: c In this section, we briefly describe the original K-means algorithm.K-means algorithm [15] is the most popularclustering algorithmbut it is suffers from some drawbacks as shown above. The steps ofK-means algorithm as follows: Algorithm: Original K-means(S, k), S= {x1, x2... xn}. Input: The number of clusters k and a dataset containing n objects xi. Output: A set of k clusters Cj that minimize the squared-error criterion. nj J c   x  m j j 1 k 1 3. ORIGINAL K-MEANS CLUSTERING j k (1) Where Jc, is the sum of square-error for all objects in the database, c number of clusters, nj number of objects in each cluster, xk is the point in space representing a given object, and m is the mean of cluster cj. Adopting the squared-error criterion, K-means works well when the clusters are compact clouds that are rather well separated from one another and has difficulty detecting the natural clusters, when clusters have widely different sizes, densities, or non-spherical shapes [11].For attempting to minimize the square-error criterion, it will divide the objects in one cluster into two or more clusters. In addition to that, when applying this square-error criterion to evaluate the clustering results, the optimal cluster corresponds to the extremum. Since the objective function has many local minimal values [15], if the results of initialization are exactly near the local minimal point, the algorithm will terminate at a local optimum. So, random selecting initial cluster center is easy to get in the local optimum not the entire optimal. For overcoming that square-error criterion is hard to distinguish the big difference among the clusters, one technique has been developed which is based on representative point-based technique [16]. Besides, there are various approaches to solving the problem that the performance of algorithm heavily depends on the initial starting conditions: the simplest one is repetition with different random selections [17]; some algorithms also employ simulation anneal technique to avoid getting into local optimal [18]; GA-clustering algorithm [5] and Improved Kmeans algorithm [11] have been proposed to solve the clustering problem; some algorithms used GAs to solve the clustering problem [19-30]. In literature [31], Bradley and Fayyad present an iterative refinement approach for sampling dataset many times and clustering twice to get the optimal initial values of cluster center. The idea is that multiple sub-samples are drawn from the dataset clustered independently, and then these solutions are clustered again respectively, the refined initial center is then chosen as the solution having minimal distortion over all solutions. Aiming at the dependency to initial conditions and the limitation of K-means algorithm that applies the square-error criterion to measure the quality of clustering, this paper presents a new improved Genetic K-means algorithm that is based on effective techniques of multi-sampling and once-clustering to search the optimal initial values of cluster centers. Our experimental results demonstrate that the new algorithm can obtain better stability and excel the original K-means in clustering results. Begin 1. m=1; 2. initialize k prototypes; //arbitrarily chooses k objects as the initial centers. 3. Repeat for i=1 to n do begin for j=1 to k do Compute D (X i , Z j )  X i , Z j ;//Zjis the center of cluster j. if D (X i , Z j ) = min{ D (X i , Z j ) } then Xi  Cj ; end;// (re)assign each object to the cluster based on the mean if m=1 then J c (m )   j 1  X k i C j X i Z j 2 m=m+1; for j=1 to k do Zj  1 nj  nj i 1 x i( j ) ; //(re)calculate the mean value of the objectsfor each cluster 2 k J c (m )   j 1  X C X i  Z j ; //compute the error i j function 4. Until Jc(m) – Jc(m − 1) <  End 4. GA-CLUSTERING ALGORITHM Algorithm: GA-clustering (S, k), S = {x1, x2,…xn}. Input: The number of clusters K and a dataset containing n objects Xi. Output: A set of k clusters Cj that minimize the squared-error Begin 1. T=0 2. Initialize population P(T) 3. Compute fitness P(T) 4. T=T+1 5. If termination criterion achieved go to 10 6. Select P(T) from P(T-1) 7. Crossover P(T) 8. Mutate P(T) 9. Go to 3 10. Output best and stop End 2 International Journal of Computer Applications (0975 – 8887) Volume 34– No.6, November 2011 criterion. 5. IMPROVED K-MEANS ALGORITHM Algorithm: Improved K-means (S, k), S = {x1, x2,…,xn}. Input: The number of clusters K'(K'>K) and a dataset containing n objects Xi. Output: A set of k clusters Cj that minimize the squared-error criterion. Begin 1. Multiple sub-samples {S1, S2, ...,Sj}; 2. For m = 1 to j do K-means(Sm, K'); //executing K-means, produce K' clusters and j groups. 3. Compute J c (m )    2 k j 1 X i C j X i Z j ; 4. Choose min{Jc} as the refined initial points Zj , j ∈ [1, K']; 5. K-means(S, K'); //executing K-means again with chosen initial, producing K'mediods. 6. Repeat Combining two near clusters into one cluster, and recalculate the new center generated by two centers merged. 7. Until the number of clusters reduces into k //Merging (K' +K) End 6. PROPOSED ALGORITHM Original K-means algorithm choose k points as initial clustering centers, different points may obtain different solutions. In order to diminish the sensitivity of initial point choice, we employ a mediod [12], which is the most centrally located object in a cluster, to obtain better initial centers. The demand of stochastic sampling is naturally bias the sample to nearly represent the original dataset, that is to say, samples drawn from dataset can't cause distortion and can reflect original data's distribution. The example of original data set is depicted on the left of Fig. 1, while sampling results are shown on the right of Fig. 1. producing a group of mediods respectively. Finally, comparing J solutions and choosing one group having minimal value of square-error function as the refined initial points. To avoid dividing one big cluster into two or more ones for adopting square-error criterion, we assume the number of clustering is K' (K' >K), K' depends on the balance of clustering quality and time). In general, bigger K' can expand searching area of solution space, and reduce the situation that there are not any initial values near some extremum. Subsequently, reclustering the dataset through Genetic K-means with the chosen initial conditions would produce K' mediods, then merging K' clusters (which are nearest clusters) until the number of clusters reduced to k. The mean steps of proposed algorithm can be summarized as follows: Algorithm: Improved Genetic K-means (S, k), S = {x1, x2,…xn}. Input: The number of clusters K'(K'> K) and a dataset containing n objects Xi. Output: A set of k clusters Cj that minimize the squared-error criterion Begin 1. Multiple sub-samples {S1, S2, ...,Sj}; 2. For m = 1 to j do Genetic K-means(Sm, K'); //executing Genetic Kmeans, produce K' clusters and j groups. 3. Compute J c (m )    2 k j 1 X i C j X i Z j ; 4. Choose min{Jc} as the refined initial points Zj , j ∈ [1, K']; 5. Genetic K-means(S, K'); //executing Genetic K-means again with chosen initial, producing K'mediods. 6. Repeat Combining two near clusters into one cluster, and recalculate the new center generated by two centers merged. 7. Until the number of clusters reduces into k //Merging (K' +K) End Improved algorithm works on very small samples compared with whole dataset and needs significantly less iteration. 7. EXPERIMENTAL RESULTS Fig. 1 Dataset and sub-sample. Comparing two solutions generated by clustering sample drawn from the original dataset and itself using K-means respectively, the location of clustering centroids of these two are almost similar. So, the sample-based method is applicable to refine initial conditions [26]. In order to lessen the influence of sample on choosing initial starting points, following procedures are employed. First, drawing multiple sub-samples (say J) from original dataset (the size of each sub-sample is not more than the capability of the memory, and the sum for the size of J subsamples is as close as possible to the size of original dataset). Second, use Genetic K-means for each sub-sample and We run experiments on three real-life data sets. Vowel data, this data consists of 871 Indian Telugu vowel sounds [32]. These were uttered in a consonant-vowel-consonant context by three male speakers in the age group of 30-35 years. The value of K is therefore chosen to be 6 for this data. Iris data, this data represents different categories of irises having four feature values. The four feature values represent the sepal length, sepal width, petal length and the petal width in centimeters [33]. It has three classes (with some overlap between classes 2 and 3) with 50 samples per class. The value of K is therefore chosen to be 3 for this data. Crude oil data, this overlapping data [34] has 56 data points, 5 features and 3 classes. Hence the value of K is chosen to be 3 for this data set. We also run experiments on three synthetic datasets denoted as A1, A2 and A3 [35], which are shown in Fig. 2. 3 International Journal of Computer Applications (0975 – 8887) Volume 34– No.6, November 2011 The Genetic paramet ers that 1 359.761 278.965 279.484 278.27 have 2 279.484 278.965 279.27 278.27 been 3 359.761 278.965 278.965 278.27 used in 4 279.27 278.965 279.484 278.27 our 5 279.484 278.965 278.965 278.27 experim ental: Average 311.552 278.965 279.2336 278.27 the population size = 15, selection is roulette introduced in section 2.2.4, crossover is single point crossover demonstrated in section 2.2.5, the probability of crossover = 0.8, mutation is an occasional random alteration of a character in GA clustering algorithm and the probability of mutation = 0.001. Initial K-means GA Improved clustering k-means IGK The results of implementation of the K-means algorithm, GAclustering algorithm, improved K-means algorithm and improved Genetic K-means algorithm are shown, respectively, in Table 1 for vowel dataset, Table 2 for iris dataset , Table 3 for Crude oil dataset , Table 4 for A1 dataset , Table 5 for A2 dataset and Table 6 for A3 dataset. All the algorithms were run for 10 iterations. For the purpose of demonstration, five different initial configurations of the K-means algorithm and improved Kmeans algorithm and five different initial populations of the GAclustering algorithm and improved Genetic K-means algorithm are shown in the tables. Initial K-means 1 2 3 4 5 151469.255 154832.4908 151253.602 160933.7616 151368.9385 GA Clustering 149400.5957 151017.8152 150184.7305 149444.5362 150494.9033 Improved k-means 149441.1451 150466.1489 149900.541 150466.1489 149897.5413 Table 1, 2 and 3 show the calculated error of the K-means algorithm, GA-clustering algorithm, improved K-means algorithm and improved Genetic K-means algorithm, it is obviously that the Squared-error obtained by improved Genetic K-means algorithm for all data set (vowel 149376.3, iris 97.101, crude oil 278.270) is better than the calculated Squared-error by K-means (vowel 155105.5, iris 113.0482, crude oil 311.552), GA-clustering algorithm (vowel 149460.5, iris 97.101, crude oil 278.965) and improved K-means algorithm (vowel 149830, iris 97.101, crude oil 279.2336). Table 4: Jc for A1 after 10 iterations when k = 20. 1 GA Improved IGK clustering k-means 7319267.603 6290237.938 6134273.372 5376844.286 2 6939286.418 5902763.334 7446758.964 5376826.391 Initial K-means 3 6688417.311 6429371.415 7471731.766 5376844.286 IGK 4 6201366.244 5955839.693 5376844.286 5376826.391 149415.6464 149383.9932 149394.804 149373.0972 149383.9932 5 6732038.312 5769628.764 6175011.237 5376844.286 Average 6776075.178 6069568.229 6520923.925 5376837.128 Table 5: Jc for A2 after 10 iterations when k = 35. Average 153971.6096 150108.5162 150034.305 149390.3068 11527418.85 GA clustering 9935582.45 Improved IGK k-means 11979602.2 9167097.531 2 11793057.34 10462638.41 11013299.08 9563340.229 3 12219094.33 10467348.29 11933866.01 9509970.982 4 11515669.81 10475260.02 11671877.22 9494500.303 5 12382903.24 10931887.31 12020628.02 9571276.075 Average 11887628.71 10454543.3 11723854.51 9461237.024 Initial K-means 1 Fig. 2 Datasets, A1 (left), A2 (center) and A3 (right). Table 1: Jc for Vowel after 100 iterations when k = 6. Table 2: Jc for Iris after 100 iterations when k = 3. Initial 1 2 3 4 5 Average K-means 124.022 122.946 123.581 97.346 97.346 113.0482 GA Improved clustering k-means 97.1011 97.101 97.101 97.101 97.101 97.101 97.101 97.101 97.101 97.101 97.101 97.101 Table 6: Jc for A3 after 10 iterations when k = 50. IGK Initial 97.101 97.101 97.101 97.101 97.001 97.101 K-means GA Improved IGK k-means 16565775.24 14149133.94 1 17552313.95 clustering 14220466.61 2 16470491.22 15300499.21 15220816.69 13888135.28 3 15783128.58 14620168.73 18174366.01 14087877.86 4 15541980.51 16846546.58 15370927.74 13543098.84 5 15785254.9 14937437.09 16165469.41 13937084.57 Table 3: Jc for Crude Oil after 100 iterations when k = 3. 4 International Journal of Computer Applications (0975 – 8887) Volume 34– No.6, November 2011 Average 16226633.83 15185023.64 16299471.02 13921066.1 Table 4, 5 and 6 show the calculated error of the K-means algorithm, GA-clustering algorithm, improved K-means algorithm and improved Genetic K-means algorithm, it is obviously that the Squared-error obtained by improved Genetic K-means algorithm for all data set (A1 5376837.128, A2 9461237.024, A3 13921066.1) is better than the calculated Squared-error by K-means (A1 6776075.178, A2 11887628.71, A3 16226633.83), GA-clustering algorithm (A1 6069568.229, A2 10454543.3, A3 15185023.64) and improved K-means algorithm (A1 15185023.64, A2 11723854.51, A3 16299471.02). 8. CONCLUSION Along with the fast development of database and network, the data scale clustering tasks involved in which becomes more and more large. K-means algorithm is a popular partition algorithm in cluster analysis, which has some limitations when there are some restrictions in computing resources and time, especially for huge size dataset. Genetic algorithm has been used to search for the cluster centers which minimize the clustering error. The improved Genetic K-means algorithm presented in this paper is a solution to handle large scale data, which can select initial clustering center purposefully using GAs, reduce the sensitivity to isolated point, avoid dissevering big cluster, and overcome deflexion of data in some degree that caused by the disproportion in data partitioning owing to adoption of multisampling. We also run experiments on other dataset is Hepatitis C dataset [2]contains 19 fields with one output field [15]. The output shows whether patients with hepatitis are alive or dead. The purpose of the dataset is to forecast the presence or absence of hepatitis virus given the results of various medical tests carried out on a patient. This database holds 19 attributes. Hepatitis dataset contains 155 samples belonging to two different target classes. The value of K is therefore chosen to be 2 for this data. There are 19 features, 13 binary and 6 attributes with 6–8 discrete values. 9. REFERENCES Before proceeding for model fitting, we have applied some datareduction techniques in order to trim down the dimensionsbecause the data have the problem of dimensionality‘s curse.We have applied principal component analysis on the nineteenindependent variables, after which we realized that the first sixprincipal components cover more than [4] Filho,J.L.R.,Treleaven,P.C., andAlippiC. 1994. Genetic Algorithm ProgrammingEnvironments. IEEE Comput, vol.27, pp.28-43. Initial K-means GA Improved clustering k-means [1] Yasin, H., JilaniT. A., and Danish, M. 2011. Hepatitis-C Classification using Data Mining Techniques. International Journal of Computer Applications.Vol 24– No.3. [2] JilaniT. A., Yasin, H., and Yasin,M. M. 2011. PCA-ANN for Classification of Hepatitis-C Patients. International Journal of Computer Applications.Vol14– No.7. [3] Wang,J. 2006. Encyclopedia of Data Warehousing and Mining. Idea Group Publishing. [5] Maulik, U., and Bandyopadhyay, S. 2000. Genetic Algorithm-BasedClusteringTechnique. Pattern Recognition, vol.33, pp.1455-1465. IGK 1 9151.137672 9151.137672 9398.298872 9151.137672 2 9151.137672 9810.411534 9398.298872 9151.137672 3 9151.137672 8985.781203 9398.298872 9151.137672 4 9151.137672 9007.065884 9398.298872 9151.137672 5 9151.137672 9056.999657 9398.298872 9151.137672 Average 9151.137672 9202.27919 9398.298872 9151.137672 98% of the totalvariability of the continuous data space[2]. Therefore, we have acquired six independent variables afterapplying data reduction approaches, these six autonomousvariables are age, bilirubin, Alk phosphate, serum glutamicoxaloacetic transaminase (SGOT), Albumin and prothrombintime (PROTIME). The results of implementation for Hepatitis C dataset are shown in Table 7. Table 7: Jc for Hepatitis C after 10 iterations when k = 2. We have proposed an approach to perform clustering on time series data using GAs and K-means. The proposed approach takes the advantage of the global search capacity of GAs and uses K-means for local fine tuning. [6] Anderberg,M.R. 1973. Cluster Analysis for Application. Academic Press,New York. [7] Hartigan, J.A.1975. Clustering Algorithms. Wiley, New York. [8] Devijver,P.A., and Kittler, J. 1982. Pattern Recognition: A Statistical Approach. Prentice-Hall, London. [9] Jain, A.K., and Dubes, R.C. 1988. Algorithms for Clustering Data. PrenticeHall, Englewood Cliffs, NJ. [10] Tou, J.T., and Gonzalez, R.C. 1974. Pattern Recognition Principles. Addison Wesley, Reading. [11] Zhang,Y., Mao,J., and Xiong,Z. 2003: An Efficient Clustering Algorithm.International Conference on Machine Learning and Cybernetics, vol.1,pp.261-265. [12] Han,J., and Kamber,M. 2000. Data Mining: Concepts and Techniques. Morgan Kaufmann. [13] Forgy, E.1965. Cluster Analysis of Multivariate Data: Efficiency vs Interpretability of Classifications. Biometrics, pp.21-768. [14] McQueen,J. 1967. Some methods for classification and analysis of multivariate observations. Computer and Chemistry, vol.4, pp.257-272. [15] Tang, L., Yang, Z., and Wang, M. 1997. Employing Genetic Algorithm toImprove the K-means Algorithm in 5 International Journal of Computer Applications (0975 – 8887) Volume 34– No.6, November 2011 Clustering Analysis.MathematicsStatistics and Application Probability, vol.12. [16] Cheng,E., Wang,S.,Ning, Y., and Wang, X. 2001. The Design and Realization of Using Representation Point Valid Clustering Algorithm. Patten Recognition and Artificial Intelligence, vol. 14. [17] Duda, R. O., and Hart, P. E.1973. Patten Classification and Scene Analysis.New York: John Wiley and Sons. [18] Selim,S. Z., and Alsultan, K. 1991. A Simulated Annealing Algorithm for theClustering Problem. Patten Recognition, vol.24, pp.1003-1008. [19] Krishna, K., and Narasimha, M. M. 1999. Genetic K-means Algorithm. Systems,IEEE Transactions on Man and Cybernetics, Part B, pp.433-439. [20] Murthy, C. A., and Chowdhury, N. 1996. In Search of Optimal Clusters usingGenetic Algorithms.PatternRecog. Lett, pp.825-832. [21] Tang, L., Yang, Z., and Wang, M. 1997. Improve K-means Algorithm of Cluster Method by GA. Mathematical Statistics and Applied Probability,pp.350-356. [22] Fu, J.,Xu, G., and Wang, Y. 2004. Clustering Based on Genetic Algorithm.Computer engineering, pp.122-124. [23] Lu, Q., and Yu, J. 2005. K-Means Optimal Clustering Algorithm Based onHybrid Genetic Technique. Journal of East China University of Scienceand Technology (Natural Science Edition), pp.219-222. [26] Chittu, V.,Sumathi, N. 2011. A Modified Genetic Algorithm Initializing K-Means Clustering. Global Journal of Computer Science and Technology. [27] Kumar, V., Chhabra, J.K., and Kumar, D. 2011. Initializing Cluster Center for K-Means Using Biogeography Based Optimization. Advances in Computing, Communication and Control. Vol.125. pp.448-456. [28] Reddy, D., Mishra,D., and Jana, P. K. 2011. MST-Based Cluster Initialization forK-Means. Advances in Computing. Communication and Control. [29] Min, W., andSiqing, Y. 2010. Improved K-means clustering based on genetic algorithm. IEEE, Computer Application and System Modeling. [30] Li, X., Zhang, L., Li, Y., and Wang, Z. 2010.AImproved Kmeans Clustering Algorithm Combined with the Genetic Algorithm. IEEE, Digital Content,Multimedia Technology and its Applications. [31] Fayyad, U., Reina,C., and Bradley, P.S. 1998. Initialization of Iterative Refinement Clustering Algorithms. Proceedings of the 4th International Conference on Knowledge Discovery and Data Mining (KDD98), pp.194-198. [32] Pal, S. K., and Majumder, D. D. 1977. Fuzzy Sets and Decision Making Approaches in Vowel and Speaker Recognition. IEEE Trans. Systems, ManCybernet. SMC, vol.7, pp.625-629. [33] Fisher, R. A. 1936. The Use of Multiple Measurements in Taxonomic Problems.Ann. Eugenics, vol.3, pp.179-188. [24] Bandyopadhyay, S., and Maulik, U. 2002. An Evolutionary Technique Based onK-Means Algorithm for Optimal Clustering in RN. Information Sciences,pp.221-237. [34] Johnson,R. A., and Wichern, D. W. 1982. Applied Multivariate StatisticalAnalysis. Prentice-Hall, Englewood Cliffs, NJ, 1982. [25] Yang, S., and Li, Y. 2006.K-means Optimization Study on k Value of K2meansAlgorithm. System Engineering Theory and Application, pp.97-101. [35] Virmajoki, O. 2004. Pairwise Nearest Neighbor Method Revisited. PhD thesis,University ofJoensuu, Joensuu, Finland. 6
9cs.NE
Stochastic Interchange Scheduling in the Real-Time Electricity Market arXiv:1601.02191v1 [cs.SY] 10 Jan 2016 Yuting Ji, Tongxin Zheng, Senior Member, IEEE, and Lang Tong, Fellow, IEEE Abstract—The problem of multi-area interchange scheduling in the presence of stochastic generation and load is considered. A new interchange scheduling technique based on a two-stage stochastic minimization of overall expected operating cost is proposed. Because directly solving the stochastic optimization is intractable, an equivalent problem that maximizes the expected social welfare is formulated. The proposed technique leverages the operator’s capability of forecasting locational marginal prices (LMPs) and obtains the optimal interchange schedule without iterations among operators. Index Terms—Inter-regional interchange scheduling, multiarea economic dispatch, seams issue. I. I NTRODUCTION Since the restructuring of the electric power industry, independent system operators (ISOs) and regional transmission organizations (RTOs) have faced the seams issue characterized by the inefficient transfer of power between neighboring regions. Such inefficiency is caused by incompatible market designs of independently controlled operating regions, inconsistencies of their scheduling protocols, and their different pricing models. The economic loss due to seams for the New York and New England customers is estimated at the level of $784 million annually [2]. There has been recent effort in addressing the seams issue by optimizing interchange flows across different regions. In particular, a new interchange scheduling technique, referred to as Tie Optimization (TO), is proposed in [2] to minimize the overall operating cost. The Federal Energy Regulatory Commission (FERC) has recently approved the Coordinated Transaction Scheduling (CTS) that allows market participants’ participation in TO. Implementations of various versions of CTS are being carried out by several system operators in the US [3] [4]. One of the main challenges in eliminating seams is the inherent delay between the interchange scheduling and the actual power delivery across regions. This is caused by the lack of real-time information necessary for scheduling and operation constraints. For example, the information used in CTS for interchange scheduling is 75 minutes prior to the actual power delivery. With increasing integration of renewables, interchange scheduling needs to be cognizant of uncertainty that arises between the time of interchange scheduling and that of power transfer. This work is supported in part by the DoE CERTS program and the National Science Foundation under Grant CNS-1135844. Part of this work appeared in [1]. Y. Ji and L. Tong are with the School of Electrical and Computer Engineering, Cornell University, Ithaca, NY 14853, USA (e-mail: [email protected]; [email protected]). T. Zheng is with ISO New England Inc., Holyoke, MA 01040, USA (e-mail: [email protected]). The goal of this paper is to obtain the optimal interchange schedule in the presence of system and operation uncertainty. To this end, we propose a two-stage stochastic optimization formulation aimed at minimizing the expected overall system cost. The proposed optimization framework takes into account random fluctuations of load and renewable generations in the systems. Because directly solving the stochastic optimization is intractable, this paper presents an approach to transfer the stochastic optimization problem into an equivalent deterministic problem that maximizes the expected economic surplus. This transformation allows us to generalize the deterministic TO solution by intersecting expected demand and supply functions, therefore avoiding costly iterative computation between operators. A. Related Work There have been extensive studies on the seams issue. In this paper, we do not consider inefficiencies arise from market designs; we focus instead on optimizing the interchange schedule. We highlight below approaches most relevant to the technique developed here. For broadly related work, see [2], [5]–[10] and references therein. Mathematically, optimal interchange scheduling can be obtained from the multi-area Optimal Power Flow (OPF) problem, which is a decentralized optimization of power flow that can be solved using various decomposition techniques [5]. A general approach is based on the principle of Lagrangian Relaxation (LR) that decomposes the original problem into smaller subproblems. Some of the earliest approaches include the pioneer work of Kim and Baldick [11] and Conejo and Aguado [12] that predate the broad deregulation of the electricity market in the US. Multi-area OPF problems that explicitly involve multiple ISOs have been widely studied [13] [9]. In general, decentralized OPF based techniques typically require iterations between ISOs where one control center uses intermediate solutions from the other and solves its own dispatch problem. Although the convergence of such techniques is often guaranteed under the DC-OPF formulation, the number of iterations can be large and the practical cost of communications and computations substantial. We note that the recent marginal decomposition technique [6] is shown to converge in a finite (but unknown) number of iterations. The growth of renewable integration has brought new attention to uncertainty in seams. Both stochastic optimization and robust optimization approaches have been considered recently. In particular, Ahmadi-Khatir, Conejo, and Cherkaoui formulate a two-stage stochastic market clearing model in [14] for the multi-area energy and reserve dispatch problem. The solution to the stochastic optimization is obtained based on scenario enumerations, which requires a prohibitively high computation effort. In [8], the day-ahead tie-flow scheduling is considered in the unit commitment problem under wind generation uncertainty. Specifically, a two-stage adaptive robust optimization problem is formulated with the goal of minimizing the cost of the worst-case wind scenario, and solved by the column-and-constraint generation algorithm. The present paper complements these existing results by focusing on the real-time interchange scheduling and develop a tractable stochastic optimization technique. A pragmatic approach to the seams problem, one that has been adopted in practice and that can incorporate external market participants, is the use of proxy buses representing the interface between neighboring regions. The technique presented here falls into this category. Among existing prior work is the work by Chen et. al. [9] where a coordinated interchange scheduling scheme is proposed for the co-optimization of energy and ancillary services. The technique is based on (augmented) LR involving iterations among neighboring control centers. The work closest to ours are the TO technique presented in [2] and the work of Ilic and Lang [10]. The underlying principle of [2] and [10] is based on the economics argument of supply and demand functions, which are exchanged by the neighboring operators. For the (scalar) net interchange, such functions can be succinctly characterized, and the exchange needs to be made only once; the need of iterations among control centers is eliminated. Our approach is also based on the same economics argument with the innovation on incorporating system and operation uncertainty. Note that this type of approaches do not solve the multi-area OPF problem except the special case when there is a single tie line connecting the two operating regions. II. D ETERMINISTIC I NTERCHANGE S CHEDULING A. Proxy Bus Representation In practice, coordination between neighboring control regions and markets are typically through the use of proxy bus mechanism. As pointed out in [15], a proxy bus models the location at which marginal changes in generation are assumed to occur in response to changes in inter-regional transactions. The proxy bus mechanism is utilized by all of the existing LMP based markets for representing and valuing interchange power [15]. In this paper, we consider a power system consisting of two independently operated subsystems, as illustrated in Figure 1. Each operator selects a proxy bus to represent the location of import or export in the neighboring region. Specifically, as shown in Figure 2, the operator from region 1 assumes a withdrawal q at proxy bus p1 and the operator from region 2 assumes an injection with the same quantity q at proxy bus p2 . The interchange scheduling is to determine the value of the Region 1 Region 2 Figure 1: A 2-region system with an interface. p1 Region 1 q q p2 Region 2 Figure 2: The single proxy bus representation. net interchange1 q that minimizes the overall operating cost subject to generation and transmission constraints. Note that, except when there is a single tie line that connects two regions, the proxy representation is an approximation, and the optimal interchange scheduling based on the proxy representation does not provide the optimal interchange of the original system. In general, the optimal interchange via proxy representation is strictly suboptimal when it is compared with multi-area OPF solutions. B. Optimal Interchange Scheduling The interchange scheduling problem under the proxy bus model can be formulated as minimizing the generation costs of both regions with respect to the power balance, transmission (internal and interface) and generator constraints. For simplicity, we make the following assumptions throughout the paper: (i) the system is lossless, and (ii) the cost function ci (·), i ∈ {1, 2}, is quadratic in the form ci (·) = gi⊺ Hi gi +qi gi where matrix Hi is positive definite. Under the single proxy bus system, the net interchange can be modeled explicitly as an additional scalar variable in the optimization problem as follows: (P1 ) min c1 (g1 ) + c2 (g2 ) q,g1 ,g2 subject to 1⊺ (d1 − g1 ) + q = 0, 1⊺ (d2 − g2 ) − q = 0, S1 (d1 − g1 ) + Sq1 q ≤ F1 , S2 (d2 − g2 ) − Sq2 q ≤ F2 , q ≤ Q, g1 ∈ G1 , g2 ∈ G2 , (λ1 ) (λ2 ) (µ1 ) (µ2 ) (µq ) where 1 The net interchange between two neighboring regions is the total amount of power flowing from one operating region to another. ci (·) real-time generation offer function for region i; di vector of forecasted load and renewable generation for region i; q net interchange from region 1 to region 2, if q > 0; from region 2 to region 1, otherwise; gi vector of dispatches for region i; Fi vector of transmission limits for region i; Q interface limit; Gi generator constraints for region i; Sij shift factor matrix of buses in region i to transmission lines in region j; Sqi shift factor vector of buses in region i to the interface; λi shadow price for power balance constraint in region i; µi shadow prices for transmission constraints in region i; µq shadow price for the net interchange constraint. The problem (P1 ) is a centralized formulation for determining the optimal interchange between region 1 and 2. Such an optimization problem requires a coordinator who have full access to all related information of both regions which is unsuitable in the present deregulated electricity markets. As in [7], the centralized problem (P1 ) can be written in a hierarchical form of decentralized optimization as follows. (P2 ) min c1 (g1∗ (q)) + c2 (g2∗ (q)) q subject to q ≤ Q, (µq ) gi∗ (q), i ∈ {1, 2}, is the optimal dispatch for region i, where given the interchange level q. The regional dispatch problem for region 1 is specified as (P21 ) min c1 (g1 ) g1 ∈G1 subject to 1⊺ (d1 − g1 ) + q = 0, (λ1 ) S1 (d1 − g1 ) + Sq1 q ≤ F1 , (µ1 ) and for region 2 as (P22 ) min c2 (g2 ) subject to 1⊺ (d2 − g2 ) − q = 0, (λ2 ) S2 (d2 − g2 ) − Sq2 q ≤ F2 . (µ2 ) Note that the optimization problem involves an outer problem (P2 ) to optimize the interchange level q, and an inner problem that is naturally decomposed into two regional problems, both parameterized by q. In other words, the optimizer and the associated Lagrangian multipliers for (P21 ) and (P22 ) are functions of q, i.e., gi∗ (q), λ∗i (q), µ∗i (q), i ∈ {1, 2}. C. Tie Optimization The key idea of TO is to determine the interchange schedule by intersecting the demand and supply curves. By interchange demand/supply curve we mean the incremental cost of the regional dispatch at the interface, which is essentially the LMP at the proxy bus. Given the interchange level q, the LMP at the proxy bus for region i ∈ {1, 2} is defined as πi (q) = λ∗i (q) + λ∗i (q) µ∗i (q) π1 (q) π∗ π2 (q) ∗ qTO Q q Figure 3: Illustration of TO. Note that function πi (q) is ISO i’s incremental dispatch cost at the interface at the net interchange q, which serves as a supply curve for the exporting ISO or a demand curve for the importing ISO. We use the graphical representation in [2] to illustrate the basic principle of TO. As shown in Figure 3, πi (q) represents the generation supply curve for region i, but π2 (q) is drawn in a descending cost order. In this example, the direction of interface flow2 is from region 1 to region 2; π1 (q) and π2 (q) serve as the supply and demand curve respectively. The ∗ optimal schedule qTO is set at the intersection of the two curves. Note that if this quantity exceeds the interface capacity Q, the schedule should be set at the maximum capacity instead. The interface transmission constraint, in this case, becomes binding and price separation happens between markets. It should also be noted that import or export transactions are settled at the real-time LMP which is calculated at the proxy bus after the delivery. According to [2], the interchange schedule of TO is the optimal solution to (P1 ) (as well as (P2 )). This intuitive argument is a manifestation of a deeper connection between social welfare optimization illustrated in Figure 3 and cost minimization defined by (P1 ). In what follows, we will exploit this connection in the presence of uncertainty. III. A S TOCHASTIC I NTERCHANGE S CHEDULING g2 ∈G2 ⊺ ∗ Sqi µi (q), π (1) are the Lagrangian multipliers asand where sociated with the optimal solution of (P2i ), for i ∈ {1, 2}. So far, we have described the interchange scheduling in a deterministic system setting. We now focus on the incorporation of random load and generation in the scheduling scheme. A. Stochastic Programming Formulation Stochastic optimization is the most common framework to model optimization problems involving uncertainty. Consider the case that load (or stochastic generation, treated as a negative load) is random. The inter-regional interchange scheduling can be formulated as a two-stage stochastic optimization problem. The first stage involves optimizing the net interchange to minimize the expected overall cost (P4 ) min Ed1 ,d2 [c1 (g1∗ (q, d1 )) + c2 (g2∗ (q, d2 ))] q subject to q ≤ Q, (µq ) and the second stage solves the regional optimal dispatch problem given the interchange level q and the realization 2 The direction of interface flow can be determined by comparing the prices at q = 0: if π1 (0) < π2 (0), the power flows from region 1 to 2; otherwise, the direction of interface flow is opposite. interface constraint) is simply the intersection of the expected demand and supply curves. In general, the interchange that maximizes the expected social welfare is given by π Consumer surplus Ed1 [π1 (q, d1 )] π∗ Producer surplus Ed2 [π2 (q, d2 )] ∗ qSTO Q q Figure 4: Illustration of STO. of random load d1 and d2 , which are specified as (P21 ) and (P22 ). Note that the optimal dispatch and the associated Lagrangian multipliers of (P2i ) are parameterized by two factors: the interchange level q and the load realization di . So the LMP πi (q, di ) at the proxy bus is a function of both q and di . Directly solving this problem requires the distribution of the regional cost function ci (q, di ) at each interchange level, and a coordinator to determine the optimal schedule, neither of which is achievable in the present deregulated electricity markets. In general, this two-stage stochastic optimization problem is intractable, especially when the load and renewable generation forecast follows a continuous distribution. The proposed scheduling technique, on the other hand, can solve this problem without increasing the computation complexity of deterministic TO. Details are provided in the next two subsections. B. Social Welfare Optimization The main idea of solving (P4 ) is to exploit the connection between cost minimization and social welfare optimization under uncertainty. With the randomness present in the second stage of (P4 ), it is not obvious how the two-stage optimization problem can be transformed into a corresponding form of social welfare optimization. It turns out that the optimal solution can be obtained by solving a deterministic TO problem using the expected demand and supply functions. We now present an optimization problem from the importexport perspective, but taking into account that both import and export regions must agree on the forward interchange quantity in the presence of future demand and supply uncertainty. Because the interchange quantity is fixed ahead of the actual power delivery, each region may have to rely on its internal resources to compensate uncertainty in real time. To this end, it is reasonable for the export region to maximize its expected producer surplus and the import region to maximize its expected consumer surplus. Without loss of generality, let region 1 be the exporter. For fixed interchange q, let πi (q, di ) be the (random) LMP at the proxy bus. Then Ed1 [π1 (q, d1 )], as a function of interchange q, is the expected supply curve averaged over its internal randomness. Similarly, Ed2 [π2 (q, d2 )] is the expected demand curve averaged over the internal randomness in region 2 at the time of delivery. As shown in Figure 4, the optimal interchange quantity ∗ qSTO that maximizes the expected social welfare (in absence of (P5 ) max q Rq 0 Ed2 [π2 (x, d2 )] − Ed1 [π1 (x, d1 )]dx subject to q ≤ Q. (µq ) To solve (P5 ), each operator needs to compute, for each interchange quantity q, the expected LMP at its own proxy bus. Such a computation requires the conditional expectation of future LMP at the time of delivery. The conditional expectation can be obtained through probabilistic LMP forecast using models for load and generation. See, for example, [16]. It is also conceivable that the conditional expectations can also be approximated via regression analysis. Once the expected demand and supply functions are obtained, solving for the optimal interchange quantity becomes a one-dimensional search. C. Stochastic Tie Optimization In this section, we establish formally the equivalence of (P4 ) and (P5 ) where the solution of (P5 ) solves the stochastic optimization problem (P4 ). Theorem 1. If the optimal dual solutions of (P21 ) and (P22 ) are unique for all q ≤ Q, then (P4 ) and (P5 ) are equivalent in the sense that they have the same optimizer. Theorem 1 provides a new way, we call it Stochastic Tie Optimization (STO), to solve the intractable problem (P4 ). This result is significant because the optimal interchange can be obtained from a deterministic optimization problem (P5 ) which only requires the information of the expected supply and demand curves. Since these price functions are nonconfidential information, (P5 ) can be solved by one of the operators if the other operator shares its price curve. In this way, operators do not need to iteratively update or exchange information within the scheduling procedure. This property is in contrast to most decomposition methods where subproblems are resolved and intermediate results are exchanged in each iteration. Because one-time information exchange is sufficient for the optimal schedule, operators do not need to repeatedly solve regional OPF, which is computationally expensive for sufficiently large systems, within the scheduling procedure. Such a property significantly reduces the computation costs in real time, thereby providing the potential of higher scheduling frequency. Now we provide the proof of Theorem 1. Proof of Theorem 1: We first show the differentiability of the objective functions of (P4 ) and (P5 ). This follows immediately from the well known results in multiparametric quadratic programming summarized in Lemma 1. Lemma 1 ([17]). If the dual problem of (P2i ), i ∈ {1, 2}, is not degenerate for all q ≤ Q, then 1) the optimizer of (P2i ) and associated vector of Lagrangian multipliers are continuous and piecewise affine (affine in each critical region), and 2) the optimal objective of (P2i ) is continuous, convex and piecewise quadratic (quadratic in each critical region). π Ed1 [π1 (q, d1 )] By Lemma 1, the objective function of (P4 ), denoted by J(q), is differentiable with derivative   ∂ ∂ J ′ (q) = Ed1 ,d2 c1 (g1∗ (q, d1 )) + c2 (g2∗ (q, d2 )) ∂q ∂q = Ed1 [π1 (q, d1 )] − Ed2 [π2 (q, d2 )] where the second equality holds by the Envelope Theorem. Lemma 1 also implies that π1 (q, d1 ) and π2 (q, d2 ) are continuous functions, so the objective function of (P5 ), denoted by s(q), is differentiable with derivative s′ (q) = Ed1 [π1 (q ♯ , d1 )] − Ed2 [π2 (q ♯ , d2 )]. Now we derive the connection between the optimal solutions to (P4 ) and (P5 ) from the first order conditions. The optimal solution q ∗ to (P4 ) and the associated Lagrangian multiplier µ∗q satisfy the first order condition for (P4 ): Ed1 [π1 (q ∗ , d1 )] − Ed2 [π2 (q ∗ , d2 )] + µ∗q = 0. (2) Similarly, the optimal solution q ♯ to (P5 ) and the associated Lagrangian multiplier µ♯q satisfy the first order condition for (P5 ) Ed1 [π1 (q ♯ , d1 )] − Ed2 [π2 (q ♯ , d2 )] + µ♯q = 0, (3) which is exactly the same as (2). Finally, we show q ∗ = q ♯ . To prove this, we need the monotonicity of price function πi (q) (with fixed di as defined in (1)) which is summarized in the following lemma whose proof is provided in the appendix. Lemma 2. If the dual problem of (P2i ), i ∈ {1, 2}, has a unique optimal solution for all q ≤ Q, then π1 (q) is monotonically increasing and π2 (q) is monotonically decreasing. Below we show that in each of the following cases, either the case itself is impossible or q ∗ = q ♯ . 1) q ∗ = q ♯ = Q. The statement is trivially true. 2) q ∗ < Q and q ♯ < Q. In this case, the interface constraint is not binding in either problem, so we have µ∗q = µ♯q = 0, which implies that Ed1 [π1 (q ∗ , d1 )] = Ed2 [π2 (q ∗ , d2 )] and Ed1 [π1 (q ♯ , d1 )] = Ed2 [π2 (q ♯ , d2 )]. By Lemma 2 and the preservation of monotonicity under expectation operation, there is a unique solution to Ed2 [π2 (q, d2 )] − Ed1 [π1 (q, d1 )] = 0. Therefore, q ∗ = q ♯ . 3) q ∗ < q ♯ = Q. We construct a solution of (P1 ) using q ♯ and the associated optimal functions defined in (P21 ) and (P22 ), i.e., q ♯ , µ♯q (which is zero), g1∗ (q ♯ ), g2∗ (q ♯ ), λ∗1 (q ♯ ), µ∗1 (q ♯ ), λ∗2 (q ♯ ), µ∗2 (q ♯ ). Note that this solution satisfies the first order conditions for (P1 ), so it is optimal to (P1 ). However, this contradicts the uniqueness of the optimizer to (P1 ). Therefore, this case is impossible. 4) q ♯ < q ∗ = Q. This case is also impossible. The proof follows the logic of that in case 3). To sum up, (P4 ) and (P5 ) are equivalent in the sense that they share the same optimal solution. Ed2 [π2 (q, d2 )] π∗ Ed2 [π̃2 (q, d2 )] ∗ qSCTS Q q Figure 5: Illustration of SCTS. IV. S TOCHASTIC CTS In this section, we incorporate external market participants in STO, which generalizes the CTS proposal currently in implementation. This generalization, we call it Stochastic Coordinated Transaction Scheduling (SCTS), is simply replacing the supply and demand curves used in CTS by their expected values. As in CTS, market participants are allowed to submit requests to buy and sell power simultaneously on each side of the interface. Such request is called interface bid, which includes a price indicating the minimum expected price difference between the two regions that the participant is willing to accept, a transaction quantity and its direction. We use a similar graphical representation of STO to illustrate the scheduling procedure of SCTS. As shown in Figure 5, Ed1 [π1 (q, d1 )] is the expected supply curve of region 1, and Ed2 [π̃2 (q, d2 )] is the adjusted curve of Ed2 [π2 (q, d2 )] by subtracting the aggregated interface bids πbid (q). The SCTS schedule is set at the intersection of Ed1 [π1 (q, d1 )] and ∗ Ed2 [π̃2 (q, d2 )]. All the interface bids to the left of qSCTS are accepted and settled at the real-time LMP difference. The scheduling and clearing procedure described above is summarized as follows: 1) share the expected LMP functions Ed1 [π1 (q, d1 )] and Ed2 [π2 (q, d2 )]; 2) determine the direction of the interchange flow by comparing Ed2 [π2 (0, d2 )] and Ed1 [π1 (0, d1 )]; 3) construct the aggregated interface bid curve πbid (q) which is a stack of all interface bids with the direction determined in step 2) in an increasing order of the submitted price difference; 4) calculate the optimal SCTS schedule from the following optimization problem (P6 ). Rq (P6 ) max 0 Ed2 [π2 (x, d2 )] − Ed1 [π1 (x, d1 )] − πbid (x)dx q subject to q ≤ Q. Note that the only difference between STO and SCTS is the inclusion of interface bids. All other components are identical. This implies that one-time information exchange is sufficient; no iteration between operators is necessary during the scheduling procedure when one operator submits its expected generation supply curve to the other who executes this scheduling and clearing procedure. Region 1 3 1 Table I: Comparison of TO and STO. Region 2 Scenario 5 4 d5 = 250 6 d5 = 200 d5 = 250 0 ≤ g6 ≤ 200 V. E VALUATION In this section, we compare the performance of the proposed STO with that of TO on two systems: a 6-bus system and the IEEE 118-bus system. In particular, we focus on the two most common symptoms of seams: (i) the under-utilization of interface transmission, and (ii) the presence of counterintuitive flows from the high cost region to the low cost region. In both examples, TO uses the certainty equivalent forecast of the stochastic generation, i.e., the mean value, while STO uses the probabilistic forecast, i.e., the distribution. Various scenarios are studied in these two examples. A. Example 1: a 2-region 6-bus system Consider a 2-region 6-bus system as depicted in Figure 6. Generator incremental cost functions, capacity limits, and load levels (the default values) are presented in the figure. All lines are identical except for the maximum capacities: the tie lines (line 2-6 and line 3-4) and the internal transmission lines in region 1 have the maximum capacities of 100 MW, and the internal lines in region 2 have the maximum capacities of 200 MW. The system randomness comes from the wind generator at bus 1 in region 1. The entire network model (the shift factor matrix) is assumed to be known to both ISOs. By default, we chose bus 3 as the proxy bus to represent the network in region 1, and bus 6 to represent the network in region 2. The impact of the location of proxy buses will be further investigated. 1) A baseline: We first tested a baseline with the probabilistic wind forecast distribution N (55, 102 ). Two levels of load were chosen to illustrate the two symptoms of the inefficiency of TO schedule: the first load level d5 = 250 is an example of the counter intuitive flow occurrence, and the second load level d5 = 200 shows the case of the interface under utilization. Results are presented in Figure 7-9 and Table I. Figure 7 shows the generation supply curves of region 1 and region 2 under TO and STO for the two examples, respectively. π1TO is the incremental cost of region 1 to deliver the power to the proxy bus 6 using the forecasted mean 55 of the wind production, and π1STO is the expected incremental cost using the forecast distribution N (55, 102 ). Since there is no randomness in region 2, the supply curves of region 2 for TO and STO are the same in both examples. At the interchange level of STO schedule, the expected overall system cost is minimized in both cases as shown in Figure 8, and the expected prices at the two proxy buses converge in both cases as shown in Figure Price at the proxy bus Figure 6: A 2-region 6-bus system. 55 50 45 55 πTO 1 πTO 2 πSTO 1 40 35 30 140 145 150 155 160 Interchange 165 TO πTO 45 πSTO 2 1 40 35 30 140 170 E[∆π(q ∗ )] −2.13 0 2.38 0 π1 50 (a) d5 = 250. 145 150 155 160 Interchange 165 170 (b) d5 = 200. Figure 7: Generation supply curves. 9. From Table I, the expected price difference at the level of TO schedule in the first example is −2.13$/MWh, which means that the expected price of the importing region (region 2) is lower then that of the exporting region. This implies that the interchange is scheduled from a high cost region to a low cost region, which is counter intuitive. On the other hand, in the second example, the expected price difference at the interchange level of TO schedule is 2.38$/MWh, i.e., the marginal price of the importing region is higher than that of the exporting region. With this price difference, increasing the interchange level can further reduce the expected overall cost, which implies the interchange capacity is under utilized. Because the interchange level of STO schedule is optimal as its design, any schedule more than this optimal level will cause the counter intuitive flow, and any schedule less than that will lead to the interface under utilization. 2) Impact of forecast uncertainty: The impact of the forecast uncertainty level was then investigated by varying the standard deviation σ of the probabilistic wind production forecast w ∼ N (55, σ 2 ). Loads were set at the default values given in Figure 6. Results are presented in Figure 10. The interchange level of TO schedule does not change with σ since it only uses the mean value 55 of the wind production forecast. STO, on the other hand, captures the uncertainty level of the probabilistic forecast and adjusts the interchange schedule accordingly. The expected overall cost increases with 6950 Expected overall cost 2 + 45g c6 = 0.01g6 6 d2 = 30 Price at the proxy bus 2 0 ≤ g3 ≤ 200 0 ≤ g4 ≤ 100 2 + 40g c = 0.01g2 + 30g c3 = 0.01g3 4 3 4 4 E[Cost(q ∗ )] 6794.2 6790.8 4621.6 4608.6 q∗ 166.5 162.8 147.5 151.4 4800 Expected overall cost 0 ≤ g1 ≤ 120 2 + 10g c1 = 0.01g1 1 Method TO STO TO STO 6900 6850 6800 6750 140 145 150 155 160 Interchange (a) d5 = 250. 165 170 4750 4700 4650 4600 140 145 150 155 160 Interchange 165 170 (b) d5 = 200. Figure 8: Expected overall cost: TO is marked by the blue square and STO by the red circle. 10 0 −5 140 145 150 155 160 Interchange 165 0 Scenario −5 p = (0.1, 0.9) −10 −15 140 170 (a) d5 = 250. p = (0.5, 0.5) 145 150 155 160 Interchange 165 170 p = (0.9, 0.1) (b) d5 = 200. Figure 9: Expected price difference: TO is marked by the blue square and STO by the red circle. TO STO 164 162 160 158 0 5 10 15 Forecast uncertainty level (σ) (a) Interchange. 20 6840 6820 E[∆π(q ∗ )] -0.25 0 -0.29 0 0.28 0 πTO 2 38 πSTO 1 πSTO 2 37 36 x 10 1.0486 1.0484 1.0482 1.048 1.0478 1.0476 200 220 240 Interchange 6760 0 5 10 15 Forecast uncertainty level (σ) B. Example 2: a 2-region 118-bus system We divided the standard IEEE 118 bus system3 into two regions: region 1 includes bus 1-12 and region 2 bus 13-118. Generator incremental cost functions, capacity limits, and load levels are the default values given in MATPOWER [18]. We imposed the maximum capacity of 50 MW on line 4, 6, 58 and 60. The interface transmission was not limited by default, but the impact of the interface constraint will be studied. Bus 6 and 42 were selected as the proxy buses to represent the adjacent region’s network. To introduce randomness in the system, we assumed that three wind generators, located at bus 6, 42, and 60, produce power according to a discrete distribution. Specifically, denote the wind production by w, and the probabilistic forecast consists of a probability mass function p and two levels of wind: w = (10, 10, 10) and w′ = (100, 200, 200). We considered three scenarios: a high wind scenario p = (0.1, 0.9), a medium wind scenario p = (0.5, 0.5), and a low wind scenario p = (0.9, 0.1). TO uses the mean value (91, 181, 181), (55, 105, 105) and (19, 29, 29) for each respective scenario. 1) A baseline: In this case, we verified the optimality of STO schedule with the presence of discrete randomness. All three wind scenarios were tested. Results are shown in Figure 11-13 and Table II. Since all generation cost functions are quadratic, the price functions are continuous and piecewise affine. The performances of TO and STO schedule are similar to that in the 6-bus system example. The expected overall cost is minimized at the STO schedule in all three cases, as indicated by the red bus and branch indices are referred to [18]. 200 220 240 Interchange 260 (b) Expected overall cost. Figure 11: High wind scenario p = (0.1, 0.9). (b) Expected overall cost. the forecast uncertainty, which is observed in both TO and STO. When there is no uncertainty (σ = 0), the schedules of TO and STO are the same and so do their costs. 1.0474 260 (a) Generation supply curves. 20 Figure 10: Impact of the forecast uncertainty (σ). 3 All 39 35 6780 6740 E[Cost(q ∗ )] 104751.6 104750.9 109798.1 109797.1 114806.8 114805.8 1.0488 πTO 1 6800 circles in Figure 11-13, and the prices converge at the schedule of STO, as shown in Table II. As for TO schedules, the counter intuitive flows are observed in the high wind and medium wind scenario, and the interface under utilization happens in the low wind scenario. 2) Impact of interface congestion: To investigate the impact of the interface congestion, we tested all three wind scenarios again under the same setting except the interface capacity which was set as 250 MW in this case. From the results shown in Table III, the presence of the interface constraint only influences the performances in the high wind scenario. The price separation happens in both TO and STO, because the binding interface constraint prevents the economic interface flow. 5 x 10 40 Price at the proxy bus TO STO πTO 1.0984 1 TO π2 πSTO 1 STO π2 39 38 37 1.0983 1.0982 1.0981 1.098 36 200 220 240 Interchange 260 200 (a) Generation supply curves. 220 240 Interchange 260 (b) Expected overall cost. Figure 12: Medium wind scenario p = (0.5, 0.5). 5 x 10 40.5 Price at the proxy bus Interchange 166 Expected overall cost 6860 q∗ 268.6 263.1 242.6 236 197 204 5 40 Price at the proxy bus 168 Method TO STO TO STO TO STO Expected overall cost 5 Table II: Comparison of TO and STO. 5 Expected overall cost 10 πTO 1 40 1.1488 πTO 2 39.5 πSTO 1 39 πSTO 2 Expected overall cost Expected price difference Expected price difference 15 38.5 38 37.5 200 220 240 Interchange 260 (a) Generation supply curves. 1.1486 1.1484 1.1482 1.148 200 220 240 Interchange 260 (b) Expected overall cost. Figure 13: Low wind scenario p = (0.9, 0.1). Table III: Impact of interface congestion. Scenario p = (0.1, 0.9) p = (0.5, 0.5) p = (0.9, 0.1) q∗ 250 250 242.6 236 197 204 Method TO STO TO STO TO STO E[Cost(q ∗ )] 104754.8 104754.8 109798.1 109797.1 114806.8 114805.8 E[∆π(q ∗ )] 0.6 0.6 -0.29 0 0.28 0 By Lemma 1, πi (q) is affine in each critical region, so the derivative of πi (q) exists. In addition, ci (gi∗ (q)) is quadratic, which implies that the second derivative of ci (gi∗ (q)) (the derivative of πi (q)) with respect to q is positive. Therefore, π1 (q) is monotonically increasing and π2 (q) is monotonically decreasing within each critical region. Lemma 1 indicates that πi (q) is continuous for all q ≤ Q, so the monotonicity of πi (q) is preserved for all q ≤ Q. R EFERENCES 3) Impact of proxy bus location: We finally tested the impact of proxy bus location in the medium wind scenario, i.e. p = (0.5, 0.5). Tie line bus and internal bus (wind bus) were selected as the proxy buses. From the results presented Table IV: Impact of the proxy bus location. Internal Bus Tie Line Bus Proxy Bus (1,118) (6,42) (8,30) (11,13) (12,14) (12,16) (12,117) q∗ TO 244.1 242.6 253 78.4 28.8 34 16.8 STO 238.1 236 271 126.5 -15.4 4.7 -23.3 E[Cost(q ∗ )] TO STO 109780.5 109779.7 109798.1 109797.1 109569.8 109565.3 110595.1 110540.4 110865.5 110828.6 110847.2 110833.4 110890.5 110785.7 in Table IV, we observe that the interchange schedule and the associated expected cost are very sensitive to the location of the proxy bus in both TO and STO. With different selections of the proxy bus, the direction of the interchange schedule can be different, for example, (1,118) and (12, 117). Although there are several considerations that can guide the choice of proxy bus location [15], no theoretical results show a universal selection rule. VI. C ONCLUSION This paper presents a stochastic interchange scheduling technique that incorporates load and renewable generation uncertainties. Using the forecast of the expected LMP at the proxy bus, the proposed approach obtains the optimal interchange schedule from a deterministic optimization problem that maximizes the expected economic surplus. The essence of this technique is providing a way to reduce a two-stage stochastic optimization problem into a deterministic optimization problem with an one-dimensional decision. In addition, the proposed technique does not require any iteration between operators during the scheduling procedure. A one-time information exchange is sufficient for the optimal scheduling. A PPENDIX Proof of Lemma 2: Denote the Lagrangian function for (P2i ) by L2i , i ∈ {1, 2}. By Lemma 1, ci (gi∗ (q)) is convex and quadratic in each critical region, so the derivative exists. By the Envelope Theorem, ∂L21 ∂c2 (g2∗ (q)) ∂L22 ∂c1 (g1∗ (q)) = = π1 (q), = = −π2 (q). ∂q ∂q ∂q ∂q [1] Y. Ji and L. Tong, “Stochastic coordinated transaction scheduling,” in Proc. of IEEE PES General Meeting, 2015, pp. 1–5. [2] ISO New England and New York ISO. Inter-regional interchange scheduling (IRIS) analysis and options. [Online]. Available: http:// www.iso-ne.com/pubs/whtpprs/iris white paper.pdf [3] FERC Approves Coordinated Transaction Scheduling Between New York ISO and ISO New England, http://www.iso-ne.com/nwsiss/pr/ 2012/final iso ne nyiso cts.pdf. [4] FERC Approves Coordinated Transaction Scheduling for PJM and NYISO, http://www.pjm.com/∼ /media/about-pjm/newsroom/2014-releases/ 20140313-coordinated-transaction-scheduling-PJM-NYISO.ashx. [5] A. J. Conejo, E. Castillo, R. Minguez, and R. Garcia-Bertrand, Decomposition techniques in mathematical programming: engineering and science applications. Springer Science & Business Media, 2006. [6] F. Zhao, E. Litvinov, and T. Zheng, “A marginal equivalent decomposition method and its application to multi-area optimal power flow problems,” IEEE Transactions on Power Systems, vol. 1, no. 29, pp. 53–61, 2014. [7] R. Baldick and D. Chatterjee, “Coordinated dispatch of regional transmission organizations: Theory and example,” Computers & Operations Research, vol. 41, pp. 319–332, 2014. [8] Z. Li, W. Wu, M. Shahidehpour, and B. Zhang, “Adaptive robust tieline scheduling considering wind power uncertainty for interconnected power systems,” IEEE Transactions on Power Systems, 2015. [9] J. Chen, J. S. Thorp, and T. D. Mount, “Coordinated interchange scheduling and opportunity cost payment: a market proposal to seams issues,” in Proc. of the 37th Annual Hawaii International Conference on System Sciences, 2004. [10] M. Ilic and J. Lang. Methods of Selecting the Desired Net Interchange (DNI) Across Multi-Control Areas: Demonstration of Seams Solution for Large-Scale NPCC . [Online]. Available: http://www.ferc.gov/ CalendarFiles/20120627090023-Wednesday SessionA Ilic.pdf [11] B. H. Kim and R. Baldick, “Coarse-grained distributed optimal power flow,” IEEE Transactions on Power Systems, vol. 12, no. 2, pp. 932–939, 1997. [12] A. J. Conejo and J. A. Aguado, “Multi-area coordinated decentralized dc optimal power flow,” IEEE Transactions on Power Systems, vol. 13, no. 4, pp. 1272–1278, 1998. [13] M. D. Cadwalader, S. M. Harvey, S. L. Pope, and W. W. Hogan, “Market coordination of transmission loading relief across multiple regions,” Cambridge, MA: Center for Business and Government, Harvard University, 1998. [14] A. Ahmadi-Khatir, A. J. Conejo, and R. Cherkaoui, “Multi-area energy and reserve dispatch under wind uncertainty and equipment failures,” IEEE Transactions on Power Systems, vol. 28, no. 4, pp. 4373–4383, 2013. [15] S. Harvey, “Proxy buses, seams and markets [draft],” 2003, http://www. hks.harvard.edu/hepg/Papers/Harvey Proxy.Buses.Seams.Markets 523-03.pdf. [16] Y. Ji, L. Tong, and R. J. Thomas, “Probabilistic forecast of real-time lmp and network congestion,” arXiv preprint arXiv:1503.06171, 2015. [17] F. Borrelli, A. Bemporad, and M. Morari. (2014) Predictive control for linear and hybrid systems. [Online]. Available: http://www.mpc. berkeley.edu/mpc-course-material [18] R. D. Zimmerman. MATPOWER: A MATLAB power system simulation package. [Online]. Available: http://www.pserc.cornell.edu/matpower/
3cs.SY
The Parametric Closure Problem David Eppstein arXiv:1504.04073v2 [cs.DS] 12 Sep 2017 Computer Science Department, Univ. of California, Irvine, USA Abstract. We define the parametric closure problem, in which the input is a partially ordered set whose elements have linearly varying weights and the goal is to compute the sequence of minimum-weight downsets of the partial order as the weights vary. We give polynomial time solutions to many important special cases of this problem including semiorders, reachability orders of bounded-treewidth graphs, partial orders of bounded width, and series-parallel partial orders. Our result for series-parallel orders provides a significant generalization of a previous result of Carlson and Eppstein on bicriterion subtree problems. 1 Introduction Parametric optimization problems are a variation on classical combinatorial optimization problems such as shortest paths or minimum spanning trees, in which the input weights are not fixed numbers, but vary as functions of a parameter. Different parameter settings will give different weights and different optimal solutions; the goal is to list these solutions and the intervals of parameter values within which they are optimal. As a simple example, consider maintaining the minimum of n input values, which change as a parameter controlling these values changes. This parametric minimum problem can be formalized as the problem of constructing the lower envelope of functions that map the parameter value to each input value. When these are linear functions this is the problem of constructing the lower envelope of lines, equivalent by projective duality to a planar convex hull [31]; the lower envelope has linear complexity and can be constructed in time O(n log n). As well as the obvious applications of parametric optimization to real-world problems with time-varying but predictable data (such as rush-hour route planning), parametric optimization problems have another class of applications, to bicriterion optimization. In bicriterion problems, each input element has two numbers associated with it. A solution value is obtained by summing the first number for each selected element, separately summing the second number for each selected element, and evaluating a nonlinear combination of these two sums. For instance, each element’s two numbers might be interpreted as the x and y coordinates of a point in the plane associated with the element, and we might wish to find the solution whose summed x and y coordinates give a point as close to the origin as possible. The two numbers might represent the mean and variance of a normal distribution, and we might wish to optimize some function of the summed distribution. The two numbers on each element might represent an initial investment cost and expected profit of a business opportunity, and we might wish to find a feasible combination of opportunities that maximizes the return on investment. Or, the two numbers might represent the cost and log-likelihood of failure of a communications link, and we might wish to find a low-cost communications network with high probability of success. Many natural bicriterion optimization problems of this type can be expressed as finding the maximum of a quasiconvex function of the two sums (a function whose lower level sets are convex sets) or equivalently as finding the minimum of a quasiconcave function of the two sums. When this is the case, the optimal solution can always be obtained as one of the solutions of a parametric problem on only one variable, defined by re-interpreting the two numbers associated with each input element as the slope and y-intercept of a linear function that gives the weight of that element (a single number) as a function of the parameter [9, 25]. In this way, any algorithm for solving a parametric optimization problem can also be used to solve bicriterion versions of the same type of optimization problem. Even though the bicriterion problem might combine its two numbers in a nonlinear way, the corresponding parametric problem uses linearly varying edge weights. In this paper we formulate and provide the first study of the parametric closure problem, the natural parametric variant of a classical optimization problem, the maximum closure problem [21, 35]. 1.1 Closures and parametric closures A closure in a directed graph is a subset of vertices such that all edges from a vertex in the subset go to another vertex in the subset; the maximum closure problem is the problem of finding the highest-weight closure in a vertex-weighted graph. Equivalently we seek the highest-weight downset of a weighted partial order, where a downset is a subset of the elements of a partial order such that if x < y in the order, and y belongs to the subset, then x also belongs to the subset. A partial order can be converted to an equivalent directed graph by considering each element of the order as a vertex, with an edge from y to x whenever x < y in the order (note the reversed edge direction from the more usual conventions). In the other direction, given a directed graph, one may obtain an equivalent partial order on the strongly connected components of the graph, where component x is less than component y in the partial order whenever there is a path from a vertex in y to a vertex in x in the graph. One of the classical applications of this problem involves open pit mining [27], where the vertices of a directed graph represent blocks of ore or of covering material that must be removed to reach the ore, edges represent ordering constraints on the removal of these blocks, and the weight of each vertex represents the net profit or loss to be made by removing that block. Other applications of this problem include military attack planning [34], freight depot placement [4, 37], scheduling with precedence constraints [11, 26], image segmentation [2, 19], stable marriage with maximum satisfaction [22], and treemap construction in information visualization [8]. Maximum closures can be found in polynomial time by a reduction to maximum flow [20, 35] or by direct algorithms [16]. In the parametric closure problem, we assign weights to the vertices of a directed graph (or the elements of a partial order) that vary linearly as functions of a parameter, and we seek the closures (or downsets) that have maximum weight for each possible value of the parameter (Figure 1). For instance, in the open pit mining problem, the profit or loss of a block of ore will likely vary as a function of the current price of the refined commodity produced from the ore. So, a parametric version of the open pit mining problem can determine a range of optimal mining strategies, depending on how future commodity prices vary. As described above, an algorithm for parametric closures can also solve bicriterion closure problems of maximizing a quasiconvex function (or minimizing a quasiconcave function) of two sums of values. Although we have not been able to resolve the complexity of the parametric closure problem in the general case, we prove near-linear or polynomial complexity for several important special cases of this problem. 1.2 Related work Previous work on parametric optimization has considered parametric versions of two standard network optimization problems, the minimum spanning tree problem and the shortest path problem. The parametric minimum spanning tree problem (with linear edge weights) has polynomially many solutions that can be constructed in polynomial time [1, 15, 18]. In contrast, the parametric shortest path problem is not polynomial, at least if the output must be represented as an explicit list of paths: it has a number of solutions and running time that are exponential in log2 n on n-vertex graphs [10]. We do not know of previous work on the general parametric closure problem, but two previous papers can be seen in retrospect as solving special cases: c: –7p + 10 a: 8p – 6 p = 0.5 6.5 10 –2 –13.5 abcd: 1 d: 8p + 6 b: –7p – 10 p=2 –4 10 a: 10 p = 10 22 –60 86 –24 74 –80 abd: 80 Fig. 1. In a partially ordered set with weights that vary linearly as a function of the parameter p, different choices of p lead to different maximum-weight downsets. – Lawler [26] studied scheduling to minimize weighted completion time with precedence constraints. He sought the closure that maximizes the ratio x/y of the priority x and processing time y of a job or set of jobs, and used this closure to decompose instances of this problem into smaller subproblems. Instead of using the reduction from bicriterion to parametric problems, Lawler showed that the optimal closure can be found in polynomial time by a binary search where each step involves the solution of a weighted closure problem. Replacing the binary search by Megiddo’s parametric search [32] would make this algorithm strongly polynomial. Both search methods depend on the specific properties of the ratio function, however, and cannot be extended to other bicriterion problems. – Carlson and Eppstein [9] consider bicriterion versions of the problem of finding the best subtree (containing the root) of a given rooted tree with weighted edges. As they show, many such problems can be solved in time O(n log n). Although Carlson and Eppstein did not formulate their problem as a closure problem, the root-containing subtrees can be seen as closures for a directed version of the tree in which each edge is directed towards the root. The reachability ordering on this directed tree is an example of a series-parallel partial order, and we greatly generalize the results of Carlson and Eppstein in our new results on parametric closures for arbitrary series-parallel partial orders. 1.3 Parametric optimization as an implicit convex hull problem Parametric optimization problems can be formulated dually, as problems of computing convex hulls of implicitly defined two-dimensional point sets (Figure 2). Suppose we are given a parametric optimization problem in which weight of element i is a linear function ai λ + bi of a parameter λ, Ø: 0,0 abcd c: –7p + 10 d: 8p + 6 abc abcd: 2,0 bd: 1,–4 abd abc: –6,–6 ab a: 8p – 6 b: –7p – 10 a a: 8,–6 bd b: –7,–10 b abd: 9,–10 Ø ab: 1,–16 Fig. 2. An instance of the parametric closure problem. Left: The Hasse diagram of a partially ordered set N of four elements, each with a weight that varies linearly with a parameter p. Center: The distributive lattice down(N ) of downsets of N . Right: The point set project(down(N )) and its convex hull. The upper hull (dashed) gives in left-to-right order the sequence of six distinct maximum-weight closures as the parameter p varies continuously from −∞ to +∞. and in which the weight of a candidate solution S (a subset of elements, constrained by the specific optimization problem in question) is the sum of these functions. Then the solution value is also a linear function, whose coefficients are the sums of the element coefficients: ! ! X X X ai λ + bi = ai λ + bi . i∈S i∈S i∈S Instead of interpreting the numbers ai and bi as coefficients of linear functions, we may re-interpret the same two numbers as the x and y coordinates (respectively) of points in the Euclidean plane. In this way any family F of candidate solutions determines a planar point set, in which each set in F corresponds to the point given by the sum of its elements’ coefficients. We call this point set project(F), because the sets in F can be thought of as vertices of a hypercube Qn = {0, 1}n whose dimension is the number of input elements, and project determines a linear projection from these vertices to the Euclidean plane. Let hull(project(F)) denote the convex hull of this projected planar point set. Then for each parameter value the set in F minimizing or maximizing the parameterized weight corresponds by projective duality to a vertex of the hull, and the same is true for the maximizer of any quasiconvex function of the two sums of coefficients ai and bi . Thus, parametric optimization can be reformulated as the problem of constructing this convex hull, and bicriterion optimization can be solved by choosing the best hull vertex. 1.4 New results For an arbitrary partially ordered set P , define down(P ) to be the family of downsets of P . Let P be parametrically weighted, so that project(down(P )) is defined. As a convenient abbreviation, we define polygon(P ) = hull(project(down(P ))). This convex polygon represents the solution to the parametric closure problem for the given weights on P . We consider the following classes of partially ordered sets. For each partial order P in one of these classes, we prove polynomial bounds on the complexity of polygon(P ) and on the time for constructing polygon(P ). These results imply the same time bounds for parametric optimization over P and for maximizing a quasiconvex function (bicriterion optimization) over P . Semiorders. This class of partial orders was introduced to model human preferences [30] in which each element can be associated with a numerical value, pairs of elements whose values are within a fixed margin of error are incomparable, and farther-apart pairs are ordered by their numerical values. They are equivalently the interval orders with intervals of unit length, or the proper interval orders (interval orders in which no interval contains another). For such orderings, we give in Section 3 a bound of O(n log n) on the complexity of polygon(P ) and we show that it can be constructed in time O(n log2 n) using an algorithm based on the quadtree data structure. Series-parallel partial orders. These are orders formed recursively from smaller orders of the same type by two operations: series compositions (in which all elements from one order are placed earlier in the combined ordering than all elements of the other order) and parallel compositions (in which pairs of one element from each ordering are incomparable). These orderings have been applied for instance in scheduling applications by Lawler [26]. For such orderings, the sets of the form polygon(P ) have a corresponding recursive construction by two operations: the convex hull of the union of two convex polygons, and the Minkowski sum of two convex polygons. It follows that polygon(P ) has complexity O(n). This construction does not immediately lead to a fast construction algorithm, but in Section 4 we adapt a splay tree data structure [39] to construct polygon(P ) in time O(n log n). Our previous results for optimal subtrees [9] follow as a special case of this result. Bounded treewidth. Suppose that partial order P has n elements and its transitive reduction (the covering graph of P ) forms a directed acyclic graph whose undirected version has treewidth t. (For prior work on treewidth of partial orders, see [24]; for prior work on parametric optimization on graphs of bounded treewidth, see [17].) Then we show in Section 5 that polygon(P ) has polynomially many vertices, with exponent t + 2, and that it can be constructed in polynomial time. Incidence posets. The incidence poset of a graph G has the vertices and edges as elements, with an order relation x ≤ y whenever x is an endpoint of y. One of the initial applications for the closure problem concerned the design of freight delivery systems in which a certain profit could be expected from each of a set of point-to-point routes in the system, but at the cost of setting up depots at each endpoint of the routes [4,37]; this can be modeled with an incidence poset for a graph with a vertex at each depot location and an edge for each potential route. Since the profits and costs have different timeframes, it is reasonable to combine them in a nonlinear way, giving a bicriterion closure problem. The transitive reduction of an incidence poset is a subdivision of G with the same treewidth, so our technique for partial orders of bounded treewidth also applies to incidence posets of graphs of bounded treewidth. Fences, generalized fences, and polytrees. The fences or zigzag posets are partial orders whose transitive reduction is a path with alternating edge orientations. A generalized fence may be either an oriented path (an up-down poset) [33] or an oriented tree (polytree) [38]. Polynomial bounds on the complexity and construction time for polygon(P ) for all of these classes of partial orders follow from the result for treewidth t = 1. However, in these cases we simplify the bounded-treewidth construction and provide tighter bounds on these quantities (Theorem 3 and Theorem 4). Bounded width. The width of a partial order is the maximum number of elements in an antichain, a set of mutually-incomparable elements. Low-width partial orders arise, for instance, in the edit histories of version control repositories [5]. The treewidth of a partial order is less than twice its width,1 but partial orders of width w have O(nw ) downsets, tighter than the bound that would be obtained by using treewidth. We use quadtrees to show more strongly in Section 6 that in 1 To obtain a path-decomposition of width 2w − 1 from a partial order of width w, consider any linear extension of the partial order, partition the partial order into a downset and an upset at each position of the linear extension, Fig. 3. Two convex polygons P and Q (left), the convex hull of their union P d Q (center), and their Minkowski sum P ⊕ Q (right). this case polygon(P ) has O(nw−1 + n log n) vertices and can be constructed in time within a logarithmic factor of this bound. We have been unable to obtain an example of a family of partial orders with a nonlinear lower bound on the complexity of polygon(P ), nor have we been able to obtain a nontrivial upper bound on the hull complexity for unrestricted partial orders. Additionally, we have been unable to obtain polynomial bounds on the hull complexity of the above types of partial orders for more than one parameter (i.e., for weights of dimension higher than two). We also do not know of any computational complexity bounds (such as NP-hardness) for the parametric closure problem for any class of partial orders in any finite dimension. We leave these problems open for future research. 2 Preliminaries: Minkowski sums and hulls of unions Our results on the complexity of the convex polygons polygon(P ) associated with a partial order hinge on decomposing these polygons recursively into combinations of simpler polygons. To do this, we use two natural geometric operations that combine pairs of convex polygons to produce more complex convex polygons. Definition 1. We define a convex polygon to be the convex hull of a nonempty finite set of points in the Euclidean plane. A vertex of the polygon is a point that can be obtained as the intersection of the polygon with a closed halfplane, and an edge of the polygon is a line segment that can be obtained as the intersection of the polygon with a closed halfplane. This definition requires us to include two degenerate special cases: we consider a single point to be a degenerate convex polygon with one vertex and no edges, and we consider a line segment to be a degenerate convex polygon with two vertices and one edge. Definition 2. For any two convex polygons P and Q, let P ⊕ Q denote the Minkowski sum of P and Q (the set of points that are the vector sum of a point in P and a point in Q), and let P d Q denote the convex hull of the union of P and Q (Figure 3). Lemma 1 (folklore). If convex polygons P and Q have p and q vertices respectively, then P ⊕ Q and P d Q have at most p + q vertices, and can be constructed from P and Q in time O(p + q). and form the sequence of sets that are the union of the maxima of a downset and the minima of the complementary upset. Proof. The complexity bound on P ⊕ Q follows from the fact that the set of edge orientations of P ⊕ Q is the union of the sets of edge orientations of P and of Q. Therefore, P ⊕ Q has at most as many edges as the sum of the numbers of edges in P and Q. The result follows from the fact that in any convex polygon, the numbers of vertices and edges are equal (except for the degenerate special cases, with one more vertex than edges). To compute P ⊕ Q from P and Q, we may merge the two cyclically-ordered lists of edge orientations of the two polygons in linear time, and then use the sorted list to trace out the boundary of the combined polygon. Similarly, the complexity bound on P d Q follows from the fact that its vertex set is a subset of the union of the vertices in P and the vertices in Q. Therefore, its number of vertices is at most the sum of the numbers of vertices of P and Q. To compute P d Q from P and Q in linear time, it is convenient to partition each convex hull into its lower hull and upper hull, two monotone polygonal chains, by splitting it at the leftmost and rightmost vertex of the hull. We may sort the vertices of the upper hulls by doing a single merge in linear time, apply Graham scan to the sorted list, and do the same for the lower hulls. t u Corollary 1. Suppose that P is a convex polygon, described as a formula that combines a set of n points in the plane into a single polygon using a sequence of ⊕ and d operations. Suppose in addition that, when written as an expression tree, this formula has height h. Then P has at most n vertices and it may be constructed from the formula in time O(nh). More complex data structures can reduce this time to O(n log n); see Section 4. In higher dimensions, the convex hull of n points and Minkowski sum of n line segments both have polynomial complexity with an exponent that depends linearly on the dimension. However, we do not know of an analogous bound on the complexity of convex sets formed by mixing Minkowski sum and hull-of-union operations. If such a bound held, we could extend our results on parametric closures to the corresponding higher dimensional problems. 3 Semiorders A semiorder is a type of partial order defined by Luce [30] to model human preferences. Each element of the order can be associated with a numerical value, which in the application to preference modeling is the utility of that element to the person whose preferences are being modeled. For pairs of items whose utilities are sufficiently far from each other, the ordering of the two items in the semiorder is the same as the numerical ordering of their utilities. However, items whose utilities are within some (global) margin of error of each other are incomparable in the semiorder. More formally: Definition 3. Let a collection of items xi be given, with numerical utilities ui , together with a (global) threshold θ > 0. Then this information determines a partial order in which xi ≤ xj whenever ui ≤ uj − θ. The partial orders that can be obtained in this way are called the semiorders. We will call θ the margin of error of the semiorder. (We note that some authors use irreflexive binary relations, instead of partial orders, to define semiorders; this distinction will not be important for us.) Similar concepts of comparisons of numerical values with margins of error give rise to semiorders in many other areas of science and statistics [36]. For efficient computations on semiorders we will assume that the utility values of each element are part of the input to an algorithm, and that the margin of error has been normalized to one. For instance, the semiorder N of Figure 2 can be represented as a semiorder with utilities 2/3, 0, 2, and 4/3 for a, b, c, and d respectively. With this information in hand, the comparison between any two elements can be determined in constant time. If only the ordering itself is given, numerical utility values can be constructed from it in time O(n2 ) [3]. The concept of a downset is particularly natural for a semiorder: it is a set of elements whose utility values could lie below a sharp numerical threshold, after perturbing each utility value by at most half the margin of error. In this way, the closure problem (the problem of finding a maximum weight downset) can alternatively be interpreted as the problem of finding the maximum possible discrepancy of a one-dimensional weighted point set in which the location of each point is known imprecisely. Thus, this problem is related to several other recent works on geometric computations with imprecise points (see, e.g., [28, 29]). Semiorders may have exponentially many downsets; for instance, if all items have utilities that are within one unit of each other, all sets are downsets. Nevertheless, as we show in this section, if S is a semiorder, then the complexity of polygon(S) (the number of downsets that are optimal for some parameter value) is O(n log n). 3.1 Mapping downsets to a grid If S is any parametrically weighted semiorder, we may write the sorted order of the utility values of elements of S as u0 , u1 , . . . , un−1 where n = |S|, and we may write the elements themselves (in the same order) as x0 , x1 , . . . , xn−1 . By scaling the utility values we may assume without loss of generality that the threshold θ used to define a semiorder from these values is set as θ = 1. By padding S with items that have a fixed zero weight and a utility that is smaller than that of the elements by more than the margin of error, we may additionally assume without loss of generality that n is a power of two without changing the values of the parametric closure problem on S. It is convenient to parameterize downsets by pairs of integers, as follows. Definition 4. Let L be an arbitrary downset in down(S). Let j be the largest index of an element xj of L. Let i be the smallest index of an element xi such that xi does not belong to L and i < j, or −1 if no such element exists. Define extremes(L) to be the pair of integers (i + 1, j). Thus, extremes maps the family down(S) to the integer grid [0, n − 1]2 . The mapping is many-toone: potentially, many downsets may be mapped to each grid point. However, not every grid point is in the image of down(S). In particular, a point (i, j) with i > j cannot be the image of a downset, because the element defining the first coordinate of extremes must have an index smaller than the element defining the second coordinate. Additionally, when i > 0, a point (i, j) with ui−1 < uj − 1 (i.e. with utility values that are beyond the margin of error for the semiorder) also cannot be the image of a downset, because in this case xi−1 ≤ xj in the semiorder, so every downset that includes xj also includes xi−1 . Thus, the image of extremes lies in an orthogonally convex subset of the grid, bounded below by its main diagonal and above by a monotone curve (Figure 4). Definition 5. Let s be any square subset of the integer grid [0, n − 1]2 , and define subproblem(s) to be the partially-ordered subset of the semiorder S consisting of the elements whose indices are among the rows and columns of s. Define free(s) to be the (unordered) set of elements of S that do not belong to subproblem(s), but whose indices are between pairs of indices that belong to subproblem(s). Define below(s) to be the set of elements of S whose indices are smaller than all elements of subproblem(s). (See Figure 4, left, for an example.) 3.2 Decomposition of grid squares These definitions allow us to decompose the downsets that are mapped by extremes to the given square s. beyond the margin of error n–1 s be lo w (s ) fre e( s) n–1 0 0 indices out of order n–1 0 0 n–1 Fig. 4. The grid [0, n − 1]2 , with the two regions that cannot be part of the image of extremes. The left image shows a square subproblem s and free(s); the right image shows the quadtree decomposition of the grid used to prove Theorem 1. Lemma 2. Given a square s, suppose that the subfamily F of down(S) that is mapped by extremes to s is nonempty. Then each set in F is the disjoint union of three sets: a nonempty downset of subproblem(s), the set below(s), and an arbitrary subset of free(s). Proof. Any downset of S must remain a downset in any subset of S, and in particular its intersection with subproblem(s) must also be a downset. Additionally, it is not possible for a set in F to omit any member of below(s), nor to include any element outside subproblem(s) ∪ below(s) ∪ free(s), for then it would not be mapped into s by extremes. Similarly, the condition on the row index of the largest element of subproblem(s) must be met, or again extremes would map the given set outside of s. Therefore, every set in F has the form described. t u Conversely, let a set be formed as the disjoint union of a nonempty downset of subproblem(s), below(s), and an arbitrary subset of free(s). Then this set is necessarily a downset, although it might not be mapped by extremes to s (depending on the choice of the downset of subproblem(s) in the disjoint union). We can decompose the convex hull of the projections of these downsets into a contribution from the subproblem of s and another contribution from the free set of s. The contribution from the free set has a simple structure based on Minkowski sums: Lemma 3. For any square s, let powerset(free(s)) be the family of all subsets of free(s). Let weight function w : S → R2 define a projection project from families of sets to point sets in R2 . Then project(powerset(free(s))) is the Minkowski sum of the sets {(0, 0), w(xi )} for xi ∈ free(s). Its convex hull is a centrally symmetric convex polygon hull(project(powerset(free(s)))) (the Minkowski sum of the corresponding line segments) with at most k = 2| free(s)| sides (fewer if some of these line segments are collinear), and can be constructed in time O(k log k). Proof. The fact that project(powerset(free(s))) is a Minkowski sum of line segments can be proved by induction on the number of members of free(s): for any particular element x, the subfamilies of downsets that include or exclude x project to translates of the same Minkowski sum, by the induction hypothesis, and the convex hull of the union of these two translates is the same thing as the Minkowski sum with one more line segment. The bounds on the number of sides and construction time follow immediately from Corollary 1, using the fact that the Minkowski sum of these segments can be expressed as a tree of binary Minkowski sums of logarithmic height. t u The O(k log k) time bound in Lemma 3 can be reduced. The algorithm described, using a balanced tree of binary Minkowski sums, can be interpreted as performing a merge sort on the slopes of the line segments whose Minkowski sum is the desired hull by their slopes. If these segments were already sorted, the Minkowski sum could be constructed in linear time. And, in this case, it is possible to preprocess the input so that, for any contiguous subsequence of the elements, we can sort the corresponding line segments by their slopes quickly using integer sorting algorithms. However, we omit this speedup, as it adds complication to our overall algorithm without improving its total time. The same proof used for Lemma 3 also allows us to quickly compute polygon(subproblem(s)) for any square s that is entirely within the margin of error, using the fact that the family of downsets of this subproblem is just its power set. Lemma 4. Let s be a square of the grid defined by a given semiorder that is entirely within the margin of error of the semiorder, of side length `. Then polygon(subproblem(s)) is a polygon with O(`) sides and can be computed in time O(` log `). Computing polygon(subproblem(s)) for the remaining squares is trickier, but may be performed by decomposing the polygon into polygons of the same type for four smaller squares. Lemma 5. Let s be a square in the grid [0, n − 1]2 , containing an even number of grid points, and subdivide s into four congruent smaller squares si (0 ≤ i < 4). Let polygon(subproblem(s)) P have c vertices, define ci in the same way for each si , and let ` be the side length of s. Then c ≤ ci + O(`), and polygon(subproblem(s)) can be constructed from the corresponding hulls for the smaller squares P in time O( ci + ` log `). Proof. For each smaller square si , define Hi to be the polygon polygon(subproblem(si )) ⊕ project(powerset(free(si ) ∩ subproblem(s))) translated by adding all of the weights of elements in below(si ) ∩ subproblem(s). Then each vertex of this polygon Hi represents a downset of subproblem(s). By Lemma 2 (viewing si as a subproblem of subproblem(s)) every downset of subproblem(s) that is mapped by extremes into si is included in Hi . (This polygon may also include some other downsets mapped into s but not si , but this is not problematic.) Therefore, we can construct polygon(subproblem(s)) itself as polygon(subproblem(s)) = H0 d H1 d H2 d H3 . Thus, we have found a formula that expresses polygon(subproblem(s) using a constant number of Minkowski sums and unions of hulls of the corresponding hulls for smaller squares, together with free subproblems of total size O(`). The result follows by using Lemma 3 to construct the polygons for the free subproblems and Corollary 1 to combine the resulting polygons into a single polygon. t u 3.3 Semiorder algorithm Putting it all together, we can use the observations above to decompose polygon(S) into a combination of similarly-computed polygons for smaller grid squares, recursively decomposed into even smaller squares. This leads to an algorithm that performs this decomposition and then uses it in a bottom-up order to construct the polygons of larger subproblems from smaller ones, eventually producing the solution to the whole problem. Theorem 1. If S is a semiorder with n elements xi , specified with their utility values ui and a system of two-dimensional weights w(xi ), then polygon(S) has complexity O(n log n) and can be constructed in time O(n log2 n). Proof. We sort the utility values, pad n to the next larger power of two if necessary and form a quadtree decomposition of the grid [0, n − 1]2 (as shown in Figure 4, right). For each square s of this quadtree, we associate a convex polygon (or empty set) polygon(subproblem(s)) computed according to the following cases: – If s is a subset of the grid points for which i > j, or for which ui−1 < uj − 1, then no downsets are mapped into s by extremes. We associate square s with the empty set. – If s is a subset of the grid points for which i ≤ j and ui−1 ≥ uj − 1, then every two elements of subproblem(s) are incomparable. In this case, we associate square s with the polygon hull(project(powerset(subproblem(s)))) computed according to Lemma 4. – Otherwise, we split s into four smaller squares. We construct the polygon associated with s by using Lemma 5 to combine the polygons associated with its children. It follows by induction that the total complexity of the polygon constructed at any square s P P of the quadtree is O( `i ), and the total time for constructing it is O( `i log n), where `i is the side length of the ith square of the quadtree and the sum ranges over all descendants of s. Here, the O(`i log n) contribution to the time bound includes not only the terms of the form O(`i log `i ) appearing in Lemma 3 and Lemma 4, but also the amount of time spent combining the polygon for this square with other polygons at O(log n) higher levels of the recursive subdivision. As a base case for the induction, a square containing only a single grid point is associated with a subproblem with one element, with only one downset that maps to that grid point, and a degenerate convex polygon with a single vertex. The polygon constructed at the root of the quadtree is the desired output, and it follows that it has combinatorial complexity and time complexity of the same form, with a sum ranging over all quadtree squares. The conditions i > j and ui−1 < uj − 1 define two monotone curves through the grid, and we split a quadtree square only when it is crossed by one of these two curves. It follows that the squares of side length ` that are subdivided as part of this algorithm themselves form two monotone chains, and that the number of all squares of side length ` is O(n/`). The results of the theorem follow by summing up the contributions to the polygon complexity and time complexity for the O(log n) different possible values of `. t u 4 Series-parallel partial orders Series-parallel partial orders were considered in the context of a scheduling problem by Lawler [26], and include as a special case the tree orderings previously studied in our work on bicriterion optimization [9]. 4.1 Recursive decomposition Although it is possible to characterize the series-parallel partial orders as being the orders in which no four elements form the “N” of Figure 2, it is more convenient for us to define them in terms of a natural recursive decomposition, which we will take advantage of in our algorithms. Definition 6. The series-parallel partial orders are the partial orders that can be constructed from single-element partial orders by repeatedly applying the following two operations: Series composition Parallel composition Fig. 5. A series-parallel partial order. Redrawn from a Wikipedia illustration by the author. Series composition. Given two series-parallel partial orders P1 and P2 , form an order from their disjoint union in which every element of P1 is less than every element of P2 . Parallel composition. Given two series-parallel partial orders P1 and P2 , form an order from their disjoint union in which there are no order relations between P1 and P2 . See Figure 5 for an example. These composition operations correspond naturally to the two geometric operations on convex polygons that we have already been using. Observation 1 If P is the series composition of P1 and P2 , then polygon(P ) is the convex hull of the union of polygon(P1 ) and a translate (by the sum of the weights of the elements of P1 ) of polygon(P2 ). If P is the parallel composition of P1 and P2 , then polygon(P ) is the Minkowski sum of polygon(P1 ) and polygon(P2 ). Recursively continuing this decomposition gives us a formula for polygon(P ) in terms of the d and ⊕ operations. By Corollary 1 we immediately obtain: Corollary 2. If P is a series-parallel partial order with n elements, then polygon(P ) has at most 2n vertices. However, the depth of the formula for polygon(P ) may be linear, so using Corollary 1 to construct polygon(P ) could be inefficient. We now describe a faster algorithm. The key idea is to follow the same formula to build polygon(P ), but to represent each intermediate result (a convex polygon) by a data structure that allows the d and ⊕ operations to be performed more quickly for pairs of polygons of unbalanced sizes. 4.2 Data structure for fast unbalanced polygon merges Note that a Minkowski sum operation between a polygon of high complexity and a polygon of bounded complexity can change a constant fraction of the vertex coordinates, so to allow fast Minkowski sums our representation cannot store these coordinates explicitly. Lemma 6. It is possible to store convex polygons in a data structure such that destructively merging the representations of two polygons of m and n vertices respectively by a d or ⊕ operation (with m < n) can be performed in time O(m log((m + n)/m)). Proof. We store the lower and upper hulls separately in a binary search tree data structure, in which each node represents a vertex of the polygon, and the inorder traversal of the tree gives the left-to-right order of the vertices. The node at the root of the tree stores the Cartesian coordinates of its vertex; each non-root node stores the vector difference between its coordinates and its parents’ coordinates. Additionally, each node stores the vector difference to its clockwise neighbor around the polygon boundary. In this way, we can traverse any path in this tree and (by adding the stored vector difference) determine the coordinates of any vertex encountered along the path. We may also perform a rotation in the tree, and update the stored vector differences, in constant time per rotation. We will keep this tree balanced (in an amortized sense) by using the splay tree balancing strategy [39]: whenever we follow a search path in the tree, we will immediately perform a splay operation that through a sequence of double rotations moves the endpoint of the path to the root of the tree. By the dynamic finger property for splay trees [12, 13], a sequence of m accesses in sequential order into a splay tree of size n will take time O(m log((m + n)/m)). To compute the hull of the union (the d operation) we insert each vertex of the smaller polygon (by number of vertices), in left-to-right order, into the larger polygon. To insert a vertex v, we search the larger polygon to find the edges with the same x-coordinate as v and use these edges to check whether v belongs to the lower hull, the upper hull, or neither. If it belongs to one of the two hulls, we search the larger polygon again to find its two neighbors on the hull. By performing a splay so that these neighbors are rotated to the root of the binary tree, and then cutting the tree at these points, we may remove the vertices between v and its new neighbors from the tree without having to consider those vertices one-by-one. We then create a new node for v and add its two neighbors as the left and right child. To compute the Minkowski sum (the ⊕ operation) we must simply merge the two sequences of edges of the two polygons by their slopes. We search for each edge slope in the smaller polygon. When its position is found, we splay the vertex node at the split position to the root of the tree, and then split the tree into its left and right subtrees, each with a copy of the root node. We translate all vertices on one side of the split by the vector difference for the inserted edge (by adding that vector only to the root of its tree), and rejoin the trees. t u The proof of the dynamic finger property for splay trees [12,13] is very complicated, but the same lemma would follow using any other dynamic binary search data structure with the finger property that also allows for an additional operation of removing large consecutive sequences of elements in time proportional to the logarithm of the length of the removed sequence. For instance, level-linked 2-3 trees have the finger property [7] but the proven time bound for deletions in this structure is not of the form we need, so additional analysis would be needed to make them applicable to our problem. 4.3 Series-parallel algorithm With this data structure in hand, we are ready to prove the main result of this section. Fig. 6. A fence (left), generalized fence (center), and polytree (right) Theorem 2. If P is a series-parallel partial order, represented by its series-parallel decomposition tree, then polygon(P ) has complexity O(n) and may be constructed in time O(n log n). Proof. We follow the formula for constructing polygon(P ) by d and ⊕ operations, using the data structure of Lemma 6. We charge each merge operation to the partial order elements on the smaller side of each merge. If a partial order element belongs to subproblems of P sizes n0 = 1, n1 , . . . , nh = nQwhere h is the height of the element, then the time charged to it is i O(log(ni /ni−1 )) = O(log i (ni /ni−1 )) = O(log n). t u 5 Bounded tree-width In this section, we consider partial orders whose underlying graphs have bounded treewidth. The underlying graph is an undirected graph, obtained by forgetting the edge directions of the covering graph of the partial order. If the partial order is defined by reachability on directed acyclic graphs, the underlying graph of this reachability relation is obtained by forgetting the edge directions of the transitive reduction, a minimal directed acyclic graph with the same reachability relation as the given one. 5.1 Fences and polytrees As a warm-up, we first consider the case where the underlying undirected graph has treewidth one: that is, it is a tree or a path. We can bound both the number of solutions to the parametric closure problem and the time for listing all the solutions using a divide-and-conquer approach that we will later generalize to larger values of the treewidth. Definition 7. A fence or zigzag poset is a partially ordered set whose transitive reduction is a path with alternating edge orientations. A polytree is a directed graph formed by orienting the edges of an undirected tree. An oriented path or up-down poset is a directed graph formed by orienting the edges of an undirected simple path. A generalized fence is a partially ordered set whose transitive reduction is an oriented path. (See Figure 6.) Figure 2 depicts an example of a fence. Our definition of a generalized fence follows Munarini [33] and should be distinguished from other authors who define generalized fences as the reachability orders of polytrees [38]. Theorem 3. Let P be a generalized fence. Then polygon(P ) has complexity O(n2 ) and can be constructed in time O(n2 log n). Proof. We let F (n) denote the maximum number of vertices of polygon(P ) where P ranges over all n-element generalized fences. To bound F (n), let P be a generalized fence of maximum complexity, and let v be the middle element of the oriented path from which P is defined. Let L− be the generalized fence determined by the half of the path to the left of P , after removing all elements below v in this half of the path, and let L+ be the generalized fence determined by the left half-path after removing all elements above v. Define R− and R+ in the same way for the right half of the path. Then the downsets of P that contain v correspond one-for-one with downsets of L− ∪ R− , where the correspondence is obtained by adding back v and all elements below v. The downsets of P that do not contain v are exactly the downsets of L+ ∪ R+ . Therefore, we have the formula polygon(P ) = (polygon(L− ) ⊕ polygon(R− )) d (polygon(L− ) ⊕ polygon(R− )), with a suitable translation applied before performing the d operation. Since all four of L− , L+ , R− , and R+ have at most bn/2c elements, we can use this formula and Lemma 1 to derive a recurrence for the complexity F (n): F (n) ≤ 4F (bn/2c), with the base case F (0) = 1. This recurrence has a standard form familiar from divide-and-conquer algorithms, whose solution is F (n) = O(n2 ). Using the same formula for polygon(P ) together with Lemma 1 to construct the polygon gives another recurrence for the running time T (n): T (n) ≤ 4T (bn/2c) + O(F (n)) = 4T (bn/2c) + O(n2 ) = O(n2 log n). t u We may apply the same divide-and-conquer method to construct the solutions to the parametric closure problem for an oriented tree, but we will not always be able to obtain a perfect split into two subproblems of size n/2. As a consequence, the method becomes somewhat more complex although its asymptotic time bound will remain the same. To pick the splitting vertex v we use the following separator theorem for trees, which appears already in the work of Jordan (1869) [23]: Lemma 7. Any n-vertex undirected tree has a vertex v such that the removal of v splits the remaining tree into components of at most n/2 vertices each. Proof. Let v be a vertex of the tree T , chosen to minimize the number e of vertices by which the largest component of T \ v exceeds n/2, and suppose for a contradiction that e is not zero. Let C be the component of T \ v with n/2 + e > n/2 vertices, and let w be the unique neighbor of v in C. Then removing w from T produces components that are strict subsets of C, together with a component containing v with n/2 − e < n/2 vertices. Therefore, all components of T \ w have fewer than n/2 + e vertices, contradicting the choice of v as the minimizer of e. This contradiction implies that e must be zero and therefore that removing v splits the remaining tree into components of at most n/2 vertices each. t u Theorem 4. Let P be the reachability order of a polytree T . Then polygon(P ) has complexity O(n2 ) and can be constructed in time O(n2 log n). Proof. As in Theorem 3 we remove v from T , and for each component Ci of the resulting forest define partial orders Ci− and Ci+ by removing the elements below or above Ci respectively. And as in Theorem 3 we can use this decomposition to derive a formula polygon(P ) = (polygon(C1− ) ⊕ polygon(C2− ) ⊕ · · · ) d (polygon(C1+ ) ⊕ polygon(C2+ ) ⊕ · · · ) By Lemma 1, it follows that the total number of vertices of polygon(P ) is at most the total number of leaf-level subproblems obtained by recursively performing this decomposition. Because the size of the remaining subtrees goes down by a factor of two in each level of recursion, there are at most log2 n levels of recursion. Each level of recursion also at most doubles the number of subproblems that each remaining tree vertex belongs to: a vertex u that belongs to a component Ci of the remaining tree vertices will also be included in at most two subproblems Ci− and Ci+ . Therefore, the contribution of any one tree vertex to the total complexity of polygon(P ) is O(n) and the total complexity of polygon(P ) is O(n2 ). We cannot use Lemma 1 directly to evaluate this formula, because that lemma allows only binary combinations. However, using Lemma 6 instead allows any formula of ⊕ and d operations of size s to be evaluated in time O(s log s). Applying this method to the recursive formula derived above gives us a total time of O(n2 log n). t u In the following sections, we apply the same method to more general graphs of bounded treewidth. 5.2 Tree decompositions Definition 8. A tree-decomposition of an undirected graph G is a tree T whose vertices are called bags, each of which is associated with a set of vertices of G, with the following two properties: – Each vertex of G belongs to a set of bags that induces a connected subtree of T , and – For each edge of G there exists a bag containing both endpoints of the edge. The width of a tree-decomposition is one less than the maximum number of vertices in a bag, and the treewidth of G is the minimum width of a tree-decomposition of G. By extension, we define the treewidth of a directed graph D to equal the treewidth of the undirected graph obtained by forgetting the orientations of the edges of D. The treewidth, and an optimal tree-decomposition, can be found in an amount of time that is linear in the number of vertices of a given graph but exponential in its width [6]. Definition 9. A tree-decomposition of width t is minimal if no two adjacent bags have a union with at most t + 1 elements. Every graph of treewidth t has a minimal decomposition of width t. For, given a decomposition that is not minimal (in which two adjacent bags have a small union), the edge connecting those two bags could be contracted, and the bags merged, decreasing the number of bags in the decomposition without increasing the width of the decomposition. This property allows us to control the number of bags in the decomposition: Lemma 8. A minimal tree-decomposition of width t of an n-vertex graph has at most n − t bags. Proof. Consider the bags in the order given by a breadth-first traversal, starting from a bag of cardinality t + 1. The first bag has t + 1 vertices in it, and each successive bag in this traversal must have at least one new vertex not seen in previous bags, for otherwise it would be a subset of the bag that is its parent in the breadth-first traversal and the decomposition would not be minimal. Therefore, the number of vertices is at least equal to the number of bags plus t. Equivalently, the number of bags is at most n − t. t u 5.3 Partial orders of low treewidth Lemma 9. Let P be a partial order with n elements whose underlying graph has treewidth t = O(1). Then polygon(P ) can be represented as a formula of d and ⊕ operations with total size O(nt+2 ) and depth O(log n). Proof. We fix a minimal tree-decomposition of width t, and we use Lemma 7 to recursively partition this decomposition by repeatedly removing a bag B whose removal splits the remaining part of the decomposition into connected components Ci of size (number of bags) at most half the size at the previous level of the partition. If B has b elements, then there are at most 2b partitions of B into two subsets L and U , such that L is a downset in B (with U as its complementary upset). We will use these partitions to specify the elements of B that should be part of an eventual downset (L) or should not be part of an eventual downset (U ). Let Ci be one of the connected components formed from the tree-decomposition by the removal of B, and (Lj , Uj ) be one of the partitions of B into a downset L = Lj and an upset U = Uj . Then in any downset of the whole problem consistent with the partition (Lj , Uj ), the elements of Ci that are below at least one element of Lj must also be included in the downset, and the elements of Ci that are above at least one element of Uj must also be included in the upper set. We define Cij to be the subproblem of the closure problem consisting of the remaining elements: the ones that belong to bags of Ci and are neither below a member of Lj nor above a member of Uj . With this notation, we can express polygon(P ) as a formula b polygon(P ) = d2j=1 ⊕i polygon(Cij ), where each term in the outer d is translated appropriately according to the weights of the additional elements in or below Lj that belong to the downsets for that term but not to the subproblems included in that term. Each of the at most log2 n levels of this recursive partition causes the number of subproblems that each vertex participates in to increase by a factor of at most 2t+1 . Therefore, in the whole recursive partition, the total number of subproblems that a single vertex participates in is O(nt+1 ). Since there are n vertices, this partition gives rise to a formula with total complexity O(nt+2 ). t u Applying Lemma 6 to the formula of Lemma 9 gives us the following result: Theorem 5. Let P be a partial order with n elements whose underlying graph has treewidth t = O(1). Then polygon(P ) has complexity O(nt+2 ) and can be constructed in time O(nt+2 log n). We note that for t = 1 this is larger by a linear factor than the bounds of Theorem 3 and Theorem 4. We do not know whether the dependence on t in the exponent of the complexity bound is necessary, but unless it can be improved it acts as an obstacle to the existence fixed-parameter-tractable algorithms parameterized by treewidth for the construction of polygon(P ). 5.4 Incidence posets The partial orders defined by reachability on graphs of low treewidth include, in particular, the incidence posets of undirected graphs of bounded treewidth. This is because the incidence poset of an undirected graph G is the same as the reachability poset on a graph obtained from G by subdividing each undirected edge, and orienting each of the two resulting new edges outward from the subdivision point (Figure 7). This replacement cannot increase the treewidth, as the following folklore lemma shows. a b a b c d c d a b c d Fig. 7. An undirected graph (left), the directed graph obtained by replacing each undirected edge by two oppositelyordered directed edges (center), and a partial order that is simultaneously the incidence poset of the undirected graph and the reachability poset of the directed graph (right). Lemma 10. Let H be obtained from G by replacing one or more edges of G by paths. Then the treewidth of H is no higher than that of G. Proof. We may assume that H is obtained from G by replacing only a single edge e by a two-edge path, for any other instance of the lemma may be obtained by multiple replacements of this type. If G is a tree, then H is also a tree, and both have treewidth 1. Otherwise, the treewidth of G is at least 2, and an optimal tree-decomposition for G must contain at least one bag B that contains both endpoints of e. A tree-decomposition for H of the same width may be obtained by attaching to B another bag that contains three vertices: the endpoints of e, and the subdivision point of the replacement path for e. t u One of the important applications of the closure problem, to transportation planning, uses the incidence posets of graphs whose edges represent a collection of point-to-point truck routes [4, 37]. Our methods can be applied to the parametric and bicriterion versions of this problem when its graph has small treewidth. The following result is an immediate corollary of Theorem 5. Corollary 3. Let P be the incidence poset of an n-vertex graph of treewidth w. Then polygon(P ) has complexity O(nw+2 ) and can be constructed in time O(nw+2 log n). 6 Bounded width The width of a partially ordered set is the size of its largest antichain. Partially ordered sets of bounded width arise, for instance, in the version histories of a distributed version control repository controlled by a small set of developers (with the assumption that each developer maintains only a single branch of the version history). In this application, there may be many elements of the partially ordered set (versions of the repository) but the width may be bounded by the number of developers [5]. A downset in this application is a set of versions that could possibly describe the simultaneous states of all the developers at some past moment in the history of the repository. The downsets of a partially ordered set correspond one-for-one with its independent sets: each downset is uniquely determined by an independent set, the set of maximal elements of the downset. Therefore, in a partially ordered set of width w with n elements there can be at most O(nw ) downsets. More precisely, by Dilworth’s theorem [14], every partial order of width w can be partitioned into w totally-ordered subsets (chains); the number of downsets can be at most the product of the numbers of downsets of these chains. This product takes its maximum value (n/w + 1)w when the chains all have equal size. As we show, however, there is an even tighter bound for the complexity of polygon(P ). s d r c q b p a {p,q,r,s} {p,q,r} {p,q} {p} Ø ∪ Ø {a} {a,b} {a,b,c} {a,b,c,d} Fig. 8. Hasse diagram of a width-two partial order partitioned into two chains (left) and the subset of the integer lattice formed by its downsets (right) We consider first the case w = 2. The more general case of bounded width will follow by similar reasoning. Thus, let P be a partially ordered set with n elements and width two. By Dilworth’s theorem, P can be decomposed into two chains, and every downset L can be described by a pair of integer coordinates (x, y), where x is the number of elements of L that belong to the first chain and y is the number of elements of L in the second chain. Observation 2 For a width-two partial order P as described above, the set of pairs of coordinates (x, y) describing the downsets of P forms an orthogonally convex subset of the integer grid [0, n]2 , and the edges between points one unit apart in this set of grid points form the covering graph of the distributive lattice of downsets. Figure 8 depicts an example. We can use the following definition and observation to partition the parametric closure problem for P into smaller subproblems of the same type. Definition 10. Let R be any grid rectangle. Then subproblem(R) is the family of downsets of P whose grid points lie in R. Observation 3 For every grid rectangle R, each set in subproblem(R) can be represented uniquely as a disjoint union A ∪ B where A is the set of all elements of P whose (single) coordinate value is below or to the left of R, and B is a downset of the restriction of P to the elements whose coordinate value is within R. In this decomposition, the same set A forms a subset of every set in subproblem(R). Thus, the observation shows that the contribution to the parametric closure problem from rectangle R can be obtained by solving a smaller parametric closure problem, on the restriction of the partial order to the elements within R, and then translating the results by a single vector determined from this fixed set A. Observation 4 Suppose that every integer point of a grid rectangle R corresponds to a downset of P . Then the restriction of P to the elements whose coordinate value is within R is a partial order in the form of the parallel composition of two chains, a special case of a series-parallel partial order. It follows from Corollary 2 that hull(project(subproblem(R))) has complexity proportional to the perimeter of R. Theorem 6. If P is a partial order of width two, then polygon(P ) has complexity O(n log n) and can be constructed from the covering relation of P in time O(n log2 n). Proof. From the covering relation, we can determine a partition into two chains and trace out the boundaries of the orthogonal grid polygon describing the downsets of P , in linear time. We use a quadtree to partition the downsets of P into squares, each with a side length that is a power of two, such that each grid point within each square corresponds to one of the downsets of P . The squares of each size form two monotone chains within the grid, so the total perimeter of all of these squares is O(n log n). We also use the one-dimensional projection of the same quadtree, to partition each of the two grid coordinates recursively into subintervals whose sizes are powers of two. For each subinterval I, we compute the convex hull of the downsets of the corresponding chain whose grid points lie within I, as the hull of the union of the two previously-constructed polygons for the two halves of I. This computation takes time O(n log n) overall. We also compute a sequence of vectors, the sums of weights of each prefix of the coordinates, in time O(n). We then compute the polygon for each of the squares of the partition of the downsets of P . By Observation 3, each such polygon can be constructed by translating the polygon for the grid coordinates within the square (the set B of the observation) by a translation vector determined from all the smaller grid coordinates (the set A of the observation). By Observation 4, the polygon for the set B can be computed in time proportional to the perimeter of the square, as the Minkowski sum of the polygons for its two defining subintervals. The translation vector for the set A can be found as the sum of two vectors computed for the two corresponding prefixes of the two grid coordinates. The overall solution we seek, polygon(P ), can be computed by applying the d operation to combine the polygons computed for each square of the partition. As the total perimeter of these squares is O(n log n), and each generates a polygon of complexity proportional to its perimeter in time proportional to its perimeter, the total time to compute all of these polygons is O(n log n), and their total complexity is O(n log n). As the convex hull of O(n log n) points, the time to perform the final d operation to combine these polygons and compute polygon(P ) is O(n log2 n). t u For higher widths w, the same idea works (using an octree in three dimensions, etc). The total complexity of polygon(P ) is proportional to the sum of side lengths of octree squares, O(nw−1 ), and the construction time is within a logarithmic factor of this bound. 7 Conclusions We have introduced the parametric closure problem, and given polynomial complexity bounds and algorithms for several important classes of partial orders. Bounds for the general problem, and nontrivial lower bounds on the problem, remain open for further research. Acknowledgements This research was supported in part by NSF grant 1228639 and ONR grant N00014-08-1-1015. References 1. P. K. Agarwal, D. Eppstein, L. J. Guibas, and M. R. Henzinger. Parametric and kinetic minimum spanning trees. Proc. 39th IEEE Symp. Foundations of Computer Science (FOCS ’98), pp. 596–605, 1998, doi:10.1109/SFCS.1998.743510. 2. M. Ahmed, I. Chowdhury, M. Gibson, M. S. Islam, and J. Sherrette. On maximum weight objects decomposable into based rectilinear convex objects. Proc. 13th Int. Symp. Algorithms and Data Structures (WADS 2013), pp. 1–12. Springer, Lect. Notes Comput. Sci. 8037, 2013, doi:10.1007/978-3-642-40104-6_1. 3. P. Avery. An algorithmic proof that semiorders are representable. J. Algorithms 13(1):144–147, 1992, doi:10.1016/0196-6774(92)90010-A, MR1146337. 4. M. L. Balinski. On a selection problem. Manag. Sci. 17(3):230–231, 1970, doi:10.1287/mnsc.17.3.230. 5. M. J. Bannister, W. E. Devanny, and D. Eppstein. Small superpatterns for dominance drawing. Proc. Analytic Algorithmics and Combinatorics (ANALCO14), pp. 92–103, 2014, doi:10.1137/1.9781611973204.9. 6. H. L. Bodlaender. A linear time algorithm for finding tree-decompositions of small treewidth. SIAM J. Comput. 25(6):1305–1317, 1996, doi:10.1137/S0097539793251219. 7. M. R. Brown and R. E. Tarjan. Design and analysis of a data structure for representing sorted lists. SIAM J. Comput. 9(3):594–614, 1980, doi:10.1137/0209045, MR584515. 8. K. Buchin, D. Eppstein, M. Löffler, and R. I. Silveira. Adjacency-preserving spatial treemaps. Proc. 11th Int. Symp. Algorithms and Data Structures (WADS 2011), pp. 159–170. Springer, Lect. Notes Comput. Sci. 6844, 2011, doi:10.1007/978-3-642-22300-6_14. 9. J. Carlson and D. Eppstein. The weighted maximum-mean subtree and other bicriterion subtree problems. Proc. 10th Scand. Worksh. Algorithm Theory (SWAT 2006), pp. 397–408. Springer, Lect. Notes Comput. Sci. 4059, 2006, doi:10.1007/11785293_37, MR2288327. 10. P. J. Carstensen. Parametric cost shortest path problems. Unpublished memo, Bellcore, 1984. 11. G. J. Chang and J. Edmonds. The poset scheduling problem. Order 2(2):113–118, 1985, doi:10.1007/BF00334849, MR815857. 12. R. Cole. On the dynamic finger conjecture for splay trees. II. The proof. SIAM J. Comput. 30(1):44–85, 2000, doi:10.1137/S009753979732699X, MR1762706. 13. R. Cole, B. Mishra, J. Schmidt, and A. Siegel. On the dynamic finger conjecture for splay trees. I. Splay sorting log n-block sequences. SIAM J. Comput. 30(1):1–43, 2000, doi:10.1137/S0097539797326988, MR1762705. 14. R. P. Dilworth. A decomposition theorem for partially ordered sets. Ann. Math. 51(1):161–166, 1950, doi:10.2307/1969503. 15. D. Eppstein. Geometric lower bounds for parametric matroid optimization. Discrete Comput. Geom. 20(4):463–476, 1998, doi:10.1007/PL00009396, MR1651908. 16. B. Faaland, K. Kim, and T. Schmitt. A new algorithm for computing the maximal closure of a graph. Manag. Sci. 36(3):315–33, 1990, doi:10.1287/mnsc.36.3.315. 17. D. Fernández-Baca and G. Slutzki. Optimal parametric search on graphs of bounded tree-width. J. Algorithms 22(2):212–240, 1997, doi:10.1006/jagm.1996.0816, MR1428337. 18. D. Fernández-Baca, G. Slutzki, and D. Eppstein. Using sparsification for parametric minimum spanning tree problems. Nordic J. Comput. 3(4):352–366, 1996, MR1436019. 19. M. Gibson, D. Han, M. Sonka, and X. Wu. Maximum weight digital regions decomposable into digital star-shaped regions. Proc. 22nd Int. Symp. Algorithms and Computation (ISAAC 2011), pp. 724–733. Springer, Lect. Notes Comput. Sci. 7074, 2011, doi:10.1007/978-3-642-25591-5_74. 20. D. Hochbaum. A new-old algorithm for minimum-cut and maximum-flow in closure graphs. Networks 37(4):171–193, 2001, doi:10.1002/net.1012, MR1837196. 21. D. Hochbaum. 50th anniversary article: Selection, provisioning, shared fixed costs, maximum closure, and implications on algorithmic methods today. Manag. Sci. 50(6):709–723, 2004, doi:10.1287/mnsc.1040.0242. 22. R. W. Irving, P. Leather, and D. Gusfield. An efficient algorithm for the “optimal” stable marriage. J. ACM 34(3):532–543, 1987, doi:10.1145/28869.28871, MR904192. 23. C. Jordan. Sur les assemblages de lignes. Journal für die reine und angewandte Mathematik 70(2):185–190, 1869, http://resolver.sub.uni-goettingen.de/purl?GDZPPN002153998. 24. G. Joret, P. Micek, K. G. Milans, W. T. Trotter, B. Walczak, and R. Wang. Tree-width and dimension, arXiv:1301.5271. Unpublished manuscript, 2013. 25. N. Katoh. Bicriteria network optimization problems. IEICE Trans. Fundamentals of Electronics, Communications and Computer Sciences E75-A:321–329, 1992. 26. E. L. Lawler. Sequencing jobs to minimize total weighted completion time subject to precedence constraints. Ann. Discrete Math. 2:75–90, 1978, doi:10.1016/S0167-5060(08)70323-6, MR0495156. 27. H. Lerchs and I. F. Grossmann. Optimum design of open-pit mines. Trans. Canad. Inst. Mining and Metallurgy 68:17–24, 1965. 28. M. Löffler and M. van Kreveld. Largest and smallest convex hulls for imprecise points. Algorithmica 56(2):235–269, 2010, doi:10.1007/s00453-008-9174-2, MR2576543. 29. M. Löffler and M. van Kreveld. Largest bounding box, smallest diameter, and related problems on imprecise points. Comput. Geom. Theory and Appl. 43(4):419–433, 2010, doi:10.1016/j.comgeo.2009.03.007, MR2575803. 30. R. D. Luce. Semiorders and a theory of utility discrimination. Econometrica 24:178–191, 1956, doi:10.2307/1905751, MR0078632. 31. J. Matoušek. Lower envelopes. Lectures on Discrete Geometry, pp. 165–194. Springer, Graduate Texts in Mathematics 212, 2002, 10.1007/978-1-4613-0039-7_7. 32. N. Megiddo. Applying parallel computation algorithms in the design of serial algorithms. J. ACM 30(4):852–865, 1983, doi:10.1145/2157.322410. 33. E. Munarini. A combinatorial interpretation of the Chebyshev polynomials. SIAM J. Discrete Math. 20(3):649–655, 2006, doi:10.1137/S0895480103432283, MR2272221. 34. D. Orlin. Optimal weapons allocation against layered defenses. Nav. Res. Logist. Q. 34:605–617, 1987, doi:10.1002/1520-6750(198710)34:5<605::aid-nav3220340502>3.0.co;2-l. 35. J.-C. Picard. Maximal closure of a graph and applications to combinatorial problems. Manag. Sci. 22(11):1268–1272, 1976, doi:10.1287/mnsc.22.11.1268, MR0403596. 36. M. Pirlot and P. Vincke. Semiorders: Properties, Representations, Applications. Springer, 1997. 37. J. M. W. Rhys. A selection problem of shared fixed costs and network flows. Manag. Sci. 17(3):200–207, 1970, doi:10.1287/mnsc.17.3.200. 38. F. Ruskey. Transposition generation of alternating permutations. Order 6(3):227–233, 1989, doi:10.1007/BF00563523, MR1048093. 39. D. D. Sleator and R. E. Tarjan. Self-adjusting binary search trees. J. ACM 32(3):652–686, 1985, doi:10.1145/3828.3835.
8cs.DS
Polymorphic Type Inference for Machine Code ∗ Matthew Noonan Alexey Loginov David Cok arXiv:1603.05495v2 [cs.PL] 18 Mar 2016 GrammaTech, Inc. Ithaca NY, USA {mnoonan,alexey,dcok}@grammatech.com Abstract For many compiled languages, source-level types are erased very early in the compilation process. As a result, further compiler passes may convert type-safe source into type-unsafe machine code. Type-unsafe idioms in the original source and type-unsafe optimizations mean that type information in a stripped binary is essentially nonexistent. The problem of recovering high-level types by performing type inference over stripped machine code is called type reconstruction, and offers a useful capability in support of reverse engineering and decompilation. In this paper, we motivate and develop a novel type system and algorithm for machine-code type inference. The features of this type system were developed by surveying a wide collection of common source- and machine-code idioms, building a catalog of challenging cases for type reconstruction. We found that these idioms place a sophisticated set of requirements on the type system, inducing features such as recursively-constrained polymorphic types. Many of the features we identify are often seen only in expressive and powerful type systems used by high-level functional languages. Using these type-system features as a guideline, we have developed Retypd: a novel static type-inference algorithm for machine code that supports recursive types, polymorphism, and subtyping. Retypd yields more accurate inferred types than existing algorithms, while also enabling new capabilities ∗ This research was developed with funding from the Defense Advanced Research Projects Agency (DARPA). The views, opinions, and/or findings contained in this material are those of the authors and should not be interpreted as representing the official views or policies of the Department of Defense or the U.S. Government. D ISTRIBUTION A. Approved for public release; distribution unlimited. such as reconstruction of pointer const annotations with 98% recall. Retypd can operate on weaker program representations than the current state of the art, removing the need for highquality points-to information that may be impractical to compute. Categories and Subject Descriptors F.3.2 [Logics and Meanings of Programs]: Semantics of Programming Languages; D.2.7 [Software Engineering]: Distribution, Maintenance, and Enhancement; D.3.3 [Programming Languages]: Language Constructs and Features; F.4.3 [Mathematical Logic and Formal Languages]: Formal Languages Keywords Reverse Engineering, Type Systems, Polymorphism, Static Analysis, Binary Analysis, Pushdown Automata 1. Introduction In this paper we introduce Retypd, a machine-code typeinference tool that finds regular types using pushdown systems. Retypd includes several novel features targeted at improved types for reverse engineering, decompilation, and high-level program analyses. These features include: • • • • Inference of most-general type schemes (§5) Inference of recursive structure types (Figure 2) Sound analysis of pointer subtyping (§3.3) Tracking of customizable, high-level information such as purposes and typedef names (§3.5) • Inference of type qualifiers such as const (§6.4) • No dependence on high-quality points-to data (§6) • More accurate recovery of source-level types (§6) Retypd continues in the tradition of SecondWrite [10] and TIE [17] by introducing a principled static type-inference algorithm applicable to stripped binaries. Diverging from previous work on machine-code type reconstruction, we use a rich type system that supports polymorphism, mutable references, and recursive types. The principled type-inference phase is followed by a second phase that uses heuristics to “downgrade” the inferred types to human-readable C types before display. By factoring type inference into two phases, we can sequester unsound heuristics and quirks of the C type systems from the sound core of the type-inference engine. This adds a degree of freedom to the design space so that we may leverage a relatively complex type system during type analysis, yet still emit familiar C types for the benefit of the reverse engineer. Retypd operates on an intermediate representation (IR) recovered by automatically disassembling a binary using GrammaTech’s static analysis tool CodeSurfer® for Binaries [5]. By generating type constraints from a TSL-based abstract interpreter [18], Retypd can operate uniformly on binaries for any platform supported by CodeSurfer, including x86, x86-64, and ARM. During the development of Retypd, we carried out an extensive investigation of common machine-code idioms in compiled C and C++ code that create challenges for existing type-inference methods. For each challenging case, we identified requirements for any type system that could correctly type the idiomatic code. The results of this investigation appear in §2. The type system used by Retypd was specifically designed to satisfy these requirements. These common idioms pushed us into a far richer type system than we had first expected, including features like recursively constrained type schemes that have not previously been applied to machinecode type inference. Due to space limitations, details of the proofs and algorithms appear in the appendices, which are available in the online version of this paper at arXiv:1603.05495 [22]. Scripts and data sets used for evaluation also appear there. 2. Challenges There are many challenges to carrying out type inference on machine code, and many common idioms that lead to sophisticated demands on the feature set of a type system. In this section, we describe several of the challenges seen during the development of Retypd that led to our particular combination of type-system features. 2.1 Optimizations after Type Erasure Since type erasure typically happens early in the compilation process, many compiler optimizations may take well-typed machine code and produce functionally equivalent but illtyped results. We found that there were three common optimization techniques that required special care: the use of a variable as a syntactic constant, early returns along error paths, and the re-use of stack slots. Semi-syntactic constants: Suppose a function with signature void f(int x, char* y) is invoked as f(0, NULL). This will usually be compiled to x86 machine code similar to xor push push call eax , eax eax eax f ; y := NULL ; x := 0 This represents a code-size optimization, since push eax can be encoded in one byte instead of the five bytes needed to push an immediate value (0). We must be careful that the type variables for x and y are not unified; here, eax is being T * get_T ( void ) { S * s = get_S (); if ( s == NULL ) { return NULL ; } T * t = S2T ( s ); return t ; } get_T : call get_S test eax , eax jz local_exit push eax call S2T add esp , 4 local_exit : ret Figure 1. A common fortuitous re-use of a known value. used more like a syntactic constant than a dynamic value that should be typed. Fortuitous re-use of values: A related situation appears in the common control-flow pattern represented by the snippet of C and the corresponding machine code in Figure 1. Note that on procedure exit, the return value in eax may have come from either the return value of S2T or from the return value of get_S (if NULL). If this situation is not detected, we will see a false relationship between the incompatible return types of get_T and get_S. Re-use of stack slots: If a function uses two variables of the same size in disjoint scopes, there is no need to allocate two separate stack slots for those variables. Often the optimizer will reuse a stack slot from a variable that has dropped out of scope. This is true even if the new variable has a different type. This optimization even applies to the stack slots used to store formal-in parameters, as in Figure 2; once the function’s argument is no longer needed, the optimizer can overwrite it with a local variable of an incompatible type. More generally, we cannot assume that the map from program variables to physical locations is one-to-one. We cannot even make the weaker assumption that the program variables inhabiting a single physical location at different times will all belong to a single type. We handle these issues through a combination of typesystem features (subtyping instead of unification) and program analyses (reaching definitions for stack variables and trace partitioning [21]). 2.2 Polymorphic Functions We discovered that, although not directly supported by the C type system, most programs define or make use of functions that are effectively polymorphic. The most well-known example is malloc: the return value is expected to be immediately cast to some other type T*. Each call to malloc may be thought of as returning some pointer of a different type. The type of malloc is effectively not size_t → void*, but rather ∀τ.size_t → τ *. The problem of a polymorphic malloc could be mitigated by treating each call site p as a call to a distinct function mallocp , each of which may have a distinct return type Tp *. Unfortunately, it is not sufficient to treat a handful of special functions like malloc this way: it is common to see binaries # include < stdlib .h > struct LL { struct LL * next ; int handle ; }; int close_last ( struct LL * list ) { while ( list - > next != NULL ) { list = list - > next ; } return close ( list - > handle ); } close_last : push ebp mov ebp , esp sub esp ,8 mov edx , dword [ ebp + arg_0 ] jmp loc_8048402 loc_8048400 : mov edx , eax loc_8048402 : mov eax , dword [ edx ] test eax , eax jnz loc_8048400 mov eax , dword [ edx +4] mov dword [ ebp + arg_0 ] , eax leave jmp __thunk_ . close ∀F. (∃τ.C) ⇒ F where F.instack0 v τ C= τ.load.σ32@0 v τ τ.load.σ32@4 v int ∧# FileDescriptor int ∨# SuccessZ v F.outeax typedef struct { Struct_0 * field_0 ; int // # FileDescriptor field_4 ; } Struct_0 ; int // # SuccessZ close_last ( const Struct_0 *); Figure 2. Example C code (compiled with gcc 4.5.4 on Linux with flags -m32 -O2), disassembly, type scheme inferred from the machine code, and reconstructed C type. The tags #FileDescriptor and #SuccessZ encode inferred higher-level purposes. that use user-defined allocators and wrappers to malloc. All of these functions would also need to be accurately identified and duplicated for each callsite. A similar problem exists for functions like free, which is polymorphic in its lone parameter. Even more complex are functions like memcpy, which is polymorphic in its first two parameters and its return type, though the three types are not independent of each other. Furthermore, the polymorphic type signatures malloc : ∀τ.size_t → τ * free : ∀τ.τ * → void memcpy : ∀α, β.(β v α) ⇒ (α* × β* × size_t) → α* are all strictly more informative to the reverse engineer than the standard C signatures. How else could one know that the void* returned by malloc is not meant to be an opaque handle, but rather should be cast to some other pointer type? In compiled C++ binaries, polymorphic functions are even more common. For example, a class member function must potentially accept both base_t* and derived_t* as types for this. Foster et al. [11] noted that using bounded polymorphic type schemes for libc functions increased the precision of type-qualifier inference, at the level of source code. To advance the state of the art in machine-code type recovery, we believe it is important to also embrace polymorphic functions as a natural and common feature of machine code. Significant improvements to static type reconstruction—even for monomorphic types—will require the capability to infer polymorphic types of some nontrivial complexity. 2.3 Recursive Types The relevance of recursive types for decompilation was recently discussed by Schwartz et al. [30], where lack of a recursive type system for machine code was cited as an important source of imprecision. Since recursive data structures are relatively common, it is desirable that a typeinference scheme for machine code be able to represent and infer recursive types natively. 2.4 Offset and Reinterpreted Pointers Unlike in source code, there is no syntactic distinction in machine code between a pointer-to-struct and a pointer-tofirst-member-of-struct. For example, if X has type struct { char*, FILE*, size_t }* on a 32-bit platform, then it should be possible to infer that X + 4 can be safely passed to fclose; conversely, if X + 4 is passed to fclose we may need to infer that X points to a structure that, at offset 4, contains a FILE*. This affects the typing of local structures, as well: a structure on the stack may be manipulated using a pointer to its starting address or by manipulating the members directly, e.g., through the frame pointer. These idioms, along with casts from derived* to base*, fall under the general class of physical [31] or non-structural [24] subtyping. In Retypd, we model these forms of subtyping using type scheme specialization (§ 3.5). Additional hints about the extent of local variables are found using datadelineation analysis [13]. 2.5 Disassembly Failures The problem of producing correct disassembly for stripped binaries is equivalent to the halting problem. As a result, we can never assume that our reconstructed program representation will be perfectly correct. Even sound analyses built on top of an unsound program representation may exhibit inconsistencies and quirks. Thus, we must be careful that incorrect disassembly or analysis results from one part of the binary will not influence the correct type results we may have gathered for the rest of the binary. Type systems that model value assignments as type unifications are vulnerable to over-unification issues caused by bad IR. Since unification is non-local, bad constraints in one part of the binary can degrade all type results. Another instance of this problem arises from the use of register parameters. Although the x86 cdecl calling convention uses the stack for parameter passing, most optimized binaries will include many functions that pass parameters in registers for speed. Often, these functions do not conform to any standard calling convention. Although we work hard to ensure that only true register parameters are reported, conservativeness demands the occasional false positive. Type-reconstruction methods that are based on unification are generally sensitive to precision loss due to false-positive register parameters. A common case is the “push ecx” idiom that reserves space for a single local variable in the stack frame of a function f . If ecx is incorrectly viewed as a register parameter of f in a unification-based scheme, whatever type variables are bound to ecx at each callsite to f will be mistakenly unified. In our early experiments, we found these overunifications to be a persistent and hard-to-diagnose source of imprecision. In our early unification-based experiments, mitigation heuristics against overunification quickly ballooned into a disproportionately large and unprincipled component of type analysis. We designed Retypd’s subtype-based constraint system to avoid the need for such ad-hoc prophylactics against overunification. Table 1. Example field labels (type capabilities) in Σ. Label Variance .inL .outL .load .store .σN@k ⊕ ⊕ 2.7 ⊕ Capability Function with input in location L. Function with output in location L. Readable pointer. Writable pointer. Has N -bit field at offset k. Incomplete Points-to Information Degradation of points-to accuracy on large programs has been identified as a source of type-precision loss in other systems [10]. Our algorithm can provide high-quality types even in the absence of points-to information. Precision can be further improved by increasing points-to knowledge via machine-code analyses such as VSA [6], but good results are already attained with no points-to analysis beyond the simpler problem of tracking the stack pointer. 2.8 Ad-hoc Subtyping • reducing the storage requirements of a doubly-linked list Programs may define an ad-hoc type hierarchy via typedefs. This idiom appears in the Windows API, where a variety of handle types are all defined as typedefs of void*. Some of the handle types are to be used as subtypes of other handles; for example, a GDI handle (HGDI) is a generic handle used to represent any one of the more specific HBRUSH, HPEN, etc. In other cases, a typedef may indicate a supertype, as in LPARAM or DWORD; although these are typedefs of int, they have the intended semantics of a generic 32-bit type, which in different contexts may be used as a pointer, an integer, a flag set, and so on. To accurately track ad-hoc hierarchies requires a type system based around subtyping rather than unification. Models for common API type hierarchies are useful; still better is the ability for the end user to define or adjust the initial type hierarchy at run time. We support this feature by parameterizing the main type representation by an uninterpreted lattice Λ, as described in §3.5. • directly manipulating the bit representation of another 3. 2.6 Cross-casting and Bit Twiddling Even at the level of source code, there are already many type-unsafe idioms in common use. Most of these idioms operate by directly manipulating the bit representation of a value, either to encode additional information or to perform computations that are not possible using the type’s usual interface. Some common examples include • hashing values by treating them as untyped bit blocks [1], • stealing unused bits of a pointer for tag information, such as whether a thunk has been evaluated [20], by XOR-combining the next and prev pointers, and type, as in the quake3 inverse square root trick [29]. Because of these type-unsafe idioms, it is important that a type-inference scheme continues to produce useful results even in the presence of apparently contradictory constraints. We handle this situation in three ways: 1. separating the phases of constraint entailment, solving, and consistency checking, 2. modeling types with sketches (§ 3.5) that carry more information than C types, and 3. using unions to combine types with otherwise incompatible capabilities (e.g., τ is both int-like and pointer-like). The Type System The type system used by Retypd is based around the inference of recursively constrained type schemes (§3.1). Solutions to constraint sets are modeled by sketches (§ 3.5); the sketch associated to a value consists of a record of capabilities which that value holds, such as whether it can be stored to, called, or accessed at a certain offset. Sketches also include markings drawn from a customizable lattice (Λ, ∨, ∧, <:), used to propagate high-level information such as typedef names and domain-specific purposes during type inference. Retypd also supports recursively constrained type schemes that abstract over the set of types subject to a constraint set C. The language of type constraints used by Retypd is weak enough that for any constraint set C, satisfiability of C can be Subtyping Derived Type Variable Formation αvβ (T-L EFT ) VAR α αvβ (T-R IGHT ) VAR β VAR α (S-R EFL ) αvα α v β, VAR α.` (T-I NHERIT L) VAR β.` α v β, VAR β.` (T-I NHERIT R) VAR α.` VAR α.` (T-P REFIX ) VAR α α v β, β v γ (S-T RANS ) αvγ α v β, α v β, VAR β.`, h`i = ⊕ (S-F IELD⊕ ) α.` v β.` VAR β.`, h`i = β.` v α.` (S-F IELD ) VAR α.load, VAR α.store (S-P OINTER ) α.store v α.load Figure 3. Deduction rules for the type system. α, β, γ represent derived type variables; ` represents a label in Σ. reduced (in cubic time) to checking a set of scalar constraints κ1 <: κ2 , where κi are constants belonging to Λ. Thanks to the reduction of constraint satisfiability to scalar constraint checking, we can omit expensive satisfiability checks during type inference. Instead, we delay the check until the final stage when internal types are converted to C types for display, providing a natural place to instantiate union types that resolve any inconsistencies. Since compiler optimizations and type-unsafe idioms in the original source frequently lead to program fragments with unsatisfiable type constraints (§2.5, §2.6), this trait is particularly desirable. 3.1 Syntax: the Constraint Type System Throughout this section, we fix a set V of type variables, an alphabet Σ of field labels, and a function h·i : Σ → {⊕, } denoting the variance (Definition 3.2) of each label. We do not require the set Σ to be finite. Retypd makes use of a large set of labels; for simplicity, we will focus on those in Table 1. Within V, we assume there is a distinguished set of type constants. These type constants are symbolic representations κ of elements κ belonging to some lattice, but are otherwise uninterpreted. It is usually sufficient to think of the type constants as type names or semantic tags. Definition 3.1. A derived type variable is an expression of the form αw with α ∈ V and w ∈ Σ∗ . Definition 3.2. The variance of a label ` encodes the subtype relationship between α.` and β.` when α is a subtype of β, formalized in rules S-F IELD⊕ and S-F IELD of Figure 3. The variance function h·i can be extended to Σ∗ by defining hεi = ⊕ and hxwi = hxi · hwi, where {⊕, } is the sign monoid with ⊕ · ⊕ = · = ⊕ and ⊕ · = · ⊕ = . A word w ∈ Σ∗ is called covariant if hwi = ⊕, or contravariant if hwi = . Definition 3.3. Let V = {αi } be a set of base type variables. A constraint is an expression of the form VAR X (“existence of the derived type variable X”) or X v Y (“X is a subtype of Y ”), where X and Y are derived type variables. A constraint set over V is a finite collection C of constraints, where the type variables in each constraint are either type constants or members of V. We will say that C entails c, denoted C ` c, if c can be derived from the constraints in C using the de- duction rules of Figure 3. We also allow projections: given a constraint set C with free variable τ , the projection ∃τ.C binds τ as an “internal” variable in the constraint set. See τ in Figure 2 for an example or, for a more in-depth treatment of constraint projection, see Su et al. [34]. The field labels used to form derived type variables are meant to represent capabilities of a type. For example, the constraint VAR α.load means α is a readable pointer, and the derived type variable α.load represents the type of the memory region obtained by loading from α. Let us briefly see how operations in the original program translate to type constraints, using C-like pseudocode for clarity. The full conversion from disassembly to type constraints is described in Appendix A. Value copies: When a value is moved between program variables in an assignment like x := y, we make the conservative assumption that the type of x may be upcast to a supertype of y. We will generate a constraint of the form Y v X. Loads and stores: Suppose that p is a pointer to a 32bit type, and a value is loaded into x by the assignment x := *p. Then we will generate a constraint of the form P.load.σ32@0 v X. Similarly, a store *q := y results in the constraint Y v Q.store.σ32@0. In some of the pointer-based examples in this paper we omit the final .σN@k access after a .load or .store to simplify the presentation. Function calls: Suppose the function f is invoked by y := f(x). We will generate the constraints X v F.in and F.out v Y , reflecting the flow of actuals to and from formals. Note that if we define A.in = X and A.out = Y then the two constraints are equivalent to F v A by the rules of Figure 3. This encodes the fact that the called function’s type must be at least as specific as the type used at the callsite. One of the primary goals of our type-inference engine is to associate to each procedure a most-general type scheme. Definition 3.4. A type scheme is an expression of the form ∀α. C ⇒ α1 where ∀α = ∀α1 . . . ∀αn is quantification over a set of type variables, and C is a constraint set over {αi }i=1..n . Type schemes provide a way of encoding the pre- and postconditions that a function places on the types in its calling context. Without the constraint sets, we would only be able to represent conditions of the form “the input must be a subtype of X” and “the output must be a supertype of Y ”. The constraint set C can be used to encode more interesting type relations between inputs and outputs, as in the case of memcpy (§2.2). For example, a function that returns the second 4-byte element from a struct* may have the type scheme ∀τ. (τ.in.load.σ32@4 v τ.out) ⇒ τ . 3.2 f () { p = q; *p = x; y = *q; } g () { p = q; *q = x; y = *p; } Figure 4. Two programs, each mediating a copy from x to y through a pair of aliased pointers. Deduction Rules The deduction rules for our type system appear in Figure 3. Most of the rules are self-evident under the interpretation in Definition 3.3, but a few require some additional motivation. S-F IELD⊕ and S-F IELD : These rules ensure that field labels act as co- or contra-variant type operators, generating subtype relations between derived type variables from subtype relations between the original variables. T-I NHERIT L and T-I NHERIT R: The rule T-I NHERIT L should be uncontroversial, since a subtype should have all capabilities of its supertype. The rule T-I NHERIT R is more unusual since it moves capabilities in the other direction; taken together, these rules require that two types in a subtype relation must have exactly the same set of capabilities. This is a form of structural typing, ensuring that comparable types have the same shape. Structural typing appears to be at odds with the need to cast more capable objects to less capable ones, as described in §2.4. Indeed, T-I NHERIT R eliminates the possibility of forgetting capabilities during value assignments. But we still maintain this capability at procedure invocations due to our use of polymorphic type schemes. An explanation of how type-scheme instantiation enables us to forget fields of an object appears in §3.4, with more details in §E.1.2. These rules ensure that Retypd can perform “iterative variable recovery”; lack of iterative variable recovery was cited by the creators of the Phoenix decompiler [30] as a common cause of incorrect decompilation when using TIE [17] for type recovery. S-P OINTER: This rule is a consistency condition ensuring that the type that can be loaded from a pointer is a supertype of the type that can be stored to a pointer. Without this rule, pointers would provide a channel for subverting the type system. An example of how this rule is used in practice appears in §3.3. The deduction rules of Figure 3 are simple enough that each proof may be reduced to a normal form (see Theorem B.1). An encoding of the normal forms as transition sequences in a modified pushdown system is used to provide a compact representation of the entailment closure C = {c | C ` c}. The pushdown system modeling C is queried and manipulated to provide most of the interesting type-inference functionality. An outline of this functionality appears in §5.2. 3.3 Modeling Pointers To model pointers soundly in the presence of subtyping, we found that our initial naïve approach suffered from unexpected difficulties when combined with subtyping. Following the C type system, it seemed natural to model pointers by introducing an injective unary type constructor Ptr, so that Ptr(T ) is the type of pointers to T . In a unification-based type system, this approach works as expected. In the presence of subtyping, a new issue arises. Consider the two programs in Figure 4. Since the type variables P and Q associated to p, q can be seen to be pointers, we can begin by writing P = Ptr(α), Q = Ptr(β). The first program will generate the constraint set C1 = {Ptr(β) v Ptr(α), X v α, β v Y } while the second generates C2 = {Ptr(β) v Ptr(α), X v β, α v Y }. Since each program has the effect of copying the value in x to y, both constraint sets should satisfy Ci ` X v Y . To do this, the pointer subtype constraint must entail some constraint on α and β, but which one? If we assume that Ptr is covariant, then Ptr(β) v Ptr(α) entails β v α and so C2 ` X v Y , but C1 6 ` X v Y . On the other hand, if we make Ptr contravariant then C1 ` X v Y but C2 6 ` X v Y . It seems that our only recourse is to make subtyping degenerate to type equality under Ptr: we are forced to declare that Ptr(β) v Ptr(α) ` α = β, which of course means that Ptr(β) = Ptr(α) already. This is a catastrophe for subtyping as used in machine code, since many natural subtype relations are mediated through pointers. For example, the unary Ptr constructor cannot handle the simplest kind of C++ class subtyping, where a derived class physically extends a base class by appending new member variables. The root cause of the difficulty seems to be in conflating two capabilities that (most) pointers have: the ability to be written through and the ability to be read through. In Retypd, these two capabilities are modeled using different field labels .store and .load. The .store label is contravariant, while the .load label is covariant. To see how the separation of pointer capabilities avoids the loss of precision suffered by Ptr, we revisit the two example programs. The first generates the constraint set C10 = {Q v P, X v P .store, Q.load v Y } By rule T-I NHERIT R we may conclude that Q also has a field of type .store. By S-P OINTER we can infer that Q.store v Q.load. Finally, since .store is contravariant and Q v P , S-F IELD says we also have P .store v Q.store. Putting these parts together gives the subtype chain X v P .store v Q.store v Q.load v Y The second program generates the constraint set C20 = {Q v P, X v Q.store, P .load v Y } X v Q.store v Q.load v P .load v Y By splitting out the read- and write-capabilities of a pointer, we can achieve a sound account of pointer subtyping that does not degenerate to type equality. Note the importance of the consistency condition S-P OINTER: this rule ensures that writing through a pointer and reading the result cannot subvert the type system. The need for separate handling of read- and writecapabilities in a mutable reference has been rediscovered multiple times. A well-known instance is the covariance of the array type constructor in Java and C#, which can cause runtime type errors if the array is mutated; in these languages, the read capabilities are soundly modeled only by sacrificing soundness for the write capabilities. Non-structural Subtyping and T-I NHERIT R It was noted in § 3.2 that the rule T-I NHERIT R leads to a system with a form of structural typing: any two types in a subtype relation must have the same capabilities. Superficially, this seems problematic for modeling typecasts that forget about fields, such as a cast from derived* to base* when derived* has additional fields (§2.4). The missing piece that allows us to effectively forget capabilities is instantiation of callee type schemes at a callsite. To demonstrate how polymorphism enables forgetfulness, consider the example type scheme ∀F. (∃τ.C) ⇒ F from Figure 2. The function close_last can be invoked by providing any actual-in type α, such that α v F.instack0 ; in particular, α can have more fields than those required by C. We simply select a more capable type for the existentially-quantified type variable τ in C. In effect, we have used specialization of polymorphic types to model non-structural subtyping idioms, while subtyping is used only to model structural subtyping idioms. This restricts our introduction of non-structural subtypes to points where a type scheme is instantiated, such as at a call site. 3.5 ck0 in sta > out eax Since Q v P and P has a field .load, we conclude that Q has a .load field as well. Next, S-P OINTER requires that Q.store v Q.load. Since .load is covariant, Q v P implies that Q.load v P .load. This gives the subtype chain 3.4 α = int ∨# SuccessZ β = int ∧# FileDescriptor Semantics: the Poset of Sketches The simple type system defined by the deduction rules of Figure 3 defines the syntax of legal derivations in our type system. The constraint solver of §5.2 is designed to find a simple representation for all conclusions that can be derived > load 0 2@ σ3 > σ3 2@ 4 α > load A β A Figure 5. A sketch instantiating the type scheme in Figure 2. from a set of type constraints. Yet there is no notion of what a type is inherent to the deduction rules of Figure 3. We have defined the rules of the game, but not the equipment with which it should be played. We found that introducing C-like entities at the level of constraints or types resulted in too much loss of precision when working with the challenging examples described in § 2. Consequently we developed the notion of a sketch, a kind of regular tree labeled with elements of an auxiliary lattice Λ. Sketches are related to the recursive types studied by Amadio and Cardelli [3] and Kozen et al. [16], but do not depend on a priori knowledge of the ranked alphabet of type constructors. Definition 3.5. A sketch is a (possibly infinite) tree T with edges labeled by elements of Σ and nodes marked with elements of a lattice Λ, such that T only has finitely many subtrees up to labeled isomorphism. By collapsing isomorphic subtrees, we can represent sketches as deterministic finite state automata with each state labeled by an element of Λ. The set of sketches admits a lattice structure, with operations described by Figure 18. The lattice of sketches serves as the model in which we interpret type constraints. The interpretation of the constraint VAR α.u is “the sketch Sα admits a path from the root with label sequence u”, and α.u v β.v is interpreted as “the sketch obtained from Sα by traversing the label sequence u is a subsketch (in the lattice order) of the sketch obtained from Sβ by traversing the sequence v.” The main utility of sketches is that they are nearly a free tree model [25] of the constraint language. Any constraint set C is satisfiable over the lattice of sketches, as long as C cannot prove an impossible subtype relation in the auxiliary lattice Λ. In particular, we can always solve the fragment of C that does not reference constants in Λ. Stated operationally, we can always recover the tree structure of sketches that potentially solve C. This observation is formalized by the following theorem: Theorem 3.1. Suppose that C is a constraint set over the variables {τi }i∈I . Then there exist sketches {Si }i∈I , such that w ∈ Si if and only if C ` VAR τi .w. Proof. The idea is to symmetrize v using an algorithm that is similar in spirit to Steensgaard’s method of almost-lineartime pointer analysis [33]. Begin by forming a graph with one node n(α) for each derived type variable appearing in C, along with each of its prefixes. Add a labeled edge ` n(α) → n(α.`) for each derived type variable α.` to form a graph G. Now quotient G by the equivalence relation ∼ defined by n(α) ∼ n(β) if α v β ∈ C, and n(α0 ) ∼ n(β 0 ) ` `0 whenever there are edges n(α) → n(α0 ) and n(β) → n(β 0 ) in G with n(α) ∼ n(β) where either ` = `0 or ` = .load and `0 = .store. By construction, there exists a path through G/∼ with label sequence u starting at the equivalence class of τi if and only if C ` VAR τi .u; the (regular) set of all such paths yields the tree structure of Si . Working out the lattice elements that should label Si is a trickier problem; the basic idea is to use the same automaton Q constructed during constraint simplification (Theorem 5.1) to answer queries about which type constants are upper and lower bounds on a given derived type variable. The full algorithm is listed in §D.4. In Retypd, we use a large auxiliary lattice Λ containing hundreds of elements that includes a collection of standard C type names, common typedefs for popular APIs, and user-specified semantic classes such as #FileDescriptor in Figure 2. This lattice helps model ad-hoc subtyping and preserve high-level semantic type names, as discussed in §2.8. Note. Sketches are just one of many possible models for the deduction rules that could be proposed. A general approach is to fix a poset (T , <:) of types, interpret v as <:, and interpret co- and contra-variant field labels as monotone (resp. antimonotone) functions T → T . The separation of syntax from semantics allows for a simple way to parameterize the type-inference engine by a model of types. By choosing a model (T , ≡) with a symmetric relation ≡ ⊆ T × T , a unification-based type system similar to SecondWrite [10] is generated. On the other hand, by forming a lattice of type intervals and interval inclusion, we would obtain a type system similar to TIE [17] that outputs upper and lower bounds on each type variable. 4. Analysis Framework 4.1 IR Reconstruction Retypd is built on top of GrammaTech’s machine-codeanalysis tool CodeSurfer for Binaries. CodeSurfer carries out common program analyses on binaries for multiple CPU architectures, including x86, x86-64, and ARM. CodeSurfer is used to recover a high-level IR from the raw machine code; type constraints are generated directly from this IR, and resolved types are applied back to the IR and become visible to the GUI and later analysis phases. CodeSurfer achieves platform independence through TSL [18], a language for defining a processor’s concrete semantics in terms of concrete numeric types and mapping types that model flag, register, and memory banks. Interpreters for a given abstract domain are automatically created from the concrete semantics simply by specifying the abstract domain A and an interpretation of the concrete numeric and mapping types. Retypd uses CodeSurfer’s recovered IR to determine the number and location of inputs and outputs to each procedure, as well as the program’s call graph and per-procedure control-flow graphs. An abstract interpreter then generates sets of type constraints from the concrete TSL instruction semantics. A detailed account of the abstract semantics for constraint generation appears in Appendix A. 4.2 Approach to Type Resolution After the initial IR is recovered, type inference proceeds in two stages: first, type-constraint sets are generated in a bottom-up fashion over the strongly-connected components of the callgraph. Pre-computed type schemes for externally linked functions may be inserted at this stage. Each constraint set is simplified by eliminating type variables that do not belong to the SCC’s interface; the simplification algorithm is outlined in § 5. Once type schemes are available, the callgraph is traversed bottom-up, assigning sketches to type variables as outlined in § 3.5. During this stage, type schemes are specialized based on the calling contexts of each function. Appendix F lists the full algorithms for constraint simplification (F.1) and solving (F.2). 4.3 Translation to C Types The final phase of type resolution converts the inferred sketches to C types for presentation to the user. Since C types and sketches are not directly comparable, this resolution phase necessarily involves the application of heuristic conversion policies. Restricting the heuristic policies to a single post-inference phase provides us with the flexibility to generate high-quality, human-readable C types while maintaining soundness and generality during type reconstruction. Example 4.1. A simple example involves the generation of const annotations on pointers. We decided on a policy that only introduced const annotations on function parameters, by annotating the parameter at location L when the constraint set C for procedure p satisfies C ` VAR p.inL .load and C6 ` VAR p.inL .store. Retypd appears to be the first machinecode type-inference system to infer const annotations; a comparison of our recovered annotations to the original source code appears in §6.4. Example 4.2. A more complex policy is used to decide between union types and generic types when incompatible scalar constraints must be resolved. Retypd merges comparable scalar constraints to form antichains in Λ; the elements of these antichains are then used for the resulting C union type. Example 4.3. The initial type-simplification stage results in types that are as general as possible. Often, this means that types are found to be more general than is strictly helpful to a (human) observer. A policy is applied that specializes type schemes to the most specific scheme that is compatible with all statically-discovered uses. For example, a C++ object may include a getter function with a highly polymorphic type scheme, since it could operate equally well on any structure with a field of the correct type at the correct offset. But we expect that in every calling context, the getter will be called on a specific object type (or perhaps its derived types). We can specialize the getter’s type by choosing the least polymorphic specialization that is compatible with the observed uses. By specializing the function signature before presenting a final C type to the user, we trade some generality for types that are more likely to match the original source. 5. The Simplification Algorithm In this section, we sketch an outline of the simplification algorithm at the core of the constraint solver. The complete algorithm appears in Appendix D. 5.1 Inferring a Type Scheme The goal of the simplification algorithm is to take an inferred type scheme ∀α. C ⇒ τ for a procedure and create a smaller constraint set C 0 , such that any constraint on τ implied by C is also implied by C 0 . Let C denote the constraint set generated by abstract interpretation of the procedure being analyzed, and let α be the set of free type variables in C. We could already use ∀α. C ⇒ τ as the constraint set in the procedure’s type scheme, since the input and output types used in a valid invocation of f are tautologically those that satisfy C. Yet, as a practical matter, we cannot use the constraint set directly, since this would result in constraint sets with many useless free variables and a high growth rate over nested procedures. Instead, we seek to generate a simplified constraint set C 0 , such that if c is an “interesting” constraint and C ` c then C 0 ` c as well. But what makes a constraint interesting? Definition 5.1. For a type variable τ , a constraint is called interesting if it has one of the following forms: • A capability constraint of the form VAR τ.u • A recursive subtype constraint of the form τ.u v τ.v • A subtype constraint of the form τ.u v κ or κ v τ.u where κ is a type constant. We will call a constraint set C 0 a simplification of C if C 0 ` c for every interesting constraint c, such that C ` c. Since both C and C 0 entail the same set of constraints on τ , it is valid to replace C with C 0 in any valid type scheme for τ . Simplification heuristics for set-constraint systems were studied by Fähndrich and Aiken [12]; our simplification algorithm encompasses all of these heuristics. 5.2 Unconstrained Pushdown Systems The constraint-simplification algorithm works on a constraint set C by building a pushdown system PC whose transition sequences represent valid derivations of subtyping judgements. We briefly review pushdown systems and some necessary generalizations here. Definition 5.2. An unconstrained pushdown system is a triple P = (V, Σ, ∆) where V is the set of control locations, Σ is the set of stack symbols, and ∆ ⊆ (V × Σ∗ )2 is a (possibly infinite) set of transition rules. We will denote a transition rule by hX; ui ,→ hY ; vi where X, Y ∈ V and u, v ∈ Σ∗ . We define the set of configurations to be V × Σ∗ . In a configuration (p, w), p is called the control state and w the stack state. Note that we require neither the set of stack symbols, nor the set of transition rules, to be finite. This freedom is required to model the derivation S-P OINTER of Figure 3, which corresponds to an infinite set of transition rules. Definition 5.3. An unconstrained pushdown system P determines a transition relation −→ on the set of configurations: (X, w) −→ (Y, w0 ) if there is a suffix s and a rule hX; ui ,→ hY ; vi, such that w = us and w0 = vs. The ∗ transitive closure of −→ is denoted −→. With this definition, we can state the primary theorem behind our simplification algorithm. Theorem 5.1. Let C be a constraint set and V a set of base type variables. Define a subset SC of (V ∪ Σ)∗ × (V ∪ Σ)∗ by (Xu, Y v) ∈ SC if and only if C ` X.u v Y.v. Then SC is a regular set, and an automaton Q to recognize SC can be constructed in O(|C|3 ) time. Proof. The basic idea is to treat each X.u v Y.v ∈ C as a transition rule hX; ui ,→ hY ; vi in the pushdown system P. In addition, we add control states # S TART, # E ND with transitions h# S TART; Xi ,→ hX; εi and hX; εi ,→ h# E ND; Xi for each X ∈ V. For the moment, assume that (1) all labels are covariant, and (2) the rule S-P OINTER is ignored. ∗ By construction, (# S TART, Xu) −→ (# E ND, Y v) in P if and only if C ` X.u v Y.v. A theorem of Büchi [27] ensures that for any two control states A and B in a standard (not unconstrained) pushdown system, the set of all pairs (u, v) ∗ with (A, u) −→ (B, v) is a regular language; Caucal [8] gives a saturation algorithm that constructs an automaton to recognize this language. In the full proof, we add two novelties: first, we support contravariant stack symbols by encoding variance data into the control states and transition rules. The second novelty involves the rule S-P OINTER; this rule is problematic since the natural encoding would result in infinitely many transition rules. We extend Caucal’s construction to lazily instantiate all necessary applications of S-P OINTER during saturation. For details, see Appendix D. Since C will usually entail an infinite number of constraints, this theorem is particularly useful: it tells us that the full set of constraints entailed by C has a finite encoding by an automaton Q. Further manipulations on the constraint closure, such as efficient minimization, can be carried out on Q. By restricting the transitions to and from # S TART and E ND, the same algorithm is used to eliminate type variables, producing the desired constraint simplifications. # 5.3 Overall Complexity of Inference The saturation algorithm used to perform constraint-set simplification and type-scheme construction is, in the worst case, cubic in the number of subtype constraints to simplify. Since some well-known pointer analysis methods also have cubic complexity (such as Andersen [4]), it is reasonable to wonder if Retypd’s “points-to free” analysis really offers a benefit over a type-inference system built on top of points-to analysis data. To understand where Retypd’s efficiencies are found, first consider the n in O(n3 ). Retypd’s core saturation algorithm is cubic in the number of subtype constraints; due to the simplicity of machine-code instructions, there is roughly one subtype constraint generated per instruction. Furthermore, Retypd applies constraint simplification on each procedure in isolation to eliminate the procedure-local type variables, resulting in constraint sets that only relate procedure formalins, formal-outs, globals, and type constants. In practice, these simplified constraint sets are small. Since each procedure’s constraint set is simplified independently, the n3 factor is controlled by the largest procedure size, not the overall size of the binary. By contrast, sourcecode points-to analysis such as Andersen’s are generally cubic in the overall number of pointer variables, with exponential duplication of variables depending on the call-string depth used for context sensitivity. The situation is even more difficult for machine-code points-to analyses such as VSA, since there is no syntactic difference between a scalar and a pointer in machine code. In effect, every program variable must be treated as a potential pointer. On our benchmark suite of real-world programs, we found that execution time for Retypd scales slightly below O(N 1.1 ), where N is the number of program instructions. The following back-of-the-envelope calculation can heuristically explain much of the disparity between the O(N 3 ) theoretical complexity and the O(N 1.1 ) measured complexity. On our benchmark suite, the maximum procedure size n grew roughly like n ≈ N 2/5 . We could then expect that a per-procedure analysis would perform worst when the program is partitioned into N 3/5 procedures of size N 2/5 . On such a program, a perprocedure O(nk ) analysis may be expected to behave more like an O(N 3/5 · (N 2/5 )k ) = O(N (3+2k)/5 ) analysis overall. In particular, a per-procedure cubic analysis like Retypd could be expected to scale like a global O(N 1.8 ) analysis. The remaining differences in observed versus theoretical execution time can be explained by the facts that real-world constraint graphs do not tend to exercise the simplification algorithm’s worst-case behavior, and that the distribution of procedure sizes is heavily weighted towards small procedures. INT_PTR Proto_EnumAccounts ( WPARAM wParam , LPARAM lParam ) { *( int * ) wParam = accounts . getCount (); *( PROTOACCOUNT *** ) lParam = accounts . getArray (); return 0; } Figure 6. Ground-truth types declared in the original source do not necessarily reflect program semantics. Example from miranda32. 6. Evaluation 6.1 Implementation Retypd is implemented as a module within CodeSurfer for Binaries. By leveraging the multi-platform disassembly capabilities of CodeSurfer, it can operate on x86, x86-64, and ARM code. We performed the evaluation using minimal analysis settings, disabling value-set analysis (VSA) but computing affine relations between the stack and frame pointers. Enabling additional CodeSurfer phases such as VSA can greatly improve the reconstructed IR, at the expense of increased analysis time. Existing type-inference algorithms such as TIE [17] and SecondWrite [10] require some modified form of VSA to resolve points-to data. Our approach shows that high-quality types can be recovered in the absence of points-to information, allowing type inference to proceed even when computing points-to data is too unreliable or expensive. 6.2 Evaluation Setup Our benchmark suite consists of 160 32-bit x86 binaries for both Linux and Windows, compiled with a variety of gcc and Microsoft Visual C/C++ versions. The benchmark suite includes a mix of executables, static libraries, and DLLs. The suite includes the same coreutils and SPEC2006 benchmarks used to evaluate REWARDS, TIE, and SecondWrite [10, 17, 19]; additional benchmarks came from a standard suite of real-world programs used for precision and performance testing of CodeSurfer for Binaries. All binaries were built with optimizations enabled and debug information disabled. Ground truth is provided by separate copies of the binaries that have been built with the same settings, but with debug information included (DWARF on Linux, PDB on Windows). We used IdaPro [15] to read the debug information, which allowed us to use the same scripts for collecting ground-truth types from both DWARF and PDB data. All benchmarks were evaluated on a 2.6 GHz Intel Xeon E5-2670 CPU, running on a single logical core. RAM utilization by CodeSurfer and Retypd combined was capped at 10GB. Benchmark Description Instructions CodeSurfer benchmarks libidn Tutorial00 zlib ogg distributor libbz2 glut pngtest freeglut miranda XMail yasm python21 quake3 TinyCad Shareaza Domain name translator Direct3D tutorial Compression library Multimedia library UltraVNC repeater BZIP library, as a DLL The glut32.dll library A test of libpng The freeglut.dll library IRC client Email server Modular assembler Python 2.1 Quake 3 Computed-aided design Peer-to-peer file sharing 7K 9K 14K 20K 22K 37K 40K 42K 77K 100K 137K 190K 202K 281K 544K 842K SPEC2006 benchmarks 470.lbm 429.mcf 462.libquantum 401.bzip2 458.sjeng 433.milc 482.sphinx3 456.hmmer 464.h264ref 445.gobmk 400.perlbench 403.gcc Lattice Boltzmann Method Vehicle scheduling Quantum computation Compression Chess AI Quantum field theory Speech recognition Protein sequence analysis Video compression GNU Go AI Perl core C/C++/Fortran compiler 3K 3K 11K 13K 25K 28K 43K 71K 113K 203K 261K 751K Figure 7. Benchmarks used for evaluation. All binaries were compiled from source using optimized release configurations. The SPEC2006 benchmarks were chosen to match the benchmarks used to evaluate SecondWrite [10]. Our benchmark suite includes the individual binaries in Figure 7 as well as the collections of related binaries shown in Figure 10. We found that programs from a single collection tended to share a large amount of common code, leading to highly correlated benchmark results. For example, even though the coreutils benchmarks include many tools with very disparate purposes, all of the tools make use of a large, common set of statically linked utility routines. Over 80% of the .text section in tail consists of such routines; for yes, the number is over 99%. The common code and specific idioms appearing in coreutils make it a particularly lowvariance benchmark suite. In order to avoid over-representing these program collections in our results, we treated these collections as clusters in the data set. For each cluster, we computed the average of each metric over the cluster, then inserted the average as a single data point to the final data set. Because Retypd performs well on many clusters, this averaging procedure tends to reduce our overall precision and conservativeness measurements. Still, we believe that it gives a less biased depiction of the algorithm’s expected real-world behavior than does an average over all benchmarks. 6.3 Sources of Imprecision Although Retypd is built around a sound core of constraint simplification and solving, there are several ways that imprecision can occur. As described in §2.5, disassembly failures can lead to unsound constraint generation. Second, the heuristics for converting from sketches to C types are lossy by necessity. Finally, we treat the source types as ground truth, leading to “failures” whenever Retypd recovers an accurate type that does not match the original program—a common situation with type-unsafe source code. A representative example of this last source of imprecision appears in Figure 6. This source code belongs to the miranda32 IRC client, which uses a plugin-based architecture; most of miranda32’s functionality is implemented by “service functions” with the fixed signature int ServiceProc(WPARAM,LPARAM). The types WPARAM and LPARAM are used in certain Windows APIs for generic 16- and 32-bit values. The two parameters are immediately cast to other types in the body of the service functions, as in Figure 6. 6.4 const Correctness As a side-effect of separately modeling .load and .store capabilities, Retypd is easily able to recover information about how pointer parameters are used for input and/or output. We take this into account when converting sketches to C types; if a function’s sketch includes .inL .load but not .inL .store then we annotate the parameter at L with const, as in Figure 5 and Figure 2. Retypd appears to be the first machine-code type-inference system to infer const annotations directly. On our benchmark suite, we found that 98% of parameter const annotations in the original source code were recovered by Retypd. Furthermore, Retypd inferred const annotations on many other parameters; unfortunately, since most C and C++ code does not use const in every possible situation, we do not have a straightforward way to detect how many of Retypd’s additional const annotations are correct. Manual inspection of the missed const annotations shows that most instances are due to imprecision when analyzing one or two common statically linked library functions. This imprecision then propagates outward to callers, leading to decreased const correctness overall. Still, we believe the 98% recovery rate shows that Retypd offers a useful approach to const inference. Distance to source type coreutils 2 Interval size SPEC2006 All 1.5 1 0.5 0 2 Pointer accuracy coreutils 100% SPEC2006 All 100% 1.5 90% 90% 1 80% 80% 0.5 70% 70% Se pd ty Re rit e Re ty pd co nd W yp d E E* TI Re t RD W A RE ∗ Dynamic TI S- c* yp d Re t rit pd Re W on d ty e d ty p Se c E Re TI E* TI S- c* 0 W A RD RE Conservativeness ∗ Dynamic Figure 8. Distance to ground-truth types and size of the interval between inferred upper and lower bounds. Smaller distances represent more accurate types; smaller interval sizes represent increased confidence. Figure 9. Conservativeness and pointer accuracy metric. Perfect type reconstruction would be 100% conservative and match on 100% of pointer levels. Note that the y axis begins at 70%. 6.5 Multi-level pointer accuracy: ElWazeer et al. [10] also introduced a multi-level pointer-accuracy rate that attempts to quantify how many “levels” of pointers were correctly inferred. On SecondWrite’s benchmark suite, Retypd attained a mean multi-level pointer accuracy of 91%, compared with SecondWrite’s reported 73%. Across all benchmarks, Retypd averages 88% pointer accuracy. Conservativeness: The best type system would have a high conservativeness rate (few unsound decisions) coupled with a low interval size (tightly specified results) and low distance (inferred types are close to ground-truth types). In each of these metrics, Retypd performs about as well or better than existing approaches. Retypd’s mean conservativeness rate is 95%, compared to 94% for TIE. But note that TIE was evaluated only on coreutils; on that cluster, Retypd’s conservativeness was 98%. SecondWrite’s overall conservativeness is 96%, measured on a subset of the SPEC2006 benchmarks; Retypd attained a slightly lower 94% on this subset. It is interesting to note that Retypd’s conservativeness rate on coreutils is comparable to that of REWARDS, even though REWARDS’ use of dynamic execution traces suggests it would be more conservative than a static analysis by virtue of only generating feasible type constraints. Comparisons to Other Tools We gathered results over several metrics that have been used to evaluate SecondWrite, TIE, and REWARDS. These metrics were defined by Lee et al. [17] and are briefly reviewed here. TIE infers upper and lower bounds on each type variable, with the bounds belonging to a lattice of C-like types. The lattice is naturally stratified into levels, with the distance between two comparable types roughly being the difference between their levels in the lattice, with a maximum distance of 4. A recursive formula for computing distances between pointer and structural types is also used. TIE also determines a policy that selects between the upper and lower bounds on a type variable for the final displayed type. TIE considers three metrics based on this lattice: the conservativeness rate, the interval size, and the distance. A type interval is conservative if the interval bounds overapproximate the declared type of a variable. The interval size is the lattice distance from the upper to the lower bound on a type variable. The distance measures the lattice distance from the final displayed type to the ground-truth type. REWARDS and SecondWrite both use unification-based algorithms, and have been evaluated using the same TIE metrics. The evaluation of REWARDS using TIE metrics appears in Lee et al. [17]. Distance and interval size: Retypd shows substantial improvements over other approaches in the distance and intervalsize metrics, indicating that it generates more accurate types with less uncertainty. The mean distance to the ground-truth type was 0.54 for Retypd, compared to 1.15 for dynamic TIE, 1.53 for REWARDS, 1.58 for static TIE, and 1.70 for SecondWrite. The mean interval size shrunk to 1.2 with Retypd, compared to 1.7 for SecondWrite and 2.0 for TIE. 6.6 Performance Although the core simplification algorithm of Retypd has cubic worst-case complexity, it only needs to be applied on a per-procedure basis. This suggests that the real-world scaling behavior will depend on the distribution of procedure sizes, not on the whole-program size. Cluster Count Description freeglut-demos coreutils vpx-d vpx-e sphinx2 putty 3 107 8 6 4 4 freeglut samples GNU coreutils 8.23 VPx decoders VPx encoders Speech recognition SSH utilities Instructions 2K 10K 36K 78K 83K 97K Retypd, as reported Retypd, without clustering Distance Interval Conserv. Ptr. Acc. Const 0.66 0.51 0.63 0.63 0.42 0.51 1.49 1.19 1.68 1.53 1.09 1.05 97% 98% 98% 96% 94% 94% 83% 82% 92% 90% 91% 86% 100% 96% 100% 100% 99% 99% 0.54 0.53 1.20 1.22 95% 97% 88% 84% 98% 97% Figure 10. Clusters in the benchmark suite. For each metric, the average over the cluster is given. If a cluster average is worse than Retypd’s overall average for a certain metric, a box is drawn around the entry. 4GB 1000 Type inference memory usage Type inference time (seconds) 3 · 103 100 10 1 1K 10K 100K Program size (number of CFG nodes) 1M 2GB 1GB 500MB 100MB 50MB 1K 10K 100K Program size (number of CFG nodes) 1M Figure 11. Type-inference time on benchmarks. The line indicates the best-fit exponential t = 0.000725 · N 1.098 , demonstrating slightly superlinear real-world scaling behavior. The coefficient of determination is R2 = 0.977. Figure 12. Type-inference memory usage on benchmarks. The line indicates the best-fit exponential m = 0.037 · N 0.846 , with coefficient of determination R2 = 0.959. In practice, Figure 11 suggests that Retypd gives nearly linear performance over the benchmark suite, which ranges in size from 2K to 840K instructions. To measure Retypd’s performance, we used numerical regression to find the best-fit model T = αN β relating execution time T to program size N . This results in the relation T = 0.000725·N 1.098 with coefficient of determination R2 = 0.977, suggesting that nearly 98% of the variation in performance data can be explained by this model. In other words, on real-world programs Retypd demonstrates nearly linear scaling of execution time. The cubic worst-case per-procedure behavior of the constraint solver does not translate to cubic behavior overall. Similarly, we found that the sub-linear model m = 0.037 · N 0.846 explains 96% of the memory usage in Retypd. Note. The regressions above were performed by numerically fitting exponential models in (N, T ) and (N, m) space, rather than analytically fitting linear models in log-log space. Our models then minimize the error in the predicted values of T and m, rather than minimizing errors in log T or log m. Linear regression in log-log space results in the lesspredicative models T = 0.0003 · N 1.14 (R2 = 0.92) and m = 0.08 · N 0.77 (R2 = 0.88). The constraint-simplification workload of Retypd would be straightforward to parallelize over the directed acyclic graph of strongly-connected components in the callgraph, further reducing the scaling constant. If a reduction in memory usage is required, Retypd could swap constraint sets to disk; the current implementation keeps all working sets in RAM. 7. Related Work Machine-code type recovery: Hex-Ray’s reverse engineering tool IdaPro [15] is an early example of type reconstruction via static analysis. The exact algorithm is proprietary, but it appears that IdaPro propagates types through unification from library functions of known signature, halting the propagation when a type conflict appears. IdaPro’s reconstructed IR is relatively sparse, so the type propagation fails to produce useful information in many common cases, falling back to the default int type. However, the analysis is very fast. SecondWrite [10] is an interesting approach to static IR reconstruction with a particular emphasis on scalability. The authors combine a best-effort VSA variant for pointsto analysis with a unification-based type-inference engine. Accurate types in SecondWrite depend on high-quality pointsto data; the authors note that this can cause type accuracy to suffer on larger programs. In contrast, Retypd is not dependent on points-to data for type recovery and makes use of subtyping rather than unification for increased precision. TIE [17] is a static type-reconstruction tool used as part of Carnegie Mellon University’s binary-analysis platform (BAP). TIE was the first machine-code type-inference system to track subtype constraints and explicitly maintain upper and lower bounds on each type variable. As an abstraction of the C type system, TIE’s type lattice is relatively simple; missing features, such as recursive types, were later identified by the authors as an important target for future research [30]. HOWARD [32] and REWARDS [19] both take a dynamic approach, generating type constraints from execution traces. Through a comparison with HOWARD, the creators of TIE showed that static type analysis can produce higher-precision types than dynamic type analysis, though a small penalty must be paid in conservativeness of constraint-set generation. TIE also showed that type systems designed for static analysis can be easily modified to work on dynamic traces; we expect the same is true for Retypd, though we have not yet performed these experiments. Most previous work on machine-code type recovery, including TIE and SecondWrite, either disallows recursive types or only supports recursive types by combining typeinference results with a points-to oracle. For example, to infer that x has a the type struct S { struct S *, ...}* in a unification-based approach like SecondWrite, first we must have resolved that x points to some memory region M , that M admits a 4-byte abstract location α at offset 0, and that the type of α should be unified with the type of x. If pointer analysis has failed to compute an explicit memory region pointed to by x, it will not be possible to determine the type of x correctly. The complex interplay between type inference, points-to analysis, and abstract-location delineation leads to a relatively fragile method for inferring recursive types. In contrast, our type system can infer recursive types even when points-to facts are completely absent. Robbins et al. [28] developed an SMT solver equipped with a theory of rational trees and applied it to type reconstruction. Although this allows for recursive types, the lack of subtyping and the performance of the SMT solver make it difficult to scale this approach to real-world binaries. Except for test cases on the order of 500 instructions, precision of the recovered types was not assessed. Related type systems: The type system used by Retypd is related to the recursively constrained types (rc types) of Eifrig, Smith, and Trifonov [9]. Retypd generalizes the rc type system by building up all types using flexible records; even the function-type constructor →, taken as fundamental in the rc type system, is decomposed into a record with in and out fields. This allows Retypd to operate without the knowledge of a fixed signature from which type constructors are drawn, which is essential for analysis of stripped machine code. The use of CFL reachability to perform polymorphic subtyping first appeared in Rehof and Fähndrich [26], extending previous work relating simpler type systems to graph reachability [2, 23]. Retypd continues by adding type-safe handling of pointers and a simplification algorithm that allows us to compactly represent the type scheme for each function. CFL reachability has also been used to extend the type system of Java [14] and C++ [11] with support for additional type qualifiers. Our reconstructed const annotations can be seen as an instance of this idea, although our qualifier inference is not separated from type inference. To the best of our knowledge, no prior work has applied polymorphic type systems with subtyping to machine code. 8. Future Work One interesting avenue for future research could come from the application of dependent and higher-rank type systems to machine-code type inference, although we rapidly approach the frontier where type inference is undecidable. A natural example of dependent types appearing in machine code is malloc, which could be typed as malloc : (n : size_t) → >n where >n denotes the common supertype of all n-byte types. The key feature is that the value of a parameter determines the type of the result. Higher-rank types are needed to properly model functions that accept pointers to polymorphic functions as parameters. Such functions are not entirely uncommon; for example, any function that is parameterized by a custom polymorphic allocator will have rank ≥ 2. Retypd was implemented as an inference phase that runs after CodeSurfer’s main analysis loop. We expect that by moving Retypd into CodeSurfer’s analysis loop, there will be an opportunity for interesting interactions between IR generation and type reconstruction. 9. Conclusion By examining a diverse corpus of optimized binaries, we have identified a number of common idioms that are stumbling blocks for machine-code type inference. For each of these idioms, we identified a type-system feature that could enable the difficult code to be properly typed. We gathered these features into a type system and implemented the inference algorithm in the tool Retypd. Despite removing the requirement for points-to data, Retypd is able to accurately and conservatively type a wide variety of real-world binaries. We assert that Retypd demonstrates the utility of high-level type systems for reverse engineering and binary analysis. [17] J. Lee, T. Avgerinos, and D. Brumley. TIE: Principled reverse engineering of types in binary programs. In Network and Distributed System Security Symposium, pages 251–268, 2011. Acknowledgments [18] J. Lim and T. Reps. TSL: A system for generating abstract interpreters and its application to machine-code analysis. ACM Transactions on Programming Languages and Systems , 35(1): 4, 2013. The authors would like to thank Vineeth Kashyap and the anonymous reviewers for their many useful comments on this manuscript, and John Phillips, David Ciarletta, and Tim Clark for their help with test automation. References [1] ISO/IEC TR 19768:2007: Technical report on C++ library extensions, 2007. [2] O. Agesen. Constraint-based type inference and parametric polymorphism. In Static Analysis Symposium, pages 78–100, 1994. [3] R. M. Amadio and L. Cardelli. Subtyping recursive types. ACM Transactions on Programming Languages and Systems, 15(4):575–631, 1993. [4] L. O. Andersen. Program analysis and specialization for the C programming language. PhD thesis, University of Cophenhagen, 1994. [5] G. Balakrishnan, R. Gruian, T. Reps, and T. Teitelbaum. CodeSurfer/x86 – a platform for analyzing x86 executables. In Compiler Construction, pages 250–254, 2005. [6] G. Balakrishnan and T. Reps. Analyzing Memory Accesses in x86 Executables, in Compiler Construction, pages 5–23, 2004. [7] A. Carayol and M. Hague. Saturation algorithms for modelchecking pushdown systems. In International Conference on Automata and Formal Languages, pages 1–24, 2014. [8] D. Caucal. On the regular structure of prefix rewriting. Theoretical Computer Science, 106(1):61–86, 1992. [9] J. Eifrig, S. Smith, and V. Trifonov. Sound polymorphic type inference for objects. In Object-Oriented Programming, Systems, Languages, and Applications, pages 169–184, 1995. [10] K. ElWazeer, K. Anand, A. Kotha, M. Smithson, and R. Barua. Scalable variable and data type detection in a binary rewriter. In Programming Language Design and Implementation, pages 51–60, 2013. [11] J. S. Foster, R. Johnson, J. Kodumal, and A. Aiken. Flowinsensitive type qualifiers. ACM Transactions on Programming Languages and Systems, 28(6):1035–1087, 2006. [12] M. Fähndrich and A. Aiken. Making set-constraint program analyses scale. In Workshop on Set Constraints, 1996. [13] D. Gopan, E. Driscoll, D. Nguyen, D. Naydich, A. Loginov, and D. Melski. Data-delineation in software binaries and its application to buffer-overrun discovery. In International Conference on Software Engineering, pages 145–155, 2015. [14] D. Greenfieldboyce and J. S. Foster. Type qualifier inference for Java. In Object-Oriented Programming, Systems, Languages, and Applications, pages 321–336, 2007. [15] Hex-Rays. Hex-Rays IdaPro. http://www.hex-rays.com/ products/ida/, 2015. [16] D. Kozen, J. Palsberg, and M. I. Schwartzbach. Efficient recursive subtyping. Mathematical Structures in Computer Science, 5(01):113–125, 1995. [19] Z. Lin, X. Zhang, and D. Xu. Automatic reverse engineering of data structures from binary execution. In Network and Distributed System Security Symposium, 2010. [20] S. Marlow, A. R. Yakushev, and S. Peyton Jones. Faster laziness using dynamic pointer tagging. In International Conference on Functional Programming, pages 277–288, 2007. [21] L. Mauborgne and X. Rival. Trace partitioning in abstract interpretation based static analyzers. In Programming Languages and Systems, pages 5–20, 2005. [22] M. Noonan, A. Loginov, and D. Cok. Polymorphic type inference for machine code (extended version). URL http: //arxiv.org/abs/1603.05495. [23] J. Palsberg and P. O’Keefe. A type system equivalent to flow analysis. ACM Transactions on Programming Languages and Systems , 17(4):576–599, 1995. [24] J. Palsberg, M. Wand, and P. O’Keefe. Type inference with non-structural subtyping. Formal Aspects of Computing, 9(1): 49–67, 1997. [25] F. Pottier and D. Rémy. The essence of ML type inference. In B. C. Pierce, editor, Advanced Topics in Types and Programming Languages, chapter 10. MIT Press, 2005. [26] J. Rehof and M. Fähndrich. Type-based flow analysis: From polymorphic subtyping to cfl-reachability. In Principles of Programming Languages, pages 54–66, 2001. [27] J. Richard Büchi. Regular canonical systems. Archive for Mathematical Logic, 6(3):91–111, 1964. [28] E. Robbins, J. M. Howe, and A. King. Theory propagation and rational-trees. In Principles and Practice of Declarative Programming, pages 193–204, 2013. [29] M. Robertson. A Brief History of InvSqrt. University of New Brunswick, 2012. PhD thesis, [30] E. J. Schwartz, J. Lee, M. Woo, and D. Brumley. Native x86 decompilation using semantics-preserving structural analysis and iterative control-flow structuring. In USENIX Security Symposium, pages 353–368, 2013. [31] M. Siff, S. Chandra, T. Ball, K. Kunchithapadam, and T. Reps. Coping with type casts in C. In Software Engineering—ESEC/FSE’99, pages 180–198, 1999. [32] A. Slowinska, T. Stancescu, and H. Bos. Howard: A dynamic excavator for reverse engineering data structures. In Network and Distributed System Security Symposium, 2011. [33] B. Steensgaard. Points-to analysis in almost linear time. In Principles of Programming Languages, pages 32–41, 1996. [34] Z. Su, A. Aiken, J. Niehren, T. Priesnitz, and R. Treinen. The first-order theory of subtyping constraints. In Principles of Programming Languages, pages 203–216, 2002. A. Constraint Generation Type constraint generation is performed by a parameterized abstract interpretation T YPE A ; the parameter A is itself an abstract interpreter that is used to transmit additional analysis information such as reaching definitions, propagated constants, and value-sets (when available). Let V denote the set of type variables and C the set of type constraints. Then the primitive TSL value- and map- types for T YPE A are given by V C BASETYPET YPEA = BASETYPEA × 2 × 2 MAP[α, β]T YPEA = MAP[α, β]A × 2C Since type constraint generation is a syntactic, flowinsensitive process, we can regain flow sensitivity by pairing with an abstract semantics that carries a summary of flow-sensitive information. Parameterizing the type abstract interpretation by A allows us to factor out the particular way in which program variables should be abstracted to types (e.g. SSA form, reaching definitions, and so on). A.1 Register Loads and Stores The basic reinterpretations proceed by pairing with the abstract interpreter A. For example, regUpdate (s , reg , v ) = let ( v ’ , t , c ) = v (s’, m) = s s ’ ’ = regUpdate ( s ’ , reg , v ’) (u , c ’) = A ( reg , s ’ ’) in ( s’’, m ∪ c ∪ { t v u } ) where A(reg, s) produces a type variable from the register reg and the A-abstracted register map s”. Register loads are handled similarly: regAccess ( reg , s ) = let ( s ’ , c ) = s (t , c ’) = A ( reg , s ’) in ( regAccess ( reg , s ’) , t , c ∪ c ’ ) Example A.1. Suppose that A represents the concrete semantics for x86 and A(reg, ·) yields a type variable (reg, {}) and no additional constraints. Then the x86 expression mov ebx, eax is represented by the TSL expression regUpdate(S, EBX(), regAccess(EAX(), S)), where S is the initial state (Sconc , C). After abstract interpretation, C will become C ∪ {eax v ebx}. By changing the parametric interpreter A, the generated type constraints may be made more precise. Example A.2. We continue with the example of mov ebx, eax above. Suppose that A represents an abstract semantics that is aware of register reaching definitions, and define A(reg, s) by A ( reg , s ) = case reaching - defs ( reg , s ) of { p } → (regp , {}) defs → let t = fresh c = { regp v t | p ∈ defs } in (t , c ) where reaching-defs yields the set of definitions of reg that are visible from state s. Then T YPE A at program point q will update the constraint set C to C ∪ {eaxp v ebxq } if p is the lone reaching definition of EAX. If there are multiple reaching definitions P , then the constraint set will become C ∪ {eaxp v t | p ∈ P } ∪ {t v ebxq } A.2 Addition and Subtraction It is useful to track translations of a value through additions or subtraction of a constant. To that end, we overload the add(x,y) and sub(x,y) operations in the cases where x or y have statically-determined constant values. For example, if INT32(n) is a concrete numeric value then add (v , INT32 ( n )) = let ( v ’ , t , c ) = v in ( add ( v ’ , INT32 ( n )) , t .+ n , c ) In the case where neither operand is a statically-determined constant, we generate a fresh type variable representing the result and a 3-place constraint on the type variables: add (x , y ) = let ( x ’ , t 1 , c 1 ) = x ( y ’ , t2 , c2 ) = y t = fresh in ( add ( x ’ , y ’) , t, c 1 ∪ c 2 ∪ { Add( t 1 , t 2 , t ) } ) Similar interpretations are used for sub(x,y). A.3 Memory Loads and Stores Memory accesses are treated similarly to register accesses, except for the use of dereference accesses and the handling of points-to sets. For any abstract A-value a and A-state s, let A(a,s) denote a set of type variables representing the address A in the context s. Furthermore, define PtsToA (a, s) to be a set of type variables representing the values pointed to by a in the context s. The semantics of the N-bit load and store functions memAccessN and memUpdateN are given by memAccess N (s , a ) = let ( s 0 , c s ) = s ( a0 , t , ct ) = a c pt = { x v t . load .σ N@0 | x ∈ PtsTo ( a 0 ,s 0 ) } in ( memAccess N ( s 0 , a 0 ) , t . load .σN@0 , c s ∪ c t ∪ c pt ) memUpdate N (s , a , v ) = let ( s 0 , c s ) = s ( a0 , t , ct ) = a ( v0 , v , cv ) = v c pt = { t . store .σ N@0 v x | x ∈ PtsTo ( a 0 ,s 0 ) } in ( memUpdate N ( s 0 , a 0 , v 0 ) , c s ∪ c t ∪ c v ∪ c pt ∪ { v v t . store .σ N@0 } ) We achieved acceptable results by using a bare minimum points-to analysis that only tracks constant pointers to the local activation record or the data section. The use of the .load / .store accessors allows us to track multi-level pointer information without the need for explicit points-to data. The minimal approach tracks just enough points-to information to resolve references to local and global variables. A.4 Procedure Invocation Earlier analysis phases are responsible for delineating procedures and gathering data about each procedure’s formal-in and formal-out variables, including information about how parameters are stored on the stack or in registers. This data is transformed into a collection of locators associated to each function. Each locator is bound to a type variable representing the formal; the locator is responsible for finding an appropriate set of type variables representing the actual at a callsite, or the corresponding local within the procedure itself. Example A.3. Consider this simple program that invokes a 32-bit identity function. p: q: id : r: push ebx ; writes to local ext4 call id ... ; begin procedure id () mov eax , [ esp + arg0 ] ret The procedure id will have two locators: Within procedure id, the locator Li returns the type variable arg0id and Lo returns eaxr , resulting in the constraint set {idi v arg0id , eaxr v ido } A procedure may also be associated with a set of type constraints between the locator type variables, called the procedure summary; these type constraints may be inserted at function calls to model the known behavior of a function. For example, invocation of fopen will result in the constraints {fopeni0 v char∗, fopeni1 v char∗, FILE∗ v fopeno } To support polymorphic function invocation, we instantiate fresh versions of the locator type variables that are tagged with the current callsite; this prevents type variables from multiple invocations of the same procedure from being linked. Example A.4 (cont’d). When using callsite tagging, the callsite constraints generated by the locators would be {ext4p v idqi , idqo v eaxq } The callsite tagging must also be applied to any procedure summary. For example, a call to malloc will result in the constraints {mallocpi v size_t, void∗ v mallocpo } If malloc is used twice within a single procedure, we see an effect like let-polymorphism: each use will be typed independently. A.5 A.5.1 Other Operations Floating-point Floating point types are produced by calls to known library functions and through an abstract interpretation of reads to and writes from the floating point register bank. We do not track register-to-register moves between floating point registers, though it would be straightforward to add this ability. In theory, this causes us to lose precision when attempting to distinguish between typedefs of floating point values; in practice, such typedefs appear to be extremely rare. A.5.2 Bit Manipulation • A locator Li for the single parameter, bound to a type We assume that the operands and results of most bitmanipulation operations are integral, with some special exceptions: • A locator Lo for the single return value, bound to a type • Common idioms like xor reg,reg and or reg,-1 are variable idi . variable ido . At the procedure call site, the locator Li will return the type variable ext4p representing the stack location ext4 tagged by its reaching definition. Likewise, Lo will return the type variable eaxq to indicate that the actual-out is held in the version of eax that is defined at point q. The locator results are combined with the locator’s type variables, resulting in the constraint set {ext4p v idi , ido v eaxq } used to initialize registers to certain constants. On x86 these instructions can be encoded with 8-bit immediates, saving space relative to the equivalent versions mov reg,0 and mov reg,-1. We do not assume that the results of these operations are of integral type. • We discard any constraints generated while computing a value that is only used to update a flag status. In particular, on x86 the operation test reg1,reg2 is implemented like a bitwise-AND that discards its result, only retaining the effect on the flags. • For specific operations such as y := x AND 0xfffffffc and y := x OR 1, we act as if they were equivalent to y := x. This is because these specific operations are often used for bit-stealing; for example, requiring pointers to be aligned on 4-byte boundaries frees the lower two bits of a pointer for other purposes such as marking for garbage collection. A.6 Additive Constraints The special constraints A DD and S UB are used to conditionally propagate information about which type variables represent pointers and which represent integers when the variables are related through addition or subtraction. The deduction rules for additive constraints are summarized in Figure 13. We obtained good results by inspecting the unification graph used for computing L(Si ); the graph can be used to quickly determine whether a variable has pointer- or integer-like capabilities. In practice, the constraint set also should be updated with new subtype constraints as the additive constraints are applied, and a fully applied constraint can be dropped from C. We omit these details for simplicity. B. Normal Forms of Proofs A finite constraint set with recursive constraints can have an infinite entailment closure. In order to manipulate entailment closures efficiently, we need finite (and small) representations of infinite constraint sets. The first step towards achieving a finite representation of entailment is to find a normal form for every derivation. In Appendix D, finite models of entailment closure will be constructed that manipulate representations of these normal forms. Lemma B.1. For any statement P provable from C, there exists a derivation of C ` P that does not use rules S-R EFL or T-I NHERIT. Proof. The redundancy of S-R EFL is immediate. As for T-I NHERIT, any use of that rule in a proof can be replaced by S-F IELD⊕ followed by T-L EFT, or S-F IELD followed by T-R IGHT. In the following, we make the simplifying assumption that C is closed under T-L EFT, T-R IGHT, and T-P REFIX. Concretely, we are requiring that 1. if C contains a subtype constraint α v β as an axiom, it also contains the axioms VAR α and VAR β. 2. if C contains a term declaration VAR α, it also contains term declarations for all prefixes of α. Lemma B.2. If C is closed under T-L EFT, T-R IGHT, and T-P REFIX then any statement provable from C can be proven without use of T-P REFIX. Proof. By the previous lemma, we may assume that S-R EFL and T-I NHERIT are not used in the proof. We will prove the lemma by transforming all subproofs that end in a use of T-P REFIX to remove that use. To that end, assume we have a proof ending with the derivation of VAR α from VAR α.` using T-P REFIX. We then enumerate the ways that VAR α.` may have been proven. • If VAR α.` ∈ C then VAR α ∈ C already, so the entire proof tree leading to VAR α may be replaced with an axiom from C. • The only other way a VAR α.` could be introduced is through T-L EFT or T-R IGHT. For simplicity, let us only consider the T-L EFT case; T-R IGHT is similar. At this point, we have a derivation tree that looks like α.` v ϕ VAR α.` VAR α How was α.` v ϕ introduced? If it were an axiom of C then our assumed closure property would imply already that VAR α ∈ C. The other cases are: ϕ = β.` and α.` v ϕ was introduced through one of the S-F IELD axioms. In either case, α is the left- or right-hand side of one of the antecedents to S-F IELD, so the whole subderivation including the T-P REFIX axiom can be replaced with a single use of T-L EFT or T-R IGHT. ` = .store and ϕ = α.load, with α.` v ϕ introduced via S-P OINTER. In this case, VAR α.` is already an antecedent to S-P OINTER, so we may elide the subproof up to T-P REFIX to inductively reduce the problem to a simpler proof tree. Finally, we must have α.` v ϕ due to S-T RANS. But in this case, the left antecedent is of the form α.` v β; so once again, we may elide a subproof to get a simpler proof tree. Each of these cases either removes an instance of T-P REFIX or results in a strictly smaller proof tree. It follows that iterated application of these simplification rules results in a proof of VAR α with no remaining instances of T-P REFIX. Corollary B.1. If C ` VAR α, then either VAR α ∈ C, or C ` α v β, β v α for some β. To simplify the statement of our normal-form theorem, recall that we defined the variadic rule S-T RANS ’ to remove the degrees of freedom from regrouping repeated application of S-T RANS: α1 v α2 , α2 v α3 , . . . αn−1 v αn (S-T RANS ’) α1 v αn X Y Z i i I I I i p I P A DD P i p I p P i P p i I I I i i P i p S UB P p p P I i p i P p I p Figure 13. Inference rules for A DD(X, Y ; Z) and S UB(X, Y ; Z). Lower case letters denote known integer or pointer types. Upper case letters denote inferred types. For example, the first column says that if X and Y are integral types in an A DD(X, Y ; Z) constraint, then Z is integral as well. Theorem B.1 (Normal form of proof trees). Let C be a constraint set that is closed under T-L EFT, T-R IGHT, and T-P REFIX. Then any statement provable from C has a derivation such that We also can eliminate the need for the subderivations Q and S except for the very first and very last antecedents of S-T RANS ’ by pulling the term out of the neighboring subtype relation; schematically, we can always replace • There are no uses of the rules T-P REFIX, T-I NHERIT, or S P α v β VAR β.` ··· α.` v β.` T S-R EFL. • For every instance of S-T RANS ’ and every pair of adjacent antecedents, at least one is not the result of a S-F IELD application. Proof. The previous lemmas already handled the first point. As to the second, suppose that we had two adjacent antecedents that were the result of S-F IELD⊕ : P Q α v β VAR β.` ··· α.` v β.` T R S β v γ VAR γ.` ··· β.` v γ.` First, note that the neighboring applications of S-F IELD⊕ must both use the same field label `, or else S-T RANS would not be applicable. But now observe that we may move a S-F IELD application upwards, combining the two S-F IELD applications into one: P R S αvβ βvγ αvγ VAR γ.` ··· ··· α.` v γ.` T For completeness, we also compute the simplifying transformation for adjacent uses of S-F IELD : the derivation P Q β v α VAR α.` ··· α.` v β.` T R S γ v β VAR β.` ··· β.` v γ.` can be simplified to R P γvβ βvα VAR α.` γvα ··· ··· α.` v γ.` T Q U ··· β.` v γ by U β.` v γ P α v β VAR β.` ··· α.` v β.` T U ··· β.` v γ This transformation even works if there are several S-F IELD applications in a row, as in P Q α v β VAR β.` R α.` v β.` VAR β.`.`0 ··· 0 α.`.` v β.`.`0 T U ··· β.`.`0 v γ which can be simplified to U β.`.`0 v γ P VAR β.`.`0 U αvβ VAR β.` β.`.`0 v γ α.` v β.` VAR β.`.`0 ··· α.`.`0 v β.`.`0 T U ··· β.`.`0 v γ Taken together, this demonstrates that the VAR β.` antecedents to S-F IELD are automatically satisfied if the consequent is eventually used in an S-T RANS application where β.` is a “middle” variable. This remains true even if there are several S-F IELD applications in sequence. Since the S-F IELD VAR antecedents are automatically satisfiable, we can use a simplified schematic depiction of proof trees that omits the intermediate VAR subtrees. In this simplified depiction, the previous proof tree fragment would be written as P αvβ α.` v β.` ··· α.`.`0 v β.`.`0 T U ··· β.`.`0 v γ Algebraic Representation Finally, consider the form of the simplified proof tree that elides the VAR subderivations. Each leaf of the tree is a subtype constraint ci ∈ C, and there is a unique way to fill in necessary VAR antecedents and S-F IELD applications to glue the constraints {ci } into a proof tree in normal form. In other words, the normal form proof tree is completely determined by the sequence of leaf constraints {ci } and the sequence of S-F IELD applications applied to the final tree. In effect, we have a term algebra with constants Ci representing the constraints ci ∈ C, an associative binary operator that combines two compatible constraints via S-T RANS, inserting appropriate S-F IELD applications, and a unary operator S` for each ` ∈ Σ that represents an application of S-F IELD. The proof tree manipulations provide additional relations on this term algebra, such as ( S`(R1 R2 ) when h`i = ⊕ S` (R1 ) S` (R2 ) = S`(R2 R1 ) when h`i = The normalization rules described in this section demonstrate that every proof of a subtype constraint entailed by C can be represented by a term of the form S`1 (S`2 (· · · S`n (R1 C. pop u = pop u1 ⊗ · · · ⊗ pop un and push u = push un ⊗ · · · ⊗ push u1 Any such fragment can be automatically converted to a full proof by re-generating VAR subderivations from the results of the input derivations P and/or U . B.1 To simplify the presentation, when u = u1 · · · un we will sometimes write ··· Rk ) · · · )) The StackOp Weight Domain In this section, we develop a weight domain StackOpΣ that will be useful for modeling constraint sets by pushdown systems. This weight domain is generated by symbolic constants representing actions on a stack. Definition C.1. The weight domain StackOpΣ is the idempotent ∗-semiring generated by the symbols pop x, push x for all x ∈ Σ, subject only to the relation ( 1 if x = y push x ⊗ pop y = δ(x, y) = 0 if x 6= y Definition C.2. A monomial in StackOpΣ is called reduced if its length cannot be shortened through applications of the push x ⊗ pop y = δ(x, y) rule. Every reduced monomial has the form pop u1 · · · pop un ⊗ push vm · · · push v1 for some ui , vj ∈ Σ. Elements of StackOpΣ can be understood to denote possibly-failing functions operating on a stack of symbols from Σ: [[0]] = λs . fail [[1]] = λs . s [[push x]] = λs . cons(x, s) [[pop x]] = λs . case s of nil → fail cons(x0 , s0 ) → if x = x0 then s0 else fail Under this interpretation, the semiring operations are interpreted as [[X ⊕ Y ]] = nondeterministic choice of [[X]] or [[Y ]] [[X ⊗ Y ]] = [[Y ]] ◦ [[X]] [[X ∗ ]] = nondeterministic iteration of [[X]] Note that the action of a pushdown rule R = hP ; ui ,→ hQ; vi on a stack configuration c = (X, w) is given by the application [[pop P ⊗ pop u ⊗ push v ⊗ push Q]] (cons(X, w)) The result will either be cons(X 0 , w0 ) where (X 0 , w0 ) is the configuration obtained by applying rule R to configuration c, or fail if the rule cannot be applied to c. Lemma C.1. There is a one-to-one correspondence between elements of StackOpΣ and regular sets of pushdown system rules over Σ. Definition C.3. The variance operator h·i can be extended to StackOpΣ by defining hpop xi = hpush xi = hxi D. Constructing the Transducer for a Constraint Set D.1 Building the Pushdown System Let V be a set of type variables and Σ a set of field labels, equipped with a variance operator h·i. Furthermore, suppose that we have fixed a set C of constraints over V. Finally, suppose that we can partition V into a set of interesting and uninteresting variables: V = Vi q Vu Definition D.1. Suppose that X, Y ∈ Vi are interesting type variables, and there is a proof C ` X.u v Y.v. We will call the proof elementary if the normal form of its proof tree only involves uninteresting variables on internal leaves. We write i C`V elem X.u v Y.v when C has an elementary proof of X.u v Y.v. Our goal is to construct a finite state transducer that 0 0 i recognizes the relation v V elem ⊆ Vi × Vi between derived type variables defined by n o Vi i vV elem = (X.u, Y.v) | C ` elem X.u v Y.v We proceed by constructing an unconstrained pushdown system PC whose derivations model proofs in C; a modification of Caucal’s saturation algorithm [8] is then used to build the transducer representing DerivPC . Definition D.2. Define the left- and right-hand tagging rules lhs, rhs by ( xL if x ∈ Vi lhs(x) = x if x ∈ Vo ( xR if x ∈ Vi rhs(x) = x if x ∈ Vo Definition D.3. The unconstrained pushdown system PC e Σ, e ∆) associated to a constraint set C is given by the triple (V, where e = (lhs(Vi ) q rhs(Vi ) q Vo ) × {⊕, } V ∪ {# S TART, # E ND} e as v . We will write an element (v, ) ∈ V e The stack alphabet Σ is essentially the same as Σ, with a few extra tokens added to represent interesting variables: e = Σ ∪ {v ⊕ | v ∈ Vi } ∪ {v | v ∈ Vi } Σ To define the transition rules, we first introduce the helper functions: rule⊕ (p.u v q.v) = hlhs(p)hui ; ui ,→ hrhs(q)hvi ; vi rule (p.u v q.v) = hlhs(q) ⊕ ·hvi ; vi ,→ hrhs(p) rules(c) = {rule (c), rule (c)} ·hui ; ui The transition rules ∆ are partitioned into four parts ∆ = ∆C q ∆ptr q ∆start q ∆end where [ ∆C = rules(c) c∈C ∆ptr = [ v∈V 0 # rules(v.store v v.load) ∆start = h S TART; v ⊕ i ,→ hvL⊕ ; εi | v ∈ Vi  ∪ h# S TART; v i ,→ hvL ; εi | v ∈ Vi  ∆end = hvR⊕ ; εi ,→ h# E ND; v ⊕ i | v ∈ Vi  ∪ hvR ; εi ,→ h# E ND; v i | v ∈ Vi Note 1. The {⊕, } superscripts on the control states are used to track the current variance of the stack state, allowing us to distinguish between uses of an axiom in co- and contravariant position. The tagging operations lhs, rhs are used to prevent derivations from making use of variables from Vi , preventing PC from admitting derivations that represent non-elementary proofs. Note 2. Note that although ∆C is finite, ∆ptr contains rules for every derived type variable and is therefore infinite. We carefully adjust for this in the saturation rules below so that rules from ∆ptr are only considered lazily as DerivPC is constructed. Lemma D.1. For any pair (X a u, Y b v) in DerivPC , we also have (Y ·b v, X ·a u) ∈ DerivPC . Proof. Immediate due to the symmetries in the construction of ∆. Lemma D.2. For any pair (X a u, Y b v) in DerivPC , the relation a · hui = b · hvi must hold. Proof. This is an inductive consequence of how ∆ is defined: the relation holds for every rule in ∆C ∪∆ptr due to the use of the rules function, and the sign in the exponent is propagated from the top of the stack during an application of a rule from ∆start and back to the stack during an application of a rule from ∆end . Since every derivation will begin with a rule from ∆start , proceed by applying rules from ∆C ∪ ∆ptr , and conclude with a rule from ∆end , this completes the proof. Definition D.4. Let Deriv0PC ⊆ Vi0 × Vi0 be the relation on derived type variables induced by DerivPC as follows: n o Deriv0PC = (X.u, Y.v) | (X hui u, Y hvi v) ∈ DerivPC Lemma D.3. If (p, q) ∈ Deriv0PC and σ ∈ Σ has hσi = ⊕, then (pσ, qσ) ∈ Deriv0PC as well. If hσi = , then (qσ, pσ) ∈ Deriv0PC instead. Proof. Immediate, from symmetry considerations. Lemma D.4. DerivPC can be partitioned into Deriv⊕ PC q DerivPC where n o hui Deriv⊕ u, Y hvi v) | (X.u, Y.v) ∈ Deriv0PC PC = (X n o DerivPC = (Y ·hvi v, X ·hui u) | (X.u, Y.v) ∈ Deriv0PC In particular, DerivPC can be entirely reconstructed from the simpler set Deriv0PC . Theorem D.1. C has an elementary proof of the constraint X.u v Y.v if and only if (X.u, Y.v) ∈ Deriv0PC . Proof. We will prove the theorem by constructing a bijection between elementary proof trees and derivations in PC . Call a configuration (pa , u) positive if a = hui. By ∗ Lemma D.2, if (pa , u) is positive and (pa , u) −→ (q b , v) b then (q , v) is positive as well. We will also call a transition rule positive when the configurations appearing in the rule are positive. Note that by construction, every positive transition rule from ∆C ∪ ∆ptr is of the form rule⊕ (c) for some axiom c ∈ C or load/store constraint c = (p.store v p.load). For any positive transition rule R = rule⊕ (p.u v q.v) and ` ∈ Σ, let S` (R) denote the positive rule ( hphu`i ; u`i ,→ hq hv`i ; v`i if h`i = ⊕ S` (R) = hq hv`i ; v`i ,→ hphu`i ; u`i if h`i = Note that by the construction of ∆, each S` (R) is redundant, being a restriction of one of the existing transition rules rule⊕ (p.u v q.v) or rule (p.u v q.v) to a more specific stack configuration. In particular, adding S` (R) to the set of rules does not affect DerivPC . Suppose we are in the positive state (phwi , w) and are about to apply a transition rule R = hphui ; ui ,→ hq hvi ; vi. Then we must have w = u`1 `2 · · · `n , so that the left-hand side of the rule S`n (· · · (S`1 (R)) · · · ) is exactly hphwi ; wi. Let Rstart , R1 , · · · , Rn , Rend be the sequence of rule appli∗ cations used in an arbitrary derivation (# S TART, phui u) −→ # hvi 0 ( E ND, q v) and let R R denote the application of rule R followed by rule R0 , with the right-hand side of R exactly matching the left-hand side of R0 . Given the initial stack state phui u and the sequence of rule applications, for each Rk there is a unique rule Rk0 = S`kn (· · · (S`k1 (Rk )) · · · ) 0 0 such that ∂ = Rstart R10 · · · Rn0 Rend describes the derivation exactly. Now normalize ∂ using the rule S` (Ri ) S` (Rj ) 7→ S` (Ri Rj ); this process is clearly reversible, producing a bijection between these normalized expressions and derivations in Deriv⊕ PC . To complete the proof, we obtain a bijection between normalized expressions and the normal forms of elementary proof trees. The bijection is straightforward: Ri represents the introduction of an axiom from C, represents an application of the rule S-T RANS, and S` represents an application of the rule S-F IELD` . This results in an algebraic expression describing the normalized proof tree as in § B.1, which completes the proof. D.2 Constructing the Initial Graph In this section, we will construct a finite state automaton that accepts strings that encode some of the behavior of PC ; the next section describes a saturation algorithm that modifies the initial automaton to create a finite state transducer for Deriv0PC . The automaton AC is constructed as follows: 1. Add an initial state # S TART and an accepting state # E ND. 2. For each left-hand side hpa ; u1 · · · un i of a rule in ∆C , add the transitions # S TART pop pa·hu1 ...un i pa·hu1 ...un i −→ pop u1 pa·hu1 ...un i −→ pa·hu2 ...un i u1 .. . pop un pa·hun i u1 . . . un−1 −→ pa u1 . . . un 3. For each right-hand side hq b ; v1 · · · vn i of a rule in ∆C , add the transitions push vn q b v1 . . . vn −→ q b·hvn i v1 . . . vn−1 .. . push v1 q b·hv2 ...vn i v1 −→ q b·hv1 ...vn i q b·hv1 ...vn i push q b·hv1 ...vn i # −→ E ND 4. For each rule hpa ; ui ,→ hq b ; vi, add the transition 1 pa u −→ q b v Definition D.5. Following Carayol and Hague [7], we call a sequence of transitions p1 · · · pn productive if the corresponding element p1 ⊗ · · · ⊗ pn in StackOpΣ is not 0. A sequence is productive if and only if it contains no adjacent terms of the form pop y, push x with x 6= y. Lemma D.5. There is a one-to-one correspondence between productive transition sequences accepted by AC and elementary proofs in C that do not use the axiom S-P OINTER. Proof. A productive transition sequence must consist of a sequence of pop edges followed by a sequence of push edges, possibly with insertions of unit edges or intermediate sequences of the form push (un ) ⊗ · · · ⊗ push (u1 ) ⊗ pop (u1 ) ⊗ · · · ⊗ pop (un ) Following a push or pop edge corresponds to observing or forgetting part of the stack. Following a 1 edge corresponds to applying a PDS rule from PC . Algorithm D.1 Converting a transducer from a set of pushdown system rules 1: procedure A LL PATHS (V, E, x, y) . Tarjan’s path algorithm. Return a finite state automaton recognizing the label sequence for all paths from x to y in the graph (V, E). 2: ... 3: return Q 4: end procedure 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: D.3 procedure T RANSDUCER(∆C ) . ∆C is a set of pushdown system rules hpa ; ui ,→ hq b ; vi # # V ← { S TART, E ND} E←∅ for all hpa ; u1 · · · un i ,→ hq b ; v1 · · · vm i ∈ ∆C do V ← V ∪ {pa·hu1 ···un i , q b·hv1 ···vm i } E ← E ∪ {(# S TART, pa·hu1 ···un i , pop pa·hu1 ···un i )} E ← E ∪ {(q b·hv1 ···vm i , # E ND, push q b·hv1 ···vm i )} for i ← 1 . . . n − 1 do V ← V ∪ {pa·hui+1 ···un i u1 . . . ui } E ← E ∪ {(pa·hui ···un i u1 . . . ui−1 , pa·hui+1 ···un i u1 . . . ui , pop ui )} end for for j ← 1 . . . m − 1 do V ← V ∪ {q b·hvj+1 ···um i v1 . . . vj } E ← E ∪ {(q b·hvj+1 ···vm i v1 . . . vj , q b·hvj ···vm i v1 . . . vj−1 , push vj )} end for E ← E ∪ {(pa u1 . . . un , q b v1 . . . vm , 1)} end for E ← S ATURATED(V, E) Q ← A LL PATHS(V, E, # S TART, # E ND) return Q end procedure Saturation The label sequences appearing in Lemma D.5 are tantalizingly close to having the simple structure of building up a pop sequence representing an initial state of the pushdown automaton, then building up a push sequence representing a final state. But the intermediate terms of the form “push u, then pop it again” are unwieldy. To remove the necessity for those sequences, we can saturate AC by adding additional 1-labeled transitions providing shortcuts to the push/pop subsequences. We modify the standard saturation algorithm to also lazily instantiate transitions which correspond to uses of the S-P OINTER-derived rules in ∆ptr . Lemma D.6. The reachable states of the automaton AC can be partitioned into covariant and contravariant states, where a state’s variance is defined to be the variance of any sequence reaching the state from # S TART. Proof. By construction of ∆C and AC . Lemma D.7. There is an involution n 7→ n on AC defined by xa u = x ·a u # S TART # E ND = # E ND = # S TART Proof. Immediate due to the use of the rule constructors rule⊕ and rule when forming ∆C . In this section, the automaton AC will be saturated by adding transitions to create a new automaton Asat C . Definition D.6. A sequence is called reduced if it is productive and contains no factors of the form pop x ⊗ push x. Reduced productive sequences all have the form of a sequence of pops, followed by a sequence of pushes. The goal of the saturation algorithm is twofold: 1. Ensure that for any productive sequence accepted by AC there is an equivalent reduced sequence accepted by Asat C . 2. Ensure that Asat C can represent elementary proofs that use S-P OINTER. The saturation algorithm D.2 proceeds by maintaining, for each state q ∈ AC , a set of reaching-pushes R(q). The reaching push set R(q) will contain the pair (`, p) only if there is a transition sequence in AC from p to q with weight push `. When q has an outgoing pop ` edge to q 0 1 and (`, p) ∈ R(q), we add a new transition p → q 0 to AC . A special propagation clause is responsible for propagating reaching-push facts as if rules from ∆ptr were instantiated, allowing the saturation algorithm to work even though the corresponding unconstrained pushdown system has infinitely many rules. This special clause is justified by considering the standard saturation rule when x.store v x.load is added as an axiom in C. An example appears in Figure 14: a saturation edge is added from x⊕ .store to y ⊕ .load due to the pointer saturation rule, but the same edge would also have been added if the states and transitions corresponding to p.store v p.load (depicted with dotted edges and nodes) were added to AC . Once the saturation algorithm completes, the automaton Asat C has the property that, if there is a transition sequence from p to q with weight equivalent to pop u1 ⊗ · · · ⊗ pop un ⊗ push vm ⊗ · · · ⊗ push v1 , then there is a path from p to q that has, ignoring 1 edges, exactly the label sequence pop u1 , . . . , pop un , push vm , . . . , push v1 . D.4 Shadowing The automaton Asat C now accepts push/pop sequences representing the changes in the stack during any legal derivation in the pushdown system ∆. After saturation, we can guarantee that every derivation is represented by a path which first pops a sequence of tokens, then pushes another sequence of tokens. Unfortunately, Asat C still accepts unproductive transition sequences which push and then immediately pop token sequences. To complete the construction, we form an automaton Q by intersecting Asat C with an automaton for the language of words consisting of only pops, followed by only pushes. This final transformation yields an automaton Q with the property that for every transition sequence s accepted by Asat C , Q accepts a sequence s0 such that [[s]] = [[s0 ]] in StackOp and s0 consists of a sequence of pops followed by a sequence of pushes. This ensures that Q only accepts the productive transition sequences in Asat C . Finally, we can treat Q as a finite-state transducer by treating transitions labeled pop ` as reading the symbol ` from the input tape, push ` as writing ` to the output tape, and 1 as an ε-transition. Q can be further manipulated through determinization and/or minimization to produce a compact transducer representing the valid transition sequences through PC . Taken as Q a whole, we have shown that Xu 7→ Y v if and only if X and Y are interesting variables and there is an elementary derivation of C ` X.u v Y.v. We make use of this process in two places during type analysis: first, by computing Q relative to the type variable of a function, we get a transducer that represents all elementary derivations of relationships between the function’s inputs and outputs. D.3 is used to convert the transducer Q back to a pushdown system P, such that Q describes all valid derivations in P. Then the rules in P can be interpreted as subtype constraints, resulting in a simplification of the constraint set relative to the formal type variables. Second, by computing Q relative to the set of type constants we obtain a transducer that can be efficiently queried to determine which derived type variables are bound above or below by which type constants. This is used by the S OLVE procedure in F.2 to populate lattice elements decorating the inferred sketches. Algorithm D.3 Converting a transducer to a pushdown system procedure T YPE S CHEME(Q) ∆ ← new PDS ∆.states ← Q.states t for all p → q ∈ Q.transitions do if t = pop ` then A DD PDSRULE(∆, hp; `i ,→ hq; εi) else A DD PDSRULE(∆, hp; εi ,→ hq; `i) end if end for return ∆ end procedure E. The Lattice of Sketches Throughout this section, we fix a lattice (Λ, <:, ∨, ∧) of atomic types. We do not assume anything about Λ except that it should have finite height so that infinite subtype chains eventually stabilize. For example purposes, we will take Λ to be the lattice of semantic classes depicted in Figure 15. Our initial implementation of sketches did not use the auxiliary lattice Λ. We found that adding these decorations to the sketches helped preserve high-level types of interest to the end user during type inference. This allows us to recover highlevel C and Windows typedefs such as size_t, FILE, HANDLE, and SOCKET that are useful for program understanding and reverse engineering, as noted by Lin et al. [19]. Decorations also enable a simple mechanism by which the user can extend Retypd’s type system, adding semantic purposes to the types for known functions. For example, we can extend Λ to add seeds for a tag #signal-number attached to the less-informative int parameter to signal(). This approach also allows us to distinguish between opaque typedefs and the underlying type, as in HANDLE and void*. Since the semantics of a HANDLE are quite distinct from those of a void*, it is important to have a mechanism that can preserve the typedef name. E.1 Basic Definitions Definition E.1. A sketch is a regular tree with edges labeled by elements of Σ and nodes labeled with elements of Λ. The set of all sketches, with Σ and Λ implicitly fixed, will be denoted Sk. We may alternately think of a sketch as a prefix-closed regular language L(S) ⊆ Σ∗ and a function Algorithm D.2 Saturation algorithm 1: procedure S ATURATED (V, E) 2: E0 ← E 3: for all x ∈ V do 4: R(x) ← ∅ 5: end for 6: for all (x, y, e) ∈ E with e = push ` do 7: R(y) ← R(y) ∪ {(`, x)} 8: end for 9: repeat 10: Rold ← R 0 11: Eold ← E0 12: for all (x, y, e) ∈ E 0 with e = 1 do 13: R(y) ← R(y) ∪ R(x) 14: end for 15: for all (x, y, e) ∈ E 0 with e = pop ` do 16: for all (`, z) ∈ R(x) do 17: E 0 ← E 0 ∪ {(z, y, 1)} 18: end for 19: end for 20: for all x ∈ V do 21: for all (`, z) ∈ R(x) with ` = .store do 22: R(x) ← R(x) ∪ {(.load, z)} 23: end for 24: for all (`, z) ∈ R(x) with ` = .load do 25: R(x) ← R(x) ∪ {(.store, z)} 26: end for 27: end for 0 28: until R = Rold and E 0 = Eold 0 29: return E 30: end procedure . V is a set of vertices partitioned into V = V ⊕ q V . E is a set of edges, represented as triples (src, tgt, label) . Initialize the reaching-push sets R(x) . The standard saturation rule. . Lazily apply saturation rules corresponding to S-P OINTER. . See Figure 14 for an example. #S TART pop AL A⊕ L 1 push store x pop store { 1 1 y.load⊕ BR⊕ pop load p.store⊕ p.load x.store⊕ 1 p 1 1 p.load⊕ p.store pop load y⊕ = y; = p; = A; = *y; } push store push load 1 p x *x B p⊕ push BR #E ND Figure 14. Saturation using an implicit application of p.store v p.load. The initial constraint set was {y v p, p v x, A v x.store, y.load v B}, modeling the simple program on the right. The dashed edge was added by a saturation rule that only fires because of the lazy handling in D.2. The dotted states and edges show how the graph would look if the corresponding rule from ∆ptr were explicitly instantiated. .σ32@4 > .load .store ⊥ > .σ32@0 str .store .load ⊥ .σ32@0 str .σ32@4 Figure 16. Sketch representing a linked list of strings struct LL { str s; struct LL* a; }*. > .store ⊥ .σ32@0 url Figure 17. Sketch for Y representing _Out_ url * u; > num str url ⊥ Figure 15. The sample lattice Λ of atomic types. ν : S → Λ such that each fiber ν −1 (λ) is regular. It will be convenient to write νS (w) for the value of ν at the node of S reached by following the word w ∈ Σ∗ . By collapsing equal subtrees, we can represent sketches as deterministic finite state automata with each state labeled by an element of Λ, as in Figure 16. Since the regular language associated with a sketch is prefix-closed, all states of the associated automaton are accepting. Lemma E.1. The set of sketches Sk forms a lattice with meet and join operations u, t defined according to Figure 18. Sk has a top element given by the sketch accepting the language {ε}, with the single node labeled by > ∈ Λ. If Σ is finite, Sk also has a bottom element accepting the language Σ∗ , with label function ν⊥ (w) = ⊥ when hwi = ⊕, or ν⊥ (w) = > when hwi = . We will use X E Y to denote the partial order on sketches compatible with the lattice operations, so that X u Y = X if and only if X E Y . E.1.1 Modeling Constraint Solutions with Sketches Sketches are our choice of entity for modeling solutions to the constraint sets of §3.1. Definition E.2. A solution to a constraint set C over the type variables V is a set of bindings S : V → Sk such that • • • • If κ is a type constant, L(Sκ ) = {ε} and νSκ (ε) = κ. If C ` VAR X.v then v ∈ L(X). If C ` X.u v Y.v then νX (u) <: νY (v). If C ` X.u v Y.v then u−1 SX E v −1 SY , where v −1 SX is the sketch corresponding to the subtree reached by following the path v from the root of SX . The main utility of sketches is that they are almost a free tree model of the constraint language. Any constraint set C is satisfiable over the lattice of sketches, as long as C cannot prove an impossible subtype relation in Λ. Theorem E.1. Suppose that C is a constraint set over the variables {τi }i∈I . Then there exist sketches {Si }i∈I such that w ∈ Si if and only if C ` VAR τi .w. Proof. The languages L(Si ) can be computed an algorithm that is similar in spirit to Steensgaard’s method of almostlinear-time pointer analysis [33]. Begin by forming a graph with one node n(α) for each derived type variable appearing in C, along with each of its prefixes. Add a labeled edge ` n(α) → n(α.`) for each derived type variable α.` to form a graph G. Now quotient G by the equivalence relation ∼ defined by n(α) ∼ n(β) if α v β ∈ C, and n(α0 ) ∼ n(β 0 ) ` `0 whenever there are edges n(α) → n(α0 ) and n(β) → n(β 0 ) in G with n(α) ∼ n(β) where either ` = `0 or ` = .load and `0 = .store. The relation ∼ is the symmetrization of v , with the first defining rule roughly corresponding to T-I NHERIT L and T-I NHERIT R, and the second rule corresponding to S-F IELD⊕ and S-F IELD . The unusual condition on ` and `0 is due to the S-P OINTER rule. By construction, there exists a path with label sequence u through G/∼ starting at the equivalence class of τi if and only if C ` VAR τi .u. We can take this as the definition of the language accepted by Si . Working out the lattice elements that should label Si is a trickier problem; the basic idea is to use the same pushdown system construction that appears during constraint simplification to answer queries about which type constants are upper and lower bounds on a given derived type variable. The computation of upper and lower lattice bounds on a derived type variable appears in §D.4. E.1.2 Sketch Narrowing at Function Calls It was noted in § 3.2 that the rule T-I NHERIT R leads to a system with structural typing: any two types in a subtype relation must have the same fields. In the language of sketches, this means that if two type variables are in a subtype relation then the corresponding sketches accept exactly the same languages. Superficially, this seems problematic for modeling typecasts that narrow a pointed-to object as motivated by the idioms in §2.4. The missing piece that allows us to effectively narrow objects is instantiation of callee type schemes at a callsite. To Algorithm E.1 Computing sketches from constraint sets procedure I NFER S HAPES(Cinitial , B) C ← S UBSTITUTE(Cinitial , B) G←∅ . Compute constraint graph modulo ∼ for all p.`1 . . . `n ∈ C.derivedTypeVars do for i ← 1 . . . n do s ← F IND E QUIV R EP(p.`1 . . . `i−1 , G) t ← F IND E QUIV R EP(p.`1 . . . `i , G) G.edges ← G.edges ∪ (s, t, `i ) end for end for for all x v y ∈ C do X ← F IND E QUIV R EP(x, G) Y ← F IND E QUIV R EP(y, G) U NIFY(X, Y, G) end for repeat . Apply additive constraints and update G Cold ← C for all c ∈ Cold with c = A DD(_) or S UB(_) do D ← A PPLYA DD S UB(c, G, C) for all δ ∈ D with δ = X v Y do U NIFY(X, Y, B) end for end for until Cold = C for all v ∈ C.typeVars do . Infer initial sketches S ← new Sketch L(S) ← A LL PATHS F ROM(v, G) for all states w ∈ S do if hwi = ⊕ then νS (w) ← > else νS (w) ← ⊥ end if end for B[v] ← S end for end procedure procedure U NIFY(X, Y, G) . Make X ∼ Y in G if X 6= Y then M AKE E QUIV(X, Y, G) for all (X 0 , `) ∈ G.outEdges(X) do if (Y 0 , `) ∈ G.outEdges(Y ) for some Y 0 then U NIFY(X 0 , Y 0 , G) end if end for end if end procedure demonstrate how polymorphism enables narrowing, consider the example type scheme ∀F. C ⇒ F from Figure 2. The function close_last can be invoked by providing any actualin type α such that α v F.instack0 ; in particular, α can have more capabilities than F.instack0 itself. That is, we can pass a more constrainted (“more capable”) type as an actual-in to a function that expected a less constrained input. In this way, we recover aspects of the physical, nonstructural subtyping utilized by many C and C++ programs via the pointer-tomember or pointer-to-substructure idioms described in §2.4. Example E.1. Suppose we have a reverse DNS lookup function reverse_dns with C type signature void reverse_dns (num addr,url* result). Furthermore, assume that the implementation of reverse_dns works by writing the resulting URL to the location pointed to by result, yielding a constraint of the form url v result.store.σ32@0. So reverse_dns will have an inferred type scheme of the form ∀α, β.(α v num, url v β.store.σ32@0) ⇒ α × β → void Now suppose we have the structure LL of Figure 16 representing a linked list of strings, with instance LL * myList. Can we safely invoke reverse_dns(addr, (url*) myList)? Intuitively, we can see that this should be possible: since the linked list’s payload is in its first field, a value of type LL* also looks like a value of type str*. Furthermore, myList is not const, so it can be used to store the function’s output. Is this intuition borne out by Retypd’s type system? The answer is yes, though it takes a bit of work to see why. Let us write Sβ for the instantiated sketch of β at the callsite of reverse_dns in question; the constraints C require that Sβ satisfy .store.σ32@0 ∈ L(Sβ ) and url <: νSβ (.store.σ32@0). The actual-in has the type sketch SX seen in Figure 16, and the copy from actual-in to formal-in will generate the constraint X v β. Since we have already satisfied the two constraints on Sβ coming from its use in reverse_dns, we can freely add other words to L(Sβ ), and can freely set their node labels to almost any value we please subject only to the constraint SX E Sβ . This is simple enough: we just add every word in L(SX ) to L(Sβ ). If w is a word accepted by L(SX ) that must be added to L(Sβ ), we will define νSβ (w) := νSX (w). Thus, both the shape and the node labeling on SX and Sβ match, with one possible exception: we must check that X has a nested field .store.σ32@0, and that the node labels satisfy the relation νSβ (.store.σ32@0) <: νSX (.store.σ32@0) since .store.σ32@0 is contravariant and SX E Sβ . X does indeed have the required field, and url <: str; the function invocation is judged to be type-safe. F. Additional Algorithms This appendix holds a few algorithms referenced in the main text and other appendices. Algorithm F.2 C type inference procedure I NFERT YPES(CallGraph, T ) B←∅ . B is a map from type variable to sketch. for all S ∈ R EVERSE P OSTORDER(CallGraph.sccs) do C←∅ for all P ∈ S do T [P ] ← ∅ end for for all P ∈ S do C∂ ← T [P ] S OLVE(C∂ , B) R EFINE PARAMETERS(P, B) C ← C ONSTRAINTS(P, T ) S OLVE(C, B) end for end for A←∅ for all x ∈ B.keys do A[x] ← S KETCH T OA PPX CT YPE(B[x]) end for return A end procedure procedure S OLVE(C, B) C ← I NFER S HAPES(C, B) Q ←T RANSDUCER(C, Λ) for all λ ∈ Λ do Q for all Xu such that λ 7→ Xu do νB[X] (u) ← νB[X] (u) ∨ λ end for Q for all Xu such that Xu 7→ λ do νB[X] (u) ← νB[X] (u) ∧ λ end for end for end procedure Algorithm F.3 Procedure specialization procedure R EFINE PARAMETERS(P, B) for all i ∈ P.formalIns do λ←> for all a ∈ P.actualIns(i) do λ ← λ t B[a] end for B[i] ← B[i] u λ end for for all o ∈ P.formalOuts do λ←⊥ for all a ∈ P.actualOuts(o) do λ ← λ u B[a] end for B[o] ← B[o] t λ end for end procedure Algorithm F.1 Type scheme inference procedure I NFER P ROC T YPES(CallGraph) T ← ∅ . T is a map from procedure to type scheme. for all S ∈ P OSTORDER(CallGraph.sccs) do C←∅ for all P ∈ S do T [P ] ← ∅ end for for all P ∈ S do C ← C ∪ C ONSTRAINTS(P, T ) end for C ← I NFER S HAPES(C, ∅) for all P ∈ S do V ← P.formalIns ∪ P.formalOuts Q ←T RANSDUCER(C, V ∪ Λ) T [P ] ←T YPE S CHEME(Q) end for end for end procedure procedure C ONSTRAINTS(P, T ) C←∅ for all i ∈ P.instructions do C ← C ∪ A BSTRACT I NTERP(TypeInterp, i) if i calls Q then C ← C ∪ I NSTANTIATE(T [Q], i) end if end for return C end procedure Language L(X u Y ) = L(X) ∪ L(Y ) L(X t Y ) = L(X) ∩ L(Y ) Node labels ( νX (w) ∧ νY (w) if hwi = ⊕ νXuY (w) = νX (w) ∨ νY (w) if hwi =   νX (w)    νY (w)   ν (w) ∨ ν (w) X Y νXtY (w) =       νX (w) ∧ νY (w)    if w ∈ L(X) \ L(Y ) if w ∈ L(Y ) \ L(X) if w ∈ L(X) ∩ L(Y ), hwi = ⊕ if w ∈ L(X) ∩ L(Y ), hwi = Figure 18. Lattice operations on the set of sketches. G. Other C Type Resolution Policies Example G.1. The initial type-simplification stage results in types that are as general as possible. Often, this means that types are found to be more general than is strictly helpful to a (human) observer. A policy called R EFINE PARAMETERS is used to specialize type schemes to the most specific scheme that is compatible with all uses. For example, a C++ object may include a getter function with a highly polymorphic type scheme, since it could operate equally well on any structure with a field of the right type at the right offset. But we expect that in every calling context, the getter will be called on a specific object type (or perhaps its derived types). By specializing the function signature, we make use of contextual clues in exchange for generality before presenting a final C type to the user. Example G.2. Suppose we have a C++ class class MyFile { public : char * filename () const { return m_filename ; } private : FILE * m_handle ; char * m_filename ; }; In a 32-bit binary, the implementation of MyFile::filename (if not inlined) will be roughly equivalent to the C code typedef int32_t dword ; dword get_filename ( const void * this ) { char * raw_ptr = ( char *) this ; dword * field_ptr = ( dword *) ( raw_ptr + 4); return * field_ptr ; } Accordingly, we would expect the most-general inferred type scheme for MyFile::filename to be ∀α, β.(β v dword, α.load.σ32@4 v β) ⇒ α → β indicating that get_filename will accept a pointer to anything which has a value of some 32-bit type β at offset 4, and will return a value of that same type. If the function is truly used polymorphically, this is exactly the kind of precision that we wanted our type system to maintain. But in the more common case, get_filename will only be called with values where this has type MyFile* (or perhaps a subtype, if we include inheritance). If every callsite to get_filename passes it a pointer to MyFile*, it may be best to specialize the type of get_function to the monomorphic type get_filename : const MyFile* → char* The function R EFINE PARAMETERS in F.3 is used to specialize each function’s type just enough to match how the function is actually used in a program, at the cost of reduced generality. Example G.3. A useful but less sound heuristic is represented by the reroll policy for handling types which look like unrolled recursive types: reroll (x ): if there are u and ` with x.`u = x.`, and sketch (x) E sketch (x.`): replace x with x.` else : policy does not apply In practice, we often need to add other guards which inspect the shape of x to determine if the application of reroll appears to be appropriate or not. For example, we may require x to have at least one field other than ` to help distinguish a pointer-to-linked-list from a pointer-to-pointer-to-linked-list. H. Details of the Figure 2 Example The results of constraint generation for the example program in Figure 2 appears in Figure 20. The constraint-simplification algorithm builds the automaton Q (Figure 19) to recognize the simplified entailment closure of the constraint set. Q recognizes exactly the input/output pairs of the form Finally, the two remaining transitions from start to end generate int v close_last.outeax #SuccessZ v close_last.outeax To generate the simplified constraint set, we gather up these constraints (applying some lattice operations to combine (close_last.instack0 (.load.σ32@0) .load.σ32@4, (int | #FileDescriptor)) inequalities that only differ by a lattice constant) and close over the introduced τ by introducing an ∃τ quantifier. The and result is the constraint set of Figure 2. ((int | #SuccessZ), close_last.outeax ) ∗ To generate the simplified constraint set, a type variable τ is synthesized for the single internal state in Q. The path leading from the start state to τ generates the constraint close_last.instack0 v τ The loop transition generates τ.load.σ32@0 v τ and the two transitions out of τ generate .load.32@0 / ε close_last.in / ε .load.32@4 / #FileDescriptor .load.32@4 / int #SuccessZ / close_last.out int / close_last.out τ.load.σ32@4 v int τ.load.σ32@4 v #FileDescriptor Figure 19. The automaton Q for the constraint system in Figure 2. _text :08048420 _text :08048420 _text :08048420 _text :08048424 _text :08048426 _text :0804842 C _text :08048430 _text :08048430 _text :08048430 _text :08048432 _text :08048432 _text :08048432 _text :08048434 _text :08048436 _text :08048438 _text :0804843 B _text :0804843 F _text :08048443 _text :08048443 close_last proc near close_last : mov edx , dword [ esp + fd ] AR_close_last_INITIAL [4:7] <: EDX_8048420_close_last [0:3] close_last . in@stack0 <: AR_close_last_INITIAL [4:7] EAX_804843F_close_last [0:3] <: close_last . out@eax jmp loc_8048432 db 141 , 118 , 0 , 141 , 188 , 39 times 4 db 0 loc_8048430 : mov edx , eax EAX_8048432_close_last [0:3] <: EDX_8048430_close_last [0:3] loc_8048432 : mov eax , dword [ edx ] EDX_8048420_close_last [0:3] <: unknown_loc_106 EDX_8048430_close_last [0:3] <: unknown_loc_106 unknown_loc_106 . load .32 @0 <: EAX_8048432_close_last [0:3] test eax , eax jnz loc_8048430 mov eax , dword [ edx +4] EDX_8048420_close_last [0:3] <: unknown_loc_111 EDX_8048430_close_last [0:3] <: unknown_loc_111 unknown_loc_111 . load .32 @4 <: EAX_8048438_close_last [0:3] mov dword [ esp + fd ] , eax EAX_8048438_close_last [0:3] <: AR_close_last_804843B [4:7] jmp __thunk_ . close AR_close_last_804843B [4:7] <: close :0 x804843F . in@stack0 close :0 x804843F . in@stack0 <: # FileDescriptor close :0 x804843F . in@stack0 <: int close :0 x804843F . out@eax <: EAX_804843F_close_last [0:3] int <: close :0 x804843F . out@eax close_last endp Figure 20. The constraints obtained by abstract interpretation of the example code in Figure 2.
6cs.PL
All good things come in threes - Three beads learn to swim with lattice Boltzmann and a rigid body solver arXiv:1108.0786v1 [cs.CE] 3 Aug 2011 Kristina Pickla,b,∗, Jan Götza , Klaus Iglbergerc , Jayant Pandeb,d , Klaus Meckeb,c,d , Ana-Sunčana Smithb,c,d , Ulrich Rüdea,b,c a Lehrstuhl für Systemsimulation, Friedrich-Alexander Universität Erlangen-Nürnberg, D-91058 Erlangen, Germany b Cluster of Excellence: Engineering of Advanced Materials, Friedrich-Alexander Universität Erlangen-Nürnberg, D-91052 Erlangen, Germany c Zentralinstitut für Scientific Computing, Friedrich-Alexander Universität Erlangen-Nürnberg, D-91058 Erlangen, Germany d Institut für Theoretische Physik, Friedrich-Alexander Universität Erlangen-Nürnberg, D-91058 Erlangen, Germany Abstract We simulate the self-propulsion of devices in a fluid in the regime of low Reynolds numbers. Each device consists of three bodies (spheres or capsules) connected with two damped harmonic springs. Sinusoidal driving forces compress the springs which are resolved within a rigid body physics engine. The latter is consistently coupled to a 3D lattice Boltzmann framework for the fluid dynamics. In simulations of three-sphere devices, we find that the propulsion velocity agrees well with theoretical predictions. In simulations where some or all spheres are replaced by capsules, we find that the asymmetry of the design strongly affects the propelling efficiency. Keywords: Stokes flow, self-propelled microorganism, lattice Boltzmann method, numerical simulation 1. Introduction Engineered micro-devices, developed in such a way that they are able to move alone through a fluid and, simultaneously, emit a signal, can be of cru∗ Corresponding author Email address: [email protected] (Kristina Pickl) Preprint submitted to Journal of Computational Science August 21, 2011 cial use in various fields of science. A few engineered self-propulsive devices have been developed over the last decade. In one approach, the device consisted of magnetically actuated superparamagnetic particles linked together by DNA double strands [8]. In another approach, miniature semiconductor diodes floating in water were used. When powered by an external alternating electric field, the voltage induced between the diode electrodes changed, which resulted in particle-localized electro-osmotic flow. In the latter case, the devices could respond and emit light, thus providing a signal that could be used as a carrier [5]. A third example is a swimmer based on the creation of a traveling wave along a piezoelectric layered beam divided into several segments with a voltage with the same frequency but different phases and amplitudes applied to each segment [21]. Propulsion through a fluid induces the flow of the surrounding fluid, which in turn affects the propulsion of the device. Most generally the fluid motion is described by the Navier-Stokes equation 1 µ ∂~u + (~u · ∇)~u = − ∇p + ∇2~u + f~. ∂t ρ ρ (1) Here ~u is the velocity, ρ is the density, p is the pressure, µ is the dynamic viscosity of the fluid, and f~ is the applied force in the fluid. The first term on the left hand side describes the acceleration of the fluid, whereas the second term accounts for non-linear inertial effects that may give rise to effects such as turbulence. On the right hand side the first term is the driving pressure gradient, while the second term takes into account the viscous dissipation. In the case of low Reynolds numbers, the inertia terms on the left side of equation (1) can be dropped and one is left with µ 1 (2) 0 = − ∇p + ∇2~u + f~, ρ ρ which together with the incompressibility equation ∇·~u = 0 describes the socalled Stokes flow. The main characteristics of the Stokes flow emerge from the domination of viscous forces. Consequently, the flow is always laminar (no turbulence or vortex shedding) and characterized by a small momentum. Since the flow is proportional to the forces applied, linear superposition of solutions is valid. Furthermore, the Stokes flow is instantaneous, which means that the time-development is given solely by the effects of the boundaries. Finally, there is no coasting, and the flow is time-reversible, which has important implications for swimming strategies at low Reynolds numbers [36]. 2 The propulsion strategy in this regime must involve a non-time-reversible motion, thus involving more than one degree of freedom [32]. Such a requirement is not limiting if a large number of degrees of freedom is available. However, if one tries to design a self-propelled device (e.g. a swimmer) with only a few degrees of freedom, a balance between simplicity and functionality has to be found. A number of analytic and numerical studies have been performed to understand the behavior of a single or a couple of swimmers under various conditions [13, 22]. However, most of these types of approaches are limited to simple geometries of swimmers and fail when numerous swimmers are involved leading to a collective behavior. In addition to the effective treatment of many body interactions, the regimes in which inertia starts to play a role, as well as the problem of motion in confined geometry or transport in turbulent flow, are inaccessible. In these circumstances extensive simulations become essential, but difficult to perform efficiently [31, 38]. direction of linear movement Figure 1: A three-sphere swimming device with two translational degrees of freedom. In order to meet these challenges, we augmented our already existing massively parallel lattice Boltzmann simulation framework waLBerla, widely applicable Lattice Boltzmann solver from Erlangen [10], with swimmers. The motion of the latter is included into waLBerla by coupling it with the pe rigid multibody physics engine, a framework for the simulation of rigid, fully resolved bodies of arbitrary shape [16]. This allows us to resolve both, the driven motion of a swimmer within the fluid, and the induced motion of the fluid in a consistent manner. For the swimming device we choose the simplest possible design, consisting of three rigid bodies connected with two springs (Figure 1). This design has been studied extensively in the three 3 spheres geometry by analytical methods [12]. This paper starts with the elucidation of the background of the numerical methods, which form the basis of our simulation, in Section 2. Here, the lattice Boltzmann method (LBM) of the waLBerla framework, the mechanics of the pe framework and, finally, the coupling of both with special focus on the swimmers are briefly explained. In Section 3, our new implementation approach for the integration of the swimmers is considered in detail, including the cycling strategy. Moreover, our design variants are presented. Afterwards, in Section 4, a quantitative validation of the simulation results of the pe engine is conducted. In Section 5, validation criteria for the swimmer are defined, and asymmetric and symmetric designs are simulated and analyzed in detail to demonstrate the capability of our extension of the framework. Finally, in Section 6 a conclusion of the achieved results is given, and propositions for future work are made. 2. Numerical methods 2.1. The lattice Boltzmann method The LBM can be used as an alternative to the classical Navier–Stokes (NS) solvers to simulate fluid flows [6, 35] The fluid is modeled as a set of imaginary, discretized particles positioned on an equidistant grid of lattice cells. Moreover, the particles are only allowed to move in fixed, predefined directions given by the finite set of velocity vectors, resulting from the discretization of the velocity space. Unlike other methods, which rely on the automatic generation of a body fitted mesh during the simulation, the waLBerla framework uses the LBM on the same (block-)structured mesh, even when the objects are moving. This eliminates the need for dynamic re-meshing, and hence offers a significant advantage with respect to performance. In this study we use the common three-dimensional D3Q19 velocity phase discretization model originally developed by Qian, d’Humières and Lallemand [34] with N = 19 particle distribution functions (PDFs) fα : Ω × T → [0, 1), where Ω ⊂ R3 and T ⊂ R+ 0 are the spatial and the time domain, respectively. Figure 2 illustrates the 19 directions. The corresponding dimensionless discrete velocity set is denoted by {~eα |α = 0, . . . , N − 1}. This model has been shown to be both stable and efficient [26]. For the work presented in this paper, we adopt a lattice Boltzmann collision scheme proposed 4 Figure 2: The D3Q19 velocity phase discretization model. by Bhatnagar, Gross and Krook, called lbgk [3, 34] 1 fα (~xi + ~eα ∆t, t + ∆t) = fα (~xi , t) − [fα (~xi , t) − fα(eq) (~xi , t)] , τ (3) where ~xi is a cell in the discretized simulation domain, t is the current time step, t+∆t is the next time step, τ is the relaxation time in units of time step (eq) ∆t (which is set to be 1 here) and fα represents the equilibrium distribution. The time evolution of the distribution function, given by equation (3), is usually solved in two steps, known as the collision step and the streaming step, respectively: 1 f˜α (~xi , t) = fα (~xi , t) − [fα (~xi , t) − fα(eq) (~xi , t)] , τ (4) fα (~xi + ~eα ∆t, t + ∆t) = f˜α (~xi , t) , (5) where f˜α denotes the post-collision state of the distribution function. The collision step is a local single-time relaxation towards equilibrium. The streaming step advects all PDFs except for f0 to their neighboring lattice site depending on the velocity. Thus, for each time step only the information of the next neighbors is needed. As a first-order no-slip boundary condition a simple bounce-back scheme is used, where distribution functions pointing to a neighboring wall are just reflected such that both normal and tangential velocities vanish: fᾱ (~xf , t) = f˜α (~xf , t) , 5 (6) with ᾱ representing the index of the opposite direction of α, ~eᾱ = −~eα , and ~xf explicitly denoting the fluid cell. Due to the locality of the cell updates, the LBM can be implemented extremely efficiently (see for instance [30, 37]). For the same reason, the parallelization of LBM is comparatively straightforward [20]. It is based on a subdomain partitioning that is realized in the waLBerla framework by a patch data structure as described in Feichtinger et al. [10]. 2.2. The rigid body physics engine pe Simulating the dynamics of rigid bodies involves both the treatment of movement by a discretization of Newton’s equations of motion, as well as handling collisions between rigid objects. The forces involved may be external, such as gravity, or between bodies, such as springs. Furthermore, a number of velocity constraints are available through which hinges, sliders, ball joints and the like are implemented [28]. The collisions between rigid bodies are either treated directly by the application of the restitution laws in the form of a linear complementarity problem (LCP) [2] or by applying Hertzian contact mechanics (as for instance in the DEM approach) [7]. In our work, we fully resolve the geometry of the rigid bodies. In contrast to mass-point-based approaches, this for instance enables us to easily exchange the geometries of the swimmers in our simulations (see Subsection 3.2). The rigid body framework used for this is the pe rigid multibody physics engine [16]. Due to its highly flexible, modular and massively parallel implementation, the framework allows for a direct selection of the time discretization scheme and collision treatment. By this it can easily be adjusted to various simulation scenarios. For instance, it has already been successfully used to simulate large-scale granular flow scenarios [17] and can be efficiently coupled for simulations of particulate flows [15] (see Subsection 2.3). The springs of the pe are modeled as damped harmonic oscillators in which the bodies are subject to the harmonic and the damping force. The first one is Sn F~spring = −k ∆~xSn for all springs n, (7) where k is the force constant and ∆~xSn = (~xBi −~xBj )−~l0 is the deformation of the spring for i 6= j. The deformation is defined as the difference between the rest length ~l0 of the spring and its current length, which equals the current distance between the connected bodies Bi and Bj , whose current positions are denoted by ~xBi and ~xBj , respectively. In order to account for the dissipation 6 in the spring, a damping force, proportional to the velocity ∆~uSn at which the spring is contracting is implemented as in the following Sn = −γ ∆~uSn F~damp for all springs n. (8) Here γ is the damping coefficient and ∆~uSn = ~uBi − ~uBj for i 6= j. Here, ~uBi and ~uBj are the velocities of the bodies Bi and Bj . This damping force hence models the internal friction resulting from the deformation of the spring. Consequently, each of the two bodies Bi and Bj connected by a spring Sn feels the force Bi = −k ∆~xSn − γ ∆~uSn , F~osci B F~oscij = k ∆~xSn + γ ∆~uSn , (9) (10) respectively. A standard way to classify a damped harmonic oscillator is by its damping ratio γ D= √ . (11) 2 mk If D > 1 the system is overdamped and upon an excitation the system returns exponentially to equilibrium without oscillating. If D  1 the system is underdamped. It will oscillate with a re-normalized frequency decreasing the amplitude to zero until the equilibrium state is reached. We choose the parameters of the springs of the swimmer in such a way that the latter regime is achieved. Algorithm 1 gives an overview of the necessary steps within a single time step of the pe framework. During each time step, collisions between rigid bodies have to be detected and resolved appropriately in order to keep rigid bodies from interpenetrating. Therefore, initially, all contacts k between pairs of colliding rigid bodies are detected and added to the set of constraints c, which already includes the potentially existing velocity constraints. In the subsequent constraint resolution step, the acting constraining forces F~cBi , Bi including the forces of the harmonic potentials F~osci , are determined. Moreover, the detected collisions are resolved depending on the selected collision response algorithm. It is important to note that interpenetration cannot be completely prevented due to the discrete time stepping, but small penetrations can be corrected in the collision response phase. In the final step all 7 Algorithm 1 Rigid Body Time Step 1: //Collision detection 2: for each rigid body Bi do 3: Detect all contacts k 4: Add them to set of constraints c 5: end for 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: //Constraint resolution for each constraint c do Determine acting constraint forces F~cBi end for //Time integration for each rigid body Bi do Bi : update position and velocity Apply forces F~tot end for rigid bodies Bi are moved forward in time according to Newton’s laws of Bi acting motion, depending on their current velocity and the total forces F~tot at the given instance of time. In the simulations of swimmers, the size of the time step was chosen such that rigid bodies do not interpenetrate. Another limitation on the size of the time step originates from the force constant of the harmonic oscillators and the frequency of the driving forces. In all cases the time step must be small enough to enable all bodies to respond sufficiently quickly to changes in the acting forces. 2.3. Coupling lattice Boltzmann to the pe for swimmers The coupling between the lattice Boltzmann flow solver and the rigid body dynamics simulation has to be two-way: rigid bodies have to be represented as (moving) boundaries in the flow simulation, whereas the flow corresponds to hydrodynamic forces acting on the rigid bodies (Figure 3). We use an explicit coupling algorithm, shown in Algorithm 2, which we adopt for the swimmers. The additional steps are highlighted. Here, a driving force acts on the corresponding bodies according to a carefully defined protocol (see Subsection 3.3). The first step in the coupled algorithm is the mapping of all rigid bodies 8 Figure 3: Illustration of the two-way coupling of waLBerla fluid solver and pe rigid body dynamics solver. (a) Initial setup: The velocities ~u of the object cells ~xb are set to the velocity ~uw (~xb ) of the object. In this example the object only has a translational velocity component. Fluid cells are marked with ~xf . (b) Updated setup: Two fluid cells have to be transformed to object cells, and for two object cells the PDFs have to be reconstructed. Figure 4: 2D mapping example [14]. 9 Algorithm 2 Coupled LBM-PE solver for the swimmers 1: for each swimmer S do 2: Map S to lattice grid 3: end for 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: for each lattice cell do Stream and collide end for for each surface cell do Bi from fluid to rigid objects Bi Add forces F~hydro end for for each body Bi of the swimmers do Bi Add external forces F~dri end for //Time step in the rigid body simulation (see Algorithm 1) for each rigid body Bi do Bi Bi Bi + F~cBi + F~dri = F~hydro F~tot end for onto the lattice Boltzmann grid (see Figure 4(a) for an example). Objects are thus represented as flag fields for the flow solver. In our implementation, each lattice node with a cell center inside an object is treated as a moving boundary. For these cells, we apply the boundary condition fᾱ (~xf , t) = f˜α (~xf , t) + 6wα ρw (~xf , t)~eᾱ · ~uw (~xf + ~eα , t) , (12) which is a variation of the standard no-slip boundary conditions for moving walls [39]. Here ρw (~xf , t) is the fluid density close to the wall, wα is the weight in the LBM depending on the stencil and the direction, and the velocity ~uw (~xf + ~eα , t) of each object cell corresponds to the velocity of the object at the cell’s position at time t. In this way, the fluid at the surface of an object is given the same velocity as the object’s surface which depends on the rotational and the translational velocities of the object. The final part of the first step is to account for the flag changes due to the movement of the objects. Here, two cases can occur (see Figure 4(b)): the 10 fluid cells ~xf can turn into object cells, resulting in a conversion of the cell to a moving boundary. In the reverse case, i.e. a boundary cell turns into a fluid cell, the missing PDFs have to be reconstructed. In our implementation, (eq) the missing PDFs are set to the equilibrium distributions fα (ρ, ~u), where the macroscopic velocity ~u is given by the velocity ~uw (~xf ) of the object cell, and the density ρ is computed as an average of the surrounding fluid cells. Further details of this procedure have been discussed previously by us in Iglberger et al. [18]. There are more formal ways for the initialization of the missing distribution functions. One of them is described in the paper by Mei et al. [25]. During the subsequent stream and collide step, the fluid flow acts through hydrodynamic forces on the rigid objects: Fluid particles stream from their cells to neighboring cells and, in case they enter a cell occupied by a moving object, are reversed, causing a momentum exchange between the fluid and Bi on each object Bi resulting the particles. The total hydrodynamic force F~hydro from this momentum exchange [39] can be easily evaluated due to the kinetic origin of the LBM by Bi = F~hydro 19 XX ~ xb h i ∆x , (13) ~eα 2f˜α (~xf , t) + 6wα ρw (~xf , t)~eᾱ · ~uw (~xf + ~eα , t) ∆t α=1 where ~xb are all obstacle cells of the object that neighbor at least one fluid cell. A comparison of different approaches for the momentum exchange is given in Lorenz et al. [24]. Bi , resulting from the cycling strategy, In the third step, the driving force F~dri is added to the previously calculated hydrodynamic force on each body Bi . Together with the constraint force F~cBi , this results in a total force Bi Bi Bi F~tot = F~hydro + F~dri + F~cBi (14) on each object. The fourth and final step of the coupling algorithm consists of determining Bi the rigid body movements of the objects due to the influence of F~tot in the rigid body framework. This results in a position change of the objects, which then are mapped again to the LBM grid in the next time step. A validation of this method is described in Binder et al. [4], and Iglberger et al. [18]. 11 3. Integration of the swimming device The modeling of a three-sphere swimmer always involves a similar physical setup. On the one hand, the connections between the objects need to be modeled. Here, stiff rods [27, 33] or springs [11] are most commonly used. On the other hand, the cycling strategy, responsible for the characteristic movement of the swimmer, needs to be defined. 3.1. Elementary design Figure 5: A three-sphere swimming device. The three spheres have the same mass msph and radius rsph . Similarly, the two damped harmonic oscillators have identical force constant k, damping parameter γ, and rest length l0 . Our elementary design (Figure 5), inspired by the analytical modeling in Golestanian and Ajdari [12], and in Felderhof [11], consists of three spheres (B1 , B2 , B3 ) with identical radius rsph and mass msph . The connections between the three rigid objects of our swimmer are realized by two damped harmonic springs S1 and S2 with equal force constant k and damping parameter γ. The forces are applied on the spheres along the main axis of the swimmer, in our case the z-axis, resulting in a translation of the swimmer in this direction. In accordance with the equations (9) and (10), the different objects feel the force B2 F~osci = −k ∆~xS1 − γ ∆~uS1 ,   B1 F~osci = k ∆~xS1 + ∆~xS2 + γ ∆~uS1 + ∆~uS2 , F~ B3 = −k ∆~xS2 − γ ∆~uS2 , osci respectively. 12 (15) (16) (17) Since the bodies of the swimmer do not collide with each other, the total force acting on each body Bi of the swimmer, given in equation (14), can be rewritten as Bi Bi Bi Bi F~tot = F~hydro + F~dri + F~osci . (18) 3.2. Alternative designs Since we want to investigate the effect of different geometries on the swimming behavior of our self-propelled device, we will replace the spheres of the elementary three-sphere swimmer design by capsules. For example, Figure 6 depicts the characteristic parameters of a three-capsule swimming device. The comparably smooth edges of a capsule, and thus its resulting smooth behavior in a fluid, substantiate our choice of this particular geometry. Figure 7 shows our assembly variants. Figure 6: A three-capsule swimming device. The three capsules have the same mass mcap , length lcap and radius rcap . Similarly, the two damped harmonic oscillators have identical force constant k, damping parameter γ, and rest length l0 . 3.3. Cycling strategy Purcell’s Scallop theorem [32] necessitates the motion of a swimmer to be non-time-reversible at low Reynolds numbers. Additionally, the total applied force on a swimmer should vanish over one cycle, which means that the displacement of the center of mass of a swimmer over one cycle should be zero in the absence of a fluid. In contrast to the common approach of imposing known velocities on the constituent bodies of a swimmer, used, e.g., by Earl et al. [9] and Najafi and Golestanian [27], our driving protocol imposes known forces on the objects. These forces, only applied along the main axis of the swimmer on the center of mass of each body, are given by 13 (a) (b) (c) (e) (f) (h) (k) (o) (d) (g) (i) (l) (j) (m) (p) (n) (q) Figure 7: Design options (a)–(q) of our swimming device. The capsules in the designs (g)– (p) are rotated by π/2. Further, the spheres in design (q) have larger radii, equal to the lengths of the capsules in (f) and (k). 14  B2 F~dri   = −a · sin (ωt) = −a · sin     2π(t + ϕ) B 3 , F~dri = a · sin T z       B1 B2 B3 ~ ~ ~ . Fdri = − Fdri + Fdri z z z 2πt T  , (19) (20) (21) z Here a is the amplitude, ω is the driving frequency, T is the oscillation period, and ϕ is the phase shift, kept constant at a value of ϕ = T /4. In equation (21), we apply the negative sum of the forces of the two outer bodies B2 and B3 on the middle body B1 in order to ensure that the net driving force acting on the system at each instant of time is zero. Figure 8 illustrates these forces. 0.008 Force (z-component) [10 -6 N] 0.006 0.004 0.002 0 -0.002 -0.004 Force on Body 2 Force on Body 1 Force on Body 3 -0.006 -0.008 8 12 16 20 24 Time step [10 3s] 28 32 Figure 8: Fragments of the z-components of the driving forces on all three bodies. Applying this force protocol to our swimmer, we end up with our cycling strategy illustrated in Figure 9. Starting from the rest position, we have to delay the force on body B3 by a fourth of the pulse length. Step (i) depicts the 15 (a) Theoretical positions prescribed by the cycling strategy. (b) Position plot from the simulation. The zpositions are given in lattice cells. Figure 9: Cycling strategy of the non-time-reversible motion, exemplified on the threesphere swimmer. For both damped harmonic potentials, lmin is the minimum length of one arm, l0 is the rest length, and lmax is the maximal extended armlength. ∆ is the distance covered by the swimmer after one cycle. initial position of our swimming device. The two “arms ”, i.e. the connecting harmonic oscillators S1 and S2 , are at their rest length l0 . In the following, l1 and l2 denote the current lengths of S1 and S2 , respectively. From step B2 B1 (i) to step (ii), we first apply the driving force F~dri on body B2 and F~dri on body B1 . As shown in Figure 8, and also apparent from equation (19), B2 F~dri starts in the negative direction until it reaches its negative maximum at which point the oscillator S1 obtains its maximum length lmax . S2 is also B2 influenced by the force F~dri and, therefore, also gets extended to the length B2 l0 < l1 < lmax . From step (ii) onwards, F~dri increases and we start to exert B3 ~ the positive driving force Fdri on body B3 . We reach the intermediate step 16 (iii), where both oscillators S1 and S2 have the length l0 < l1 = l2 < lmax . In B2 goes to 0, i.e. S1 has decreasing the transition from step (iii) to step (iv), F~dri B 3 ~ length l0 < l1 < lmax . Moreover, Fdri reaches its positive maximum, and thus B3 B2 still increasing and F~dri S2 obtains its maximum length lmax . With F~dri starting to decrease, we attain another intermediate state in step (v). Here, the length of S1 is lmin < l1 < l0 , and the length of S2 is l0 < l2 < lmax . B2 reaches its positive maximum. As a result, S1 takes its In step (vi), F~dri B3 goes to 0. Accordingly, S1 relaxes minimum length lmin . Furthermore, F~dri B2 and also decrease to the length lmin < l1 < l0 . Now, we start to decrease F~dri B3 F~dri further. Passing by the temporary step (vii), where both oscillators S1 and S2 are at the length l0 < l1 = l2 < lmin , we pass into step (viii). Here, B3 F~dri reaches its negative maximum, resulting in S2 obtaining its minimum B2 length lmin . Additionally, F~dri goes to 0 and therefore S1 relaxes to the length B2 B3 ~ lmin < l1 < l0 . While Fdri continues to grow in the negative direction and F~dri decreases, our swimmer moves forward to another transitional state (ix), for which the conditions l0 < l1 < lmax and lmin < l2 < l0 hold for the oscillators’ B2 B3 lengths. Finally, F~dri reaches its negative maximum again, and F~dri becomes 0, resulting in a length of l0 < l2 < lmax for the oscillator S2 . On reaching the state (x) (which is equal to state (ii)), one swimming cycle is completed. Subsequently, our swimmer can begin another cycle of motion. 4. Validation of the simulation of swimmers with the pe In order to quantitatively validate the application of springs in the pe physics engine, we perform simulations of the motion of the three-sphere swimmer (Figure 7(a)) in vacuum, and compare these results with the analogous analytic model. The basis of that model is the Lagrangian of a nondissipative assembly L= m ~ x˙ 21 +~ x˙ 22 +~ x˙ 23 2 −k (~ x1 −~ x2 −~l0 )2 +(~ x3 −~ x1 −~l0 )2 + 2 B1 B2 + ~x1 · F~dri + ~x2 · F~dri B3 + ~x3 · F~dri . (22) Here, ~x˙ i (i = 1, 2, 3) refers to the derivative of the positions of the three spheres with respect to time and ~l0 denotes the rest length of the springs. The first term in the Lagrangian consists of the kinetic energy of the three spheres, the second gives the energy stored in the two springs due to their deformation, and the remaining terms account for the driving forces (equations (19)–(21)). 17 As discussed previously (equation (8)), the damping forces in the simulation are proportional to the velocity of the spring deformation, with the factor of proportionality being γ. Taking the damping into account, the equation of motion for each sphere becomes ∂L d ∂L Bi = + F~damp ˙ dt ∂ ~xi ∂~xi for i = 1, 2, 3. (23) sphere 3 This set of three differential equations can be solved analytically assuming appropriate initial conditions. 80 75 pe simulation Analytical calculation 70 65 sphere 1 z-position 60 55 50 45 40 35 sphere 2 30 25 20 0 2.5 5.0 7.5 10.0 12.5 Time step [10 4 s] 15.0 t1 t2 17.5 t3 20.0 Figure 10: Plot of the z-positions of the three spheres vs. time (weak damping) of one of our simulations. The values of the parameters used are: m = 5.44 × 10−13 kg, k = 1.72965 kg/s2 , (~l0 )z = 25 lattice cells (with discretization ∆x = 10−6 m), γ = 1.57237 × 10−7 kg/s, ω = 296057.86703 1/s, a = 1.0 × 10−5 kg m/s2 , (~x2 (0))z = 25 lattice cells, (~x1 (0))z = 50 lattice cells, (~x3 (0))z = 75 lattice cells, ~x˙ 2 (0) = ~0 m/s, ~x˙ 1 (0) = ~0 m/s, ~x˙ 3 (0) = ~0 m/s. The simulation is run for 196812 time steps, while the driving force on the left body is switched off at t1 = 140580 time steps, and on the right and hence also on the middle body at t2 = 147609 time steps. The springs obtain their starting configuration at t3 ≈ 179000 time steps. 18 Figure 10 shows both the simulation and the analytically calculated results for a typical variation of the sphere positions with time in vacuum, in the case of weak damping. The used parameter values are stated in the caption. This particular setup of the damped harmonic oscillators and the driving forces is equal to the setup for the fluid simulation in Section 5. For this number of time steps the lattice Boltzmann algorithm is stable and we also end up in the Stokes regime. As expected, each sphere performs an oscillatory motion in the steady state with its frequency being the same as the driving frequency. Moreover, Figure 10 indicates the force neutrality of our total cycle. After we switch off the driving force on the left body at t1 = 140580 time steps and on the right body and hence also on the middle body at t2 = 147609 time steps (which equal 3/4 of the total time steps), the springs in our swimmer start to revert to their rest lengths, and the swimmer soon obtains its starting configuration at t3 ≈ 179000 time steps, causing the flat ends of the position curves. 3.0 Analytical calculation pe simulation 2.5 A/a [10 5] 2.0 1.5 1.0 0.5 0 0 0.2 0.4 0.6 0.8 1.0 ω0/ω 1.2 1.4 1.6 1.8 2.0 Figure 11: Amplitude of oscillation A scaled by amplitude of the driving forces a (both given on the lattice) on the example of sphere 2 vs. ω0 /ω, with ω fixed at a value of 296057.86703 1/s, for very weak damping (D = 0.07). Figure 11 shows the graph of the amplitude of the oscillation A of the sphere 2 (scaled by the amplitude of the driving forces a) as a function of 19 p the natural spring frequency ω0 = k/m (scaled by constant ω), with the fixed characteristic damping ratio D = 0.07 (equation (11)). For this graph, the mass of each sphere was fixed at m = 5.44 × 10−13 kg, while the stiffness k of the spring was varied between the values of 4.76813 × 10−3 kg/s2 and 0.181309 kg/s2 . Accordingly, the damping γ lies within the bounds of 2.27017 × 10−9 kg/s and 4.414 × 10−8 kg/s. Both ranges yield a damping ratio of D = 0.07 in each run. In order to guarantee the achievement of a steady state in all of the simulations, we perform 106 time steps. Both Figure 10 and 11 demonstrate excellent agreement between the simulation results and the analytically obtained results. In Figure 11, the 38 selected simulation scenarios match the analytically √ obtained curve with the two characteristic maxima at ω0 ∼ ω and ω0 ∼ ω/ 3 for not less than 10 digits. 5. Simulation of swimmers in a fluid In the following we perform simulations of swimmers in a highly viscous fluid. Apart from exploring the parameter space in order to achieve simulations in a physically-stable regime, we also show that the shape of a swimmer has a considerable effect on its swimming velocity. 5.1. Parameters of simulations The setup of the domain for the design parameter study is a cuboidal channel with (x × y × z) = (100 × 100 × 200) lattice cells, each of which is a cube with a side length of 10−6 m. The z-axis corresponds to the axis of movement of the device. The highly viscous fluid has a kinematic viscosity of ν = 7.36 × 10−5 m2 /s and a density of ρ = 1.36 kg/m3 , these being typical values at room temperature for honey. In order to make the different designs comparable, the mass of all spheres and capsules has been set to msph = mcap = 5.44 × 10−13 kg. The spheres in the designs (a)-(e), (g)-(j) and (l)-(o) all have the radius rsph = 4 × 10−6 m. The capsules used in the designs (b)-(p) all have the radius rcap = 4 × 10−6 m and the length lcap = 8 × 10−6 m. In order to observe the influence of the distances to the walls of the simulation box, we also consider a three-sphere swimmer (q) with larger radii rsphbig = 8 × 10−6 m. At t = 0, the swimmer is centered in the channel, with the center of the middle body being at the center of the channel with respect to all three dimensions. As the time-steps increase, the z-positions of the different bodies 20 of the swimmer change, while the x- and the y-positions do not. Also, at t = 0, the springs are at their rest length of 8 lattice cells (= 8 × 10−6 m) in the designs (a)-(f) and (l)-(q). In order to make the respective armlengths of the corresponding designs (b)-(f) and (g)-(k) equal, the springs in the designs (g)-(k) have a rest length of 16 lattice cells (= 16 × 10−6 m) between perpendicular capsules, and those between a sphere and a perpendicular capsule have a rest length of 12 lattice cells (= 12 × 10−6 m). The other springs in those designs have a rest length of 8 lattice cells (= 8×10−6 m). All springs are characterized by a stiffness of k = 1.72965 kg/s2 and a damping constant of γ = 1.57237 × 10−7 kg/s. This results in a damping ratio of D = 0.07  1, i.e. our system is in the weak damping regime. The simulations run for 196812 time steps, performing five swimming cycles with an oscillation period of T = 28116 time steps. The sinusoidal driving forces on the left and the middle body are applied at T = 0, whereas the force on the right body is implemented with a delay of ϕ = T /4 = 7029 time steps. The amplitude of the driving force on the right and the left body is a = 1.0 × 10−5 kg m/s2 . The force on the middle body is at each instant the negative of the sum of the forces on the two other bodies, so that the swimmer has no net external driving force at any time step. This means that the amplitude of the driving √ force on the middle body is a for t ≤ 7029 and t ≥ 140580 time steps, and 2a otherwise. All simulations are terminated by switching off the driving at t1 = 140580 time steps for the left body and t2 = 147609 time steps (which equals 3/4 of the total simulation time) for all other bodies and the system is allowed to relax on its own for the remaining time. It should be noted that the same driving forces are applied on the bodies in each simulation, and any differences in their motion are due to their different shapes. 5.2. Stability We show that our choice of parameters results in our swimmers being in the regime of low Reynolds numbers [32]. The latter is given by Re = ul  1, ν (24) with the kinematic viscosity of the fluid ν, the characteristic velocity u and the characteristic length-scale l. In order to simulate our swimmer in a stable regime, we define two different Reynolds numbers. The first is the Reynolds number of the whole 21 Rest Length Total Width Reswim [10−3 ] ReB2 ReB1 ReB3 (a) 40 8 6.51 0.066 0.059 0.078 (b) 48 8 6.32 0.128 0.047 0.130 (c) 48 8 5.75 0.053 0.123 0.081 (d) 48 8 6.14 0.074 0.060 0.121 (e) 56 8 5.72 0.143 0.047 0.130 (f) 64 8 5.51 0.119 0.096 0.136 (g) 44 16 5.07 0.064 0.041 0.086 (h) 48 16 4.93 0.047 0.065 0.083 (i) 44 16 4.93 0.077 0.060 0.053 (j) 48 16 3.64 0.074 0.042 0.059 (k) 56 16 3.72 0.056 0.044 0.063 (l) 40 16 4.86 0.062 0.041 0.085 (m) 40 16 4.54 0.045 0.063 0.078 (n) 40 16 4.64 0.078 0.058 0.050 (o) 40 16 3.64 0.074 0.041 0.054 (p) 40 16 3.53 0.051 0.041 0.053 (q) 64 16 2.33 0.080 0.061 0.083 Design Table 1: Parameters of the different swimmers. ReBi denotes the Reynolds number of the ith body in each swimmer, while Reswim indicates the Reynolds number of the whole swimmer. 22 swimming device (Table 1, fourth column), defined as Reswim = uswim lswim 1 ν (25) with respect to the characteristic velocity of the swimmer uswim . The latter is calculated from the movement ∆ of the central body in the swimmer during one swimming cycle (here chosen to be the last full cycle), divided by the time-period T , i.e. uswim = ∆/T . The characteristic length-scale lswim of the different swimming devices is the rest length in the direction of motion for all the different swimmer designs (Table 1, second column). Additionally, we verify the Reynolds number not only for the whole swimmer but also for each of the bodies (Table 1, third, fourth and fifth column), which may move with considerably higher velocities than the swimming device. Here, the Reynolds number of the body Bi is ReBi = uBi lBi  1, ν (26) and uBi is the maximum velocity of the body Bi and lBi is its length in the direction of motion. As Table 1 confirms, all the Reynolds numbers satisfy the Re  1 condition. 5.3. Swimming velocities In the following, we investigate the performance of each swimmer as a function of its design geometry, as also detailed in Pickl et al. [29]. Specifically, we study the dependence of the amplitudes of the oscillations of the bodies in each swimmer on their shapes, and relate this to the overall swimming velocity. 5.3.1. The three-sphere swimmers First we look at the two swimmers which consist solely of spheres. Table 2 shows the velocity of each swimmer obtained from the simulations (uswim ). We find that the swimmer consisting of smaller spheres moves significantly faster than the one with larger spheres. Figure 12 shows the plot of the simulation trajectories of each body in the two swimmers. In previous work, this design has been analytically modeled by Golestanian and Ajdari [12], who predict the velocity of a swimmer (here called uGA , Table 2, third column) if the amplitude of oscillation of its two arms 23 uswim [10−6 ] uGA [10−6 ] Error Efficiency [10−4 ] (q) 2.02 2.45 < 18% 0.88 (a) 9.05 8.98 < 1% 10.44 Design Table 2: Comparison of swimming velocities from the simulations (uswim ) and from the prediction of Golestanian and Ajdari (uGA ), in the case of spheres. All the quantities are given in terms of their values on the lattice. is known. Here, an arm is defined as the distance between the centers of two bodies connected by a spring. In their model, Golestanian and Ajdari assume that the deformation of each arm is given by li (t) = ¯li + di cos(ωt + ϕi ), i = 1, 2 (27) Here ¯li is the average length and li (t) the instantaneous length of arm i, and di , ω and ϕi are the amplitude, the frequency and the phase shift of the oscillation of arm i. Under these conditions, the formula for the average velocity of a three-sphere swimmer is uGA = K d1 d2 ω sin(ϕ1 − ϕ2 ) where K is a geometrical factor given by   1 1 1 3r1 r2 r3 + − . K= 2(r1 + r2 + r3 )2 ¯l12 ¯l22 (¯l1 + ¯l2 )2 (28) (29) Here, r1 , r2 and r3 are the radii of the three spheres. It is also assumed that ri  ¯lj and di  ¯lj , for all i and j. Since this model assumes a velocity protocol in contrast to our force protocol (i.e., we start off with known forces which are applied on the bodies whereas the model of Golestanian and Ajdari assumes known deformations of the arms, regardless of the forces that cause them), we first extract {di } and {ϕi } from the simulation trajectories (Table 3), and use them with the known values of {¯li }, {ri } and ω to find uGA from equation (28). To extract {di } and {ϕi }, we fit the armlength trajectories for the last complete period of motion (from t = 4T to t = 5T ) with equation (27). We define the error in uswim , when compared with the theoreticallyexpected uGA value, as Error = uGA − uswim × 100. uGA 24 (30) sphere 3 130 125 large three-sphere swimmer small three-sphere swimmer 120 115 sphere 1 z-position 110 105 100 95 90 sphere 2 85 80 75 70 0 2.5 5.0 7.5 10.0 12.5 Time step [10 4 s] 15.0 t1 t2 17.5 t3 20.0 Figure 12: Trajectories of each sphere in the two three-sphere swimmers. The dashed curves and the solid curves show the trajectories of the spheres in the large and the small swimmer, respectively. The simulation is run for 196812 time steps, while the driving force on the left body is switched off at t1 = 140580 time steps, and on the right and hence also on the middle body at t2 = 147609 time steps. The springs obtain their starting configuration at t3 ≈ 179000 time steps. For the swimmer with large spheres, this error comes out to be 18%. This is possibly explained by the effect of the boundaries of the simulation box on the spheres of the larger swimmer. The theoretical result assumes infinite fluid, whereas the simulations are conducted in a finite box of the dimensions stated above. Another possible reason for the disagreement in the two velocities for the large-spheres swimmer is that the condition ri  ¯lj is not satisfied very well. For the swimmer with small spheres, the effect of the finiteness of the swimming domain is smaller, and the ri  ¯lj condition is also satisfied to a greater extent. Consequently, we find that in this case there is excellent agreement between uGA and uswim , to an error of less than 1% (Table 2). We also observe that for the swimmer with small spheres, the amplitude of 25 K d1 d2 sin(ϕ1 − ϕ2 ) (q) 0.0040 1.59 2.07 0.83 (a) 0.0045 2.53 3.80 0.94 Design Table 3: Parameters for the three-sphere swimmers. ω equals 0.00022. All the quantities are given in terms of their values on the lattice. oscillation of each arm is larger than that of the corresponding arm for the larger swimmer (Table 3, third column)), and that for each swimmer, the amplitude of oscillation of the leading arm (d2 ) is greater than that of the trailing arm (d1 ). Table 2 also shows the swimming efficiency of the two swimmers, as defined by Lighthill [23], Efficiency = 1 T 6 π η reff u2swim . R 5T P Bi ~ (t) · ~uBi (t) dt F dri i 4T (31) Here reff is an effective hydrodynamic radius of the swimmer, and is approximated by the sum of the radii of the three spheres [1]. ~uBi (t) is found from the simulation curves, using the last full swimming cycle (i.e., from t = 4T to t = 5T ). The integration is also done over this period, in order to work with the steady-state values. Table 2 shows that the efficiency of the swimmer with small spheres is greater, as expected due to its significantly greater swimming velocity. 5.3.2. Swimmers with capsules The rest of the swimmers contain capsules, and can be separated into three distinct families. The first family consists of the swimmers labeled (b)(f) in Table 1. These contain capsules which are parallel to the swimming direction (henceforth referred to as parallel capsules), and have springs of a rest length of 8 lattice cells. The second family consists of the swimmers labeled (g)-(k) in Table 1. These contain capsules which are perpendicular to the swimming direction (henceforth referred to as perpendicular capsules), and have springs of a rest length of 8, 12 or 16 lattice cells. The third family consists of the swimmers labeled (l)-(p) in Table 1. These also contain perpendicular capsules, and their springs all have a rest length of 8, making these swimmers shorter than the swimmers in the second family. 26 uswim [10−6 ] uGA [10−6 ] Error Efficiency [10−4 ] (f) 4.78 4.50 < 7% 3.69 (e) 5.68 5.48 < 4% 5.31 (c) 6.66 6.31 < 6% 5.86 (d) 7.11 7.16 < 1% 7.37 (b) 7.32 7.21 < 2% 7.77 Design Table 4: Comparison of swimming velocities from the simulations (uswim ) and from the prediction of Golestanian and Ajdari (uGA ), in the case of the swimmers with parallel capsules. All the quantities are given in terms of their values on the lattice. Tables 4, 5 and 6 (second column) show the measured uswim for the swimmers with parallel capsules, with perpendicular capsules and longer springs, and with perpendicular capsules and shorter springs, respectively. In all the three tables, the swimmers are arranged in the increasing order of uswim , from top-to-bottom. It can be observed that corresponding designs in each family occupy the same position in their respective tables. Here, two designs are said to be corresponding if one needs to replace the same spheres in a three-sphere swimmer to get both the designs, albeit by different kinds of capsules (and, possibly, with springs of different lengths). One also observes that the speed of swimming decreases with an increase in the number of capsules. This can be attributed to the fact that the small spheres have greater amplitudes of oscillation than the capsules, which means that the lengths of arms which contain spheres have greater amplitudes of oscillation than those that do not. A greater amplitude of oscillation of the arms results in a higher swimming velocity. The simulation trajectories of all swimmers with capsules show that irrespective of the number of capsules in the swimmer, each body exhibits a smooth sinusoidal movement in the steady state, and one may attempt to use the formula of Golestanian and Ajdari (equation (28)) for the analysis of the swimming motion. While this formula was developed assuming the bodies to be spherical, one may hypothesize that small deviations from the spherical shapes of the bodies will mostly affect the geometrical pre-factor K 27 uswim [10−6 ] uGA [10−6 ] Error Efficiency [10−4 ] (k) 3.69 3.95 < 7% 2.12 (j) 4.21 4.66 < 10% 3.08 (h) 5.71 6.50 < 13% 4.24 (i) 6.23 6.75 < 8% 5.74 (g) 6.40 6.82 < 7% 5.97 Design Table 5: Comparison of swimming velocities from the simulations (uswim ) and from the prediction of Golestanian and Ajdari (uGA ), in the case of the second family of the swimmers with capsules. All the quantities are given in terms of their values on the lattice. uswim [10−6 ] uGA [10−6 ] Error Efficiency [10−4 ] (p) 4.90 6.70 < 27% 3.63 (o) 5.05 6.63 < 24% 4.08 (m) 6.30 8.96 < 30% 4.76 (n) 6.44 7.74 < 17% 5.93 (l) 6.75 7.66 < 12% 6.47 Design Table 6: Comparison of swimming velocities from the simulations (uswim ) and from the prediction of Golestanian and Ajdari (uGA ), in the case of the third family of the swimmers with capsules. All the quantities are given in terms of their values on the lattice. 28 in equation (28) and not the general expression. We test this hypothesis by extracting the amplitudes of the body oscillations and their phase shifts by fitting the trajectories with equation (27). The geometric factor is obtained by approximating each capsule by a sphere of diameter 12, as that is the arithmetic mean of the dimensions of each capsule in the direction of movement and in a direction perpendicular to it. The mean armlengths are the same as in the original swimmers. For ease of reference, the values of all of these parameters are given in the appendix (tables A.7, A.8 and A.9). These tables show that as in the case of the three-sphere swimmers, the amplitude of oscillation of the leading arm (d2 in the tables) is larger than that of the trailing arm (d1 in the tables), for each swimmer. The second and the third columns of the Tables 4, 5 and 6 show the estimated uGA and the error in the measured uswim relative to uGA for each of the three families. It is interesting to note that the uGA approximation is still in good agreement with the results of the simulations. Especially in the first two families the error is about 10% or less. For the third family, i.e. for the swimmers with perpendicular capsules and shorter springs, the errors increase, to between 10% and 30%, probably because our approximation causes the spring lengths to become smaller than or equal to the sphere radii. Therefore the conditions necessary for the validity of Golestanian and Ajdari’s formula are compromised. This is similar to the case of the threesphere swimmer with large spheres, where the calculated and the observed velocities of the swimmer also disagreed due to the ri  ¯lj condition not being satisfied well. The tables also show the efficiencies, as defined in equation (31), of the swimmers in each family. Here, the hydrodynamic radius A has been calculated by assuming, as before, that each capsule is replaced by a sphere of diameter 12. The results show that in each family, the order of the efficiencies accords with the order of uswim . This is as expected, since the driving forces for each swimmer in all our simulations are exactly the same, and so a more efficient swimmer would be expected to move faster than a less efficient one. While this comparison has provided some useful insights, in order to fully understand our simulation results, the theory of Golestanian and Ajdari should be expanded to account for capsules, a task that we hope to undertake in the future. 29 6. Conclusions and Future Work In this work we have demonstrated the successful integration of selfpropelled micro-devices into the coupled pe-waLBerla framework. Furthermore, we have shown the validity of this approach by comparing the results of simulations to analytical models. We have taken advantage of the flexibility of our framework to simulate symmetric and asymmetric swimmers combining capsule and sphere geometries, which has not been possible so far. The establishment of this framework is especially important for the study of systems that are inaccessible via experimental and analytical methods. In the future, we aim to harness its capabilities to address issues such as the problem of the three-body swimmer in regimes beyond those dictated by the approximations of Felderhof [11] and Golestanian and Ajdari [12]. Another interesting application would be to study the behavior of the swimmer in a narrow channel and explore the role of the boundary conditions at the wall. It would also be interesting to investigate the hydrodynamic interactions amongst many swimmers swimming together [13, 19]. In Figure 13 we show the flow fields averaged over five cycles for the case of a single swimmer and also for three swimmers swimming together. The simulation of the three swimmers took 60.28 hours of total CPU-time on a single Intel Core i5-680 3.60GHz. To exclude the effects of the walls of the channel, one needs to set up even larger flow fields around the swimmers in this case than in the case of a single swimmer. Moreover, our work indicates that a steady state is reached after a significantly longer time in the case of many swimmers swimming together compared to the case of a single swimmer. These factors suggest that in the current setting, the accurate simulation of many swimmers would take very long. To reduce this simulation time significantly, the large domains of simulation should be processed in a more efficient way by parallelizing the framework. Both waLBerla and pe already feature massively parallel simulation algorithms for large scale particulate flow scenarios [15], but the parallelization of the force generators (i.e. springs) and velocity constraints is yet to be implemented. Once this is achieved, massive simulations with a large number of swimmers will be accessible, allowing us, finally, to address the problem of swarming. Acknowledgements The work was supported by the Kompetenznetzwerk für Technisch-Wissenschaftliches Hoch- und Höchstleistungsrechnen in Bayern (konwihr) un30 (a) (b) Figure 13: Flow field of one and three three-sphere swimming devices, averaged over five swimming cycles. We used the same parameters for the simulation setup as in Section 5.1, except for the channel, which now is (x × y × z) = (164 × 164 × 240) lattice cells. 31 der project waLBerlaMC and the Bundesministerium für Bildung und Forschung under the SKALB project no. 01IH08003A. Moreover, the authors gratefully acknowledge the support of the Cluster of Excellence ’Engineering of Advanced Materials’ at the University of Erlangen-Nuremberg, which is funded by the German Research Foundation (DFG) within the framework of its ’Excellence Initiative’. 32 K d1 d2 sin(ϕ1 − ϕ2 ) (f) 0.0030 2.24 3.39 0.89 (e) 0.0037 2.21 3.63 0.84 (c) 0.0032 2.59 3.59 0.96 (d) 0.0041 2.47 3.65 0.87 (b) 0.0041 2.26 3.79 0.92 Design Table A.7: The different parameters for the swimmers with parallel capsules. ω equals 0.00022. All the quantities are given in terms of their values on the lattice. Appendix A. Values of different parameters of the swimmers with capsules Here we present the values of the different parameters of the swimmers with capsules, found from the simulation curves and used in equation (28). 33 K d1 d2 sin(ϕ1 − ϕ2 ) (k) 0.0030 2.14 3.26 0.85 (j) 0.0037 2.11 3.62 0.75 (h) 0.0032 2.66 3.57 0.97 (i) 0.0041 2.43 3.65 0.84 (g) 0.0041 2.17 3.80 0.91 Design Table A.8: The different parameters for the swimmers with perpendicular capsules and long springs. ω equals 0.00022. All the quantities are given in terms of their values on the lattice. K d1 d2 sin(ϕ1 − ϕ2 ) (p) 0.0068 1.92 2.59 0.90 (o) 0.0058 2.07 3.33 0.76 (m) 0.0050 2.56 3.24 0.98 (n) 0.0050 2.54 3.39 0.81 (l) 0.0050 2.00 3.75 0.92 Design Table A.9: The different parameters for the swimmers with perpendicular capsules and short springs. ω equals 0.00022. All the quantities are given in terms of their values on the lattice. 34 References [1] F. Alouges, A. DeSimone, A. Lefebvre, Optimal strokes for axisymmetric microswimmers, The European Physical Journal E: Soft Matter and Biological Physics 28 (2009) 279–284. [2] M. Anitescu, F.A. Potra, Formulating dynamic multi-rigid-body contact problems with friction as solvable linear complementarity problems, Nonlinear Dynamics 14 (1997) 231–247. [3] P.L. Bhatnagar, E.P. Gross, M. Krook, A model for collision processes in gases. I. Small amplitude processes in charged and neutral onecomponent systems, Physical Review 94 (1954) 511–525. [4] C. Binder, C. Feichtinger, H. Schmid, N. Thürey, W. Peukert, U. Rüde, Simulation of the hydrodynamic drag of aggregated particles, Journal of Colloid and Interface Science 301 (2006) 155–167. [5] S.T. Chang, V.N. Paunov, D.N. Petsev, O.D. Velev, Remotely powered self-propelling particles and micropumps based on miniature diodes, Nature Materials 6 (2007) 235–240. [6] S. Chen, G.D. Doolen, Lattice Boltzmann method for fluid flows, Annual Review of Fluid Mechanics 30 (1998) 329–364. [7] P.A. Cundall, O.D.L. Strack, A discrete numerical model for granular assemblies, Geotechnique 29 (1979) 47–65. [8] R. Dreyfus, J. Baudry, M. Roper, M. Fermigier, H.A. Stone, J. Bibette, Microscopic artificial swimmers, Nature 437 (2005) 862–865. [9] D.J. Earl, C.M. Pooley, J.F. Ryder, I. Bredberg, J.M. Yeomans, Modeling microscopic swimmers at low Reynolds number, Journal of Chemical Physics 126 (2007) 064703. [10] C. Feichtinger, S. Donath, H. Köstler, J. Götz, U. Rüde, WaLBerla: HPC software design for computational engineering simulations, Journal of Computational Science In Press, Corrected Proof (2011). [11] B.U. Felderhof, The swimming of animalcules, Physics of Fluids 18 (2006) 063101. 35 [12] R. Golestanian, A. Ajdari, Analytic results for the three-sphere swimmer at low Reynolds number, Physical Review E 77 (2008) 036308. [13] R. Golestanian, J. Yeomans, N. Uchida, Hydrodynamic synchronization at low Reynolds number, Soft Matter 7 (2011) 3074–3082. [14] J. Götz, K. Iglberger, C. Feichtinger, S. Donath, U. Rüde, Coupling multibody dynamics and computational fluid dynamics on 8192 processor cores, Parallel Computing 36 (2010) 142–141. [15] J. Götz, K. Iglberger, M. Stürmer, U. Rüde, Direct numerical simulation of particulate flows on 294912 processor cores, in: 2010 ACM/IEEE International Conference for High Performance Computing, Networking, Storage and Analysis, IEEE, pp. 1–11. [16] K. Iglberger, Software Design of a Massively Parallel Rigid Body Framework, Ph.D. thesis, 2010. [17] K. Iglberger, U. Rüde, Massively parallel granular flow simulations with non-spherical particles, Computer Science - Research and Development 25 (2010) 105–113. [18] K. Iglberger, N. Thürey, U. Rüde, Simulation of moving particles in 3D with the lattice Boltzmann method, Computers & Mathematics with Applications 55 (2008) 1461–1468. [19] A. Kanevsky, M.J. Shelley, A.K. Tornberg, Modeling simple locomotors in Stokes flow, Journal of Computational Physics 229 (2010) 958–977. [20] C. Körner, T. Pohl, U. Rüde, N. Thürey, T. Zeiser, Parallel lattice Boltzmann methods for CFD applications, in: A. Bruaset, A. Tveito (Eds.), Numerical Solution of Partial Differential Equations on Parallel Computers, volume 51 of Lecture Notes for Computational Science and Engineering, Springer Verlag, 2005, pp. 439–465. [21] G. Kosa, M. Shoham, M. Zaaroor, Propulsion method for swimming microrobots, Robotics, IEEE Transactions on 23 (2007) 137 –150. [22] E. Lauga, T.R. Powers, The hydrodynamics of swimming microorganisms, Reports on Progress in Physics 72 (2009) 096601. 36 [23] M.J. Lighthill, On the squirming motion of nearly spherical deformable bodies through liquids at very small Reynolds numbers, Communications on Pure and Applied Mathematics 5 (1952) 109–118. [24] E. Lorenz, A. Caiazzo, A.G. Hoekstra, Corrected momentum exchange method for lattice Boltzmann simulations of suspension flow, Physical Review E 79 (2009) 036705. [25] R. Mei, L.S. Luo, P. Lallemand, D. d’Humières, Consistent initial conditions for lattice Boltzmann simulations, Computers & Fluids 35 (2006) 855 – 862. Proceedings of the First International Conference for Mesoscopic Methods in Engineering and Science. [26] R. Mei, W. Shyy, D. Yu, L.S. Luo, Lattice Boltzmann method for 3D flows with curved boundary, Journal of Computational Physics 161 (2002) 680–699. [27] A. Najafi, R. Golestanian, Simple swimmer at low Reynolds number: Three linked spheres, Physical Review E 69 (2004) 062901. [28] K. Pickl, Rigid Body Dynamics: Links and Joints, Master’s thesis, Computer Science Department 10 (System Simulation), University of Erlangen-Nürnberg, 2009. [29] K. Pickl, J. Pande, J. Götz, K. Iglberger, U. Rüde, K. Mecke, A. Smith, The effect of shape on the efficiency of self-propelled swimmers, submitted to Physical Review Letters (2011). [30] T. Pohl, M. Kowarschik, J. Wilke, K. Iglberger, U. Rüde, Optimization and profiling of the cache performance of parallel lattice Boltzmann codes, Parallel Processing Letters 13 (2003) 549–560. [31] C.M. Pooley, J.M. Yeomans, Lattice Boltzmann simulation techniques for simulating microscopic swimmers, Computer Physics Communications 179 (2008) 159 – 164. [32] E.M. Purcell, Life at low Reynolds number, American Journal of Physics 45 (1977) 3–11. [33] V. Putz, J.M. Yeomans, Hydrodynamic synchronisation of model microswimmers, Journal of Statistical Physics 137 (2009) 1001–1013. 37 [34] Y.H. Qian, D. d’Humières, P. Lallemand, Lattice BGK models for Navier-Stokes equation, Europhysics Letters (EPL) 17 (1992) 479–484. [35] S. Succi, The Lattice Boltzmann Equation - For Fluid Dynamics and Beyond, Clarendon Press, 2001. [36] G. Taylor, Analysis of the swimming of microscopic organisms, Proceedings of the Royal Society of London. Series A. Mathematical and Physical Sciences 209 (1951) 447–461. [37] G. Wellein, T. Zeiser, S. Donath, G. Hager, On the single processor performance of simple lattice Boltzmann kernels, Computer & Fluids 35 (2005) 910–919. [38] Y.Z. Yang, V. Marceau, G. Gompper, Swarm behavior of self-propelled rods and swimming flagella, Physical Review E 82 (2010) 031904. [39] D. Yu, R. Mei, L.S. Luo, W. Shyy, Viscous flow computations with the method of lattice Boltzmann equation, Progress in Aerospace Sciences 39 (2003) 329–367. 38
5cs.CE
Sample-Optimal Identity Testing with High Probability arXiv:1708.02728v1 [cs.DS] 9 Aug 2017 Ilias Diakonikolas∗ CS, USC [email protected] Themis Gouleakis† CSAIL, MIT [email protected] John Peebles‡ CSAIL, MIT [email protected] Eric Price CS, UT Austin [email protected] August 10, 2017 Abstract We study the problem of testing identity against a given distribution (a.k.a. goodness-of-fit) with a focus on the high confidence regime. More precisely, given samples from an unknown distribution p over n elements, an explicitly given distribution q, and parameters 0 < ε, δ < 1, we wish to distinguish, with probability at least 1 − δ, whether the distributions are identical versus ε-far in total variation (or statistical) distance. Existing work has focused on the constant confidence regime, √ i.e., the case that δ = Ω(1), for which the sample complexity of identity testing is known to be Θ( n/ε2 ). Typical applications of distribution property testing require small values of the confidence parameter δ (which correspond to small “p-values” in the statistical hypothesis testing terminology). Prior work achieved arbitrarily small values of δ via black-box amplification, which multiplies the required number of samples by Θ(log(1/δ)). We show that this upper bound is suboptimal for any δ = o(1), and give a new identity tester that achieves the optimal sample complexity. Our new upper and lower bounds show that the optimal sample complexity of identity testing is    1 p Θ 2 n log(1/δ) + log(1/δ) ε for any n, ε, and δ. For the special case of uniformity testing, where the given distribution is the uniform distribution Un over the domain, our new tester is surprisingly simple: to test whether p = Un versus dTV (p, Un ) ≥ ε, we simply threshold dTV (b p, Un ), where pb is the empirical probability distribution. We believe that our novel analysis techniques may be useful for other distribution testing problems as well. ∗ Supported by NSF Award CCF-1652862 (CAREER) and a Sloan Research Fellowship. Supported by the NSF under Grant No. 1420692. ‡ Supported by the NSF Graduate Research Fellowship under Grant No. 1122374, and by the NSF under Grant No. 1065125. † 1 Introduction 1.1 Background Distribution property testing [GR00, BFR+ 00, BFR+ 13] studies the following family of problems: given sample access to one or more unknown distributions, determine whether they satisfy some global property or are “far” from satisfying the property. This broad inference task originates from the field of statistics and has been extensively studied in hypothesis testing [NP33, LR05] with somewhat different formalism. In this work, we study the following standard formalization of this statistical task: T (P, n, ε, δ): Given a family of distributions P with domain D of size n, parameters 0 < ε, δ < 1, and sample access to an unknown distribution p over the same domain, we want to distinguish with probability at least 1 − δ between the following cases: • Completeness: p ∈ P. • Soundness: dTV (p, P) ≥ ε. We call this the problem of (ε, δ)-testing property P. We denote by dTV (p, q) the total variation distance or statistical distance between distributions p and q, i.e., def dTV (p, q) = (1/2) · kp − qk1 . Similarly, we denote by dTV (p, P) the minimum total variation distance between p and any q ∈ P. The goal is to characterize the sample complexity of the problem T (P, n, ε, δ), i.e., the number of samples that are necessary and sufficient to correctly distinguish between the completeness and soundness cases with high probability. During the past two decades the above general problem has received significant attention within the computer science community, where the emphasis has been on pinning down the sample complexity of testing in the constant probability of success regime – i.e., the setting where δ = Ω(1). See [GR00, BFR+00, BFF+ 01, Bat01, BDKR02, BKR04, Pan08, Val11, DDS+ 13, ADJ+ 11, LRR11, ILR12, CDVV14, VV14, DKN15b, DKN15a, CDGR16, DKN17, CDKS17, CDS17] for a sample of works, and [Rub12, Can15] for two surveys. The constant confidence regime is fairly well understood: for a range of fundamental properties we now have sample-optimal testers (and matching information-theoretic lower bounds) [Pan08, CDVV14, VV14, DKN15b, DKN15a, ADK15, DK16, DGPP16]. In sharp contrast, as we explain below, the high confidence regime – i.e., the case that δ = o(1) – is poorly understood even for the most basic properties. Since testing is a decision problem, any algorithm that succeeds with probability 2/3 can be used along with standard “BPP amplification” to boost the success probability to any desired accuracy. Specifically, if S(n, ε) is a sample complexity upper bound for T (P, n, ε, 1/3), this black-box method implies that S(n, ε) · Θ(log(1/δ)) is a sample complexity upper bound for T (P, n, ε, δ). For essentially all distribution properties studied in the literature, the standard amplification method is the only known way to achieve high confidence probability. This discussion naturally leads us to the following questions: For a given distribution property P, does black-box amplification give sample-optimal testers for T (P, n, ε, δ)? Specifically, is the Θ(log(1/δ)) multiplicative increase in the sample size the best possible? If not, can we design testers whose sample complexity is information-theoretically optimal, as a function of all parameters, i.e., n, ε, and δ? We believe that this is a fundamental question that merits theoretical investigation in its own right. In most settings, the sample size m is known a priori, i.e., we are presented with a sample of size m and we are not able to draw more samples from the distribution. In such cases, we are interested in characterizing the optimal tradeoff curve between the proximity parameter ε and the error probability δ. Previous work in distribution testing characterized the very special case of this tradeoff corresponding to δ = Ω(1). We note here that the analogous question in the context of distribution learning has been intensely studied in statistics and probability theory (see, e.g., [vdVW96, DL01]) and tight bounds are known in a range of settings. 1 Moreover, understanding the regime of “small δ” is of critical practical importance in applications of hypothesis testing (e.g., in biology), as it corresponds to bounding the probabilities of Type I and Type II errors. Perhaps surprisingly, with one exception [HM13], this basic problem has not been previously investigated in the finite sample regime. A conceptual contribution of this work is to raise this problem as a fundamental goal in distribution property testing. 1.2 Our Results In this paper, we characterize the aforementioned tradeoff for the problem of identity testing (a.k.a. goodness of fit). Identity testing corresponds to the property P = {q}, where q is an explicitly given distribution on a domain of size n. The important special case that q is the uniform distribution over the domain is referred to as uniformity testing. Identity testing is arguably the most fundamental distribution testing problem. For this problem, we show that the black-box amplification is suboptimal for any δ = o(1), and give a new identity tester that achieves the optimal sample complexity. Specifically, we prove the following theorem: Theorem 1 (Main Result). There exists a computationally efficient (ε, δ)-identity tester for distributions of support size n with sample complexity    1 p n log(1/δ) + log(1/δ) . (1) Θ 2 ε Moreover, this sample size is information-theoretically optimal, up to a constant factor, for all n, ε, δ. √ Since the sample complexity of identity testing is Θ( n/ε2 ) for δ = 1/3 [VV14, DKN15b], standard √ amplification gives a sample upper bound of Θ( n log(1/δ)/ε2 ) for this problem. It is not hard to observe that this bound cannot be optimal for all values of δ. For example, in the extreme case that δ = 2−Θ(n) , this gives a sample complexity of Θ(n3/2 /ε2 ). On the other hand, for such values of δ, we can learn the underlying distribution (and therefore test for identity) with O(n/ε2 ) samples1 . The case where 1 ≫ δ ≫ 2−Θ(n) is more subtle, and it is not a priori clear how to improve upon naive √ amplification. Theorem 1 provides a smooth transition between the extremes of Θ( n/ε2 ) for constant δ and Θ(n/ε2 ) for δ = 2−Θ(n) . It thus provides a quadratic improvement in the dependence on δ over the naive bound for all δ ≥ 2−Θ(n) , and shows that this is the best possible. For δ < 2−Θ(n) , it turns out that the additive Θ(log(1/δ)/ε2 ) term is necessary, as outlined in Section 1.4, so learning the distribution is optimal. Our main technical contribution here is to obtain the first sample-optimal uniformity tester for the high confidence regime. Our sample-optimal identity tester follows from our uniformity tester by applying the recent result of Goldreich [Gol16], which provides a black-box reduction of identity to uniformity. We also show a matching information-theoretic lower bound on the sample complexity. The sample-optimal uniformity tester we introduce is remarkably simple: to distinguish between the cases that p is the uniform distribution Un over n elements versus dTV (p, Un ) ≥ ε, we simply compute dTV (b p, Un ) for the empirical distribution pb. The tester accepts that p = Un if the value of this statistic is below some well-chosen threshold, and rejects otherwise. It should be noted that such a tester was not previously known to work with sub-learning sample complexity, even in the constant confidence regime. Surprisingly, in a literature with several different uniformity testers [GR00, Pan08, VV14, DKN15b], no one previously proposed using the empirical total variation distance. In fact, it would be natural to assume – as was suggested in [BFR+ 00, BFR+13] – that such a tester cannot possibly work. A likely reason for this is the following observation: When the sample size m is smaller than the domain size n, the empirical total variation distance is very far from the true distance to uniformity. This suggests that the empirical distance statistic gives little, if any, information in this setting. 1 This follows from the fact that, for any distribution p over n elements, the empirical probability distribution pbm obtained after m = Ω((n + log(1/δ))/ε2 ) samples drawn from p is ε-close to p in total variation distance with probability at least 1 − δ. 2 We show in this paper that, in contrast to the above intuition, the natural “plug-in” estimator relying on the empirical distance from uniformity actually works for the following reason: the empirical distance from uniformity is noticeably smaller for the uniform distribution than for “far from uniform” distributions, even with a sub-linear sample size. Moreover, we obtain the stronger statement that the “plug-in” estimator is a sample-optimal uniformity tester for all parameters n, ε and δ. 1.3 Discussion and Prior Work Uniformity testing is the first and one of the most well-studied problems in distribution testing [GR00, Pan08, VV14, DKN15b, DGPP16]. As already mentioned, the literature has almost exclusively focused on the case of constant error probability δ. The first uniformity tester, introduced by Goldreich and Ron [GR00], √ counts the number of collisions among the samples and was shown to work with O( n/ε4 ) samples [GR00]. A related tester proposed by Paninski [Pan08], which relies on the number of distinct elements in the set √ of samples, was shown to have the optimal m = Θ( n/ε2 ) sample complexity, as long as m = o(n). √ Recently, a χ2 -based tester was shown in [VV14, DKN15b] to achieve the optimal Θ( n/ε2 ) sample complexity without any restrictions. Finally, the original collision-based tester of [GR00] was very recently √ shown to also achieve the optimal Θ( n/ε2 ) sample complexity [DGPP16]. Thus, the situation for constant values of δ is well understood. Uniformity is, to our knowledge, the only property for which the high-probability regime has previously been considered. In [HM13], itp was shown that the distinct-elements tester of [Pan08] achieves the optimal sample complexity of m = Θ( n log(1/δ)/ε2 ) , as long as m = o(n). We emphasize that for m = Ω(n), as is the case in many practically relevant settings (see, e.g., the Polish lottery example in [Rub14]), the tester of [Pan08] is known to fail completely even in the constant confidence regime (also see next paragraph). It is important to note that all previously considered uniformity testers [GR00, Pan08, VV14, DKN15b] do not achieve the optimal sample complexity (as a function of all parameters, including δ), and this is inherent, i.e., not just a failure of previous analyses. Roughly speaking, since the collision statistic [GR00] and the χ2 -based statistic [VV14, DKN15b] are not Lipschitz, it can be shown that their high-probability performance is poor. Specifically, in the completeness case (p = Un ), if many samples happen to land in the same bucket (domain element), these test statistics become quite large, leading to their suboptimal behavior for all δ = o(1). (For a formal justification, the reader is referred to Section V of [HM13]). On the other hand, the distinct-elements tester [Pan08] does not work well at all for m = ω(n). For example, if ε or δ are sufficiently small to necessitate m ≫ n log n, then typically all n domain elements will appear in both the completeness and soundness cases, hence the test statistic provides no information. Interestingly, our empirical total variation distance statistic can be seen to be closely related to the distinct-elements tester of [Pan08] for m ≪ n. In this regime, we show that the empirical total variation distance can be written as a linear function of the number of elements that are never sampled. In contrast, the distinct-elements statistic of [Pan08] is the number of elements seen exactly once. However, as we prove, our tester is in fact optimal in all parameter settings, whereas the distinct elements tester is not. The problem of identity testing against an arbitrary (explicitly given) distribution was studied in [BFF+ 01], who gave an (ε, 1/3)-tester with sample complexity Õ(n1/2 )/poly(ε). The tight bound of Θ(n1/2 /ε2 ) was first given in [VV14] using a chi-squared type tester (inspired by [CDVV14]). In subsequent work, a similar chi-squared tester that also achieves the same sample complexity bound was given in [ADK15]. (We note that the [VV14, ADK15] testers have sub-optimal sample complexity in the high confidence regime, even for the case of uniformity.) In a related work, [DKN15b] obtained a reduction of identity to uniformity that preserves the sample complexity, up to a constant factor, in the constant error probability regime. More recently, Goldreich [Gol16], building on [DK16], gave a different reduction of identity to uniformity that preserves the error probability. We use the latter reduction in this paper to obtain an optimal identity tester starting from our new optimal uniformity tester. 3 1.4 Our Techniques Upper Bound for Uniformity Testing We would like to show that the test statistic dTV (b p, Un ) is with high probability larger when dTV (b p, Un ) ≥ ε than when p = Un . We start by showing that among all possible alternative distributions p with dTV (p, Un ) ≥ ε, it suffices to consider those in a very simple family. We then show that the test statistic is highly concentrated around its expectation, and that the expectations are significantly different in the two cases. To simplify the structure of p, we show (Section 4) that if p “majorizes” another distribution q, then the test statistic dTV (b p, Un ) stochastically dominates dTV (b q , Un ). (In fact, this statement holds for any test statistic that is a convex symmetric function of the empirical histogram.) Therefore, for any p, if we average out the large and small entries of p, the test statistic becomes harder to distinguish from uniform. This lets us reduce to only considering p either Un or of the form 1±ε n in each coordinate. We remark that the aforementioned stochastic domination lemma may also be very useful in rigorous empirical comparisons of test statistics. A major difficulty in empirical studies of distribution testing is that the space of alternative hypotheses is large, and it is therefore impossible to experiment on all such distributions. Our structural lemma reduces the space dramatically for uniformity testing: for any convex symmetric test statistic (which includes all existing ones), the worst case distribution will have αn coordinates of value (1 + ε/α)/n, and the rest of value (1 − ε/(1 − α))/n, for some α. Hence, there are only n possible worstcase distributions for any ε. Notably, this reduction does not lose any absolute constants, so it could be used to identify the non-asymptotic optimal constants for a given set of parameters. Returning to our uniformity tester, we now need to separate the expectation of the test statistic in our two situations. We achieve this by providing an explicit expression for the Hessian of this expectation, as a function of p. We note that the Hessian is diagonal, and for our two situations of pi ≈ 1/n each entry is within constant factors of the same value, giving a lower bound on its eigenvalues. Since the expectation is minimized at p = Un , we use strong p convexity to show the desired expectation gap. Specifically, we prove 2 2 2 that this gap is ε · min(m /n , m/n, 1/ε). Finally, we need to show that the test statistic concentrates about its expectation. For m ≥ n, this follows from McDiarmid’s p inequality: since the test statistic is 1/m-Lipschitz in the m samples, with probability 1− δ it lies within log(1/δ)/m of its expectation. When m is larger than the desired sample complexity (1), this is less than the expectation gap above. The concentration is trickier when m < n, since the expectation gap is smaller, so we need to establish tighter concentration. We get this by using a Bernstein variant of McDiarmid’s inequality, which is stronger than the standard version of McDiarmid in this context. Upper Bound for Identity Testing In [Gol16], it was shown how to reduce ε-testing of an arbitrary distribution q over [n] to ε/3-testing of U6n . This reduction preserves the error probability δ, so applying it gives an identity tester with the same sample complexity as our uniformity tester, up to constant factors. Sample Complexity Lower Bound To match our upper bound (1), we need two lower bounds. The lower bound of Ω( ε12 log(1/δ)) is straightforward from the same lower bound as for distinguishing a fair coin from p 2 bound is more challenging. an ε-biased coin, while the n log(1/δ)/ε p For intuition, we start with a n log(1/δ) lower bound for constant ε. When p = Un , the chance that p 2 all m samples are distinct is at least (1 − m/n)m ≈ e−m /n . Hence, if m ≪ n log(1/δ), this would happen with probability significantly larger than 2δ. On the other hand, if p is uniform over a random subset of n/2 coordinates, the m samples will also all be distinct with probability (1 − 2m/n)m > 2δ. The two situations thus look the same with 2δ probability, so no tester could have accuracy 1 − δ. This intuition can easily be extended to include a 1/ε dependence, but getting the desired 1/ε2 dependence requires more work. First, we Poissonize the number of samples, so we independently see Poi(mpi ) 4 samples of each coordinate i; with exponentially high probability, this Poissonization only affects the sample complexity by constant factors. Then, in the alternative hypothesis, we set each pi independently at random to be 1±ε n . This has the unfortunate property that p no longer sums to 1, so it is a “pseudo-distribution” rather than an actual distribution. Still, it is exponentially likely to sum to Θ(1), and using techniques from [WY16, DK16] this is sufficient for our purposes. At this point, we are considering a situation where the number of times we see each coordinate is m either Poi(m/n) or 21 (Poi((1 − ε) m n ) + Poi((1 + ε) n )), and every coordinate is independent of the others. These two distributions have Hellinger distance at least ε2 m/n in each coordinate. Then the composition p property for Hellinger distance over n independent coordinates implies m ≥ n log(1/δ)/ε2 is necessary for success probability 1 − δ. 1.5 Notation and Basic Definitions We write [n] to denote the P set {1, . . . , n}. We consider discrete distributions over [n], which are functions p : [n] → [0, 1] such that ni=1 pi = 1. We use the notation pi to denote the probability of element i in P distribution p. For S ⊆ [n], we will denote p(S) = p i∈S i . We will also sometimes think of p as an n-dimensional vector. We will denote by Un the uniform distribution over [n]. For r ≥ 1, the ℓr –norm of a distribution is identified with the ℓr –norm of the corresponding vector, P i.e., kpkr = ( ni=1 |pi |r )1/r . The ℓr -distance between distributions p and q is defined as the the ℓr -norm of the vector of their difference. The total variation distance between distributions p and q is defined as def dTV (p, q) = maxS⊆[n] |p(S) − q(S)| = (1/2) · kp − qk1 . The Hellinger distance between p and q is qP √ √ √ √ √ 2 √ def n H(p, q) = (1/ 2) · k p − qk2 = (1/ 2) · i=1 ( pi − qi ) . We denote by Poi(λ) the Poisson distribution with parameter λ. 1.6 Structure of this Paper In Section 2, we formally describe and analyze our sample-optimal uniformity tester. In Section 3, we give our matching sample complexity lower bound. Finally, Section 4 establishes our stochastic domination result that is crucial for the analysis of the soundness in Section 2, and may be useful in the rigorous empirical evaluation of test statistics. 2 Sample-Optimal Uniformity Testing In this section, we describe and analyze our optimal uniformity tester. Given samples from an unknown distribution p over [n], our tester returns “YES” with probability 1 − δ if p = Un , and “NO” with probability 1 − δ if dTV (p, Un ) ≥ ε. 2.1 Our Test Statistic We define a very natural statistic that yields a uniformity tester with optimal dependence on the domain size n, the proximity parameter ε, and the error probability δ. Our statistic is a thresholded version of the empirical total variation distance between the unknown distribution p and the uniform distribution. Our tester T EST-U NIFORMITY is described in the following pseudocode: 5 Algorithm T EST-U NIFORMITY(p, n, ε, δ) Input: sample access to a distribution p over [n], ε > 0, and δ > 0. Output: “YES” if p = Un ; “NO” if dTV (p, Un ) ≥ ε.  p  1. Draw m = Θ (1/ε2 ) · n log(1/δ) + log(1/δ) iid samples from p. 2. Let X = (X1 , X2 , . . . , Xn ) ∈ Zn>0 be the histogram of the samples. That is, Xi is the number of times domain element i appears in the (multi-)set of samples. 3. Define the random variable S = 1 2 Pn i=1 Xi m − 1 n  2 m2  ε · p n2 t = µ(Un ) + C · ε2 · m n   ε and set the threshold for m ≤ n for n < m ≤ for εn2 ≤ m n ε2 , where C is a universal constant (derived from the analysis of the algorithm), and µ(Un ) is the expected value of the statistic in the completeness case. 4. If S ≥ t return “NO”; otherwise, return “YES”. The main part of this section is devoted to the analysis of T EST-U NIFORMITY, establishing the following theorem: Theorem 2. There exists a universal constant C > 0 such that the following holds: Given  p n log(1/δ) + log(1/δ) m ≥ C · (1/ε2 ) samples from an unknown distribution p, Algorithm T EST-U NIFORMITY is an (ε, δ) uniformity tester for p. As we point out in Appendix A, the value µ(Un ) can be computed efficiently, hence our overall tester is computationally efficient. To prove correctness of the above tester, we need to show that the expected value of the statistic in the completeness case is sufficiently separated from the expected value in the soundness case, and also that the value of the statistic is highly concentrated around its expectation in both cases. In Section 2.2, we bound from below the difference in the expectation of our statistic in the completeness and soundness cases. In Section 2.3, we prove the desired concentration which completes the proof of Theorem 2. 2.2 Bounding the Expectation Gap The expectation of the statistic in algorithm T EST-U NIFORMITY can be viewed as a function of the n def variables p1 , . . . , pn . Let µ(p) = E[S(X1 , . . . , Xn )] be the aforementioned function when the samples are drawn from distribution p. Our analysis has a number of complications for the following reason: the function µ(p) − µ(Un ) is a linear combination of sums that have no indefinite closed form, even if the distribution p assigns only two possible probabilities to the elements of the domain. This statement is made precise in Appendix B. As such, we should only hope to obtain an approximation of this quantity. A natural approach to try and obtain such an approximation would be to produce separate closed form approximations for µ(p) and µ(Un ), and combine these quantities to obtain an approximation for their 6 difference. However, one should not expect such an approach to work in our context. The reason is that the difference µ(p) − µ(Un ) can be much smaller than µ(p) and µ(Un ); it can even be arbitrarily small. As such, obtaining separate approximations of µ(p) and µ(Un ) to any fixed accuracy would contribute to much error to their difference. To overcome these difficulties, we introduce the following technique, which is novel in this context. We directly bound from below the difference µ(p) − µ(Un ) using strong convexity. Specifically, we show that the function µ is strongly convex with appropriate parameters and use this fact to bound the desired expectation gap. The main result of this section is the following lemma: Lemma 3. Let p be a distribution over [n] and ε = dTV (p, Un ). For all m ≥ 6 and n ≥ 2, we have that:  2 m2  for m ≤ n ε · p n2 m 2 µ(p) − µ(Un ) ≥ Θ(1) · ε · n for n < m ≤ εn2 .   ε for εn2 ≤ m We note that the bounds in the right hand side above are tight, up to constant factors. Any asymptotic improvement would yield a uniformity tester with sample complexity that violates our tight informationtheoretic lower bounds. The proof of Lemma 3 requires a number of intermediate lemmas. Our starting point is as follows: By the intermediate value theorem, we have the quadratic expansion 1 µ(p) = µ(Un ) + ∇µ(Un )⊺ (p − Un ) + (p − Un )⊺ Hp′ (p − Un ) , 2 where Hp′ is the Hessian matrix of the function µ at some point p′ which lies on the line segment between Un and p. This expression can be simplified as follows: First, we show (Fact 18) that our µ is minimized over all probability distributions on input Un . Thus, the gradient ∇µ(Un ) must be orthogonal to being a direction in the space of probability distributions. In other words, ∇µ(Un ) must be proportional to the all-ones vector. More formally, since µ is symmetric its gradient is a symmetric function, which implies it will be symmetric when given symmetric input. Moreover, (p − Un ) is a direction within the space of probability distributions, and therefore sums to 0, making it orthogonal to the all-ones vector. Thus, we have that ∇µ(Un )⊺ (p − Un ) = 0, and we obtain 1 1 1 µ(p) − µ(Un ) = (p − Un )⊺ Hp′ (p − Un ) ≥ kp − Un k22 · σ ≥ kp − Un k21 /n · σ , 2 2 2 (2) where σ denotes the minimum eigenvalue of the Hessian of µ on the line segment between Un and p. The majority of this section is devoted to proving a lower bound for σ. Before doing so, however, we must first address a technical consideration. Because we are considering a function over the space of probability distributions – which is not full-dimensional – the Hessian and gradient of µ with respect to Rn depend not only on the definition of our statistic  x also 1its parameterization. For the purposes of this Pn S, but subsection, we parameterize S as S(x) = i=1 max mi − n , 0 . In the analysis we are about to perform, it will be helpful to sometimes think of n1 as a free parameter. Thus, we define n 1 X St (x) , max{xi − t, 0} m i=1 and n m   1 XX m k p (1 − pi )m−k (k − t) . µt (p) , Ex∼Multinomial(m,p) [St (x)] = m k i i=1 k=t 7 (3) Note that when t = m/n we have St = S and µt = µ. Also note that when we compute the Hessian of µt (p), we are treating µt (p) as a function of p and not of t. In the following lemma, we derive an exact expression for the entries of the Hessian. This result is perhaps surprising in light of the likely nonexistence of a closed form expression for µ(p). That is, while the expectation µ(p) may have no closed form, we prove that the Hessian of µ(p) does in fact have a closed form. Lemma 4. The Hessian of µt (p) viewed as a function of p is a diagonal matrix whose ith diagonal entry is given by hii = st,i , where we define st,i as follows: Let ∆t be the distance of t from the next largest integer, i.e., ∆t , ⌈t⌉ − t. Then, we have that   for t = 0 0 m−2 t−1 m−t−1 . st,i = (m − 1) t−1 pi (1 − pi ) for t ∈ Z>0   ∆t · s⌊t⌋,i + (1 − ∆t) · s⌈t⌉,i for t ≥ 0 and t 6∈ Z In other words, we will derive the formula for integral t ≥ 1 and then prove that the value for nonintegral t ≥ 0 can be found by linearly interpolating between the closest integral values of t. Proof. Note that because St (x) is a separable function of x, µt (p) is a separable function of p, and hence the Hessian of µt (p) is a diagonal matrix. By Equation 3, the i-th diagonal entry of this Hessian can be written explicitly as the following expression: st,i m   d2 1 X m k ∂2 = 2 µt (p) = 2 p (1 − pi )m−k (k − t) . k i ∂pi dpi m k=t Notice that if we sum starting from k = 0 instead of k = t, then the sum equals the expectation of Bin(m, pi ) minus t. That is, notice that: m   d2 1 d2 1 X m k m−k (pi m − t) = 0 . p (1 − p ) (k − t) = i k i dp2i m dp2i m k=0 By this observation and the fact that the summand is 0 when k = t, we can switch which values of k we are summing over to k from 0 through t if we negate the expression: st,i = t   1 d2 X m k ∂2 µ (p) = p (1 − pi )m−k (t − k) . t ∂ 2 pi m dp2i k i k=0 We first prove the case when t ∈ Z+ . In this case, we view st,i as a sequence with respect to t (where i is fixed), which we denote st . We now derive a generating function for this sequence.2 Observe that derivatives that are not with respect to the formal variable commute with taking generating functions. Then, the generating function for the sequence {st } is !   d x dx (pi x + 1 − pi )m d (pi x + 1 − pi )m d2 1 x = (m − 1)(pi x + 1 − pi )m−2 x . − dx 1−x 1−x dp2i m 2 To avoid potential convergence issues, we view generating functions as formal polynomials from the ring of infinite formal polynomials. Under this formalism, there is no need to deal with convergence at all. 8 Note that the coefficient on x0 is 0, so s0,i = 0 as claimed. For t ∈ Z>0 , the right hand side is the generating function of   m − 2 t−1 (m − 1) p (1 − p)m−t−1 . t−1 Thus, this expression gives the i-th entry Hessian in the t ∈ Z≥0 , as claimed. Now consider the case when t is not an integer. In this case, we have: st,i m   d2 1 X m k , 2 p (1 − pi )m−k (k − t) k i dpi m k=⌈t⌉ m   d2 1 X m k = 2 p (1 − pi )m−k (k − ⌈t⌉ + ∆t) k i dpi m k=⌈t⌉ m   d2 1 X m k = s⌈t⌉,i + ∆t 2 p (1 − pi )m−k . k i dpi m k=⌈t⌉ ⌈t⌉−1   d2 1 X m k = s⌈t⌉,i − ∆t 2 p (1 − pi )m−k . k i dpi m k=0 The last equality is because if we change bounds on the sum so they are from 0 through m, we get 1 which has partial derivative 0. Thus, we can flip which terms we are summing over if we negate the expression. Note that this expression we are subtracting above can be alternatively written as: ⌈t⌉−1   d2 1 X m k p (1 − pi )m−k = ∆t · (s⌈t⌉ − s⌊t⌋ ) . ∆t 2 k i dpi m k=0 Thus, we have st,i = s⌈t⌉,i − ∆t · (s⌈t⌉,i − s⌊t⌋,i ) = ∆t · s⌊t⌋,i + (1 − ∆t) · s⌈t⌉,i , as desired. This completes the proof of Lemma 4. It will be convenient to simplify the exact expressions of Lemma 4 into something more manageable. This is done in the following lemma: Lemma 5. Fix any constant c > 0. The Hessian of µ(p), viewed as a function of p, is a diagonal matrix whose i-th diagonal entry is given by ( 2 m for m ≤ n hii = st:=m/n,i ≥ Θ(1) · √n , mn for n < m ≤ c · εn2 assuming pi = 1±ε n , m ≥ 6, n ≥ 2, and ε ≤ 1/2. Similarly, these bounds are tight up to constant factors, as further improvements would violate our sample complexity lower bounds. Proof. By Lemma 4, we have an exact expression st,i for the ith entry of the Hessian of µt (p). First, consider the case where m ≤ n. Then we have st,i = (1 − ∆t) · s⌈t⌉,i . 9 Substituting t = m/n, ⌈t⌉ = 1, and ∆t = ⌈t⌉ − t = 1 − m/n gives st,i = m m2 · (m − 1)(1 − pi )m−2 = Θ(1) · . n n Now consider the case where n < m ≤ Θ(1) · εn2 . Note that the case where n < m < 2n follows from (1) the fact that st,i for fractional t linearly interpolates between the value of st′ ,i the nearest two integral values of t′ and (2) the analyses of the cases where m ≤ n and 2n ≤ m ≤ Θ(1) εn2 . Thus, all we have left to do is prove the case where 2n ≤ m ≤ Θ(1) · εn2 . Since st,i is a convex combination of s⌈t⌉,i and s⌊t⌋,i , it suffices to bound from below these quantities for t = m/n. Both of these tasks can be accomplished simultaneously by bounding from below the quantity st=m/n+γ,i for arbitrary γ ∈ [−1, 1]. We do this as follows: Let t = m/n + γ. Note that Stirling’s approximation is tight up to constant factors as long as the number we are taking the factorial of is not zero. Note that m − 2 ≥ 1, t − 1 ≥ 1, and m − t − 1 ≥ m/2 − 2 ≥ 1. Thus, if we apply Stirling’s approximation to the factorials in the definition of the binomial coefficient and substitute t = m/n + γ, we obtain the following approximation, which is tight up to constant factors:   m − 2 t−1 (m − 1) pi (1 − pi )m−t−1 t−1 s m/n−1+γ (m − 2)m pi (1 − pi )m−m/n−1−γ (m − m/n − 1 − γ)(m/n − 1 + γ) · = Θ(1) · (m − 1) · (m − 2)3 (m − m/n − 1 − γ)m−m/n−γ (m/n + γ)m/n−1+γ r m/n−1+γ mm p i (1 − pi )m−m/n−1−γ m · = Θ(1) · n (m − m/n − 1 − γ)m−m/n−γ (m/n − 1 + γ)m/n+γ = Θ(1) · = Θ(1) · = Θ(1) · m/n+γ √ mm/n+γ pi (1 − pi )m−m/n−1−γ mn · 1 m−m/n−γ ) (m/n)m/n+γ (1 − n1 − m √ (npi )m/n+γ (1 − pi )m−m/n−1−γ mn · (1 − n1 )m−m/n−γ m−m/n−γ √ (1 ± ε)m/n+γ (1 − 1±ε n ) mn · (1 − n1 )m−m/n−γ m−m/n √ (1 ± ε)m/n (1 − 1±ε n ) mn · (1 − n1 )m−m/n  m−m/n √ ε m/n 1∓ = Θ(1) · mn · (1 ± ε) n−1 m √ − m m/n (1 ∓ ε) n−1 n(n−1) ≥ Θ(1) · mn · (1 ± ε) √ = Θ(1) · mn · (1 ± ε)m/n (1 ∓ ε)m/n √ = Θ(1) · mn · (1 − ε2 )m/n √ 2 = Θ(1) · mn · e−Θ(1)·ε m/n √ ≥ Θ(1) · mn . = Θ(1) · This completes the proof of Lemma 5. We are now ready to prove the desired expectation gap. 10 Proof of Lemma 3: We start by reducing the soundness case to a much simpler setting. To do this, we use the following fact, established in Section 4: Fact 6. For any distribution p on [n], there exists a distribution p′ supported on [n] whose probability mass ′ 1 1−ε′ 1 ′ values are in the set { 1+ε n , n , n } for some ε ≥ dTV (p, Un )/2, with at most one element having mass n , and such that µ(p′ ) ≤ µ(p). Fact 6 is proven in Section 4. By Fact 6, there is a distribution p′ that satisfies the conditions of Lemma 5, has total variation distance Θ(ε) to the uniform distribution, and µ(p′ ) ≤ µ(p). Therefore, it suffices to prove a lower bound on the expectation gap between the completeness and soundness cases for distributions p of this form. Note that all probability distributions on the line from p to Un are also of this form for different (no larger) values of ε. Thus, Lemma 5 gives a lower bound on the diagonal entries of the Hessian at all points on this line. Since the Hessian is diagonal, this also bounds from below the minimum eigenvalue of the Hessian on this line. Therefore, by this and Equation (2), we obtain the first two cases of this lemma, as well as the third case for εn2 ≤ m ≤ 4 · εn2 . The final case of this lemma for 4 · εn2 ≤ m follows immediately from the folklore fact that if one takes at least this many samples, the empirical distribution approximates the true distribution with expected ℓ1 error at most ε/2. For completeness, we give a proof. We have X Xp Var[Xi /m − pi ] E[kX/m − pk1 ] = E[|Xi /m − pi |] ≤ i ≤ = Xp i mpi /m2 i p n/m ≤ ε/2 , ≤ Xp m(1/n)/m2 (4) i where Equation (4) follows from the fact that the sum is a symmetric concave function of p, so it is maximized by setting all the pi ’s to be equal. 2.3 Concentration of Test Statistic: Proof of Theorem 2 Let the m samples be Y1 , . . . , Ym ∈ [n], and let Xi , i ∈P [n], be the number of j ∈ [m] for which Yj = i. Let 1 1 i S be our empirical total variation test statistic, S = 2 ni=1 | X m − n |. We prove the theorem in two parts, one when m ≥ n, and one when m ≤ n. We will require a “Bernstein” form of the standard bounded differences (McDiarmid) inequality: Lemma 7 (Bernstein version of McDiarmid’s inequality [Yin04]). Let Y1 , . . . , Ym be independent random variables taking values in the set Y. Let f : Y m → R be a function of Y1 , . . . , Ym so that for every j ∈ [m] and y1 , . . . , ym , yj′ ∈ Y, we have that: |f (y1 , . . . , yj , . . . , yn ) − f (y1 , . . . , yj′ , . . . , yn )| ≤ B . Then, we have: Pr [f − E[f ] ≥ z] ≤ exp  −2z 2 mB 2  . (5) If in addition, for each j ∈ [m] and y1 , . . . , yj−1 , yj+1 , . . . , ym we have that VarYj [f (y1 , . . . , Yj , . . . , ym )] ≤ σj2 , then we have Pr [f − E[f ] ≥ z] ≤ exp 11 −z 2 Pm 2 2 j=1 σj + 2Bt/3 ! . (6) 2.3.1 Case I: m ≥ n 1 -Lipschitz in them, the first form of McDiarmid’s inequality Since the Yj ’s are independent and S is m implies that Pr[S − E[S] ≥ z] ≤ exp(−2mz 2 ) , and similarly, by applying it to −S, we have Pr[S − E[S] ≤ −z] ≤ exp(−2mz 2 ). Let R be the right-hand side of the Equation in Lemma 3, so µ(p) − µ(Un ) ≥ R in the soundness case. Since we threshold the tester at t = µ(Un ) + R/2, we find in both the completeness and soundness cases that the success probability will be at least 1 − exp(−mR2 /2) , and hence we just need to show mR2 /2 ≥ log(1/δ) . (7) Since we are in the regime that m ≥ n, there are two possible cases in Lemma 3. For n ≤ m ≤ n/ε2 , we need that m · Θ(1) · ε4 m/n ≥ log(1/δ) 2 or m ≥ Θ(1) · For m ≥ n/ε2 , we need that p n log(1/δ) . ε2 m · Θ(1) · ε2 ≥ log(1/δ) 2 or log(1/δ) . ε2 The theorem’s assumption on m implies that both conditions hold, which completes the proof of Theorem 2 in this case. m ≥ Θ(1) · 2.3.2 Case II: m ≤ n To establish Theorem 2 for m ≤ n, we will require the Bernstein form of McDiarmid’s inequality (Equation (6) in Lemma 7). To apply this form of Lemma 7, it suffices to compute B and σj for our test statistic as a function of the Xi 1 1 i Yj ’s. Note that for m ≤ n, | X m − n | is equal to m − n whenever Xi 6= 0. In particular, this implies n 1 X Xi 1 − 2 m n i=1    n 1 Xi 2 1X − + · 1Xi =0 = 2 m n n S= i=1 1 = · |{i : Xi = 0}| . n Hence, the value of the parameter B for our test statistic is 1/n, since each Yj will affect the number of nonzero Xi ’s by at most 1. In particular, the function value as Yj varies and the other Yj ′ ’s are kept fixed can 12 be written as the sum of a deterministic quantity plus (1/n) · b, where b is a Bernoulli random variable that is 1 if sample Yj collides with another sample Yj ′ and 0 otherwise. Thus, the variance of S as Yj varies and the other Yj ′ ’s are kept fixed is given by Var[(1/n) · b]. This variance is (1/n2 ) · r(1 − r), where r ≤ m/n is the probability that Yj collides with another Yj ′ . Thus, the variance of S as Yj varies and the other Yj ′ ’s are kept fixed is at most 1 · r(1 − r) ≤ r/n2 ≤ m/n3 =: σj2 . n2 Applying Equation (6) of Lemma 7 we find   −z 2 Pr[|S − E[S]| ≥ z] ≤ 2 exp . 2 · m2 /n3 + (2/3) · z/n By Lemma 3 in the soundness case we have expectation gap µ(p) − µ(Un ) ≥ R :=Cε2 m2 /n2 for some constant C < 1. Substituting z = R/2 in the above concentration inequality yields that our tester will be correct with probability 1 − δ as long as m ≥ Θ(1) · 1p n log(2/δ), ε2 for an appropriately chosen constant, which is true by assumption. This completes the proof of Theorem 2. 3 Matching Information-Theoretic Lower Bound In this section, we prove our matching sample complexity lower bound. Namely, we prove: Theorem 8. Any algorithm that distinguishes with probability at least 1 − δ the uniform distribution on [n] from any distribution that is ε-far from uniform, in total variation distance, requires at least   p n log(1/δ) + log(1/δ) /ε2 Ω samples. Theorem 8 will immediately follow from separate sample complexity lower bounds of Ω(log(1/δ)/ε2 ) p and Ω( n log(1/δ)/ε2 ) that we will prove. We start with a simple sample complexity lower bound of Ω(log(1/δ)/ε2 ): Lemma 9. For all n, ε, and δ, any (ε, δ) uniformity tester requires Ω(log(1/δ)/ε2 ) samples. Proof. If n is odd, set the last probability to 1/n, subtract 1 from n, and invoke the following lower bound instance on the remaining elements. If n is even, do the following. Consider the distribution p which has n 1−ε n probability pi = 1+ε n for each element 1 ≤ i ≤ 2 and pi = n for each element 2 ≤ i ≤ n. Clearly, dTV (p, Un ) = ε. Note that the probability that a sample comes from the first half of the domain is 1+ε 2 and the probability that it comes from the second half of the domain is 1−ε . Therefore, distinguishing p 2 from Un is equivalent to distinguishing between a fair coin and an ε-biased coin. It is well-known (see, e.g., Chapter 2 of [BY02]) that this task requires m = Ω(log(1/δ)/ε2 ) samples. The rest of this section is devoted to the proof of the following lemma, which gives our desired lower bound: p Lemma 10. For all n, ε, and δ, any (ε, δ) uniformity tester requires at least Ω( n log(1/δ)/ε2 ) samples. 13 To prove Lemma 10, we will construct two indistinguishable families of pseudo-distributions. A pseudo-distribution w is a non-negative measure, i.e., it is similar to a probability distribution except that the “probabilities” may sum to something other than 1. We will require that our pseudo-distributions always sum to a quantity within a constant factor of 1. A pair of pseudo-distribution families is said to be δ-indistinguishable using m samples if no tester exists that can, for every N pair of pseudo-distributions w, w′ N – one from each of the two families – distinguish the product distributions Poi(mwi ) versus Poi(mwi′ ) with failure probability at most δ. This technique is fairly standard and has been used in [WY16, VV14, DK16] to establish lower bounds for distribution testing problems. The benefit of the method is that it is much easier to show that pseudodistributions are indistinguishable, as opposed to working with ordinary distributions. Moreover, lower bounds proven using pseudo-distributions imply lower bounds on the original distribution testing problem. We will require the following lemma, whose proof is implicit in the analyses of [WY16, VV14, DK16]: Lemma 11. Let P ′ be a property of distributions. We extend P ′ to the unique property P of pseudodistributions which agrees with P ′ on true distributions and is preserved under rescaling. Suppose we have two families F1 , F2 of pseudo-distributions with the following properties: 1. All pseudo-distributions in F1 have property P and all those in F2 are ε-far in total variation distance from any pseudo-distribution that has the property. 2. F1 and F2 are δ-indistinguishable using m samples. 3. Every pseudo-distribution in each family has ℓ1 -norm within the interval [ c11 , c2 ], for some constants c1 , c2 > 1. Then there exist two families Fe1 , Fe2 of probability distributions with the following properties: 1. All distributions in Fe1 have property P and all those in Fe2 are any distribution that has the property. ε c2 -far in total variation distance from 2. Any tester that can distinguish Fe1 and Fe2 has worst-case error probability ≥ δ − 2−cm , for some constant c > 0 or requires Θ(1) · m samples. In our case, the property of distributions P ′ is simply being the uniform distribution. The families of pseudo-distributions we will use for our lower bound are the family F1 that only contains thePuniform distribution and the family F2 of all pseudo-distributions of the form wi = 1±ε i wi | ≤ n such that |1 − ε/2. Note that this constraint on the sum of the wi ’s ensures the first and last conditions needed to invoke Lemma 113 . Furthermore, by Lemma 9, the required number of samples m satisfies m ≥ Ω(log(1/δ)). Ignoring constant factors, we may assume that m ≥ c′ log(1/δ) for any constant c′ > 0. In particular, by selecting c′ appropriately, we can guarantee that 2−cm ≤ δ/3, where c is the constant in the last statement of Lemma 11. Thus, the error probability guaranteed by Lemma 11 for distinguishing the true distribution families is at least (2/3)δ. Thus, all that remains is to show that F1 and F2 are δ-indistinguishable using m samples. In order to show these families are indistinguishable, we show that it is impossible to distinguish whether the product N distribution Poi(mwi ) has w uniform or w generated according to the following random process: we 1−ε pick each wi independently by setting wi = 1+ε n or wi = n each with probability 1/2. A distribution generated by this process has a small probability of not being in F2 . Specifically, this happens iff it fails to satisfy the constraint on having a sum within 1 ± ε/2. However, by an application of 3 If we did not have this constraint, the first condition would not be satisfied (because e.g., a w such that wi = (1 + ε)/n for all i is not ε-far from being proportional to the all-ones vector. 14 the Chernoff bound, it follows that this happens with probability at mots ≤ 2−Θ(1)·n . Since the bound in Lemma 9 is larger (up to constant factors) than the lower bound we presently wish to prove in the case that δ/3 > 2−Θ(1)·n , we will assume δ ≤ 2−Θ(1)·n ; in which case, the following lemma implies that we can still invoke Lemma 11, where the probability of not being in F2 is absorbed into our overall indistinguishability probability, and we get a final indistinguishability probability of at least (2/3)δ − δ/3 = δ/3. The following lemma is implicit in [WY16, VV14, DK16]: Lemma 12. Let P be a property of pseudo-distributions. Suppose we have two families F1 , F2 of pseudodistributions and two distributions D1 , D2 on F1 and F2 respectively with the following properties: 1. With probability each at least 1 − δ1 , a distribution output by D1 is in F1 and a distribution output by D2 is in F2 . 2. If we generate w according to D1 or D2 , then any algorithm for determining which family w came N from given access to Poi(mwi ) has worst case error probability at least δ2 . Then F1 and F2 are (δ2 − δ1 )-indistinguishable using m samples. Thus, we now simply need to show that D1 and D2 are hard to distinguish. Let Xi , Xi′ be the random variables equal to the number of times the element i is sampled in the completeness and soundness cases respectively. We will require a technical lemma that will be used to bound the Hellinger distance between any pair of corresponding coordinates in the completeness and soundness cases. By 21 Poi(λ1 ) + 12 Poi(λ2 ), we denote a uniform mixture of the corresponding distributions. We have Fact 13 (Lemma 7 of [VV14]). For any λ > 0, ε < 1 we have   1 1 H 2 Poi(λ), Poi((1 + ε)λ) + Poi((1 − ε)λ) ≤ Cλ2 ε4 . 2 2 for some constant C. We are now ready to prove Lemma 10. Proof of Lemma 10: As follows from the preceding discussion, it suffices to show that D1 and D2 are hard to distinguish. We will use Fact 13 to show that the Hellinger distance between the overall distributions is small, which implies their total variation distance is small, and hence that they cannot be distinguished with probability better than δ. Recall that each of the n coordinates of the vectors output by these distributions is distributed according to Poi(m/n) for D1 vs. a uniform mixture of Poi((1 ± ε)m/n) for D2 . A single coordinate then has H 2 (X1 , X1′ ) ≤ C(m2 /n2 )ε4 , so the collection of all coordinates has 2 /n)ε4 H 2 (X, X ′ ) ≤ 1 − (1 − C(m2 /n2 )ε4 )n ≤ 1 − e−C(m For this latter quantity to be at least 1 − δ, we need   p m = Ω (1/ε2 ) · n log(1/δ) . samples, as desired. The result then follows from Lemma 12 and Lemma 11. This completes the proof. 15 4 Stochastic Domination for Statistics of the Histogram In this section, we consider the set of statistics which are symmetric convex functions of the histogram (i.e., the number of times each domain element is sampled) of an arbitrary random variable Y . We start with the following definition: Definition 14. Let p = (p1 , . . . , pn ), q = (q1 , . . . , qn ) be probability distributions and p↓ , q ↓ denote the vectors with the same values as p and q respectively, but sorted in non-increasing order. We say that p majorizes q (denoted by p ≻ q) if k k X X qi↓ . (8) p↓i ≥ ∀k : i=1 i=1 The following theorem from [Arn12] gives an equivalent definition: Theorem 15. [Arn12] Let p = (p1 , . . . , pn ), q = (q1 , . . . , qn ) be any pair of probability distributions. Then, p ≻ q if and only if there exists a doubly stochastic matrix A such that q = Ap. Remark: It is shown in [Arn12] that multiplying the distribution p by a doubly stochastic matrix is equivalent to performing a series of so called “Robin hood operations” and permutations of elements. Robin hood operations are operations in which probability mass in transferred from heavier to lighter elements. For more details, the reader is referred to [Arn12, MOA79]. Note that Definition 14 defines a partial order over the set of probability distributions. We will see that the uniform distribution is a minimal element for this partial order, which directly follows as a special case of the following lemma. Lemma 16. Let p be a probability distribution over [n] and S ⊆ [n]. Let q be the distribution which is identical to p on [n] \ S, and for every i ∈ S we have qi = p(S) |S| , where |S| denotes the cardinality of S. Then, we have that p ≻ q. Proof. Let A = (aij ) be the doubly stochastic matrix A = (aij ) with entries:  if i = j 6∈ S  1 1 aij = |S| if i ∈ S ∧ j ∈ S .   0 otherwise Observe that q = Ap. Therefore, Theorem 15 implies that p ≻ q. In the rest of this section, we use the following standard terminology: We say that a real random variable A stochastically dominates a real random variable B if for all x ∈ R it holds Pr[A > x] ≥ Pr[B > x]. We now state the main result of this section (see Section 4.1 for the proof): Lemma 17. Let f : Rn → R be a symmetric convex function and p be a distribution over [n]. Suppose that we draw m samples from p, and let Xi denote the number of times we sample element i. Let g(p) be the random variable f (X1 , X2 , . . . , Xn ). Then, for any distribution q over [n] such that p ≻ q, we have that g(p) stochastically dominates g(q). As a simple consequence of the above, we obtain the following: Fact 18. Let p be a distribution on [n] and S ⊆ [n]. Let p′ be the distribution which is identical to p in ′ [n] \ S and the probabilities in S are averaged (i.e., p′i = p(S) |S| ). Then, we have that µ(p ) ≤ µ(p), where µ(·) denotes the expectation of our statistic as defined in Section 2. In particular, µ(Un ) ≤ µ(p) for all p. 16 Proof. Recall that our statistic applies a symmetric convex function f to the histogram of the sampled distribution. Since p′ is averaging the probability masses on a subset S ⊆ [n], Lemma 16 gives us that p ≻ p′ . Therefore, by Lemma 17 we conclude that g(p) stochastically dominates g(p′ ), which implies that: µ(p) = E[g(p)] ≥ E[g(p′ )] = µ(p′ ), as was to be shown. The following lemma shows that given an arbitrary distribution p over [n] that is ε-far from the uniform distribution Un , if we average the heaviest ⌊n/2⌋ elements and then the lightest ⌊n/2⌋ elements, we will get a distribution that is ε′ > ε/2-far from uniform. Lemma 19. Let p be a probability distribution and p′ be the distribution obtained from p after averaging the ⌊ n2 ⌋ heaviest and the ⌊ n2 ⌋ lightest elements separately. Then, the following holds: kp − Un k1 ≤ kp′ − Un k1 ≤ kp − Un k1 . 2 We note that by doing the averaging as suggested by the above lemma, we obtain a distribution p′ that is ′ 1 1−ε′ ε ′ supported on the following set of three values: { 1+ε n , n , n }, for some 2 ≤ ε ≤ ε. Hence, we can reduce the computation of the expectation gap for an arbitrary distribution p, to computing the gap for a distribution of this form. Fact 6 is an immediate corollary of Lemmas 16, 17, and 19. 4.1 Proof of Lemma 17 To establish Lemma 17, we are going to use the following intermediate lemmas: Lemma 20. Let f : Rn → R be a symmetric convex function, and a, b, c ∈ R such that 0 < a < b and c > 0. Then, f (a, b + c, x3 , . . . , xn ) ≥ f (a + c, b, x3 , . . . , xn ) . Proof. Consider the set of convex functions fx′ 3 ,...,xn : R2 → R defined as: fx′ 3 ,...,xn (x1 , x2 ) = f (x1 , x2 , x3 , . . . , xn ) . We will show that for every possible choice of x3 , . . . , xn it holds that: fx′ 3 ,...,xn (a, b + c) ≥ fx′ 3 ,...,xn (a + c, b) . Since f is symmetric, so is f ′ . Therefore, we have that fx′ 3,...,xn (a, b + c) = fx′ 3 ,...,xn (b + c, a). The 3 points: P1 = (a, b + c), P2 = (a + c, b), P3 = (b + c, a) are collinear since their coordinates satisfy the equation x1 + x2 = a + b + c. We have that P2 is between P1 and P3 since: hP1~P2 , P2~P3 i = h(c, −c), (b − a, a − b)i > 0 . By applying Jensen’s inequality, we get that fx′ 3 ,...,xn (a + c, b) ≤ fx′ 3 ,...,xn (a, b + c) + fx′ 3 ,...,xn (b + c, a) = fx′ 3 ,...,xn (a, b + c) . 2 as desired. The stochastic domination between the two statistics is established in the following lemma: 17 Lemma 21. Let f : Rn → R be a symmetric convex function, p be a distribution over [n], and a, b ∈ [n] be such that pa < pb . Also, let q be the distribution which is identical to p on [n] \ {a, b}, and for which:      pa qa w 1−w , (9) = 1−w w pb qb where w ∈ [ 12 , 1]. Suppose we take m samples from p and let Xi denote the number of times we sample element i. Let g(p) be the random variable f (X1 , X2 , . . . , Xn ). Then, g(p) stochastically dominates g(q). Proof. To prove stochastic domination between g(p) and g(q), we are going to define a coupling under which it is always true that g(p) takes a larger value than g(q). Initially, we define an auxiliary coupling between p and q as follows: To get a sample from q, we first sample from p and use it as our sample, unless the output is element “b”, in which case we output “a” with b −pa ) probability (1−w)(p and “b” otherwise4 . pb Suppose now that we draw m samples from p, which we also convert to samples from q using the above rule. In relation to this coupling we define the following random variables: • Xlow : The number of times element “a” is sampled. • Xhigh : The number of times element “b” is sampled and is not swapped for element “a” in q. • Xmid : The number of times element “b” is sampled and is swapped for element “a” in q. From the above, we have that: Xa = Xlow , Xb = Xhigh + Xmid , Xa′ = Xlow + Xmid , Xb′ = Xhigh , where Xi′ is the number of times element i is sampled in q. We want to show that g(p) stochastically dominates g(q). That is, we want to show that5 : ∀t : Pr[f (Xlow , Xhigh + Xmid , X3 , . . . , Xn ) ≥ t] ≥ Pr[f (Xlow + Xmid , Xhigh , X3 , . . . , Xn ) ≥ t] . We now condition on the events E{y,z} : {Xlow , Xhigh } = {y, z} and Ec,x3,...,xn : Xmid = c ∧ X3 = x3 ∧ · · · ∧ Xn = xn }, where y ≤ z without loss of generality. Let B = E{y,z} ∧ Ec,x3 ,...,xn . We have that: Pr[f (Xlow , Xhigh + Xmid , X3 , . . . , Xn ) ≥ t] X = Pr[f (Xlow , Xhigh + Xmid , X3 , . . . , Xn ) ≥ t | B] Pr[B] . y≤z So, it suffices to show that for every y, z, c, x3 , . . . , xn , t : Pr[f (Xlow , Xhigh + Xmid , X3 , . . . , Xn ) ≥ t | B] ≥ Pr[f (Xlow + Xmid , Xhigh , X3 , . . . , Xn ) ≥ t | B] . (10) At this point, we have conditioned on everything except which of Xlow and Xhigh is y and which is z. That is, after conditioning on the event B = E{y,z} ∧ Ec,x3 ,...,xn , we have that: {f (Xlow + Xmid , Xhigh , X3 , . . . , Xn ), f (Xlow , Xhigh + Xmid , X3 , . . . , Xn )} = {u, w} , 4 Note that this coupling does not fix the value of g(q) given a fixed value for g(p), and is defined for convenience. We still have to show stochastic domination for the coupled random variables using a second coupling. 5 To simplify notation, we pick a = 1 and b = 2 without loss of generality. 18 where u = f (y + c, z, x3 , . . . , xn ), w = f (y, z + c, x3 , . . . , xn ). Since by assumption y ≤ z, we have by Lemma 20 that u ≤ w. Then (10) holds trivially as an equality for t ≤ u and for t > w. For the remaining values of t, it is equivalent to: Pr[f (Xlow , Xhigh + Xmid , X3 , . . . , Xn ) = w | B] ≥ Pr[f (Xlow + Xmid , Xhigh , X3 , . . . , Xn ) = w | B], and hence to Pr[Xlow = y, Xhigh = z | B] ≥ Pr[Xlow = z, Xhigh = y | B]. Now, this is also equivalent to a version with less restricted conditioning, Pr[Xlow = y, Xhigh = z | Ec,x3,...,xn ] ≥ Pr[Xlow = z, Xhigh = y | Ec,x3 ,...,xn ], because neither event occurs in the added regime where E{y,z} is false. But if we rethink how our samples were drawn, we find that this is equivalent to showing that pya qbz ≥ pza qby . This holds since qbz−y > pz−y a , concluding the proof. Proof of Lemma 17: Since p ≻ q, we have by Theorem 15 (and the remark that follows it) that q can be constructed from p by repeated applications of (9). Therefore, Lemma 21 and the fact that stochastic domination is transitive imply that g(p) stochastically dominates g(q). 4.2 Proof of Lemma 19 Recall that p↓i denotes the vector p with entries rearranged in non-increasing order. Suppose that at least n/2 elements have at least 1/n probability mass6 . Therefore, if p is not the uniform distribution, we have ⌊n/2⌋ X 1 + ε′ 1 > , 2 2 p↓k = k=1 for some ε′ > 0. Thus, we have that p′↓ k = when n is even, and p′↓ k = ( 1+ε′ n 1−ε′ n  ′ 1+ε   n for k ≤ for k > for k ≤ for k = for k > 1 n   1−ε′ n n 2 n 2 n−1 2 n+1 2 n+1 2 when n is odd. P⌊n/2⌋ P⌊n/2⌋ 1+ε′ Moreover, since we are just averaging, we have that k=1 p↓k = k=1 p′↓ k = 2 . Since we have assumed that the majority of elements has mass at least n1 , we know that the total variation distance is given by: dTV (p, Un ) = X i:pi >1/n ⌊n/2⌋ (pi −1/n) ≤ 2 X k=1 ⌊n/2⌋ (p↓i −1/n) =2 X k=1 (p′↓ i −1/n) ≤ 2 X i:p′i >1/n Thus, dTV (p′ , Un ) ≥ (1/2)dTV (p, Un ) or kp − Un k1 /2 ≤ kp′ − Un k1 , as desired. 6 This is without loss of generality, since we can use essentially the same argument in the other case. 19 ′ (p′↓ i −1/n) = 2dTV (p , Un ) . 5 Conclusions and Future Work In this paper, we gave the first uniformity tester that is sample-optimal, up to constant factors, as a function of the confidence parameter. Our tester is remarkably simple and our novel analysis may be useful in other related settings. By using a known reduction of identity to uniformity, we also obtain the first sample-optimal identity tester in the same setting. Our result is a step towards understanding the behavior of distribution testing problems in the highconfidence setting. We view this direction as one of fundamental theoretical and important practical interest. A number of interesting open problems remain. Perhaps the most appealing one is to design a general technique (see, e.g., [DK16]) that yields sample-optimal testers in the high confidence regime for a wide range of properties. From the practical standpoint, it would be interesting to perform a detailed experimental evaluation of the various algorithms (see, e.g., [HM13, BW17]). References [ADJ+ 11] J. Acharya, H. Das, A. Jafarpour, A. Orlitsky, and S. Pan. Competitive closeness testing. Journal of Machine Learning Research - Proceedings Track, 19:47–68, 2011. [ADK15] J. Acharya, C. Daskalakis, and G. Kamath. Optimal testing for properties of distributions. In Advances in Neural Information Processing Systems (NIPS), pages 3591–3599, 2015. [Arn12] Barry Arnold. Majorization and the Lorenz order: A brief introduction, volume 43. Springer Science & Business Media, 2012. [Bat01] T. Batu. Testing Properties of Distributions. PhD thesis, Cornell University, 2001. [BDKR02] T. Batu, S. Dasgupta, R. Kumar, and R. Rubinfeld. The complexity of approximating entropy. In ACM Symposium on Theory of Computing, pages 678–687, 2002. [BFF+ 01] T. Batu, E. Fischer, L. Fortnow, R. Kumar, R. Rubinfeld, and P. White. Testing random variables for independence and identity. In Proc. 42nd IEEE Symposium on Foundations of Computer Science, pages 442–451, 2001. [BFR+ 00] T. Batu, L. Fortnow, R. Rubinfeld, W. D. Smith, and P. White. Testing that distributions are close. In IEEE Symposium on Foundations of Computer Science, pages 259–269, 2000. [BFR+ 13] T. Batu, L. Fortnow, R. Rubinfeld, W. D. Smith, and P. White. Testing closeness of discrete distributions. J. ACM, 60(1):4, 2013. [BKR04] T. Batu, R. Kumar, and R. Rubinfeld. Sublinear algorithms for testing monotone and unimodal distributions. In ACM Symposium on Theory of Computing, pages 381–390, 2004. [BW17] S. Balakrishnan and L. A. Wasserman. Hypothesis testing for densities and high-dimensional multinomials: Sharp local minimax rates. CoRR, abs/1706.10003, 2017. [BY02] Z. Bar-Yossef. The Complexity of Massive Data Set Computations. PhD thesis, Berkeley, CA, USA, 2002. [Can15] C. L. Canonne. A survey on distribution testing: Your data is big. but is it blue? Electronic Colloquium on Computational Complexity (ECCC), 22:63, 2015. 20 [CDGR16] C. L. Canonne, I. Diakonikolas, T. Gouleakis, and R. Rubinfeld. Testing shape restrictions of discrete distributions. In 33rd Symposium on Theoretical Aspects of Computer Science, STACS 2016, pages 25:1–25:14, 2016. [CDKS17] C. L. Canonne, I. Diakonikolas, D. M. Kane, and A. Stewart. Testing bayesian networks. In Proceedings of the 30th Conference on Learning Theory, COLT 2017, pages 370–448, 2017. [CDS17] C. L. Canonne, I. Diakonikolas, and A. Stewart. Fourier-based testing for families of distributions. CoRR, abs/1706.05738, 2017. [CDVV14] S. Chan, I. Diakonikolas, P. Valiant, and G. Valiant. Optimal algorithms for testing closeness of discrete distributions. In SODA, pages 1193–1203, 2014. [DDS+ 13] C. Daskalakis, I. Diakonikolas, R. Servedio, G. Valiant, and P. Valiant. Testing k-modal distributions: Optimal algorithms via reductions. In SODA, pages 1833–1852, 2013. [DGPP16] I. Diakonikolas, T. Gouleakis, J. Peebles, and E. Price. Collision-based testers are optimal for uniformity and closeness. Electronic Colloquium on Computational Complexity (ECCC), 23:178, 2016. [DK16] I. Diakonikolas and D. M. Kane. A new approach for testing properties of discrete distributions. In FOCS, pages 685–694, 2016. Full version available at abs/1601.05557. [DKN15a] I. Diakonikolas, D. M. Kane, and V. Nikishkin. Optimal algorithms and lower bounds for testing closeness of structured distributions. In IEEE 56th Annual Symposium on Foundations of Computer Science, FOCS 2015, pages 1183–1202, 2015. [DKN15b] I. Diakonikolas, D. M. Kane, and V. Nikishkin. Testing identity of structured distributions. In Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2015, pages 1841–1854, 2015. [DKN17] I. Diakonikolas, D. M. Kane, and V. Nikishkin. Near-optimal closeness testing of discrete histogram distributions. CoRR, abs/1703.01913, 2017. To appear in ICALP 2017. [DL01] L. Devroye and G. Lugosi. Combinatorial methods in density estimation. Springer Series in Statistics, Springer, 2001. [Gol16] O. Goldreich. The uniform distribution is complete with respect to testing identity to a fixed distribution. ECCC, 23, 2016. [Gos78] R. William Gosper. Decision procedure for indefinite hypergeometric summation. Proceedings of the National Academy of Sciences, 75(1):40–42, 1978. [GR00] O. Goldreich and D. Ron. On testing expansion in bounded-degree graphs. Technical Report TR00-020, Electronic Colloquium on Computational Complexity, 2000. [HM13] D. Huang and S. Meyn. Generalized error exponents for small sample universal hypothesis testing. IEEE Trans. Inf. Theor., 59(12):8157–8181, December 2013. [ILR12] P. Indyk, R. Levi, and R. Rubinfeld. Approximating and Testing k-Histogram Distributions in Sub-linear Time. In PODS, pages 15–22, 2012. [LR05] E. L. Lehmann and J. P. Romano. Testing statistical hypotheses. Springer Texts in Statistics. Springer, 2005. 21 [LRR11] R. Levi, D. Ron, and R. Rubinfeld. Testing properties of collections of distributions. In ICS, pages 179–194, 2011. [MOA79] Albert W Marshall, Ingram Olkin, and Barry C Arnold. Inequalities: theory of majorization and its applications, volume 143. Springer, 1979. [NP33] J. Neyman and E. S. Pearson. On the problem of the most efficient tests of statistical hypotheses. Philosophical Transactions of the Royal Society of London. Series A, Containing Papers of a Mathematical or Physical Character, 231(694-706):289–337, 1933. [Pan08] L. Paninski. A coincidence-based test for uniformity given very sparsely-sampled discrete data. IEEE Transactions on Information Theory, 54:4750–4755, 2008. [PS95] Peter Paule and Markus Schorn. A mathematica version of zeilberger’s algorithm for proving binomial coefficient identities. Journal of Symbolic Computation, 20(5):673 – 698, 1995. [PWZ97] M. Petkovsek, H.S. Wilf, and D. Zeilberger. A = B (Online Edition). Ak Peters Series. Taylor & Francis, 1997. [Rub12] R. Rubinfeld. Taming big probability distributions. XRDS, 19(1):24–28, 2012. [Rub14] R. Rubinfeld. Taming probability distributions over big domains. at STOC’14 Workshop on Efficient Distribution Estimation, 2014. http://www.iliasdiakonikolas.org/stoc14-workshop/rubinfeld.pdf. [Val11] P. Valiant. Testing symmetric properties of distributions. SIAM J. Comput., 40(6):1927–1968, 2011. Talk given Available at [vdVW96] A. W. van der Vaart and J. A. Wellner. Weak convergence and empirical processes. Springer Series in Statistics. Springer-Verlag, New York, 1996. With applications to statistics. [VV14] G. Valiant and P. Valiant. An automatic inequality prover and instance optimal identity testing. In FOCS, 2014. [WY16] Y. Wu and P. Yang. Minimax rates of entropy estimation on large alphabets via best polynomial approximation. IEEE Transactions on Information Theory, 62(6):3702–3720, June 2016. [Yin04] Y. Ying. Mcdiarmid’s inequalities of bernstein and bennett forms. City University of Hong Kong, 2004. 22 Appendix A Computation of the Expectation in Completeness Case Our statistic can be written as: S = E[S] = Pn i=1 max{Xi − m n , 0}. Therefore, by linearity of expectation, we get: n h i h i X m m E max{Xi − , 0} = n · E max{Xi − , 0} . n n i=1   So, all we need to do is to compute: E max{Xi − m n , 0} for a single value of i in the completeness case. Note that Xi ∼ Bin(m, n1 ) and that the above expectation can be written as: m i h X m m E max{Xi − , 0} = Pr[Xi = k](k − ) , n n m (11) k=⌈ n ⌉ (1− 1 )m−k n where Pr[Xi = k] = . This is a sum of O(m) terms each of which can be computed in constant nk time, giving an O(m) runtime overall. B Non-Existence of Indefinite Closed-Form for Components of Expectation In this appendix, we formalize and prove our assertion from Section 2.2 that the function µ(p) − µ(Un ) is a linear combination of sums each of which has no indefinite closed form. Recall Equation (3) which says that the expectation is a linear combination of sums with summands of  m k the form k q (1 − q)m−k (k − t) for various values of q – where the values of q are themselves different variables that any closed form would need to depend on (in addition to the other variables). A sum is said to have an indefinite closed form if, when the upper and lower limits of the sum are replaced with new variables, the resulting sum has a closed form valid for all values of all variables. By closed form, we mean a closed form as defined in [PWZ97, Definition 8.1.1] which, as far as we are aware, is the main formal sense in which the phrase is used in combinatorics. This definition of closed form says that a function can be written as a sum of a constant number of rational functions, where the numerator and denominator in each is a linear combination of a constant number of products of exponentials, factorials, k 5 + k. and constant degree polynomials. An example of such a function is n1 + 7 · 2 k!+2k 3k ( ) k  k m−k (k − t) has no indefinite closed form – where To prove that a sum with summands m k q (1 − q) m, k, q, t, and the limits of the sum are the variables that the closed form would need to be a function of – one can run Gosper’s algorithm on this summand – with k as the index of summation – and observe that it returns that there is no indefinite closed form solution in the sense we have described [PWZ97, Theorem 5.6.3], [Gos78, PS95]. 23
8cs.DS
1 Large System Analysis of Power Normalization Techniques in Massive MIMO arXiv:1705.07183v1 [cs.IT] 19 May 2017 Meysam Sadeghi, Student Member, IEEE, Luca Sanguinetti, Senior Member, IEEE, Romain Couillet, Senior Member, IEEE, and Chau Yuen, Senior Member, IEEE Abstract—Linear precoding has been widely studied in the context of Massive multiple-input-multiple-output (MIMO) together with two common power normalization techniques, namely, matrix normalization (MN) and vector normalization (VN). Despite this, their effect on the performance of Massive MIMO systems has not been thoroughly studied yet. The aim of this paper is to fulfill this gap by using large system analysis. Considering a system model that accounts for channel estimation, pilot contamination, arbitrary pathloss, and per-user channel correlation, we compute tight approximations for the signal-tointerference-plus-noise ratio and the rate of each user equipment in the system while employing maximum ratio transmission (MRT), zero forcing (ZF), and regularized ZF precoding under both MN and VN techniques. Such approximations are used to analytically reveal how the choice of power normalization affects the performance of MRT and ZF under uncorrelated fading channels. It turns out that ZF with VN resembles a sum rate maximizer while it provides a notion of fairness under MN. Numerical results are used to validate the accuracy of the asymptotic analysis and to show that in Massive MIMO, noncoherent interference and noise, rather than pilot contamination, are often the major limiting factors of the considered precoding schemes. Index Terms—Massive MIMO, linear precoding, power normalization techniques, large system analysis, pilot contamination. I. I NTRODUCTION Massive multiple-input multiple-output (MIMO) is a multiuser MIMO system that employs a large number of antennas at the base stations (BSs) to serve a relatively smaller number of user equipments (UEs) [1]–[4]. This large number of antennas enables each BS to focus the radiated energy into a specific location in space or to intercept the power of transmitted electromagnetic waves more efficiently. Therefore, Massive MIMO has higher spectral efficiency and energy efficiency compared to classical multiuser MIMO systems [3], [5]–[7]. Due to the quasi-orthogonal nature of channels Copyright (c) 2015 IEEE. Personal use of this material is permitted. However, permission to use this material for any other purposes must be obtained from the IEEE by sending a request to [email protected]. M. Sadeghi ([email protected]) and C. Yuen ([email protected]) are with Singapore University of Technology and Design (SUTD), Singapore. L. Sanguinetti ([email protected]) is with the University of Pisa, Dipartimento di Ingegneria dell’Informazione, Italy and also with the Large Systems and Networks Group (LANEAS), CentraleSupélec, Université Paris-Saclay, 3 rue Joliot-Curie, 91192 Gif-surYvette, France. R. Couillet ([email protected]) is with the Signals and Statistics Group, CentraleSupélec, Université Paris-Saclay, 4103 Paris, France. This work was supported by A*Star SERC project number 142-02-00043. L. Sanguinetti and R. Couillet have been supported by the ERC Starting Grant 305123 MORE. in Massive MIMO, linear precoding and detection schemes perform close-to-optimal [5], [6], [8]. If the channel reciprocity is exploited, the overhead of the channel state information (CSI) acquisition is independent of the number of BS antennas [9]. Moreover, it has been recently shown that the capacity of Massive MIMO increases without bound as the number of antennas increases, even under pilot contamination [10], [11]. These remarkable features candidate Massive MIMO as one of the most promising technologies for next generation of cellular networks [8], [12], [13]. Linear precoding has a central role in Massive MIMO and has been extensively studied in the past few years [5], [14]–[22]. The spectral efficiency and energy efficiency of maximum ratio transmission (MRT) and zero forcing (ZF) precoding in single-cell Massive MIMO systems are investigated in [14]. In [15], a multicell linear precoding is proposed to mitigate the effect of pilot contamination. Multicell processing is also considered in [10], [11], [21]. The performance of MRT, ZF, and regularized ZF (RZF) precoding in singlecell large-scale MIMO systems is studied in [16], considering a per-user channel correlation model. A seminal treatment of MRT and RZF precoding schemes in multicell Massive MIMO systems is presented in [5], followed by [17] where downlink training and linear pilot contamination precoding are also considered. In [18], closed-form approximations for the achievable downlink rates of MRT and ZF precoding schemes are presented for multicell Massive MIMO systems. A linear truncated polynomial expansion based precoding is proposed in [19], which reduces the complexity of RZF precoding. The effect of phase noise on the signal-to-interference-plus-noise (SINR) of MRT, ZF, and RZF precoding schemes is studied in [20]. In order to utilize linear precoding, the power should be adjusted to meet the power constraint at the BS. This can be done either by optimized power allocation among the downlink data streams [21], [23]–[25], or simply by uniform power allocation among downlink data streams jointly with precoder power normalization [5], [14], [17]–[19]. Although the latter approach may provide a weaker performance compared to the former, it is the most used in the Massive MIMO literature [5], [9], [14], [17]–[19]. The reason for this is that power allocation presents the following major issues: (i) finding a global solution is a challenging task [24], [26], [27]; (ii) a certain level of coordination or cooperation among cells is required; and (iii) it should be performed very frequently, even for static users, as scheduling may change rapidly in practice. The two commonly used power normalization techniques 2 in Massive MIMO are matrix normalization (MN) and vector normalization (VN) [26], [27]. In MN, the precoding matrix of each BS is adjusted by multiplying it with a scalar such that the power constraint at the BS is met [5], [9], [14], [17], [19]. On the other hand, with VN the precoding matrix is normalized such that equal amount of power is allocated to each UE while satisfying the power constraint [18], [26], [27]. Note that these two methods yield the same performance with optimal power allocation, but not with practical suboptimal power allocation [27], [28]. Although linear precoding has been largely studied in Massive MIMO, a detailed treatment of the impact of power normalization does not exist in the literature. The first attempt in this direction was carried out in [26] and extended in [27] wherein the authors study the impact of MN and VN on MRT and ZF precoding schemes. However, both [26], [27] do not grasp the essence of a practical Massive MIMO system since: (i) a single-cell network composed of three radio units is considered; (ii) perfect CSI is assumed and thus CSI acquisition or pilot contamination are not accounted for; and (iii) large-scale attenuation is neglected, though it has a fundamental impact on power normalization, as detailed later. The goal of this paper is to study the effect of MN and VN on the performance of MRT, ZF, and RZF in Massive MIMO, in the simple and practical case of uniform power allocation. Particularly, the following contributions are provided. • • • We extend the analysis in [26], [27] to a multicell Massive MIMO system, which accounts for channel estimation, pilot contamination, an arbitrary pathloss model, and peruser channel correlation. Asymptotically tight approximations of the signal-to-interference-plus-noise ratio (SINR) and rate of each UE are provided and validated by numerical results for MRT, ZF, and RZF with VN and MN. Explicit asymptotic approximations for the SINR and rate of each UE are given for a Rayleigh fading channel model. These results are used: (i) to elaborate on how the two different normalization techniques affect the signal, noise, and interference powers as well as the pilot contamination experienced by each UE in the system; (ii) to prove that large-scale fading has a fundamental role on the performance provided by the two normalization techniques while both perform the same if neglected; (iii) to show that ZF conveys a notion of sum rate maximization with VN and of fairness with MN. The asymptotic approximations of SINRs are used together with numerical results to study the main limiting factors of the investigated schemes. Particularly, we reveal that in Massive MIMO, non-coherent interference and noise, rather than pilot contamination, are often the major limiting factors for all schemes. The remainder of this paper is organized as follows. Section II introduces the network model, the channel estimation scheme, the precoding and power normalization methods, as well as the downlink achievable rates. The large system analysis is provided in Section III. The effect of power normalization techniques is elaborated in Section IV for uncorrelated fading channels. The provided asymptotic approximations are verified by means of numerical results in Section V. Some conclusions are drawn in Section VI. Notations: The following notation is used throughout the paper. Scalars are denoted by lower case letters whereas boldface lower (upper) case letters are used for vectors (matrices). We denote by IN the identity matrix of size N and represent the element on the ith row and kth column of A as [A]i,k . The symbol CN (., .) denotes the circularly symmetric complex Gaussian distribution. The trace, transpose, conjugate transpose, real part, and expectation operators are denoted by tr(·), (·)T , (·)H , Re(·), and E[·], respectively. The notation −−−−→ represent almost sure convergence. N →∞ II. C OMMUNICATION S CHEME Next, we introduce the system model, the channel estimation method, the precoding and power normalization techniques, and compute the downlink achievable rates. A. System Model We consider the downlink of a Massive MIMO system composed of L cells, where the set of all cells is denoted by L. The BS of each cell has N antennas and serves K single-antenna UEs in the same time-frequency resource. The set of UEs belonging to cell l is denoted by Kl . We assume transmissions over flat-fading channels. We employ a double index notation to refer to each UE as e.g., “user k in cell l”. Under this convention, let hjlk ∈ CN be the channel between BS j and UE k in cell l within a block and assume that 1/2 hjlk = Θjlk zjlk (1) where zjlk ∼ CN (0, IN ) and Θjlk ∈ CN ×N accounts for the corresponding channel correlation matrix. Note that (1) enables us to assign a unique correlation matrix between each user-BS pair and it includes many channel models in the literature as special cases [16]. B. Channel Estimation We assume that BSs and UEs are perfectly synchronized and operate according to a time-division duplex (TDD) protocol. Then, the channels can be found by an uplink training phase and used in the downlink by exploiting channel reciprocity. Using orthogonal pilots in each cell while reusing them in all other cells, after correlating the received training signal with the pilot sequence of UE k, the observed channel of user k in cell j is tr yjk = hjjk + L X l=1,l6=j 1 hjlk + √ njk ρtr (2) where njk ∼ CN (0, σ 2 IN ) with σ 2 being the noise spectral density and ρtr is proportional to the training SNR. Applying the MMSE estimation, the estimated channel can be computed as follows [5] tr ĥjjk = Θjjk Qjk yjk (3) 3 where ĥjjk ∼ CN (0, Φjjk ). Also, Qjk and Φjlk are given by !−1 L X σ2 Qjk = Θjlk + IN ∀j, k (4) ρtr l=1 ∀j, l, k. Φjlk = Θjjk Qjk Θjlk (5) Note that due to the orthogonality principle of MMSE, the e jjk = hjjk − ĥjjk is independent of ĥjjk estimation error h e and such that hjjk ∼ CN (0, Θjjk − Φjjk ). For notational simplicity, we denote Ĥjj = [ĥjj1 , . . . , ĥjjK ] as the matrix collecting the estimated channels of cell j. C. Precoding and Power Normalization Techniques As mentioned earlier, we consider MRT, ZF, and RZF with VN and MN [26], [27]. Denoting by Gj = [gj1 , . . . , gjK ] ∈ CN ×K the precoding matrix of BS j, where gjk ∈ CN is the precoding vector of UE k in cell j, we have 1/2 (6) Gj = Fj Dj where Fj = [fj1 , . . . , fjK ] ∈ CN ×K determines the precoding scheme and Dj ∈ CK×K characterizes the power allocation strategy. Therefore, Fj takes one of the following forms:  Ĥjj MRT (7)     −1  Ĥjj ĤH ZF (8) jj Ĥjj Fj =  −1    Ĥ ĤH + Z + N α I Ĥjj RZF (9) jj jj j j N where αj > 0 is the regularization parameter and Zj ∈ CN ×N is an arbitrary Hermitian nonnegative definite matrix that can be used to leverage the system performance [5]. As mentioned in the introduction, finding the optimal values for the elements of Dj is challenging in practice [24]. This is why VN or MN are usually employed [27]. In this case, Dj is diagonal with entries chosen so as to satisfy the following average power constraint E[trGj GH j ] = K ∀j. If VN is used, then the kth diagonal element of Dj is computed as [Dj ]k,k = djk = 1 . Hf ] E[fjk jk (10) On the other hand, if MN is employed, then Dj = ηj IK with K . E[trFj FH j ] D. Downlink Achievable Rate ηj = (11) The received signal of user k in cell j can be written as yjk = hH jjk gjk sjk + K X hH jjk gji sji i=1,i6=k + L X K X hH ljk gli sli + njk (12) As in [1], [5], [6], [15] (among many others), we assume that there are no downlink pilots such that the UEs do not have knowledge of the current channels but can only learn the average channel gain E{hH jjk gjk } and the total interference power. Note this is the common approach in Massive MIMO due to the channel hardening [29]. Using the same technique as in [30], an ergodic achievable information rate for UE k in cell j is obtained as rjk = log2 (1 + γjk ) where γjk is given by γjk = σ2 ρdl + L P K P l=1 i=1 2 |E[hH jjk gjk ]| 2 E[|hH ljk gli | ] − (13) 2 |E[hH jjk gjk ]| where the expectation is taken with respect to the channel realizations. The above result holds true for any precoding scheme and is obtained by treating the interference (from the same and other cells) and channel uncertainty as worst-case Gaussian noise. By using VN and MN, i.e. (10) and (11), the SINR takes respectively the form in (16) and (17), given on the top of next page. MN VN As for all precoding schemes, γjk and γjk depend on the statistical distribution of {hjlk } and {ĥjlk }. This makes hard to compute both in closed-form. To overcome this issue, a large system analysis is provided next to find tight asymptotic approximations (hereafter called deterministic equivalents) for MN VN γjk and γjk and their associated achievable rates. III. L ARGE S YSTEM A NALYSIS We consider a regime in which N and K grow large with a non-trivial ratio N/K, where 1 < lim inf N/K ≤ lim sup N/K < ∞. We will represent it as N → ∞. Under this assumption, we provide asymptotic approximations, also called deterministic equivalents (DEs), for γjk with MRT, ZF, and RZF and either MN or VN. The DE is represented by γ jk , and it is such that γjk −γ jk −−−−→ 0. By applying the continuN →∞ ous mapping theorem [31], the almost sure convergence of the results illustrated below implies that rjk − rjk −−−−→ 0 with N →∞ rjk = log2 (1 + γ jk ), where γ jk denotes one of the asymptotic approximations computed below. As limiting cases are considered, the following conditions (widely used in the literature [5], [16], [32], [33]) are needed. 1 1/2 A1 : lim sup||Θjlk || < ∞ and lim inf tr (Θjlk ) > 0 N 1  A2 :∃ > 0 : λmin HH ll Hll >  N 1 A3 : lim sup|| Z l || < ∞ N N A4 :rank(Ĥll ) ≥ K. l=1,l6=j i=1 with sli ∈ C being the signal intended to UE i in cell l, assumed independent across (l, i) pairs, of zero mean and unit variance, and njk ∼ CN (0, σ 2 /ρdl ) where ρdl is proportional to the downlink signal power. A. Large System Results for Vector Normalization VN In this subsection, we derive DEs for γjk , when any of MRT, ZF, and RZF precoding schemes is used. 4 VN γjk = σ2 ρdl + djk var(hH jjk fjk ) + MN γjk = σ2 ρdl + ηj var(hH jjk fjk ) + L P 2 djk |E[hH jjk fjk ]| K P PL H 2 2 dli E[|hH l=1,l6=j dlk E[|hljk flk | ] ljk fli | ] + l=1 i=1,i6=k L P 2 ηj |E[hH jjk fjk ]| . K P PL H f |2 ] 2] + ηl E[|hH f | η E[|h l=1,l6=j l ljk li ljk lk (MRT−VN) γ jk = σ2 N ρdl + N1 where 2 d†jk N1 trΦjjk (18) L P K L P P † 1 † 2 dlk | N trΦljk | dli zli,jk + l=1 i=1 l=1,l6=j −1 1 trΦlli N 1 = trΘljk Φlli . N d†li = zli,jk (19) (20) Proof. The proof is provided in Appendix A. Theorem 2. Let A1 and A3 hold true. If RZF with VN is used, (RZF−VN) VN −−−−→ 0 almost surely while then γjk − γ jk N →∞ u2 (RZF−VN) γ jk = σ2 N ρdl d◦jk (1+ujkjk )2 + 1 N L P K P l=1 i=1  li,jk d◦li (1+u 2 + li ) L P l=1,l6=j |u |2 ljk d◦lk (1+u 2 lk ) (21) with d◦li = (1 + uli )2 1 0 N trΦlli Tl,IN (22) 1 trΦllk Tl (23) N 1 uljk = trΦljk Tl (24) N 1 |uljk |2 1 li,jk = trΘljk T0l,Φlli + × trΦllk T0l,Φlli N (1 + ulk )2 N   2 1 − Re trΦljk T0l,Φlli × u∗ljk (25) 1 + ulk N ulk = and Sl = ZNl . Also, Tl , T0l,IN , and T0l,Φlli are given in Theorems 7 and 8 in Appendix E. Proof. The proof is provided in Appendix B. Theorem 3. Let A1, A2 and A4 hold true. If ZF with VN is (ZF−VN) VN employed, then γjk − γ jk −−−−→ 0 almost surely with N →∞ (ZF−VN) γ jk ujk = σ2 N ρdl + 1 N L P K P l=1 i=1 li,jk uli + L P l=1,l6=j (17) l=1 i=1,i6=k Theorem 1. Let A1 hold true. If MRT with VN is used, then (MRT−VN) VN γjk − γ jk −−−−→ 0 almost surely with N →∞ (16) u2ljk ulk (26) where  1 tr Φlli Tl (27) N ! −1 K 1 X Φlli Tl = + IN (28) N i=1 uli  1 uljk = tr Φljk Tl (29) N |uljk |2 1 1 trΦllk T0l,Φlli li,jk = trΘljk T0l,Φlli + N ulk 2 N   2 1 − Re u∗ljk trΦljk T0l,Φlli (30) ulk N ! 0 K 1 X uli,Φllk Φlli 0 (31) Tl,Φllk = Tl + Φllk Tl N i=1 uli 2 uli = where u0l,Φllk = [u0l1,Φllk , . . . , u0lK,Φllk ]T ∈ CK is computed as u0l,Φllk = (IK − Jl )−1 vl,Φllk (32) with the entries of Jl ∈ CK×K and vl,Φllk ∈ CK are given by:  1 tr Φlln Tl Φlli Tl (33) [Jl ]n,i = 2 N uli 2  1 [vl,Φllk ]i = tr Φlli Tl Φllk Tl . (34) N Proof. The proof is provided in the Appendix C. Notice that the computation of the DEs with ZF precoding (either VN or MN) for the considered multicell Massive MIMO system is more involved than with MRT or RZF precoding schemes. This is mainly due to the fact that it is not straightforward to start with ZF precoder and then compute the DEs by applying common techniques, e.g., matrix inversion lemma. Therefore, in proving Theorem 3 (and also Theorem 6) we start with the DE of RZF and then use a bounding and limiting technique to compute the DE for ZF. B. Large System Results for Matrix Normalization MN Next, the DEs of γjk are given for MRT, ZF, and RZF. MN Note that the DEs of γjk for MRT and RZF are obtained from [5]. 5 Theorem 4. [5, Theorem 4] Let A1 hold true. If MRT with (MRT−MN) MN MN is used, then γjk − γ jk −−−−→ 0 almost surely N →∞ with 2 λj N1 trΦjjk (MRT−MN) (35) γ jk = L L P K P P σ2 1 1 2 λl zli,jk + λl | N trΦljk | N ρdl + N l=1 i=1 l=1,l6=j where zli,jk is given in (20) and K 1 X −1 1 trΦjjk . K N λj = (36) k=1 Theorem 5. [5, Theorem 6] Let A1 and A3 hold true. If RZF (RZF−MN) MN − γ jk −−−−→ 0 almost with MN is used, then γjk N →∞ surely with u2 λj (1+ujkjk )2 (RZF−MN) γ jk = σ2 N ρdl + 1 N L P K P l=1 i=1  li,jk λl (1+u 2 + li ) L P |u l=1,l6=j IV. E FFECT OF P OWER N ORMALIZATION T ECHNIQUES In this section, we use the asymptotic approximations provided above to gain novel insights into the interplay between the different system parameters and the power normalization techniques in Massive MIMO. To this end, we consider a special case of the general channel model of (1) in which Θjlk = djlk IN such that p (40) hjlk = djlk zjlk where zjlk ∼ CN (0, IN ) and djlk accounts for an arbitrary large-scale fading coefficient including pathloss and shadowing. Note this corresponds to a uncorrelated fading channel model, which is a quite popular model in Massive MIMO that allows us to capture the essence of the technology [1], [6]. Under the above circumstances, we have that: PK αji −1 1 and ū = 1 − K Corollary 1. Let λj = ū K i=1 d2jji N. If the channel is modelled as in (40), then |2 ljk λl (1+u 2 lk ) (ZF−VN) γ jk (37) = with K λl = N  1 Zl 1 trTl − tr( + αl IN )T0l,IN N N N −1 (38) Theorem 6. Let A1, A2 and A4 hold true. If ZF with MN is (ZF−MN) MN −−−−→ 0 almost surely with used, then γjk − γ jk (ZF−MN) γ jk = where νjk = with λj = λj = σ2 N ρdl  1 K in Theorem 3. K P i=1 1 uji + 1 N −1 L P K P l=1 i=1 λl li,jk uli 2 + L P l=1,l6=j λl d2ljk νjk + ū αlk l=1,l6=j | {z } (41) uljk 2 ulk 2 (39) where uli , uljk , and li,jk are given d2ljk νjk + λl 2 dllk l=1,l6=j | {z }   L σ2 KX dljk dljk 1 − + . Nρ N αlk | {zdl} | l=1 {z } Noise with αlk = (42) PL n=1 (43) Interference dlnk + σ2 ρtr . Proof. See Appendix D. PK d2lli −1 1 Corollary 2. Let θl = ( K . If the channel is i=1 αli ) modelled as in (40) and MRT is used, then Proof sketch. The proof follows the same procedure as the proof of Theorem 3 presented in Appendix C. Start with the (ZF−MN) (ZF−MN) triangle equality and bound |γlk −γ lk |. Then find (ZF−MN) (RZF−MN) by letting α → 0 in γ jk . the DE of γ jk The asymptotic expressions provided in Theorems 1, 2, 3, and 6 will be shown to be very tight, even for systems with finite dimensions, by means of numerical results in Section V. This allows us to use them for evaluating the performance of practical Massive MIMO systems without the need for time-consuming Monte Carlo simulations. Moreover, they lay the foundation for further analysis of different configurations of Massive MIMO systems (e.g., distributed massive MIMO systems [34], [35]). Next, they are used to get further insights into the system under investigation for uncorrelated fading channels. λj L X Pilot Contamination N →∞ (ZF−MN) L X Pilot Contamination where Sl = ZNl and Tl and T0l,IN are given by Theorem 7 and Theorem 8. Also uli , uljk , and li,jk are defined in Theorem 2. γ jk d2jjk αjk ū (MRT−VN) γ jk (MRT−MN) γ jk = = d2jjk αjk X d2ljk ϑjk + αlk l=1,l6=j | {z } Pilot Contamination d2 θj ( αjjk )2 jk L X (44) (45) dllk dljk 2 ϑjk + θl ( ) αlk l=1,l6=j | {z } Pilot Contamination with ϑjk L σ2 KX = + dljk . Nρ N | {zdl} | l=1 {z } Noise Interference (46) 6 Proof. The proof follows a similar procedure as that of Corollary 1. The results of Corollaries 1 and 2 are instrumental in obtaining the following insights into MRT and ZF with either MN or VN. Remark 1 (Effect of VN and MN). The terms νjk and ϑjk in (43) and (46) are the same for both VN and MN. This means that both normalization techniques have exactly the same effect on the resulting noise and interference terms experienced by each UE in the system. On the other hand, they affect differently the signal and pilot contamination powers. The expressions (41)-(46) explicitly state the relation between the SINR contributions (signal, interference, noise, and pilot contamination), the propagation environment, and the two normalization techniques for ZF and MRT precoding schemes. Remark 2 (On the mutual effect of UEs). If VN is employed, then the signal power and the pilot contamination of UE k in cell j, for both MRT and ZF precoding, depends only on the coefficients dlnk ∀l, n ∈ L through αlk . This means that they are both affected only by the large-scale gains of the UEs in the network using the same pilot. On the other hand, under MN both terms depend on the coefficients λl ∀l ∈ L (or θl for MRT) and thus are influenced by all the UEs in the network, even though they make use of different pilot sequences. Remark 3 (Large-scale fading and power normalization). Assume that the large-scale fading is neglected such that it is the same for every UE in the network, i.e., dljk = d ∀l, j, k. Then, the expressions in (41) and (42) for ZF and those in (44) and (45) for MRT become equal. This means that the large-scale fading has a fundamental impact on VN and MN and cannot be ignored. Consider now, for further simplicity, a single-cell setup, i.e., L = 1. Dropping the cell index, αlk reduces to αk = dk + σ 2 /ρtr . Also assume that the UEs operate in the high training SNR regime such that ρtr  1. Under these conditions, we have that: Lemma 1. If L = 1 and ρtr  1, then for ZF precoding, VN outperforms MN in terms of sum rate and the sum rate gap ∆r ≥ 0 is given by ! K X 1 ∆r = log 1 + σ2 1 − k=1   K log  1 + N ρdl ū dk  1 σ2 1 N ρdl ū K K P i=1 1 di  .  (47) Proof. From Corollary 1, setting L = 1 and assuming ρtr  1 2 we obtain that αk ' dk and νk ' Nσρdl . Then, the result follows by applying the Jensen’s inequality (by the convexity of log (1 + 1/x)). Notice that Lemma 1 extends the results of [26] and [27] to a system that accounts for CSI acquisition and arbitrary pathloss and UEs’ distribution. Also, observe that (41) and (42) simplify as: (ZF−VN) γ jk (ZF−MN) γ jk (N − K)ρdl dk σ2 K (N − K)ρdl  1 X 1 −1 = σ2 K i=1 di = (48) (49) from which it follows that VN provides higher SINR to the UEs that are closer to the BS and lower SINR for those that are far away from the BS (which resembles opportunistic resource allocation). On the other hand, MN provides a uniform quality of experience to all UEs. This proves evidence of the fact that ZF with VN resembles a sum rate maximizer. On the other hand, it provides a notion of fairness under MN. Notice that fairness means similar SINR (quality of experience) and it should not be confused with equal power allocation. The above results and observations will be validated below in Section V by means of numerical results. Also, the DEs provided in Corollaries 1 and 2 will be used to investigate the main limiting factors of Massive MIMO. V. N UMERICAL RESULTS Monte-Carlo simulations are now used to validate the asymptotic analysis for different values of N and K. We consider a multicell network composed of L = 7 cells, one in the center and six around. Each cell radius is 1000 meters. A 20 MHz channel is considered and the thermal noise power is assumed to be −174 dBm/Hz. The UEs are randomly and uniformly distributed within each cell excluding a circle of radius 100 meters. The channel is modeled as in [36]. In 1/2 particular, we assume that the matrices Θljk are given by p 1/2 (50) Θljk = dljk A where A = [a(θ1 ), . . . , a(θN )] ∈ CN with a(θi ) given by 1 a(θi ) = √ [1, e−i2πω sin(θi ) , . . . , e−i2πω(N −1) sin(θi ) ]T (51) N where ω = 0.3 is the antenna spacing and θi = −π/2 + (i − 1)π/N . Also, dljk is the large-scale attenuation, which is modeled as dljk = x−β ljk where xljk denotes the distance of UE k in cell j from BS l and β = 3.7 is the path-loss exponent. We let ρtr = 6 dB and ρdl = 10 dB, which corresponds to a practical setting [5]. The results are obtained for 100 different channel and UE distributions realizations. Figs. 1 and 2 validate the accuracy of the DEs provided in Theorems 1, 2, 3, and 6. In particular, both figures report the ergodic achievable sum rate of the center cell versus N for K = 8 and 16, respectively. The solid lines correspond to the asymptotic sum rate whereas the markers are achieved through Monte Carlo simulation. As it is depicted, the asymptotic approximation match perfectly with numerical results. Notice that Figs. 1 and 2 (and also Table 1) extend the results in [26] and [27] in the sense that account for CSI acquisition, pilot contamination, arbitrary pathloss and UEs’ distribution. In Lemma 1, it is shown that ZF under VN conveys a notion of sum rate maximization, while ZF with MN resembles a fairness provisioning precoder. Now, we use Table I to 7 TABLE I: SINR of each UE under ZF with VN and MN. Average sum rate at center cell [bps/Hz] 40 No. Ant. 35 30 25 N = 40 20 RZF-VN-DE RZF-VN-MonteCarlo ZF-VN-DE ZF-VN-MonteCarlo ZF-MN-DE ZF-MN-MonteCarlo MRT-VN-DE MRT-VN-MonteCarlo 15 10 5 60 70 80 90 100 110 120 130 140 150 Number of antennas N Average sum rate at center cell [bps/Hz] Fig. 1: Ergodic achievable sum rate of center cell for MRT, ZF, and RZF with VN and ZF with MN for K = 8. 70 60 RZF-VN-DE RZF-VN-MonteCarlo ZF-VN-DE ZF-VN-MonteCarlo ZF-MN-DE ZF-MN-MonteCarlo MRT-VN-DE MRT-VN-MonteCarlo 50 40 30 20 60 70 80 90 100 110 120 130 140 150 Number of antennas N Fig. 2: Ergodic achievable sum rate of center cell for MRT, ZF, and RZF with VN and ZF with MN for K = 16. validate this observation and also to verify the accuracy of the computed DEs for the simplified channel model in (40). The first column of Table I reports the number of antennas, the second one is the UE index. The third and fourth columns are the asymptotic (as given in (42)) and simulated SINRs of each UE under MN. The corresponding results for VN are reported in the sixth and seventh columns. The fifth and eighth columns report the percentage of the error while estimating a specific UE SINR with the computed DEs. As predicted by Lemma 1, ZF with MN provides a more uniform experience for all UEs, while ZF with VN provides very high SINRs to specific UEs (UEs 2, 4, and 6) and much lower SINRs to others. More precisely, the SINR variance with MN is equal to 0.8 (5.79) for N = 40 (N = 80), while for VN it is equal to 2627 (11550 for N = 80). Notice also that the percentage of error is always less than 4%, which proves the high accuracy of the DEs. Therefore, one can simply use the DEs to achieve insight into the network performance, instead of using timeconsuming Monte Carlo simulations. Moreover, the DEs do not contain any randomness and are purely based on the largescale statistics of the network. Hence, they can be used for network optimization purposes. The DEs given in Corollaries 1 and 2 and Theorems 2 N = 80 UE 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 MN DE 2.25 4.89 3.34 5.14 4.09 4.26 3.30 3.52 3.20 10.57 5.94 9.33 8.41 9.05 5.02 5.89 MN MC 2.19 4.84 3.29 5.12 4.02 4.41 3.33 3.50 3.15 10.40 6.03 9.47 8.62 9.12 4.90 5.74 Er. % 2.6 1.0 1.5 0.3 1.7 3.5 0.9 0.5 1.5 1.6 1.5 1.5 2.5 0.7 2 2.5 VN DE 1.85 147 3.61 37.5 1.97 85 2.14 2.52 3.1 316 6.40 72.2 3.87 182 3.50 4.28 VN MC 1.84 149 3.53 37.6 1.96 87 2.2 2.49 2.98 310 6.36 72.2 3.90 185 3.43 4.21 Er. % 0.5 1.3 2.2 0.2 0.5 2.3 2.8 1.2 3.8 1.9 0.6 0 0.7 1.6 2 1.6 and 5 are now used to investigate a common belief in the Massive MIMO literature, that is: under uncorrelated fading when N → ∞ the noise and interference contributions vanish asymptotically and pilot contamination becomes the unique bottleneck of the system performance. This follows also from the results in Corollaries 1 and 2 by letting N grow large with K kept fixed. However, in [29] it is shown that it is desirable for Massive MIMO systems to work in a regime N where K ≤ 10. Therefore, it is interesting to see what is the major impairment for Massive MIMO under this practical regime: (i) is it pilot contamination (or coherent interference)?; (ii) is it the noise and interference (or more exactly the noncoherent interference)?; (iii) how is the answer related to the choice of the power normalization technique and precoding scheme? To answer these questions, we employ the so-called pilot contamination-to-interference-plus-noise ratio (PCINR) metric, which is computed by using the DEs provided in Corollaries 1 and 2. Fig. 3 plots the PCINR as a function of N/K, i.e., the number of degrees of freedom per-user in the system. Although, the optimal operating regime for maximal spectral efficiency is for N/K < 10 [29], we consider N/K up to 20 to cover a wider range of Massive MIMO configurations. Moreover, as the interference increases by having more UEs in the system, we consider three different scenarios with K = 5, K = 10, and K = 15. Fig. 3 is divided into 3 regions based on the significance of the PCINR term such that, as we move away from region 1 towards region 3, the importance of pilot contamination increases while that of the interference plus noise reduces. Region 1 is where the noise and interference are the dominant limiting factors and pilot contamination has a negligible effect—less than 10% of the noise and interference. As it is depicted, MRT with MN operates within this regime, therefore pilot contamination is never a bottleneck for this scheme, which is mainly limited by noise and interference. Notice that by adding more UEs in the system, the PCINR reduces and pilot contamination becomes even less important. Hence, when MRT with MN is studied in Massive MIMO the effect of pilot contamination can be safely neglected. Region 2 represents the regime where the noise and inter- 8 1.6 1.4 ZF-MN based on Corollary 1 RZF-MN based on Theorem 5 ZF-VN based on Corollary 1 RZF-VN based on Theorem 2 MRT-VN based on Corollary 2 MRT-MN based on Corollary 2 1.2 ZF-MN based on Corollary 1 RZF-MN based on Theorem 5 ZF-VN based on Corollary 1 RZF-VN based on Theorem 2 MRT-VN based on Corollary 2 MRT-MN based on Corollary 2 1.4 region 3 1.2 region 3 Average of PCINR Average of PCINR 1 0.8 region 2 0.6 1 0.8 0.6 region 2 0.4 0.4 0.2 0.2 region 1 region 1 0 0 2 4 6 8 10 12 14 16 18 2 20 4 6 8 10 12 14 16 18 20 Degree of freedom per UE (N/K) Degree of freedom per UE (N/K) (a) K = 5. (b) K = 10. 1.6 1.2 Average of PCINR region 3 ZF-MN based on Corollary 1 RZF-MN based on Theorem 5 ZF-VN based on Corollary 1 RZF-VN based on Theorem 2 MRT-VN based on Corollary 2 MRT-MN based on Corollary 2 1.4 1 0.8 0.6 region 2 0.4 0.2 region 1 0 2 4 6 8 10 12 14 16 18 20 Degree of freedom per UE (N/K) (c) K = 15. Fig. 3: PCINR versus the degree of freedom per-user, for different values of K. ference are the main limiting factors, but pilot contamination is not negligible any more. It is interesting to observe that for the other schemes (other than MRT-MN), Massive MIMO often operates within this region. This shows that, although pilot contamination is a major challenge in Massive MIMO, the interference and noise have still the leading role in limiting the system performance. Finally, region 3 presents the superiority of pilot contamination effect. If K = 10, then Fig. 3b shows the superiority of interference and noise over pilot contamination for ZFMN and RZF-MN (ZF-VN and RZF-VN) up to N = 130 (N = 233) antennas at the BS. With MRT-VN, the system requires more than N = 510 to experience the superiority of pilot contamination over interference and noise. This increases to N = 2650 with MRT-MN. From Fig. 3, we see also that, for a given value of N/K, the value of PCINR for the considered schemes can be ordered as: ZF-MN = RZF-MN ≥ ZF-VN = RZF-VN ≥ MRT-VN ≥ MRT-MN. Based on the above discussion, it is clear that the choice of precoding scheme and normalization technique change the importance of pilot contamination, interference, and noise dramatically and it should be considered carefully when designing Massive MIMO systems. VI. C ONCLUSIONS Linear precoding schemes, such as MRT and ZF, have a fundamental role in Massive MIMO. Although these precoding schemes can be employed with optimized power control policies, they are usually implemented by simple matrix or vector power normalization techniques. This is due to the complexity of attaining optimal power control policies [24], as it requires coordination and cooperation among cells and computationally demanding algorithms. On the other hand, the two above precoding power normalization techniques are simple and efficient [2], [3], [5], [6]. 9 This work made use of large system analysis to compute tight asymptotic approximations of the SINR experienced by each UE in the system when using MN or VN. These results can be used to evaluate the performance of practical Massive MIMO systems without the need for time-consuming Monte Carlo simulations. Under uncorrellated fading channels, we analytically showed that MN and VN treat the noise and interference in the same manner, but have different effects on pilot contamination and received signal power. We also revealed the key role played by large-scale fading, positions of UEs, and pilot assignment into power normalization. We explained how a simple change in power normalization can resemble two totally different behaviors, namely, sum-rate maximization or fairness provisioning. Moreover, we showed numerically how the choice of the normalization technique can change the main bottleneck of Massive MIMO systems. 2 An asymptotic approximation for ĥH lli Cl ĥlli can be computed as follows 2 ĥH lli Cl[i] ĥlli a 2 ĥH lli Cl ĥlli = 2 (1 + ĥH lli Cl[i] ĥlli ) c  (1 1 = 1 (a) trE[ĥlli ĥH lli ] = 1 trΦlli (52) where in (a) we have applied Lemma 3 in Appendix E and used the fact that ĥlli ∼ CN (0, Φlli ). A PPENDIX B Let us define for convenience where (a) follows from Lemma 2 in Appendix E, (b)1 is obtained by applying Lemmas 3 and 4, and (c) follows from Theorems 7 and 8 with Sl = ZNl . By applying the continuous mapping theorem and the dominated convergence theorem yields d◦li  (1 + uli )2 . 1 0 N trΦlli Tl,IN (58) The main idea is to first compute a DE for RZF with αl = α ∀l ∈ L and then to obtain a DE for ZF by letting α → 0. By (ZF−VN) (ZF−VN) | can be using the triangle inequality |γlk − γ lk bounded as follows (ZF−VN) + |γlk (ZF−VN) − γ lk (RZF−VN) |γlk − (ZF−VN) | ≤ |γlk (RZF−VN) γ lk | + (53) and Cl = N Cl and Cl[k] = N Cl[k] with  −1 Cl = Ĥll ĤH + Z + α N I l l N ll  −1 Cl[k] = Ĥll[k] ĤH . ll[k] + Zl + αl N IN (54) (RZF−VN) |γ lk − Plugging (9) and (10) into (16) yields Then, we divide the numerator and denominator by N and replace each (RZF−VN) term in γjk with its DE. Notice that DEs of signal power component, variance component, and interference components are given in [5]. Therefore, we only need to compute a DE of the VN coefficient. From (10), we have that (56) |+ (ZF−VN) γ lk |. (59) (RZF−VN) Therefore, the term |γlk − γlk | can be made arbitrarily small α → 0. By applying Theorem 2, we have that (RZF−VN) (RZF−VN) the second term is such that |γlk − γ lk |0 (RZF−VN) for any α > 0. Consider now the third term |γ lk − (ZF−VN) (ZF−VN) (RZF−VN) γ lk |. Let us define γ lk = limα→0 γ lk . Observe that (RZF−VN) (55) (RZF−VN) γjk . 1 1 2 −1 = dli = (E[ĥH . lli Cl ĥlli ]) N N (RZF−VN) − γlk Next, we show that each term in the right hand side of (59) can be made arbitrarily small (i.e. smaller than any given ε > 0) (ZF−VN) (RZF−VN) when α → 0. Let us start with |γlk − γlk |. (ZF−VN) (RZF−VN) Notice that γlk and γlk are different because of the different form of Fl in (8) and (9). As α → 0 and for Zl = 0, we have  −1 RZF + N αI Ĥll ek lim flk = lim Ĥll ĤH N ll α→0 Zl =0,α→0  −1 ZF = Ĥll ĤH ek = flk . (60) ll Ĥll (ZF−VN) H H Ĥll[k] ĤH ll[k] = Ĥll Ĥll − ĥllk ĥllk d◦li (57) A PPENDIX C VN We begin by plugging (7) and (10) into γjk given in (16) (MRT−VN) to obtain γjk . Then, we divide the numerator and (MRT−VN) denominator of γjk by N and define d†li = N dli . By applying the continuous mapping theorem [31] and re(MRT−VN) placing each component of γjk by its DE, the DE (MRT−VN) of γjk is obtained. Notice that DEs of signal power component, variance component, and interference components are given in [5]. Therefore, we only need to compute a DE of the VN coefficient. The latter is given by E[ĥH lli ĥlli ] (1 2 1 N 2 trΦlli Cl + N1 trΦlli Cl )2 1 0 N 2 trΦlli Tl,IN 2 + N1 trΦlli T−1 l ) A PPENDIX A dli = b  (61) lim γ jk α→0 u2jk d◦jk (1+ujk )2 = lim α→0 σ2 N ρdl + = lim α→0 1a N σ2 N ρdl + 1 N 1 N L P K P l=1 i=1 L P K P l=1 i=1  li,jk d◦li (1+u 2 + li ) + L P l=1,l6=j  bN is equivalent to aN − bN −−−−→ 0. N →∞ |u l=1,l6=j α2 u2 d◦jk (α+αujk 2 jk ) α2 li,jk d◦li (α+αu 2 li ) L P |2 ljk d◦lk (1+u 2 lk ) . |αuljk |2 d◦lk (α+αu 2 lk ) 10 Define ulk := limα→0 αulk for every l and k. Based on [16] and by replacing ulk from Theorem 2 we have K 1 1 X Φlli trΦllk ( + IN )−1 α→0 α→0 N N i=1 αuli  1 (62) = tr Φllk Tl N ulk = lim αulk = lim with Tl = 1 N K X i=1 Φlli + IN uli !−1 (63) . Also defining uljk , limα→0 αuljk for every l, j, and k we have 1 1 uljk = lim α trΦljk Tl = trΦljk Tl . (64) α→0 N N ◦ For the term limα→0 dli , we obtain lim d◦li = lim α→0 α→0 (1 + uli )2 1 0 N trΦlli Tl,IN 2 2 uli uli = lim 2 1 = lim 2 0 0 α→0 α α→0 α uli,IN trΦ T lli l,IN N (65) where T0l,IN and u0li,IN are given in Theorem 8 in Appendix E. Notice that 1 lim α2 u0li,IN = α2 trΦlli T0l,IN α→0 N ! K 1 X u0lt,IN Φllt 2 1 trΦlli Tl = lim α + IM Tl α→0 N N t=1 (1 + ult )2 ! K 1 X (limα→0 α2 u0lt,IN )Φllt 1 + IN Tl = trΦlli Tl N N t=1 ult 2 (66) from which, by replacing limα→0 α2 u0lt,IN with ult , we have that (66) reduces to uli = N1 trΦlli Tl . Therefore, we have that limα→0 α2 u0lk,IN = ulk . From (65), we can thus conclude that d◦li = uli . On the other hand, for li,jk we have 2 li,jk = lim α li,jk α→0   2 1 1 Re u∗ljk trΦljk T0l,Φlli = trΘljk T0l,Φlli − N ulk N |uljk |2 1 + trΦllk T0l,Φlli (67) ulk 2 N where T0l,Φlli , limα→0 α2 T0l,Φlli is " # K 1 X u0lt,Φlli Φllt 0 2 Tl,Φlli = lim α Tl + Φlli Tl α→0 N t=1 (1 + ult )2 " # 0 K 1 X ult,Φlli Φllt = Tl + Φlli Tl (68) N t=1 ult 2 where u0lt,Φlli = limα→0 α2 u0lt,Φlli . From Theorem 8, we have u0l,Φlli = lim (IK − Jl )−1 α2 vl,Φlli = (IK − Jl )−1 vl,Φlli α→0 where Jl and vl,Φlli are given by (33) and (34), respectively. Therefore, lk,jn = limα→0 α2 lk,jn follows (30). Using all the above results in (61) completes the proof. A PPENDIX D For brevity we only consider ZF with VN. The same steps can be used for ZF with MN. If the channel is modelled as in (40), then Θljk = dljk IN and dllk dljk IN αlk Φljk = L P with αlk = yields dlnk + σ2 ρtr . n=1 d2 1 ulk = αllk tr (Tl ) lk N Tl = Call ū = (69) Plugging (69) into (27) and (28) with K 1 X N i=1 1  +1 1 tr Tl N !−1 Therefore, we have that  −1 1 K1 ū = tr (Tl ) = +1 . N N ū 1 N tr (Tl ). Solving with respect to ū yields ū = 1 − eventually have that ulk = and also uljk = term in dllk dljk αlk ū. (ZF−VN) γ jk (70) IN . K N. (71) Then, we d2llk ū αlk (72) Therefore, the pilot contamination reduces to L u2ljk X l=1,l6=j ulk = L X d2ljk ū. αlk (73) l=1,l6=j Let’s now compute [Jl ]n,i defined as in (33). Using the above results yields [Jl ]n,i =  1 d2lln d2lli 1 1 d2lln αli 2 = tr T . N 2 αln αli uli 2 N αln d2lli (74) Similarly, we have that d2lli d2llk 2 ū . αli αlk In compact form, we may write Jl and vl,k as [vl,k ]i = Jl = 1 al bTl N vl,k = d2llk 2 ū al αlk (75) (76) with [al ]i = d2lli /αli and [bl ]i = 1/[al ]i . Then, we have that (by applying Lemma 2)  −1 d2 1 d2 u0l,k = llk ū2 IK − al bTl al = llk ūal = ulk al . (77) αlk N αlk Plugging the above result into (31) produces   d2lli K1 d2 0 Tl,Φlli = Tl + 1 Tl = lli ūIN = uli IN . (78) αli N ū αli We are thus left with evaluating (30). Using the above results yields   dljk dljk 1 li,jk = tr T0l,Φlli − 2 tr Φljk T0l,Φlli + N dllk N  d2ljk 1 + 2 tr Φllk T0l,Φlli (79) dllk N 11 from which, using (69) and (78), we obtain li,jk = dljk uli − where T0l,Ωl ∈ CN ×N is defined as   K 0 X u (−α )Φ 1 l llj lj,Ωl + Ωl  × Tl (88) T0l,Ωl = Tl ×  N j=1 (1 + ulj (−αl ))2 d2ljk uli . αlk Therefore, we have that   1 dljk 1 li,jk = dljk 1 − . N uli N αlk (80) Plugging (72), (73) and (80) into (26) produces   L K L KX 1 X X li,jk dljk = dljk 1 − . N uli N αlk i=1 l=1 u0l,Ωl (−α) = (IK − Jl )−1 vl,Ωl (81) l=1 Collecting all the above results together completes the proof. A PPENDIX E U SEFUL R ESULTS Theorem 7. [16, Theorem 1] Let Bl = N1 Ĥll ĤH ll + Sl with Ĥll ∈ CN ×K be random with independent column vectors ĥllk ∼ CN (0, Φllk ) for k ∈ {1, . . . , K}, Sl ∈ CN ×N and Ql ∈ CN ×N be Hermitian nonnegative definite. Assume that Ql and the matrices Φllk for k ∈ {1, . . . , K} have uniformly bounded spectral norms (with respect to N ). Define mBl ,Ql (−αl ) , 1 trQl (Bl + αl IN )−1 N (82) Then, for any αl > 0, as N and K grow large with β = such that 0 < lim inf β ≤ lim sup β < ∞ we have that mBl ,Ql (−αl ) − m◦Bl ,Ql (−αl )  0 N K (83) where m◦Bl ,Ql (−αl ) is given by m◦Bl ,Ql (−αl ) = 1 trQl Tl N (84) with Tl is given by Tl = K 1 X Φlli + Sl + αl IN N i=1 1 + uli (−αl ) !−1 (85) (t) 1 trΦllk N K 1 X Φlli + Sl + αl IN N i=1 1 + u(t−1) (−αl ) li (0) with initial values ulk (−α) = 1 α !−1 where Jl ∈ CK×K and vl ∈ CK are: trΦllm Tl Φlln Tl [Jl ]mn = 2 1 ≤ m, n ≤ K N (1 + uln (−α))2 1 [vl,Ωl ]t1 = trΦllt Tl Ωl Tl 1 ≤ t ≤ K N Lemma 2 (Matrix Inversion Lemma). Let U be an N invertible matrix and x ∈ CN , c ∈ C for which U + c is invertible. Then −1 xH U−1 . xH U + c xxH = 1 + c xH U−1 x (89) (90) (91) ×N xxH (92) Lemma 3 (Trace Lemma). Let A ∈ CN ×N and x, y ∼ CN (0, N1 IN ). Assume that A has uniformly bounded spectral norm (with respect to N) and that x and y are mutually independent and independent of A. Then, for all p ≥ 1, 1 (93) xH Ax − trA  0 and xH Ay  0. N Lemma 4 (Rank-1 perturbation lemma). Let A1 , A2 , ..., with AN ∈ CN ×N , be deterministic with uniformly bounded spectral norm and B1 , B2 , ..., with BN ∈ CN ×N , be random N N N Hermitian, with eigenvalues λB ≤ λB ≤ . . . ≤ λB such 1 2 N BN that, with probability 1, there exist  > 0 for which λ1 >  for all large N . Then for v ∈ CN 1 1 H −1 trAN B−1 trAN (B−1  0. (94) N − N + vv ) N N −1 H −1 where B−1 exist with probability 1. N and (BN + vv ) where the elements of ul (−αl ) = [ul1 (−αl ), . . . , ulK (−αl )]T (t) are defined as uli (−αl ) = limt→∞ uli (−αl ), where for t ∈ {1, 2, . . .} ulk (−αl ) = where Tl and ul (−α) are given by theorem 1, and u0l,Ωl (−α) = [u0l1,,Ωl (−α), . . . , u0lK,,Ωl (−α)]T is computed from (86) for all k. Theorem 8. [16] Let Ωl ∈ CN ×N be Hermitian nonnegative definite with uniformly bounded spectral norm (with respect to N). Under the conditions of Theorem 1 1 1 −1 trQl ( Ĥll ĤH Ωl (87) ll + Sl + αl IN ) N N 1 1 −1 − trQl T0l,Ωl  0 ( Ĥll ĤH ll + Sl + αl IN ) N N R EFERENCES [1] T. L. Marzetta, “Noncooperative cellular wireless with unlimited numbers of base station antennas,” IEEE Trans. on Wireless Commun., vol. 9, no. 11, pp. 3590–3600, November 2010. [2] F. Rusek, D. Persson, B. K. Lau, E. Larsson, T. Marzetta, O. Edfors, and F. Tufvesson, “Scaling up MIMO: Opportunities and challenges with very large arrays,” IEEE Signal Proc. Mag., vol. 30, no. 1, pp. 40 – 60, Jan. 2013. [3] E. G. Larsson, O. Edfors, F. Tufvesson, and T. L. Marzetta, “Massive MIMO for next generation wireless systems,” IEEE Commun. Mag., vol. 52, no. 2, pp. 186–195, 2014. [4] L. Liu, C. Yuen, Y. L. Guan, Y. Li, and Y. Su, “Convergence analysis and assurance for gaussian message passing iterative detector in massive MU-MIMO systems,” IEEE Trans. Wireless Commun., vol. 15, no. 9, pp. 6487–6501, Sep. 2016. [5] J. Hoydis, S. Ten Brink, and M. Debbah, “Massive MIMO in the UL/DL of cellular networks: How many antennas do we need?” IEEE J. Sel. Areas Commun., vol. 31, no. 2, pp. 160–171, 2013. [6] H. Q. Ngo, E. G. Larsson, and T. L. Marzetta, “Energy and spectral efficiency of very large multiuser MIMO systems,” IEEE Trans. Commun., vol. 61, no. 4, pp. 1436–1449, 2013. [7] J. Zuo, J. Zhang, C. Yuen, W. Jiang, and W. Luo, “Energy-efficient downlink transmission for multicell massive DAS with pilot contamination,” IEEE Trans. Veh. Technol., vol. 66, no. 2, pp. 1209–1221, Feb. 2017. 12 [8] J. G. Andrews, S. Buzzi, W. Choi, S. V. Hanly, A. Lozano, A. C. Soong, and J. C. Zhang, “What will 5G be?” IEEE J. Sel. Areas Commun., vol. 32, no. 6, pp. 1065–1082, 2014. [9] T. L. Marzetta, “How much training is required for multiuser MIMO?” in IEEE Asilomar Conf. Signals, Sys. and Comput., Pacific Grove, CA, Nov. 2006, pp. 359–363. [10] E. Björnson, J. Hoydis, and L. Sanguinetti, “Pilot contamination is Not a fundamental asymptotic limitation in Massive MIMO,” in Proc. IEEE Int. Conf. Commun. (ICC), Paris, France, May 2017. [Online]. Available: https://arxiv.org/abs/1611.09152 [11] E. Björnson, J. Hoydis, and L. Sanguinetti, “Massive MIMO has unlimited capacity,” IEEE Trans. Wireless Commun., 2017, submitted. [Online]. Available: https://arxiv.org/abs/1705.00538 [12] E. Larsson, O. Edfors, F. Tufvesson, and T. Marzetta, “Massive MIMO for next generation wireless systems,” IEEE Commun. Mag., vol. 52, no. 2, pp. 186 – 195, Feb. 2014. [13] F. Boccardi, R. W. Heath, A. Lozano, T. L. Marzetta, and P. Popovski, “Five disruptive technology directions for 5G,” IEEE Commun. Mag., vol. 52, no. 2, pp. 74–80, Feb. 2014. [14] H. Yang and T. L. Marzetta, “Performance of conjugate and zeroforcing beamforming in large-scale antenna systems,” IEEE J. Sel. Areas Commun., vol. 31, no. 2, pp. 172–179, Feb. 2013. [15] J. Jose, A. Ashikhmin, T. L. Marzetta, and S. Vishwanath, “Pilot contamination and precoding in multi-cell TDD systems,” IEEE Trans. Wireless Commun., vol. 10, no. 8, pp. 2640–2651, 2011. [16] S. Wagner, R. Couillet, M. Debbah, and D. Slock, “Large system analysis of linear precoding in correlated miso broadcast channels under limited feedback,” IEEE Trans. Inf. Theory, vol. 58, no. 7, pp. 4509– 4537, Jul. 2012. [17] J. Zuo, J. Zhang, C. Yuen, W. Jiang, and W. Luo, “Multi-cell multiuser massive MIMO transmission with downlink training and pilot contamination precoding,” IEEE Trans. Veh. Technol., Aug. 2015. [18] A. Khansefid and H. Minn, “Achievable downlink rates of MRC and ZF precoders in massive MIMO with uplink and downlink pilot contamination,” IEEE Trans. Commun., vol. 63, no. 12, pp. 4849–4864, Dec. 2015. [19] A. Kammoun, A. Müller, E. Björnson, and M. Debbah, “Linear precoding based on polynomial expansion: Large-scale multi-cell MIMO systems,” IEEE J. Sel. Topics Signal Process., vol. 8, no. 5, pp. 861–875, Oct. 2014. [20] R. Krishnan, M. R. Khanzadi, N. Krishnan, Y. Wu, A. G. i Amat, T. Eriksson, and R. Schober, “Linear massive MIMO precoders in the presence of phase noise - a large-scale analysis,” IEEE Trans. Veh. Technol., vol. 65, no. 5, pp. 3057–3071, May 2016. [21] X. Li, E. Bjornson, E. G. Larsson, S. Zhou, and J. Wang, “A multicell MMSE precoder for massive MIMO systems and new large system analysis,” in IEEE Int. Conf. Global Commun. (GLOBECOM), San Diego, CA, Dec 2015, pp. 1–6. [22] M. Sadeghi and C. Yuen, “Multi-cell multi-group massive MIMO multicasting: An asymptotic analysis,” in Proc. IEEE Global Commun. Conf. (Globecom), San Diego, CA, Dec. 2015, pp. 1–6. [23] T. V. Chien, E. Bjornson, and E. G. Larsson, “Joint power allocation and user association optimization for massive MIMO systems,” IEEE Trans. Wireless Commun., vol. 15, no. 9, pp. 6384–6399, Sep. 2016. [24] Q. Zhang, S. Jin, M. McKay, D. Morales-Jimenez, and H. Zhu, “Power allocation schemes for multicell massive MIMO systems,” IEEE Trans. Wireless Commun., vol. 14, no. 11, pp. 5941–5955, Nov. 2015. [25] M. Sadeghi, L. Sanguinetti, R. Couillet, and C. Yuen, “Reducing the computational complexity of multicasting in large-scale antenna systems,” IEEE Trans. Wireless Commun., 2017, to appear. [Online]. Available: https://arxiv.org/abs/1702.05901 [26] C. Lee, C. B. Chae, T. Kim, S. Choi, and J. Lee, “Network massive MIMO for cell-boundary users: From a precoding normalization perspective,” in IEEE Globecom Workshops (GC Wkshps), Anaheim, CA, Dec. 2012, pp. 233–237. [27] Y.-G. Lim, C.-B. Chae, and G. Caire, “Performance analysis of massive MIMO for cell-boundary users,” IEEE Trans. Wireless Commun., vol. 14, no. 12, pp. 6827–6842, Dec. 2015. [28] G. Caire, N. Jindal, M. Kobayashi, and N. Ravindran, “Multiuser MIMO achievable rates with downlink training and channel state feedback,” IEEE Trans. Inf. Theory, vol. 56, no. 6, pp. 2845–2866, Jun. 2010. [29] E. Bjornson, E. G. Larsson, T. L. Marzetta et al., “Massive MIMO: Ten myths and one critical question,” IEEE Commun. Mag., vol. 54, no. 2, pp. 114–123, Feb. 2016. [30] M. Medard, “The effect upon channel capacity in wireless communications of perfect and imperfect knowledge of the channel,” IEEE Trans. Inf. Theory, vol. 46, no. 3, pp. 933–946, May 2000. [31] P. Billingsley, Probability and measure. John Wiley & Sons, 2008. [32] L. Sanguinetti, A. L. Moustakas, and M. Debbah, “Interference management in 5G reverse TDD hetnets with wireless backhaul: A large system analysis,” IEEE J. Sel. Areas Commun., vol. 33, no. 6, pp. 1187–1200, Jun. 2015. [33] L. Sanguinetti, A. L. Moustakas, E. Björnson, and M. Debbah, “Large system analysis of the energy consumption distribution in multi-user MIMO systems with mobility,” IEEE Trans. Wireless Commun., vol. 14, no. 3, pp. 1730–1745, Mar. 2015. [34] K. T. Truong and R. W. Heath, “The viability of distributed antennas for massive MIMO systems,” in 2013 Asilomar Conf. on Signals, Syst. and Comput., Pacific Grove, CA, Nov. 2013, pp. 1318–1323. [35] M. Sadeghi, C. Yuen, and Y. H. Chew, “Sum rate maximization for uplink distributed massive MIMO systems with limited backhaul capacity,” in 2014 IEEE Globecom Workshops (GC Wkshps), Austin, TX, Dec. 2014, pp. 308–313. [36] H. Q. Ngo, T. L. Marzetta, and E. G. Larsson, “Analysis of the pilot contamination effect in very large multicell multiuser MIMO systems for physical channel models,” in 2011 IEEE Int. Conf. Acoustics, Speech and Signal Process. (ICASSP), Prague, Czech, May 2011, pp. 3464–3467.
7cs.IT
arXiv:1505.06607v2 [cs.CE] 26 May 2015 arXiv: some other text goes here Stochastic Block Coordinate Frank-Wolfe Algorithm for Large-Scale Biological Network Alignment 1 Yijie Wang1 and Xiaoning Qian1 Department of Electrical & Computer Engineering, Texas A&M University, College Station, Texas, USA, 77843 (Dated: May 23, 2015) Abstract With increasingly “big” data available in biomedical research, deriving accurate and reproducible biology knowledge from such big data imposes enormous computational challenges. In this paper, motivated by recently developed stochastic block coordinate algorithms, we propose a highly scalable randomized block coordinate Frank-Wolfe algorithm for convex optimization with general compact convex constraints, which has diverse applications in analyzing biomedical data for better understanding cellular and disease mechanisms. We focus on implementing the derived stochastic block coordinate algorithm to align protein-protein interaction networks for identifying conserved functional pathways based on the IsoRank framework. Our derived stochastic block coordinate Frank-Wolfe (SBCFW) algorithm has the convergence guarantee and naturally leads to the decreased computational cost (time and space) for each iteration. Our experiments for querying conserved functional protein complexes in yeast networks confirm the effectiveness of this technique for analyzing large-scale biological networks. 1 Introduction First-order methods in convex optimization have attracted significant attention in statistical learning in recent years. They are appealing to many learning problems, such as LASSO regression and matrix completion, which have diverse applications in analyzing large-scale biological systems and high-dimensional biomedical measurement profiles [13, 7]. These first-order optimization methods scale well with the current “big” data in many biomedical applications due to their advantages that they have low computation burden per iteration and they are easy to be implemented on parallel computational resources. In this paper, we focus on the Frank-Wolfe algorithm, which is also known as the conditional gradient method. One of its advantages is that at each iteration step it decomposes the complex constrained optimization problem into sub-problems which are easier to solve. Additionally, it is a projection free algorithm, which avoids solving the projection problem for constrained optimization as done in many other algorithms. The original Frank-Wolfe algorithm, developed for smooth convex optimization on a polytope, dates back to Frank and Wolfe [4]. Dunn and Harshbarger [2, 3] have generalized the algorithm to solve the optimization for more general smooth convex objective functions over bounded convex feasible regions. Recently, researchers [9] have proposed stochastic optimization ideas to scale up the original Frank-Wolfe algorithm. Based on these previous seminal efforts, our main contribution in this paper is that we generalize the stochastic block coordinate Frank-Wolfe algorithm proposed in [9], previously with block separable constraints, to solve more general optimization problems with any convex compact constraints, including the problems with block inseparable constraints. Such a generalized algorithm has a broader range of biomedical applications, including biological network alignment. We prove the convergence of our generalized stochastic block coordinate Frank-Wolfe algorithm and evaluate the algorithm performance for querying conserved functional protein complexes in real-world protein-protein interaction (PPI) networks. In the following sections, we first describe the model formulation of the optimization problems that we are generally interested. Specifically, to address potential difficulty from more general convex compact constraints, we derive a new stochastic block coordinate Frank-Wolfe algorithm and provide the convergence proof. Then, we formulate the IsoRank problem for network alignment [11] as a convex programming problem and develop a SBCFW-IsoRank algorithm based on our new stochastic block coordinate FrankWolfe algorithm. At last, in our experiments, we show the efficiency and effectiveness of our algorithm for solving the PPI network query problem. 1 arXiv: some other text goes here 2 Stochastic Block Coordinate Descent Frank-Wolfe Algorithm Consider the minimization problem: min: f (x) (1) s.t. x ∈ D, where the objective function f (x) is convex and differentiable on RN , and the domain D is a compact convex subset of any vector space. We assume that the optimal solution x∗ to the above problem is non-empty and bounded without loss of generality. Assume that we can decompose the solution space RN into n equal-size subspaces: n RN = ⊕ RNi , N = i=1 n X Ni , (2) i=1 where N1 = . . . = Ni = . . . , Nn and RNi denotes the ith equal-size subspace along the corresponding coordinates. This decomposition enables scalable stochastic optimization algorithms. Based on this decomposition, Pn we introduce matrices Ui , who sum up to an identity matrix IN = i=1 Ui , and Ui is a N × N matrix with Ui (t, t) = 1, t ∈ RNi on its diagonal and the other entries being equal to zero. In typical stochastic optimization algorithms [12], instead of computing the gradient ∇f (x) at each iteration, the partial gradient of f (x) on a randomly selected subspace RNi is used: ∇i f (x) = Ui ∇f (x). (3) Now we generalize the previous stochastic block coordinate Frank-Wolfe algorithm derived in [9] to solve more general optimization problems with any compact convex constraints D. The new generalized stochastic block coordinate Frank-Wolfe (SBCFW) algorithm is illustrated in Algorithm 1. In the pseudo code, the operation i = Ck randomly selects one of the n equal-size subspaces to update the partial gradient at each iteration with the same probability. In addition, Uj × s = Uj × xk denotes the condition that the elements of the jth block of s equal to the elements of the jth block of xk . Algorithm1: Generalized SBCFW Algorithm 1 Let x0 ∈ D, k = 0. 2 While Stopping criteria not satisfied do 3 n Randomly divide RN into n blocks RN = ⊕ RNi ; i=1 4 5 6 Choose i = Ck ; Find ski such that ski := arg min 7 8 Determine the step size γ γ := arg min f ((1 − γ)xk + γski ); ∇i f (xk )T (s − xk ); Uj ×s=Uj ×xk ,∀j6=i; s∈D γ ∈[0,1] 9 Update xk+1 := (1 − γ)xk + γski ; 10 k = k + 1; 11 Endwhile Note that our generalized SBCFW algorithm is similar to the algorithm in [9], which aims to solve optimization problems with block separable constraints and has the sub-linear convergence property. However, our algorithm provides a more generalized framework, which can manipulate any convex and compact constraints no matter whether they are block separable or not. Because the setup of our algorithm is more general without any specific structure, it is difficult to obtain theorectical convergence rate guarantees. In this paper, we only provide the proof that our SBCFW converges to the global optimum. The convergence guarantee of the generalized SBCFW algorithm is provided by Theorem 1 below, which is based on Lemma 1: 2 arXiv: some other text goes here Lemma 1: At each iteration of the SBCFW algorithm, the following inequality holds  ∇f (xk )T Ei [ski ] − xk ≤ 0, (4) where Ei [ski ] is the expectation of ski with respect to the random selection of the ith cordinate block to the corresponding subspace. Proof. Assuming at the kth iteration, we solve the following optimization problem: min: Zki (s) := ∇i f (xk )T (s − xk ) s.t. Uj × s = Uj × xk , ∀j 6= i, (5) s ∈ D. The solution to (5) is ski . With ski achieving the minimum of (5), we have Zki (ski ) ≤ Zki (xk ) = ∇i f (xk )T (xk − xk ) = 0. (6) Zki (ski ) = ∇i f (xk )T (ski − xk ) ≤ 0. (7) Therefore, Taking expectation on both sides of the above inequality with respect to random blocks, we obtain   Ei ∇i f (xk )T (ski − xk ) ≤0 1X ∇i f (xk )T (ski − xk ) ≤ 0 ⇒ n i !T ! X 1 X k k k ⇒ ∇i f (x ) (si − x ) ≤0 n i i !T ! X 1X k k k ⇒ ∇i f (x ) s −x ≤0 n i i i  ⇒ ∇f (xk )T Ei [ski ] − xk ≤ 0. (8) The inequality in the third line can be derived based on the fact that ski − xk is a vector with only its ith coordinate block having non-zero values and the other parts being all Pzeros. With that, P the summation in the second line can be written as the inner product between vectors i ∇i f (xk ) and i (ski − xk ). We now analyze the convergence of the new SBCFW algorithm based on Lemma 1 from two cases. The first case is when  ∇f (xk )T Ei [ski ] − xk = 0. (9) This simply means that xk is a stationary point. Because the original objective function f (x) is convex, we can conclude that xk is the global minimum. Another case is when  ∇f (xk )T Ei [ski ] − xk < 0, (10) indicating that Ei [ski ] − xk is a decent direction based on the definition [10]. Hence, Ei [ski ] − xk can move along the direction to get closer to the global minimum in expectation. Furthermore, we compute the optimal step size at each iteration, therefore the objective function values are guaranteed to be non-increasing. With that, we present Theorem 1 as follows: Theorem 1: The sequence f (x1 ), f (x2 ), ..., f (xk ), ... generated by the SBCFW algorithm is nonincreasing f (x1 ) ≥ f (x2 ) ≥ ... ≥ f (xk ) ≥ f (xk+1 ), k → ∞. (11) 3 arXiv: some other text goes here 3 3.1 Biological Network Alignment Optimization Model Formulation In this section, we re-formulate the involved optimization problem for the network alignment algorithm— IsoRank [11] to address the potential computational challenges of aligning multiple large-scale networks. The new formulation has the same mathematical programming structure as the problem (1). Let Ga and Gb be two biological networks to align. Two networks has Na and Nb vertices respectively. We define B ∈ R(Na ×Nb )×(Na ×Nb ) as the Cartesian product network from Ga and Gb : B = Ga ⊗ Gb . Denote the all one vector 1 ∈ RNa ×Nb and B̄ = B × Diag(B1)−1 , (12) where Diag(B1) can be considered as a degree matrix with B1 on its diagonal and all the other entries equal to zero. B̄ contains the transition probabilities for the underlying Markov random walk in IsoRank [11]. It is well known that if Ga and Gb are connected networks and neither of them is bipartite graph, then the corresponding Markov chain represented by B̄ is irreducible and ergodic, and there exists a unique stationary distribution for the underlying state transition probability matrix B̄. The goal of the IsoRank algorithm is to find a right maximal eigenvector of the matrix B̄: B̄x = x and 1T x = 1, x ≥ 0, which corresponds to the best correspondence relationships between vertices across two networks. When two networks are of reasonable size, spectral methods as well as power methods can be implemented to solve the IsoRank problem [11]. However, with large-scale networks, the transition probability matrix B̄ can be extremely large (quadratic with Na × Nb ) and spectral methods can be computationally prohibitive. In this paper, we re-formulate this problem of searching for maximal right eigenvector as a constrained optimization problem: 1 B̄x − x 2 s.t. 1T x = 1, x ≥ 0. min: f (x) := 2 (13) (H) 1 After expanding the objective function, we obtain f (x) = xT M x, where M = B̄ T B̄ − B̄ − B̄ T +I. Therefore 2 the equivalent optimization problem is 1 T x Mx 2 s.t. 1T x = 1, x ≥ 0. min: f (x) := (14) (H) The gradient of f (x) can be easily computed ∇f (x) = M x. Furthermore, we find that the Hessian matrix of f (x) is M , which is a positive semi-definite matrix proven by Lemma 2 : Lemma 2 : M = B̄ T B̄ − B̄ − B̄ T + I is positive semi-definite. Proof. M can be written as M = (B̄ − I)T (B̄ − I), which proves the lemma. With Lemma 2, it is obvious that the objective function f (x) is convex. Also, the constraint set H = {x|xT 1 = 1, x ≥ 0} is a unit simplex, which is convex and compact. Hence, the IsoRank problem (13) has the same problem structure as (1) and our generalized SBCFW algorithm can be used to solve (14) with much better scalability and efficiency due to the efficiency of the randomized partial gradient computation at each iteration. Similarly as in [11], in addition to network topology, we can incorporate other information in the formulation for more biologically significant alignment results by replacing B̄ with B̂ = αB̄ +(1−α)S̄1T , α ∈ [0, 1]. Here S̄ = S/|S| is a normalized similarity vector with size Na × Nb , cancatenated from the doubly indexed similarity estimates S([u, v]) based on the sequence or function similarity between vertices u in Ga and v in Gb . 3.2 SBCWF-IsoRank Algorithm As shown in Section 3.1, f (x) in (13) is convex and the constraint set H in (14) is a convex compact set. Therefore, we can apply the generalized SBCWF algorithm proposed in Section 2 to solve the corresponding optimization problem (14). The detailed algorithm is illustrated in Algorithm 2. Here we want to emphasize 4 arXiv: some other text goes here that, in  each iteration of our SBCFW-IsoRank algorithm, both the time complexity and the space complexity N2 , which is achieved through tracking the vectors of pk = Exk and qk = Eski at step 2 and 10 are O n of each iteration in Algorithm 2, respectively. The stopping criterion is B̄x − x ≤ ξ kxk, which can be efficiently estimated by B̄x − x = xT M x = (Ex)T Ex = pTk pk , (15) which is taken in line 11 in the SBCFW-IsoRank algorithm. Algorithm 2: SBCFW-IsoRank Algorithm Input: ξ, n and E 1 for k = 0, ..., ∞ do 2 randomly divide RN into n equal-size parts 3 choose i = Ck 4 if (k == 0) n 5 initialize the ith block of x0 with N 6 endif 7 compute pk = Exk and ∇i f (xk ) = [E T ]i pk 8 solve the sub-problem: 9 ski := arg min ∇i f (xk )T (s − xk ) 10 11 12 13 14 Uj ×s=Uj ×xk , ∀j6=i; s∈H, qk = Eski compute if pTk pk < ξ kxk break; endif ∗ compute the  step size γk : pTk pk − pTk qk  min {γ̂, 1} γ̂ > 0, γ̂ = 15 γk∗ = pTk pk − 2pTk qk + qTk qk  0 o.w. 16 xk+1 = xk + γ k (ski − xk ) 17 endfor Output: xk 3.3 Initialization 2 In order to guarantee both the time and space complexity to be O( Nn ) at each iteration, we can not initialize the algorithm with randomly generated x0 to avoid a multiplication of a matrix of size N × N and a vector of size N , whose time and space complexity would be O(N 2 ). We propose to initialize x0 in the following way: First, randomly divide RN into n parts with equal sizes and randomly pick the ith part. Then, n we initialize every elements in the ith part with N , which makes x0 in the feasible space defined by the constraint set H. Using the above initialization strategy, the time and space complexity for computating 2 ∇i f (x0 ), p0 = Ex0 and q0 = Es0 are all under O( Nn ), which is easy to verify. 3.4 Algorithm to Solve the Sub-problem As shown in the SBCFW-IsoRank algorithm, at each iteration we need to solve a sub-problem. Fortunately, the sub-problem can be solved in a straightforward manner for the optimization problem (14). For the following sub-problem at iteration k: min: ∇i f (xk )T (s − xk ) s.t. s ∈ H, (16) k Uj × s = Uj × x , ∀j 6= i, 5 arXiv: some other text goes here the optimalP solution is s∗ = xk − Ui xk + Lej , where ej is an all-zero vector except that the jth element is 1 and L = l∈RNi xk (l). Here, j is the index of the coordinate with the smallest value in the ith block of ∇i f (xk ): j = arg min: [∇i f (xk )](l). (17) l∈RNi 3.5 Optimal Step Size To obtain the optimal step size at each iteration, we need to solve the following optimization problem: T  min: xk + γ(sk − xk ) M xk + γ(sk − xk ) s.t. 0 ≤ γ ≤ 1, (18) pTk pk − pTk qk > 0, which is the pTk pk − 2pTk qk + qTk qk solution to (18) without any constraints, the optimal solution γ ∗ is the minimum value between 1 and γ̂, otherwise γ ∗ = 0. The definition of pk and qk are given in lines 7 and 10 in Algorithm 2. which is the classic quadratic form with respect to γ. If γ̂ = 3.6 Time and Space Complexity At each iteration, the most computationally expensive operations are the updates of pk and qk (lines 7 and 10 of SBCFW-IsoRank) and the calculation of the partial gradient ∇i f (xk ) (line 7 of SBCFW-IsoRank). The calculation of pk and qk are similar. From line 10 of Algorithm 2, we know pk = Exk  = E xk−1 + γ k−1 (sk−1 − xk−1 ) = pk−1 + γ k−1 k−1 E(s −x k−1 (19) ). The second equation is derived by replacing xk with the equation in line 16 of our SBCFW-IsoRank algorithm. Because we keep tracking pk at each iteration,  we do not need to recompute pk−1 . Therefore, we only need N2 k−1 k−1 to compute E(s −x ), which takes O operations because (sk−1 − xk−1 ) is a vector, with only n itsith block  being non-zeros and all the other parts are zeros. Additionally, the memory consumption is also N2 O by the similar argument. Similarly, we can compute qk n qk = Esk  = E xk + (Lej − Ui xk ) (20) = pk + E(Lej − Ui xk ), where (Lej −Ui xk )is alsoa vector with only the ith block  having  non-zero values. Therefore, the computation N2 N2 operations and consumes O memory. of qk also takes O n n The equation of calculating ∇i f (xk ) is as follows: ∇i f (xk ) = [E T ]i pk , (21) where the operator [·]i is to get the rows of the matrix corresponding to the ith coordinate block. it  2 Hence,  N k is easy to verify that the time complexity and space complexity of computing ∇i f (x ) are O . n In summary, based on the above both the time complexity and space complexity of our SBCFW analyses,  N2 IsoRank at each iteration are O . n 6 arXiv: some other text goes here YGR047C YGR047C YOR110W YOR110W YDR362C YDR362C YPL007C YPL007C YBR123C YBR123C YAL001C YAL001C (b) Sub-Network in Collins (a) Sub-Network in Krogan Figure 1: Query subnetwork and its aligned result in the target network: (a) the query subnetwork in the Krogan’s yeast PPI network; (b) the aligned result in Collins yeast PPI network. 4 Experiments In this section, we apply our SBCFW-IsoRank algorithm to two network query problems. For the first set of experiments, we take a known protein complex in an archived yeast protein-protein interaciton (PPI) network in one database [8] as the query to search for the subnetwork in another yeast PPI network [5] with different archived interactions. We call this yeast-yeast network query problem. The goal of this set of experiments is to check the correctness of our algorithm as we have the ground truth for the target subnetwork. With that, we aim to test the convergence property of our algorithm under different partitions and the relationship between the number of iterations and number of partitions. The second experiment is to query a large-scale yeast PPI network in IntAct [6] to find similar subnetworks of proteins with similar cellular functionalities for a known protein complex in human PPI network. The aim of this experiment is to show that our new algorithm can help transfer biology knowledge from model organisms to study potential functionalities of molecules in different organisms. 4.1 Yeast-Yeast Network Query Problem We test our SBCFW-IsoRank algorithm on the yeast-yeast PPI network query problem by solving the optimization problem introduced in the previous section. We take a subnetwork with 6 proteins (Fig. 1(a)) from the Krogan’s yeast PPI network [8] as the query example to search for the conserved functional complex in a target network, which is the Collins network [5] with 1,622 proteins and 9,074 interactions. The query subnetwork is the transcription factor TFIIIC complex in the Krogan’s network and we are interested in testing whether we can find the same subnetwork in the Collins network. The dimension of our optimization problem is 6 × 1, 622 = 9, 732. We run this preliminary example so that we can compare our stochastic optimization results with the results from the power method, which is typically done in the original IsoRank algorithm [11]. Theoretically, the time and space complexity of our SBCFW-IsoRank at each iteration are both O(N 2 /n) based on the analysis in Section 3.6. Compared to O(N 2 ) time and space complexity for the power method by IsoRank [11], our SBCFW-IsoRank algorithm can scale better with properly selected n. As both the query example and the target network contain interactions among proteins from the same organism—yeast, we can easily check the correctness of the query result. We define the accuracy as the number of corrected aligned proteins divided by the total number of proteins in the query subnetwork. We implement the SBCFW-IsoRank algorithm for different numbers of partitions n but use the same stopping criterion: B̂x − x ≤ ξ kxk , ξ = 0.1. In Table I, we find that our stochastic optimization algorithm obtains 7 0.14 Objective Function Value arXiv: some other text goes here 0.16 n=2 n=5 n=10 n=30 n=50 n=100 n=200 0.12 0.1 0.08 0.06 0.04 0.02 0 0 1000 2000 3000 #. Iterations 4000 Figure 2: The change of the objective function values with the increasing number of iterations with different numbers of partitions. the same biologically meaningful results as the power method. Fig. 2 shows the changes of the objective function values with respect to the increasing number of iterations. As illustrated in Fig. 2, our algorithm converges for all different n. Additionally, we find the larger the number of partitions n is, the larger the number of iterations we need to have the algorithm converge to the global optimum with the same stopping criterion. This clearly demonstrates the tradeoff between the efficiency and scalability of the stochastic optimization algorithms. Interestingly, we notice that for n = 10, 30, and 50, the number of iterations does not increase much, which indicates that we may achieve fast computation with reasonably large n because our algorithm is more efficient for larger n at each iteration. Table 1: Comparison on different decompositions with ξ = 0.1. #. of partitions (n) Computational time (s) #. Iterations Accuracy 2 11.60 648 100% 5 8.53 1,045 100% 10 7.44 1,742 100% 30 5.05 1,880 100% 50 4.93 2,070 100% 100 7.06 2,942 100% 200 13.05 4,478 100% To further investigate the performance with different n, we run our algorithm 10 times for each n and show the average computational time, the average number of iterations, and the average accuracy score in Table I. From Table I, we observe that for all different n, our algorithm can obtain 100% accuracy, which again demonstrates the effectiveness and convergence of our generalized SBCFW algorithm. Also, we notice that with the increasing n, the number of iterations increase; however, the computational time is first reducing then increasing. For example, when n = 2, our algorithm converges with the smallest number  2 of iterations, N but the computational time is not the best because at each iteration the algorithm takes O operations. 2 In contrast, when n = 50, though the number of iterations is larger, but it reaches the global optimum with 8 arXiv: some other text goes here PUP3 PSMB2 PSMB1 PSMB5 PSMA6 PRE9 PSMB4 PRE2 PRE7 PSMB7 PSMA2 PSMB3 PSMA1 PRE8 PSMB6 PRE5 PRE4 PUP1 SCL1 PSMA7 PSMA3 PRE3 PRE6 PRE1 PUP2 PRE10 PSMA4PSMA5 (a) The proteasome core complex (Human) (b) The proteasome core complex (Yeast) Figure 3: Querying human protein complex in a yeast PPI network. The proteins are annotated by their gene names. The solid lines are protein interactions and the dash lines denote orthologous relationships based on protein sequence similarity by BLAST between the proteins in different organisms. (a) Human proteasome core complex; (b) The aligned proteasome core complex in yeast found by SBCFW-IsoRank. the least computation time, which is indeed twice faster than n = 2. The trend of the computational time implies that there may exist the best number of partitions n∗ . Empirically, when n < n∗ the computational time decreases while the computational time can increase when n > n∗ . However, it is difficult to provide a theoretical proof for this observed phenomenon. Finally, for the scalibility of the algorithm, we always prefer larger n to make the memory requirement as low as possible. 4.2 Human-Yeast Network Query Problem We further study the biological signficance of network query results by our SBCFW-IsoRank algorithm. We extract a subnetwork as a query example from a human PPI network archived in IntAct [6]. The query subnetwork is the proteasome core complex, with induced interactions among the corresponding proteins from IntAct [6]. The proteasome core complex in human consists of 14 proteins in total, as shown in Fig. 3(a). The target network is the yeast PPI network, also obtained from IntAct [6], which has 6,392 proteins and 77,065 interactions. Our goal is to find the most similar subnetwork to the human proteasome core complex in the target yeast PPI network, based on both the interaction topology and the protein sequence similarity, which is computed by BLAST [14]. We first construct the alignment network, which has N = 14 × 6, 392 = 89, 488 vertices. By our SBCFWIsoRank algorithm with n = 300, instead of operating a matrix of size 89, 488 × 89, 488 by the power method, we only need to handle a matrix of size 298 × 89, 488. At each iteration, the computational time as well as the memory requirement are reduced 300 times. Our Matlab implementation of SBCFW-IsoRank on a MacPro notebook with 8GB RAM takes only around 750 seconds to converge by reaching the stopping criteria (ξ = 0.1). The identified subnetwork in the target yeast PPI network by our algorithm is illustrated in Fig. 3(b). To evaluate the biological significance of the obtained subnetwork, we check the p-value based on GO (Gene Ontology) enrichment analysis using GOTerm Finder [1]. The identified subnetwork is significantly enriched in GO term GO:0005839, which is in fact the same proteasome core complex, with p-value 9.552e − 36. This experiment demonstrates that our algorithm can find the biologically consistent groups of proteins with the same cellular functionalities as the proteins in the query subnetwork, hence with the capability of transferring existing biology knowledge in model organisms (yeast for example) to less studied organisms when the group of proteins in the query subnetwork require better understanding of their cellular functionalities. 9 arXiv: some other text goes here 5 Conclusions In this paper, we generalize the block coordinate Frank-Wolfe algorithm to solve general convex optimization problems with any convex and compact constraint set. Our generalized SBCFW algorithm has the convergence guarantee. We re-formulate the IsoRank problem to such a convex programming problem and solve the biological network alignment problem by our SBCFW-IsoRank algorithm, which scales better with the size of networks under study. The scalability, efficiency, and effectiveness of our algorithm on solving IsoRank are demonstrated for real-world PPI network query problems. In our future work, we will consider the derivation of the optimal partition number for better tradeoff between computational efficiency and scalability. 6 Acknowledgements The authors would like to thank Simon Lacoste-Julien for pointing out the error in the original conference paper. This work was partially supported by Awards #1447235 and #1244068 from the National Science Foundation; as well as Award R21DK092845 from the National Institute Of Diabetes And Digestive And Kidney Diseases, National Institutes of Health. References [1] Boyle, E., Elizabeth, I., Weng, S., Gollub, J., Jin, H., Botstein, D., Cherry, J., and Sherlock, G. GO::TermFinder—open source software for accessing Gene Ontology information and finding significantly enriched Gene Ontology terms associated with a list of genes. Bioinformatics 20 (2004), 3710–3715. [2] Dunn, J. Convergence rates for conditional gradient sequences generated by implicit step length rules. SIAM Journal on Control and Optimization 5, 473-487 (1980). [3] Dunn, J., and Harshbarger, S. Conditional gradient algorithms with open loop step size rules. Journal of Mathematical Analysis and Applications 62, 432-444 (1978). [4] Frank, M., and Wolfe, P. An algorithm for quadratic programming. Naval Research Logistics Quarterly 3, 95-110 (1956). [5] Hasty, J., McMillen, D., Issacs, F., and Collins, J. Computational studies of gene regulatory networks: in numero molecular biology. Nat Rev Genet 2 (2001), 268–279. [6] Kerrien, S., Aranda, B., Breuza, L., and et al. The intact molecular interaction database in 2012. Nucleic Acids Research 40, D1 (2012), D841–D846. [7] Klau, G. A new graph-based method for pairwise global network alignment. BMC Bioinformatics 10, Suppl 1 (2009), S59. [8] Krogan, N., et al. Global landscape of protein complexes in the yeast Saccharomyces cerevisiae. Nature 440 (2006), 4412–4415. [9] Lacoste-Julien, S., Jaggi, M., Schmidt, M., and Pletscher, P. Block-coordinate frank-wolfe optimization for structural svms. In International Conference on Machine Learning (2013). [10] Ortega, J., and Rheinbold, W. C. Iterative Solution of Nonlinear Equations in Several Variables. Society for Industrial and Applied Mathematics, 1970. [11] Singh, R., Xu, J., and Berger, B. Global alignment of multiple protein interaction networks with application to functional orthology detection. Proc. Natl Acad. Sci. 105 (2008), 12763–12768. [12] Uryasev, S., and Pardalos, P. M., Eds. Stochastic Optimization: Algorithm and Application. Springer, 2001. 10 arXiv: some other text goes here [13] Zaslavskiy, M., Bach, F., and Vert, J. Global alignment of protein-protein interaction networks by graph matching methods. Bioinformatics 25 (2009), 259–267. [14] Zhang, Z., Schwartz, S., Wagner, L., and Miller, W. A greedy algorithm for aligning dna sequences. J Comput Biol 7(1-2) (2000), 203–214. 11
5cs.CE
Lifting Linear Extension Complexity Bounds to the Mixed-Integer Setting arXiv:1712.02176v1 [cs.DM] 6 Dec 2017 Alfonso Cevallos* Stefan Weltge† Rico Zenklusen‡ December 7, 2017 Abstract Mixed-integer mathematical programs are among the most commonly used models for a wide set of problems in Operations Research and related fields. However, there is still very little known about what can be expressed by small mixed-integer programs. In particular, prior to this work, it was open whether some classical problems, like the minimum odd-cut problem, can be expressed by a compact mixedinteger program with few (even constantly many) integer variables. This is in stark contrast to linear formulations, where recent breakthroughs in the field of extended formulations have shown that many polytopes associated to classical combinatorial optimization problems do not even admit approximate extended formulations of sub-exponential size. We provide a general framework for lifting inapproximability results of extended formulations to the setting of mixed-integer extended formulations, and obtain almost tight lower bounds on the number of integer variables needed to describe a variety of classical combinatorial optimization problems. Among the implications we obtain, we show that any mixed-integer extended formulation of sub-exponential size for the matching polytope, cut polytope, traveling salesman polytope or dominant of the odd-cut polytope, needs Ω(n/ log n) many integer variables, where n is the number of vertices of the underlying graph. Conversely, the above-mentioned polyhedra admit polynomial-size mixed-integer formulations with only O(n) or O(n log n) (for the traveling salesman polytope) many integer variables. Our results build upon a new decomposition technique that, for any convex set C, allows for approximating any mixed-integer description of C by the intersection of C with the union of a small number of affine subspaces. Keywords: extension complexity, mixed-integer programs, extended formulations 1 Introduction Mixed-integer linear extended formulations (MILEFs) are one of the most common models to mathematically describe a wide variety of problems in Operations Research and related fields. This is due to their high expressive power, which made them the tool of choice for numerous real-world optimization problems, and also led to a large ecosystem of commercial solvers and modeling languages supporting mixed-integer models. Despite their prevalence, the relation between what can be expressed by mixed-integer formulations and the number of integer variables used remains badly understood. In particular, it is open how many integer variables are needed to obtain a compact, i.e., polynomial-size, MILEF for classical combinatorial objects including matchings, traveling salesman tours, cuts, stable sets, vertex covers, and odd cuts, just to name a * Department of Mathematics, ETH Zurich, Zurich, Switzerland. Email: [email protected]. Department of Mathematics, ETH Zurich, Zurich, Switzerland. Email: [email protected]. ‡ Department of Mathematics, ETH Zurich, Zurich, Switzerland. Email: [email protected]. Supported by the Swiss National Science Foundation grant 200021 165866. † 1 few. Moreover, there are natural problem classes beyond classical combinatorial optimization problems, for which efficient algorithms are known and yet, prior to this work, it was open whether they could as well be solved efficiently via a MILEF with a very small number of integer variables (maybe even just constantly many), through the use of Lenstra’s Algorithm [21]. Bimodular integer programming is such an example (we expand on this in Section 5.8). Whereas MILEFs are mostly used to describe hard problems, the hope to find such efficiently solvable MILEFs is driven by the desire to cast efficiently solvable problems, for which only specialized procedures are known, into a common, well-studied framework, for which there are moreover strong solvers available. The only prior result on lower bounds for the number of integer variables in MILEFs, p shows that any compact formulation of the matching polytope of a complete graph with n vertices needs Ω( n/log n) integer variables [17]. Unfortunately, the presented technique is highly specialized to the matching polytope, heavily exploiting its facet structure. Moreover, this lower bound leaves a large gap compared to the canonical description of all matchings using Θ(n2 ) many integer variables, one for each edge. The goal of this work is to address this lack of understanding of the expressive power of MILEFs as a function of the number of constraints and integer variables used, by presenting a general framework to lift linear extension complexity results for approximate extensions to the mixed-integer setting. To better put our results into context, we start with a brief summary of some basics on linear extensions, which also allows us to introduce notations and terminology to be used later, and formalize the notion of MILEFs. The typical settings in discrete optimization for which linear or mixed-integer models are developed ask about optimizing a linear function over some set of vectors X ⊆ Zd , or often even just X ⊆ {0, 1}d . The set X could for example correspond to the characteristic vectors of all matchings in a graph G = (V, E), in which case d = |E|. Clearly, such problems can be restated as optimizing a linear function over the corresponding polytope P ⊆ Rd , which is simply the convex hull of the points in X , i.e., P = conv(X ). For X being all matchings of a graph, P would therefore correspond to the matching polytope. Hence, a discrete optimization problem gets described by a linear program, which is algorithmically well understood. Ideally, to solve a linear program over P , we would like to have an inequality description of P , i.e., P = {x ∈ Rd | Ax ≤ b}. Unfortunately, for many polytopes that arise in combinatorial optimization, such descriptions require an exponential number of inequalities. However, some of these polytopes admit much smaller descriptions if we allow the use of “additional variables”, i.e., we allow describing P as P = {x ∈ Rd | ∃y ∈ Rℓ : Ax + By ≤ b} , (1) where Ax + By ≤ b is a system of (preferably few) linear inequalities. The description Q = {(x, y) ∈ Rd × Rℓ | Ax + By ≤ b} is called an extended formulation of P . It allows for stating the original problem as a linear program over the solutions of Q. Understanding which polytopes admit small extended formulations is the scope of the field of extended formulations and we refer to [8, 18] and [9, Chap. 4] for many examples and background material. Formally, the extension complexity xc(P ) of a polyhedron P is the minimum number of facets of an extended formulation Q of P . Clearly, compact (i.e., polynomial-size) extended formulations are desirable since they allow for rephrasing the original problem as a small linear program. Whereas the above definition of an extended formulation Q of P requires P to be an axis-parallel projection of Q, one can lift this restriction and allow for P to be some affine image of Q. This generalization, which we use in this paper for convenience, can easily be seen not to have any impact to the notion of extension complexity. More formally, we say that a polyhedron Q is a linear extended formulation (LEF) of P if there exists an affine map π such that P = π(Q). Moreover, the size of a LEF is equal to the number of its facets. The study of linear extensions has received considerable attention recently due to breakthrough results stating that, for various prominent polytopes that arise in combinatorial optimization, the number of inequalities in every description of type (1) is super-polynomial in d, see, e.g., [14, 29, 19, 3, 26, 15]. 2 This situation changes dramatically if we further allow for imposing “integrality constraints”, which leads to the notion of mixed-integer linear extended formulations. In this setting, we describe P as n o P = conv x ∈ Rd ∃y ∈ Rℓ , z ∈ Zk : Ax + By + Cz ≤ b . (2) In other words, P is described by some polyhedron Q = {(x, y, z) ∈ Rd × Rℓ × Rk | Ax + By + Cz ≤ b} that is intersected with k integrality constraints, projected down to a subset of the coordinates, and the convex hull of the resulting set is finally considered. The complexity of such a description of P is now captured by 2 parameters, namely the number m of facets of Q—which is again called the size of Q—and the number k of integer variables. As in the case of linear extensions, we can lift the restriction of the projection being axisparallel, and allow for imposing integrality constraints on affine forms, without any impact on the values for m and k that can be achieved. Formally, we say that a polyhedron Q ⊆ Rℓ is a MILEF of complexity (m, k) of P ⊆ Rd , if the number of facets of Q is at most m, the number of integrality constraints k, and there are affine maps σ : Rℓ → Rk and π : Rℓ → Rd such that o    n = conv π Q ∩ σ −1 (Zk ) . (3) P = conv π(x) x ∈ Q, σ(x) ∈ Zk When we need to be specific, we also say that the triple (Q, σ, π) is a MILEF of P . Again, a description of P in terms of a MILEF (with corresponding maps π and σ), allows for reducing any linear programming problem over P to the problem of maximizing a linear function over the mixed-integer set π(Q ∩ σ −1 (Zk )). Even very difficult structures, like stable sets, or sets over which we can efficiently optimize but for which no small extended formulation exists, like matchings, can easily be described as small mixed-integer (or even just integer) formulations. On the downside, mixed-integer linear programs are a considerably harder problem class than their linear counterparts. The currently fastest algorithms, in terms of dependence on the number of integer variables k, have a running time dependence of kO(k) [21]; hence, one needs k = O( log d/log log d) for this expression to become polynomial, where d corresponds to the input size of the original problem. Thus, for hard problems, like maximum stable sets, we do not expect that MILEFs exist with both small size and few integer variables. However, the mentioned achievements in the field of extended formulations did not seem to give rise to general techniques for obtaining lower bounds on the number of integer variables in the mixed-integer setting. In this work, we demonstrate how recent generalizations of results in extended formulations, namely inapproximability results for extended formulations, can be leveraged in a general way to obtain lower bounds on m and k for any MILEF of complexity (m, k) for the problem in question. Actually, the lower bounds we obtain even hold for any MILEF that is a close approximation (in a sense we will define formally later) of the problem under consideration. As a consequence, we can show close-to-optimal lower bounds on k for any compact (approximate) MILEF of classical polytopes like the matching polytope, the cut polytope, and the dominant of the odd-cut polytope. 1.1 Main results and consequences To exemplify the type of results we can derive from our technique, and to highlight its breadth, we first state some hardness results for classical combinatorial problems and for an efficiently solvable class of integer programs (bimodular integer programs, which we will formally define in Section 5.8), and later discuss our general framework allowing to derive these and further results as consequences. To this end, let Kn denote the complete undirected graph on n vertices. 3 Polytope(s) Matching Odd-cut dominant Cut TSP Stable set Knapsack Matroid Bimodular Lower bound Upper bound Ω(n/log n) Ω(n/log n) Ω(n/log n) Ω(n/log n) O(n) O(n) O(n) O(n log n) √ Ω( n/log n) √ Ω( n/log n) √ Ω( n/log n) √ Ω( n/log n) O(n) O(n) − O(n) Figure 1: Bounds on the number of integer variables in MILEFs of a certain size. The first four rows refer to the respective polytopes on the complete undirected graph on n nodes. Here, the lower bounds hold for MILEFs up to size 2cn for some constant c > 0 (see Theorem 1). The lower bounds in the latter four rows refer to stable set polytopes of n-vertex graphs, knapsack polytopes of n-item instances, independence polytopes of matroids with √ cardinality n, and integer hulls of conic bimodular integer programs with n variables, respectively. These bounds hold for MILEFs up to size 2c n , and these bounds are to be interpreted as guaranteeing the existence of polytopes in the respective family for which the lower bound holds (see Theorem 2). The right column contains upper bounds on the number of integer variables that are sufficient to obtain MILEFs of size polynomial in n for the respective family, and these bounds are valid for all members of the family (see Section 6). For the case of independence polytopes of matroids, no polynomial-size MILEF is known. Theorem 1. There is a constant c > 0 such that the following holds. Let n ∈ Z≥1 , and let m, k > 0 such that there exists a MILEF with complexity (m, k) with m ≤ 2c·n for either: • the matching polytope of Kn , • the dominant of the odd-cut polytope of Kn , • the cut polytope of Kn , or • the traveling salesman polytope of Kn . Then k = Ω(n/log n). As we will see later, in all of the above cases our lower bound on the number of integer variables is tight up to a factor that is poly-logarithmic in n. Theorem 2. There is a constant c > 0 such that the following√holds. Let n ∈ Z≥1 , and let m, k > 0 such that there exists a MILEF with complexity (m, k) with m ≤ 2c· n for either: • the stable set polytope of any n-vertex graph, • the knapsack polytope of any n-item instance, • the independence polytope of any matroid on a ground set of cardinality n, or • the convex hull of all feasible points of any conic bimodular integer program with n variables. √ Then k = Ω( n/log n). A summary of stated lower bounds together with upper bounds on the number of integer variables needed in polynomial-size MILEFs can be found in Figure 1. Actually, our techniques imply even slightly stronger versions of Theorems 1 and 2 that rule out MILEFs for the said problems that closely approximate P . We will get back to this later. Previously, a non-trivial lower bound on the number of integer p variables needed in any sub-exponential MILEF was only known for matchings, where a bound of Ω( n/log n) was obtained in [17]. Our results not only apply to a much broader class of problems, but are often also nearly tight in terms of revealing how many integer variables are needed, which is a key parameter in MILEFs. More precisely, polynomial-size MILEFs for cuts and minimal odd-cuts are well known. For matchings, the textbook integer formulation uses one integer variable per edge, thus leading to a compact MILEF with O(n2 ) integer variables. As we show in Section 5.1, also matchings admit a compact MILEF with only O(n) integer variables. Hence, 4 Theorem 1 shows that even if we allow exponential-size MILEFs, satisfying m ≤ 2cn for a well-chosen constant c > 0, at least nearly linearly many, i.e., Ω(n/log n), integer variables are needed for describing the matching polytope, the cut polytope, or the dominant of the odd-cut polytope. Whereas this may be natural to expect for hard problems, it is interesting that polytopes corresponding to efficiently solvable problems, like maximum matchings, minimum odd-cuts, or bimodular integer programming, cannot be described by a MILEF with much fewer than linearly many integer variables. In particular, this rules out the possibility to efficiently solve the odd-cut problem or bimodular integer programming through a MILEF with a classical algorithm for mixed-integer programs like Lenstra’s algorithm [21], whose running time dependence on the number of integer variables k is kO(k) ; we would thus need k = O( log n/log log n) for Lenstra’s algorithm to run efficiently. Moreover, since the matching polytope of a complete graph with n vertices is a linear projection of the traveling salesman polytope (TSP) on an O(n)-vertex graph (see [33]), our results also extend to the TSP polytope. We note that TSP and its variants have been heavily studied in the context of MILEF formulations (see [25, 16, 24, 23] and references therein) and we provide the first nearly-linear lower bound on the number of integer variables needed in such formulations. Whereas Theorems 1 and 2 give a nice overview of the type of results we can obtain, the main contribution of our work, which leads to those results, is a general technique to transform hardness results for approximate LEFs to the mixed-integer setting, in a black-box fashion. We first need a formal notion of approximate LEFs and MILEFs, which boils down to defining, for two non-empty convex sets A, B ⊆ Rd with A ⊆ B (think of B as being a relaxation of A), how well B approximates A. Various notions have been used in the literature, depending on the context. In particular, from a viewpoint of optimization, it is natural to consider a notion related to the ratio of the optimal values when optimizing a linear objective over A and B, respectively, like the integrality gap. We therefore use the notion of the maximization gap gap+ (A, B) and the minimization gap gap- (A, B) between A and B with A ⊆ B ⊆ Rd≥0 , which are defined as follows: gap+ (A, B) = inf{ε ≥ 0 : (1 + ε) · sup c⊺ a ≥ sup c⊺ b a∈A - b∈B gap (A, B) = inf{ε ≥ 0 : inf c a ≤ (1 + ε) · inf c⊺ b ⊺ a∈A b∈B ∀c ∈ Rd≥0 }, ∀c ∈ Rd≥0 }. Clearly, the maximization gap is relevant for maximization problems like maximum matchings, or maximum stable set, and the minimization gap is used for minimization problems like minimum odd-cut. Many approximation hardness results for LEFs are stated in terms of these linear programming (LP) gap notions. However, for our techniques, a more “geometric” notion is more convenient. In particular, one that is invariant under basic operations like bijective affine transformations, which is not the case for gap+ and gap- . We therefore introduce the notion of “relative distance” between A and B, which can be interpreted as a normalized notion of LP gap and has many helpful properties. In particular, it is invariant with respect to affine bijections and can easily be related to the LP gap notions for 0/1-polytopes. For two non-empty convex sets A ⊆ B ⊆ Rd , we define their relative distance by rdist(A, B) := sup π : Rd →R dH (π(A), π(B)) , diam(π(A)) where the supremum is taken over all linear maps π : Rd → R, dH (·, ·) is the Hausdorff distance (i.e. dH (π(A), π(B)) = supb∈B inf a∈A |π(b)−π(a)|), and diam(·) is the diameter function (i.e. diam(π(A)) = supa,a′ ∈A |π(a) − π(a′ )|). In the above definition, we interpret as 0 any fraction with ∞ in the denominator as well as the fraction 0/0. One can easily observe that the definition of relative distance does not change if the supremum is only taken over orthogonal projections onto a line, which goes through the origin. As an illustration of the notion of relative distance, see Figure 2. Moreover, we extend the definition to empty 5 α β Figure 2: The relative distance of the above light shaded and dark shaded polygons is α . β sets by setting rdist(∅, ∅) = 0 and rdist(∅, B) = ∞ for B 6= ∅. Even though one could define the relative distance in a broader context without assuming A ⊆ B, we restrict ourselves to the above setting since it is the one relevant for our derivations. Using the notion of relative distance, we now define approximate LEFs and MILEFs in the natural way. Definition 3. For a convex set C ⊆ Rd and ε ≥ 0, an ε-LEF is a pair (Q, π) where Q is a polyhedron in some space Rℓ , and π : Rℓ → Rd is an affine map such that C ⊆ π(Q) and rdist(C, π(Q)) ≤ ǫ. Analogously, an ε-MILEF is a triple (Q, σ, π) where Q is a polyhedron in Rℓ , and σ : Rℓ → Rk and π : Rℓ → Rd are affine maps such that C̄ := conv(π(Q ∩ σ −1 (Zk ))) satisfies C ⊆ C̄ and rdist(C, C̄) ≤ ε. Note that classical LEFs and MILEFs are 0-LEFs and 0-MILEFs, respectively. We also remark that approximate LEFs and MILEFs are well-defined even for non-polyhedral convex sets C. We are now ready to state our main reduction result, which shows that the existence of an approximate MILEF for a convex set C implies the existence of an approximate LEF for C. Thus, this allows for lifting non-existence results for approximate LEFs to the mixed-integer setting. Theorem 4. Let C ⊆ Rd be a convex set admitting a ε-MILEF of complexity (m, k), where ε ∈ [0, 1]. Then, for every δ ∈ (0, 1], C admits a (ε + δ)-LEF of size m · (1 + k/δ )O(k) . To derive from the above theorem the MILEF-hardness results stated in Theorem 1, we proceed as follows. First, we observe that existing LEF approximation hardness results imply that for some δ = Ω(1/poly(n)) and a constant c > 0, there is no δ-LEF of size at most 2c·n for the polyhedron P we consider. The result then follows by choosing ε = 0 in Theorem 4, and observing that if k < η · n/log n, for an appropriately chosen constant η > 0, Theorem 4 implies the existence of a δ-approximate LEF of size strictly less than 2c·n , thus leading to a contradiction. In particular, this proof approach implies that for some ε̄ = Ω(1/poly(n)), there does not even exist a ε̄-MILEF of complexity (m, k) with m < 2c·n and k ≤ η · n/log n, where η > 0 is some constant. Due to the relation between rdist and LP gap that we establish, this result can be rephrased in terms of non-existence of approximate MILEFs with respect to LP gap. We expand on these connections and the precise statements resulting out of them in later sections. 1.2 Organization of the paper We start by summarizing some key properties of the relative distance which we exploit later, including its relation to LP distance. This is done in Section 2. In Section 3, we provide a thorough overview of our 6 techniques that lead to Theorem 4, our main result to reduce approximation hardness results about LEFs to MILEFs. A key ingredient of this proof is a new decomposition technique that, for any convex set D, allows for approximating any mixed-integer description of D by the intersection of D with the union of a small number of affine subspaces. Since this result may be of independent interest, we present it separately in Section 4. Section 5 expands on the implications of our techniques to different polytopes, and provides in particular a formal proof of (strengthened versions of) Theorems 1 and 2. In Section 6, we provide some MILEFs for the polytopes mentioned in Theorems 1 and 2 to discuss the quality of the bounds derived in these statements. We close the main part of our paper with a general discussion on the bounds achieved with our techniques, in Section 7. Appendix A contains deferred proofs of properties of the relative distance. 2 Relative distance: basic properties Due to the extensive use of the relative distance throughout this paper, we start by stating the key properties that are used in the main part of the paper. We remark that our notion of relative distance is closely related to the difference body metric for convex bodies, 1 introduced by Shephard [31]. Namely, for two convex bodies A, B ⊆ Rd with A ⊆ B, the difference body metric ν is defined via ν(A, B) := log (1 + 2 rdist(A, B)). Thus, most properties stated below are direct consequences of results in [31]. For the sake of completeness (and since we deal with arbitrary convex sets), we provide a self-contained proof of Lemma 5 in Appendix A. Lemma 5. Consider three convex sets A ⊆ B ⊆ C in Rd . (i) rdist(A, B) = inf {λ ≥ 0 : B ⊆ (1 + λ)A − λA}. (ii) For any affine map π : Rd → Rm , we have rdist(π(A), π(B)) ≤ rdist(A, B), with equality in the case that m = d and π is invertible. (iii) rdist(A, C) ≤ rdist(A, B) + rdist(B, C) + 2 rdist(A, B) rdist(B, C). (iv) For convex sets A1 , · · · , At , B1 , · · · , Bt ⊆ Rd with Ai ⊆ Bi for all i ∈ [t],  rdist conv(∪i∈[t] Ai ), conv(∪i∈[t] Bi ) ≤ max rdist(Ai , Bi ) . i∈[t] The next two lemmas highlight the relation between the relative distance and the LP gap notions, gap+ and gap- . This allows us to first translate LEF approximation hardness results, which are often stated in terms of LP gap, into a gap in terms of relative distance. The same lemmas allow for translating our hardness results, which are stated with respect to the relative distance, back to the notion of LP gap. We call a convex set C ⊆ Rd≥0 down-closed if for every x ∈ C and y ∈ Rd≥0 such that y ≤ x, we have y ∈ C. Moreover, for a 0/1-polytope P ⊆ [0, 1]d —i.e., a polytope all of whose vertices are within {0, 1}d —we say that P is up-closed if x ∈ P and y ∈ [0, 1]d with x ≤ y implies y ∈ P . Lemma 6. For two non-empty convex sets A ⊆ B ⊆ Rd≥0 where A is down-closed, we have rdist(A, B) = gap+ (A, B). Lemma 7. Let A ⊆ [0, 1]d be an up-closed 0/1-polytope and B ⊆ [0, 1]d be a convex set with A ⊆ B and d′ := dim(A) = dim(B). If d′ = 1, then A = B. Otherwise, we have (i) rdist(A, B) ≥ (ii) gap- (A, B) ≥ 1 d′ −1 · gap- (A,B) 1+gap- (A,B) , and rdist(A,B) d′ −1−rdist(A,B) . The proofs of Lemmas 6 and 7 are postponed to Appendix A. 1 A convex body is a convex set in Rd that is bounded, closed and full-dimensional. 7 3 Outline of our techniques In this section, we explain our approach for proving Theorem 4 and reduce it to a problem of approximating the mixed-integer hull of a convex set by the intersection of the set with few affine subspaces. Rℓ σ(Q) Q Rk Q ∩ σ −1 (Zk ) π(Q) Rd  conv π(Q ∩ σ −1 (Zk )) Figure 3: Representation of a MILEF (Q, σ, π) of a convex set C ⊆ Rd , i.e., C = conv(π(Q) ∩ σ−1 (Zk )). The MILEF has k integrality constraints. In this picture, Q lives in a 3-dimensional space, i.e., ℓ = 3; the convex set C lives in a 2-dimensional space, i.e., d = 2; and the number of integer constraints is k = 2. The projection σ(Q) of Q onto the integer space is highlighted on the left of the picture, and the projection π(Q) onto the space of C is highlighted at the bottom of the picture. To exemplify our approach, consider a convex set C ⊆ Rd , and a MILEF (Q, σ, π) for C of complexity (m, k) ; see Figure 3. This means that      C = conv π(Q ∩ σ −1 (Zk )) = π conv Q ∩ σ −1 (Zk ) , where the second equality follows from the fact that the convex hull commutes with affine maps. Assume that there are two constants c, η > 0 such that, for any δ < d−η , the set C does not admit a δ-LEF of size smaller than 2c·d . Our goal is to transform the MILEF into a δ-LEF without blowing up the size too much. The integer constraints of the MILEF cut the polyhedron Q into fibers, where a fiber is a set Q ∩ σ −1 (z) for some z ∈ Zk . Consider first a simple special case, where the number of non-empty fibers is not very large. To this end, let I = {z ∈ Zk | Q ∩ σ −1 (z) 6= ∅} , be all points in Zk that correspond to non-empty fibers, and assume that we have |I| < 2c·d/2 . Notice that we can rewrite C as C = π(Qσ ) , where Qσ := conv [ z∈I    = conv Q ∩ σ −1 (Zk ) . Q ∩ σ −1 (z) 8 We refer to Qσ as the mixed-integer hull of Q with respect to σ, and we remark that Qσ is a LEF of C, via the affine map π. Moreover, we can bound the extension complexity of Qσ through a technique known as disjunctive programming [4], which allows for obtaining an inequality description of the convex hull of the union of a family of polyhedra, given an inequality description for each polyhedron in the family. In our case, the polyhedra are the fibers Q ∩ σ −1 (z) for z ∈ I, and each of those polyhedra has at most m facets, because it is the intersection of Q, whose facets are bounded by m, and the affine subspace σ −1 (z). The disjunctive programming technique then implies xc(Qσ ) ≤ |I|(m + 1), which, by assuming |I| < 2c·d/2 , implies xc(Qσ ) = O(m · 2c·d/2 ). Moreover, since we assumed that every δ-LEF of C has size at least 2c·d , and Qσ is a 0-LEF of C, we must have xc(Qσ ) = Ω(2c·d ) and thus m = Ω(2c·d/2 ). In words, if the MILEF (Q, σ, π) for C has few fibers, then it must have a very large size. Ideally, if one could show that any MILEF for C of complexity (m, k) with k = O(d/log d) has a small number of fibers, then we would be done. In particular, the number of fibers would be sufficiently small if all integer variables involved in the MILEF had bounded range. Unfortunately, it does not hold in general that the number of fibers is bounded. A key aspect of our approach is to overcome this hurdle. More precisely, given a MILEF (Q, σ, π) for C as before, instead of describing Qσ in terms of the fibers Q ∩ σ −1 (z), we will show that one can approximate Qσ by sets of the form Q ∩ H, where H comes from a family H of affine subspaces which is of small cardinality whenever k is small. In particular, an affine subspace H ∈ H will not be of the form σ −1 (z) as in the case of fibers, but will typically contain many subspaces of the form σ −1 (z) for z ∈ I. Moreover, the family H may contain subspaces of different dimensions. The price we pay is that the resulting description is not exact anymore, but only yields an approximation of Qσ . Concretely, the resulting set will be  [   [  QH := conv (Q ∩ H) = conv Q ∩ H , H∈H H∈H having the property that Qσ ⊆ QH ⊆ Q. We show that QH is a very good approximation of Qσ , with an error of δ = O(d−κ ) in terms of relative distance, where κ > 0 is a constant that we can choose, and that only impacts other constants in our statements. Consequently, π(QH ) will be a good approximation of C as well. To find such family H of subspaces, we recursively “slice” Q along different directions of small “width”. We rely on a celebrated result in convex geometry to find good directions, which is commonly known as the Flatness Theorem, and which shows that low-dimensional lattice-free convex sets have small width. To formally state the Flatness Theorem, we start by defining the flatness constant and lattice width. 2 Definition 8 (Flatness constant and lattice width). Let k ∈ Z≥1 . The flatness constant Flt(k) in dimension k is the smallest λ ∈ R≥0 such that for any convex, closed, and full-dimensional set B ⊆ Rk with B ∩ Zk = ∅, there exists a vector v ∈ Zk \ {0} with sup v ⊺ x − inf v ⊺ x ≤ λ. x∈B x∈B Moreover, the quantity width(B) := inf v∈Zk \{0}  sup v x − inf v x ⊺ x∈B ⊺ x∈B  is called the lattice width of B. Hence, Flt(k) is the smallest real that upper bounds the lattice width of any convex, closed, fulldimensional and lattice-free set in Rk . Notice that the term flatness constant may be slightly misleading 2 In the remainder of the paper, we denote general convex sets by B, C and D, and for the most part we keep the notational convention that C is in the original space Rd , D is in the extended space Rℓ , and B is in the auxiliary space Rk (see Figure 3). 9 since Flt(k) does depend on k. This term is historical, and comes from the fact that lattice width was often studied in settings where k (and thus also Flt(k)) is constant. Finally, the term Flatness Theorem is used for theorems that bound the quantity Flt(k) in terms of k. There are many versions of it; we state one coming from [5, Sec. VII.8] that is convenient for us in what follows. Theorem 9 (Flatness Theorem (see [5])). The flatness constant Flt(k) is always finite and can moreover be bounded by a polynomial in k. The following theorem is a key technical ingredient in our approach, and guarantees the existence of a good family H of subspaces. Theorem 10. Let ℓ, k ∈ Z>0 , D ⊆ Rℓ be a convex set, and σ : Rℓ → Rk be an affine map. Then for k 1+δ every δ > 0 there exists a family H of at most 1 + S affine subspaces of Rℓ such that the sets δ Flt(k)   −1 k Dσ = conv D ∩ σ (Z ) and DH := conv D ∩ H∈H H satisfy (a) Dσ ⊆ DH , and (b) rdist(Dσ , DH ) ≤ δ. Since the above statement is independent of the notion of (mixed-integer) extended formulations and might be of independent interest, we discuss its proof in the next section. Let us demonstrate how Theorem 10 indeed implies Theorem 4. To this end, we show that Theorem 10 implies the following, slightly stronger version. Theorem 11. Let C ⊆ Rd be a convex set that has an ε-MILEF of complexity (m, k), for some ε ≥ 0. Then k for every δ > 0, C has an (ε + δ + 2εδ)-LEF of size at most (m + 1) 1 + 1+δ δ Flt(k) . We first argue that Theorem 11 indeed implies Theorem 4. Proof of Theorem 4. Let C ⊆ Rd be a convex set admitting an ε-MILEF of complexity (m, k), where ε ∈ [0, 1], and let δ ∈ (0, 1]. Applying Theorem 11, with δ replaced by δ/3, we obtain that C has a µ-LEF k of size at most s, where µ := ε + 3δ + 32 εδ and s := (m + 1) 1 + 3+δ δ Flt(k) . Notice that ε ≤ 1 implies µ ≤ ε + δ; hence it only remains to prove that s = m · (1 + k/δ)O(k) . Since δ ≤ 1, m ≥ 1, and there are constants β > 0 and γ ≥ 1 such that Flt(k) ≤ βk γ , we have k  4 γ s ≤ 2m · 1 + βkγ ≤ 2m · [(1 + 4β)(1 + k /δ )]k ≤ 2m · [(1 + 4β)(1 + k/δ )γ ]k . δ And finally, since (1 + k/δ ) ≥ 2, there must be a constant c such that 1 + 4β ≤ (1 + k/δ )c . Thus, s ≤ 2m · (1 + k/δ )(γ+c)k ≤ m · (1 + k/δ )(γ+c)k+1 , which completes the proof of the claim. It remains to show that Theorem 10 implies Theorem 11. Proof of Theorem 11. By the assumption, there exists a polyhedron Q ⊆ Rℓ with at most m facets, and affine maps π : Rℓ → Rd and σ : Rℓ → Rk such that Qσ satisfies C ⊆ π(Qσ ) and rdist(C, π(Qσ )) ≤ ε. k Applying Theorem 10, we obtain a set H of affine subspaces of Rℓ with |H| ≤ 1 + 1+δ δ Flt(k) , such that Qσ ⊆ QH and rdist(Qσ , QH ) ≤ δ. Now, let cl(QH ) be the closure of QH . By Balas’ Theorem [4], we have X X xc(cl(QH )) ≤ (xc(Q ∩ H) + 1) ≤ (xc(Q) + 1) ≤ |H|(m + 1). H∈H H∈H 10 ′ ′ Thus, there exists a polyhedron Q′ ⊆ Rℓ with at most (m + 1)|H| facets and an affine map τ : Rℓ → Rℓ with τ (Q′ ) = cl(QH ). Let us define π ′ := π ◦ τ . We show Theorem 11 by proving that (Q′ , π ′ ) is a k (ǫ + δ + 2ǫδ)-LEF of C; the above already shows that its size is bounded by (m + 1)(1 + 1+δ δ Flt(k)) , as desired. Clearly, we have π ′ (Q′ ) = π(τ (Q′ )) = π(cl(QH )) ⊇ π(QH ) ⊇ π(Qσ ) ⊇ C, and hence it only remains to show that rdist(C, π ′ (Q′ )) ≤ ε + δ + 2εδ. To this end, first observe that rdist(π(Qσ ), π ′ (Q′ )) = rdist(π(Qσ ), π(cl(QH ))) ≤ rdist(Qσ , cl(QH )) = rdist(Qσ , QH ) ≤δ , where the first inequality follows from Lemma 5 (ii), the second equality from the fact that rdist(A, B) = rdist(A, cl(B)) always holds, and the last inequality from the definition of QH . Finally, recall that rdist(C, π(Qσ )) ≤ ε, and hence using Lemma 5 (iii) we obtain rdist(C, π ′ (Q′ )) ≤ rdist(C, π(Qσ )) + rdist(π(Qσ ), π ′ (Q′ )) + 2 rdist(C, π(Qσ )) rdist(π(Qσ ), π ′ (Q′ )) ≤ ε + δ + 2εδ, as claimed. 4 Approximating mixed-integer hulls by unions of slices As demonstrated in the previous section, the key technical ingredient for the proof of Theorem 4 is the statement of Theorem 10. In this section we prove the latter. Throughout this section, we make extensive use of the sets Dσ and DH as defined in Theorem 10. Before we give an idea of its proof, let us argue that it can easily be derived from the following statement. Proposition 12. Let ℓ, k ∈ Z>0 , D ⊆ Rℓ be a convex set, and σ : Rℓ → Rk be an affine map. Then, for every δ > 0 there exists a family H of affine subspaces of Rℓ satisfying:  Q  (i) |H| ≤ ki=1 1 + (1+δ) Flt(i) , δ S (ii) D ∩ σ −1 (Zk ) ⊆ H∈H H, and (iii) rdist ((D ∩ H)σ , D ∩ H) ≤ δ for each H ∈ H. Proof of Theorem 10. Let H be the family of affine subspaces as described in Proposition 12. By Propok sition 12 (i) and the monotonicity of Flt(k), we immediately obtain the bound |H| ≤ 1 + 1+δ δ Flt(k) . Next, property (a) of Theorem 10 follows from Proposition 12 (ii) because ! !   [ [ −1 k −1 k DH = conv D ∩ H ⊇ conv D ∩ σ (Z ) ∩ H = conv D ∩ σ (Z ) = Dσ . H∈H H∈H Hence, it only remains to show property (b) of Theorem 10. To this end, for each H ∈ H, we define AH := (D ∩ H)σ and BH := D ∩ H , which leads to ! ! [ [ , BH , and DH = conv AH AH ⊆ BH , Dσ = conv H∈H H∈H 11 where the second relation follows from Proposition 12 (ii). We finally obtain the bound rdist(Dσ , DH ) ≤ max rdist(AH , BH ) ≤ δ , H∈H where the first inequality follows by Lemma 5 (iv) and the second one by Proposition 12 (iii). Proposition 12 states that there is a small family of affine subspaces of Rℓ that cover all fibers D ∩ of the set D, with the property that each slice D ∩ H approximates well its own mixed-integer hull (D ∩ H)σ . The idea behind the proof can be sketched as follows. If the set D is already a good approximation of its mixed-integer hull Dσ , then there is no need to intersect it with proper affine subspaces, i.e., we can simply choose H = {Rℓ }. Otherwise, the next statement claims that there is a small family of affine subspaces covering all the fibers, such that the mixed-integer hull (D ∩ H)σ of each slice can be described with fewer integer constraints; and we can recurse. Intuitively, the idea of how we exploit the Flatness Theorem is the following. If D is not a good approximation of Dσ , then there is a point in D \ Dσ certifying that rdist(Dσ , D) is large. However, for this to be possible, the set of all fibers σ −1 (Zk ) cannot be extremely dense with respect to every direction. We exploit this through the Flatness Theorem to find a good direction with respect to which we can slice D into polynomially (in k) many slices. As mentioned before, Proposition 12 is obtained through recursive slicing. The following lemma shows that we can find a family of affine subspaces for slicing D once, thus reducing the number of integer constraints k by one. With the recursive use of this lemma to eliminate all integer variables, the proof of Proposition 12 becomes straightforward and is postponed to the end of this section. σ −1 (Zk ) Lemma 13. Let ℓ, k ∈ Z>0 , D ⊆ Rℓ be a convex set, and σ : Rℓ → Rk be an affine map. If rdist(Dσ , D) = δ > 0 , then there exists a set H of affine subspaces of Rℓ and an affine map τ : Rℓ → Rk−1 satisfying: 1+δ δ Flt(k), S ∩ σ −1 (Zk ) ⊆ H∈H H, and ∩ σ −1 (Zk ) = H ∩ τ −1 (Zk−1 ) (i) |H| ≤ 1 + (ii) D (iii) H for each H ∈ H. The affine subspaces (and the map τ ) needed for Lemma 13 are implicitly given by the next lemma, which shows that all fibers in D ∩ σ −1 (Zk ) can be covered by a small number of parallel lattice hyperplanes. Lemma 14. Let ℓ, k ∈ Z>0 , D ⊆ Rℓ be a convex set, and σ : Rd → Rk be an affine map. If rdist(Dσ , D) = δ > 0, then width (σ(Dσ )) ≤ 1+δ δ Flt(k). Proof. We assume that the set σ(Dσ ) is full-dimensional in Rk , for otherwise its lattice width is 0 and the statement holds trivially. Notice that it is enough to show that, for any value λ > 0 with λ < rdist(Dσ , D), the lattice width of σ(Dσ ) is bounded by 1+λ λ Flt(k). For such a value 0 < λ < δ, it follows from Lemma 5 (i) that there exists a point y ∈ D such that y∈ / (1 + λ)Dσ − λDσ . In turn, this means that the sets y + λDσ and (1 + λ)Dσ are disjoint. Scaling both λ 1 and setting µ := 1+λ ∈ (0, 1), we obtain sets by 1+λ ((1 − µ)y + µDσ ) ∩ Dσ = ∅. (4) Now consider the (convex, closed, and full-dimensional) set B := (1 − µ)σ(y) + µσ(Dσ ) ⊆ Rk , 12 (5) and notice that σ(Dσ ) can be obtained from B via a scaling with factor 1/µ followed by a translation. Hence, width(Dσ ) = 1 1+λ width(B) = width(B) . µ λ Thus, to prove the lemma, it suffices to show that B is lattice free, and consequently width(B) ≤ Flt(k). Assume, for the sake of deriving a contradiction, that there is a point z ∈ B ∩ Zk . As z is in B, and by the definition of B given in (5), there exists some x ∈ Dσ such that z = (1 − µ)σ(y) + µσ(x). Now, consider the point w := (1 − µ)y + µx . It is clear from its definition that w ∈ (1−µ)y +µDσ . Moreover, w ∈ D, because it is a convex combination of points x and y in D. And finally, w ∈ σ −1 (Zk ), because σ(w) = (1 − µ)σ(y) + µσ(x) = z ∈ Zk . Therefore, we obtain w ∈ ((1 − µ)y + µDσ ) ∩ Dσ , a contradiction to (4). We are now ready to prove Lemma 13. Proof of Lemma 13. By the hypothesis and by Lemma 14, we have width(σ(Dσ )) ≤ there exists a vector v ∈ Zk \ {0} such that the set 1+δ δ Flt(k). Hence, I := {v ⊺ z : z ∈ σ(Dσ ) ∩ Zk } = {v ⊺ z : z ∈ σ(D) ∩ Zk } ⊆ Z v has cardinality |I| ≤ 1 + 1+δ δ Flt(k). We may assume gcd(v) = 1, for otherwise replacing v by / gcd(v) can only decrease the cardinality of I. By the definition of I we have [ σ(D) ∩ Zk ⊆ {x ∈ Rk : v ⊺ x = i} , (6) i∈I Zk i.e., the set σ(D) ∩ can be covered by only |I| many hyperplanes. We now take the pre-images of these hyperplanes under σ to define our family H. Hence, let H := {Hi : i ∈ I}, where   ∀i ∈ I. Hi := {y ∈ Rℓ : v ⊺ σ(y) = i} = σ −1 {x ∈ Rk : v ⊺ x = i} Clearly, H satisfies property (i) of Lemma 13. Moreover, property (ii) follows immediately from (6) and the fact that the Hi ’s are the pre-images of the hyperplanes in (6). It remains to show that H fulfills property (iii) of Lemma 13. Since gcd(v) = 1, it is well known that there exists a unimodular matrix U ∈ Zk×k , i.e., det(U ) ∈ {−1, 1}, with the first row being v ⊺ .3 We have   ∀z ∈ Rk , (7) z ∈ Zk ⇐⇒ U z ∈ Zk because U −1 is integral. Let U ′ ∈ Z(k−1)×k be the matrix that arises from U by removing the first row. Clearly, by defining φ : Rk → Rk−1 via φ(x) := U ′ x, we can rephrase (7) as follows:   ∀z ∈ Rk . (8) z ∈ Zk ⇐⇒ v ⊺ z ∈ Z and φ(z) ∈ Zk−1 Since I ⊆ Z, we thus obtain for all i ∈ I Hi ∩ σ −1 (Zk ) = {y ∈ Rℓ : v ⊺ σ(y) = i, σ(y) ∈ Zk } = {y ∈ Rℓ : v ⊺ σ(y) = i, φ(σ(y)) ∈ Zk−1 } = Hi ∩ (φ ◦ σ)−1 (Zk−1 ), where the second equality follows from (8). Hence, by setting τ := φ◦σ, we have that H fulfills property (iii) of Lemma 13, as desired. 3 The existence of such a unimodular matrix U with v ⊺ as its first row easily follows from the fact that the Hermite Normal Form of any vector with gcd = 1 is e1 = (1, 0, . . . , 0). Since the (column) Hermite Normal Form can be obtained by integer column operations, these operations can be described by a unimodular matrix A ∈ Zk×k . Hence, there is a unimodular matrix A ∈ Zk×k such that v ⊺ A = e⊺1 , and one can choose U = A−1 . 13 Finally, we provide the proof of Proposition 12. Proof of Proposition 12. We proceed by induction over k ≥ 0 and note that the claim is trivial for k = 0 by choosing H = {Rℓ }. Now let k ≥ 1 and observe that we may assume that rdist(Dσ , D) > δ, as otherwise we can again choose H = {Rd }. By Lemma 13 there exists a family L of affine subspaces of Rℓ and an affine map τ : Rℓ → Rk−1 such that 1+δ Flt(k) , |L| ≤ 1 + [ δ D ∩ σ −1 (Zk ) ⊆ L , and (9) (10) L∈L L ∩ σ −1 (Zk ) = L ∩ τ −1 (Zk−1 ) ∀L ∈ L . (11) For each such L ∈ L, by the induction hypothesis applied to D ∩ L and τ , there exists a family HL of affine subspaces in Rℓ such that |HL | ≤ D∩L∩τ −1 (Z k−1 )⊆ k−1 Y 1+ i=1 [  1+δ Flt(i) , δ (12) H , and (13) ∀H ∈ HL . (14) H∈HL rdist((D ∩ L ∩ H)τ , D ∩ L ∩ H) ≤ δ Defining the set H := {L ∩ H : L ∈ L, H ∈ HL }, we clearly satisfy (i) due to (9) and (12). Furthermore, we have  [ D ∩ σ −1 (Zk ) = D ∩ L ∩ σ −1 (Zk ) (by (10)) L∈L =  [ D ∩ L ∩ τ −1 (Zk−1 ) (by (11)) L∈L ⊆ [ [ L∈L H∈HL L∩H , (by (13)) which shows (ii). Finally, (iii) is a direct consequence of (14), and the fact (D ∩ L ∩ H)σ = (D ∩ L ∩ H)τ for each L ∈ L and H ∈ HL , by (11). 5 Applications In this section, we demonstrate how our framework can be applied to obtain strong lower bounds on the number of integer variables in MILEFs in several relevant settings. Among other results, we will obtain the statements mentioned in Theorems 1 and 2 using Theorem 4 and existing inapproximability results on LEFs. In fact, we prove stronger versions of all these statements, as we also rule out the existence of approximate MILEFs. To this end, we first derive the following direct consequence of Theorem 4, which is suited for the applications we consider. Corollary 15. Let α, β, γ, ε > 0 be constants with ε < α, γ. Let C be any non-empty convex set that does -MILEF of C of size at most 2(γ−ε)n has Ω (n/log n) not admit an nαβ -LEF of size at most 2γn . Then any α−ε nβ integer variables. 14 -MILEF of complexity Proof. Let C be any convex set as in the hypothesis and suppose it admits a α−ε nβ (γ−ε)n (m, k) where m ≤ 2 . We may assume that n ≥ 2 and k ≤ n. By Theorem 4, C admits a ̺-LEF of size s, where α−ε ε α ̺ := + β = β nβ n n and   k ck s := m 1 + ǫ β , /n for some constant c > 0. By the assumption, we must have   ′ ck ′ ′ 2γn ≤ s ≤ m knβ ≤ mn(β +1)ck ≤ 2(γ−ε)n n(β +1)ck for some constant β ′ > 0, where the second inequality follows from n ≥ 2 and by choosing β ′ sufficiently large, the third inequality follows from k ≤ n, and the last inequality is due to m ≤ 2(γ−ε)n . This implies εn k ≥ c(β ′ +1) log n , which yields the claim. Note that the above statement allows for quickly translating an inapproximability result on LEFs into a certain inapproximability result on MILEFs. Besides the proofs of Theorems 1 and 2, the main purpose of this section is to demonstrate how several existing inapproximability results on LEFs in the literature, which are usually stated using different notions of approximations, can be transferred into inapproximability results on LEFs as required in the statement of Corollary 15. 5.1 Matching polytope We start by applying our framework to the matching polytope of the complete graph, to which we simply refer to as the matching polytope, and which is defined as the convex hull of the characteristic vectors of all matchings in Kn = (V, E) (the complete graph on n nodes). We denote this polytope by Pmatch (n) ⊆ RE . Recall that a matching is an edge subset M ⊆ E such that every vertex in (V, M ) has degree at most one. A well-known result by Edmonds [13] is that this polytope has an exponential number of facets, even though any linear function can be optimized over it in strongly polynomial time. The question of whether the matching polytope admits an extended formulation of size polynomial in n was open for a long time, until Rothvoß [29] proved that its extension complexity is exponential in n. More recently, it was even proved that this polytope cannot be well approximated by a polytope of low extension complexity: Theorem 16 ([7], see also [29, Thm. 16]). There exist constants α, γ > 0 such that every polytope K ⊆ RE with Pmatch (n) ⊆ K ⊆ (1 + αn )Pmatch (n) satisfies xc(K) > 2γn . Let us translate this result using the notion of relative distance. Corollary 17. There exist constants α, γ > 0 such that Pmatch (n) admits no αn -LEF of size at most 2γn .  ′ Proof. Let α and γ ′ be the constants defined in Theorem 16. We may assume that 2γ n > n2 . We have to show that every polyhedron K ⊆ RE with Pmatch (n) ⊆ K and rdist(Pmatch (n), K) ≤ αn satisfies xc(K) ≥ 2γn for some constant γ > 0. To this end, first note that since rdist(Pmatch (n), K) is finite and Pmatch (n) is bounded, K must also be bounded. Defining the polytope K ′ := K ∩ RE ≥0 , we clearly have rdist(Pmatch (n), K ′ ) ≤ αn . Since Pmatch (n) is down-closed, by Lemma 6 we have gap+ (Pmatch (n), K ′ ) ≤ α α ′ γ′ n ′ n , which implies Pmatch (n) ⊆ K ⊆ (1 + n )Pmatch (n). Thus, by Theorem 16, we obtain xc(K ) ≥ 2 ′ and hence xc(K) ≥ xc(K ′ ) − |E| ≥ 2γ n − n2 ≥ 2γn for some universal constant γ > 0. By Corollary 15 we directly obtain: 15 Corollary 18. There exist constants α, γ > 0 such that any αn -MILEF of Pmatch (n) of size at most 2γn has Ω (n/log n) integer variables. Using Lemma 6, the above statement can be phrased similarly to Theorem 16. Corollary 19. There exist constants α, γ > 0 such that the following holds. Let K ⊆ RE ≥0 be a polytope α γn with Pmatch (n) ⊆ K ⊆ (1+ n )Pmatch (n). Then any MILEF of K of size at most 2 has Ω (n/log n) integer variables. While polynomial-size textbook MILEFs for Pmatch (n) usually require Ω(n2 ) integer variables, in Section 6.1 we give a simple polynomial-size MILEF for Pmatch (n) that only uses O(n) integer variables. Thus, the lower bound on the number of integer variables in Corollaries 18 and 19 is tight up to a factor of O(log n). 5.2 Cut polytope Let Kn = (V, E) be the complete undirected graph on n vertices, and define a cut in Kn to be a subset F ⊆ E that can be written as F = {{v, w} ∈ E : v ∈ S, w ∈ / S} for some S ⊆ V . 4 The convex hull E Pcut (n) ⊆ [0, 1] of all characteristic vectors of cuts in Kn is called the cut polytope. Recall that optimizing a linear function over Pcut (n) is at least as hard as solving the maximum cut problem, which is NP-hard. The cut polytope was the first specific 0/1-polytope shown to have a super-polynomial (in its dimension) extension complexity; see [14]. More specifically, every LEF for Pcut (n) has size at least exponential in n; see also [19]. In what follows, we lift this bound to MILEFs with k ≤ κn/ log n integer variables, for some constant κ. To this end, we make use of the following inapproximability result in [6] that refers to the correlation polytope Pn := conv {bb⊺ : b ∈ {0, 1}n } ⊆ Rn×n , which is affinely isomorphic to Pcut (n), i.e., there exists an affine bijection π : RE → aff(Pn ) with π(Pcut (n)) = Pn ; see [11]. Theorem 20 ([6, Thm. 6]). There is a constant γ > 0 such that every polyhedron K ⊆ Rn×n with  Pn ⊆ K ⊆ Qn := x ∈ Rn×n : (2 diag(a) − aa⊺ ) • x ≤ 2 ∀a ∈ {0, 1}n satisfies xc(K) ≥ 2γn .5 Again, let us translate this result using the notion of relative distance. α -LEF of size at most 2γn . n2 K ⊆ RE be any polyhedron with Corollary 21. There exist constants α, γ > 0 such that Pcut (n) admits no Proof. Define α := 31 and let γ > 0 be the constant in Theorem 20. Let Pcut (n) ⊆ K and rdist(Pcut (n), K) ≤ nα2 . It remains to show that xc(K) ≥ 2γn holds. To this end, let π : RE → aff(Pn ) be the affine map that satisfies π(Pcut (n)) = Pn . Clearly, we have Pn ⊆ π(K), as well as rdist(Pn , π(C)) ≤ nα2 . We claim that π(K) is contained in the set Qn (as defined in the statement of Theorem 20). Otherwise, there is some a ∈ {0, 1}n such that the matrix c := 2 diag(a) − aa⊺ satisfies supx∈π(K) c • x > 2. On the other hand, one has maxx∈Pn c • x ≤ 1 (see, e.g., [6, Sec. IV]) as well as minx∈Pn c • x ≥ −n2 (because c ∈ [−1, 1]n×n and Pn ⊆ [0, 1]n×n ). By the definition of the relative distance, this would imply α rdist(Pn , π(K)) ≥ n2−1 2 +1 > n2 , a contradiction. Thus, we have Pn ⊆ π(K) ⊆ Qn and hence by Theorem 20 we obtain xc(π(K)) ≥ 2γn . The claim follows since we have xc(K) ≥ xc(π(K)). 4 We highlight that S is allowed to be equal to the empty set or V . Sometimes, to define cuts, one requires S 6∈ {∅, V }. Our discussion can easily be transferred to this case, but is a bit simpler P when Pn also allowing the trivial sets S = ∅ and S = V . 5 For two matrices A, B ∈ Rn×n , we denote by A • B := n i=1 j=1 Aij Bij the Frobenius inner product of A and B. 16 By Corollary 15 we directly obtain: Corollary 22. There exist constants α, γ > 0 such that any Ω (n/log n) integer variables. α -MILEF n2 of Pcut (n) of size at most 2γn has Several known polynomial-size MILEFs for Pcut (n) use Ω(n2 ) integer variables. However, similar to the case for the matching polytope, there are simple polynomial-size MILEFs for Pcut (n) that only use O(n) integer variables; see Section 6.2. Again, the bound on the number of integer variables given in Corollary 22 is tight up to a factor of O(log n). 5.3 Traveling salesman polytope In this section, we use our result on the matching polytope to obtain a lower bound on the number of integer variables in MILEFs for the traveling salesman polytope Ptsp (n) ⊆ RE , which is defined as the convex hull of the characteristic vectors of all Hamiltonian cycles in Kn = (V, E). It is known that there is a constant c > 0 such that for every n, there exists a face of Ptsp (n) that can be affinely projected onto Pmatch (n′ ), where n′ ≥ cn, see, e.g., [33, Proof of Thm. 2]. By the following lemma, this implies that whenever Ptsp (n) admits a MILEF of complexity (m, k), then also Pmatch (n′ ) admits a MILEF of the same complexity. ′ Lemma 23. Let P ⊆ Rd and P ′ ⊆ Rd be non-empty polyhedra such that P ′ is an affine projection of a face of P . If P admits a MILEF of complexity (m, k), then also P ′ admits a MILEF of complexity (m, k). ′ Proof. By the hypotheses, there is a face F of P and an affine map τ : Rd → Rd such that P ′ = τ (F ). Additionally, there exists a polyhedron Q ⊆ Rℓ with at most m facets, and affine maps σ : Rℓ → Rk and π : Rℓ → Rd such that P = π(Qσ ), where Qσ := conv(Q ∩ σ −1 (Zk )). We remark that F is a face of P if and only if there is an affine map φ : Rd → R such that φ(P ) ⊆ R≥0 and F = P ∩ φ−1 (0). Now, define the affine subspace H := (φ ◦ π)−1 (0) in Rℓ , and notice that Qσ ∩ H is a face of Qσ by the above-mentioned characterization of a face and the fact that (φ ◦ π)(Qσ ) = φ(P ) ⊆ R≥0 . This implies that Qσ ∩ H = (Q ∩ H)σ := conv(Q ∩ H ∩ σ −1 (Zk )). 6 Thus, we obtain P ′ = τ (F ) = τ (P ∩ φ−1 (0)) = τ (π(Qσ ) ∩ π(H)) = (τ ◦ π)(Qσ ∩ H) = (τ ◦ π)((Q ∩ H)σ ) , and hence P ′ admits the MILEF (Q ∩ H, σ, τ ◦ π), which is of complexity (m′ , k), where m′ is the number of facets of Q ∩ H. Since the number of facets of Q ∩ H is at most the number of facets of Q, we obtain m′ ≤ m, which yields the claim. By Corollary 18 we directly obtain: Corollary 24. There exists a constant γ > 0 such that any MILEF for Ptsp (n) of size at most 2γn has Ω (n/log n) integer variables. While most polynomial-size textbook MILEFs for Ptsp (n) require Ω(n2 ) integer variables, in Section 6.3 we give a polynomial-size MILEF for Ptsp (n) that only uses O(n log n) integer variables. Thus, the above bound on the number of integer variables is tight up to a factor of O(log2 n). Explicitly, the claim is conv(Q∩σ −1 (Zk ))∩H = conv(Q∩σ −1 (Zk )∩H). The inclusion “⊇” follows immediately from the fact that conv(Q∩σ −1 (Zk ))∩H is a convex set containing Q∩σ −1 (Zk )∩H, and must thus contain conv(Q∩σ −1 (Zk )∩H), which is the smallest convex set containing Q ∩ σ −1 (Zk ) ∩ H. For the opposite inclusion, consider a point x ∈ conv(Q ∩ σ −1 (Zk )) ∩ H. It must be a convex combination of some points (xi )i∈I in Q ∩ σ −1 (Zk ). As each point xi is in Qσ , we must have (φ ◦ π)(xi ) ≥ 0; however, x being in H implies that (φ ◦ π)(x) = 0, which forces all these inequalities to be tight, and thus xi ∈ H for each i ∈ I. This proves that x ∈ conv(Q ∩ σ −1 (Zk ) ∩ H), as desired. 6 17 5.4 Stable set polytope The stable set polytope Pstab (G) ⊆ RV of an undirected graph G = (V, E) is defined as the convex hull of characteristic vectors of all stable sets in G. While for some graphs G the polytope Pstab (G) can be easily described, it is an arguably complicated polytope in general. As an example, in [14, Lem. 8] it was shown that for every n, there exists a graph Hn on n2 vertices such that a face of Pstab (Hn ) can be affinely projected onto Pcut (n + 1). Thus, using Lemma 23 and Corollary 22 we conclude: Corollary 25. There exists a constant γ > 0 such that the following√ holds. For every n, there exists an √ n-vertex graph G such that any MILEF of Pstab (G) of size at most 2γ n has Ω ( n/log n) integer variables. We highlight that the above result can also be reduced from our MILEF extension complexity result for matchings, i.e., Corollary 18. This follows from the fact that the matching polytope of any graph G is the stable set polytope of the corresponding line graph, whose number of vertices is equal to the number of edges in G. Hence, if G = Kn , then the matching polytope of Kn is the stable set polytope of a graph with O(n2 ) many vertices.  Note that Pstab (G) = conv x ∈ {0, 1}V : xv + xw ≤ 1 ∀{v, w} ∈ E , and hence, Pstab (G) admits a polynomial-size MILEF with n integer variables, for every n-vertex graph G. However, we are not aware of polynomial-size MILEFs with o(n) integer variables. In particular, we believe that the bound in Corollary 25 can be significantly improved. We comment on this issue in Section 7. 5.5 Knapsack polytope Given item sizes a = (a1 , . . . , an ) ∈ Rn≥0 and a capacity B ≥ 0, the corresponding knapsack polytope is defined as Pknap (a, B) := conv {x ∈ {0, 1}n : a⊺ x ≤ B}. Similar to the case of stable set polytopes, for certain item sizes and capacities the corresponding knapsack polytopes have a simple structure. In general, however, knapsack polytopes turn out to be complicated polytopes. Indeed, in [26] it is shown that for every O(n2 ) n, there exist item sizes a ∈ R≥0 and a capacity B ≥ 0 such that Pcut (n) is an affine projection of a face of Pknap (a, B). Analogous to the previous section, using Lemma 23 and Corollary 22 we conclude: Corollary 26. There exists a constant γ > 0 such that the following holds. For every n, there exist item sizes √ √ a ∈ Rn≥0 and a capacity B ≥ 0 such that any MILEF of Pknap (a, B) of size at most 2γ n has Ω ( n/log n) integer variables. Clearly, by its definition, Pknap (a, B) admits a linear-size MILEF with n integer variables. While we are not aware of any other polynomial-size MILEF for general knapsack polytopes that uses o(n) integer variables, it is not clear to us whether the bound in Corollary 26 can be significantly improved. 5.6 Dominant of the V -join polytope In this section, we consider the V -join polytope of Kn and in particular its dominant. Since both polyhedra contain the perfect matching polytope as a face, it is not surprising that we obtain lower bounds on the complexity of MILEFs of these polyhedra. However, the main purpose of this section is to obtain lower bounds for approximate (MI)LEFs, which will be essential for establishing lower bounds for the dominant of the odd cut polytope in the next section. Let n be even and Kn = (V, E) be the complete graph on n vertices. Recall that an edge subset F ⊆ E is a called a V -join in Kn if every vertex in (V, F ) has odd degree. The V -join polytope of Kn is defined as the convex hull of the characteristic vectors of all V -joins in Kn and is denoted by Pvjoin (n) ⊆ RE . The dominant of the V -join polytope is defined as P↑vjoin (n) := Pvjoin (n) + RE ≥0 . 18 In the next statement, we derive a lower bound on approximate LEFs for P↑vjoin (n) by exploiting the following relation between P↑vjoin (n) and Pmatch (n). First, note that every V -join has cardinality at least n/2, and hence the set F := {x ∈ P↑vjoin (n) : 1⊺ x = n/2} is a face of P↑vjoin (n). Furthermore, a subset of edges of E is a V -join of cardinality n/2 if and only if it is a perfect matching in Kn , i.e., a matching of cardinality n/2. Since every matching consists of at most n/2 edges, we have that Ppmatch (n) := {x ∈ Pmatch (n) : 1⊺ x = n/2} = F is also a face of Pmatch (n). The polytope Ppmatch (n) is called the perfect matching polytope. Furthermore, it is easy to see that Pmatch (n) = {y ∈ RE ≥0 : y ≤ x for some x ∈ Ppmatch (n)} holds. In what follows, we use all these relations together with Theorem 16 to obtain a similar statement for P↑vjoin (n). Theorem 27. There are constants α, γ > 0 such that, for every n even, any polyhedron K with P↑vjoin (n) ⊆ K ⊆ (1 − α )P↑vjoin (n) n4 satisfies xc(K) > 2γn . Proof. For brevity, we write P↑vjoin , Pmatch , and Ppmatch as shorthands for P↑vjoin (n), Pmatch (n), and Ppmatch (n), respectively. Consider any polyhedron K such that P↑vjoin ⊆ K ⊆ (1 − ε)P↑vjoin , where ε will be fixed later, and consider the hyperplanes H = {x ∈ RE : 1⊺ x = n/2} and H0 = {x ∈ RE : 1⊺ x = 0}. To better structure the proof, we divide it into three claims. Claim: For any c ∈ RE with kck2 ≤ 1, we have minx∈P↑ vjoin (c + 2n · 1)⊺ x = minx∈Ppmatch (c + 2n · 1)⊺ x. Since Ppmatch ⊆ P↑vjoin , it suffices to show that α := minx∈P↑ vjoin (c + 2n · 1)⊺ x is attained by a point in Ppmatch . To this end, let y be any vertex of Ppmatch and observe that we have n α ≤ (c + 2n · 1)⊺ y = c⊺ y + 2nkyk1 ≤ kyk2 + 2nkyk1 ≤ (2n + 1)kyk1 = (2n + 1) . 2 Next, since c + 2n · 1 is nonnegative, α is finite and hence attained by a vertex x of P↑vjoin . We claim that x must be contained in Ppmatch . Indeed, otherwise, x would satisfy kxk1 = 1⊺ x ≥ n2 + 1, and hence  n +1 , α = (c + 2n · 1)⊺ x = c⊺ x + 2nkxk1 ≥ −kxk2 + 2nkxk1 ≥ (2n − 1)kxk1 ≥ (2n − 1) 2 which contradicts the previous inequality whenever n > 1. ⋄ Next, we show that K ∩ H approximates Ppmatch well. Claim: for any c ∈ H0 with kck2 ≤ 1, we have maxx∈K∩H c⊺ x ≤ maxx∈Ppmatch c⊺ x + εn2 . First, let c ∈ RE with kck2 ≤ 1 be arbitrary. Since c + 2n · 1 is nonnegative and since K ⊆ (1 − ε)P↑vjoin , we obtain min(c + 2n · 1)⊺ x ≥ (1 − ε) min (c + 2n · 1)⊺ x = (1 − ε) x∈K x∈P↑vjoin min x∈Ppmatch (c + 2n · 1)⊺ x, where the equality follows from the previous claim. This clearly implies that min c⊺ x = min (c + 2n · 1)⊺ x − n2 ≥ min(c + 2n · 1)⊺ x − n2 x∈K∩H x∈K∩H x∈K 19 min (c + 2n · 1)⊺ x − n2 min c⊺ x + (1 − ε)n2 − n2 min c⊺ x − εn2 ≥ (1 − ε) x∈Ppmatch = (1 − ε) x∈Ppmatch = (1 − ε) x∈Ppmatch holds for every c ∈ RE with kck2 ≤ 1. Equivalently, we obtain that max c⊺ x ≤ (1 − ε) x∈K∩H max x∈Ppmatch c⊺ x + εn2 holds for every c ∈ RE with kck2 ≤ 1. Now let c ∈ H0 with kck2 ≤ 1. Since c satisfies c⊺ 1 = 0 1 1 is contained in Ppmatch , we clearly have maxx∈Ppmatch c⊺ x ≥ 0 and hence we obtain the and since n−1 claimed inequality. ⋄ Define K̄ := {x ∈ RE ≥0 : x ≤ y for some y ∈ K ∩ H} and observe that we have xc(K̄) ≤ 2|E| + xc(K ∩ H) ≤ n2 + xc(K). ′ Thus, it is enough to prove that xc(K̄) ≥ 2γ n holds for some universal constant γ ′ > 0. Since Ppmatch ⊆ K∩H and Pmatch = {x ∈ RE ≥0 : x ≤ y for some y ∈ Ppmatch }, we have Pmatch ⊆ K̄. Together with the following claim we finally obtain (1 − ǫn3 )K̄ ⊆ Pmatch ⊆ K̄. This implies xc(K̄) = 2Ω(n) , as desired, by setting ǫ := nα4 , where α is the constant from Theorem 16, and using Theorem 16. Claim: We have (1 − εn3 )K̄ ⊆ Pmatch . As K̄ and Pmatch are down-closed, it suffices to show that (1 − εn3 ) maxx∈K̄ c̄⊺ x ≤ maxx∈Pmatch c̄⊺ x holds for every c̄ ∈ RE ≥0 with kc̄k2 = 1. To this end, fix such a c̄ and write it as c̄ = c + λ · 1, where c ∈ H0 with kck2 ≤ 1 and λ ≥ 0. From the previous claim, we obtain max c̄⊺ x − max c̄⊺ x = max c̄⊺ x − x∈K̄ x∈Pmatch x∈K∩H max x∈Ppmatch = max (c + λ · 1)⊺ x − x∈K∩H = max c⊺ x − x∈K∩H max x∈Ppmatch c̄⊺ x max (c + λ · 1)⊺ x x∈Ppmatch c⊺ x ≤ εn2 ≤ εn3 · max c̄⊺ x, x∈K̄ where the first equality follows from the fact that c̄ is nonnegative, and the last inequality is implied by 1 1 ∈ Ppmatch ⊆ K̄, we have maxx∈K̄ c̄⊺ x ≥ maxx∈K̄ c̄⊺ x ≥ n1 , which holds due to the following. As n−1 1 1 1 1 c̄( n−1 1) ≥ n kc̄k1 ≥ n kc̄k2 = n . ⋄ Next, we demonstrate that a statement as in Theorem 27 implies a particular inapproximability result in terms of relative distance. To this end, for a set P ⊆ Rd we define P ↑ := P + Rd≥0 . Lemma 28. Let P ⊆ [0, 1]d be a 0/1-polytope and let ε ∈ (0, 1), M > 0 such that every polyhedron K ⊆ Rd with P ↑ ⊆ K ⊆ (1 − ε)P ↑ satisfies xc(K) ≥ M . Then P ↑ ∩ [0, 1]d does not admit an dε -LEF of size less than M − 3d. Proof. We have to show that every polyhedron K ′′ ⊆ Rd with P ↑ ∩ [0, 1]d ⊆ K ′′ and rdist(P ↑ ∩ [0, 1]d , K ′′ ) ≤ dε satisfies xc(K ′′ ) ≥ M − 3d. To this end, define K ′ := K ′′ ∩ [0, 1]d and observe that we have P ↑ ∩ [0, 1]d ⊆ K ′ and rdist(P ↑ ∩ [0, 1]d , K ′ ) ≤ rdist(P ↑ ∩ [0, 1]d , K ′′ ) ≤ dε . Note that the latter implies dim(P ↑ ∩ [0, 1]d ) = dim(K ′ ). Since P ↑ ∩ [0, 1]d is an up-closed 0/1-polytope, Lemma 7 (i) implies gap- (P ↑ ∩ [0, 1]d , K ′ ) ≤ d · rdist(P ↑ ∩ [0, 1]d , K ′ ) ≤ ε, 1 + gap- (P ↑ ∩ [0, 1]d , K ′ ) 20 which is equivalent to gap- (P ↑ ∩ [0, 1]d , K ′ ) ≤ ε 1−ε . Note that this implies gap- (P ↑ , (K ′ )↑ ) = gap- ((P ↑ ∩ [0, 1]d )↑ , (K ′ )↑ ) ≤ ε , 1−ε where the equality follows from P ⊆ [0, 1]d implying (P ↑ ∩ [0, 1]d )↑ = P ↑ . Thus, for the polyhedron ε K := (K ′ )↑ ⊇ P ↑ we also obtain gap- (P ↑ , K) ≤ 1−ε . Since P ↑ , K ⊆ Rd≥0 are equal to their dominants, ε this implies (1 + 1−ε )K ⊆ P ↑ , which is equivalent to K ⊆ (1 − ε)P ↑ . By the assumption, we conclude that xc(K) ≥ M holds. Recall that K is defined via K = {x + y : x ∈ K ′′ , x ∈ [0, 1]d , y ∈ Rd≥0 }, and hence xc(K) ≤ xc(K ′′ ) + xc([0, 1]d ) + xc(Rd≥0 ) ≤ xc(K ′′ ) + 2d + d = xc(K ′′ ) + 3d, which shows xc(K ′′ ) ≥ xc(K) − 3d ≥ M − 3d, as claimed. The following inapproximability result for P↑vjoin (n) ∩ [0, 1]E is a direct consequence of Theorem 27 and Lemma 28. Corollary 29. There exist constants α, γ > 0 such that, for every n even, P↑vjoin (n) ∩ [0, 1]E does not admit an nα6 -LEF of size at most 2γn . Using Corollary 15, this immediately implies: Corollary 30. There exist constants α, γ > 0 such that, for every n even, any [0, 1]E of size at most 2γn has Ω (n/log n) integer variables. α n6 -MILEF of P↑vjoin (n) ∩ Finally, we use the following lemma to deduce an inapproximability result for MILEFs of P↑vjoin (n). Lemma 31. Let P ⊆ [0, 1]d be a 0/1-polytope and let ε, M, k > 0 such that every ε-MILEF of P ↑ ∩ [0, 1]d of size at most M has at least k integer variables. Furthermore, let K be any polyhedron with P ↑ ⊆ K ⊆ ε (1 − d+ε )P ↑ . Then every MILEF of K of size at most M − 2d has at least k integer variables. Proof. We may assume that dim(K) = dim(P ↑ ), otherwise intersect K with the affine hull H of P ↑ and observe that if K has a MILEF of a certain complexity, then K ∩ H has a MILEF of the same complexity. ↑ By the assumption, we have ε+d d K ⊆ P . First, we claim that this implies  ε+d  gap- P ↑ ∩ [0, 1]d , K ∩ [0, 1]d ≤ − 1. (15) d To see this, let c ∈ Rd≥0 . We have to show that min x∈P ↑ ∩[0,1]d c⊺ x ≤ ε+d min c⊺ y d y∈K∩[0,1]d (16) holds. Note that since P ⊆ [0, 1]d we have min x∈P ↑ ∩[0,1]d c⊺ x = min c⊺ x. x∈P ↑ ↑ Let y ⋆ ∈ K ∩ [0, 1]d such that c⊺ y ⋆ = miny∈K∩[0,1]d c⊺ y. Since ε+d d K ⊆ P , we obtain hence ε+d ⊺ ⋆ ε+d c y = min c⊺ y, min c⊺ x = min c⊺ x ≤ d d y∈K∩[0,1]d x∈P ↑ ∩[0,1]d x∈P ↑ 21 ε+d ⋆ d y ∈ P ↑ and which shows (16) and hence we have established (15). Thus, using the facts that P ↑ ∩ [0, 1]d is a 0/1-polytope, dim(K ∩ [0, 1]d ) = dim(P ↑ ∩ [0, 1]d ), and ↑ P ∩ [0, 1]d ⊆ K ∩ [0, 1]d , we can invoke Lemma 7 (ii), which, together with inequality (15) implies     rdist P ↑ ∩ [0, 1]d , K ∩ [0, 1]d ≤ d · gap- P ↑ ∩ [0, 1]d , K ∩ [0, 1]d   ε+d −1 ≤d· d = ε. Suppose now that K has a MILEF of size at most M − 2d with k′ integer variables. Then K ∩ [0, 1]d has a MILEF of size at most M with k′ integer variables. This means that P ↑ ∩ [0, 1]d has an ε-MILEF of size at most M with k′ integer variables. By the assumption we must have k′ ≥ k, which yields the claim. Finally, we are able to prove the following lower bound on the complexity of MILEFs approximating the dominant of the V -join polytope, which is a direct consequence of Corollary 30 and Lemma 31. Corollary 32. There are constants α, γ > 0 such that the following holds. Let n be even and K be any polyhedron with P↑vjoin (n) ⊆ K ⊆ (1 − nα8 )P↑vjoin (n). Then every MILEF of K of size at most 2γn has Ω(n/log n) integer variables. We remark that the V -join polytope (and hence also its dominant) has a polynomial-size (exact) MILEF with O(n) integer variables, see Section 6.1. 5.7 Dominant of the odd-cut polytope Using the bounds obtained in the previous section, we are ready to provide lower bounds on the complexity of MILEFs for the dominant of the odd-cut polytope. Let n be even and let Kn = (V, E) be the complete undirected graph on n vertices. An odd cut in Kn is defined as a subset F ⊆ E that can be written as F = {{v, w} ∈ E : v ∈ S, w ∈ / S} for some set S ⊆ V that has odd cardinality. The odd-cut polytope Pocut (n) ⊆ RE is defined as the convex hull of the characteristic vectors of all odd cuts in Kn , and its dominant is defined as P↑ocut (n) := Pocut (n) + RE ≥0 . It is easy to check that every odd cut intersects every V -join. However, an even stronger and wellknown link between P↑ocut (n) and P↑vjoin (n) is that these polyhedra are so-called blockers of each other. For a convex set K ⊆ Rd , its blocker B(K) is defined as B(K) := {x ∈ Rd≥0 : y ⊺ x ≥ 1 ∀y ∈ K} (see, e.g., [30, Sec. 9] for more information on blocking polyhedra). Using this notation, the mentioned relation reads     B P↑ocut (n) = P↑vjoin (n) and B P↑vjoin (n) = P↑ocut (n). Another important fact that we will use in what follows is the observation that every linear extended formulation for a polyhedron P ⊆ Rd can be turned into one for B(P ) by adding at most d + 1 additional inequalities. More precisely, we use the following well-known fact (see, e.g., [10, Prop. 1]): xc(B(P )) ≤ xc(P ) + d + 1 ∀P ⊆ Rd . (17) We are ready to transfer Theorem 27 to the dominant of the odd-cut polytope: Corollary 33. There are constants α, γ > 0 such that, for every n even, any polyhedron K with P↑ocut (n) ⊆ K ⊆ (1 − nα4 )P↑ocut (n) satisfies xc(K) > 2γn . 22 Proof. Let α, γ denote the constants in the statement of Theorem 27. For brevity, let us use the notation P := P↑ocut (n) and ε := nα4 , where we may assume that ε ∈ [0, 1]. Let K be a polyhedron with P ⊆ K ⊆ (1 − ε)P . Note that we have B((1 − ε)P ) ⊆ B(K) ⊆ B(P ). 1 By B((1 − ε)P ) = 1−ε B(P ) this yields B(P ) ⊆ (1 − ε)B(K) ⊆ (1 − ε)B(P ). Since B(P ) = P↑vjoin (n), ′ using Theorem 27 we obtain xc(B(K)) ≥ 2γn . By (17), we have xc(K) ≥ xc(B(K)) − |E| − 1 ≥ 2γ n for some universal constant γ ′ > 0, and the claim follows. Analogously to the case of the V -join polytope, we obtain from Corollary 33 and Lemma 28. Corollary 34. There exist constants α, γ > 0 such that, for every n even, P↑ocut (n) ∩ [0, 1]E does not admit an nα6 -LEF of size at most 2γn . Using Corollary 15, this immediately implies: Corollary 35. There exist constants α, γ > 0 such that, for every n even, any [0, 1]E of size at most 2γn has Ω (n/log n) integer variables. α -MILEF n6 of P↑ocut (n) ∩ Finally, Corollary 35 and Lemma 31 yield: Corollary 36. There are constants α, γ > 0 such that the following holds. Let n be even and K be any polyhedron with P↑ocut (n) ⊆ K ⊆ (1 − nα8 )P↑ocut (n). Then every MILEF of K of size at most 2γn has Ω(n/log n) integer variables. We remark that the odd-cut polytope (and hence also its dominant) has a polynomial-size (exact) MILEF with O(n) integer variables; see Section 6.2. 5.8 Conic bimodular integer programming Given A ∈ Zm×d and b ∈ Zm , consider the problem of optimizing a given linear function over the integer hull PI := conv(P ∩ Zd ) of the polyhedron P := {x ∈ Rn : Ax ≤ b}. Without any further assumption on A and b, this describes a general integer program and is hence NP-hard to solve. A well-known special case in which the problem becomes polynomial-time solvable is when A is totally unimodular, i.e., the largest absolute value of the determinant of any square submatrix of A is equal to 1. It is a well-known open question in the integer programming community whether integer programs can still be solved efficiently if they are described by an integer constraint matrix A such that the absolute value of any determinant of a square submatrix of A is bounded by some constant k. Recently, [1] answered this question in the affirmative for k = 2, by showing that integer programs are tractable if the constraint matrix A is bimodular, that is, A is an integer matrix of full column rank such that all determinants of n × n submatrices of A lie within {−2, −1, 0, 1, 2}. In the totally unimodular case, the polynomial-time solvability can be easily explained by observing that P and its integer hull PI coincide, and hence the problem reduces to solving a linear program. In contrast, the argumentation in [1] for the bimodular case is much more involved and gives no evidence of whether PI has a simple polyhedral representation as well, compared to P . In this section we show that bimodular integer programs, i.e., integer programs with bimodular constraint matrices, can lead to polyhedra PI that cannot be described by a small MILEF. This result will follow by showing that the dominant of the odd cut polytope can be captured by a bimodular integer program. To this end, let D = (V, A) be the complete digraph on n vertices and let us consider the polyhedron n o X V P := (x, y, z) ∈ RA × R × R : y − y ≤ x ∀(v, w) ∈ A, y = 2z + 1 . (18) w v v (v,w) ≥0 v∈V 23 First, note that P is described by a system of linear inequalities with a bimodular coefficient matrix (and an integer right-hand side). To see this, observe first that the constraint matrix has full column rank due to the non-negativity constraints. Moreover, notice that P is described by inequalities forming identity matrices and a vertex-arc incidence matrix, which are totally unimodular, plus an additional row (related to z) containing an entry of value 2 in an otherwise empty column (that of variable z). Thus, by developing over this last column, we see that any determinant of an ℓ × ℓ submatrix with ℓ = |A| + |V | + 1 is bounded by 2 in absolute value. Second, note that the polyhedron P is conic, i.e., there is a vertex for which all constraints are tight, because the point (x, y, z) = (0, 0, − 12 ) satisfies all linear constraints with equality. Third, it is easy to see that PI := conv(P ∩ RA × ZV × Z) can be affinely projected onto P↑ocut (n) (a formal proof is provided in Section 6.2). Optimizing over the integer points of a conic polyhedron P that is described by a bimodular constraint matrix is a conic bimodular integer program. By the above discussion and Corollary 36, we thus obtain: Theorem 37. There exists a constant γ > 0 such that the following holds. For every n there is a conic bimodular integer program with O(n2 ) variables, such that any MILEF of size at most 2γn for the convex hull of its feasible points requires Ω(n/ log n) integrality constraints. The importance of the fact that our hardness result even holds for conic bimodular integer programs is motivated by a result from Veselov and Chirkov [32], which implies that it suffices to find an efficient algorithm for conic bimodular integer programming, to solve any bimodular integer program efficiently. Thus, a natural approach to solve bimodular integer programs would have been to try to find a compact LEF or MILEF, with few integer variables, that describes the feasible solutions to conic bimodular integer programs, thus avoiding the partially involved combinatorial techniques used in [1], which is so far the only method to efficiently solve bimodular integer programs. Also, one could have hoped that an approach based on extended formulations may be amenable to extensions beyond the bimodular case. Theorem 37 shows that this approach cannot succeed. Still, there is hope that one may be able to design combinatorial approaches that can solve natural generalizations of bimodular integer programs. A step in this direction was done in [22]. 5.9 Large families of 0/1-polytopes As one of the first results establishing non-trivial lower bounds on size of LEFs, it is shown in [28] that γd for every constant γ > 0 the following holds: If P is any family of 0/1-polytopes in Rd with |P| ≥ 22 , then there exists a polytope P ∈ P with xc(P ) ≥ 2Ω(d) . It is also observed in [28] that by the well-known fact that there are doubly-exponentially many matroids7 on a ground set of cardinality n, there is for each n ∈ Z≥1 a matroid on a ground set of size n whose corresponding matroid polytope has exponential (in n) extension complexity. In this section, we extend both results to the mixed-integer setting. To this end, we make use of a recent generalization of the result in [28]. For two non-empty compact sets A, B ⊆ Rd recall that their Hausdorff distance with respect to the Euclidean norm is defined via   dH (A, B) := max sup inf ka − bk2 , sup inf ka − bk2 . b∈B a∈A a∈A b∈B Theorem 38 ([2, Thm. 1]). Let P be a family of polytopes in [0, 1]d of dimensions at least one with 2 ≤ |P| < ∞. Let ∆ > 0 be such that dH (P, P ′ ) ≥ ∆ holds for every two distinct polytopes P, P ′ ∈ P. Then 7 A matroid is a tuple M = (N, I), where N is a finite ground set and I ⊆ 2N is a non-empty family of subsets of N satisfying: (i) if I ∈ I and J ⊆ I, then J ∈ I, and (ii) if I, J ∈ I with |I| < |J|, then there is an element e ∈ J \ I such that I ∪ {e} ∈ I. The matroid polytope PM ⊆ [0, 1]N that corresponds to M is the convex hull of all characteristic vectors of sets in I. 24 there exists a polytope P ∈ P with xc(P ) ≥ s log |P| √ 2 . 8d(1 + log2 (2 d/∆) + log2 log2 |P|) Note that the family P in Theorem 38 is not restricted to only contain 0/1-polytopes. Next, we show that every large enough family of polytopes in [0, 1]d even contains polytopes that do not admit small approximate LEFs. To this end, we make use of the following lemma whose proof is given in Appendix A. √ rdist(A,B) Lemma 39. Let A, B ⊆ [0, 1]d be convex sets with ∅ = 6 A ⊆ B. Then dH (A, B) ≤ d · 1+rdist(A,B) . Proposition 40. For every constant γ > 0 there exists a constant γ ′ > 0 such that the following holds. For γd 1 every family P of 0/1-polytopes in Rd with |P| ≥ 22 there exists a polytope P ∈ P that admits no 4d -LEF ′ γ d of size at most 2 . Proof. We may assume that |P| ≥ 2 and that P only contains polytopes of dimensions at least one. Suppose 1 -LEF of size at most M . Thus, for every P ∈ P there is a convex set that every P ∈ P admits a δ := 4d d BP ⊆ R with P ⊆ BP , rdist(P, BP ) ≤ δ, and xc(BP ) ≤ M . Clearly, the set CP := BP ∩ [0, 1]d satisfies √ P ⊆ CP , rdist(P, CP ) ≤ δ, as well as xc(CP ) ≤ M + 2d. By Lemma 39, we have dH (P, CP ) ≤ δ d for every P ∈ P, and hence for every two distinct polytopes P, P ′ ∈ P we obtain √ √1 ≤ dH (P, P ′ ) ≤ dH (P, CP ) + dH (CP , CP ′ ) + dH (CP ′ , P ′ ) ≤ dH (CP , CP ′ ) + 2δ d, d where the first inequality follows from the fact that for any two distinct 0/1-polytopes in Rd , we have √ that 1/ d is a lower bound on their Hausdorff distance,8 and the second inequality follows by the triangle 1 inequality for the Hausdorff distance. Hence, this implies dH (CP , CP ′ ) ≥ 2√ . Applying Theorem 38 to d the family {CP : P ∈ P}, we obtain that there exists a P ∈ P such that s 2γd xc(CP ) ≥ ≥ 2γ̃d 8d(1 + log2 (4d) + γd) for some γ̃ > 0 only depending on γ. This shows M ≥ xc(CP ) − 2d ≥ 2γ̃d − 2d, which yields the claim. The above statement together with Corollary 15 implies the following result. Proposition 41. For every constant γ > 0 there is a constant α > 0 such that the following holds. Let P γd be any family of 0/1-polytopes in Rd with |P| ≥ 22 . Then there exists a polytope P ∈ P such that every 1 αd has Ω(n/log n) integer variables. 5d -MILEF of P of size at most 2 Using the fact that there are doubly-exponentially many matroids (see [12]), we thus obtain. Theorem 42. There is a constant c > 0 such that the following holds. Let n ∈ Z≥1 , and let m, k > 0 such 1 that there exists a 5d -MILEF with complexity (m, k) with m ≤ 2c·n for any matroid polytope of any matroid on a ground set of cardinality n. Then k = Ω(n/log n). This can be deduced by observing that the Hausdorff distance of any vertex of the hypercube [0, 1]d to the convex hull of all √ other vertices is 1/ d. 8 25 6 Upper bounds In this section, we provide MILEFs for polyhedra considered in Section 5 that complement some bounds on the number of integer variables obtained in that section. To this end, we will consider different polytopes that are convex hulls of characteristic vectors of certain edge subsets of the complete graph on n vertices, which we denoted by Kn = (V, E). For all these polytopes there exist polynomial-size textbook MILEFs that use Θ(n2 ) integer variables (usually they consist of a binary variable for every edge). However, in what follows we present some (rather non-standard) MILEFs that only use O(n log n) or even O(n) integer variables, respectively. 6.1 Matching polytope and V -join polytope We start by considering the V -join polytope Pvjoin (n) ⊆ RE of Kn . Recall that a V -join is an edge subset F ⊆ E such that every vertex in (V, F ) has odd degree. To construct a polynomial-size MILEF for Pvjoin (n) with only n integer variables, let us fix any orientation O of the edges in E and denote by δ+ (v) ⊆ E and δ− (v) ⊆ E the sets of edges that enter and leave v according to O, respectively. Furthermore, let us write δ(v) := {e ∈ E : v ∈ P e} = δ+ (v) ∪ δ− (v). Finally, for any edge set F ⊆ E and any vector x ∈ RE we use the notation x(F ) := e∈F xe . Proposition 43. For every n even, we have  Pvjoin (n) = conv x ∈ [0, 1]E : ∃z ∈ ZV with x(δ+ (v)) − x(δ− (v)) = 2zv + 1 for all v ∈ V . In particular, Pvjoin (n) admits a MILEF of size O(n2 ) with n integer variables. Proof. Let Q ⊆ RE denote the polytope on the right-hand side. To show Pvjoin (n) ⊆ Q, it suffices to show that every vertex of Pvjoin (n) is contained in Q. To this end, let x ∈ RE be a vertex of Pvjoin (n). Since x is the characteristic vector of a V -join, for every v ∈ V we have that x(δ(v)) = x(δ+ (v)) + x(δ− (v)) is odd, and so is x(δ+ (v)) − x(δ− (v)). Thus, for every v ∈ V there exists an integer zv ∈ Z that satisfies x(δ+ (v)) − x(δ− (v)) = 2zv + 1, and hence x ∈ Q. It remains to show Q ⊆ Pvjoin (n), for which it again suffices to show that every vertex of Q is contained in Pvjoin (n). To this end, let x be a vertex of Q. Observe that there exists a vector z ∈ ZV such that x is a vertex of the polytope  Pz := x̃ ∈ [0, 1]E : x̃(δ+ (v)) − x̃(δ− (v)) = 2zv + 1 for all v ∈ V . Note that Pz is defined by a totally unimodular matrix (the non-trivial constraints are described by a nodearc incidence matrix of the directed graph defined by the orientation O). Thus, since z is integral, we obtain that x ∈ {0, 1}E . Furthermore, for every v ∈ V we clearly have that x(δ+ (v)) − x(δ− (v)) is odd, and so is x(δ+ (v)) + x(δ− (v)) = x(δ(v)). This shows that x is a characteristic vector of a V -join and hence x ∈ Pvjoin (n). As an immediate corollary of Proposition 43 we obtain the following. Corollary 44. For every n even, P↑vjoin (n) admits a MILEF of size O(n2 ) with n integer variables. This shows that the lower bound provided in Corollary 32 is tight up to a factor of O(log n). 26 Since the perfect matching polytope Ppmatch (n) of Kn is a face of Pvjoin (n), and since the matching polytope Pmatch (n) of Kn is equal to {x ∈ RE ≥0 : x ≤ y for some y ∈ Ppmatch (n)}, the above observation shows that Pmatch (n) also admits a MILEF of size O(n2 ) with n integer variables. Below, we provide an alternative, even simpler MILEF of the same complexity for general graphs. To this end, let G = (V, E) be any undirected graph, and fix any orientation O of the edges of G. Proposition 45. If P ⊆ RE is the matching polytope of graph G, then  + P = conv x ∈ RE ≥0 : x(δ(v)) ≤ 1 and x(δ (v)) ∈ Z for every v ∈ V . In particular, P admits a MILEF of size O(n2 ) with n integer variables. Proof. Let Q denote the polytope on the right-hand side. It is clear that P is contained in Q. To show + Q ⊆ P , let x ∈ RE ≥0 that satisfies x(δ(v)) ≤ 1 and x(δ (v)) ∈ Z for every v ∈ V . Let F ⊆ E be the support of x. We claim that G′ := (V, F ) is a bipartite subgraph of G. To see this, first observe that x(δ+ (v)) ∈ {0, 1} for every v ∈ V . Suppose that e = {v, w} ∈ F , and assume that e ∈ δ+ (v) ∩ δ− (w). Since e ∈ F , we have 0 < xe ≤ x(δ+ (v)), which implies x(δ+ (v)) = 1. Furthermore, we have x(δ+ (w)) ≤ x(δ+ (w)) + 1 − x(δ(w)) = 1 − x(δ− (w)) ≤ 1 − xe < 1, and hence x(δ+ (w)) = 0. Thus, any edge in F is incident to a node v with δ+ (v) = 1 and a node w with δ− (w) = 0, showing that G′ is bipartite. Since G′ is bipartite and since x(δ(v)) ≤ 1 holds for every v ∈ V , the restriction of x to RF is contained in the matching polytope of G′ . Embedding the matching polytope of G′ into RE , we obtain that it is a face of P and hence x is contained in P . For the case of the complete graph, this shows that the lower bound obtained in Corollary 18 is tight up to a factor of O(log n). 6.2 Cut polytope and odd-cut polytope Next, let us consider the cut polytope Pcut (n) and the odd-cut polytope Pocut (n) of Kn (for the latter we assume that n is even). Recall that a cut is an edge subset F ⊆ E that can be written as F = {{v, w} ∈ E : v ∈ S, w ∈ / S} for some S ⊆ V , and it is called an odd cut if |S| is odd. (We remind the reader that we allow S = ∅ and S = V .) Let us first start with two simple MILEFs for Pcut (n) and Pocut (n) that use O(n) integer variables. Proposition 46. For every n we have n Pcut (n) = conv x ∈ [0, 1]E : x{v,w} ≥ yv − yw , (19) x{v,w} ≥ yw − yv , (20) x{v,w} ≤ yv + yw , and (21) x{v,w} ≤ 2 − yv − yw for all {v, w} ∈ E, y ∈ {0, 1}V Furthermore, for every n even we have n X Pocut (n) = conv x ∈ [0, 1]E : y ∈ {0, 1}V , (x, y) satisfy (19)–(22), v∈V (22) o . o xv = 2z + 1, z ∈ Z . In particular, both Pcut (n) and Pocut (n) admit MILEFs of size O(n2 ) with O(n) integer variables. 27 Proof. Let Q denote the polytope on the right-hand side of the first claim. From the definition of a cut, it is clear that Pcut (n) is contained in Q. Let x ∈ [0, 1]E and y ∈ {0, 1}V that satisfy (19)–(22). It is straightforward to check that the integrality of y forces x to be integral as well. Furthermore, it is easy to see that x is the characteristic vector of the cut defined by S := {v ∈ V : yv = 1}. Thus, x is contained in Pcut (n), which shows Q ⊆ Pcut (n). P The second claim (the description of Pocut (n)) follows from the above argumentation and the fact that v∈V xv = 2z + 1, z ∈ Z is equivalent to requiring S to be odd. The above proposition immediately implies the following. Corollary 47. For every n even, the dominant of the odd cut polytope P↑ocut (n) admits a MILEF of size O(n2 ) with O(n) integer variables. Proposition 46 and Corollary 47 show that the bounds obtained in Corollaries 22 and 35, respectively, are tight up to a factor of O(log n). Recall that in our reasoning in Section 5.8, we used another MILEF for P↑ocut (n), whose validity we want to prove next. We prove this through the proposition below, which shows that the polytope P defined by (18) satisfies that there is an affine projection of P ∩ (RA × ZV × Z) whose convex hull is P↑ocut (n). Proposition 48. For every n even, let D = (V, A) be the complete digraph on n vertices. Then n P↑ocut (n) = conv x ∈ RE : x{v,w} = x̄(v,w) + x̄(w,v) for all {v, w} ∈ E, yw − yv ≤ x̄(v,w) X yv = 2z + 1, for all (v, w) ∈ A, v∈V V x̄ ∈ RA ≥0 , y ∈ Z , z ∈ Z o . Proof. Let Q denote the polyhedron on the right-hand side. It is straightforward to check that every characteristic vector of an odd cut is contained in Q. As Q is clearly equal to its dominant, this shows P↑ocut (n) ⊆ Q. P To see the reverse inclusion, let us fix y ∈ ZV≥0 such that v∈V yv is odd. It remains to show that the projection onto RE of the polyhedron  Py := (x, x̄) ∈ RE × RA ≥0 : x{v,w} = x̄(v,w) + x̄(w,v) and yw − yv ≤ x̄(v,w) for all (v, w) ∈ A is contained in P↑ocut (n). To this end, let (x, x̄) ∈ Py P . Let δ be the smallest integer such that |{v ∈ V : yv = δ}| is odd. Note that such a δ exists since v∈V yv is odd. By the definition of δ, the set S := {v ∈ V : yv ≤ δ} has odd cardinality. For any v ∈ S and any w ∈ V \ S we have x{v,w} = x̄(v,w) + x̄(w,v) ≥ x̄(v,w) ≥ yw − yv ≥ (δ + 1) − δ = 1. Thus, x is entry-wise greater than or equal to the characteristic vector of the odd cut induced by S, and hence x ∈ P↑ocut (n). 6.3 Traveling salesman polytope Finally, we argue that there is a polynomial-size MILEF for the traveling salesman polytope Ptsp (n) of Kn that only uses O(n log n) integer variables. Let ℓ := ⌈log2 n⌉ and let us fix any set S ⊆ {0, 1}ℓ with 28 cardinality n. Furthermore, pick any bijective map f : S → V . Finally, fix any Hamiltonian cycle T ⊆ E, and consider the polytope Q := conv {(y1 , y2 , z) ∈ S × S × {0, 1} : y1 6= y2 , z = |T ∩ {{f (y1 ), f (y2 )}}|} . (23) We will use Q ⊆ Rℓ × Rℓ × R to construct a MILEF for Ptsp (n) as described in the proposition below. To bound the number of constraints used for this MILEF, we will later show that Q has small extension complexity. Proposition 49. For every n we have Ptsp (n) = conv{x ∈ [0, 1]E : ∃yv ∈ {0, 1}ℓ for v ∈ V such that (yv , yw , x{v,w} ) ∈ Q for all {v, w} ∈ E}. Proof. Let K denote the polytope on the right-hand side of the claim. Let x ∈ {0, 1}E be the characteristic vector of a Hamiltonian cycle C ⊆ E. Then there exists a bijective map g : V → V such that {v, w} ∈ C ⇐⇒ {g(v), g(w)} ∈ T . For every v ∈ V choose yv ∈ S ⊆ {0, 1}ℓ such that f (yv ) = g(v). Now for every {v, w} ∈ E we clearly have yv 6= yw as well as x{v,w} = 1 ⇐⇒ {v, w} ∈ C ⇐⇒ {g(v), g(w)} ∈ T ⇐⇒ {f (yv ), f (yw )} ∈ T, which means x{v,w} = |T ∩ {{f (yv ), f (yw )}}|. Thus, we have (yv , yw , x{v,w} ) ∈ Q for every edge {v, w} ∈ E and hence x ∈ K. This shows Ptsp (n) ⊆ K. For the reverse inclusion, let x ∈ [0, 1]E and consider for yv ∈ {0, 1}ℓ for v ∈ V such that we have (yv , yw , x{v,w} ) ∈ Q for every edge {v, w} ∈ E. Since every vertex v is incident to some edge, the definition of Q requires that yv ∈ S. Furthermore, since every two vertices are adjacent, all yv are pairwise distinct. Consider the set   X := (y, y ′ , z) ∈ S × S × {0, 1} : z = T ∩ {f (y), f (y ′ )} . Fix any edge {v, w} ∈ E and note that we have (yv , yw , x{v,w} ) ∈ conv(X). Thus, there exist some points P (y1 , y1′ , z1 ), . . . , (yk , yk′ , zk ) ∈ S and coefficients λ1 , . . . , λk ≥ 0 with ki=1 λi = 1 such that (yv , yw , x{v,w} ) = k X i=1 λi · (yi , yi′ , zi ) . Since yv ∈ {0, 1}ℓ and y1 , . . . , yk ∈ {0, 1}ℓ , this implies that y1 = · · · = yk = yv . Analogously, we must also have y1′ = · · · = yk′ = yw . By the definition of X, we further have  zi = T ∩ {f (yi ), f (yi′ )} = |T ∩ {{f (yv ), f (yw )}}| and hence x{v,w} = k X i=1 λi · zi = |T ∩ {{f (yv ), f (yw )}}| . In other words, we have x{v,w} ∈ {0, 1} with x{v,w} = 1 ⇐⇒ {f (yv ), f (yw )} ∈ T . This means that x is the characteristic vector of the Hamiltonian cycle with edge set {{v, w} : {f (yv ), f (yw )} ∈ T } (recall that the yv ’s are pairwise distinct). Thus, we obtain x ∈ Ptsp (n) and hence K ⊆ Ptsp (n). Corollary 50. For every n, Ptsp (n) admits a MILEF of size O(n4 ) with O(n log n) integer variables. 29 Proof. By Proposition 49 it suffices to show that the polytope Q defined in (23) can be described by an extended formulation of size O(n2 ). To see this, observe that Q has k := |S|(|S| − 1) = O(n2 ) vertices. Since Q is the Pset of all convex combinations of its vertices, we have that Q is the projection of the simplex {x ∈ Rk≥0 : ki=1 xi = 1} under the linear map defined by a matrix whose columns are the vertices of Q. Thus, Q indeed has an extended formulation of size k. This shows that the lower bound obtained in Corollary 24 is tight up to a factor of O(log2 n). We are not aware of any polynomial-size MILEF for Ptsp (n) that uses o(n log n) integer variables. 7 Towards tight bounds In this work, we obtained lower bounds on the number of integer variables required in sub-exponential size MILEFs for a variety of polyhedra by relying on lower bounds on sizes of approximate extended formulations for such polyhedra. We close our paper by highlighting some gaps left by our techniques. √ Stable set polytopes For the case of stable set polytopes, we show a lower bound of Ω( n/log n) (for certain graphs), while we are not aware of any MILEF of sub-exponential size that uses o(n) integer variables. In fact, we believe that there exist graphs for which Ω(n) integer variables are needed. This large gap can be explained by our current approach, which simply uses the lower bound for either the cut polytope or matching polytope in a black-box way by considering stable set polytopes of graphs on n vertices that have √ faces that can be affinely projected onto Pcut (n′ ) or Pmatch (n′ ), respectively, where n′ = O( n). A more promising family of graphs to study is the one considered in the recent work of Göös, Jain & Watson [15] who exhibit n-vertex graphs whose stable set polytopes have extension complexities of 2Ω(n/ log n) . Because their work, however, only refers to exact rather than approximate extended formulations, it would require further analysis to lift their results to the mixed-integer setting through our techniques. Despite the fact that we do not believe that all stable set polytopes admit polynomial-size MILEFs with o(n) integer variables, another motivation for improving the lower bound is the following. In [20, Prop. 2] it is mentioned that if a family of polytopes P with vertices in {0, 1}d admits a polynomial-time algorithm to decide whether a point in {0, 1}d belongs to P , then P can be described by a MILEF whose size is polynomial in d and that uses only d integer variables. We are not aware of any family of polytopes that shows that the bound on the number of integer variables is asymptotically tight, but we believe that stable set polytopes are good candidates. Traveling salesman polytopes We proved that every MILEF of sub-exponential size for Ptsp (n) requires at least Ω(n/log n) integer variables, while there exists a polynomial-size MILEF with only O(n log n) integer variables. While it is likely that the lower bound can be improved to Ω(n), it is not clear to us whether Ptsp (n) admits a polynomial-size MILEF with O(n) integer variables. Closing the logarithmic gap: original-space formulations Even though we get nearly tight lower bounds on the number of integer variables required in sub-exponential size MILEFs for the matching polytope, the cut polytope, and the (dominant of the) odd-cut polytope, there is still a gap remaining. More precisely, for a graph on n vertices, we show a lower bound of Ω(n/log n) for each of the above polytopes, whereas there are polynomial-size descriptions using only O(n) many integer variables. This leaves a logarithmic gap. We believe that the lower bounds are not tight and Ω(n) integer variables are needed. Whereas we do not know how to get rid of the log n-factor in general, we can show a stronger lower bound through a different technique for a restricted class of MILEFs for the matching polytope; namely, MILEFs that live in the original space, i.e., the same space as the matching polytope. In other words, 30 MILEFs in original space are not allowed to use additional variables. More formally, we say that a MILEF (Q, σ, π) for a polyhedron P with k integer constraints is in original space, if π is the identity, i.e., we have the following (see (3)): P = Qσ := conv(Q ∩ σ −1 (Zk )). For such MILEFs for the matching polytope we show a lower bound of k = Ω(n). However, we highlight that we derive this linear lower bound only for the matching polytope and in original space, and it is open whether such a technique may extend to general MILEFs and beyond the matching polytope. Notice that a lower bound of Ω(n) for the number of integer constraints for small MILEFs of the matching polytope in the original space is tight (up to a constant factor), because the MILEF given in Proposition 45 is in original space. Theorem 51. There exists a constant γ > 0 such that any MILEF of Pmatch (n) of size at most 2γn in original space has Ω(n) integer constraints. Proof. Recall that there exists a constant γ > 0 such that the extension complexity of Pmatch (n) is at least 2γn , for every n ≥ 2. It suffices to prove that, for any MILEF of Pmatch (n) in original space of complexity (m, k), the inequality m · 23γk ≥ 2γn (24) must hold. By the definition of γ, the inequality clearly holds whenever k = 0. We assume that k ≥ 1 and proceed by induction over n ≥ 2. Since any MILEF of Pmatch (n) of complexity (m, k) must satisfy m ≥ 1, inequality (24) is clearly satisfied whenever 3k ≥ n and hence it holds if n ∈ {2, 3}. Now, let n ≥ 4 and assume that Pmatch (n) admits a MILEF of complexity (m, k) with k ≥ 1. That is, denoting by G = (V, E) the complete undirected graph on n vertices, there exist matrices A ∈ R[m]×E , C ∈ R[k]×E and vectors b ∈ R[m] , d ∈ Zk such that o n Pmatch (n) = conv x ∈ RE : Ax ≤ b, Cx + d ∈ Zk . We start with some simplifications that can be done over the integrality constraints Cx + d ∈ Zk without loss of generality. As the vector 0 is contained in Pmatch (n), the vector d must be integral; thus we can assume it to be zero, because Cx is integral if and only Cx + d is integral. Next, as the characteristic vector χe of each single edge e is contained in Pmatch (n), we learn that C is an integral matrix. Finally, we remark that we can add to a row of C an integer multiple of another row, and this operation will not change the (non-)integrality of a vector Cx. Fix an edge e such that the corresponding column in C is not zero. By performing integral row operations, as described above, we can assume that there is a single non-zero entry in this column. Let re be the row corresponding to this non-zero entry, and let C̄ ∈ Z[k−1]×E be the collection of all the other rows; hence, C̄χe = 0. We obtain n o Pmatch (n) = conv x ∈ RE : Ax ≤ b, C̄x ∈ Zk−1 , re⊺ x ∈ Z . (25) Now, let F ⊆ E contain e and all edges adjacent to it, and let G′ = (V, E \ F ). Let ae be the column of matrix A corresponding to edge e. Let P ′ be the matching polytope of G′ . We claim that, if we identify P ′ with the face of Pmatch (n) defined by setting xf = 0 for all f ∈ F , we have the following identity: o n (26) P ′ = conv x ∈ RE : xf = 0 ∀f ∈ F, Ax ≤ min{b, b − ae }, C̄x ∈ Zk−1 , where the min operator in min{b, b − ae } is taken component-wise. Note that the proof is complete once we show this, because P ′ is linearly isomorphic to Pmatch (n − 2), and hence Pmatch (n − 2) admits a MILEF 31 of complexity (m, k − 1). By the induction hypothesis, this implies m23γ(k−1) ≥ 2γ(n−2) , which yields inequality (24). To show that the inclusion “⊆” in (26) holds, consider any vertex x ∈ P ′ . Notice that x is the characteristic vector of a matching in G′ , which augments to a matching in G when we add edge e. Therefore, both x and y := x + χe must be in Pmatch (n). By using (25), we deduce that the inequalities Ax ≤ b and Ay = Ax + ae ≤ b hold, and so Ax ≤ min{b, b − ae } holds as well. The other conditions on the right-hand side of (26) are clearly satisfied for x. For the opposite inclusion, let x ∈ RE satisfying xf = 0 for all f ∈ F , Ax ≤ min{b, b − ae }, and C̄x ∈ Zk−1 . Clearly, there must be some λ ∈ [0, 1] such that y := x + λχe satisfies re⊺ y ∈ Z. Furthermore, we have C̄y = C̄x ∈ Zk−1 because the column of C̄ that corresponds to e is an all-zeros column. Moreover, we have the inequality Ay = Ax + λae ≤ min{b, b − ae } + λae ≤ b. Thus, the vector y satisfies all constraints of the formulation in (25), and so it is contained in Pmatch (n). Since Pmatch (n) is down-closed, x is also contained in Pmatch (n). Finally, recall that x satisfies xf = 0 for all f ∈ F and hence x ∈ P ′ . References [1] S. Artmann, R. Weismantel, and R. Zenklusen. A strongly polynomial algorithm for bimodular integer linear programming. In Proceedings of the 49th Annual ACM Symposium on Theory of Computing (STOC), pages 1206–1219, 2017. [2] G. Averkov, V. Kaibel, and S. Weltge. Maximum semidefinite and linear extension complexity of families of polytopes. Mathematical Programming, 2017. [3] D. Avis and H. R. Tiwary. On the Extension Complexity of Combinatorial Polytopes. In Proceedings of 40th International Colloquium on Automata, Languages, and Programming (ICALP), pages 57–68, 2013. [4] E. Balas. Disjunctive Programming. In P.L. Hammer, E.L. Johnson, and B.H. Korte, editors, Discrete Optimization II, volume 5 of Annals of Discrete Mathematics, pages 3–51. Elsevier, 1979. [5] A. Barvinok. A course in convexity, volume 54. American Mathematical Society Providence, 2002. [6] G. Braun, S. Fiorini, S. Pokutta, and D. Steurer. Approximation limits of linear programs (beyond hierarchies). Mathematics of Operations Research, 40(3):756–772, 2015. [7] G. Braun and S. Pokutta. The matching polytope does not admit fully-polynomial size relaxation schemes. In Proceedings of the 26th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 837–846, 2015. [8] M. Conforti, G. Cornuéjols, and G. Zambelli. Extended formulations in combinatorial optimization. Annals of Operations Research, 204(1):97–143, 2013. [9] M. Conforti, G. Cornuéjols, and G. Zambelli. Integer Programming (Graduate Texts in Mathematics). Springer, 2014. [10] M. Conforti, V. Kaibel, M. Walter, and S. Weltge. Subgraph polytopes and independence polytopes of count matroids. Operations Research Letters, 43(5):457–460, 2015. [11] C. De Simone. The cut polytope and the boolean quadric polytope. Discrete Mathematics, 79(1):71–75, 1990. 32 [12] W. M. B. Dukes. Bounds on the number of generalized partitions and some applications. Australasian Journal of Combinatorics, 28:257–262, 2003. [13] J. Edmonds. Maximum matching and a polyhedron with 0,1-vertices. Journal of Research of the National Bureau of Standards B, 69(125-130):55–56, 1965. [14] S. Fiorini, S. Massar, S. Pokutta, H. R. Tiwary, and R. de Wolf. Exponential lower bounds for polytopes in combinatorial optimization. Journal of the ACM, 62(2):17:1–17:23, 2015. [15] M. Göös, R. Jain, and T. Watson. Extension complexity of independent set polytopes. In Proceedings of the IEEE 57th Annual Symposium on Foundations of Computer Science (FOCS), pages 565–572, 2016. [16] L. Gouveia and S. Voß. A classification of formulations for the (time-dependent) traveling salesman problem. European Journal of Operational Research, 83(1):69 – 82, 1995. [17] R. Hildebrand, R. Weismantel, and R. Zenklusen. Extension Complexity Lower Bounds for MixedInteger Extended Formulations. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2342–2350, 2017. [18] V. Kaibel. Extended Formulations in Combinatorial Optimization. Optima 85, 2011. [19] V. Kaibel and S. Weltge. A Short Proof that the Extension Complexity of the Correlation Polytope Grows Exponentially. Discrete & Computational Geometry, 53(2):396–401, 2015. [20] V. Kaibel and S. Weltge. Lower Bounds on the Sizes of Integer Programs without Additional Variables. Mathematical Programming Series B, 154(1-2):407–425, 2015. [21] H. W. Lenstra Jr. Integer programming with a fixed number of variables. Mathematics of Operations Research, 8(4):538–548, 1983. [22] M. Nägele, B. Sudakov, and R. Zenklusen. Submodular minimization under congruency constraints. In Proceedings of the 29th ACM-SIAM Symposium on Discrete Algorithms (SODA), 2018. [23] T. Öncan, İ. K. Altınel, and G. Laporte. A comparative analysis of several asymmetric traveling salesman problem formulations. Computers & Operations Research, 36(3):637 – 654, 2009. [24] A.J. Orman and H.P. Williams. A Survey of Different Integer Programming Formulations of the Travelling Salesman Problem, volume 9 of Advances in Computational Management Science, chapter Optimisation, Econometric and Financial Analysis, pages 91–104. Springer Berlin Heidelberg, Berlin, Heidelberg, 2007. [25] M. Padberg and T.-Y. Sung. An analytical comparison of different formulations of the travelling salesman problem. Mathematical Programming, 52(1):315–357, 1991. [26] S. Pokutta and M. Van Vyve. A note on the extension complexity of the knapsack polytope. Operations Research Letters, 41(4):347–350, 2013. [27] R. T. Rockafellar. Convex Analysis. Princeton University Press, 2015. [28] T. Rothvoß. Some 0/1 polytopes need exponential size extended formulations. Mathematical Programming, 142(1-2):255–268, 2013. 33 [29] T. Rothvoß. The matching polytope has exponential extension complexity. In Proceedings of the 46th Annual ACM Symposium on Theory of Computing (STOC), pages 263–272, 2014. [30] A. Schrijver. Theory of linear and integer programming. John Wiley & Sons, Inc., 1986. [31] G.C. Shephard. Inequalities between mixed volumes of convex sets. Mathematika, 7(2):125–138, 1960. [32] S.I. Veselov and A.J. Chirkov. Integer program with bimodular matrix. Discrete Optimization, 6(2):220 – 222, 2009. [33] M. Yannakakis. Expressing combinatorial optimization problems by linear programs. Journal of Computer and System Sciences, 43(3):441 – 466, 1991. A Relative distance: proofs In this part, we provide the proofs of Lemmas 5, 6, 7, and 39. Proof of Lemma 5. In order to prove (i), let us define f (A, B) := inf {λ ≥ 0 : B ⊆ (1 + λ)A − λA} . It is straightforward to check that f (A, B) = rdist(A, B) in the cases that A = B = ∅ (value 0) or A=∅= 6 B (value ∞). Thus, in what follows we may assume that both sets are non-empty. Since both rdist(A, B) and f (A, B) are non-negative, it suffices to show that f (A, B) < λ implies rdist(A, B) ≤ λ, and that f (A, B) > λ implies rdist(A, B) ≥ λ, for any λ > 0. Suppose first that f (A, B) < λ holds for some λ > 0. Clearly, this implies B ⊆ (1 + λ)A − λA and hence for any linear map π : Rd → R we obtain π(B) ⊆ π ((1 + λ)A − λA) = (1 + λ)π(A) − λπ(A). Thus, for any point b ∈ B, there must be points a, a′ ∈ A such that π(b) = (1 + λ)π(a) − λπ(a′ ), or equivalently, π(b) − π(a) = λ(π(a) − π(a′ )). Recalling that we treat the fraction 0/0 as 0, we obtain the inequality inf a∈A |π(b) − π(a)| |π(b) − π(a)| ≥ . λ≥ ′ |π(a) − π(a )| diam(π(A)) As this inequality holds for every linear map π : Rd → R and every point b ∈ B, we obtain dH (A, B) supb∈B inf a∈A |π(b) − π(a)| = sup = rdist(A, B). diam(π(A)) π:Rd →R diam(π(A)) π:Rd →R λ ≥ sup Conversely, suppose that f (A, B) > λ > 0. Clearly, this implies B 6⊆ (1 + λ)A − λA =: A′ . Let b ∈ B \ A′ . Moreover, notice that A′ is convex, which follows by convexity of A. We now invoke a classic convex separation theorem, see [27, Thm. 11.3], to properly separate b from A′ . More precisely, using that both A′ and {b} are convex sets whose relative interiors do not intersect—which holds trivially because the relative interior of {b} is the empty set— one can find a hyperplane H that properly separates {b} from A′ , which means that (i) b is contained in one of the two closed halfspaces defined by H, (ii) A′ is contained in the other closed halfspace defined by H, and (iii) not both A′ and {b} are fully contained in H. By shifting 34 H to go through b, one can assume that A′ is not fully contained in H. This implies that there is a linear map π : Rd → R such that π(b) ≥ sup π(x) and x∈A′ π(b) > inf ′ π(x). x∈A If supa∈A π(a) = inf a∈A π(a), then π(A) = {γ} for some γ ∈ R, and hence diam(π(A)) = 0. Furthermore, we have γ = inf x∈A′ π(x) < π(b), which implies dH (π(A), π(B)) > 0 and we obtain rdist(A, B) = ∞ ≥ λ. Otherwise, if supa∈A π(a) > inf a∈A π(a), then we have π(b) ≥ sup π(x) = (1 + λ) sup π(a) − λ inf π(a) = sup π(a) + λ diam(π(A)), x∈A′ a∈A a∈A a∈A where diam(π(A)) > 0 follows from the assumption supa∈A π(a) > inf a∈A π(a). As π(b) is finite, then so are the quantities supa∈A π(a) and diam(π(A)). Finally, λ≤ dH (π(A), π(B)) π(b) − supa∈A π(a) ≤ ≤ rdist(A, B). diam(π(A)) diam(π(A)) Claim (ii) follows directly from (i) and the fact that every affine map π satisfies π((1 + λ)A − λA) = (1 + λ)π(A) + λπ(A). In order to show (iii), let R denote the right-hand side of the claimed inequality. Since rdist(A, C) and R are non-negative, it suffices to show that rdist(A, C) > λ > 0 implies R ≥ λ, for any λ > 0. By the definition of rdist(·), note that rdist(A, C) > λ > 0 implies that there exists a linear map π : Rd → R such that dH (π(A), π(C)) , (27) λ≤ diam(π(A)) where 0 < diam(π(A)) < ∞ due to λ > 0. In particular, π(A) is a proper interval. If π(C) is unbounded, we must have rdist(A, B) = ∞ (if also π(B) is unbounded) or rdist(B, C) = ∞ (if π(B) is bounded). Thus, if π(C) is unbounded, we have R = ∞ and the inequality holds. It remains to consider the case that π(A), π(B), and π(C) are proper intervals. (Notice that these intervals need not be closed.) In this case, there exist numbers c ≤ b ≤ a < a′ ≤ b′ ≤ c′ describing the closures of these intervals: cl(π(A)) = [a, a′ ], cl(π(B)) = [b, b′ ], and cl(π(C)) = [c, c′ ]. Using this notation and setting x := max{b − c, c′ − b′ }, y := max{a − b, b′ − a′ }, and D := a′ − a, we have rdist(A, B) ≥ max{a − b, b′ − a′ } y dH (π(A), π(B)) = = diam(π(A)) D D as well as rdist(B, C) ≥ max{b − c, c′ − b′ } x x dH (π(B), π(C)) = = ′ ≥ . diam(π(B)) b′ − b (b − a′ ) + D + (a − b) 2y + D Thus, we obtain y x y x x+y + +2· · = D 2y + D D 2y + D D ′ ′ dH (π(A), π(C)) max{(a − b) + (b − c), (c − b ) + (b′ − a′ )} = ≥ D diam(π(A)) ≥ λ, R≥ 35 as claimed, where the last inequality follows by (27). To prove (iv), first notice that the claimed inequality holds trivially if all sets are empty, or if Ai = ∅ = 6 Bi for some i ∈ [t]. We can also ignore any pair of empty sets Ai = Bi = ∅, as its removal does not modify the terms in the inequality. Thus, we assume in what follows that all sets are non-empty. It suffices to show that maxi∈[t] rdist(Ai , Bi ) < λ implies rdist(conv(∪i∈[t] Ai ), conv(∪i∈[t] Bi )) ≤ λ, for any λ > 0. that we have Suppose that maxi∈[t] rdist(Ai , Bi ) < λ holds for some λ > 0. By (i), this implies P Bi ⊆ (1 + λ)Ai − λA for each i ∈ [t]. Let b ∈ conv(∪ B ) and write it as b = µ i i i∈[t] i∈[t] i bi for some P µ1 , . . . , µt ≥ 0 with i∈[t] µi = 1 and bi ∈ Bi for i ∈ [t]. For every i ∈ [t], since Bi ⊆ (1 + λ)Ai − λAi , there exist ai , a′i ∈ Ai with bi = (1 + λ)ai − λa′i . We obtain X  b= µi (1 + λai ) − λa′i i∈[t] = (1 + λ) X i∈[t] µ i ai − λ X i∈[t] µi a′i ∈ (1 + λ) conv(∪i∈[t] Ai ) − λ conv(∪i∈[t] Ai ), which shows B ⊆ (1 + λ) conv(∪i∈[t] Ai ) − λ conv(∪i∈[t] Ai ). By (i), this implies that the relative distance of conv(∪i∈[t] Ai ) and conv(∪i∈[t] Bi ) is at most λ, which completes the proof. Proof of Lemma 6. We shall use the alternative definition of relative distance provided in Lemma 5 (i). Since both rdist(A, B) and gap+ (A, B) are non-negative, it suffices to show that gap+ (A, B) < λ implies rdist(A, B) ≤ λ, and that rdist(A, B) < λ implies gap+ (A, B) ≤ λ, for any λ > 0. Suppose first that gap+ (A, B) < λ. As A is down-closed and B is contained in Rd≥0 , this implies that B ⊆ (1 + λ)A. And as 0 ∈ A, it is clear that (1 + λ)A ⊆ (1 + λ)A − λA. Therefore, we have the inclusion B ⊆ (1 + λ)A − λA, and the inequality rdist(A, B) ≤ λ. Conversely, if rdist(A, B) < λ, we have the inclusion B ⊆ (1 + λ)A − λA. As A is down-closed, so is the set (1 + λ)A, and by definition this means that ((1 + λ)A − λA) ∩ Rd≥0 ⊆ (1 + λ)A. Thus, since B is contained in Rd≥0 , we have B ⊆ (1 + λ)A. This implies that gap+ (A, B) ≤ λ. Proof of Lemma 7. If d′ = 1, then both A and B are proper line segments whose endpoints are 0/1-points. Since no such line segment contains a third 0/1-point and since A ⊆ B, we obtain A = B. Thus, from now on we can assume that d′ ≥ 2 holds. To prove the two inequalities, we first argue that we may assume that A and B are full-dimensional. To see this, let H ⊂ Rd be the affine hull of A (and B). If H 6= Rd , then there exists a set I ⊆ [d] such ′ that H = {(x1 , . . . , xd ) ∈ Rd : xi = 1 ∀i ∈ I}, because A is up-closed. In this case, let π : Rd → Rd denote the projection onto the coordinates in [d] \ I. It is straightforward to verify that rdist(A, B) = rdist(π(A), π(B)) and gap- (A, B) = gap- (π(A), π(B)) hold. Assuming that the inequalities hold for fulldimensional sets, we directly obtain the claimed inequalities since dim(π(A)) = dim(π(B)) = d′ . Thus, we may assume that d′ = dim(A) = dim(B) = d holds. To show (i), since rdist(A, B) ≥ 0, it suffices to show that gap- (A, B) > ε implies rdist(A, B) ≥ 1 ε d−1 · 1+ε , for any ε ≥ 0. Assume that gap (A, B) > ε holds for some ε ≥ 0. This implies that there exists a direction c = (c1 , . . . , cd ) ∈ Rd≥0 such that min c⊺ a > (1 + ε) inf c⊺ b. a∈A b∈B (28) 1 First, observe that (28) implies α := mina∈A c⊺ a > 0. Second, we argue that we may assume that α ≥ kck d holds. To this end, let V ⊆ {0, 1}d denote the vertex set of A. We clearly have α = minv∈V c⊺ v. For every i ∈ [d], replace ci by the smallest nonnegative number such that the value of minv∈V c⊺ v does not change. With this modification, we clearly have that (28) is still valid. Furthermore, for every i ∈ [d] with ci > 0 36 there must exist a point v = (v1 , . . . , vd ) ∈ V with c⊺ v = α and vi = 1, and hence α ≥ ci . This implies d · α ≥ kck1 , as claimed. Third, since A is up-closed, it contains the all-ones vector and hence maxa∈A c⊺ a = kck1 . Denoting by π : Rd → R the linear projection x 7→ c⊺ x, we thus obtain π(A) = [α, kck1 ]. By inequality (28), we also α . Finally, we establish have π(B) = [β, kck1 ], where β := inf b∈B c⊺ b ≤ 1+ε rdist(A, B) ≥ 1 α − 1+ε α α−β 1 ε ≥ = · . kck1 − α dα − α d−1 1+ε To show (ii), since gap- (A, B) ≥ 0, it suffices to show that rdist(A, B) > λ implies gap- (A, B) ≥ for any λ ≥ 0. Assume that rdist(A, B) > λ holds for some λ ≥ 0. By Lemma 5 (i), this implies B 6⊆ (1 + λ)A − λA. Denoting by 1 ∈ A the all-ones vector, this in particular means that there exists a 1 λ 1 λ b̄ ∈ B such that b̄+λ1 ∈ / (1+λ)A. Equivalently, we obtain 1+λ b̄+ 1+λ 1∈ / A. Since 1+λ b̄+ 1+λ 1 ∈ [0, 1]d λ 1 b̄ + 1+λ 1∈ / A + Rd≥0 . Since A + Rd≥0 is an up-closed polyhedron, there and A is up-closed, we obtain 1+λ exists a vector c ∈ Rd≥0 such that λ d−1−λ , c ⊺   1 λ 1 < min c⊺ a = min c⊺ a =: α b̄ + a∈A 1+λ 1+λ a∈A+Rd≥0 holds, which is equivalent to c⊺ b̄ < (1 + λ)α − λkck1 . Furthermore, note that since A is an up-closed full-dimensional 0/1-polytope, it must contain all 0/1-points d−1 with a support of size d − 1 and hence d−1 d 1 ∈ A. This clearly implies α ≤ d kck1 . Hence, using the previous inequality, we obtain inf c⊺ b ≤ c⊺ b̄ < (1 + λ)α − λkck1 ≤ (1 + λ)α − λ b∈B d d−1−λ α= α. d−1 d−1 Since inf b∈B c⊺ b ≥ 0 and α ≥ 0, we must have d − 1 − λ > 0 and hence   λ inf c⊺ b, α≥ 1+ d − 1 − λ b∈B which shows gap- (A, B) ≥ λ d−1−λ . Proof of Lemma 39. Since B) ≤ 1, it suffices to show that rdist(A, B) < λ for some 0 ≤ λ ≤ 1 √ rdist(A, λ . Note that, by Lemma 5 (i), rdist(A, B) < λ implies that for every b ∈ B implies dH (A, B) ≤ d · 1+λ λ 1 b + 1+λ a ∈ A, and thus there exists an a ∈ A such that a′ := 1+λ kb − a′ k2 = λ √ λ kb − ak2 ≤ d , 1+λ 1+λ where the inequality follows √ from the fact that a, b ∈ [0, 1]d . Thus, for every b ∈ B there exists a point λ ′ ′ a ∈ A with kb − a k2 ≤ 1+λ d, which yields the claim. 37
8cs.DS
Creating modular and reusable DSL textual syntax definitions with Grammatic/ANTLR arXiv:0902.2621v1 [cs.PL] 16 Feb 2009 Andrey Breslav St. Petersburg State University of Information Technology, Mechanics and Optics [email protected] Abstract. In this paper we present Grammatic – a tool for textual syntax definition. Grammatic serves as a front-end for parser generators (and other tools) and brings modularity and reuse to their development artifacts. It adapts techniques for separation of concerns from ApsectOriented Programming to grammars and uses templates for grammar reuse. We illustrate usage of Grammatic by describing a case study: bringing separation of concerns to ANTLR parser generator, which is achieved without a common time- and memory-consuming technique of building an AST to separate semantic actions from a grammar definition. 1 Introduction When adopting a concept of Domain-Specific Languages (DSLs, see [1]) and developing textual syntax for them we are using syntax-related tools extensively. Thus we need different tools which in most cases use context-free grammars to define language syntax, we will call them “grammarware engineering tools” after the paper [2]. All these tools use grammar definitions and (according to the same paper) there is a strong need in applying software engineering practices in this area. In the present paper we address a problem of modularity and reuse of grammar definitions. All the grammarware engineering tools have to support reuse of their input artifacts, but it requires tools’ authors quite an effort to implement it. We examined popular parser generators [3,4,5,6,7,8,9,10] and only three of them [8,9,10] have strong reuse capabilities, though even they could be improved in this sense. And grammarware engineering is not limited to parser generators. May be this is natural: when working on a new tool addressing some syntax-related problem (i. e. implementing a new parsing algorithm or a new concept of a pretty-printer) probably one of the last things a developer has on his/her ToDo list is grammar definition reuse, since it is a complicated feature which is mostly irrelevant to what he or she is working on. Anyway it is not likely to appear in the first version. In UNIX world this problem is solved by the following principle [11]: Make each program do one thing well. Probably it would be ideal if all the grammarware tools could use a common grammar definition language with a common solution for reuse problems. Then it would be easy to support modular and 2 reusable syntax definitions and in addition all the tools would have a common data format by using which they could interoperate with each other. To make a step towards this solution we propose a common grammar definition language, named Grammatic, that provides strong modularity and reuse capabilities out of the box. One of the main problems in making it suitable for a wide range of tools is that each tool requires different information to be attached to a grammar. Almost no tool takes a mere EBNF definition as input, each one extends it with some extra data. To cope with this Grammatic allows to extend a grammar definition with arbitrary metadata which can be represented in a common format and attached to a grammar externally for the sake of separation of concerns. An author of a new tool may use Grammatic as follows: – Use Grammatic’s grammar definition language to define grammars. – Define extensions for grammar definitions in terms of metadata. – Write custom back end for processing the definition using Grammatic’s API. This allows the developer to implement modularity and reuse features easily and concentrate on his or her tool’s specific functionality. But there are many great tools already. They are rarely strong in terms of reuse and even more rarely interoperate well with each other. To benefit both from such tools and Grammatic we can use the latter as a front end, namely we can: – Identify extensions which the tool adds to a pure grammar definition language. – Decide how to express those extensions with metadata attached to grammar elements. – Write a generator which converts a properly annotated Grammatic grammar definition into the tool’s input language. After doing this we can use modular grammar definitions throughout the development process. A not necessarily modularized input for the tool in question is generated only when needed and is never modified by hand. In this paper we present a case study on the latter case: we demonstrate using Grammatic as a front end for the ANTLR parser generator [4]. ANTLR is very popular due to its flexibility, clearness and many target languages supported. On the other hand it lacks modularity and supports reuse rather weakly. The paper is organized as follows: in the next section we give a short overview of Grammatic’s main features. Section 3 gives an overview of the case study. Subsection 3.1 describes a simple way of attaching Grammatic to ANTLR mentioned above and subsection 3.2 describes creating of a more usable though somewhat less general parser generator with Grammatic and ANTLR. Some concluding remarks are given in section 4. 2 Grammatic’s features overview Here we give an overview of four languages constituting Grammatic’s core. These languages are used to define modular grammars and attach metadata to them. 3 2.1 Grammar definitions A grammar definition language allows to define a context-free grammar as a set of symbols each of which is associated to a set of productions (in concrete syntax we separate productions by “||”). Here is an example grammar definition which we will use throughout this paper (it describes a simple language of constants and typed variables with assigned values in form of arithmetic expressions): const : ID ’=’ sum ’;’ ; varDecl : type ID (’=’ sum)? ’;’ ; type : ID; sum : mult (’+’ mult)* ; mult : factor (’*’ factor)* ; factor : NUM || ID || ’(’ sum ’)’ ; ALPHA : [’a’--’z’ ’A’--’Z’ ’_’] ; ID : ALPHA (ALPHA | [’0’--’9’])* ; NUM : [’0’--’9’]+ ; In this example characters in single quotes represent embedded lexical definitions. There is no separate notion of a lexical rule (since it is not necessarily required, see [12,13]) and we use the same syntax for EBNF and regular expressions. In this grammar symbol sum is (virtually) nonterminal and ID is (also virtually) terminal since it has only regular expressions on the right side. 2.2 Imports and Templates As we told above, Grammatic’s grammar definition language provides strong reuse techniques. Ideas behind these techniques are generalized from the ones implemented in Rats! [10], SDF [8] and LISA [9]. First we focus on reusing grammar definitions themselves. The most popular way of reuse is importing. Some grammar definition A might be imported into some other grammar definition B. This means that all the rules of A are inserted into B. Rules of B may refer to symbols of A – this is the way two grammar definitions are connected. Very frequently we have to customize some of the imported rules, i.e. add some more productions to the same symbols or replace existing productions. In paper [14] this is referred to as rule overriding. In Grammatic we decided to use more general form of this concept, namely templates. A language of grammar templates allows creating grammar definitions with “placeholders” which can be replaced with actual objects upon template instantiation. Placeholders might be defined for roles of identifier, expression, production or symbol. A template instantiation might result into grammar object of the type specified by template declaration. Here is an example of a template and its usage. Symbol binaryOperation<ID $name, Expression $sign, Expression $argument> { $name --> $argument ($sign $argument)*; 4 } import binaryOperation<Product, ’*’ | ’/’, Factor>; import binaryOperation<Sum, ’+’ | ’-’, Product>; Factor --> NUMBER || ID || ’(’ Sum ’)’ ; In this example we define a template named “binaryOperation” which makes up an infix binary operation out of symbol name, sign and argument expression. Then we instantiate it twice and import instantiation results into current grammar definition – so we can use new symbol “Product” to create “Sum” and “Sum” to define “Factor”. How can we use templates for “overriding” things? We can put a customizable set of rules into a template, provide a placeholder for production or subexpression that should be replaced and then put a right thing in upon instantiation. Symbol attributeValue<Production* $moreValueTypes> { AttributeValue --> STRING || ID || INT || Annotation || ValueSequence || $moreValueTypes ; } import attributeValue< ’{{{’ Expression ’}}}’ >; This defines a template for “AttributeValue” symbol and instantiates it adding a new production (to use expressions as attribute values). 2.3 Metadata As we told above Grammatic allows to attach arbitrary metadata to a grammar definition in order to express various extensions used by specific tools. Metadata annotations might be attached to a grammar, symbol, individual production or a subexpression. Each annotation may contain several attributes (name-value pairs). Attribute values may be of different types. There are several predefined value types: ID, STRING, INTEGER, TUPLE (a number of name-value pairs) and SEQUENCE of values and punctuation symbols. 5 id = someName; str = "some string"; int = 10; class = { name = MyClass; super = Object; }; astProduction = {{ ^(’+’ left ^(’-’ }}; // // // // ID STRING INTEGER TUPLE(name : ID; super : ID) // SEQUENCE right 10)) Users may add their own types. No attribute itself has any fixed semantics. Metadata is passive, some tools (like analyzers, transformers, generators etc.) may use it according to their needs. Even without adding custom types many things might be expressed by such annotations. The most powerful type is SEQUENCE – it allows to define small embedded DSLs inside Grammatic. We use such DSLs to describe complicated custom properties (see section 3.2). 2.4 Queries How to attach metadata to a grammar? In many cases it is done by directly embedding annotations into grammar definition. Therefore different concerns are mixed together and this results into a problem: system is not modular, is hard to understand and extend. We employ ideas from aspect-oriented programming paradigm (AOP, see [15]) to solve this problem. In Grammatic a grammar definition itself knows nothing about metadata. All the metadata is attached “from the outside”. In AOP this is done by defining join points which are described by point cuts [16]. A language of point cuts is a kind of “addressing” notation – a way to find some object. When we have found such an object we may attach metadata to it (or perform other actions, see below). In Grammatic we have a language analogous to AOP point cuts – we call it a query language. For example this query matches rules defining binary operations: #Op --> #Arg (#Sign #Arg)* ; All the names here represent variables. This query matches any of the following rules: sum : mult (’+’ mult)* ; mult : factor (’*’ factor)* ; By default a variable matches a symbol but it may match a subexpression or a whole production. Symbol $production:--> $alt:(A | B) ; 6 Here variables A, B and C match symbol references and Alt matches a subexpression “B | C”. We can use wildcards in queries. The following query matches immediately left-recursive rules: #Rec --> #Rec .. ; Two dots represent a wildcard which matches arbitrary subexpression. We can consider metadata in our queries. We can restrict a particular attribute to a certain type or value or require attribute’s presence or absence: #N { type = Nonterminal; operation; associativity : ID; !commutative; } This query matches a symbol with “type” attribute having value “Nonterminal”, “operation” attribute present, “associativity” attribute having value of type ID and “commutative” attribute not present. 2.5 Aspects When a query selects some objects from a grammar definition, we can attach some metadata to them. #Rec --> #Rec ..; [[ Rec { leftRecursive; }; ]]; This rule adds a “leftRecursive” attribute (with no value) to all the symbols matched by Rec variable of this query. A set of such rules constitutes an “aspect”. Many aspects (independent or not) might be assigned to a single grammar, and even to many grammars since our queries are not tied to concrete objects but only to a grammar structure. Aspects themselves might be generally reusable – as we told above, query language does not require “hard linking” to grammar objects, these objects are located by their structural context and properties. The rule in our example constitutes a reusable aspect – we can use it on any grammar. 7 3 A Case Study: ANTLR One of the most popular Java-targeted parser generators now is ANTLR [4]. It is a mature tool based on LL(*) recursive descent parsing algorithm which is empowered by syntactical predicates and backtracking. Many projects, including Sun’s NetBeans use ANTLR to generate their parsers. On the other hand, ANTLR has some weaknesses in the sense of modularity and reuse. The main issue is that it uses embedded semantic actions, which means that the syntactical structure of the language is physically mixed with Java code describing semantic actions. Thus ANTLR grammars look bloated and grammar structure is not clear. There are also some issues with grammar reuse capabilities though they are being resolved in newer versions (see [14]). We want to use ANTLR’s powerful features but working with modular grammar definitions and having Java code clearly separated from the grammar. Further sections describe how this could be done with Grammatic. 3.1 A Straightforward Solution A general way of achieving this with Grammatic was described in section 1: we can identify ANTLR’s extensions to EBNF, express them in Grammatic’s metadata and write a generator to convert annotated Grammatic definitions to ANTLR input language. Now let us look at the ANTLR’s extensions to EBNF. For the sake of brevity we focus on the most valuable of them here: – Specifying rule parameters and return types. – Embedding semantic actions written in Java. – Specifying syntactic predicates. To express these extensions with metadata we define the following attributes to be used with grammar elements: – Rules: • returns : ID; – return type. • params : SEQUENCE of TUPLE(type : ID; name : ID); – parameters. – Productions: • predicate : STRING; – syntactic predicate for the production. • before : STRING; – semantic action to be performed before the production. • after : STRING; – semantic action to be performed after the production. – Expressions: • after : STRING; – semantic action to be performed after the expression. – Rule calls: • arguments : SEQUENCE of ID – arguments for the rule call. 8 We define semantic actions as simple strings and it is very close to how ANTLR actually treats them. For example let us define an aspect which assigns ANTLR metadata to our arithmetic expressions grammar (see above). We want to have a parser which computes a value of the expression being parsed. Thus our semantic actions will perform arithmetic operations and return values of type int. Here is a sample metadata assignment for the rule sum: sum [[returns = int;]] $:--> .. [[ before = ’##result = 0;’; #mult.after = << ##result += #mult; >>; ]]; This assigns a ’returns’ attribute to the symbol sum itself, ’before’ semantic action to the production and ’after’ semantic action to all occurrences of ’mult’ on the right side. In action bodies we have ##result and #mult which correspond to a result variable of a rule and a variable that denotes a value returned by mult. These semantics is to be defined by a generator which will convert our Grammatic definition into ANTLR’s language because it depends only on how this generator will treat metadata assigned to grammar elements. We can handle syntactic predicates the same way. To get the following ANTLR definition: NEWLINE : (’\r’? ’\n’)=> ’\r’? ’\n’ | ’\r’ ; We define a grammar rule: NEWLINE : ’\r’? ’\n’ || ’\r’; And a metadata assignment rule: NEWLINE $:--> .. [[ predicate = <<’\r’? ’\n’>>; ]] --> ’\r’; This metadata should also be properly treated by the generator. Other specific features of ANTLR (like grammar names, Java imports etc.) can be expressed the same way. This method is general enough to be applied in all cases we can imagine and all it adds to the original tool is separation of concerns and reuse techniques available in Grammatic. However, the generator may add some more value to the original tool. We show an example below. 9 3.2 A More Sophisticated Solution Nowadays a programming language is usually supported by a strong IDE which makes common activities easier. For example, features brought by the Eclipse IDE for Java [17] include syntax highlighting, code completion, semantic highlighting, templates, refactorings and many more things. That’s why a developer won’t be glad to enter Java code outside a specialized editor, say, in ANTLR editor or Grammatic editor. Although these “non-Java” editors may provide basic features like highlighting and folding, they are unlikely to provide refactorings and other complicated features. Therefore we want to separate all the Java code from grammar definitions in such a way that it could be edited separately – in Java editor, using all of its power. Some tools [8,6,4] solve this problem by generating a parser that builds an AST which is to be processed by external code. This approach has the following disadvantages: it consumes memory for storing AST and time for walking through it. There is also another drawback: many parsers for DSLs simply build models which are very close to ASTs but slightly different (have cross-references, specific additional attributes etc.), in this case a work done by an AST transformer (a program which converts an AST into a model) is simply a waist of resources since all the additional information might be assigned during the parsing process. Thus we want to avoid building such ASTs. Instead of making a parser always build an AST we propose to use “Builder” design pattern [18]: a parser should only call methods of some interfaces (builders) which are implemented outside it. Builder interfaces abstract semantic actions of the parser, they are generated along with the parser’s code. To illustrate this a bit let us have a look at our sum rule (in ANTLR): sum returns [int result] : {result = 0;} left=mult {result += left;} (’+’ right=mult {result += right;})* ; Semantic actions can be abstracted here like this: sum returns [int result] @init { ISumBuilder builder = myBuilders.getSumBuilder(); } : {builder.init();} left=mult {builder.left(left);} (’+’ right=mult {builder.right(right);})* {result = builder.getResult();} ; This is more verbose than immediately embedded actions but this should be generated, no one is to write it by hand. 10 This approach requires less memory and time since we do not need to build AST objects (which requires memory consumption proportional to input length) and traverse across them. All we need is to create builder objects: this requires us to build only one object for each call that is simultaneously present in the call stack, so it requires memory consumption proportional to the stack depth. How Grammatic can help us? We are going to define metadata which will give a generator enough information to generate builder interfaces and an ANTLR grammar definition with embedded builder calls. What metadata do we need to be able to generate builders along with ANTLR grammar? The following information is sufficient: – Return values and parameters for each rule. – Arguments for each rule call. To give a more illustrative example (and create a more flexible system) we will also allow many rules for each grammar symbol. This is useful since we can have only one signature specification (parameters and return value) for each syntactical rule, but the rule might have different semantics when called in different contexts. For example (although a bit strained) we may distinguish constant expressions from ones containing variables, since constant ones may be calculated at compile time. When writing a compiler, we want constant expressions to be evaluated in place (the rule must return a value) and variable expressions are to be stored as objects (expression trees). Hence, from one grammar rule sum : mult (’+’ mult)*; we get two rules with different return types and parameters: varSum [Scope scope] returns [Expression result] : varMult[scope] (’+’ varMult[scope])* ; constSum [Context context] returns [int result] : constMult[context] (’+’ constMult[context])* ; (We assume that Scope maps variable names to objects denoting variables and Context maps constant names to values.) We do not want to duplicate rules in our grammar for the sake of these matters, so we will express this in metadata for a single rule. Here is an example of how we can do it: sum [[ builders = {{ Expression varSum(Scope scope); int constSum(Context context); }}; ]] --> mult .. 11 [[ #mult.call = { varSum = {{varMult(scope)}}; constSum = {{constMult(context)}}; }; ]]; What we see here is a small DSL inside Grammatic metadata (actually there are two DSLs: one for specifying return types and parameters and another one for specifying called rules and arguments). The ’builders’ attribute of a symbol defines signatures (names, return types and parameters) of ANTLR rules generated for this symbol (two rules will be generated in this example), the ’call’ attribute of a symbol reference specifies an ANTLR rule (with arguments) which should be called in each case. The brevity of metadata definition given above is achieved through Grammatic’s ability to define internal DSLs. This is done by parsing attribute values of type SEQUENCE by an externally supplied parser. Lexical structure of these DSLs is fixed: sequence elements (identifiers, strings, numbers, tuples, sequences and punctuation values) serve as tokens. A generator will produce two rules given above form this example. Above we omitted builder calls from rule definitions to be more clear. A full rule looks like this: varSum [Scope scope] returns [Expression result] @init { IVarSumBuilder builder = myBuilders.getVarSumBuilder(scope); } : vm=varMult[scope] {builder.varMult(vm);} (’+’ vm1=varMult[scope] {builder.varMult(vm1)})* ; 4 Conclusion and Future Work This paper addressed solving problems of modularity and reuse of grammar definitions by defining a general front end, Grammatic. This front end can be adopted by newly developed tools through its API or it can be attached to an existing tool by creating a converter from its universal format to the tool’s specific input format. Grammatic provides a language for defining modular grammars (supporting templates and imports), which is extensible by attaching arbitrary metadata. It also supports separation of concerns by defining reusable aspects. We showed two ways of using Grammatic to bring reuse and separation of concerns to a popular parser generator – ANTLR. The most straightforward way is based on expressing extensions added by the tool to a general grammar definition language in terms of metadata and creating a generator which transforms an annotated Grammatic’s definition into the tool’s input. We also presented a way of using Grammatic to separate custom code written in the target language (Java) from the grammar definition and other metadata. This is done by using 12 “Builder” design pattern: generating a set of interfaces which are to be implemented manually. This allows a developer to use the power of his IDE when working with Java code. The case study shows that Grammatic helps adding reuse and modularity capabilities to existing tools. We plan to apply such practices to some more tools to find out more things to be supported by Grammatic. For now we plan to support metadata templates, grammar testing facilities, text generation and error tracking facilities helping to convert errors reported by a back end to Grammatic’s errors. Our long term goal is to create a common grammar definition platform usable by a wide range of grammarware engineering tools. References 1. Martin P. Ward. Language-oriented programming. Software — Concepts and Tools, 15(4):147–161, 1994. 2. Paul Klint, Ralf Lämmel, and Chris Verhoef. Toward an engineering discipline for grammarware. ACM Trans. Softw. Eng. Methodol., 14(3):331–380, 2005. 3. Steven C. Johnson. Yacc: Yet another compiler compiler. In UNIX Programmer’s Manual, volume 2, pages 353–387. Holt, Rinehart, and Winston, New York, NY, USA, 1979. 4. Terence Parr. The Definitive ANTLR Reference: Building Domain-Specific Languages. The Pragmatic Bookshelf, Raleigh, 2007. 5. Hanspeter Mssenbck and Johannes Kepler. The compiler generator Coco/R – user manual, 2005. 6. Etienne Gagnon and Laurie Hendren. An object-oriented compiler framework. In In Proceedings of TOOLS, pages 140–154, 1998. 7. Open Architecture Ware. xText. http://www.openarchitectureware.org/, 2007. 8. J. Heering, P. R. H. Hendriks, P. Klint, and J. Rekers. The syntax definition formalism SDF – reference manual. SIGPLAN Not., 24(11):43–75, 1989. 9. Marjan Mernik, Mitja Leni, and Enis A. Compiler/interpreter generator system LISA. In In IEEE Proceedings of 33rd Hawaii International Conference on System Sciences, pages 590–594, 2000. 10. Robert Grimm. Better extensibility through modular syntax. In PLDI ’06: Proceedings of the 2006 ACM SIGPLAN conference on Programming language design and implementation, pages 38–51, New York, NY, USA, 2006. ACM. 11. M. D. McIlroy, E. N. Pinson, and B. A. Tague. UNIX Time Sharing System: Forward. The Bell System Technical Jounal, 57(6 (part 2)):1899–1904, July/August 1978. 12. J. Scheerder, J. J. Vinju, and E. Visser. Disambiguation filters for scannerless generalized LR parsers. In Compiler Construction (CC02, pages 143–158. SpringerVerlag, 2002. 13. Bryan Ford. Packrat parsing:: simple, powerful, lazy, linear time, functional pearl. In ICFP ’02: Proceedings of the seventh ACM SIGPLAN international conference on Functional programming, pages 36–47, New York, NY, USA, 2002. ACM. 14. Terence Parr. The reuse of grammars with embedded semantic actions. International Conference on Program Comprehension, 0:5–10, 2008. 13 15. Gregor Kiczales, John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Videira Lopes, Jean marc Loingtier, John Irwin, Gregor Kiczales, John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Lopes, Jean marc Loingtier, and John Irwin. Aspect-oriented programming. In In ECOOP. SpringerVerlag, 1997. 16. Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William G. Griswold. An overview of AspectJ. In ECOOP ’01: Proceedings of the 15th European Conference on Object-Oriented Programming, pages 327–353, London, UK, 2001. Springer-Verlag. 17. Eclipse Foundation. Eclipse IDE. http://www.eclipse.org. 18. Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1995.
6cs.PL
arXiv:1308.3071v2 [math.AC] 25 Aug 2015 SOME DUALITY AND EQUIVALENCE RESULTS MAJID RAHRO ZARGAR Abstract. Let (R, m) be a relative Cohen-Macaulay local ring with respect to an ideal a of R and set c := ht a. In this paper, we investigate some properties of the Matlis dual Hca (R)∨ of the R-module Hca (R) and we show that such modules treat like canonical modules over Cohen-Macaulay local rings. Also, we provide some duality and equivalence results with respect to the module Hca (R)∨ and so these results lead to achieve generalizations of some known results, such as the Local Duality Theorem, which have been provided over a Cohen-Macaulay local ring which admits a canonical module. Contents 1. Introduction 1 2. Notation and Prerequisites 3 3. Generalized local duality 5 4. Generalized dualizing modules 7 5. Maximal relative Cohen-Macaulay modules 13 References 18 1. Introduction Throughout this paper, R is a commutative Noetherian ring, a is a proper ideal of R and M is an R-module. In the case where R is local with maximal ideal m, R̂ denotes the m-adic completion of R, E(R/m) denotes the injective hull of the residue field R/m and ∨ denotes the Matlis dual functor Hom R (−, E(R/m)). The theory of canonical modules for Cohen-Macaulay local rings is developed by Bruns and Herzog in [14, Chapter 3]. But, in the more general setting of an arbitrary n-dimensional local ring (R, m), a canonical b ∼ module for R is a finitely generated R-module C such that C ⊗R R = Hn (R)∨ . In the m special case where R is Cohen.Macaulay, this condition turns out to be equivalent to Bruns’ and Herzog’s definition, namely that a canonical module is precisely a maximal Cohen-Macaulay module of type one and of finite injective dimension that in some of the 2010 Mathematics Subject Classification. 13C14, 13D45, 13D02. Key words and phrases. Local cohomology, canonical module, complex, relative Cohen-Macaulay module. 1 2 M.R. ZARGAR literature is called a dualizing module. As a remarkable result, Foxby [9], Reiten [22] and Sharp [25] proved that a Cohen-Macaulay local ring R admits a canonical module if and only if it is homomorphic image of a Gorenstein local ring. In particular, if R is complete and Cohen-Macaulay, then Hnm (R)∨ is a canonical module of R. On the other hand, the Local Duality Theorem provides a fundamental tool for the study of local cohomology modules with respect to the maximal ideal of a local ring. Although it only applies to local rings which can be expressed as homomorphic images of Gorenstein local rings, this is not a great restriction, because the class of such local rings includes the local rings of points on affine and quasi-affine varieties, and, as mentioned above, all complete local rings. This theorem provides a functorial isomorphism between the Ext modules of the canonical module and the local cohomology modules with respect to the maximal ideal of a local ring. Over a Cohen-Macaulay local ring, a canonical module, if exists, plays an important role in the studying of the algebraic and homological properties of ideals and modules. Thus, finding modules which preserve beneficiaries of the canonical modules is the aim of many commutative algebraists. In this direction, the principal aim of this paper is to study the properties of the R-module Da := Hca (R)∨ in the case where R is a relative Cohen-Macaulay local ring with respect to a and c = ht R a (i.e. there is precisely one non-vanishing local cohomology module of R with respect to a) and to provide a connection between the module Hca (R)∨ and the local cohomology module with respect to the ideal a of R. Indeed, we show that these modules treat like canonical modules over Cohen-Macaulay local rings. Recently, such modules have been studied by some authors, such as Hellus and Strückrad [13], Hellus [10], Hellus and Schenzel [12], Khashyarmanesh [17] and Schenzel [24], and has led to some interesting results. The organization of this paper is as follows. In section 2, we collect some notations and definitions which will be used in the present paper. In section 3, first as a generalization of the Local Duality Theorem, we provide the following result: Theorem 1.1. Let a be an ideal of R, E be an injective R-module and let Y be an arbitrary complex of R-modules such that Hia (Y ) = 0 if and only if i 6= c for some integer c. Then, for all integer i and for all complexes of R-modules X, there are the following isomorphisms: c L ∼ i (i) Tor R c−i (X, Ha (Y )) = Ha (X ⊗R Y ). c i L ∼ (ii) Ext c−i R (X, Hom R (Ha (Y ), E)) = Hom R (Ha (X ⊗R Y ), E). Also, among of other things as an application of the above theorem in Proposition 3.4, we provide a connection between the module Da and the local cohomology modules with respect to the ideal a. Next, in Theorem 4.3, we state one of the main results which shows that the module Da has some of the basic properties of ordinary canonical modules over Cohen-Macaulay local rings. Indeed, we prove the following result: DUALITY FOR LOCAL COHOMOLOGY MODULES 3 Theorem 1.2. Let (R, m) be an a-RCM local ring with ht R a = c. Then the following statements hold true. (i) For all ideals b of R such that a ⊆ b, Hib (Da ) = 0 if and only if i 6= c. (ii) id R (Da ) = c. (iii) µc (m, Da ) = 1. (iv) For all t = 0, 1, . . . , c and for all a-RCM R-modules M with cd (a, M ) = t, one has (a) Ext iR (M, Da ) = 0 if and only if i 6= c − t. (b) Hia (Ext c−t R (M, Da )) = 0 if and only if i 6= t On the other hand, in Lemma 4.5, it is shown that Hcb (Da (R)) ∼ = E(R/m) for all ideals b such that a ⊆ b. Also, in Proposition 4.8, we provide a result which leads us to determine the endomorphism ring of Da and its non-zero local cohomology module at support a. Next, in section 5, first we introduce the concept of maximal relative CohenMacaulay modules with respect to an ideal a of R. Then, in Proposition 5.1, we generalize a result and, in Remark 5.3, we raise a quite long-standing known conjecture related to the maximal Cohen-Macaulay modules. In addition, in Theorem 5.4, we generalize another known result related to ordinary canonical modules of Cohen-Macaulay local rings. Indeed, we show that if R is a relative Cohen-Macaulay local ring with respect to a, then for all a-RCM R-modules M with cd (a, M ) = t, there exists a natural isomorphism M ⊗R R̂ ∼ = Ext c−t (Ext c−t (M, Da ), Da ). In particular, if M is maximal a-RCM, then M ⊗R R R R̂ ∼ = Hom R (Hom R (M, Da ), Da ). Also, in Theorem 5.5, over relative Cohen-Macaulay local rings, we establish a characterization of maximal relative Cohen-Macaulay modules. Now, suppose for a moment that R is a Cohen-Macaulay local ring with a dualizing module ΩR and that M is a non-zero finitely generated R-module. Kawasaki, in [16, Theorem 3.1], showed that if M has finite projective dimension, then M is Cohen-Macaulay if and only if M ⊗R ΩR is Cohen-Macaulay. Next, in [18, Theorem 1.11], Khatami and Yassemi generalized this result. Indeed, they showed that the above result hold true whenever M has finite Gorenstein dimension. In Theorem 5.6, we establish another main result which, by using Da instead of ΩR , provides a generalization of the above mentioned result of Khatami and Yassemi. Finally, in Proposition 5.9 as an application of the above theorem, we could find another generalization of the results [16, Theorem 3.1] and [18, Theorem 1.11]. 2. Notation and Prerequisites Hyperhomology 2.1. An R-complex X is a sequence of R-modules (Xv )v∈Z together with R-linear maps (∂vX : Xv −→ Xv−1 )v∈Z , X ∂v+1 ∂X v Xv−1 −→ · · · , X = · · · −→ Xv+1 −→ Xv −→ 4 M.R. ZARGAR X = 0 for all v ∈ Z. For any R-module M , Γ (M ) is defined by Γ (M ) := such that ∂vX ∂v+1 a a {x ∈ M | Supp R (Rx) ⊆ V(a)}. The right derived functor of the functor Γa (−) exists in D(R) and the complex RΓa (X) is defined by RΓa (X) := Γa (I), where I is any injective resolution of the complex X. Then, for any integer i, the i-th local cohomology module of X with respect to a is defined by Hia (X) := H−i (RΓa (X)). Also, there is the functorial isomorphism RΓa (X) ≃ Čx ⊗L where Čx denotes the R X in the derived category D(R), p √ ¯ ¯ Čech complex of R with respect to x = x1 , . . . , xt and a = (x1 , . . . , xt ). Hence, this ¯ implies that Hia (X) ∼ = H−i (Čx ⊗L R X)(for more details refer to [19]). Let X ∈ D(R) and/or ¯ Y ∈ D(R). The left-derived tensor product complex of X and Y in D(R) is denoted by X ⊗L R Y and is defined by ′ ′ X ⊗L R Y ≃ F ⊗R Y ≃ X ⊗R F ≃ F ⊗R F, ′ where F and F are flat resolutions of X and Y , respectively. Also, let X ∈ D(R) and/or Y ∈ D(R). The right derived homomorphism complex of X and Y in D(R) is denoted by RHom R (X, Y ) and is defined by RHom R (X, Y ) ≃ Hom R (P, Y ) ≃ Hom R (X, I) ≃ Hom R (P, I), where P and I are projective resolution of X and injective resolution of Y , respectively. For any two complex X and Y , we set Ext iR (X, Y ) = H−i (RHom R (X, Y )) and Tor R i (X, Y ) = X n Hi (X ⊗L R Y ). For any integer n, the n-fold shift of a complex (X, ξ ) is the complex Σ X given by (Σn X)v = Xv−n and ξvΣ nX X . Also, we have H (Σn X) = H = (−1)n ξv−n i i−n (X). Next, for any contravariant, additive and exact functor T : C(R) −→ C(R) and X ∈ C(R), where C(R) denotes the category of R-complexes, we have Hl (T (X)) ∼ = T (H−l (X)). Definition 2.2. We say that a finitely generated R-module M is relative Cohen-Macaulay with respect to a if there is precisely one non-vanishing local cohomology module of M with respect to a. Clearly this is the case if and only if grade (a, M ) = cd (a, M ), where cd (a, M ) is the largest integer i for which Hia (M ) 6= 0. For the convenance, we use the notation a-RCM, for an R-module which is relative Cohen-Macaulay with respect to a. Furthermore, a non-zero finitely generated R-module M is said to be maximal a-RCM if M is a-RCM with cd (a, M ) = cd (a, R). Observe that the above definition provides a generalization of the concept of CohenMacaulay and maximal Cohen-Macaulay modules. Also, notice that the notion of relative Cohen-Macaulay modules is connected with the notion of cohomologically complete intersection ideals which has been studied in [11] and has led to some interesting results. Furthermore, recently, such modules have been studied in [12], [20] and [21]. Definition 2.3. For any R-module M and a proper ideal a of R, we set grade (a, M ) := inf{i| Ext iR (R/a, M ) 6= 0}. Notice that grade (a, M ) is the least integer i such that DUALITY FOR LOCAL COHOMOLOGY MODULES 5 grade (•,•) Hia (M ) 6= 0. For any local ring (R, m), we define D• (•) := Hom R (H• (•), E(R/m)). In the case where R is a-RCM, for the convenience we set Da := Da (R). 3. Generalized local duality The starting point of this section is the following result which plays an essential role in the present paper. This result provides a generalization of the local duality theorem. Indeed the generalization is done for ideals a of the given ring R and complexes Y which their local cohomology modules with respect to a have precisely one non-vanishing. The generalization is such that local duality becomes the special case where Y = R and a is the maximal ideal m of the given local ring (R, m). Theorem 3.1. Let a be an ideal of R, E be an injective R-module and let Y be an arbitrary complex of R-modules such that Hia (Y ) = 0 if and only if i 6= c for some integer c. Then, for all integer i and for all complexes of R-modules X, there are the following isomorphisms: c L ∼ i (i) Tor R c−i (X, Ha (Y )) = Ha (X ⊗R Y ). c i L ∼ (ii) Ext c−i R (X, Hom R (Ha (Y ), E)) = Hom R (Ha (X ⊗R Y ), E). p √ Proof. (i). Let x = x1 , . . . , xt be elements of R such that a = (x1 , . . . , xt ) and let ¯ Čx denotes the Čech complex of R with respect to x1 , . . . , xt . Now notice that Hia (Y ) ∼ = ¯ L L H−i (Čx ⊗R Y ) for all i. Thus, by our assumption we have Hj (Čx ⊗R Y ) = 0 for all j 6= −c. ¯ ¯ L Hence, one can deduce that there exists an isomorphism Čx ⊗L R Y ≃ H(Čx ⊗R Y ) in ¯ ¯ derived category D(R), and so Σ−c Hca (Y ) ≃ Čx ⊗L R Y . Therefore, we can use the following ¯ isomorphisms c L c ∼ Tor R c−i (X, Ha (Y )) = Hc−i (X ⊗R Ha (Y )) ∼ = H−i (Σ−c (X ⊗L Hc (Y ))) R a −c c ∼ = H−i (X ⊗L R Σ Ha (Y )) L ∼ = H−i (X ⊗L R Čx ⊗R Y ) ¯ ∼ = Hi (X ⊗L Y ), a R where the third isomorphism follows from [5, Lemma 2.4.9], to compte the proof. (ii). Note that since E is an injective R-module, RHom R (Hca (Y ), E) ≃ Hom R (Hca (Y ), E). It therefore follows, by the following isomorphisms c c ∼ Ext c−i R (X, Hom R (Ha (Y ), E)) = Hi−c (RHom R (X, Hom R (Ha (Y ), E))) ∼ = Hi−c (RHom R (X, RHom R (Hc (Y ), E))) a c ∼ = Hi−c (RHom R (X ⊗L R Ha (Y ), E)) c ∼ = Hom R (Hc−i (X ⊗L R Ha (Y )), E) ∼ = Hom R (Tor R (X, Hc (Y )), E) c−i a ∼ = Hom R (Hia (X ⊗L R Y ), E), as required. Here notice that third isomorphism follows from [5, Theorem 4.4.2].  6 M.R. ZARGAR The following result is the special case of the above theorem for category of R-modules. Proposition 3.2. Let a be an ideal of R, E be an injective R-module and let N be an arbitrary R-module such that Hia (N ) = 0 if and only if i 6= c for some integer c. Then, for all integers i and for all R-modules M such that Tor R j (M, N ) = 0 for all j > 0, there are the following isomorphisms: c ∼ i (i) Tor R c−i (M, Ha (N )) = Ha (M ⊗R N ). c i ∼ (ii) Ext c−i R (M, Hom R (Ha (N ), E)) = Hom R (Ha (M ⊗R N ), E). Proof. Notice that since Tor R j (M, N ) = 0 for all j > 0, there is the isomorphism M ⊗R N ≃ M ⊗L R N in the derived category. Hence, it immediately follows from Theorem 3.1.  As an consequence of the above result, we have the following result. Corollary 3.3. Let (R, m) be d-dimensional Cohen-Macaulay local ring with a dualizing R-module ΩR . Then, for all R-modules M with finite Gorenstein flat dimension (See [6, Definition 4.5]) there are the following isomorphisms: (i) Tor R (M, E(R/m)) ∼ = Hi (M ⊗R ΩR ). m d−i ∨ b ∼ i (ii) Ext d−i R (M, R) = Hm (M ⊗R ΩR ) . Proof. First of all notice that ΩR is a maximal Cohen-Macaulay R-module such that Hd (ΩR ) ∼ = E(R/m) and also, in view of [8, Proposition 10.4.17], Tor i (M, ΩR ) = 0 for m R b ∼ all i > 0. Hence, one can use the known fact that R = Hom R (E(R/m), E(R/m)) and Proposition 3.2 to complete the proof.  The following result, which is a generalization of local duality theorem, is a consequence of Proposition 3.2 and recovers the [12, Theorem 3.1]. Proposition 3.4. Let (R, m) be an a-RCM local ring with ht a = c. Then, for all Rmodules M and for all flat R-modules F such that Hca (F ) 6= 0 (e.g. faithfully flat Rmodules), there are the following isomorphisms: (i) Tor R (M, Hc (F )) ∼ = Hi (F ⊗R M ). (ii) a c−i c−i Ext R (M, Da (F )) a ∼ = Hia (F ⊗R M )∨ . Proof. First notice that, by [23, Theorem 5.40], there is a directed index set I and a family of finitely generated free R-modules {Fi }i∈I such that F = limFi . Notice that −→ i∈I each Fi is relative Cohen-Macaulay with respect to a and that cd (a, Fi ) = c. Therefore, Hja (F ) = limHja (Fi ) = 0 for all j 6= c. Hence, one can use the Proposition 3.2 to complete −→ i∈I the proof.  As an application of the Theorem 3.1, we prove the known Local Duality Theorem which has already been prove in [2, Theorem 11.2.8]. DUALITY FOR LOCAL COHOMOLOGY MODULES 7 Corollary 3.5. Let (R, m) be a d-dimensional Cohen-macaulay local ring with a dualizing R-module ΩR . Then, for all R-modules M and all integers i, one has ∨ Him (M ) ∼ = Ext d−i R (M, ΩR ) . Proof. First notice that for all i, Him (M ) is Artinian, and so there is the R̂-isomorphism and also R-isomorphism Hi (M ) ∼ = Hi (M ) ⊗R R̂. Therefore, using the Flat Base Change m m Theorem, the Matlis Duality Theorem [2, Theorem 10.2.12], and the fact that DmR̂ ∼ = ΩR ⊗R R̂, implies that following isomorphisms: Him (M ) ∼ = HimR̂ (M̂ ) ∼ = Hom R̂ (Hom R̂ (HimR̂ (M̂ ), ER̂ (R̂/mR̂)), ER̂ (R̂/mR̂)) ∼ = Hom (Ext d−i (M̂ , D ), E (R̂/mR̂)) R̂ R̂ mR̂ R̂ ∼ (M̂ , ΩR ⊗R R̂), ER̂ (R̂/mR̂)) = Hom R̂ (Ext d−i R̂ ∼ = Hom (Ext d−i (M, ΩR ) ⊗R R̂, E (R̂/mR̂)) R̂ R R̂ ∼ = Hom R (Ext d−i R (M, ΩR ), Hom R̂ (R̂, ER̂ (R̂/mR̂)) ∼ = Hom R (Ext d−i R (M, ΩR ), ER̂ (R̂/mR̂)) d−i ∼ = Ext (M, ΩR )∨ . R Notice that the third isomorphism follows from Proposition 3.4 and the last isomorphism follows from [2, 10.2.10].  Notice that for a local Cohen-Macaulay ring R with a dualizing R-module ΩR and a finitely generated R-module M , we have sup{ i | Ext iR (M, ΩR ) 6= 0} = depth R−depth M. So, as a generalization of this result, we provide the following result which is an immediate consequence of the Proposition 3.4. Corollary 3.6. Let (R, m) be an a-RCM local ring. Then, for all R-modules M , one has sup{ i | Ext iR (M, Da (R)) 6= 0} = grade (a, R) − grade (a, M ). 4. Generalized dualizing modules Notice that if (R, m) is a local complete ring with respect to m-adic topology, then Dm coincides to the ordinary dualizing module ΩR of R. So the main aim in this section is to determine some properties of the module Da and to show that how much such modules have behavior similar to the dualizing modules. In this direction, we need to the following two lemmas will play essential role in the proof of some our results. Lemma 4.1. Let M be an R-module and n be a non-negative integer. Then the following conditions are equivalent: (i) Hia (M ) = 0 for all i < n. (ii) Ext iR (N, M ) = 0 for all i < n and for any a-torsion R-module N. (iii) Ext iR (R/a, M ) = 0 for all i < n. 8 M.R. ZARGAR Proof. (i)⇒(ii). Let N be an a-torsion R-module. Then, it is straightforward to see that Hom R (N, M ) = Hom R (N, Γa (M )). Hence, in view of [16, Theorem 10.47], we obtain the Grothendieck third quadrant spectral sequence with p p+q q Ep,q 2 = Ext R (N, Ha (M )) =⇒ Ext R (N, M ). p i−q,q Note that E2i−q,q = 0 for all 0 ≤ i < n and 0 ≤ q ≤ i. Therefore E∞ = 0 for all 0 ≤ i < n and 0 ≤ q ≤ i. Now, consider the following filtration {0} = Ψi+1 H i ⊆ Ψi H i ⊆ · · · ⊆ Ψ−1 H i ⊆ Ψ0 H i = H i , where H i = Ext iR (N, M ) and Ep,q ∞ = Ψp H i , Ψp+1 H i to see that Ext iR (N, M ) = 0 for all i < n. The implication (ii)⇒(iii) is trivial and the implication (iii)⇒(i) follows by a similar argument as the above.  The following lemma, which is needed to prove some next results, was proved in [21, Propositon 3.1] by using the spectral sequence tools. For the convenience, we provide a new proof by using the derived category tools. Lemma 4.2. Let a be an ideal of R, M be an R-module such that Hia (M ) = 0 if and only if i 6= c for some non-negative integer n. Then, for all a-torsion R-modules N and for any integer i, one has Tor R (N, Hc (M )) ∼ = Tor R (N, M ). i a i−c Proof. Let N be an a-torsion R-module and let x = x1 , . . . , xt be elements of R such p ¯ √ that a = (x1 , . . . , xt ) and let Čx denotes the Čech complex of R with respect to ¯ x1 , . . . , xt . Now notice that Hia (M ) ∼ = H−i (Čx ⊗L R M ) for all i. Then, by our assumption ¯ L we have Hi (Čx ⊗R M ) = 0 for all i 6= −c. Hence, one can deduce that there exists an ¯ L −c c L isomorphism Čx ⊗L R M ≃ H(Čx ⊗R M ) in derived category, and so Σ Ha (M ) ≃ Čx ⊗R M . ¯ ¯ ¯ Also, by similar argument, one has N ≃ Čx ⊗L R N . Therefore, we can use the following ¯ isomorphisms: Tor R (N, Hc (M )) ∼ = Hi (N ⊗L Hc (M )) i R a a c ∼ = Hi−c (Σ−c (N ⊗L R Ha (M ))) −c c ∼ = Hi−c (N ⊗L R Σ Ha (M )) L ∼ = Hi−c (N ⊗L R Čx ⊗R M ) ¯ L ∼ = Hii−c (Čx ⊗L R N ⊗R M ) ¯ ∼ = Hii−c (N ⊗L R M) R ∼ Tor (N, M ), = i−c to complete the proof.  As a first main result in this section, we provide the following result which determines some basic properties of the module Da . DUALITY FOR LOCAL COHOMOLOGY MODULES 9 Theorem 4.3. Let (R, m) be an a-RCM local ring with ht R a = c. Then the following statements hold true. (i) For all ideals b of R such that a ⊆ b, Hib (Da ) = 0 if and only if i 6= c. (ii) id R (Da ) = c. (iii) µc (m, Da ) = 1. (iv) For all t = 0, 1, . . . , c and for all a-RCM R-modules M with cd (a, M ) = t, one has (a) Ext iR (M, Da ) = 0 if and only if i 6= c − t. (b) Hia (Ext c−t R (M, Da )) = 0 if and only if i 6= t Proof. (ii). First notice that since R is a-RCM, one can use [21, Theorem 3.1] to see that fd R (Hca (R)) = c, and so id R (Da ) = c. (i). Let b be an ideal of R such that a ⊆ b. Then, by part(ii), Hib (Da ) = 0 for all i > c. Now, we show that Hib (Da ) = 0 for all i < c. To this end, by Lemma 4.1, it is enough to show that Ext iR (R/b, Da ) = 0 for all i < c. But, by Proposition 3.4, we have ∨ Ext iR (R/b, Da ) ∼ = Hc−i a (R/b) . Hence the assertion is done because of a-torsionness of the module R/b. (iii). Since µc (m, Da ) = vdim Ext cR (R/m, Da ), it easily follows from Proposition 3.4. (iv)(a). It follows from Proposition 3.4 and the our assumption. (iv)(b). First notice that Supp (Ext c−t R (M, Da )) ⊆ Supp (M ) and that there exists a di- rected index set I and a family of finitely generated submodules {Ni }i∈I of Ext c−t R (M, Da ) c−t N . Now, since Supp (Ni ) ⊆ Supp (M ) for all i ∈ I, by [7, such that Ext R (M, Da ) ∼ = lim −→ i i∈I Theorem 2.2], cd (a, Ni ) ≤ t for all i. Therefore, Hia (Ext c−t R (M, Da )) = 0 for all i > t. Next, we show that Hia (Ext c−t R (M, Da )) = 0 for all i < t. To this end, by using Lemma 4.1, it is enough to show that Ext iR (R/a, Ext c−t R (M, Da )) = 0 ∼ for all i < t. Now, since M is a-RCM, in view of Lemma 4.2 we have Tor R i−t (R/a, M ) = t Tor R i (R/a, Ha (M )) for all i. Therefore, one can use Proposition 3.4 to get the following isomorphisms t ∨ R ∼ Ext iR (R/a, Ext c−t R (M, Da )) = Tor i (R/a, Ha (M )) ∼ = Tor R (R/a, M )∨ , i−t which complete the proof.  The following corollary which is some known results about a dualizing module is a consequence of the previous theorem. Corollary 4.4. Let (R, m) be d-dimensional Cohen-Macaulay local ring with a dualizing R-module ΩR . Then the following statements hold true. 10 M.R. ZARGAR (i) Him (ΩR ) = 0 if and only if i 6= d. (ii) id R (ΩR ) = d. (iii) µd (m, ΩR ) = 1. (iv) For all t = 0, 1, . . . , d and for all Cohen-Macaulay R-modules M with dim M = t, one has (a) Ext iR (M, ΩR ) = 0 if and only if i 6= d − t. (b) Him (Ext d−t R (M, ΩR )) = 0 if and only if i 6= t Proof. It is straightforward to see that one may assume that R is a complete local ring. Therefore, one has ΩR ∼ = Dm ; and so by using the Theorem 4.3 there nothing to prove.  The following lemma, which is needed in the proof of the next proposition, recovers [17, Corollary 2.6]. Lemma 4.5. Let the situation be as in Theorem 4.3. Then, for all ideals b of R such that a ⊆ b, there exists the isomorphism Hc (Da ) ∼ = E(R/m). b Proof. First, one can use Theorem 4.3(i)-(ii) and [20, Theorem 2.5(i)] to see that Hcb (Da ) is injective. Now, in view of [20, Proposition 2.1] and Theorem 4.3(i), we get the following isomorphisms Hom R (R/b, Hcb (Da )) ∼ = Ext cR (R/b, Da ) ∼ = (R/b)∨ , where the last isomorphism follows from Proposition 3.4(ii). Therefore, by Melkerson Lemma [2, Theorem 7.2.1], Hcb (Da ) is an Artinian R-module; and hence there exists a non-negative integer t such that Hc (Da ) ∼ = E(R/m)t . On the other hand, by [20, Corollary b 2.2], we have µ0 (m, Hcb (Da )) = µc (m, Da ). It therefore follows form Theorem 4.3(iii) that t = 1.  As an immediate consequence of the previous lemma we have the next result. Corollary 4.6. Let (R, m) be a d-dimensional local ring with t := depth R. Let x1 , . . . , xd be a system of parameters for R which x1 , . . . , xt is an R-sequence. Then, for all 0 ≤ i ≤ t and for all 0 ≤ s ≤ d − i, we have Hi(x1 ,...,xi ) (D(x1 ,...,xi ) ) ∼ = Hi(x1 ,...,xi+s ) (D(x1 ,...,xi ) ) ∼ = E(R/m). Next, we provide an example to justify Theorem 4.3 and Lemma 4.5. Example 4.7. Let R = k[[x, y, z]] be the ring of power series, where k is a field. Set a = (x). Notice that R is an a-RCM local ring with the maximal ideal m = (x, y, z) and ht R a = 1. Consider the following exact sequence 0 −→ R −→ Rx −→ H1a (R) −→ 0. DUALITY FOR LOCAL COHOMOLOGY MODULES Now, by applying the functor ∨ 11 on the above exact sequence, one gets the exact sequence 0 −→ Da −→ Rx∨ −→ E(R/m) −→ 0. (4.1) Notice that Hom R (Rx , E(R/m)) is an injective R-module; and hence id R (Da ) ≤ 1. Now, we show that id R (Da ) = 1. To this end, it is enough to show that Da is not injective. Assume the contrary that it is injective. Since Da 6= 0, there exists a non-zero element f ∈ Da and a non-zero element y ∈ H1a (R) such that 0 6= f (y) ∈ E(R/m); and hence there exists an element r in R such that 0 6= rf (y) ∈ R/m. On the other hand, there exists an element t ∈ N such that xt y = 0. Now, since Da is divisible, there exists an element h ∈ Da such that xt h = f , which is a contradiction. Hence id R (Da ) = 1. Also, by (4.1), µ1 (m, Da ) = 1. Next, applying the functor Γa (−) on (4.1) we obtain the exact sequence (4.2) 0 → Γa (Da ) → Γa (Rx∨ ) → Γa (E(R/m)) → H1a (Da ) → 0. Therefore, since Γa (Rx∨ ) = 0, we have Hia (Da ) = 0 for all i 6= 1 and H1a (Da ) ∼ = E(R/m). Let M = R/(y, z). Then, Hia (M ) = 0 for all i 6= 1. Since, id R (Da ) = 1, Ext iR (M, Da ) = 0 for all i > 1, Also, one can use (4.1) together with the fact that the natural map M −→ Mx is one to one, to see that Ext 1R (M, Da ) = 0. But, Hom R (M, Da ) ∼ = H1a (M )∨ 6= 0. Now, since Hom R (R/a, Hom R (M, Da )) ∼ = H1 (M/aM )∨ = 0, one has Γa (Hom R (M, Da )) = 0. On the other hand, one has that H1a (Hom R (M, Da )) a i Ha (Hom R (M, Da )) = 0 for all i > 1. Now, we must prove 6= 0. To this end, by Lemma 4.1, it is enough to show that Ext 1R (R/a, Hom R (M, Da )) 6= 0. Since 1 ∨ Ext 1R (R/a, Hom R (M, Da )) ∼ = Tor R 1 (R/a, Ha (M )) , 1 we need only to show that Tor R 1 (R/a, Ha (M )) 6= 0. To this end, consider the exact sequence 0 −→ M −→ Mx −→ H1a (M ) −→ 0 to induce the exact sequence ϕ 1 Tor R → Mx /aMx → H1a (M ) ⊗R R/a → 0, 1 (R/a, Ha (M )) → M/aM − and use the fact that ϕ = 0 to complete the proof. Proposition 4.8. Let (R, m, k) be an a-RCM local ring with ht R a = c and let b ⊆ a be an ideal of R. Set t := inf{ i | Hib (Da ) 6= 0} and consider the following statements: (i) Hib (Da ) = 0 for all i 6= t. t i t ∼ (ii) Hc−t a (Hb (Da )) = ER (k) and Ha (Hb (Da )) = 0 for i 6= c − t . t t i ∼ (iii) For c = m and c = a, Ext c−t R (R/c, Hb (Da )) = ER/c (k) and Ext R (R/c, Hb (Da )) = 0 for all i 6= c − t . Then, the implications (i)⇒(ii) and (ii)⇔(iii) hold true. Moreover, if condition (i) is ∼ Hom R (Ht (Da ), Ht (Da )). b= satisfied, then Ext i (Ht (Da ), Ht (Da )) = 0 for all i 6= 0 and R R b b b b 12 M.R. ZARGAR Proof. First, notice that one can use Lemma 4.1 and Proposition 3.4 to deduce that t = c − cd (a, R/b); and hence it is a finite number. (i)⇒(ii). In view of [20, Proposition 2.8] and the assumption, one has the isomorphism ∼ = Hi+t (Da ) for all i ≥ 0. Therefore, one can use Theorem 4.3(i) and Lemma Hia (Htb (Da )) a 4.5 to complete the proof. (ii)⇒(iii): Let c ∈ {a, m}. Since R/c is an a-torsion R-module, Lemma 4.1(i)⇒(ii) im- t plies that Ext iR (R/c, Htb (Da )) = 0 for all i < c − t. On the other hand, since Hc−t a (Hb (Da )) is injective, one can use [20, Proposition 2.1] to see that Ext iR (R/c, Htb (Da ))) = 0 for all c − t < i and that Ext c−t (R/c, Ht (Da )) ∼ = Hom R (R/c, Hc−t (Ht (Da ))). Hence the proof is R a b b complete. (iii)⇒(ii): First, in view of Lemma 4.1(iii)⇒(i) and our assumption for c = a, we deduce that Hia (Htb (Da )) = 0 for all i < c − t. Notice that, in view of Proposition 3.4, we have ∨ t ∼ i t Ext c−i R (Hb (Da ), Da ) = Ha (Hb (Da )) for all i. Now, since Hib (Da ) = 0 for all i < t and Hib (Da ) is b-torsion, one can use Lemma 4.1(i)⇒(ii) to see that Ext jR (Htb (Da ), Da ) = 0 for all j < t; and hence Hia (Htb (Da )) = 0 for all i > c − t. Therefore, one can use [20, Proposition 2.1] and assumption for c = a to deduce that c−t t t ∼ Hom R (R/a, Hc−t a (Hb (Da ))) = Ext R (R/a, Hb (Da )) ∼ = (R/a)∨ . t Hence, Hom R (R/a, Hc−t a (Hb (Da ))) is an Artinian R-module. Therefore, by [2, Theot rem 7.1.2], Hc−t a (Hb (Da )) is Artinian. Thus, one can use [20, Corollary 2.2] to see that t c−t+1 (m, Ht (D )) = 0. Hence Hc−t (Ht (D )) is an injective Rµ1 (m, Hc−t a a a (Hb (Da ))) = µ a b b c−t module. Therefore, again we can use [20, Corollary 2.2] to see that H (Ht (Da )) ∼ = ER (k). a b For the finial assertion, suppose that the statement (i) hold true. Then, we can use [20, Proposition 2.1] and Proposition 3.4 to get the following isomorphisms t Ext iR (Htb (Da ), Htb (Da )) ∼ = Ext i+t R (Hb (Da ), Da ) ∼ = Hc−i−t (Ht (Da ))∨ . a b Now, one can use (ii) to complete the proof.  The following corollary is an immediate consequence of the above proposition and Theorem 4.3. Notice that the first part of the next corollary has been proved in [24, Theorem 1.3(b)]. Corollary 4.9. Let (R, m) be an a-RCM local ring with ht R a = c. Then the following statements hold true: (i) R̂ ∼ = Hom R (Hca (Da ), Hca (Da )) ∼ = Hom R (Da , Da ). (ii) Ext iR (Da , Da ) = Ext iR (Hca (Da ), Hca (Da )) = 0 for all i > 0. DUALITY FOR LOCAL COHOMOLOGY MODULES 13 5. Maximal relative Cohen-Macaulay modules Given an R-module M and a finite free resolution F = {Fi , λFi } of M , we define ΩFi (M ) = ker λFi−1 . The starting point of this section is the following proposition which recovers the well known fact that, for a finitely generated module M over a Cohen-Macaulay local ring, ΩFn (M ) is zero or maximal Cohen-Macaulay for all n ≥ dim R. Proposition 5.1. Let M be a finitely generated R-module and let F be a finite free resolution for M . Then the following hold true: (i) grade (a, ΩFn (M )) ≥ min{n, grade (a, R)}. (ii) If R is a-RCM, then ΩFn (M ) is zero or maximal a-RCM for all n ≥ cd (a, R). Proof. (i). We proceed by induction on n. If n = 0, then there is nothing to prove. Let n > 0 and suppose that the result has been proved for n − 1. Let F = · · · −→ Fn −→ Fn−1 −→ · · · −→ F1 −→ F0 −→ M −→ 0 be a finite free resolution for M . Then, there are the following exact sequences 0 −→ ΩFn (M ) −→ Fn−1 −→ ΩFn−1 (M ) −→ 0 0 −→ ΩFn−1 (M ) −→ Fn−2 −→ · · · −→ F1 −→ F0 −→ M −→ 0. Hence, one can use [3, Proposition 1.2.9] and inductive hypothesis to see that grade (a, ΩFn (M )) ≥ min{grade (a, Fn−1 ), grade (a, ΩFn−1 (M )) + 1} ≥ min{grade (a, Fn−1 ), min{n − 1, grade (a, R)} + 1} ≥ min{grade (a, R), n}. (ii). Let R be a-RCM and n ≥ cd (a, R). Then, cd (a, R) = grade (a, R). Next, since Supp (ΩFn (M )) ⊆ Spec (R), by [7, Theorem 2.2], we have cd (a, ΩFn (M )) ≤ cd (a, R). There- fore, one can use (i) to complete the proof.  An immediate application of the previous proposition is the next corollary. Corollary 5.2. Let (R, m) be a local ring, x1 , . . . , xn be an R-sequence and let M be a non-zero finitely generated R-module. Then, for all i ≥ n, x1 , . . . , xn is an ΩFi M -sequence, whenever ΩFi M is non-zero. Remark 5.3. It is an important conjecture which indicates that any local ring admits a maximal Cohen-Macaulay module. We can raise the above conjecture for maximal relative Cohen-Macaulay modules. Indeed, we have the following conjecture. Conjecture. Let a be a proper ideal of a local ring R. Then there exists a maximal relative Cohen-Macaulay module with respect to a over R. 14 M.R. ZARGAR Let R be a Cohen-Macaulay local ring with a dualizing R-module ΩR . Then, there exists the known isomorphism M ∼ = Ext d−t (Ext d−t (M, ΩR ), ΩR ), whenever M is a CohenR R Macaulay R-module of dimension t. In the following result, we use Da instead of ΩR to provide a generalization of the above result. Theorem 5.4. Let (R, m) be a local a-RCM local ring with grade (a, R) = c. Then, for all nonzero a-RCM R-modules M with cd (a, M ) = t, there exists a natural isomorphism c−t b∼ M ⊗R R = Ext c−t R (Ext R (M, Da ), Da ). b∼ In particular, if M is maximal a-RCM, then M ⊗R R = Hom R (Hom R (M, Da ), Da ). Proof. Let M be an a-RCM R-module with cd (a, M ) = t. Then, in view of Theorem 4.3(iv), one has Ext jR (M, Da ) = 0 for all j 6= c − t. Therefore, for all i, one can use the following isomorphisms Ext iR (M, Σc−t Da ) ∼ = H−i (RHom R (M, Σc−t Da )) ∼ H−i (Σc−t RHom R (M, Da )) = ∼ = H−i+t−c (RHom R (M, Da )) ∼ (M, Da ), = Ext i+c−t R i c−t D ) = 0 for all i > to deduce that Hom R (M, Σc−t Da ) ∼ = Ext c−t a R (M, Da ) and Ext R (M, Σ 0. Notice that the second isomorphism follows from [5, Lemma 2.3.10]. Hence we obtain the isomorphism Hom R (M, Σc−t Da ) ≃ RHom R (M, Σc−t Da ) in the derived category. On b the other hand, in view of Corollary 4.9, we have RHom R (Da , Da ) ≃ Hom R (Da , Da ) ∼ = R. Hence, one can use Theorem 4.3(ii) and [4, A.4.24] to obtain the following isomorphism RHom R (RHom R (M, Da ), Da ) ≃ M ⊗L R RHom R (Da , Da ) b ≃ M ⊗L R. R Therefore, we can use the following isomorphisms c−t c−t ∼ Ext c−t R (Ext R (M, Da ), Da ) = Ht−c (RHom R (Ext R (M, Da ), Da )) ∼ = Ht−c (RHom R (Hom R (M, Σc−t Da ), Da )) ∼ = Ht−c (RHom R (RHom R (M, Σc−t Da ), Da )) ∼ Ht−c (RHom R (Σc−t RHom R (M, Da ), Da )) = ∼ Ht−c (Σt−c RHom R (RHom R (M, Da ), Da )) = ∼ = H0 (RHom R (RHom R (M, Da ), Da )) ∼ b = M ⊗R R, to complete the proof. The forth isomorphism follows from [5, Lemma 2.3.10] and the fifth isomorphism follows from [5, Lemma 2.3.16].  The following theorem provides a characterization of maximal relative Cohen-Macaulay modules over a relative Cohen-Macaulay ring. DUALITY FOR LOCAL COHOMOLOGY MODULES 15 Theorem 5.5. Let (R, m) be an a-RCM local ring and let M be a non-zero finitely generated R-module. Then the following statements are equivalent: (i) M is a maximal a-RCM R-module. (ii) Ext iR (M, Da ) = 0 for all i > 0. (iii) The following conditions hold true: ∼ Hom R (Hom R (M, Da ), Da ). (a) M ⊗R R̂ = (b) Ext iR (Hom R (M, Da ), Da ) = 0 for all i > 0. Proof. The implications (i)⇔(ii) follows from Corollary 3.6 and the fact that cd (a, M ) ≤ cd (a, R). Also, the implication (i)⇒(iii)(a) follows from Theorem 5.4. (i)⇒(iii)(b). In view of Theorem 4.3(iv)(b) we have Hia (Hom R (M, Da )) = 0 for all i 6= cd (a, M ). Therefore, one can use Proposition 3.4 to complete the proof. (iii)⇒(i). In view of Proposition 3.4, for all i, one has ∨ Ext iR (Hom R (M, Da ), Da ) ∼ = Hc−i a (Hom R (M, Da )) , where c = cd (a, R). Therefore, by the assumption (iii)(b), one gets Hja (Hom R (M, Da )) = 0 for all j < c. On the other hand, by the same argument as in the proof Theorem 4.3(iv)(b), one can see that cd (a, Hom R (M, Da )) ≤ cd (a, R); and hence Hja (Hom R (M, Da )) = 0 for all j 6= c. Therefore, one can use Proposition 3.4, the assumption (iii)(a) and Lemma 4.2 to obtain the following isomorphisms Ext iR (R/a, M ⊗R R̂) ∼ = Ext iR (R/a, Hca (Hom R (M, Da ))∨ ) ∼ = Tor R (R/a, Hc (Hom R (M, Da )))∨ i a ∨ ∼ = Tor R i−c (R/a, Hom R (M, Da )) . Hence, Ext iR (R/a, M ⊗R R̂) = 0 for all i < c, and so by Lemma 4.1, Hia (M ⊗R R̂) = 0 for all i < c. Therefore, using the Flat Base Change Theorem and Independence Theorem implies that Hia (M ) = 0 for all i < c. Hence c ≤ grade (a, M ); and so M is maximal a-RCM.  As we described in the introduction, the following theorem, which is one of the main results, provides a generalization of the result [18, Theorem 1.11] of Khatami and Yassemi. In the next theorem, we shall use the notion of grade of M which is defined by grade (M ) = inf{ i | Ext iR (M, R) 6= 0}. Theorem 5.6. Let (R, m) be an a-RCM local ring of dimension d with ht R a = c and let M be a non-zero finitely generated R-module such that Tor R i (M, Da ) = 0 for all i > 0. Then the following statements hold true: (i) Ext iR (M ⊗R Da , Da ) ∼ = Ext iR (M, R̂) for all i and M ⊗R Da 6= 0. 16 M.R. ZARGAR (ii) Suppose that sup{ i | Ext iR (M, R) 6= 0} = depth R−depth M and that grade (M ) = depth R − dim M . Then M is Cohen-Macaulay if and only if Hia (M ⊗R Da ) = 0 for all i 6= c − grade (M ). Proof. (i). Let P be a projective R-module. Then, by [23, Theorem 5.40], there exists a directed index set I and a family of finitely generated free R-modules {Fj }j∈I such that P = limFj . Therefore, in view of Theorem 4.3(i), we have Hc−i a (Fj ⊗R Da ) = 0 for all j ∈ I −→ j∈I ∼ Hc−i (Fi ⊗R Da ) = 0 for all i 6= 0. Hence, one and for all i 6= 0, and so Hc−i a (P ⊗R Da ) = lim −→ a i∈I can use Proposition 3.4 to see that Ext iR (P ⊗R Da , Da ) = 0 for all i 6= 0. Hence, by using [23, Theorem 10.49] and Corollary 4.9(i), there is a third quadrant spectral sequence with p+q p R Ep,q 2 := Ext R (Tor q (M, Da ), Da ) =⇒ Ext R (M, R̂). p p,q Now, since Tor R i (M, Da ) = 0 for all i > 0, E2 = 0 for all q 6= 0. Therefore, this spectral sequence collapses in the column q = 0; and hence one gets, for all i, the isomorphism Ext iR (M ⊗R Da , Da ) ∼ = Ext iR (M, R̂), b is a flat R-module, by [8, Theorem 3.2.15], Next, notice that since R Ext iR (M, R̂) ∼ = Ext iR (M, R) ⊗R R̂ for all i. Therefore, M ⊗R Da 6= 0. as required. (ii). Suppose that M is Cohen-Macaulay. Then, Ext iR (M, R) = 0 for all i 6= grade (M ). Hence, one can use (i) and Proposition 3.4 to complete the proof. The converse follows again by (i) and Proposition 3.4.  Next, we recall the concept of Gorenstein dimension which was introduced by Auslander in [1]. Definition 5.7. A finite R-module M is said to be of Gorenstein dimension zero and we write G-dim (M ) = 0, if and only if (i) Ext iR (M, R) = 0 for all i > 0. (ii) Ext iR (Hom R (M, R), R) = 0 for all i > 0. (iii) The canonical map M → Hom R (Hom R (M, R), R) is an isomorphism. For a non-negative integer n, the R-module M is said to be of Gorenstein dimension at most n, if and only if there exists an exact sequence 0 −→ Gn −→ Gn−1 −→ · · · −→ G0 −→ M −→ 0, where G-dim (Gi ) = 0 for 0 ≤ i ≤ n. If such a sequence does not exist, then we write G-dim (N ) = ∞. Let R be local and M be a non-zero finitely generated R-module of finite G-dimension. Then [6, Corollary 1.10] and [8, Proposition 10.4.17] implies that sup{ i | Ext iR (M, R) 6= DUALITY FOR LOCAL COHOMOLOGY MODULES 17 0} = depth R − depth M and Tor R i (M, ΩR ) = 0 for all i > 0, where ΩR is a dualizing Rmodule. Next, we provide a remark which shows that the converse of this fact is no longer true, that is, if sup{ i | Ext iR (M, R) 6= 0} = depth R − depth M and Tor R i (M, ΩR ) = 0 for all i > 0, then it is not necessary that M has finite G-dimension. Remark 5.8. Let (R, m) be a Cohen-Macaulay local ring which admits a dualizing module ΩR and let M be a finitely generated R-module such that sup{ i | Ext iR (M, R) 6= 0} = depth R − depth M . Next, suppose, in contrary, that the converse of the above mentioned fact is true. In this case, we prove that M has finite G-dimension. To this end, we may assume that pd R (M ) = ∞. Let n ≥ dim R and let ΩFn (M ) be the n-th syzygy of a finite free resolution F for M . Then, in view of Proposition 5.1, ΩFn (M ) is maximal Cohen-Macaulay. Also, since Ext i (ΩF (M ), R) ∼ = Ext i+n (M, R) for all i > 0, one has R Ext iR (ΩFn (M ), R) n R = 0 for all i > 0. Therefore, Hom R (ΩFn (M ), R) is maximal Cohen- Macaulay. Next, in view of [4, A.4.24], we have the following isomorphisms: F L (5.1) RHom R (RHom R (ΩFn (M ), R), ΩR ) ≃ ΩFn (M )⊗L R RHom R (R, ΩR ) ≃ Ωn (M )⊗R ΩR in derived category. Since Ext iR (ΩFn (M ), R) = 0 for all i > 0, we can deduce that RHom R (ΩFn (M ), R) ≃ Hom R (ΩFn (M ), R). On the other hand, in view of [3, Corollary 3.5.11], Ext iR (Hom R (ΩFn (M ), R), ΩR ) = 0 for all i > 0. Tor iR (ΩFn (M ), ΩR ) Therefore, by (5.1), = 0 for all i > 0. Thus, by using the contrary assumption and [4, Lemma 1.2.6] for the R-module ΩFn (M ) , we get G-dim (ΩFn (M )) = 0; and hence G-dim (M ) < ∞. Indeed, by [4, Corollary 2.4.8], G-dim (M ) ≤ dim R. Therefore, we could prove that every finitely generated R-modules M satisfying the condition sup{ i | Ext iR (M, R) 6= 0} = depth R − depth M has finite G-dimension. But, this is a contradiction. Because, there exists a local Artinian ring R which admits a finitely generated R-module M satisfying the condition Ext iR (M, R) = 0 for all i > 0, but G-dim (M ) = ∞ (see [15]). Considering the above mentioned remark, in the following proposition, we generalize the result [18, Theorem 1.11] which indicates that, over a Cohen-Macaulay local ring R with a dualizing module ΩR , if M is a finitely generated R-module of finite G-dimension, then M is Cohen-Macaulay if and only if M ⊗R ΩR is Cohen-Macaulay. Proposition 5.9. Let (R, m) be a Cohen-Macaulay local ring with a dualizing R-module ΩR . Suppose that M is a finitely generated R-module such that sup{ i | Ext iR (M, R) 6= 0} = depth R − depth M and that Tor R i (M, ΩR ) = 0 for all i > 0, then M ⊗R ΩR is Cohen-Macaulay if and only if M is Cohen-Macauly. Proof. First notice that, we may assume that R is complete. Then ΩR ∼ = Dm (R). Also, since R is Cohen-Macaulay, one gets grade (M ) = depth R − dim M . Therefore, the assertion follows from Theorem 5.6(ii).  18 M.R. ZARGAR Acknowledgements. I am very grateful to Professor Hossein Zakeri, Professor Kamran Divaani-Aazar and Professor Olgur Celikbas for their kind comments and assistance in the preparation of this manuscript. References [1] M. Auslanser, Anneau de Gorenstein et torsion en algèbre commutative, Séminaire d’algèbre commutative 1966/67, notes by M. Mangeney, C. Peskine and L. Szpiro, École Normale Supérieure de Jeunes Filles, Paris, 1967. [2] M.P. Brodmann and R.Y. Sharp, Local cohomology: an algebraic introduction with geometric applications, Cambridge University Press, Cambridge, 1998. [3] W. Bruns and J. Herzog, Cohen-Macaulay rings, Cambridge University Press, Cambridge, 1993. [4] L.W. Christensen, Gorenstein Dimensions, Lecture notes in Mathematices, Springer-Verlag, Berlin, 2000. [5] L.W. Christensen and H-B. Foxby, Hyperhomological Algebra with Applications to Commutative Rings, in preparation. [6] L.W. Christensen, H-B. Foxby and H. Holm, Beyond totally reflexive modules and back, In: Noetherian and Non-Noetherian Perspectives, edited by M. Fontana, S-E. Kabbaj, B. Olberding and I. Swanson, Springer Science+Business Media, LLC, New York, (2011) 101–143. [7] K. Divaani-Aazar, R. Naghipour and M. Tousi, Cohomological dimension of certain algebraic varieties, Proc. Amer. Math. Soc. 130 (2002) 3537–3544. [8] E.E. Enochs and O.M.G. Jenda, Relative homological algebra, de Gruyter, Berlin, 2000. [9] H-B. Foxby, Gorenstein modules and related modules, Math. Scand. 31 (1972) 267–284. [10] M. Hellus, Finiteness properties of duals of local cohomology modules, Commun. Algebra 35 (2007) 3590–3602. [11] M. Hellus and P. Schenzel, On cohomologically complete intersections, J. Algebra, 320 (2008) 3733– 3748. [12] M. Hellus and P. Schenzel, Notes on local cohomology and duality, J. Algebra 401 (2014), 48–61. [13] M. Hellus and J. Strückrad, On endomorphism rings of local cohomology modules, Proc. Amer. Math. Soc. 136 (2008) 2333–2341. [14] J. Herzog and E. Kunz et al., Der kanonische Modul eines Cohen-Macaulay-Rings, Lect. Notes Math., 238, Springer-Verlag, 1971. [15] D. Jorgensen and L.M. Sega, Independence of the total reflexivity conditions for modules, Algebras and Representation Theory. 9 (2006) 217–226. [16] T. Kawasaki. Surjective-Buchsbaum modules over Cohen-Macaulay local rings. Math. Z. 218 (1995) 191–205. [17] K. Khashyarmanesh, On the Matlis duals of local cohomology modules, Arch. Math. 88 (2007) 413–418. [18] L. Khatami and S. Yassemi, Cohen-Macaulayness of tensor products, Rocky Mountain J. Math. 34 (2004) 205–213. [19] J. Lipman, Lectures on local cohomology and duality, Local cohomology and its applications (Guanajuato, 1999), Lecture Notes in Pure and Appl. Math., 226, Dekker, New York, (2002), 39–89. [20] M. Rahro Zargar and H. Zakeri, On injective and Gorenstein injective dimensions of local cohomology modules, to appear in Algebra Colloquium. [21] M. Rahro Zargar and H. Zakeri, On flat and Gorenstein flat dimensions of local cohomology modules, arXiv:1302.6395v2. DUALITY FOR LOCAL COHOMOLOGY MODULES 19 [22] I. Reiten, The converse to a theorem of Sharp on Gorenstein modules, Proc. Amer. Math. Soc. 32 (1972) 417–420. [23] J.J. Rotman, An introduction to homological algebra, Second ed., Springer, New York, 2009. [24] P. Schenzel, Matlis duals of local cohomology modules and their endomorphism rings, Arch. Math. 95 (2010) 115–123. [25] R.Y. Sharp, On Gorenstein modules over a complete Cohen-Macaulay local ring, Quart. J. Math. Oxford Ser. 22 (1971) 425–434. Faculty of Mathematical Sciences Department of Mathematics University of Mohaghegh Ardabili 56199-11367, Ardabil, Iran. E-mail address: [email protected] E-mail address: [email protected]
0math.AC
The information and its observer: external and internal information processes, information cooperation, and the origin of the observer intellect Vladimir S. Lerner, USA, [email protected] In observing interactive processes, conversion of observed uncertainty to observer certainty is natural phenomenon creating Yes-No actions of information Bit and its information observer. The information observer emerges from interacting random field of Kolmogorov probabilities, which link Kolmogorov 0-1 law‘s probabilities and Bayesian probabilities observing Markov diffusion process by its probabilistic 0-1 impulses. Each such No-0 action cuts maximum of minimal entropy of the impulse correlation, while following Yes-1 action transfers this maxim between the impulse performing the dual principle of converting the process entropy to information. Merging Yes-No actions generate microprocess within the bordered impulse, producing information Bit with free information when the microprocess probability approaches 1. The free information follows from the cutting correlation connecting the Markov process impulses. Each impulse‘ free information attracts the interacting bits. The borderer impulse‘ attracting interaction captures energy of the interactive action which memorizes the Bit. The multiple Bits, connected by the free information, move a macroprocess which self-joins its bits in triplet macrounits. Each memorized information binds the reversible microprocess within impulse with the irreversible information macroprocess along the multi-dimensional process. The observation automatically converts cutting entropy to information. Consecutively and automatically converts the cutting entropy to information conveying the process information causality, certain logic, and complexity. The macrounits logically self-organize information networks (IN) encoding the units in information geometrical structures enclosing triplet‘s code, which selects objective or subjective information observer depending on the encoded units. The IN geometry self-forms the observer dynamical and geometrical hierarchical structures with a limited boundary. The IN timespace distributed structure self-renews and cooperates information, decreasing the IN complexity. The triplet units, built through attraction and resonance, have a limited stability, leading to a finite triplet structure which each IN ending triplet bit encloses. The observing process self-builds multiple IN with finite triplet number by the IN-ending bit free information. After each IN potentially loses stability, evolving in a chaos, it possesses ability of self-restoration by a cooperating triplet. Multiple IN binds their ending triplets, which encloses the subjective observer information cognition and intelligence. The observer‘s cognition assembles the common units through the multiple attraction and resonances at forming the IN-triplet hierarchy, which accept only units that concentrates and recognizes each IN node. The ended triplet of observer hierarchical informational networks measures level of the observer intelligence. Maximal number of the accepted triplet levels in a multiple IN measures the observer maximum information intelligence comparative to other intelligent observers. The intelligent observer recognizes and encodes digital images in message transmission, being self-reflective enables understanding the message meaning. The variation problem for the integral measures of observing process‘ entropy functional and the bits‘ information path integral formalizes the minimax law, which describes all regularities of the processes. Solving the problem, mathematically defines the micro-macro processes, the IN, selective objective and subjective information observers, and invariant conditions of observer‘s self-organization and self-replication. Trajectory of observation process carries wave function, both probabilistic and certain, which selforganizes the hierarchical structures. These functional regularities create united information mechanism, whose integral logic self-operates this mechanism, transforming multiple interacting uncertainties to physical reality-matter, human information. The cognitive logic information structure self-controls the encoding of the intelligence coding structure. The minimax information law creates invariant information and physical regularities. The applications and practical implementations confirm the formalism theoretical concepts and results. Keywords: impulse probabilistic observation; cutting correlation; minimax information law; wave function; micro-macro processes, integral information measure; causal logic; cooperative information dynamics; hierarchical network; objective and subjective observers;self-forming cognition and intellect; designing AI observer; applications; implementations. 1 Introduction Revealing information nature of various interactive processes, including multiple physical interactions, human observations, Human-machine communications, biological, social, economic, other interactive systems, integrated in information observer, becomes important scientific task. Physical approach to an observer, developed in Copenhagen interpretation of quantum mechanics [1-5], requires an act of observation, as a physical carrier of the observer knowledge. But this observer‘ role not describes the formalism of quantum mechanics. According to D. Bohm ontological interpretation of quantum physics [6-8]: physical processes are determined by information, which ―is a difference of form that makes a difference of content, i.e., meaning‖, while ―meaning unfolds in intention, intention into actions‖; and ―intention arises from previous perception of meaning or significance of a certain total situation.‖ That observer entails mental processes. J.C. Eccles‘s quantum approach [9] ―is to find a way for the ―self‖ to control its brain‖. A. Wheeler‘s physical theory [10-14] of information-theoretic origin of an observer, introduces doctrine "It from Bit". Wheeler hypothesized that the Bit participates in creating the origin of all physical processes. However, Wheeler‘s theory remained unproven, and the theory does not include how the Bit self-creates itself. Before existence of J.A. Wheeler‘s theory, many physical scientists [1-14], including Einstein [15], Penrose [16], other, define the observer only physical origin. S. Weinberg, focusing on probability on quantum mechanics [17], gets the trouble from this probability natural origin. As it follows from physical quantum field [18], with vacuum quantum fluctuations, a natural probability of this fluctuation originates physical particles. J.A. Weller has included the observer in wave function [14] according to standard paradigm: Quantum Mechanics is Natural. Nonetheless, "Quantum Bayesianism" [19], which combines quantum theory with probability theory, states: ‗the wave function does not exists in the world - rather it merely reflects an individual‘s mental state.‘ Since information initially originates in quantum process with conjugated probabilities, its study should focus not on physics of observing process‘ interacting particles but on its information-theoretical essence. A Kolmogorov [20] establishes probability theory as foundation of information theory and logics. C.E. Shannon‘s information [21] measures relative entropy, which applies to random states of information process. Kullback–Leibler‘s divergence [22] between the probabilities distributions measures relative information connections the states of the observed process. E.T. Jaynes [23] applies Bayesian probabilities to propose a plausible reasoning mechanism [24] whose rules of deductive logic connect maximum Bayes information (entropy) to a human's mental activities, as a subjective observer. These references, along with many others, studying information mechanisms in an intelligence, explain these through various physical phenomena, whose specifics are still mostly unknown. Science knows that interactions have built structure of Universe as its fundamental phenomena. 2 There have been many studies these interactions specifics; however, no one approach has unified the study of all their common information origins, regularities, and differentiation. The first approach unifying these studies is published in [26, 27], and extends results in [28-34] which we review. The approach focuses on observations as interactions producing the observer itself. This unified approach shows how an information observer emerges from the observing a random interactive process. During the observation, the uncertainty of the random interactive process converts into certainty. This certainty is information. Any single certain inter-action is a ―Yes-No‖ action known as a Bit, the elementary unit of information. Multiple observations generate the Bit dynamics, or informational dynamics. The Bits organize themselves in triplets, which logically self-organize and assemble an informational network. In the process of network assembling, the triplets merge and interact with each other. Each interaction gets memorized and becomes a node of the informational network. The nodes also logically organize themselves. A sequence of the logically organized nodes defines a code of the network. The code encloses all the information about the network. This code integrates and carries all prior observations and is an immerged information observer. The informational observer emerges from probabilistic observation without any preexisting physical law. Even unknown particles, planets could be revealed from and after their probable or real interactions occur. This identifies interactions as a primary indicator of a potential probabilistic object during an observation. The introduced approach is based on the informational origin of the observer, and explains how an observer emerges from the random observations themselves. The well-known Shannon approach defines entropy as probability measures of the uncertainty of the observation. If the entropy is erased, uncertainty disappears, instead appearing as an equal certainty. Uncovering certainty from uncertainty is a scientific path to determine facts of reality. When the entropy is erased, the physical energy is exerted, which is converted enclosing the certainty. This certainty is information, which in turn is a physical entity that contains physical energy equal to the energy spent to erase entropy. In this process, the elementary unit of information a Bit is created. To summarize, a physical Bit is evolved from removing uncertainty from the observation. Or, a Bit evolves from the abstract probability of the observation and is an elementary observer itself. Since information initially originates in quantum process with conjugated probabilities, its study should focus not on physics of observing process‘ interacting particles but on its information-theoretical essence. The approach substantiates every step of the origin through the unified formalism of mathematics and logic. Such formalism allows understand and describe the regularity (law) of these informational processes. Preexisting physical law is irrelevant to the emerging regularities in this approach. The approach initial points are: 1. Interaction of the objects or particles is primary indicator of their origin. The field of probability is source of information and physics. The interactions are abstract ―Yes-No‖ actions of an impulse, probabilistic or real. 3 2. Multiple interactions create random process whose interactive impulses model Markov diffusion process. The process observes the objective probabilities linking the Kolmogorov law‘s axiomatic probabilities with Bayesian probabilities. The sequence of the probabilistic probabilistic 0-1 (No-Yes) impulses initiates the Bayes probabilities within the Markov process, which self-observe the evolving Markov process, generating correlation of observing process impulses. Particular objective probability observes specific set of events of which entropy of correlation holds. 3. Removing the entropy of this correlation or uncertainty produces certainty originating information which emerges from particular set of the observing probabilistic events that create specific information observer. These points we describe below in more details. The observing objective Yes‐No probabilities measure the idealized (virtual) process‘ impulses as a virtual observer. Such an observer, processing random interactions, generates its virtual probability measurement of the random process uncertainty in an observable process of the virtual observer. (In this probabilistic model, a potential observer of hidden (random) bits models Markov observable process located in the surrounded random field and therefore affected by the field‘s random impulses-frequencies). With growing probabilities of virtual impulses, the observing process‘ correlations increase, and real impulses emerge. The observable Markov process correlation virtually cuts the probabilistic impulses and their hidden impulses release. The observing multiple interactions integrate its growing correlation in the process entropy. The impulses, cutting (removing) entropy of the correlations, create real observing information, which moves and self-organizes the information process. The integral measure of Kolmogorov-Bayes objective probabilities [31], connecting the interactive observations, starts from virtual probabilistic observation and virtual observer, and evolves from objective interaction to a subjective real. It integrates the observing impulses, enable self-observation, and unities the observing information in Information Observer. Merging Yes-No actions of the Markov probabilistic impulse generate microprocess within the bordered impulse. The microprocesss produces information Bit with free information when its probability approaches one. The free information follows from the cutting correlation connecting the Markov process impulses. Each impulse‘ free information attracts the interacting bits. The borderer impulse‘ attracting interaction, approaching certainty, captures energy of the interactive action, which memorizes the Bit. The multiple Bits, connected by the free information, move a macroprocess. A transitive gap, separating the micro-macroprocess on an edge of reality [33], overcomes the injection of needed energy. The macroprocess bits continue attracting other creates a resonance. The resonance process links bits in duplets. Free information from one bit out of the pair gets spent on the assembling the duplet. Free information from the duplet bits attracts a third forming bit, assembling and memorizing all three in a triplet- basic elementary structure of macrounits. The triplet third bit‘s free information, attracting another duplet of bits, creates two bound triplets, which self-join and enclose another triplet, and so on. This continuing process creates the enclosed-nested levels of the bound triplets which self-organize an informational network with the levels of hierarchical structure. The last-ending triplet in the information network (IN) collects and encloses the entire network‘s information. 4 Each bit‘s memorized information binds the reversible microprocess within each impulse in the irreversible information macroprocess along the multi-dimensional observing process. The triplets, emerging from this process, cooperates the IN. The Bayes sequential probabilities generate probabilistic logic in the observing process, while the information process transforms it to certain logic. The observation consecutively and automatically converts cutting entropy to information conveying the process information causality, certain logic, and both the bit logical complexity and the bound (cooperative) complexity of the IN. Each triplet‘s three segments (of the information macroprocess) generates three symbols and one impulse-code from the free information, composing a minimal logical code that encodes the macroprocess in a physical information process. The triplet macrounits logically self-organize information networks (IN) encoding the units in the information geometrical structures enclosing triplet‘s code, which select objective or subjective information observer depending on encoding units. The IN geometry self-forms the observer dynamical and geometrical hierarchical structures with a limited boundary. The IN time-space distributed structure self-renews and cooperates information, decreasing the IN complexity through the attraction of their triplets. The IN ended triplet contains maximum amount of free information, which enables self-built other INs through the attraction, creating the multiple networks (domain). The informational networks cannot connect to each other when free information of the third bit in a triplet is not sufficient to attract another bound duplet. This triplet becomes the ended triplet, and the network completes as a finite network. The process of self-building network stops, the IN loses stability creating chaos of bits. (In a DNA, the ended triplet‘s code forms telomerase which controls the DNA life cycle). However, in the chaos, there could be a pair of bits that bind creating a duplet, having enough of free information to attract another bit. Then the attracting bits create a triplet, and building the network may continue. Hence, the finite IN chaotic process could self-restore the bound triplets creating next generation of the INs-domains, assembling the observer hierarchy. The observing probabilistic and certain logic, assembling the triplets, networks, and domains through free information logic, build the observer‘ cognitive logic and intelligence code. Every observer has different amount of the observed logic bits needed for building specific and individual cognitive logic and intelligence code. (This process is analogous to human brain cognition through the neuron yes-no actions modeling a bit. Moreover, all described self-creation of the duplet-triplets, finite informational networks, multiple networks, as well as self-restoration, performs the human brain‘ information machine in the process of probabilistic observation.) Each attracting free logical bit, while forming a triplet, selects the bits with equal speed creating a resonance. The bits cohere in the resonance which assembles their common logical loop. In the loop, only the bits involved in the resonance can recognizes each other. Cognition is ability of recognizing the binding bits in a resonance process. If the attracting logical bits are not sufficient for performing the cognitive actions, cognition does not emerge. It cannot build any duplets and triplets. At the enough observed information, cognition arises at all levels of the informational networks. Along distributes units of the IN hierarchy, each IN node accepts only units that node concentrates and recognizes. The self-organized hierarchy of distributed logical loops builds a chain of self-assembles multiple logical hierarchical units. The resonance frequencies, self-organizing the cognitive logic of the units, provide interactive actions 5 attracting the impulses with an external energy. The attracting actions carry free logic of the assembling logical unit, which opens a switch-interaction with an external impulse carrying the Landauer‘s energy that starts erasing entropy and memorizing the information in its bit. The bit free information is encoding the memorized bit. The IN hierarchy generates the multiple triplet codes, which the observer logical code integrates. The observation process carries wave functions- probabilistic and real with the spinning space –time trajectory. The wave function frequencies self-organize the observer space-distributed hierarchical structures during movement along this trajectory. The observing process, generating the triplets‘ IN time-space logic, composes a double spiral space (DSS) integral triple logic code which memorizes the DSS information helix structure. The DSS helix structure rotates, spinning physical wave function frequencies, self-organizing the multiple local bits coding units, encodes the observer triplet coding structure which we call observer intelligence. The logical switching of the free information at all hierarchical level performs the intelligence functions, which generate each local code. These functions are distributed hierarchically along the assembling logical units of the cognitive chain. The distributed intelligence coding actions at each hierarchical level control entrance the needed external physical processes. The DSS encodes the triplet units‘ information macrodynamic process in related physical irreversible thermodynamic process which implements the observer encoding logic. The thermodynamic process‘ forces and flows-speeds determine power to physically implement the encoding actions. The following observation of performance of these actions provides feedback to observer self-controlling the performance. The approach results describe the emerging the observer‘s information regularities and intelligence, satisfying a simple natural law during conversion uncertainty to certainty in the observer interactive probabilistic observation of environment. Natural (real) interactions converts this entropy to information as the interactions‘ phenomena. The approach formalism comes from Feynman concepts [24A] that a variation principle for the process integral with the problem solution mathematically formulates the physical law regularities for this process. The variation problem for the integral measures of observing process‘ entropy functional and the bits‘ information path integral [29-30] formalizes the minimax law, which describes all regularities of the observing processes. Solving the problem [26,27,33,34], mathematically defines the micro-macro processes, the IN, selective objective and subjective information observers, and invariant conditions of observer‘s self-organization and self-replication. These functional regularities create united information mechanism, whose integral logic self-operates this mechanism, transforming the multiple interacting uncertainties to physical reality-matter, human information and cognition, selforiginating the observer information intellect. This logic holds invariance of information and physical regularities, following from the minimax information law.The approach focuses on formal information mechanisms in an observer, without reference to the specific physical processes which could originate these mechanisms. The formally described information regularities contribute to basic theory of brain function and information mechanisms of Human-Machine interactions that allow finding information structure of artificial designed observer toward artificial brain. The information formalism describes a self -building information machine which creates Humans and Nature. 6 Essence of the approach main stages. How the approach works. Forewords. Interactions are natural fundamental phenomena of multiple events in common environment of Universe. Interactions have built Nature. Elementary natural interaction consists of action and reaction, which represents abstract symbols: Yes-No or  actions of an impulse modeling a Bit. In physical examples, a sequence of opposite interactive actions models rubber ball hitting ground, the reversible microfluctuations, produced within irreversible macroprocess in physical and biological processes. Here the Yes-No physical actions are connected naturally. How does the bit and their logical sequence originate? The information structure of such logic is a basis of DNA, brain information mechanism, and forms many other physical micro and macro-processes. We show that probabilistic interactions, instead of interacting particles, create information, physical processes, and an observer of this information. Probability measures only multiple events. Therefore, the probability measures the interacting event-interactions. The probability of interactive actions can predict both real interaction and the particles. Interaction of the objects or particles is primary indicator of their origin, which measure probabilities. The field of probability is source of information and physics. The approach aim is the formal principles and methodology explaining the procedure of emerging interacting observer, self-creating information. The aim derives from unifying the different interactions independent of origin, and focusing on observation as the interactive observer. The objective Yes‐No probabilities measure the idealized (virtual) impulses in observation in a virtual observation. The observation correlates random interactive action. The observing interactive random process of multiple interactions evaluates probabilities, measured by equivalent entropy of the correlation. Cutting correlation in the impulse high probable observation removes entropy or uncertainty producing certainty (information). Integrating the cutting correlations finally produces the information observer. Natural (real) interactions innately convert this entropy to information and the information observer. Information observers may reproduce a brain as its memorized copy- image. 1. Starting points Multiple interactive actions are random events in a surrounding random field. The interacting random events formally describe probabilities in Kolmogorov Theory of Probabilities [35]. 7 The probability field defines mathematical triple:   (, F , P ) , where  is sets of all possible events  -algebra subsets from sets  , and probability P  , F is Borel‘s is a non-negative function of the sets, defined on F at condition P()  1 .This triple formally connects the sets of possible events, the sets of actual events, and their probability function. Each abstract axiomatic Kolmogorov probability predicts probability measurement on the experiment whose probability distributions, tested by relative frequencies of occurrences of events, satisfy condition of symmetry of the equal probable events. Some of them form a multiple infinite sequence of independent events satisfying Kolmogorov 0-1 law. In the random field, sequence random events, collected in independent series, forms a random process, including Markov diffusion process [36] modeling multiple interactions. The Markov diffusion process describes multi-dimensional probability distributions in the random field. The events satisfying the Kolmogorov law with 0-1 probability affect a Markov diffusion process‘ probabilities, distributed in this field, via its transitional probabilities, which randomly switch the drifts (speeds) of the Markov process. The switching Markov speeds sequentially change the process current a priori-a posteriori Bayes probabilities, whose ratio determines probability density of random No-Yes impulses 0-1 or 1-0, as a part of the Markov process. That links the Kolmogorov‘s 0-1 probabilities, the Markov process‘ Bayes probabilities, and the Markov No-Yes impulses in common Markov diffusion process. Within the Markov process, the Bayes probabilities densities randomly observe the process, composing the observing process of a virtual observation. The Kolmogorov law probabilities do not observe, but initiate discrete probabilities actions on Bayes probabilities which do observe. Thus, the observing Markov probability No-Yes impulses are different from former. The observing process holds random impulse of 0-1, or 1-0 actions having probability 0-1, or 1-0 accordingly. The multiple random actions describe some probability distributions on the observing sequence of specific set of events, which formally define the observing triple above in the probability field. In natural fluctuations of elementary events, such a random probabilistic impulse (a virtual observation) represents an immanent randomness moving in a stochastic process with some time arrow-random in a surrounding random field. So, how do the observing random probabilistic interactions become a logical sequence encoding the bits? 2. Observation. Virtual observer. Uncertainty, Information, Certainty These objective 0-1 probabilities quantify idealized (virtual) impulses whose Yes-No actions represent an act of a virtual observation where each observation measures a probability of the possible events for a potential observer. Multiple virtual observations transit these probabilities along an interactive random process, generated by a virtual probability measurement, which models an observable process of a potential (virtual) observer. In the impulse‘s virtual Yes-No reversible actions, each second (No) through recursion [37] affects the predecessor (Yes) connecting them in a weak correlation, if there was not any of that. The arising correlation connection memorizes this action, indicating start of observation with following No-Yes impulse. The correlation encloses a mean time interval [36] which begins a time of observation. The observing Bayes a priori-a posteriori probabilities determine arrow of the time course of an observation process with continuous correlations. 8 Uncertainty of observation measures conditional entropy of Bayesian a priori—a posteriori probabilities. Maximal uncertainty measures non-correlating a priori-a posteriori probabilities, when their connection approaches zero. Such theoretical uncertainty has infinite entropy measures, whose conditional entropy and time do not exist. The finite uncertainty measure has a nonzero correlating finite a priori – a posteriori probability of the interactive events with a finite time interval and following finite conditional entropy. Example of such finite uncertainty‘ process is ―white noise‖. That allows measuring the observable process‘ uncertainty relative to uncertainty-entropy of the white noise. The most common formal model of a natural random non-stationary process is Markov diffusion process which includes the considered interactive observable process. If an elementary Dirac‘ delta-impulse increases each Bayes a posteriori probability, it concurrently increases probability of such virtual impulse (up to real impulse with probability 1), and decreases the related uncertainty. Information, as notion of certainty–opposed to uncertainty, measures a reduction of uncertainty to maximal posteriori probability 1, which, we assume, evaluates an observing probabilistic fact. Actually, it‘s shown [30,32], that each of the delta-impulse No-0 action cuts maximum of impulse minimal entropy, while following Yes-1 action transfers this maxmin between the impulses, decreasing the following entropy of the process. Thus, the impulse interactive actions express the impulse minimax principle. And the impulse observation imposes the minimax principle increasing each posteriori probability. Simple example. When a rubber ball hits ground, energy of this interaction partially dissipates that increases entropy of the interaction, while the ball‘s following reverse movement holds less entropy (as a part of the dissipated), leading to max-min entropy of the bouncing ball. Adding periodically small energy, compensating for the interactive dissipation, supports the continuing bouncing. The observation under Kronicker‘ [0-1] impulse-discrete analog of Dirac‘ delta-function,-also formally imposes the minimax principle automatically. The impulse minimax principle, imposed on the sequential Bayesian probabilities, leads to growing each posteriori probability, correlations, and reducing the process‘ entropy along the observing process. The correlation freezes entropy and Bayes probability hidden within correlation, which, connecting the hidden process correlations, conveys probabilistic causality along the process. The particular probability observes specific set of events which entropy of correlation holds. The correlation connects the Bayesian a priori-a posteriori probabilities in a temporal memory that does not store virtual connection, but renews, where any other virtual events (actions) are observed. If the observing process is self–supporting through automatic renewal virtual inter-actions, it calls a Virtual Observer, which acts until these actions resume. Such virtual observer belongs to a self–observing process, whose Yes-action virtually starts next impulse No- action, and so on, sending the self-observing probing impulses. Both process and observer are temporal, ending with stopping the observation. Starting of virtual self-observation limits the identified threshold [33]. 9 Each new virtually observing event–action temporary memorizes whole pre-history events from the starting observation, including the summarized (integrated) maxmin-minimax entropy of virtually cutting correlations. The memory of a last of the current correlation connection automatically holds the integrated entropy of the correlations. The memory temporary holds the difference of the probabilities actions, as a virtual measure of a distance between the impulses‘ No-Yes actions and a probabilistic accuracy of measuring correlation. The measuring, beginning from the starting observation, identifies an interval from the start, which is also virtual, disappearing with each new connection that identifies a next interval memorized in that connection. The random process‘ impulses hold virtually observing random time intervals with the hidden entropy and the events. Collecting and measuring the uncertainty along the random process integrate entropy functional (EF) [31]. The minimax of all process‘ interacting impulses carries the minimax variation principle (VP) imposed on the EF, which brings invariant measure for the running time intervals. The correlation indicates appearance of an invariant time interval of the impulse–observation. The difference of the probabilities actions that temporary holds memory of the correlation identifies a virtual measure of an adjacent distance between the impulse No-Yes actions. That originates a space shift, quantified by the curved time. The space displacement shifts the virtual observation from the source of random field to a self-observing space –time process, initiating the probabilistic emergence of time-space coordinate system and gradient of entropy-an entropy force depending on the entropy density and space coordinates. The displaced self-observing process with the space-time priori-posteriori actions continues requesting virtual observation with time-space probing impulses, which intends to preserve both these probabilities and invariant impulses. The observations under these impulses enclose reducing entropy of the space-time movement forming the volume. That initiates the observer‘s space–time entropy‘s and correlation connections, starting self-collecting virtual space-time observation in a shape of space-time correlation of the virtual Observer volume. The space-time entropy‘ force rotates the curved time-space coordinate system (within the volume) developing the rotating Coriolis force and a moment. Both are moving a space trajectory along the coordinate system, which depends on the gradient and velocity of running movement. The gradient entropy along the rotating interval of the trajectory could engage each next impulse in rotating action, which increases the correlation, temporally memorizing the time-space observation. The memory temporary holds a difference of the starting space-time correlation as accuracy of its closeness, which determines the time-space observer location with its shape. The evolving shape gradually confines the running rotating movement which self-supports formation of both the shape and Observer. The virtual observer, being displaced from the initial virtual process, sends the discrete time-space impulses as virtual probes to test the preservation of Kolmogorov probability measure of the observer process with probes‘ frequencies. Such test checks the abstract probability via a symmetry condition indicating both the probability correctness and the observing time-space structural location of the Observer. 10 The increasing frequencies of the observer‘s self-supporting probes check the growing probabilities and their symmetry. The virtual observer self-develops its space-time virtual geometrical structure during virtual observation, which gains its real form with transforming the integrated entropy of the correlated events to equivalent specific information observer. With no real physics affecting the virtual observation, the virtual probing impulses replicate the information impulses and start a probabilistic path from maximal entropy (uncertainty) to information-as a maximal real certainty. 2. The cutting entropy functions within Markov process, the related impulse, and the cutting EF satisfying the VP. Microprocess within the impulse. Information Observer. Since the Yes-No discrete actions, forming virtual or real controls, cut the EF within the Markov process, they should preserve its additive and multiplicative properties. That requirement limits the admissible controls‘ class by two real and two complex functions. Applying these control functions identify the cutting invariant impulse. The VP extreme, imposed on the process‘ impulse cutting by the EF, proves that each three invariant virtual impulses of the process time intervals enable generating a single invariant information impulse. Instead of these three emerges the last. Information delivered by the impulse step-up control, being transferred to the nearest impulse, keeps information connection between the impulses, providing persistence of the impulse sequence. This condenses each two of the previous impulses intervals and entropies in the following information impulse interval. It also proves that action, starting the information impulse, captures the Markov multiplicative entropy increments. Such impulse includes three parts: 1-delivered by multiplicative action by capturing entropy of random process; 2-delivered by the impulse step-down cut of the process entropy; 3-information delivered by the impulse step-up control, and then transferred to nearest impulse; it keeps information connection between the impulses and provides persistence continuation of the impulse sequence during the process time. Each of the three parts holds its invariant portion within the impulse measure. Since each cutting impulse preserves it invariant information measure, each third of the sequential cutting impulses triples condensed information density. It implies that a final IPF impulse condenses all previous IPF impulses, while the final time interval is limited, depending on process time course. Because the final time interval evaluates the density of this impulse information or entropy, both are also limited, as well as the total IPF. Conclusively, the IPF finite maximal information density limits a finite minimal physical time interval in accessible time course. The finite three times intervals within the invariant impulse parts allow identifying the related discreet correlation functions and its cutting increments. The results [33] verify the estimated entropy contributions in all parts of the impulse and the following information increments. The increment measures the memorized correlation of the impulse probability events in the impulse time interval’s invariant measure |1|M ,[34]. With growing probability and correlations, the intensity of entropy per the interval (as entropy density) increases on each following interval, indicating a shift between virtual 11 actions, measured in the time interval‘ unit |1|M . With growing the density of the opposite actions, they merge in a jumping impulse whose cutting action curves an emerging ½ time units of the starting impulse time interval, while a following rotating curved time-jump action initiates a displacement within the impulse opposite rotating Yes-No actions. The rotating displacement‘s space shift quantifies the curved time. When the displacement shift of two space units replaces the curved ½ time units, a transitional impulse within the same impulses |1|M rises. The transitional time-space impulse preserves probability measure | 2  1/ 2 |M |1|M of the initial time impulse, holding the impulse probability for two space units (as a counterpart to the curved time, Fig.1) . Fig.1. Illustration of origin the impulse space coordinate measure h[l ] at curving time  coordinate measure 1 / 2 p[ ] in transitional movement. On the right is an initial impulse with step-down (SP1) and step-up (SP2) actions before the jump at SP1 locality. From obvious relation 2 h[l ] / 4  1/ 2 p[ ] , their coordinate/time ratio h / p leads to the ratio of measuring units: [ ] / [l ]   / 2 with elementary space curvature K s equals to inverse radius: h[l ]1  K s . Thus, the transitional time-space has probability equal of related time interval impulse, and vice versa. That allows appearance of both transitional time –space interval simultaneously in random observation. The merging impulse-jump on the impulse border, cutting the curving time, spots a ―needle curve pleat‖ at transition from the cutting time to a finite space unit. Thus, the growing Bayes a posteriori probability, along observations merges neighbor impulses, generating interactive jump on each on the impulse border. The jump brings the extreme discrete displacement, which rotates the jump opposite actions in the anti symmetric entropy increments, the starting microprocess within the bordering impulse [34]. The merging anti-symmetric entropy increments relate to the impulse‘ actions superposition. The jump initiates the inner transitional ―mini‖ impulse within the microprocess. The jump-wise displacement preserves the Yes-No probabilities of transitional impulse, and the emerging time-space movement conserves these probability‘s measures in discrete time-space form of the impulse between the probabilities. The time interval the interactive jump -curving impulse estimates both the impulse curvature‘ entropy measure and the time-space invariant measure equal to π [34]. At satisfaction of the symmetry condition, the impulses‘ axiomatic probability begins transforming to the microprocess ‗quantum‘ probability with pairs of conjugated entropies and their correlated movements. 12 The rotating conjugate movement starts discrete time-space micro-intervals forming the transitional impulse at rotating angle  / 4 . That makes symmetrical mirror copies of the observation, holding within the transitional impulse. A maximal correlation adjoins the conjugated symmetric entropy fractions, uniting their entropies into a running pair entanglement, which confines an entropy volume of the pair superposition in the transitional impulse at angle of rotation  / 2 . The entangled pair of anti-symmetric entropy fractions appears simultaneously with the starting space interval. The correlation, binging this couple with a maximal probability, is extremely tangible. The pair of correlated conjugated entropies of the virtual impulse are not separable with no real action between them. The entangled increments, captured in rotation with forming volumes, adjoin the entropy volumes in a stable entanglement, when the conjugated entropies reach equalization and anti -symmetric correlations cohere. Arising correlated entanglement of the opposite rotating conjugated entropy increments condenses the correlating entropies in the entropy volumes of the microprocess. The stable entanglement minimizes a quantum uncertainty of the entangled virtual impulses and increases their Bayes probability. As maximal a priori probability approaches Pa  1 , both the entropy volume and rotating moment grow. Still, between the maximal a priori probability of virtual process Pa  1 and a posteriori probability of real process Pp  1 is a small microprocess‘ gap, associated with time-space probabilistic transitive movement, separating the entropy and appearance of its information. The gap implies a distinction of statistical possibilities with the entropies of uncertain reality from the informationcertainty of reality. The Bayes probabilities measure may overcome this transitive gap. The gap holds a hidden real locality within the hidden correlation. The rotating momentum, growing with increased volume, intensifies the time –space volume transition over the gap, acquiring physical property near the gap end at the rising probability. When a last posterior probability, approaching Pp  1 , overcomes a last prior virtual probability, the curving momentum may physically cut the transferred entropy volume. Growing a posteriori probability of the virtual impulse successively brings a reality to its posteriori action, which injects energy, capturing through real interaction (like a bouncing ball) that cuts (erases) the entropy-uncertainty hidden in the correlations. When the conjugated pair of the correlated entropies is cut, this action transforms the adjoin entropy increments to real information which binds them in real Bit of the entangled couple where changing one acts to other. The step-down (No) control‘s cut kills a total entropy‘ volume during finite time-space rotation and memorizes dynamically this cutting entropy as the equivalent information with its asymmetric geometry. Ability of an observer to overcome its gap depends on the amount of entropy volume , enclosing the observed events collected during virtual probes. The probes entropy force and momentum spin the 13 rotating momentum for transition over the gap, and the real control jump adds energy covering the transition. Cutting the curved volume places a real needle pleat with time –space interacting impulse. The cutting action, killing the process entropy near Pp  1 , produces an interactive impact between the impulse No and Yes actions, which requires the impulse access of energy to overcome the gap. The impact emerges when virtual Yes-action, ending the preceding imaginary microprocess, follows real No-action which delivers equivalent information compensating for this impact, while the virtual cuts avoid it. Thus, the information impulse appears with energy within it. Transition maximal probability of observation through the gap, up to killing the resulting entropy, runs a physical microprocess with both local and nonlocal entangled information units and real time-space, which preempt memorizing information. When the posteriori probability is closed to reality, the impulse positive curvature of step-up action, interacting with an external impulse‘ negative curvatures of step-down action, transits a real interactive energy, which the opposite asymmetrical curvatures actions cover. During the curved interaction, the asymmetrical curvature of step-up action compensates the asymmetrical curvature of the step-down real impulse, and that real asymmetry is memorized through the erasure by the supplied external Landauer‘s energy [38]. Fig. 2A Fig . 2B A virtual impulse (Fig.2A) starts step-down action with probability 0 of its potential cutting part; the impulse middle part has a transitional impulse with transitive logical 0-1; the step-up action changes it to 1-0 holding by the end interacting part 0, which, after the inter-active step-down cut, transforms the impulse entropy to information bit. In Fig. 2B, the impulse Fig. 2A, starting from instance 1 with probability 0, transits at instance 2 during interaction to the interacting impulse with negative curvature  K e1 of this impulse step-down action, which is opposite to curvature  K e 3 of ending the step-up action (  K e1 is analogous to that at beginning the impulse Fig.2A). The opposite curved interaction provides a time–space difference (a barrier) between 0 and 1 actions, necessary for creating the Bit. When the interactive process provides Landauer’s energy with maximal probability (certainty) 1, the interactive impulse’ step-down ending state memorizes the Bit. Such certain interaction injects the energy overcoming the transitive gap, including the barrier, toward creation the Bit. 14 The step-up action of an external (natural) process‘ curvature  K e 3 is equivalent of potential entropy eo  0.01847 Nat which carries entropy ln 2 of the impulse total entropy 1 Nat. The interacting step-down part of internal process impulse‘ invariant entropy 1 Nat has potential entropy 1  ln 2  e1 . Here the interacting curvature, enclosing entropy density, lowers the initial energy and the related temperatures in the above ratio. From that follow conditions creating a bit in interacting curved impulse [34]. 1. The opposite curving impulses in the interactive transition require keeping entropy ratio 1/ln2. 2. The interacting process should possess the Landauer energy by the moment ending the interaction. 3. The interacting impulse hold invariant measure M=[1] of entropy 1 Nat whose the topological metric preserves the impulse curvatures. The last follows from the impulse‘ max-min mini-max law under its step-down and step-up actions, which generate the invariant [1]-Nat time-space measure with topological metric π (1/2circle) preserving opposite curvatures. Theoretically, a pure probability predictability in ―idealized measurement‖ challenges Kolmogorov's probability measure at quantum mechanics‘ entanglement when both additive and symmetry probability for mutual exchangeable events vanish. The observing Markov probabilities‘ additive and multiplicative properties are changing within the microprocess. Specifically, the merging jump violates regular properties of Markov process leading to a sub-Markovian process [39]. From the starting jump-up to the following jump -down, launching space interval of transitional impulse, the microprocess holds additive properties for both probability and related conjugated entropy. The transitional impulse, confining the entanglement, ends with jump -down, initiating only the multiplicative property for the entangled entropy and the probability. The microprocess within the transit ional impulse is reversible. The microprocess within whole impulse is reversible until the impulse ending action cuts its entropy. It concurs with property of quantum wave function before and after interactive measurement. For each random impulse, proceeding between a temporary fixed the correlated random No -Yes actions, such microprocess is multiple whose manifold decreases with growing the probability measure. At a maximal probability, only a pair of additive entropy flows with symmetric probabilities, w hich contains symmetrical-exchangeable states advance in the superposition. The multiple impulses initiate a manifold of virtual Observers with random space -time shape in a collective probabilistic movement. With maximal observing probabilities, the mani fold of the virtual observers also decreases. The microprocess is different from that in quantum mechanics (QM), since it rises as a virtual inside probing impulse of growing probability under jumping action, and then evolves to the real under final 15 physical No-actions. Its superposing rotating anti -symmetric entropy flows have additive time –space complex amplitudes correlated in time-space entanglement, which do not carry and bind energy, just connects the entropy in joint correlation, whose cuts models el ementary interaction with no physics. The QM probabilistic particles carry the analogous conjugated probability amplitudes correlated in time-space entanglement. Virtual microprocess does not dissipate but its integral entropy decreases along No -Yes reversible probes in the observation. The real microprocess builds each information unit-Bit within the cutting impulse in real time, becoming irreversible after the cut (erasure). These operations, creating Bit from the impulse, reveal structure of Weller Bit , which memorizes the Yes-No logic of virtual actions, while the Bit free information participates in getting the multiple Bits information. Such Bit-Participator is primary information observer formed without a priori physical law. Whereas the observing probable triple in the field specifies each information observer. The information observer starts with real impulse cutting off the observing process and extracting hidden information Bit. That identifies the information observer as an extractor and holde r this information emerging in observation. Killing physical action converts entropy of virtual Observer to equivalent information of real Information Observer. Killing the distinct volumes densities converts them in the Bits distinguished by information density and curvature. The curving impulse of each Bit accumulates the impulse complimentary–opposite actions carrying free information, which initiates the Bits‘ attraction. During the curved interaction, a primary virtual asymmetry, measured by equivalent entropy, compensates the asymmetrical curvature of a real external impulse. The real asymmetry is memorized as information through the entropy erasure by the supplied external Landauer‘s energy. The entropy‘ cutting interaction, curving asymmetry and producing information, performs function of Maxwell demon, which emerges with the curving asymmetry. Between different Bits rises information gradient of attraction minimizing the free information which finally binds Bits. That connects the Observer‘s collected information Bit in units of an information process, which finally builds Observer information structure. The maxmin-minimax principle, rising in the impulse observation, leads to the following attributes of emerging information Bit: -it information is delivered by capturing and cutting entropy of virtual observing correlated impulses; -its free information is transferring to the nearest impulse that keeps persistence continuation of the impulse sequence via the attracting Bits; 16 -the persistent Bits sequentially and automatically convert entropy to information, holding the cutoff information of random process correlation, which connects the Bits sequences; -the cutoff Bit holds time–space geometry following from the geometrical form of discrete entro py impulse; -the information, memorized in the Bit, cuts the symmetry of virtual process; -the free information, rising between the Bits cutting from random process, is spending on binding the attracted Bits; -each three Bits‘ free information allows bi nding the triple bits in a new bit, which is different from the primary Bit cutoff from random process; -both primary and attracting Bits‘ persistence continuation integrate the time-space real information process, which is composing the elementary information units in space-time information structure of Information Observer. While the Bit preserves origin of its information, the growing information, condensed in the integrated Bit‘s finite impulse size (limited by the speed of light), increases the Bit inf ormation density. The increasing density conserves growing energy being equivalent of interacting physical particles -objects. The information microprocess‘ formalism allows contribute in explanation of some known paradox and problems [34]. The optimal estimation of a lower limit on the increment of probability events evaluates the probabilities and limitations on process of observations [33]. Evaluation the information constraints, limitation on the microprocess, and conditions of the observer start predicts the probability path from virtual probes to the probability approaching a real cutoff. On the path of observing uncertainty to certainty, emerge causality, information, and complexity, which the information Bit‘s geometry encloses in the impulse time, curvature, and space coordinates. An edge of reality, within the entropy-information gap, evaluates Plank‘s fine structural constant in a sub-plank region of uncertainty [34]. A minimal displacement within this region estimates number of probing impulses to reach that region, which concurs with virtual probes approaching the real cutoff. 4.Information macroprocess. The rotating movement (Fig.3) of the information Bits binds them in information macroprocess, which describes the extremals of the EF variati on problem (VP) that was solved. The macroprocess free information integrates the multiple Bits in information path functional (IPF) which encloses the Bits time -space geometry in the process‘ information structure. Estimation of extremal process shows that information, collected from the diffusion process by the IPF, approaches the EF entropy functional. The IPF formalizes the EF extreme integral for the cutting interactive impulse, whose information approaches EF at the bit number n   , [32]. The IPF integrates flows of Bits units with finite distances and sizes. 17 The IPF maximum, integrating unlimited number of Bits, limits the total information that carries the process‘ Bits and intensifies the Bit information density, running it t o infinite process dimension. At infinitive dimension of the macroprocess , it describes both the EF and IPF extremals. The limited number of the process units, which free information assembles, leads to limited free information transforming the impulse mi croprocess to the macroprocess with a restricted dimension. The randomly applied deterministic (real) impulses, cutting all process correlations, transforms the initial random process to a limited sequence of independent states. . Fig.3. Forming a space -time spiral trajectory with current radius   bsin( sin  ) on conic surface at points D, D1, D2, D3, D4 of spatial discrete interval DD1=  , which corresponds to angle    k / 2 , k  1,2,... of radius vector’s  ( ,  ) projection of on the cone’s base (O1, O2, O3, O4) with the vertex angle   o . The ratio of primary a priori- a posteriori probabilities beginning the probabilistic observation identifies the initial conditions for the EF and its extremals. The initial conditions determine the entropy function starting virtual observations at a moment which depends on minimal entropy (uncertainty) arising in the observations. This entropy allows finding unknown posteriori entropy starting virtual Observer. The initial conditions bring complex (real and imaginary) entropies for starting conjugated processes in a virtual observer‘ microprocess. This process‘ minimal interactive entropy becomes threshold for starting information microprocess, beginning the real observation and information Observer. Starting the extreme Hamiltonian processes evaluate two pairs of real states for the conjugated rotating dynamic process [27-31]. That allows finding the equations unifying description of virtual and real observation, microprocess, and the dynamic macroprocess. Applying the macrodynamic equations [30, 34] to traditional form of dynamic model with unknown control function solves the initial VP which determines the optimal control for the traditional model. These controls, formed by feedback function of the macrostates, bring step-up and step-down actions which sequentially start and terminate the VP constraint, imposed on the model. That allows extracting the cutoff hidden information from the localities joining the extremal segments of the observing trajectory. The extracted information feeds the observer macrodynamics with the recent inf ormation from the current observations. 18 This feedback‘ process concurrently renovates the observing Markov correlations connecting the macrostates and the controls The correlations identify the Markov drift function transferred to the equations of the information macrodynamics [29,34]. Within each extremal segment, the information dynamics is reversible; the irreversibility rises at termination of each VP constraint between the segments. The feedback identifies cutting correlations and automatically transforms the EF to IPF. That reveals the integrated information hidden in the observing process randomness. While the sum of cutting correlation functions identifies the IPF integrant. The EF-IPF Lagrangian integrates both the impulses and constraint inform ation on its time-space intervals. The identified VP constraint leads to invariant relations for each impulse information, interval, and the intervals between information impulses holding three invariant entropies of virtual impulses, as well as invariant conjugate vector on the extremal. These invariants estimate each segment information on the macrotrajectory, the locality between segments, predicting where the potential feeding information should transfer the feedback or measuring. The invariants allow encoding the observing process using Shannon‘s formula for an average optimal code word length of the code alphabet letters. The information analog of Plank constant evaluates maximal information speed of the observing process, which estimates a time interval and entropy equivalent of the gap separating the micro- and macroprocess. Shifting this time to real time course automatically converts its entropy to information, working as Maxwell‘s Demon, which enables compensating for the transitive gap. The equations of observation finalize both math description of the micro -macro-processes and validate them numerically. 4a. The information process‘ basic structure unit-triplet. The cutoff attracting bits, start collecting each three of them in a primary basic tr iplet unit at equal information speeds, which resonates and coheres joining in triplet units UPo of information process. Specifically, each three bits, processing the joint attractive movement, cooperate in the created new attracting bit, which composes a primary basic triple unit and then composes secondary triple unit, and so on. That cooperates a nested sequence of the enclosed triplet unit emerging during cooperative rotation, when each following triplet unit enfolds all information of the cooperating units in its composite final bit. The UPo size limits the unit starting maximal and ending minimal information speeds, attracting and forming new triplet unit by its free information along the macroprocess. The process movement selects automatically each UPo during the attracting minimax movement, by joining two cutoff Bits with a third 19 Bit, which delivers free information to next cutting Bit, forming next cooperative triple unit UPi (Figs.4,5). Forming the multiple triplet trajectory follows the same procedure , (Fig.5,6) Fig. 4. Time-space opposite directional-complimentary conjugated trajectories   SPo and   SPo , form spirals located on conic surfaces (analogous to Fig.2). Trajectory connected bridges  SPi binds the contributions of process information unit UPi through the impulse joint No-Yes actions, which model a line of switching controls. Two opposite space helixes and middle curve are shown on the right. Each self-forming triplet joins two segments of the macro-trajectory with positive eigenvalues by reversing their unstable eigenvalues and attracting a third segment with negative eigenvalues. The third segment‘ rotating trajectory moves the two opposite rotating eigenvectors and cooperates all three information segments in a triplet‘s knot (Fig. 5). Each triplet unit generates three symbols from three segments of information dynamics and one impulse-code from the control, composing a minimal logical code that encodes this elementary physical information process. Fig.5. Illustrative dynamics of assembling units UP1 , UP 2 , UP3 on the space-time trajectory and adjoining them to UPo1 knot along the sections max  3to to 1tmin ,  2tmin ,  3tmin of space-time trajectory SP1 , SP2 SP3 (Fig.4) at changing information speeds from 1to , max max  2to , accordingly; a is dynamic information invariant of an impulse. Fig.5. shows how a minimum three self -connected Bits assemble optimal UPo -basic triplet whose free information requests and binds new triplet, which joins and binds three basic triplets in the ending knot, accumulating and memorizing information of all trees. 20 Each current unit UPk , k  1,2.3 composes its bits in triplet code that encodes and connects the units. Fig. 6. Simulation of forming a triplet’s space structure on a knot node, composed from time-space spirals Fig.3 (according to Fig.4). The Fig.6 indicated time intervals measure real times t13 , t13 , t3 during the simulation shown on cones diameters. The pair of opposite directional rotating units equalizes their eigenvalues with the rotating third one, attracts and binds them in the triple by the starting attracting force. 4b. Assembling the information network (IN). During the macro-movement, the joint triple unit‘ free information transfers the triple code to next forming triplet, which assembles a network that is building by the forming triplet‘ code. The multiple triples sequentially adjoin time -space hierarchical network (IN) whose free information requests from observation and attaches new triplet unit at its higher level of the knot -node, concurrently encoding the IN triple logic (Fig.7). Fig.7. The IN information geometrical structure of hierarchy of the spiral space-time dynamics (Figs.3-6) of the triplet nodes (tr1, tr2, tr3, ..); where space, where { iot } are a ranged string of the initial eigenvalues, cooperating on (t1 , t2 , t3 ) locations of T-L time-  i   iok /  iok 1 , k is number of a nearest IN triplets. Each triplet has unique space-time position in the IN hierarchy, which defines exact location of each code logical structure. The IN node hierarchical level classifies quality of assembled information. The currently ending IN node integrates information enfolding all IN levels in this node knot (Fig.7). The IN is automatically feeding novel information, which it concurrently requests by a deficit of needed information. 21 The deficit creates equal entropy-uncertainty, requesting new information, which initiates probing impulses and the frequency of the observing entropy impulses. The information probing impulses interact with the observing cutting their entropy. That provides the IN-feedback information, which verifies the IN‘s nodes‘ requesting information. New information for the IN delivers the requested node interactive impulses, whose impact on the probing impulses, with observing frequency, through the cutoff, memorizes the entropy of observing data-events. Appearing new quality of the information triplet currently builds the IN temporary hierarchy, whose high level enfolds the information triplet logic that requests new information for the running observer‘s IN, attaches it, and extends the logic code. The emergence of observer current IN level indicates observer‘s information surprise measured by the attach ing new information. The IN time-space logic encodes in double spiral space (DSS) triple code that rotates, encircli ng the conic structures (Fig.3,4,7), which multiple INs logic extends. Fig.8. Simulation of forming double spiral cone’s structure (DSS) with cells (c[l]), arising along switching control line hyperbola Lc (shown in (Fig.3)) and uncertainty zone (UR) geometry, surrounding the Lc . The curved macro trajectory models line Ls whose rotation around Lc n forms UR, enfolding the geometry volume V 3 with space surface F2n This space structure encloses each of the spiral models on Fig. 3, 5, 6. The ending knots of a higher IN‘s level assemble its three units UPi 0 in the next IN level‘s triplet which starts it, Fig.8. 22 Fig.9. Assembling three formed units UPi 0 at a higher triplet’s level connecting the units’ equal speeds (Fig.4) The attracting process of assembling knots forms a rotating loop shown on Fig.7 at forming each following cooperative triplet tr1, tr2,…. (The scales of the curves on Figs 8 distinct from the interacting knots‘ curves on Fig. 7, since these units, at reaching equal speeds, resonates, which increases size of the curves on Fig. 9). The rotating process in the loop of the harmonized speeds-information frequencies at different levels is analogous to the Efimoff scenario [40]. The loop could be temporal until the new formed IN triplet is memorized. The loop includes Borromean knot and ring, which was early proposed in Borromean Universal three-body relation. The multiple IN time-space information geometry shapes the Observer asymmetrical structure of cellular geometry (Fig. 10) of the DSS triple code, (Fig.9). Fig. 10. Structure of the cellular geometry, formed by the cells of the DSS triplet’s code, with a portion of the surface cells (1-23), illustrating the space formation. This structure geometry integrates information contributions modelling on Figs.3, 7. 23 The macroprocess integrates both imaginary entropy of the merging impulses micro processes and the cutoff information of real impulses, which sequentially convert the collected en tropy in information physical process during the macro -movement. The observation process, its entropy -information, and micro-macro processes are Observer -dependent, information of one Observer distinct of the information of other s Observers. However, the invariant information minimax law leads to the invariant information regularities for different Observers. Observing the same process with different probability field triple, each Observer gets specific information. The information requests its current IN during its optimal time -space information dynamics. Optimal information process determines the extremal trajectories of the entropy functional, solving the minimax variation problem for the observing process. The information macrodynamic equations [29-34] describe information macroprocess, whi ch averages all observing microprocesses and holds regularity of observations under the maxmin -minimax impulses. These equations predict optimal information path from the starting virtual observation up to information process, and the physical macrodynamics. 5. Forming structure of information Observer and its regularities The macro-movement in rotating time–space coordinate system forms Observer‘s information structure confining its multiple INs that determine the Observer time of inner communication with self –scaling of both requesting and accumulating information. Each Observer owns the inner time of information processing and the time scale of the required information (on the micro and macrolevels), depending on density of the IN nodes information. (5a). The current information cooperative force, initiated by free information, evaluates the observer‘s selective actions attracting new high-quality information. Such quality delivers a high density-frequency of the related observing information through the IN selective mechanism of the requested information. These actions engage acceleration of the observer‘s information processing, coordinated with new selection, quick memorizing and encoding each IN node information with its logic and space-time structure, which minimizes the spending information. It determines observer‘s self-organized feedback loop. The optimal criterion is growing quality of the observing information, collected by the IN, which selects the needed information that the observer acquires. (5b). The observer optimal multiple choices limit and implement the minimax self-directed strategy, which evaluates the amount of the information emanated from the IN integrated node that identifies the attracting cooperative force. (5c). The IN nested structure holds cooperative complexity [41] measuring origin of complexity in the interactive dynamic process cooperating doublet-triplets. Their free information anticipates new information, requests it, and automatically builds hierarchical IN with the DSS that decreases complexity of not cooperating yet information units. (5d). The information structure, self -built under the self-synchronized feedback, drives self -organization of the IN and the evolution macrodynamics with ability of its self-creation. 24 (5e). The observer cognition emerges from the evolution process, as evolving intentional ability of requesting, integrating, and predicting the observer needed information that builds the observer growing networks. The evolving free information builds the Observer specific time –space information logical structure that conserves its ―cognition‖. Such logical structure possesses both virtual probabilistic and real information causality and complexity, whose information measures the cognitive intentional actions. The rotating cognitive movement connects the impulse microprocess with the bits in macroprocess, composing the elementary macrounit-triplet, and then, through the growing IN‘s levels quality information, integrates multiple nested IN‘s information logic in an information domains. The observer‘s cognition assembles the common units through the multiple resonances at forming the IN -triplet hierarchy, which accept only units that each IN node concentrates and recognizes. The cognitive movement, at forming each nodes and level, processes a temporary loop (Fig.6) which might disappear after the new formed IN triplet is memorized. Along the IN hierarchy runs the distributed resonance frequencies spreading a chain of the loops. The chain rotates the thermodynamic process (cognitive thermodynamics) with minimal Landauer energy, which performs natural memorizing of each bit on each evolution level. The cognitive actions model the correlated inter-actions and feed-backs between the IN levels, which controls the highest domain level. Both cognitive process and cognitive actions emerge from the evolving observations, which maintain the cognitive functions‘ emerging properties and encodes the cognitive logic information language. 6. The emerging information Intelligence. The observer intelligence emerges on the path from staring observation, virtual observer, creation microprocess, bits, information macroprocesses, and nested networks (IN) with growing quality of information and the nested logic. These self-generate the observer selective actions, ability of their prediction, the IN concurrent renovation, and extension to complex self-built IN domains enclosing maximal quality of condense information and its logic. The self-built structure, under self-synchronized feed-backs, drives self-organization of the IN and evolution macrodynamics with ability of its self-creation. Within the evolving processes, integrating by the IN space-time coherent structure, emerges the observer cognition, which starts with creation elementary units of virtual observer holding a memory at microlevel. The coordinated selection, involving verification, synchronization, and concentration of the observed information, necessary to build its logical structure of growing maximum of accumulated information, unites the observer‘s selforganized cognitive actions performing functional organization. The functional organization of these intelligent actions spent on this action evaluate the memorized amount of quality information at each IN‘ ending hierarchical level. This functional organization integrates the interacting observers‘ IN 25 levels and domains in the observer IN highest (ending) hierarchical level. Maximal level measures maximal cooperative complexity enfolding maximal number of the nested INs structures, which memorize the ending node of the highest IN. The DSS helix structure (Fig.8) self-organizing the multiple local bits coding units, which encodes the observer triplet coding structure (Fig. 10), we call observer intelligence. The intelligence is an ability of the observer to build the informational networks and domains, which includes the cognitions. The ended triplet of observer hierarchical informational networks and domains measures level of the observer intelligence. All observers have different levels of intelligence which classify observer by these levels. The quality of information memorized in the ending node of each observer IN highest levels measures the observer information Intelligence. The cognitive process at each triplet level preempts the memorizing. An observer that builds maximum number of the hierarchical informational networks and domains has maximum intelligence. This observes have an imbedded ability to control other observers. The Observer Intelligence holds ability to uncover causal relationships enclosed in evolving observer networks and selfextends the growing quality information and the cognitive logic on building collective observer intellect. The intelligence of a multiple interactive observers integrates their joint IN‘s ending node. The Observer Cognition emerges in two forms: a virtual, rotating movement processing temporal memory, and the following real information mechanisms, rotating the double helix geometrical structure and memorizing it. The DSS concurrently places and organizes the observing information bits in the IN nodes, whose sequential knots memorize information causality and logic. The self-directed strategy develops multiple logical operations of a self-programming computation which enhances collective logic, knowledge, and organization of diverse intelligent observers. The EF-IPF measure allows evaluating information necessary to build a minimal intelligent observer. The increasing INs hierarchy enfolds rising information density which accelerates grow the intelligence that concurrently memorizes and transmits itself over the time course in an observing time scale. The intelligence, growing with its time interval, increases the observer life span. The self-organized evolving IN‘s time-space distributed information structure models artificial intellect, which we detail in Sec.8, where the specifics of cognition and intelligence are described. 7. The Observer individuality determines: -The probability field‘ triple observing specific set of probabilistic events that arise in emerging particular information observer; -Time of observation, measuring quantity and density of information of the delivered bits; -Cooperation the observing information in a limited number of the IN-triplet nodes and limited number of the observer‘s IN, which depends on individual observer selective actions [34]. -The selective actions define the cooperative information forces, which depends on the number of the IN nodes. The minimal cooperative force, forming very first triplet, defines minimal selective observer. 26 The individual ability for selection classifies information observers by levels of the IN hierarchy, time space geometrical structure, and inner time scale whose feedback holds admissible information spectrum of observation. The individual observer s INs determine its explicit ability of self-creation. - These specifics classify the observers also by level of cognition and intelligence. The information mechanism of building all observers is invariant, which describes the invariant equation of information dynamics following from minimax variation principle. 8. Information structure of artificial designed observer: the basic stages toward artificial brain Observers are everywhere, including people, animals, other species, multiple particles, and objects communicating and interacting between each other, accepting, transforming and exchanging information. In physics, elementary particles interact, starting four known fundamental interactions in Nature, which form interacting atoms, molecules, different intermolecular forces, chemical interactive reactions up to biological interaction building genetics of organisms. Biological interactions involve multilevel interspecies interactions in Ecology. Various interactive communications creates social interactions, mutual technological, economic and financial interactions. Interactive communication in different languages, computer interactive telecommunications, and Internet connect society, technology, business, science, education, and media. Prospective artificial intelligence-human interactions based on AI brain would generate future technology and societies. All these interactions simplify example with a rubber ball hitting ground and bouncing, which consists of inter-active yes-no (  ) actions. Term of information each of these observers understands differently. Whereas a single certain inter-action is a―Yes-No impulse known as a Bit, the elementary unit of information. There have been many study each observer‘s specific interactions; however, no one approach has ever unified the study of all their common information origins, regularities, and conditions of differentiation. This is the first approach to unify these studies aiming to understand common notion of information. Since the multiple observers interact through a manifold of such Yes-No actions, these interactive actions are random and their multiplicity generates a random multi-dimensional process. That‘s why retrieving the information units from this random process requires its observation. Searching information on Web, a potential observer of this information sends probing impulses and evaluates the interacting result by its probability of occurrences. (No material particles or ‗agents ‗participates in such observation.) More probable occurrence allows selecting the needed result estimating its certainty as observed information. 27 A simple example is observing some uncertain planet moving around a star. When probability of its observation increases, making a shot-film which brings the copy of that most probable observation. Such copy removes the observer uncertainty, while spending energy on the shot, which the copying film consumes. Then the film exposes a certain observation which, enclosing the spending energy brings the current information of the observing planet. Therefore, the probabilities that the observation process generates, are sources of a random uncertainty which, being removed, brings an equivalent certainty, or information about the observation process. Removing the uncertainty during natural interaction creates information as natural phenomenon of interaction. The observation, searching the information, interacts with the current observing probabilities sending multiple Yes-No probabilistic impulses to decreases the uncertainty of the observing probabilities until getting certain Yes-No impulse of elementary bit of the information. Such active observation builds its observation process through decreasing the random uncertainty by the probabilistic impulses, which observe the probabilities of random uncertainty. The active observation models a ‗virtual‘ observer whose increasing probabilistic impulses generate multiple bits of certain information observer. Our aim is the information observer emerging in observation self-encoding and integrating information codes in selfcreated space-time structure, which models AI brain information logic, cognition and intellect. 1. Probabilistic observation measured by discrete probabilistic impulses of the observing process Since the probabilistic observation runs the multiple interactive impulses, they are the probability impulses probing a random environment, which formally describes a random field of multiple interactions. The field of axiomatic probabilities defines mathematical triad: the sets of possible events, the sets of actual events, and their probability function. Each of this triad specifies the particular observer whose probability, belonging to the field, observes the current events. The multiple triads extend the impulses‘ probabilistic observation toward artificial brain emerging in the observations. According to formal theory of probabilities, the axiomatic probabilities are objective by definition, formalizing multiple experimental occurrences of each random event. In artificial observation, the probabilistic impulses can produce a random generator with the probabilities of chosen triad. Formally, a source of such discrete axiomatic probabilistic impulses is Kolmogorov 0-1 law probabilities, which generates the sequence of mutually independent variables of the events from the field triad. These no-yes probabilistic impulses interact with an observable random process in the field, which reflects by multiple yes-no impulses probabilities: a priory probability (before yes-action) and a posteriori probability (after yes-action) as the Bayes probabilities connecting a sequence of the impulses in an observing random process. Classical process, connecting multiple interacting impulses is Markov diffusion process, widely used in many physical, chemical, biological and many other observations and applications, 28 It allows assigning Markov process as the observable random process. The sequence of the probabilistic no-yes impulses of the random field initiates the Bayes probabilities within the Markov process, which self-observe the evolving Markov process inner probabilities generating the observing process. The sequential Bayes probabilities provide a virtual observation of the observable process as a virtual (potential) observer. These, also axiomatic probabilities have analogy with standard Bayes probabilities that evaluate the probability of a hypothesis by a priori probability, which is then updated through a posteriori probability of the evidence. Since the impulse probabilities start with specific triad within the random field, the initiated Markov process probabilities begin the observation process with the same triad. Multiple observing Markov processes start with multiple triads. In this probabilistic model, a potential observer of hidden (random) bits models Markov observing process located in the surrounded random field and therefore affected by the field‘s random impulses-frequencies. Since our Universe build multiple interacting processes, their running multiplicity is actual source of random field. In the formal probabilistic model, the axiomatic artificial probabilities objectively measure the observation process and build the observing process. The observing process starts observation with the specific field triad which spots the current observing environment enclosing the observing events. In the artificial observer, designing during the observation, these probabilities identify the multiple interacting events in the observable spot. The artificial designed observer generates the random yes-no impulses self-creating the observable process of its current environment, which self-builds the observing process of the hidden bits. The process probabilities identify the multiple interacting events in the observable spot, which finally measures the probability revealing the bits. The uncovered bits provide a future real code which generates that information observer. 2. Reduction of the observable process entropy under probing impulse and rising probabilistic logic Uncertainty of random events in the observable process evaluates logarithmic measure of the event‘s relative probabilities, which defines relative entropy. The events connect correlation along the observable process. Uncertainty of random events between the impulse yes-no probabilities identifies the relative probabilities‘ logarithmic measure which is a relative entropy of the probabilistic impulse. This entropy is immanent to probabilistic probing impulses interactive actions  in the observing process. The observable process correlation evaluates its time interval [36]. The correlation connection between the interactive actions  equivalent to time interval between these actions, which is the impulse‘ unit u k measure M [uk ] |1|M . Each No-probability of probing impulse virtually cuts this entropy and correlation in observable process. Within each interacting impulse, its step-down No-cutting action maximizes the cutting entropy, while its step-up Yes reaction, spending an entropy on this action‘ creation, minimizes the cutting entropy. That provides max-min principle for each impulse, and mini-max along the multiple observing impulses. 29 Between the No-Yes impulse actions, the maximal cutting No action minimizes absolute entropy that conveys Yes action (rising its probability), which leads to a max-min of relational entropy transferring the probabilities. In simple example with bouncing rubber ball, when the ball hits ground, the energy of this interaction partially dissipates that increases the interaction‘s total entropy, while the ball‘s following the reverse movement holds less entropy (as a part of the dissipated), leading to max-min entropy of the bouncing ball. Adding periodically small energy, compensating for the interactive dissipation, supports the continuing bouncing. As soon as the initial impulse 0-1 actions involve, the minimax principle is imposed along all impulse observation. This leads to reduction the observable process entropy under the multiple probing impulses that increase a posteriori probability in the observing process. The sequential a priori-a posteriori probabilities determine probabilistic causality along the observing process, which carries its probabilistic logic. (The hidden bit, covering this yes-no probabilistic causality, hides this probabilistic logic). The logarithmic ratio of those probabilities defines relational entropy which measures this logic for each impulse in the sequence. The observing process logic integrates entropy functional (EF) along trajectories of the Markov process, which measures the process integral entropy. The minimax principle formalizes its variation problem (VP), which, applying to the EF, allows analytically describing the observing process minimax trajectory as the extreme VP solution [27]. The solution brings invariant entropy increment for each discrete impulse, preserving its probability measure, and the impulse time interval measure |1|M  1Nat which is entropy equivalent of Nat. The EF connects the entropy with the process total time, which synchronizes and adjoins the local impulse time measure along the process in an absolute time scale. The impulse logical measure 1Nat includes logical bit, which measures f B  ln 2  0.7 Nat , while the difference in 0.3Nat carries a wide of the impulse Yes action transferring  0.05Nat to next impulse. That evaluates measure f l  0.3  0.05  0.25 Nat of the impulse free logic. Each of this logic originates from the observing impulse‘s relational Bayes probabilities reducing the entropy along the observation process and growing the correlation dependencies of the impulses in the observing process. The reduction of the observable process entropy under the observing probabilistic impulses determines the growing logical dependency of the impulses during the observation, which involves a virtual impulse‘ correlational attraction. The free logic, logically connecting the impulses, measures the virtual attraction, the growing correlation, and the increasing a posteriori probability logic of the observing process. Until this probability less than one, the probabilistic logic, even with growing this probability, is still uncertain (virtual). Closeness this uncertainty to certainty with the probability one measures particular relational probability and its entropy, which finalize the reduction of the uncertainty. 30 3. The emergence of space-time geometry in the impulse observing process. At growing Bayes a posteriori probability along observations, neighbor impulses  and  may merge, generating interactive jump  on the impulses border. The merge converges action with reaction, superimposing cause and effect and their probabilities. The merge squeezes to a micro-minimum the inter-action time interval, which initiates a microprocess on the bordered impulses. The jump increases the Markov process drift (speed) up to infinity which generates a high entropy density curving the correlation between these actions up to its dissolving-cut which virtually cuts the time measure of this correlation in an emerging ½ units of the bordered impulse. The dissolve correlation measures the orthogonal correlations. This jump, curving the time up to the related orthogonal correlation, rotates the impulse reaction  of ½ unit measure to its orthogonal displacement (Fig.1). The time measured action  of ½ units measure is the orthogonal displaced to second ½ unit u k within the impulse, becoming its orthogonal space impulse measure. This originates the curved space shifts, quantified by the impulse discrete probability‘ measure p[uk ] (1 or 0), which measures two impulse parts (units) including a counterpart to the primary curved time, Fig.1. Thus, the displacement within the impulse u k changes the impulse second ½ time to such discrete space shift which p[ uk ] preserves its measure M [uk ] |1/ 2  2 |   |1|M in the emerging time-space coordinate system. The measure is conserved in following time-space correlated movement transferring the minimax. Beginning the space more precisely starts on 1/ 2  0.159155 part of the impulse invariant measure  [33]. The curved impulse is measured by its curvature[34]. The virtual observer, being displaced from the initial virtual process, possesses the discrete time-space impulse which is sent as virtual probe. The observing probabilities define the probe‘ frequencies which self-test the preservation of axiomatic probability measure. (For example, by Bernoulli‘s formulas). The minimax observer is self-supporting the probes increasing frequencies, which are checking the probability grows. Such test checks this probability also via symmetry condition (imposed on the axiomatic probability) indicating the probability correctness (by closeness to the axiomatic probability). A temporary memorized current correlation encloses a difference of the starting and current space-time correlation, identifying the time-space of current location of the virtual observer. Sequence of Bayes priori-posteriori probabilities transfers their events‘ causal relationship along observation process in probabilistic logic. The impulses, cutting entropy, temporary memorize in their correlation the logic as a code of virtual observer. The rising time-space correlations memorize a time-space shape of the evolving observer. 31 The evolving shape gradually confines the running rotating movement, which self-supports developing both the curved shape and the observer time space geometrical structure. Such virtual Observer self-develops its space-time virtual geometrical structure during virtual observation, which gains its real form with sequential transforming the integrated entropy to equivalent information. 4. The impulse transformation of the observing process entropy to information. This transformations emerge during the interactive impulse observation, when a posteriori probability of a last probing No action of this impulse, cutting the final minimal entropy of the observation process, follows the Yes action of that impulse, which brings the posterior probability one, or certainty. The growing correlation of the observing interactive impulses interaction connects the impulse ending Yes action with the following opposite No action of the next interacting impulse in the virtual attraction. Interaction of the curving space-time impulses brings opposite topological curvatures: positive for Yes pushing action and negative for No opposite action, which creates topological anti-symmetrical transitive transformation. The interaction  of the impulse opposite curvatures creates topological anti-symmetrical transitive transformation. That transformation brings logical asymmetry which evaluates a part of logical bit entropy  0.0105Nat . Transferring probabilistic logic to certain logic covers a transitive barrier between entropy and information [120]. The opposite curved interaction of observing impulse with an external impulse brings the asymmetrical entropy which could overcome the barrier. The opposite curving impulses in the interactive transition require entropy ratio 1/ln2 to transfer entropy equivalent to the forming logical bit. The opposite curved interaction decreases difference in the entropies ratio on relative amount r0  (2ln 2  1) / ln 2  0.5573 (where 2ln 2 counts entropies for both impulse potential bits in the transformation, from which deduct the entropy measure I Nat of the transforming impulse). In process of the impulse interaction, part of the logical impulse i1  (1.44  ln 2)  0.5573  0.2452bit with ratio r0 identifies moment t1 following appearance of potential (previously hidden) logical bit. Since the entropy measure i1 evaluates the free logic in the curved interaction at moment t1  0.2452 /1.44  0.17 relative to the impulse invariant measure |1|M  1.44bit  1Nat . Interval t f  0.17 Nat measures the part of the impulse delivering free logic which creates asymmetrical logic in information bit. After interval t f follows interval t B  ln 2 /1.44  0.481352 Nat of appearance the logical bit which indicates a logical certainty of the observing hidden bit. This logical bit of the certain logic appears with the certain free logic, which 32 carries the certain logical attraction. The logical entropy bit becomes information bit through memorizing the antisymmetrical logic in information i13  0.0105  1.44  0.015bit The certain free logic evaluates i f  0.2452  0.015  0.23bit  1/ 3bit which appears on time interval t f 1  0.23 /1.44  0.1595 measured relatively to the impulse time interval in bit. Thus, from begging of the impulse, time interval t  0.17  0.481352  0.1595  0.811 appears that is evaluated relatively to the impulse interval measure |1|M . Interval t  deducts from the external impulse‘ measure |1|M the relative time interval ten  0.889  0.19 which estimates the interval needed for memorizing the logical bit. The observation process, reducing uncertainty of the random interactive process, concurrently integrates it in the maximal growing correlation which holding entropy equivalent of interval ten  0.19 temporary memorizes this logical bit. The certain logical bit becomes physical information bit through erasure the entropy of this logic, which allows replacing the logic by memorizing its bit. (The logical bit conceals hidden entropy which was carrying energy in initial real interactive process before it had covered by the entropy of the multiple random interactions.). Injecting energy equivalent to the integrated uncertainty-entropy removes this entropy on interval t B of creation the asymmetrical logical bit. Memorizing the asymmetrical logical bit erases the logical bit entropy. The memory of physical bit must be stored or placed in some physical entity, which performs encoding of the memorized bit by extracting it initial position. The physical reality of revealing the bit brings also its energy for potential erasing this entropy. Acquiring certainty-information from the entropy, satisfying the second law in an irreversible process, requires cost of the energy equivalent to that in Demon Maxwell. According to Landauer principle [38], any logically irreversible manipulation with information, such as encoding leads to erasure the information in a dissipative irreversible process. Erasure of information Bit requires spending minimal energy W  k B ln 2 ( k B is Boltzmann constant,  absolute temperature) which should be delivered outside by an environment. Therefore, the transformation of observing impulse entropy to information includes: getting the anti-symmetric logic, its memorizing through erasure, and encoding the memorized bit by storing its position in an environmental process impulse. This process needs energy for both getting the asymmetrical logical bit, memorizing it, and ending with the encoding bit. The observing virtual process ending with the minimal entropy is reversible and symmetrical, while both logical bit and physical bit is anti-symmetrical. The transitive opposite curving anti-symmetric interaction curries asymmetrical logic in its correlation with no actual cost. But, since this interaction reduces the anti-symmetrical entropy, getting the information anti-symmetric logic requires less energy for erasure than that memorizing bit. Below we estimate the components of this process. 33 The information logic covers time of encoding ien  1.44  1.23  0.21bit , where 0.21bit 1.44  0.3 Nat is transferred to a next interacting impulse, which is the equivalent to entropy e1  1  ln 2  0.3 Nat . Both the free information and that needed for encoding carry information logic which we call encoding logic. Since Landaurer energy allows memorizing only 1 bit, the free information currying the attraction and information cost of encoding are not becoming physical until the external impulse brings additional to Landaurer energy W  k B 0.44 . That adds cost w1  0.63478 of Landaurer‘ energy, whereas the encoding costs is w 2  0.2736 ; total additional cost is w  0.9 at the same temperature. This energy should be delivered on time interval t  0.17  0.64 whose start identifies the impulse interacting time transferring entropy e1 . The moment t1 ends the interval of the curved opposite interaction which adds interval~0.02 bringing total interval 0.19. Hence the moment of delivering total energy identifies a potential encoding time interval ending the internal impulse, which interacts with the external impulse through the opposite curvatures. Since the external process‘ movement within its impulse ends at the impulse step-up stopping states, the thermodynamic process delivering this energy should stop in that state. Hence, the erased impulse entropy memorizes the equivalent physical information 1.44bit in the impulse ending state, where the encoding stores this information. Such impulse starts producing the physical bit after the moment ending transitive logic and ends producing it by the moment ending delivering Landaurer energy. This time interval estimates ln2. The time intervals of memorizing free information and the encoding estimate accordingly t f 1  0.1597 and ten  0.19 . The free information can attract a next logical bit during which the first memorized bit is encoding. Such an attracting encoding can automatically produces the curving interaction of the next logical impulse with a next real environmental process since time interval of encoding equals to time interval of transitive curving. Such interaction starts producing the next physical bit after the moment ending the transitive logic, and ends producing it by the moment ending delivering Landaurer energy. That time interval also estimates ln2, while the time intervals of memorizing this bit‘s free information and the encoding estimate the same t f 1  0.1597 and ten  0.19 . From that follows necessity of proper concurrence of the time curse of the impulse inner and external impulses and coordination the sequence of the moment appearance bit, its memory, and encoding. These will allow consecutive integration of the process entropy and its transformation to process information. 5. Transformation of the integrated process entropy to the process integral information. Growing information density of the process impulses. The EF functional integrates the sequential Bayes probabilities of the observing impulses, which virtually observe and cut the observable process. The EF measures total process entropy as the process potential-prognosis integral information. 34 The minimax impulses process the observing process‘ time trajectories with emerging space-time trajectories. The VP for the EF analytically describes the minimax time-space extreme trajectory of the observing process. After the impulses of the EF integrated multi-dimensional process reach certainty, the impulses cut with maximal probabilities transforming each impulse entropy invariant measure to the equivalent information invariant measure. These multiple information impulses integrate information path functional (IPF) on a path through the discrete impulses‘ time–space information measures. The observing process probabilities approaching to its certainty measure automatically transform the EF virtual observing probabilistic multi-trajectories to the IPF information trajectories. Each curved impulse invariant time-space measure  encloses information measure 1Nat which includes bit, free information, and information needed for encoding. This free information between a nearest impulse bits attracts them with intensity~1/3 bit per impulse. The IPF integrates the bits with free information connecting the bits sequence. The minimax principle, applied along trajectory of the IPF information process, maximizes information enclosed in each current impulse, squeezes its time interval, while its growing attracting free information minimizes the time interval between the nearest impulses proportionally to 1/3bit. For each third impulse that interval of information distance becomes proportional to 1 bit, which is the information of invariant impulse with time-space measure  . Hence, each invariant impulse along the IPF extreme trajectory squeezes a proceeding impulses distance to hi   . The IPF extreme trajectory sequentially condenses the increasing information of each third following impulse that grows the information density of the invariant impulse. Free information of such impulse increases that intensifies information attraction between the invariant impulses in above proportion. By the end of the IPF integration, all integrated information is concentrated in a last impulse, whose information density approach maximal limit. Since free information encloses information logic, the multiple bits with triple growing density raise the process information logic. The IPF integral information with its logic is condensed in the last integrated impulse time –space interval volume. For multiple information impulses, each third curved impulse having invariant measure  appears in the information process with time frequency f i  ki , ki  3,5,7,9,... . Information time-space density DiI  ki Nat / vis , concentrating k i Nat for each third impulse, increases with growing k i while the time-space volume viS holds invariant measure. The invariant impulse time coordinate  i   / 2 , the flat surface space coordinate measure li  2 and orthogonal to them space coordinate space coordinate measure hi   determine impulse volume viS   i  li  hi   2 .That determines DiI  ki Nat /  2 . So, the current impulse time–space geometry encloses information, density and frequency, concentrating information logic and information of all previous impulses along the path. The EFextreme trajectories, starting from the multi-dimensional observing process, the EF-IPF transformation converts to the multi-dimensional orthogonal processes whose curved impulses hold the above information measures. 35 The EF-IPF space-time extremal trajectories rotates forming spirals located on conic surfaces Fig.3, which starts from virtual (entropy) process and continues as the information process. Since each bit of this trajectory creates the cutting entropy in the impulse observation, the trajectory consists of segments of information process dynamics and the between segments intervals delivering each following bit to the segment. On Fig.3 each segment starts on the cone vertex-point D and ends on the point D4 which connects to a vertex of the following cone. The observing bit is delivering at each cone vertex. The segment includes the impulse process with its logical bit, intervals of free logic and correlation connecting the nearest segment which temporary memorizes the segment logic. The logical and information dynamics describes the process of sequential logical interaction of such multiple impulses, rotating with information speed determined by the impulse density. The dynamics between the cone vertexes is reversible and symmetrical analogous to Hamiltonian dynamics. The logical anti-symmetry brings the anti-symmetrical logical bit prior to interaction with the external impulse which starts delivering the external energy. This bit is supplying at each cone vertex. After the external energy generates physical multiple bits, the physical information process starts. Starting this process follows the time interval t f  0.17 of the logical anti-symmetrical interaction. Since each impulse‘ curved measure  with its relative time interval t f appears in the information process with frequency f10   , the frequency of appearance this interval is f1  0.17 /     0.17 , which equals to frequency of encoding time interval ten . The frequency of spectrum 1  2 f1  1.068 identifies the time of opening supply an external energy, equal to the spectrum frequency of the encoding time interval. Time interval of memorizing the bit t B identifies the bit information measure ln 2 which is equivalent of invariant impulse part t B  ln 2 /1.44 or frequency of appearance that interval f B within the impulse. It determines frequency 2  2 f B  2 ln 2 /1.44  3.02   of spectrum {1 , 2 , 1}  o , o  (1.068,3.0.2,1.068) necessary for delivering energy memorizing and encoding the bit. Or these frequencies present spectrum o  {1, 28277,1}  1.068. Along the information process, this spectrum frequency is currying proportional to frequency f i  ki . After supplying the external energy during these time intervals, whose sum equals to the invariant impulse time interval, the whole impulse becomes the segment of physical information process. Therefore, physical dynamics describe the IPF extremal trajectory rotating on sequential cones (Fig.3). Each cone vertex encodes the bit memorized in a previous impulse-segement with frequency 1 , each current segment repeats with frequency  2 , and transfers to next cone its vertex with frequency 1 of encoding the current impulse bit. 36 Hence, each physical information impulse carries spectrum {121}  o , while their sequential pair on the trajectory carries spectrum impulses {1 , 2 ,[1  1 ], 2 ,[1  ...]}   .where [1  1 ] is the resonance frequency for two impulses whose distance is shortening on 1/3. That allows closely connecting the impulses in the resonance. Along the trajectory, each of these pairs appears with the growing frequency of the impulses appearance f io  1/ 3ki . Since these fixed time intervals t f , t B , ten are relative to the invariant impulse measure, they are repeating for each invariant impulse with the increasing information density and with growing frequency. Thus, along the extreme trajectory, each third impulse will {1 , 2 ,[1  1 ]t10 , 2 ,[1  1 ]t20 , 2 ,[1  1 ]t30 ,}  10 with time intervals | t10 , t20 , t30 | . . deliver triple These time intervals, being sequentially proportional to the impulse distance measuring in 1/3 bit proportion: 1/ ki to the invariant time measure of the impulse, are shortening accordingly t10 ~ 1/ 3 ~  / 3 2, t20 ~ 1/ 5 ~  / 5 2, t30 ~ 1/ 7 ~  / 7 2 are. It sequentially shortens the distance between the impulses on the extreme trajectory assembling each such three impulses in a triple of the resonance frequencies. 6. Self-forming triplet logical structures and their self-cooperation in information network (IN) hierarchical logic. In the multi-dimensional observing process, minimum of three logical bits with free logics can appear, which, attracting each other, would cooperate in a logical triple. Multiple probabilities of interacting impulses in this multi-dimensional process produce the numerous frequencies. Some of those, minimum of three, can generate the attractive resonance cooperating the triple. This triple logic starts temporary memorizing two sequential pair cross-correlations during in their time of correlation. That memorizes the asymmetrical logic in a locally asymmetric cross-correlation during the time of this process [230]. When this process is ending, the triple correlations temporary memorize the triple logical bits. According to [91] the minimal entropy of cross correlation ln2 can be memorized at cost of the equivalent minimal energy of logical bit. This is information cost of memorizing the triple logical bit which includes additional free logic. The attracting free logic of the emerging three logical bits starts the bits self-cooperation in the following sequence. The free logic of the emerging logical bit holding frequency  2 attracts next logical bits of toward a resonance with the equal frequency of next bit‘s free logic, assembling the two in joint resonance. This resonance process links these bits in duplets. The free logic from one bit out of the pair gets spent on the binding of the duplet. The free logic from the duplet‘ bit attracts the third bit and binds all three in a knot bit creating the triplet logical structure. The knot bit still has free information and it is used to attract a different bound pair of emerging bits, creating two bound triplets. This process continues creating nested layers of bound triplets, three triplets and more (Figs. 4-6). Hence the triplet logical structure creates the resonance frequencies of the attracting logic joining the triple bits. 37 The free logic attraction toward the triple resonance of their equal frequencies is core information mechanism structuring an elementary triplet. The trajectory of forming triplet describes the rotating segments of their cones (Fig.5), whose vertexes join the knot starting the base of the following cone. The knot frequency joins the cone vertexes in resonance along the cone base when the next spiral segment starts. It connects next triplet in the resonance and so on, creating the nested layers of logical space-time information network (IN), where the layers‘ knots hierarchy identifies the nested nodes of the IN hierarchy. Triplets are the basic elements that form a nested informational time-space network with a hierarchical structure. Each triplet unit generates three symbols from three segments of information dynamics and one when the segment attracting triple logic is binding in the logical triplet knot. These symbols can produce triplet code, while the knot logic symbol binds the triple code for a potential encoding all triple. The knot encoding will release its free information logic which transfers this triple code to next triplet node. Thus, the nodes logically organize themselves in IN code. The attracting free information in resonance of three bits frequencies creates the triplet information logical structure which carries the unbound free information logic including the encoding logic with related frequencies. The frequency of free information logic determines the moment of time when the external energy starts memorizing the bit. The frequency of the triple encoding logic determines the moment of time when the external energy starts encoding the knot triple code. The IN emerging logical structure carries the triple code on each node space time-hierarchy, and the last triplet in the network collects and encloses the entire network‘s information. The network, built through the resonance, has limited stability and therefore each IN encloses a finite structure. That‘s why the observing process self-builds multiple limited INs through free information of its ending nods. The final triplet in every network contains the maximum amount of free information. Because of this, the networks are self-connected through the attraction of their ended triplets. Even after each IN potentially loses stability evolving in a chaos, it possesses ability of self-restoration (Sec.7.5). The multiple INs self-cooperate in hierarchical domain, starting with the cooperation of each tree ended triplets‘ free information in a knot which joining this INs‘ triples in resonance. This IN ending knot‘s free information resonates with other three INs‘ ending free information,, forming triplet structure analogously to the core triplet. This high level triplet joins these three INs structuring in a next IN of the domain hierarchy. The hierarchical logical trajectory describes the space-time spiral structure (Figs.7,9), which also presents trajectory of information process evolving in observations. This hierarchy enables generating sequential triple code locating on the rotating trajectory of the cone vertexes, which are distributed at the different hierarchical levels of the multiple IN and the domain hierarchy. Such space-time code integrates the observing process in space-time information geometry of self-organizing observer. 7. Self-forming hierarchical distributed logical structure of cognition. The multiple moving INs, sequentially equalizing the speeds-frequencies of the nodes attracting information logic in resonance, assembles total observer logic. 38 This logic consists of the mutual attracting free information, which, sequentially interacting, self-organizes the cooperative logical rotating spiral loops enclosing all observing information. We call it observer cognitive logic, which encloses both probabilistic and information causalities distributed along all observer hierarchy. The logical functions of the self-equalizing free information in the resonance perform the cognitive functions, which are distributed along hierarchy of assembling units: triplets, IN nested nodes, and the IN ending nodes. These local functions self-organize the observer cognition. Assembling runs the distributed resonance frequencies spreading along this hierarchy. Since each unit, ending high level structure encloses all levels information logic, the unit‘ impulse invariant time-space interval, containing this information, concentrates more information density than the unit of lower level hierarchy. The attracting resonance frequencies of the attracting free information hold the cognitive logic loop, which includes local loops structuring local information units and self-creating the unit hierarchy. Thus, the frequency delivering spectrum {1 , 2 ,[1  1 ]t10 , 2 ,[1  1 ]t20 , 2 ,[1  1 ]t30 ,}  10 is increasing growing in the triple sequentially shortening intervals | t10 , t20 , t30 | for each i trajectory segment. We specify more details in the following propositions which are proved at the following conditions. The space-time spiral trajectory of the EF extremal (Fig.3) describes sequence of multi-dimensional curving rotating segments, representing interacting impulses of the observing process, which integrates the observing process‘ logic. Each segment‘ impulse has invariant entropy measure 1Nat moving along the trajectory and rotating the curved impulse invariant measure  , which includes time coordinate measure  i   / 2 , the flat surface space coordinate measure li  2 and the orthogonal to them space coordinate space coordinate measure hi   ; measure 1Nat includes the impulse logical bit ln 2 and free logic f li  1  ln 2  0.3 Nat , which holds asymmetric logic of such segment. The logic density per each third segment increases according to DiI  ki Nat / vis , where viS   i  li  hi   2 , ki  3,5,7,9 . The asymmetric logic divides the sequential segments by barriers, which transfer the between segments anti-symmetrical interaction with logic interval t f following interval t B of memorizing bit and interval ten of the free information ending the segment. Along the space-time trajectory, each sequential segment repeats this triple with invariant frequency spectrum {1 , 2 , 1}  o , o  (1.068,3.0.2,1.068) . Ratio of alternating bridge-middle part-bridge sequences along the segments on the trajectory identify the frequencies of this spectrum. Propositions. 1.Along each i -dimensional segment rotates three dimensional space wave functions, spinning like a top (Fig.A), with s rotating speed around each spiral cross-section  is  1[ square / radian] ,or  i o   / radian , and orthogonal to this 39 rotation space speed  ih  1[volume / radian] ,or  iho   / radian . The related frequencies of the orthogonal rotations h are  is   is / 2 ,  iso  1/ 2 and  ih   ih / 2 ,  i o  1/ 2 accordingly. Each i -dimensional segment cross-sectional rotation spreads the space rotation on space interval  of the segments invariant measure. The three-dimensional wave function distributes the space rotation along the segments trajectory with the above invariant speeds delivering the invariant spectrum {1 , 2 , 1}  o , o  (1.068,3.0.2,1.068) . These spectrum frequencies identifies the alternating ratio of bridge-middle part-bridge along each sequential segment. 2. Let consider i , i  1 , i  2 dimensional segments among the multi-dimensional rotating segments on the extreme trajectory, where each of these segment delivers the invariant spectrum {1 , 2 , 1}  o , o  (1.068,3.0.2,1.068) through the cross-section rotation that, speeding the space rotation, distributes the spectrum along each of threedimensional space of the i , i  1 , i  2 dimensional segments. Along the extreme trajectory, each segment of equal measure  has increasing density, which is proportional to the segments shortening intervals | t10 , t20 , t30 | (Sec.9.5.5) in their locations along the trajectory. The wave consecutive three-dimensional space movements sequentially picks segments i , i  1 , i  2 from each of these specific locations in these dimensions and simultaneously starts rotating each of them during interval | t10 , t20 , t30 | placed between segments i , i  1 , i  2 accordingly. The densities increase proportionally to the squeezing time interval measures along each of these dimensions trajectory. The first of the wave three-dimensional rotation moves i segment rotating during interval t10  1 (equivalent to space interval  with density proportional ki  1 ). The second of wave three-dimensional rotation moves i  1 segment during interval t20  1/ 2t10 (equivalent to space interval  with density proportional to ki  2 ). The third of wave threedimensional rotation moves segment i  2 during time interval t30  1/ 3 (equivalent to space interval  with density proportional ki  3 ). These three-dimensional movements repeat shortening these intervals for each triple segment with increasing frequency f i  ki , ki  3,5,7,... of growing information density along the trajectory. Since each of the segments deliver the equivalent spectrums, the equal frequencies of the sequential segment‘s spectrum {1 , 2 ,[1  1 ]t10 , 2 ,[1  1 ]t20 , 2 ,[1  1 ]t30 ,}  10 can be synchronized during these time intervals sequence. According to the proposition condition, the invariant spectrum frequency 1 repeats time interval t f of the logical antisymmetrical interaction on a bridge (Sec.5.4, Fig.4) separating i  1 and i segments on the trajectory, and the interval end indicates beginning of time interval t B on a middle of i segment repeating with frequency  2 . During time t B the segment bit is memorized. The end of t B end indicates beginning of time interval ten of free information logic, which 40 identifies the beginning of bridge separated i and i  1 segments. The free information attracts the separated segments. The sequentially squeezing segments‘ time intervals allows performing first double synchronization during interval t20  1/ 2t10 , and next double synchronizes during interval t30  1/ 3t23  t20  t30  1/ 2  1/ 3  1/ 6 . The sum t33  t20  t23  t30  1/ 2  1/ 6  1/ 3  1 equals to the first interval t10 , during which all two doublets are forming. Three segments finally deliver three memorized bits with their three free information intervals, which sequentially attract the synchronizing doublets during the rotation movement. The information attraction on these time intervals adjoins the synchronized intervals information in a triple during the i dimensional interval t10  1 . Forming the triplet completes free information which delivers each i  2 segment with triple frequency while holding the invariant spectrum. The delivering three ending free information join the tree memorized bits in a triple‘s knot where, during additional ~0.02 the free information interval, the bits encode in the triple. The frequencies of the shortening time intervals distribute the orthogonal space rotations along the segments of the multiple dimensional observing trajectory which is moving three dimensional space wave function for each of the this trajectory dimension. Each of the three dimensions‘ shortening time intervals, which the three-dimensional rotation moves, bring the triplet knot that joins that three-dimensions to one. The sequentially forming triple knots are squeezing the initial observing multi-dimensional process first to three-dimensional rotation and them up to a single dimensional information process encoding the bits of all multiple knots. Finally the periodical wave function includes the sequence of repeating arguments along both orthogonal rotations: ush  us  uh , f ws  { f iws }, f wh { f iws }, i  1,...n , which performs the multiple three-dimensional movement with three dimensional space wave functions the like a top (Fig.A) . The shape of the multiple wave functions describes the extreme multi-dimensional trajectory formalizing the minimax observation process which models rotating segments on cones (Fig.3).  Fig.A. Illustrative schematic of spinning top (from Google‘ top trajectory), where schematic bellow illustrates a rotating segment with bridge on the EF-IPF trajectory distributing the wave space –time movement. 41 The wave function frequencies and properties 1).The wave function with above speeds and frequencies emerges during the observation process when a space interval appears within the impulse microprocess during reversible time interval of  ok  0.015625 of the impulse invariant measure  equivalent to 1Nat [34]. Before that, the observing trajectory has described the probabilistic time function whose probability P*  0.821214 indicates appearance of a space-time probabilistic wave. During the probabilistic time observation, entropy of the Bayes priori-posteriori probabilities measures probabilistic symmetric logic of sequence of these probabilities Thus, wave function starts emerging in probabilistic observation as a probability wave in probability field. At beginning of the microprocess, the probabilistic wave measures only time of its propagation. 2). The asymmetrical logic emerges with appearance of free logic interval t f 1  0.1597  1/ 2 which, repeating with equal wave frequency  is indicates beginning of the interactive rotating asymmetry on a segment‘ bridge. From that, the observation logic on the trajectory becomes the asymmetric part of total free logic f li  1  ln 2  0.3 Nat . The asymmetric logical wave emerges. The asymmetric logic probability approaching p a  exp(2ho*1 )  0.9866617771 appears with the certainty-reality of observing the previously hidden asymmetrical bit. Such logic temporary memorizes the correlation with that probability, which carries a logical bit of the certain logic. Such certain logical bit may carry energy in real interactive process had covered by the entropy of the multiple random interactions of the Markov process. That is why a path to creation this bit includes an increment of the probability Pie  0.981699525437  0.9855507502  0.1118 starting injection of energy from an interacting impulse of the Markov process, Sec.3.5. Thus, the coming with the certain free impulse logic carries the certain logical attraction. Therefore, the wave function in the microprocess is probabilistic until the certain logical information bit appears. The certain asymmetrical logical bit become physical bit through erasure the entropy of this logic, which allows replacing the logic by memorizing its bit. 3). The wave function starts on the observation process which the EF minimax extreme trajectory prognoses, carrying the probabilistic wave transforming the observation process to certainty of real observation. The spinning movement of the space –time trajectory describes the invariant speed around the cross-section of its rotating impulses-segments, which spreads the invariant rotation space speed along the segments trajectory. The segments‘ invariant spectrum {1 , 2 ,[1  1 ]t10 , 2 ,[1  1 ]t20 , 2 ,[1  1 ]t30 ,}  10 repeats the triple frequencies of these three time intervals between. That shortens distance of the equal spectrum frequencies and assembles them in resonance creating joint logical structures-triplets units up to the IN hierarchies and domains. The frequency absolute maximum indicates a finite end of its creation. A minimal energy of the resonance supports the forming logical loop.  42 Distribution of the space-time hierarchy 1).The hierarchy of self-cooperating triplet‘s units distributes the space rotation emerging along the EF segments of the time-space extreme trajectory, where each third impulse progressively increases the information density measure of its bit in triple. The time-space hierarchy of the units starts with emerging in observation the symmetrical logic at appearance of space interval in the microprocess. This logic self–forms a hierarchy of the logical unit structures through the impulse‘ mutual attracting free logic which, sequentially attracting the moving unit‘ speeds, equalizes their frequencies in resonance that assembles the observer logic along the units hierarchy. 2).The hierarchy of the logical cooperating units becomes asymmetrical with appearance of certain logical bit on the extremal trajectory. The repeating free logic interval indicates the wave frequency 1  f i s  1/ 2 . The EF rotating trajectory of three segments equalizes their information speeds joining in the resonance frequency during the space rotation, which cooperates each third logical bit‘s segment on the trajectory and logically composes each triplet structure in the unit space hierarchy. 3).The appearance of the asymmetrical logical bit on the extreme trajectory indicates entrance the IPF information measure on its path to forming logical bit-ln2. The path starts on relative time interval t f  0.23 /1.44  0.1597 of the logical asymmetry, which identifies the segment bridge. During the triple impulses, the third time interval t3r  3t1r  3 / 2  0.477515 2 indicates the end of the triple cooperative logic, which builds the triplet knot. Forming the cooperative knot in the triplet needs a time interval during which the triple free logic binds in the triplet bit. The time interval of creating the bit approaches t B  ln 2 /1.44  0.481352 . The difference t B  3t3r  0.004 evaluates the time of binding the triplet. Thus, the wave space interval delivers the logical bit with wave spectrum frequency 2  2t B  2 ln 2 /1.44  3.02   , while the triplet knot repeats with spectrum frequency 20  2 3 / 2  3 . 4). Delivering external energy for memorizing the logical bit identifies relative moment t1  0.2452 /1.44  0.17 ending the interval of the asymmetry. The resonance frequencies of asymmetrical logic by this moment have already created. Along the IPF path on the trajectory, this moment follows interval t B of creation logical bit, ending the emergence of the knot that binds the free logic. The interval of memorizing physical bit requires the same interval t B during which the entropy of logical bit erases. The needed external impulse, erasing asymmetric logical bit, starts with interval t B and ends with interval of encoding the bit ten  0.19 . The external energy, supplied on time interval tb  0.481352  0.19  0.671352 , includes both erasure the logical bit and its encoding. Whereas interval of information free logic t f  0.23 /1.44  0.1597 is left for attracting a new bit, adding interval~0.02 of the opposite asymmetrical interaction. It brings total tbo  0.671352  0.02  0.691352  ln 2 or the interval of the external bit. 43 When this bit‘ free information starts encoding on interval ten  0.19 , interval 0.02 has been already spent. That reidentifies interval of this encoding teno  0.17 -the same as the external impulse interval of asymmetry. Therefore, the frequency spectrum, initiating the encoding, equals 1 in sequence {121} . This triple sequence identifies the segments alternating on the trajectory with the repeating ratio of bridge-middle part-starting next bridge. The ratio holds on the bridge relative interval ten  0.19  0.02  0.17 . Thus, the sequence of segments on the EF-IPF extreme trajectory carries its wave function‘ frequencies which selfstructure the space-time unit of logical bits‘ hierarchy that self-assembles the observer logic. The logic controls memorizing and encoding physical bits and the hierarchical structure of these units space-time information geometry. 5).The segments- impulses on the EF spiral trajectory sequentially interact through the frequencies repeating on the bridges time–space locations, which connect the segments in trajectory. The segments‘ sequence on the EF-IPF extreme trajectory (Figs.3, 4) carries its wave function‘ frequencies which self-structuring of the unit logical bit hierarchy that selfassembles total observer logic. This logic controls the memorizing and encoding both physical bits and their units‘ hierarchical structure.  The observer logical structure 1). The observer logical structure self–forms the attracting free information, which self –organizes hierarchy of the logical triplet units assembling in resonance frequencies. Each triplet logical structure models Borromean ring consisting of three topological circles linking by Brunnian link-loop. The spinning top space trajectory, FigA, as well as EF-IPF trajectory, includes a Borromean rings‘ chain modeling a distributed hierarchical logic. 2). The observer logical structure carries the wave along the trajectory‘ segments , where each third segment delivers triple logic of information spectrum {1 , 2 ,[1  1 ]t10 , 2 ,[1  1 ]t20 , 2 ,[1  1 ]t30 ,}  10 with sequentially shortening intervals | t10 , t20 , t30 | ,at tio / kio , kio  3,5,7,9 and the increasing segment‘s information density. Two sequential segments synchronize resonance frequencies [1  1 ]t10 and [1  1 ]t20 while the triplet synchronizes resonance frequency [1  1 ]t30 . This triple logic holds one bit in each observer‘s triplet logical structure unit. The sequential triplets‘ attracting free logic conveys that resonance spectrum with progressively shortening time intervals and growing their frequencies, which cooperate the logical units in IN nested hierarchy. The needed spectrum with the increasing frequencies automatically carries each consecutive segment along the EF-IPF trajectory. The emanating wave function delivers the frequencies cooperating a growing hierarchy of the logical units. The self-built hierarchy of the logical structures self-integrates the observed logic which the structure encloses. 3). The hierarchy of distributed logical loops self-connects logical chain. The logical chain wide determines the invariant impulse‘ relative interval 0.17 enclosing the assembled logical code. The growing density of consecutive impulses along the trajectory sequentially squeezes absolute value of this interval whose ratio preserves the invariant impulse. 44 The absolute time-space sizes of the logical chain are squeezing through the multi-level distributed hierarchy. 4).The logical chain rotation, carrying the frequencies of synchronized spectrum, requires a minimal energy to support the chain. This energy is equivalent to the logical bits code. The integrated chain logic holds this code. The observer logic chain synchronizes the triple rhythms along the EF-IPF trajectory in a melody. Or the hierarchical space-time chain harmonizes the melody of the rhythms.  Therefore, the wave function frequencies, initiating self-forming the observer cognition, emerges along the EF-IPF extreme trajectory in form of probabilistic time wave in probability field. The probabilistic impulse observation starts the microprocess, where entangled space rotation code develops the rotating space-time probability wave. The emerging opposite asymmetrical topological interaction shapes the space–time wave function, becoming certain, as well as the observer‘ cognitive logic. These results conclusively and numerically determine the structure and functions of cognition. 8. The multi-level self-encoding the hierarchical cognitive logic in intelligence code enclosing the Observer information geometrical structure. The self-organized hierarchy of distributed logical loops along the chain self-assembles multiple logical hierarchical units. The resonance frequencies, self-organizing the cognitive logic of the units, provide interactive actions attracting the impulses with an external energy. The attracting actions carry free logic of the assembling logical unit, which opens a switch-interaction with an external impulse carrying the Landauer‘s energy that starts erasing entropy and memorizing the information in its bit . The bit free information is encoding the memorized bit. Each memorized bits encodes its triplet space-time information structures cooperating in the units of INs hierarchy. The multiple units‘ bits hierarchy, integrating the local units‘ codes with the encoded triplet structures up to the highest level, self-organizes the observer space–time information geometry which structures the double spiral triplet code (DSS). The DSS integrates the observing process minimax impulses, the triplet codes‘ optimal structure‘ units, which enclose the structured units‘ bits energy. The DSS physical rotating helix structure, spinning physical wave function frequencies, self-organizing the multiple local bits coding units, encodes the observer triplet coding structure which we call observer intelligence. The logical switching of the free information at all hierarchical level performs the intelligence functions, which generate each local code. These functions are distributed hierarchically along the assembling logical units of the cognitive chain. The DSS encodes the triplet dynamics in information macrodynamic process which implements the observer encoding logic. The cognitive movement, beginning in virtual observation, holds its imaginary form, composing entropy microprocess, until the memorized IN bit transfers it to an information macromovement. That brings two forms for the cognitive helix process: imaginary reversible with a temporal memory, and real-information moving by the irreversible thermodynamics memorizing incoming information. These basics we detail below 45 The memorizing and encoding physical information structure of the unit space-time hierarchy 1).To memorize and encode the unit logical hierarchy in physical information structure, the observer logic provides the sequence of frequencies  and 1o along the chain according to growing the triple density for each current trajectory impulse. That identifies the sequence of the moments for entrance external information with energy for both memorizing the units hierarchy and its physical encoding. This sequence of frequencies is the same that hold the observer logic which delivers the observer logic minimal energy. The attracting free information of the memorized bit encodes the physical bits, connecting them, first, in the triplets, second, in the INs nested nodes, and then, in each IN ending triplet code. Therefore, along the observing trajectory emerges the triplet code through the sequence of segments whose frequency brings logical triple following its physical encoding. The cognitive process at each triplet level preempts the memorizing. 2).The spinning three-dimensional space wave functions‘ frequencies, synchronizing the segments, synchronize the triplet code in rotating spiral structure. The code, which the switching time clock synchronizes has rhythmical sequence of time intervals (windows) where each observer logical structural unit gets the needed external energy. The clock time course assigns the frequency through the repeating time intervals, which determine each local resonance frequency of assembling the structural unit. These frequencies-local rhythms identify the moments of ending interval of the free information at each unit level, or the interacting cognitive and intelligence local actions. 3).The code‘ free information holds frequency identifying moments of physical encoding the code multiple bits. This frequency is following from the integral cognitive logic chain which connects all local cognitive loops identifying the moments off of physical encoding each of the unit bits code. The final frequency of encoding high level physical bit brings free information that integrates energy of free information from units of local code bits. The high level coding bit, by the moment of encoding gets all physical energy necessary for the encoding. Thus each following unit frequency open widow for integral encoding all previous units‘ bits. Therefore, cognitive logic logically encodes intelligence of this logic. Each stable observer conserves its widows according to the variation law regularities. 4). Each bit, memorized in the conjugated interactive bridge (Fig.4, left), divides the trajectory on reversible process section, excluding the bit bridge, and the irreversible bridge between the reversible sections, on the triplet knot, located on the cone vertex. The information logical dynamics memorize as information physical dynamics in the double spiral structure (DSS). The observing process‘ impulse trajectory is realized as information dynamics which compose the triplet dynamics. The multiple triplet‘s build the DSS which memorizes the information dynamics. The EF-IPF optimal trajectory predicts the information dynamics and the observer optimal DSS, Fig.8, which encloses the predicting code hierarchy. The observer logical structure self-connects the local codes in the observer triplet DSS code, which encodes all these structures in the space-time information structure of information observer. The observer triplet code memorizes the observer cooperative information structure and enhances multiple rhythms of the local structural units. The DSS coding 46 structure memorizes total collected observer information quantity and quality, which determines the observer cooperative complexity. This coding structure, which self-organizes all assembled information, integrates function of cognition and intelligences. The EF-IPF observing process and information dynamics artificially design the DSS. 5). Multiple observations build numerous of such DSS space-time structures, which integrate in the information geometrical structure of Information Observer (Fig.10). 6).The quality of information, memorized in an ended triplet of the observer hierarchical informational networks and domains, measures level of the observer intelligence. Maximal level of the emerging intelligence measures maximal cooperative complexity, which enfolds maximal number of the IN nested structures, memorized in the ending node of the highest IN. Number of level limits the wave function‘s minimal space speed imposing the information limitation [34]. 7).All information observers have different levels of intelligence which classify the observer by these levels. 8).The multiple levels of the observer interacting logical and intelligent functions develop self-programming and computation which enhance collective logic, knowledge, and organization of diverse intelligent observers. The intelligent actions and the intelligence of different observers connect their level of knowledge, build and organizes the observers IN‘s information space-time logical structure. The highest level INs enfolds growing information density that expands the intelligence, which concurrently memorizes and transmits itself over the time course in an observing time scale. 9).The intelligence, growing with its time-space region, increases the observer life span, which limits a memory of the multiple final IN ending node in the extended region. 10).Since the multiple IN information is limited, as well as a total time of the IN existence, the IN self-replication arises, which enhances the collective's intelligence, extends and develops them, expanding the intellect's growth. 11).The self-organized trajectory with the wave functions, evolving IN‘s time-space distributed information structure, models artificial intellect. 12).The invariance of information minimax law for any information observer preserves their common regularities of accepting, proceeding information and building its information structure. That guarantees objectivity (identity) of basic observer‘s individual actions with common information mechanisms. The common mechanism enables creation of specific information structures for each particular observed information, with individual goal, preferences, energy, material carriers, and various implementations. 13).Multiple communications of numerous observers (by sending a message-demand, as quality messenger (qmess) [30, 33], enfolding the sender IN's cooperative force, which requires access to other IN observers allowing the observer to increase the IN personal intelligence level and generate a collective IN's logic of the multiple observers. This not only enhances the collective's intelligence but also extends and develops them, expanding the intellect's growth. 14).The artificial designed DSS information measures total IQ of this observer. Each particular observer DSS encodes its IQ. The difference of these IQs measures a distinctness of their intelligence. The maximal information, obtained in the observation, allows designating the maximal achievable IQ measures of optimal AI observer‘s DSS code designed by the EF-IPF‘ VP. The space-time information structure, encoding the EF-IPF integral 47 observed information (Fig.10), analytically designs the AI information observer. The observing information of a particular observer is limited by the considered constrains of this observation. The constrains limit conversion of observing process in the information process. The thresholds between the evolving stages of the observation limit the stages‘ evolution. The integral cognitive information and the following intellective actions limit the amount of free information reducing ability of making intelligent IN‘s connections.  . We believe the observer current mind is integrated information of causal logic distributed along the observer hierarchical levels, which is the integral of cognitive logic. The memorized mind integrates the physical DSS codes. That integral according to the VP enables prognosis new observation process which creates new logic and extended code intelligence that renews multiple observations developing evolving observer with its regularities and individuality. Finally, the intelligent observer has two main attributes: multi-levels cognition and intelligence. 9. How the interacting intelligence observers can understand meaning in each communication. When an intelligent observer sends a message, containing its information, which emanates from this intelligent observer‘s IN node, another intelligent observer, receiving that information, enables recognize its meaning if its information is equivalent to this observer IN nodes information quality satisfying coherence its cognitive logic. Since the DSS code is invariant for all information observers, each observer encodes its message in that coding language, whose logic and length depend on sending information, possibly collected from the observer–sender‘s different INs nodes. The observer‘s request for growing quality of needed information measures the specific qualities of free information emanating from the IN distinctive nodes that need the compensation. The observer request initiates recognition of the needed information which includes understanding of its meaning. That process comprises the following steps. 1). The IN node is requesting the needed quality by the Bayes high posteriori probability correlation (closed to certainty) which memorizes the message logical information making its temporary copy. 2). Copying logical information builds a temporary logical IN. The number of the IN nodes triplets enable adjoining and cohere in resonance is automatically constraining. 3).The forming temporary resonance structure-as a temporal cognition, initiates the requested IN nodes‘ high level probabilistic free logic, which allows involving the incoming copy in the observer cognitive logic. The copies mirror the transitive impulses providing asymmetrical free logic with t f intervals. 4).Each logic interval allows access an external impulse‘ interval t B , which, erasing the copy temporal logic, reveals its information bit by starting process of memorizing bit and its decoding. The decoding of this memorized bit holds interval ten . 48 5).The coherence of observer cognitive logic actually allows starting the decoding from a low level of the observer hierarchical structure if such structure needs updating information using its part of the frequency spectrum. The message information delivers the wave function frequencies along the observer space –time hierarchy. 6).The decoding finalizes the requested IN nodes whose acceptance of the message comparative qualities indicates its ability to cohere while cooperating the message quality with the quality of an IN node enclosed in the observer –receiver IN structure. 6). Since the acceptance of the message quality changes the existing observer logic encoded in the INs hierarchy, understanding the meaning of the message through its logic requires high level observer intelligent logic. The observer logic‘ coherence with the message logic permits memorizing and encoding the decoded message information. Delivering the message logic to the IN related observer logic needs a high frequency of the wave function spectrum, which generates the cognitive loop recognizing the message logic. The message recognition allows its memorizing and encoding in the IN hierarchy up to the observer coding structure. Accepting the message quality, the intelligent observer recognizes its logic and encodes its copying digital images in space codes, being self-reflective in understanding the message meaning. Therefore, the intelligent observer uncovers a meaning of communicating message in the self-reflecting process, using the common message information language, temporary memorized logic, the cognitive acceptance, logic of the memorized decoding whose coherence with intelligence observer cognitive logic permits memorizing and encoding the accepted message. Understanding the meaning of an observing process includes the coherence of its information with the observer current coding structure, which has integrated the observer created and evolved all previous observations, interactions, and communications. Multiple experimental studies [42-44] conclusively demonstrate that the large monopolar cell (LMC), the second-order retinal neuron, performs the cognitive model‘s main actions. The brain neurons communicate [44a] when presynaptic dopamine terminals demand neuronal activity for neurotransmission; in a response to depolarization, dopamine vesicles utilize a cascade of vesicular transporters to dynamically increase the vesicular pH gradient, thereby increasing dopamine vesicle content. That confirms the communication of interacting bits modeling the neurons. 10. How the intelligence code self-controls the observer physical irreversible processes. The distributed intelligence coding actions at each hierarchical level control entrance the needed external physical processes. The DSS encodes the triplet dynamics in information macrodynamic process which implements the observer encoding logic. 49 We assume the observer requests the needed energy to implement own actions from such levels of his hierarchical structure, which enclose the requested code. The request follows the same steps that perform communication, except encoding the levels‘ information macrodynamic in related physical irreversible thermodynamic. After the request approval from the observer cognition, the request interactive action attracts impulses with the needed external energy bringing entropy gradient dS / dx between the interactive actions‘ states dx . The gradient provides equivalent information force X  dS / dx . The impulse correlation determines` diffusion b .The force acting on the diffusion initiates thermodynamic flow (speed) I  bX of the needed external thermodynamic process. The thermodynamic process‘ forces and flows-speeds determine power through the process Hamiltonian H  X  I to physically implement the requested actions. The following observation of performance of these actions provides feedback to observer self-controlling the performance. 11. The observer regularities The observer regularity rises in impulse observation from the self-created virtual observer up to real observers, where each impulse is max-min action transferred to the following through mini-max action. This variation principle imposes information form of the law, which encloses the following regularities. The process extreme trajectory, implementing that law‘s mathematical form, releases these regularities in most general information form. The physical process on this trajectory is information macrodynamics in form of irreversible thermodynamics [121]. The observer evolution develops without any preexisting laws following each observer trajectory, which includes all its levels, stages and domains, and potential thresholds between them. The observer self-develop specific regularities in prolonging observation and self-evolution which self-creates a law with extending regularities. These abilities initiate the chain of virtual, logical, and information causalities, which extreme trajectory includes. Self-encoding information units in the IN code-logic and observer‘s computation, using this code, serves for common external and internal communications, allowing encoding different interactions in universal information language and conduct cooperative operations both within and outside the domains and observer. That unites the observers. The emergence of observer time, space, and information at multiple hierarchical levels follows the emerging evolution information dynamics creating multiple evolving observers with information mechanisms of cognition and .intelligence. The intelligent observers interacting through communication enable the message recognition, which involves cognitive coherence with the reading information, it selection and acceptance. The selective requirements and limitations on the acceptance are in [33,34].Therefore, the intelligent observer can uncover a meaning of observing process, or a message, based on the sequential memorized its observing information, which, moving in the rotating cognitive mechanism, gives start to a succeeding IN level that this meaning accumulates. The formal analysis shows that observer cognition and intelligence self –control the observer evolution [34]. 50 The numerical analysis [34] evaluates the highest level of the observer intelligence by a maximal quantity of potential accumulated information, which estimates the intelligence threshold.The intelligent observer (humans or AI) may overcome the threshold requiring highest information up to all information in Universe. Such an observer that conquers the threshold possess a supper intellect, which can control not only own intellect, but control other intelligent observers. 11. The information observer self-develops converting mechanism [34] that coordinates connection of the observer inner and external time, allowing transform the observing wave function to the observer inner processes. 12. The considered stages of artificial designed information observer open path toward artificial brain. The brain information physical structure models the DSS coding space-time rotating structure (Figs.4, 8-10) which is materialized through an advanced technological computation. The observer brain main information function: cognition and encoding integrates the distributed logical and intelligence actions. Multiple requests for the needed information extend number of the IN nodes which mixes the organized hierarchy growing in natural net. Both logical and intelligence distributed functions, which carry the multiple frequencies, have analogy with neural and nervous systems which materializes an advance electrical conducting system. Each material should satisfy propagation the optimal physical irreversible process trajectories, which, integrating the reversible segments, implement the described observer functions in observation. That includes selecting and getting information, cognitive logic, memorizing and encoding the intelligence code, distributing the cognition and intelligence, implementing others observer movements through power, forces, momentum, and flows of information physical dynamics and thermodynamics. 9. The Mathematical Basic of observer formalism includes: 1.Probabilities and conditional entropies of random events. 2.The integral measure of the observing process trajectories formalizes Entropy Functional (EF), which is expressed through the regular and stochastic components of Markov diffusion process. 3.Cutting the EF by impulse delta-function determines the increments of information for each impulse. 4.Information path functional (IPF) unites the information cutoff contributions taking along n dimensional Markov process‘ impulses during its total time interval. The Feynman path integral is quantum analog of action principle in physics, and EF expresses a probabilistic causally of the action principle, while the cutoff memorizes certain information casualty integrated in the IPF. 5.The equation of the EF for a microprocess under inverse actions of the interactive function , starting the impulse opposite time, measured in space rotating angle, which determine the solutions-conjugated entropies, entangling in rotation. The process conversion of entangled entropy in equivalent qubit and or bit. 51 6.The information macrodynamic equations whose information force is gradient of information path functional on a macroprocess‘ trajectories and information flow is a speed of the macroprocess, following from the Markov drift being averaged along all microprocesses, as well as the averaged diffusion on the macroprocess, and information Hamiltonian. These equations are information form of the equation of irreversible thermodynamics, which the information macrodynamic process generalizes and extends to observer relativity, connecting with the information curvature, differential of the Hamiltonian per volume, density of information mass, and cooperative complexity. The approach formalism comes from Feynman concepts that physical law regularities mathematically formulate a variation principle for the process integral. The variation problem for the integral measures of observing process‘ entropy functional and the bits‘ information path integral formalizes the minimax law, which describes all regularities of the processes. The theoretical concepts, which scientifically proves the mathematical and logical formalism allows uncovering these regularities. The results simulate mathematical models, which various experimental studies and applications confirm. The information observer with the regularities arises without any physical law. Significance of main finding: The composite structure of observer’s generated information process, including: 1. Reduction the process entropy under probing impulse, observing by Kolmogorov-Bayesian probabilities link, increases each posterior correlation; the impulse cutoff correlation sequentially converts the cutting entropy to information that memorizes the probes logic in Bit, participating in next probe-conversions; finding the curved interactive creation of Bit. 2. Creation wave function emerging in probabilistic observation whose frequencies self-forming the observer cognition, and the wave space distributes multiple bits hierarchy, becoming certain along with the observer’ cognitive logic. 3. Identifying this process stages at the information micro-and macrolevels, which govern the minimax information law, and revealing functional and space –time structures of cognition and intelligence and their mutual influence. 4. Finding self-organizing information triplet as a macrounit of self-forming information time-space cooperative distributed network enables self-scaling, self-renovation, adaptive self-organization, and cognitive and intelligent actions. 5. Finding information structure of artificial designed observer toward artificial brain. The results’ analytical and computer simulations validate and illustrate the experimental applications. Appendix I. The selected examples and reviews of the scientific investigations in different area of natural sciences illustrating the information regularities , and supporting the theoretical information results 1. General Physics 1.The physicists [45] demonstrate a first direct observation of the so-called vacuum fluctuations by using short light pulses while employing highly precise optical measurement techniques, proving no the absolute nothingness. The positive (red) and negative (blue) regions are randomly distributed in space and they change constantly at high speed. Vacuum is 52 filled with finite fluctuations of the electromagnetic field, representing the quantum ground state of light and radio waves in the quantum light field. The found access to elementary time scales is shorter than the investigated oscillation period of the light waves. It confirms the approach initial assumption of an initial random probability field, and an observer of this field should have a probabistic observation. 2. Gluons in Standard Model of Particle Physics exists only virtually mediating strong forces at interactions [46]; each carries combination of colors charges; whopping colors and holding two colors own at pair interactions; the increasing interaction forces conserve their shape like a string. Higgs particle also matched the probabilistic observation. The illustration [46] looks similar to our virtual processing. 3. In sub-Plank process [47], quantum sates, confined to phase space volume and characterized by `the classical action', develop sub-Plank structure on the scale of shifting-displacing the state positions to orthogonal, distinguishable from the unshifted original. The orthogonality factor moves classical Plank uncertainty in random direction, which reduces limit of a sensitivity to perturbations. It relates to origin of the structure of virtual observer (Sec. I). 4. Measurement the probability distributions for mapping quantum paths between the quantum states [48] ―reveals the rich interplay between measurement dynamics, typically associated with wave function collapse, and unitary evolution of the quantum state as described by the Schrödinger equation‖. The wave function collapse only in final measurement. The measurement starts with time distributed ensemble trajectories whose rotation in the waveguide cavity produces a space coordinate to the ensemble. 5. Study the non-equilibrium statistical mechanics of Hamiltonian systems under topological constraints [49] (in the form of adiabatic or Casimir invariants affecting canonical phase space) reveals the correct measure of entropy, built on the distorted invariant measure, which is consistent with the second law of thermodynamics. The decreasing entropy and negative entropy production arises in arbitrary a priori variables of the non-covariant nature of differential entropy, associated with time evolution of the uncertainty. Applying Jaynes' entropy functional to invariant entropy measure requires Euler's rotation with angular momentum identifying appearance of the Cartesian coordinate which satisfies the topological invariant. These results agree with the applied EF functional, invariant measures of impulse‘s entropy, and appearance of space coordinate in the rotation preserving the impulse measure (Secs.I-II). From [49a] it follows: ―The Japan Sea wave statistics of the entropies has a more pronounced tail for negative entropy values, indicating a higher probability of rogue waves‖. Experiments [49b] confirms our results of tracing quantum particle by observing wave function probabilities. Paper [49c] experimentally confirms our results regarding the wave function’s propagation with frequencies, which are inside the range frequencies found experimentally. 2. Neural Dynamics. Integrating an observing information in neurodynamics In [50] we have analyzed the selected multiple examples and reviews of different neurodynamic processes. Here we add some recent results, studying the following publications. 53 1. According to [51], ―Recent discussions in cognitive science and the philosophy of mind have defended a theory according to which we live in a virtual world .., generated by our brain…‖; ―this model is perceived as if it was external and perceptionindependent, even though it is neither of the two. The view of the mind, brain, and world, entailed by this theory has some peculiar consequences‖… up virtual brain thoughts. Experimental results [50] show that Bayesian probabilistic inference governs special attentional belief updating though trials, and that directional influence explains changes in cortical coupling connectivity of the frontal eye fields which modulate the ―Bayes optimal updates‖. The frequency of oscillations which "strongly modulated by attention" causes shifts attention between locations. Neurons increasingly discriminate task-relevant stimuli with learning, modify sensory and non-sensory representations and adjust its processing preferring the rewarded stimulus. This causal stimulus-response, reflecting anticipation choices, predicts the features of observer formalism. Brain learns distinction between what is important and what is not, discriminating between images and optimizing stimulus processing in anticipation of reward depending on its importance and relevance. 2. Existence of DSS' triple code confirms [52], uncovered that a neuron communicates by a trinary code, utilizing not only zeros and ones of the binary code but also minus ones. The experiment [53] provides ―evidence for the analog magnitude code of the triple -code model not only for Arabic digits but represents ―semantic knowledge for numerical quantities...‖ Results [54] demonstrate decreasing entropy in brain neurodynamic for measured frequency spectral densities with growing neurodynamic organization. Influence of rhythms on visual selection report results [55]. 3. Importance of decisional uncertainty in learning focuses results [56], where stimulus-is an impulse, decision–getting information, greater distance-more probability-closer to information, comparing that to correct choice. Evidence from experiments [57] show that ―specific region of the brain appears essential for resolving the uncertainty that can build up as we progress through an everyday sequence of tasks, a key node in a network preventing errors in keeping on track. Study [58] shows how learning enhances sensory and multiple non-sensory representations in primary visual cortex neuron. 4. Paper [59] describes how to build a mini-brain which is not performing any cogitation, but produces ―electrical signals and forms own neural connections -- synapses -- making them readily producible test beds for neuroscience research‖. 5. Author [60] proposes that all cells are comprised of series of highly sophisticated ―little engines‖ or nanomachines carrying out life‘s vital functions. The nanomachines have incorporated into a single complex cell, which is a descendant of a three-stage combination of earlier cells. The built complex signaling networks (Quorum Sensing) allowed one microbe to live inside and communicate with its host, forming a binary organism. Third entity, a bacterium that could photosynthesize, gained the ability to synchronize its mechanism with the binary organism. This ―trinity organism‖ became the photosynthetic ancestor of every plant on earth that have driven life since its origin. "Resulting complex nanomachine forms a ‗Borromean photosynthetic triplet‘. 6.Analysis of all selected multiple examples and reviews of different neurodynamic processes, substantiates that our approach‘ functional regularities create united information mechanism, whose integral logic self-operates this mechanism, transforming multiple interacting uncertainties to physical reality-matter, human information and cognition, which originate the observer information intellect. The information mechanism enables specific predictions of individual and 54 collective functional neuron information activities in time and space. Neurons‘ microprocesses retrieve and external information, including spike actions, related to the impulses, which generate the inner macrodynamics. The identified cooperative communications among neurons assemble and integrate their logical information structures in the time-space hierarchy of information network (IN), revealing the dynamics of IN creation, its geometrical information structure, triplet code, and limitations. The found information forces hold a neuron's communication, whose information is generated automatically in the neuronal interactions. Multiple cooperative networks assemble and integrate logical hierarchical structures, which model information brain processing in self-communications. The information mechanism‘s self-operating integral logic reveals: the information quantities required for attention, portioned extraction, its speed, including the needed internal information dynamics with the time intervals; the information quality for each observer's accumulated information by the specific location within the IN hierarchical logic; the information needed for the verification with the digital code, generated by the observer's neurons and their cooperative space logic; the internal cooperative dynamics build information network (IN) with hierarchical logic of information units, which integrates the observer required information in temporary build IN‘s high level logic that requests new information enclosing in the running observer‘s IN. The IN nodes enfold and memorize its logic in self-forming cooperative information dynamical and geometrical structures with a limited boundary, shaped by the IN-information geometry; the IN hierarchical locations of the nodes provide measuring quality of information, while the IN-ending node memorizes whole IN information. The IN operations with the sequentially enclosed and memorized information units perform logical computing using the doublet-triplet code; the cooperative force between the IN hierarchical levels selects the requested information as the observer‘s dynamic efforts for multiple choices, needed to implement the minimax self-directed optimal strategy. The information quantity and quality, required for sequential creation of the hierarchical INs values, self-organize brain cognitive and intelligence action, leading to multicooperative brain processing and extension of intelligence. 3. Self-organizing dynamic motion of elementary micro- and macrosystems 1. The experiments and computer simulations of collective motion exhibit systems ranging from flocks of animals to selfpropelled microorganisms. The cell migration established similarities between these systems, which illustrates following specific results. The emergent correlations attribute to spontaneous cell-coupling, dynamic self-ordering, and selfassembling in the persistence coherent angular motion of collective rotation within circular areas [61]. The persistence of coherent angular motion increases with the cell number and exhibits a geometric rearrangement of cells to the configuration containing a central cell. Cell density is kept constant with increasing the cell number. The emerging collective rotational motion consists of two to eight cells confined in a circular micropatterns. The experimentally observed gradual transition with increasing system size from predominantly erratic motion of small cell groups to directionally persistent migration in larger assemblies, underlining the role of internal cell polarity in the emergence of collective behavior. For each nucleus, the angular position was evaluated respectively to the circle center, and angular 55 velocity is normalized and averaged over the individual angular velocities of the N-cell system. Circle size increases in such a way that the average area per cell is constant at approximately 830 μm2. Probability distribution of the mean angular velocity for systems containing two to eight cells is fitted by a single Gaussian and their mixture is two Gaussians. For all N cells, the probability distribution displays symmetry breaking into clockwise and counterclockwise rotations. Both directionalities are almost equally represented, with a small bias towards clockwise rotation. Average mean squared displacement indicates ballistic angular motion for all cell numbers, while the averaged the displaced intervals of nucleus exhibited diffusive behavior. Both experiments and simulations showed consistently that the persistence of the coherent state increases with the number of confined cells for small cell numbers but then drops abruptly in a system containing five cells. This is attributed to a geometric rearrangement of cells to a configuration with a central only weakly polarized cell. It reveals the decisive role of the interplay between the local arrangement of neighboring cells and the internal cell polarization in collective migration. The similarities suggest universal principles underlying pattern formation, such as interactions rules [62-66], the systems‘ generic symmetries [67-69]. 2. Confinement stabilizes a bacterial suspension into a spiral vortex 1).‗Enhanced ordering of interacting filaments by molecular motors [70] demonstrate the emergence of collective motion in high-density concentrated filaments propelled by immobilized molecular motors in a planar geometry‖. At a critical density, the filaments self-organize to form coherently moving structures with persistent density modulations. The experiment allows backtracking of the assembly and disassembly pathways to the underlying local interactions. The identified weak and local alignment interactions essential for the observed formation of patterns and their dynamics. The presented minimal polar-pattern-forming system provide new insight into emerging order in the broad class of bacteria and their colonies [71-74], and self-propelled particles [75-79]. 2). Confining surfaces play crucial roles in dynamics, transport, and order in many physical systems [80-83]. Studying [84] the flow and orientation order within small droplets of a dense bacterial suspension reveals the influence of global confinement and surface curvature on collective motion. The observing competition between radial confinement, selfpropulsion, interactions, other induces a steady single-vortex state, in which cells align in inward spiraling patterns accompanied by a thin counter rotating boundary layer. 3).The cited experiments validate: ―spontaneous cell-coupling, dynamic self-ordering, self-assembling in the persistence coherent angular motion of collective rotation within circular areas‖, the displacement in angular motion with diffusive behavior of displaced intervals, emergence of collective order confined on a curved surface, others. 4). According to recent discovery [85], ―the protein stable shapes adopted by a few proteins contained some parts that were trapped in the act of changing shape,the changes relate to how proteins convert from one observable shape to another‖. From the process of RNA translation of DNA triplets to enzymes and aminoacids, all proteins start as linear chains of building blocks and then quickly fold to their proper shape, going through many high-energy transitions to proteins multiple biological functions. 56 4. Experimental results, encoding, and practical implementations. Last theoretical results [86-88] and many previous [30,31,33,34] confirm the following applications. Natural increase of correlations demonstrates experimental results [89], [90]. Coding genetic information reveals multiple experiments in [91], [92]. Experimental coding by spiking neurons demonstrates [93]. Evolutions of the genetic code from a randomness reviews [94]. That supports natural encoding through the cutting correlations and physically verifies reliability of natural encoding information process. The impulse cut-off method was practically applied in different solidification processes with impulse controls‘ automatic system [95]. This method reveals some unidentified phenomena-such as a compulsive appearance centers of crystallization indicators of generation of information code, integrated in the IPF during the impulse metal extraction (withdrawing). (In such metallic alloys, the ―up-hill diffusion, creating density gradients, is often observed‖ [95]). The frequency of the impulse withdrawing computes and regulates the designed automatic system to reach a maximum of the IPF information indicators. (The detailed experimental data of the industrial implemented system are in [95] and [96]). The automatic control regulator in the impulse frequency cutting movement was implemented for different superimposing electro-technological processes [97] interacting naturally. The comparative experimental results [98] confirm that advanced chemical- thermodynamic description of casting process coincides with information description by the IMD. Moreover, the IMD solutions leads to the optimal casing process. [99]. The automatic computer system, controlling horizontal casting process, have been implemented in the casting factory [100]. Examples of the method applications in communications, biological and cognitive systems, others are in [101], [102] and [103]. Retinal Ganglion Cells are the Eyes discrete impulse receptors interacting with observations and generating information which transmission integrates [104]. Encoding through natural chemical reactions connecting chemical molecules are in [105]. Experiments [106] confirm encoding coherent qubits in spinning electron locked in attractive ―hole spin‖. Other examples are quantum solar dots of semiconducting particles using for the information coding, retrieving images and encoding quantum information [107109]. Natural Encoding of Information through Interacting Impulses published in [110]. Applications in biology, medicine, and economics along with related theoretical results are in [111-119]. I. The computer restoration and simulation of the information model 1. The structure of computer procedure The diagrams, implementing the procedures of the model restoration and simulation of its performance, are shown on Figs.11.1a,11.1b, and 11.1c. On Fig.11.1a, the statistical data from the microlevel process xt are used to identify matrix A of the 57 macrolevel equation by computation of the correlation function and its derivative during each discrete interval ti , which compose the computed invariant a ( ) . ti r(t) ti x (t) A (x+v) A r(t) v(t ) a x(t) i x (t) ~ x(0) Fig 11.1a. Diagram of computation of the optimal model's process by calculating the correlation function u (t) v(t i) x (t) ~ v(t i) x(t)  xi (t,l,u(ti )) , using the microlevel's random process x˜ (t) r(t) its derivative r(t ) ; the object macrooperator A , invariant a, discrete interval ti ; these allow simulating the optimal macroprocess x(t) , the inner vi (ti ) and output ui (ti ) optimal controls. the inner vi (ti ) and output ui (ti ) optimal controls. i (t i ) S S F F n k invar li i (t i ) x i(t) ti ti v(t i) u (t i ) u (t i ) i (t i) x i(t) x[t,l,u(t)] Fig.11.1b illustrates the scheme of computation of the optimal model's process information S per cross-section x(t)  xi (t,l,u(ti )) , F , the model's invariants INVAR, the time ti the model differential operator, and simulates the inner and space li using a given space distributed discrete intervals, eigenvalues  i (ti ) of vi (ti ) and the output ui (ti ) optimal controls. The methodology is based on the connection of the model macrodynamics with the corresponding information geometry [29,86,89,111-119]. In this case, the microlevel stochastics are not used for the macromodel‘s restoration. Instead, the restoration requires the computation of the model‘s basic parameters: dimension n , uncertainty  , and the curvature‘s indicator k ; which allow finding the model optimal macroprocess, the synthesized optimal control, as well as the model‘s hierarchy. The computation uses the primary parameters of a basic model (n o ,  parameters of the object‘s geometry. 58 o ,k o ) and the known n n x i(t) ui (t) i (t i ) invar k tT li , vi T tT tC li vi tC tT T C T T ki C (t ,t ) k0 T T C F* o R R C(k i) T d(C) C(k 0) C (t) ki C T C dt 0 k0 S C (t,k) C n0 MC ti C T k C(k i) ki km (k m ) Ro Grad xi (t) ui (t) i (t i ) X/ Center Coordinates xi [ (k),t i,t] R0 S invar R S a=d i0t i a0=di t i x i /x0 ,x i <x 0 x i /x0 ,x i >x 0 t 2 /t1 t 3 /t1 X L 1 = x (2k+2),0 (2k+2),0 /x (2k+1),0 X L2 = (2k+3),0 x (2k+3),0 /x (2k+2),0 Fig.11c. Diagram Fig.11.1c. presents the functional schema of the IMD software operations: computing invariants INVAR, discrete moments ti , space coordinates li , increment of volume vi , MC-complexity function, speeds CT ,C and their difference d(C) , the current space parameters ki , polar coordinates  , and gradients GRAD X /  for a given space distribution‘s cross-section F*; with calculating its radius R , coordinates of center O- Ro , and a square S , which are used to compute the object space model‘s minimal (optimal) parameter k m . The output variables are: optimal dynamic process xi (t) , optimal controls ui (t) , eigenvalues  i (ti ) of the model differential equation, distributed space-time process xi ( (k),ti ,t) , space‘s current speed C T ( tT ,tc ) with the intervals of  moving tT and stopping tc , which are computed by averaging a speed CT dt . An estimated time of computation for each of the diagrams is approximately 3-5 minutes on conventional PC. The computation can be performed during a real–time movement of the object‘s cross section (Fig.11.1b), or through an input of the calculated object‘s current statistics (Fig.11.1a). Solving the considered complex problem in a real-time by traditional computation methods requires the developing of mathematical methodology and the software, which are able to overcome the method‘s high computational complexity. For solving even, a part of the problem, the existing techniques require many hours‘ computation on the modern main frames. 59 2. Structure of the IMD Software Package The software package transfers the IMD analytical methodology into the numerical procedures, computer algorithms and programs. The packet (consisting of 35 programs) includes the following modules for computation of:       the identification procedure for the restoration of the object's equations; the parameters of space–time transformations and a time-space movement; the OPMC parameters, processes, controls, and the IN structure; the function of macrosystemic complexity; the transformation of the informational macromodel's characteristics into the appropriate physical and technological variables (using the particular applied programs). The main software modules compute: the basic optimal macromodel parameters (n,  ,k);  the spectrum of the model‘s eigenvalues {io }, io   io  j io , i  1,..., n ;  the macromodel informational invariants a o ( )   io ti , b o ( )  ioti ;  the time-space intervals (ti , li );  the distribution of the optimal eigenvalues i (ti , li ) and the optimal controls vi (ti , li ) ;  the geometrical macromodel‘s coordinates and the space distributed macroprocesses xi (ti , li ) ;   the procedure of the macrocoordinates‘ cooperation and aggregation; the IN hierarchical macromodel structure and its macrocomplexity. The formulas, algorithms, complete software, and numerical computation‘s equations are given in the program package [121] (not included in this description). The IMD software programs have been used for the practical solutions of the different applied problems including [99,103, 111-116]. References 1. Bohr N. Atomic physics and human knowledge, Wiley, New York, 1958. 2. Dirac P. A. M. The Principles of Quantum Mechanics, Oxford University Press (Clarendon), London/New York,1947. 3. Von Neumann J. Mathematical foundations of quantum theory, Princeton University Press, Princeton,1955. 4. Wigner E. Review of the quantum mechanical measurement problem. In Quantum Optics, ExperimentalGravity, and Measurement Theory. NATO AS1 Series: Physics, Series B, 94, 58, Eds. P. Meystre& M. 0. Scully, 1983. 5. Wigner E. The unreasonable effectivenss of mathematics in the natural sciences, Communications in Pure and Applied Mathematics, 13(1), 1960. 6. Bohm D.J. A suggested interpretation of quantum theory in terms of hidden variables. Phys. Rev. 85,166–179, 1952. 7. Bohm D. J. A new theory of the relationship of mind to matter. Journal Am. Soc. Psychic. Res. 80, 113–135, 1986. 8. Bohm D.J. and Hiley B.J. The Undivided Universe: An Ontological Interpretation of Quantum Theory, Routledge, London, 1993. 60 9. Eccles J.C. Do mental events cause neural events analogously to the probability fields of quantum mechanics? Proceedings of the Royal Society, B277: 411–428, 1986. 10. Wheeler J. A. On recognizing ―law without law.‖ Am. J. Phys., 51(5), 398–404,1983. 11. Wheeler J. A., Zurek W. Ed. Information, physics, quantum: The search for links, Complexity, Entropy, and the Physics of Information, Redwood, California, Wesley, 1990. 12. Wheeler J. A. The Computer and the Universe, International Journal of Theoretical Physics, 21(6/7): 557-572, 1982. 13. Wheeler J. A. and Ford K. It from bit. In Geons, Black Holes & Quantum Foam: A life in Physics, New York, Norton, 1998. 14. Wheeler J. A. Quantum Mechanics, A Half Century Later Include the Observer in the Wave Function? Episteme 5:1-18, 1977. 15. Einstein A., Podolsky B., and N. Rosen N. Can Quantum-Mechanical Description of Physical Reality be Considered Complete? Phys. Rev. 47(10), 777-780. 1935. 16. Penrose‘s R. Fashion, Faith and Fantasy in the New Physics of the Universe, Princeton University Press,2016 17. Weinberg S. The Trouble with Quantum Mechanics, with J. Bricmont and T. Maudlin, in Steven Weinberg and the Puzzle of Quantum Mechanics, The New York Review of Books, April 6, 2017. 18. Tong D. Quantum Fields: The real building blocks of the Universe, The Royal Institution, Cambridge, 2017. 19. Von Baeyer H.Ch. Quantum Weirdness? It's All In Your Mind. A new version of quantum theory sweeps away the bizarre paradoxes of the microscopic world. Quantum information exists only in your imagination, Scientific American, 47-51, 2013. 20. Kolmogorov A.N. Logical basis for information theory and probability theory, IEEE Trans. Inform. Theory, 14 (5): 662– 664, 1968. 21. Shannon C.E. , Weaver W. The Mathematical theory of communication, Univ. of Illinois Press, 1949. 22. Kullback S. Information theory and statistics, Wiley, New York, 1959. 23. Jaynes E.T. Information Theory and Statistical Mechanics in Statistical Physics, Benjamin, New York, 1963. 24. Jaynes E.T. How Does the Brain do Plausible Reasoning?, Stanford University, 1998. 24A. Feynman R.P. The character of physical law, Cox and Wyman LTD, London, 1965. 25. Lerner V.S. Dynamic Model of the Origin of Order in Controlled Macrosystem. Bk.Thermodynamics and Regulation of Biological Processes, Walter de Gruyter & Co.Berlin- New York :383-397, 1984. 26. Lerner V.S. Macro systemic Approach to Solution of Control Problems under Condition of Indeterminacy, trans. by Scripta Technical, Inc.: 43-51, from Automation, Kiev, 1988, No.5. 27. Lerner V.S. Mathematical Foundation of Information Macrodynamics, J. Systems Analysis-Modeling-Simulation, 26,:119184,1996. 28. Lerner V.S. Information Systems Theory and Informational Macrodynamics: Review of the Main Results, IEEE Transactions on systems, man, and cybernetics—Part C: Applications and reviews, 37 (6):1050-1066, 2007. 29. Lerner V.S. Information Path Functional and Informational Macrodynamics, Nova Science, New York, 2010. 30. Lerner V.S. An observer‘s information dynamics: Acquisition of information and the origin of the cognitive dynamics, J. Information Sciences, 184: 111-139, 2012. 61 31. Lerner V.S. The boundary value problem and the Jensen inequality for an entropy functional of a Markov diffusion process, Journal of Math. Anal. Appl., 353 (1), 154–160, 2009. 31a. LernerV.S., Solution to the variation problem for information path functional of a controlled random process functional, Journal of Mathematical Analysis and Applications, 334, 441-466, 2007. 32. Lerner V.S. The Impulse Interactive Cuts of Entropy Functional Measure on Trajectories of Markov Diffusion Process, Integrating in Information Path Functional, Encoding and Application, British Journal of Mathematics & Computer Science, 20(3): 1-35, 2017. 33. Lerner V.S. The impulse observations of random process generate information binding reversible micro and irreversible macro processes in Observer: regularities, limitations, and conditions of self -creation, arXiv: 1204.5513. 34. Lerner V.S. Arising information regularities in an observer arXiv: 1307.0449. 35. Kolmogorov A.N. Foundations of the Theory of Probability, Chelsea, New York, 1956. 36. Levy P.P. Stochasic Processes and Brownian movement, Deuxieme Edition, Paris, 1965. 37. Bennett C.H. Logical Reversibility of Computation, IBM J. Res. Develop, 525-532. 1973. 38. Landauer R. Irreversibility and heat generation in the computing process, IBM Journal Research and Development, 5(3):183–191, 1961. 39. Le Jan Yves. Markov paths, loops and fields, Lecture Notes in Mathematics, vol. 2026, Springer, Heidelberg, 2011. Lectures from the 38th Probability Summer School held in Saint-Flour, 2008. 40. Efimov V.N. Weakly-bound states of three resonantly- interacting particles, Soviet Journal of Nuclear Physics, 12(5): 589595,1971. 41. Lerner V. S. Macrodynamic cooperative complexity in Information Dynamics, J. Open Systems and Information Dynamics, 15(3):231-279, 2008. 42. Sidiropoulou K., Pissadaki K. E., Poirazi P. Inside the brain of a neuron, Review, European Molecular Biology Organization reports, 7(9): 886- 892,2006. 43. Laughlin S. B., de Ruyter R., Steveninck R. and Anderson J. C. The metabolic cost of neural information, Nature Neuroscience, 1 (1), 1998. 44. Alavash M, Lim S-J, Thiel Ch., Sehm B., Deserno L., and Obleser J., Dopaminergic Modulation of Brain Signal Variability And The Functional Connectome During Cognitive Performance, bioRxiv ,2017 , doi:10.1101/130021. 44a. Aguilar J. and at all. Neuronal Depolarization Drives Increased Dopamine Synaptic Vesicle Loading via VGLUT, DOI: http://dx.doi.org/10.1016/j.neuron.2017.07.038. 45. Riek C., Seletskiy D.V., Moskalenko A.S., Schmidt J. F., Krause P., Eckard S., Eggert S., Burkard G., Leitenstorfer A. Direct sampling of electric-field vacuum fluctuations. Science, 2015; DOI: 10.1126/Science.aac9788. 46.Söding P. On the discovery of the gluon, European Physical Journal H.35(1): 3–28, 2010. 47. Zurek W.H. Sub-Planck spots of Schrodinger cats and quantum decoherence, arXiv: 0201118v1, 2002. 48.Weber S. J., Chantasri A., J. Dressel, Jordan A. N., Murch K. W., and Siddiqi I. Mapping the optimal route between two quantum states, arXiv:1403.4992,2014. 49.Sato N. and Yoshida Z. Up-Hill Diffusion Creating Density Gradient-What is the Proper Entropy? arXiv:1603.04551,2016. 62 49a. Hadjihoseini A., Lind P. G, Mori N., Hoffmann N.P., Peinke J. Rogue waves and entropy consumption, arXiv:1708.04234v1,2017. 49b. Arvidsson-Shukur D.R.M. et al. Evaluation of counterfactuality in counterfactual communication protocols, Physical Review A, 2017.DOI: 10.1103/PhysRevA.96.062316. 49c. Zhang H.et al. Theta and alpha oscillations are traveling waves in the human neocortex,bioRxiv, December 20017. 50. Vossel S., Mathys Ch.,Stephan K.E, and Friston K.J. Cortical Coupling Reflects Bayesian Belief Updating and Attention Networks, J. Neuroscience, 35(33):11532–11542,2015. 51. Westerhoff J. What it Means to Live in a Virtual World Generated by Our Brain, Erkenntnis, 1-22, 2015. 52. Liu G. Local structural balance and functional interaction of excitatory and inhibitory synapses in hippocampal dendrites, Nature Neuroscience Magazine, 4: 373-379, 2004. 53.Temple E. and Posner M.I. Brain Mechanisms of quantity are similar in 5-year-old children and adults, Proc. Natl. Acad. Sci., 95(13): 7836-7841, 1998. 54. Ronald H. S. and Trysha L. G. Modeling the neurodynamic organizations and interactions of teams, Social Neuroscience, DOI:10.1080/17470919. 2015. 55. Capotosto P., Spadone S., Tosoni A., Sestieri C., Romani G.L., Penna St.,D, and Corbetta M. Dynamics of EEG Rhythms Support Distinct Visual Selection Mechanisms in Parietal Cortex: A Simultaneous Transcranial Magnetic Stimulation and EEG Study, Neuroscience, 35(2):721-73014, 2015. 56. Seger C.A, Braunlich K., Wehe H.S, and Liu Z. Generalization in Category Learning: The Roles of Representational and Decisional Uncertainty, Neuroscience, 35(23): 8802-8812, 2015. 57. Desrochers Th., M, Chatham Ch.H., Badre D. The Necessity of Rostrolateral Prefrontal Cortex for Higher-Level Sequential Behavior. Neuron, 2015; DOI: 10.1016/j.neuron.2015.08.026. 58. Poort J., Khan A.G., Pachitariu M., Nemri A., Orsolic I., Krupic J., Bauza M., Sahani M., Keller G.B., Mrsic-Flogel T.D., and Hofer S.B. Learning Enhances Sensory and Multiple Nonsensory Representations in Primary Visual Cortex, Neuron, 86(6):1478-1490, 2015. 59. Dingle Yu-Ting. L., Boutin M.E.,, Chirila A.M, Livi L.L., Labriola N.R., Jakubek L.M, Morgan J.R., Darling E. M., Kauer J.A., Hoffman-Kim D. 3D Neural Spheroid Culture: An In Vitro Model for Cortical Studies. Tissue Engineering Part C: Methods, 2015, DOI: 10.1089/ten.TEC.2015.0135. 60. Falkowski P.G. Life's Engines: How Microbes Made Earth Habitable: How Microbes Made Earth Habitable, Princeton University Press, 2015. 61. Segerer F.J., Thüroff F., Alberola A. P., Frey E., and Rädler J. O. Emergence and Persistence of Collective Cell Migration on Small Circular Micropatterns, Phys. Rev. Lett. 114, 228102, 2015. 62. Dombrowski C., Cisneros L., Chatkaew S., Goldstein R. E., and Kessler J. O. Self-Concentration and Large-Scale Coherence in Bacterial Dynamics, Phys. Rev. Lett. 93, 098103, 2004. 63. Vicsek T., Cziro`k A., Ben-Jacob E., Cohen I., and Shochet O., Novel Type of Phase Transition in a System of Self-Driven Particles, Phys. Rev. Lett. 75, 1226, 1995. 63 64. Weber C. A., Hanke T., Deseigne J., Léonard S., Dauchot O., Frey E., and Chaté H. Long-Range Ordering of Vibrated Polar Disks, Phys. Rev. Lett. 110, 208001. 65. Ridley A. J., Schwartz M. A., Burridge K., Firtel R. A., Ginsberg M. H., Borisy G., Parsons J. T., and Horwitz A. R. Cell Migration: Integrating Signals from Front to Back, Science, 302, 1704, 2003. 66. Huang S., Brangwynne C. P., Parker K. K., and Ingber D. E. Symmetry-breaking in mammalian cell cohort migration during tissue pattern formation: Role of random-walk persistence, Cell Motil. Cytoskeleton 61, 201, 2005. 67. Doxzen K, S.,Vedula S. R., Leong K. M. C., Hirata H., Gov N. S., Kabla A. J., Ladoux B., and Lim C. T. Guidance of collective cell migration by substrate geometry, Integr. Biol. 5, 1026, 2013. 68. Marel A.-K., Zorn M., Klingner C., R. Wedlich-Soeldner R., Frey E., and Rädler J. O. Flow and Diffusion in ChannelGuided Cell Migration, Biophys. J. , 107, 1054, 2014. 69. Cisneros T. L., Dombrowski C., Wolgemuth C.W., Kessler J. O., and Goldstein R. E., Bacterial swimming and oxygen transport near contact lines, Proc. Natl. Acad. Sci., 102, 2277, 2005. 70. Sokolov A. and Aranson I. S. Physical Properties of Collective Motion in Suspensions of Bacteria, Phys. Rev. Lett. 109, 248109, 2012. 71. Sokolov A. and Aranson I. S., Kessler J. O., and Goldstein R. E. Concentration Dependence of the Collective Dynamics of Swimming Bacteria, Phys. Rev. Lett. 98, 158102, 2007. 72. Lushi E. and C. S. Peskin C. S. Modeling and simulation of active suspensions containing large numbers of interacting micro-swimmers, Comput. Struct., 122, 239, 2013. 73. Li G., Tam L.-K., and Tang J. X. Amplified effect of Brownian motion in bacterial near-surface swimming, Proc. Natl. Acad. Sci. , 105, 18355, 2008. 74. Cziro´k A., Ben-Jacob E., Cohen I., and VicsekT. Formation of complex bacterial colonies via self-generated vortices, Phys. Rev. E 54, 1791,1996. 75. Volfson D., Cookson S., Hasty J, and Tsimring, L. S. Biomechanical ordering of dense cell populations, Proc. Natl. Acad. Sci. ,. 105, 15346, 2008. 76. Ginelli F, Peruani F., Ba¨r M., and Chate H. Large-Scale Collective Properties of Self-Propelled Rods, Phys. Rev. Lett. 104, 184502, 2010. 77. Lushi E. and Peskin, C. S. Modeling and simulation of active suspensions containing large numbers of interacting microswimmers, Comput. Struct., 122, 239, 2013. 78. Giomi L., Marchetti M. C. and Liverpool T. B. Complex Spontaneous Flows and Concentration Banding in Active Polar (crystalline) films, Phys. Rev. Lett., 101, 198101, 2008. 79. Weber V.C., Semmrich Ch.E., Frey E., and Bausch A. R. Polar patterns of driven filaments, Nature 467, 73-77, 2010. 80. Wioland H., Woodhouse F. G., Dunkel J., Kessler J. O., and Goldstein R. E. Confinement Stabilizes a Bacterial Suspension into a Spiral Vortex, Phys. Rev. Lett. ,110, 268102, 2013. 81. Grossman D., Aranson I., S., and Ben Jacob E., Emergence of agent swarm migration and vortex formation through inelastic collisions, New J. Phys. 10 023036 doi:10.1088/1367-2630/10/2/023036. 82.Wensink H. H., Lowen H., Aggregation of self-propelled colloidal rods near confining walls, Phys. Rev. E 78, 031409, 2008. 64 83. Woodhouse F. G. and Goldstein R. E. Spontaneous Circulation of Confined Active Suspensions, Phys. Rev. Lett., 109, 168105, 2012. 84. Seč D., Porenta T., Ravnikab M. and Žumerabc Sl. Geometrical frustration of chiral ordering in cholesteric droplets, Soft Matter, 8, 11982-11988, 2012. : 85. Brereton A.E., Karplus P.A. Native proteins trap high-energy transit conformations, Science Advances, 1(9), 2015. 86. Lerner V.S. Emergence time, curvature, space, casualty, and complexity in encoding a discrete impulse information process, arXiv:1603.01879, 2016. 87. Lerner V.S. The Observer-Generated Information Process: Composite Stages, Cooperative ―Logical‖ Structure, and Self-Organization, Cybernetics and Systems, DOI: 10.1080/01969722.2016.1182356, 2016. 88. Lerner V.S. The entropy functional measure on trajectories of a Markov diffusion process and its estimation by the process' cut off applying the impulse control, arXiv.org, 1204.5513, 2012. 89. Gilson M., Savin Cr. and Zenke F. Emergent Neural Computation from the Interaction of Different Forms of Plasticity, Front. Comput. Neuroscience, 30 November, 2015. 90. Cutts C.S, Eglen St. J. A Bayesian framework for comparing the structure of spontaneous correlated activity recorded under different conditions,‖ bioRxiv, 20160: dx.doi.org/10.1101/037358. 91. Nirenbero M.W, Jones W., Leder P., Clark B.F.C., Sly W. S., Pestka S. On the Coding of Genetic Information, Cold Spring Harb Symposium Quantum Biology, 28: 549-557, 1963. 92. Rodin A.S., Szathmáry E., RodinS.N., On origin of genetic code and tRNA before Translation, Biology Direct, 6: 1415,2011. 93. Brea J., Tamás Al., Urbanczik R., Senn W. Prospective Coding by Spiking Neurons, PLOS Computational Biology, June 24, 2016. 94. Koonin E.V. and Novozhilov A.S. Origin and Evolution of the Genetic Code: The Universal Enigma, IUBMB Life, 61(2): 99–111, 2009. 95. Lerner V.S and Lerner Y.S. Solidification modeling of continuous casting process, J.l of Material Engineering and Performance, 14 (2): 258-266, 2005. 96. Lerner Y., Griffin G. Development in Continuous of Gray and Ductil Iron, Modern Casting, 41-44, 1997. 97. Lerner V.S., Rudnitski V.B., Berger S.V., Osipov J.H. and Chebanyuk V.F. The Noncontact power regulator BM-1 of Electric Furnace, J. Electrothermics, 86:12-18, Moscow, 1969. 98. Lerner V. S, Sobolev V.V. Comparison of mathematical models of contiguous horizontal casting of gray iron ingots, Bk. Material Resources in Foundry, NTO Machprom press, Chelyabinsk, p. 88, 1986. 99. Lerner V. S, Sobolev V.V., Trefilov P.M. Optimal condition for iron solidity at contiguous horizontal casting, University News, Metallurgy, l (7):120-123, 1989. 100. Lerner V. S., Zhelnis M.V., Dobrovolskis A.S. and Tzarev G.G. System of automatization of contiguous horizontal casting process, Foundry, 1: 16-17, 1990 101. Lerner V. S., Treyger A.S. Information virtual network for optimal data encoding-decoding, Proceedings of International Conference on Electronics, Communications and Computers, Mexico, 14:11-18, 1999. 65 102. Lerner V.S. The information modeling of the encoding-decoding processes at transformation of biological information, J. of Biological Systems, 12 (2) :201-230, 2004. 103. Lerner V, Dennis D, Herl H, Novak J, and Niemi D. Computerized methodology for the evaluation of level of knowledge, Cybernetics and Systems, An Int. Journal, 24:473-508, 1993. 104. Koch K., McLean J., Berry M., Sterling P., Balasubramanian V. and Freed M.A, Efficiency of Information Transmission by Retinal Ganglion, Cells, Current Biology, 16(4), 1428-1434,2006. 105. Chirgwin R. Google tests its own quantum computer–both qubits of it, Theregister.co.uk/2016/07/21, 2016. 106. Prechtel J.H., Kuhlmann A.V., Houel J., Ludwig A., Valentin S.R., Wieck A.D., Warburton R.J. Decoupling a hole spin qubit from the nuclear spins. Nature Materials, 2016; doi: 10.1038/nmat4704. 107. Chang S., Zhou M, Grover C. Information coding and retrieving using fluorescent semiconductor nanocrystals for object identification, Optics express, Osapublishing.org, 2004. 108. Acin Ant. Quantum Information Theory with Black Boxes, web.am.qub.ac.uk/ctamop/seminars, 2016. 109. Mao C., Sun W. and Seeman N.C, Assembly of Borromean rings from DNA, Nature 386 (6621):137–138, 1997. 110. Lerner V.S. Natural Encoding of Information through Interacting Impulses, arXiv: 1701.04863, IEEE Xplore: http://ieeexplore.ieee.org/xpl/Issue7802033, 103-115,2016. 111. Lerner V. S. Informational Macrodynamics for Cognitive Information Modeling and Computation, J. of Intelligent Systems, 11(6): 409-470, 2001. 112. Lerner V. S. Information MacroDynamics Approach for Modeling in Biology and Medicine, J. of Biological Systems, 5(2):215-264, 1997. 113. Lerner V. S. Cooperative information space distributed macromodels, Int. J. of Control, 81 (5):725-751, 2008. 114. Lerner V. S. Systemic mechanism of organizing and assembling information, J. Kybernetes, 43(6): 834-856, 2005. 115 Lerner, V. S., Portugal, V. M. The Economic and Mathematic Model of Optimal Consolidation of Productions Structures, Izvestia Academy of Science USSR, 5:979-981, Nauka, Moscow, 1991. 116. Lerner V. S. An Elementary Information Macrodynamic Model of a Market Economic System, J. Information Sciences, 176 (22):3556-3590, 2006. 117. Lerner V.S. Information Systems Analysis and Modeling: An Informational Macrodynamics Approach, Kluwer Academic Publisher,. 1999. 118. Lerner V.S. Variation Principle in Information Macrodynamic, Kluwer-Springer Academic Publisher, 2003. 119. Lerner V.S. The Information Hidden in Markov Diffusion, Lambert Academic Publisher, 2017. 120. LernerV.S. Information Path from Randomness and Uncertainty to Information, Thermodynamics, and Intelligence of Observer, arXiv:1401.7041.. 121. Lerner V., Riesel I. Roykhel B., Zaverchnev A., Kogan E. The Applied Software Package, Sc.Report, NIISL, 1990. 122. Dai1 L., Kamionkowski1. M. , Kovetz E.D., Raccanelli1 A., and Shiraishi M. Antisymmetric galaxy cross-correlations as a cosmological probe , arxiv:1507.05618v2 . 66
7cs.IT
A Calculus for Modeling Floating Authorizations Jovanka Pantović1 , Ivan Prokić1 , and Hugo Torres Vieira2 1 Faculty of Technical Sciences, University of Novi Sad, Serbia 2 IMT School for Advanced Studies Lucca, Lucca, Italy arXiv:1802.05863v1 [cs.PL] 16 Feb 2018 Abstract Controlling resource usage in distributed systems is a challenging task given the dynamics involved in access granting. Consider, for instance, the setting of floating licenses where access can be granted if the request originates in a licensed domain and the number of active users is within the license limits, and where licenses can be interchanged. Access granting in such scenarios is given in terms of floating authorizations, addressed in this paper as first class entities of a process calculus model, encompassing the notions of domain, accounting and delegation. We present the operational semantics of the model in two equivalent alternative ways, each informing on the specific nature of authorizations. We also introduce a typing discipline to single out systems that never get stuck due to lacking authorizations, addressing configurations where authorization assignment is not statically prescribed in the system specification. 1 Introduction Despite the continuous increase of computational resources, their usage will always nevertheless be subject to availability, not to mention accessibility. Regardless whether such resources are of hardware or software nature, they might have finite or virtually infinite capabilities. Physical examples, that can be mapped to finite capabilities directly, include actual devices such as printers or cell phones, and components of a computing system such as memory or processors. Virtual examples such as a shared memory cell or a web service can be more easily seen as having infinite potential but often their availability is also finitely constrained. In general, ensuring proper resource usage is a crucial yet non trivial task, given the highly dynamic nature of access requests and the flexibility necessary to handle such requests while ensuring secure and efficient system operation. In particular for security purposes it is crucial to control access to resources so as to guarantee, on the one hand, that access is granted only to authorized users and, on the the other hand, that granting access is subject to availability. Concrete examples include a wireless access point that has a determined policy to grant access and a limited capacity on the number of connected devices, and a software application that is licensed to be used internally to an institution in a bounded way. Both examples include a limited amount of capabilities that are accessible in a shared way to a number of authorized users, involving a notion of floating authorizations, borrowing the terminology from licensing. Essentially, the authorization to use the resource is associated to a capacity and access can be granted to any authorized user only up to the point the capacity is reached, so floating captures the flexible nature of the access granting. We also identify a notion of implicit granting since users may be granted access under a certain domain (e.g., the licensed institution) and not even be aware of the fact a capacity bound is present, at least up to the point access is denied. Further pursuing the licensing setting we find examples which hint on the dynamic dimension of authorizations. Consider a user that deploys a software application on the cloud, for which the licensing may be provided by the user himself, a notion sometimes dubbed Bring Your Own License. Such scenario involves a notion of authorization delegation, in which the user may actually lose access to use the application locally given the capacity constraints. We identify here a notion of explicit authorization granting, where the intention to yield and obtain an authorization are somehow signaled. We therefore distill the following notions in a floating authorizations model: domain so as to specify where access may be (implicitly) granted; accounting so as to capture capacity; and delegation so as to model (explicit) authorization granting. In this paper we present a model that encompasses these notions, developed focusing on a process calculus tailored for communication centered systems. In our model the only resources considered are communication channels, so our exploration on authorization control is carried out considering authorizations refer to channels and their usage (for communication) is controlled. Our development 1 builds on the π-calculus [12], which provides the basis to model communicating systems including name passing, and on a model for authorizations [7], from where we adopt the language constructs for authorization domain scope and delegation. We adapt here the interpretation for authorization domains so as to encompass accounting, which thus allows us to model floating authorizations. To the best of our knowledge, ours is the first process calculus model that addresses floating resources (in our case authorizations) as first class entities. After presenting our language we also show a typing discipline that ensures systems never incur in authorization errors, i.e., systems that are blocked due to lacking authorizations. Our type analysis addresses systems for which the authorization assignment is not statically prescribed in the system specification, given the particular combination between π-calculus name passing and floating authorizations. In particular when authorizations for (some) received names are already held by the receiving parties, a notion we call contextual authorizations. We start by informally introducing our model by means of examples. 1.1 Examples In this section we present our language by showing some examples resorting to the licensing setting for the sake of a more intuitive reading. First of all, to model authorization domains we consider a scoping operator, and we may write (license)University to represent that the University domain holds one license. This means that one use of license within University is authorized. In particular, if University comprises two students that are simultaneously active, which we dub Alice and Bob, we may write (license)(Alice | Bob) in which case either Alice or Bob can use the license that is floating, but not both of them. The idea is to support a notion of accounting, so when one of the students uses the license the scope is confined accordingly. For example, if Bob uses the license and evolves to LicensedBob then the system evolves to Alice | (license)LincensedBob where the change in the scope denotes that license is not available to Alice anymore. The evolution of the system is such that the authorization is directly confined to Bob, who is using it, so as to model implicit granting. Hence, at this point Alice cannot implicitly grab the authorization and gets stuck if she tries to use license. Hence, name license may be shared between Alice and Bob, so the (change of) scoping does not mean the name is privately held by LicensedBob, just the authorization. Now consider a more generous university (license)(license)(Alice | Bob) | Carol which specifies two authorizations (for the same resource) are available to Alice and Bob, however none is specified for Carol . As mentioned, Carol cannot use the authorization implicitly, but she can explicitly ask for it. To model explicit authorization granting we introduce two communication primitives that allow for an authorization to be delegated. We write authhlicensei.UnlicensedBob to represent the explicit delegation of one authorization for license via communication channel auth, after which activating configuration UnlicensedBob. Instead, by auth(license).LicensedCarol we represent the dual primitive that allows to receive one authorization for license via channel auth after which activating configuration LicensedCarol . So by (license)(auth)authhlicensei.UnlicensedBob | (auth)auth(license).LicensedCarol we represent a system where the authorization for license can be transferred from the delegating user to the receiving user leading to (auth)UnlicensedBob | (auth)(license)LicensedCarol where the scope of the authorization for license changes accordingly. The underlying communication is carried out by a synchronization on channel auth, for which we remark the respective authorizations (auth) are present. In fact, in our model the only resources considered are communication channels and their (immediate) usage is subject to the (implicit) authorization granting mechanism. Our model supports a form of fairness and does not allow a “greedy” usage of resources. For example, in (license)(Alice | (license)LincensedBob) 2 the user LincensedBob is considered granted by the closest (license) and cannot be confined with the floating one, except in case he needs both licenses (possibly for delegation). We remark that no name passing is involved in the authorization delegation mechanism and that name license is known to both ends in the first place. Instead, name passing is supported by dedicated primitives, namely (comm)comm!license.Alice | (comm)comm?x .Dylan represents a system where the name license can be passed from the left hand side to the right hand side via a synchronization on channel comm, leading to the activation of Alice and Dylan where the placeholder x is instantiated by license. Notice that the synchronization can take place since the authorizations to use channel comm are given, one for each endpoint. Name passing allows to model systems where access to channels changes dynamically (since the communicated names refer to channels) but, as hinted in the previous examples, knowing a name does not mean being authorized to use it. So for instance (comm)comm?x .x !reply.0 specifies a reception in comm where the received name is then used to output reply , leading to an inactive state, represented by 0. Receiving license in the initial duly authorized use of channel comm leads to (comm)license!reply .0 where the authorization for comm is present but no authorization for license is acquired as a result of the communication. Hence the output specified using license is not authorized and cannot take place. We remark that an authorization for reply is not required, hence communicating a name does not mean using it for the purpose of authorizations. By separating name passing and authorization delegation we are then able to model systems where unauthorized intermediaries (e.g., brokers) may be involved in forwarding names between authorized parties without ever being authorized to use them, for example (comm)comm?x .(forward )forward !x .0. So, after receiving a name a typical pattern can then be (comm)comm?x .(auth)auth(x ).LicensedDylan where after the (authorized) reception on comm, an authorization reception via (authorized) auth is specified, upon which the authorization to use the received name is acquired. Another possibility for enabling authorizations for received names is to use the authorization scoping construct, e.g., (comm)comm?x .(x )LicensedDylan where the authorization (x) is instantiated by the received name. This example hints on the fact that the authorization scoping is a powerful mechanism that may therefore be reserved to the Trusted Computing Base, while resorting to the more controllable authorization delegation mechanism in general. To introduce the last constructs of our language, consider the system !(license)license?x.(x)license hxi.0 | (νfresh)(license)license!fresh.license(fresh).0 where a licensing server is specified on the left hand side, used in the specification given on the right hand side. By (νfresh)Domain we represent the creation of a new name which is private to Domain, so on the specification on the right hand side can be read as first create a name, then send it via (authorized) channel license, after which receive the authorization to use the fresh name via channel license and then terminate (the received authorization is not actually used in this simple example). On the left hand side we find a replicated (i.e., repeatably available) reception on (authorized) channel license, after which an authorization for the received name is specified that may be delegated via license. In two communication steps the authorization for the newly created name can therefore be transferred. Returning to our university setting, consider example (exam)(minitest)(alice)alice?x.x?Task.DoTask where two authorizations are available, one for exam and another for minitest, and where alice is waiting to receive the channel on which her assessment will be made. Assuming that she can only take the exam or the minitest the authorizations specified are sufficient to carry out the reception of the Task (assuming an extension of the language considering other values which use is not subject to authorizations). Which authorization will actually be used depends on the received name, so the authorization is implicitly taken directly when using the received channel. Naturally, if a name viva is sent to the student then the prescribed authorizations do not suffice. 3 P, Q ::= 0 P |Q (νa)P a!b.P a?x.P (Inaction) (Parallel) (Restriction) (Output) (Input) (a)P ahbi.P a(b).P !(a)a?x.P (Authorization) (Send authorization) (Receive authorization) (Replicated input) Table 1: Syntax of processes. In order to capture the fact that the above configuration is safe, provided it is inserted in a context that matches the assumptions described previously, our types identify the names that can be safely communicated. For instance we may say that only names exam and minitest can be communicated in channel alice. Also, consider that alice is a name not subject to instantiation and that exam and minitest can only receive values that are not subject to authorization control. We denote by {alice}({exam, minitest}(∅)) the type of channel alice in such circumstances, i.e., when it is not subject to replacement (we will return to this point), that it can be used to communicate exam and minitest that in turn cannot be used for communication (typed with ∅), reading from left to right. Using this information we can ensure that the specification given for alice above is safe, since all names that will possibly be used in communications are authorized. To analyse the use of the input variable x we then take into account that it can be instantiated by either exam or minitest (which cannot be used for channel communication) so the type of x is {exam, minitest }(∅). Hence the need to talk about possible replacements of a name, allowing us to uniformly address names that are bound in inputs. Our types for channels are then built out of two parts, one addressing possible replacements of the channel identity itself (ω), and the other informing on the (type of the) names that may be exchanged in the channel (T ), denoted by ω(T ). The typing assumption alice : {alice}({exam, minitest}(∅)) informs on the possible contexts where the system above can be safely used. For instance it is safe to compose with the system (alice)alice!minitest where minitest is sent to alice, since the name to be sent belongs to the names expected on alice. Instead, consider configuration (exam)(minitest)((alice)alice?x.x?Task.DoTask | (bob)bob?x.x?Task.DoTask ) which is also safe and addressed by our typing analysis considering typing assumptions alice : {alice}({exam}(∅)) and bob : {bob}({minitest}(∅)). Notice that which authorization is needed by each student is not statically specified in the system, which is safe when both exam and minitest are sent given the authorization scopes can be confined accordingly. Clearly, the typing specification already informs on the association and a symmetric association is also admissible. The typing analysis shown in Section 3 addresses such configurations where authorizations for received names may be provided by the context. In Section 2 we present the operational semantics of our language considering two equivalent alternatives that inform on the specific nature of authorizations in our model. 2 A Model of Floating Authorizations In this section we present our process model, an extension of the π-calculus [12] with specialized constructs regarding authorizations adopted from a model for authorizations [7]. The syntax of the language is given in Table 1. It assumes a countable set of names N , ranged over by a, b, c, . . . , x, y, z, . . . We briefly present the syntactic constructs adopted from the π-calculus. An inactive process is represented by 0. P | Q represents two processes simultaneously active, that may interact via synchronization in channels. (νa)P is the name restriction construct, specifying the creation of a channel name a that is known only to the process P. The output prefixed process a!b.P sends the name b on channel a and proceeds as P, and the input prefixed process a?x.P receives on channel a a name and substitutes the placeholder x in P with the received name. We comment on the remaining constructs introduced to model authorizations in more detail: • The term (a)P is another scoping mechanism for names, representing that process P has one authorization to use channel a. In contrast to the name restriction, name a is not private to P. • The term ahbi.P represents the process that delegates one authorization for the name b along the name a and proceeds as P. 4 (sc-par-inact) (sc-par-comm) (sc-par-assoc) P |0≡P P |Q≡Q|P (P | Q) | R ≡ P | (Q | R) (sc-res-inact) (sc-res-swap) (sc-rep) (νa)0 ≡ 0 (νa)(νb)P ≡ (νb)(νa)P !(a)a?x.P ≡ !(a)a?x.P | (a)a?x.P (sc-res-extr) (sc-alpha) P | (νa)Q ≡ (νa)(P | Q) (a ∈ / fn(P )) P ≡α Q =⇒ P ≡ Q (sc-auth-swap) (sc-auth-inact) (sc-scope-auth) (a)(b)P ≡ (b)(a)P (a)0 ≡ 0 (a)(νb)P ≡ (νb)(a)P if a 6= b Table 2: Structural congruence. • The term a(b).P represents the process which receives one authorization for the name b along the name a and proceeds as P. • The term !(a)a?x.P allows us to specify infinite behavior: the process receives the name along the (authorized) name a and substitutes the placeholder x in P with the received name, activating in parallel a copy of the original process. In (νx)P, a?x.P and !(a)a?x.P the name x is binding with scope P. All occurrences of a name that are binding, or that are under the scope of it binding occurrence, are said to be bound. If the occurrence of the name is not bound in a term, it is said to be free. We use fn(P ) and bn(P ) to denote the sets of free and bound names in P, respectively. Regarding language constructs for authorization manipulation, we have that in (a)P occurrence of the name a is free and occurrences of names a and b in processes ahbi.P and a(b).P are also free. We remark that in our model authorization scope extrusion is not applicable since a free name is specified, unlike name restriction (see Table 2), and constructs to send and receive authorizations can only affect the possible changes of the scope of authorization (b), and do not involve name passing. 2.1 Reduction Semantics As in the π-calculus, the essence of the behavior of processes can be seen as communication. Specific to our model is that two processes ready to synchronize on a channel must be authorized to use the channel. For example, (a)a!b.P | (a)a?x.Q can evolve to (a)P | (a)Q{b/x}, since both sending and receiving actions are authorized, while (a)a!b.P | a?x.Q lacks the proper authorization on the receiving end, hence the synchronization cannot occur. Another specific aspect of our language is authorization delegation. For example, consider (a)(b)ahbi.P | (a)a(b).Q. Both actions along name a are authorized, and the delegating process has the respective authorization on b, hence the authorization delegation can take place, leading to (a)P | (a)(b)Q. Notice that the authorization for b changed to scope over to the process that received the authorization. If actions along name a are not authorized or the process delegating authorization for b is not authorized on b, like in (a)ahbi.P | (a)a(b).Q, then the synchronization is not possible. We formally define the behavior of processes by means of a reduction semantics and afterwards by means of a labeled transition system. Reduction is defined as a binary relation between processes, denoted →, where P → Q specifies that process P evolves to process Q in one computational step. In order to identify processes which differ syntactically but have the same behavior, we introduce the structural congruence relation ≡, which is the least congruence relation between processes satisfying the rules given in Table 2. Most rules are standard considering structural congruence in the πcalculus. In addition we adopt some rules introduced previously [7] that manipulate authorization scoping, namely (sc-auth-swap), (sc-auth-inact), and (sc-scope-auth) . Regarding authorization scoping, we remark there is no rule which relates authorization scoping and parallel composition, like (sc-res-extr) for name restriction. This is due to the interpretation of authorization scoping, as adopting a rule of the sort (a)(P | Q) ≡ (a)P | (a)Q would represent introducing/discarding one authorization, thus interfering with authorization accounting. Hence we distinguish (a)(P | Q) where the authorization is shared between P and Q and (a)P | (a)Q where two authorizations are specified, one for each process. Another approach could be a rule of the sort (a)(P | Q) ≡ P | (a)Q, which also may affect the computational power of a process. For example, two processes a!b.0 | (a)0 and (a)(a!b.0 | 0) should not be considered equal since the first one is not authorized to perform the output, while the second one is. In contrast, notice that in (a)(a!b.P | Q) the output on channel a is authorized, but if the action is carried out then the authorization is 5 C[·] ::= C[·1 , ·2 ] ::= · | P | C[·] | (a)C[·] C[·1 ] | C[·2 ] | P | C[·1 , ·2 ] | (a)C[·1 , ·2 ] Table 3: Contexts with one and two holes. (c-end) ˜ =· drift (·; ∅; d) (c-rem) ˜ c) = C ′ [·] drift (C[·]; ã; d, ˜ = C ′ [·] drift ((c)C[·]; ã, c ; d) (c-skip) (c-par) ˜ = C ′ [·] c 6∈ d˜ drift (C[·]; ã; d) ˜ = (c)C ′ [·] drift ((c)C[·]; ã; d) ˜ = C ′ [·] drift (C[·]; ã; d) ˜ = C ′ [·] | R drift (C[·] | R; ã; d) Table 4: Definition of drift on contexts with one hole confined to P and no longer available for Q, since one authorization can only be (effectively) used by a single thread. Structural congruence is therefore not expressive enough to isolate two authorized processes willing to communicate on the same channel. For example process (a)((a)(Q | a!b.0) | a?x.0) cannot be rewritten, using structural congruence rules, to Q | (a)a!b.0 | (a)a?x.0. However both processes are able to reduce to process Q | (a)0 | (a)0 since the actions are under the scope of the proper authorizations. To define the reduction relation we thus introduce an auxiliary notion of static contexts with one and two holes and an operation that allow us to single out the configurations where communication can occur. Intuitively, if two processes have active prefixes ready for synchronization, and both are under the scope of the appropriate authorizations, then the reduction step is possible. Static contexts are defined in Table 3 following standard lines. We use ·1 and ·2 notation to avoid ambiguity (i.e., when C[·1 , ·2 ] = C[·1 ] | C[·2 ] then C[P, Q] = C[P ] | C[Q]). Note that in Table 3 there is no case for name restriction construct (νa), which allows to identify specific names and avoid unintended name capture. Remaining cases specify holes can occur in parallel composition and underneath the authorization scope, the only other contexts underneath which processes are deemed active. We omit the symmetric cases for parallel composition since contexts will be considered up to structural congruence. Operation drift plays a double role: on the one hand it is defined only when the hole/holes is/are under the scope of the appropriate number of authorizations in the context; on the other hand, when defined, it yields a context obtained from the original one by removing specific authorizations (so as to capture confinement ). In our model, the specific authorizations that are removed for the sake of confinement are the ones nearest to the occurrence of the hole. ˜ is defined inductively by the derivation rules shown in Table 4. We The operator drift (C[·]; ã; d) present the rules reading from the conclusion to the premise. The operator takes as arguments a ˜ in which the same name can appear more than context with one hole and lists of names ã and d, once. The first list of names represents the names of authorizations that are to be removed from the context and the second represents the names of authorizations that have already been removed by the same operation. We briefly comment on the rules shown in Table 4. The rule where the authorization is removed from the context (c-rem) specifies that the (same) name is passed from the first list to the second list, hence from “to be removed” to “has been removed”. In the rule where the authorization is preserved in the context (c-skip) we check if the name specified in the authorization is not on the second list (has been removed), hence only authorizations that were not already removed proceeding towards the hole can be preserved. This ensures the removed authorizations are the ones nearest to the hole. The rule for parallel composition (c-par) is straightforward and the base rule (c-end) is defined only if the first list is empty. This implies that the operator is defined only when all authorizations from the first list are actually removed from the context up to the point the hole is reached. It should be noted that the second list of names is only for internal use to the operation, so, top level, when defining the operator for some context C[·] and some list of names ã that are to be removed from the context, no authorizations have been removed and the respective list is empty. 6 (c2-spl) ˜ = C ′ [·] drift (C2 [·2 ]; b̃; ẽ) = C ′ [·] drift (C1 [·1 ]; ã; d) 1 2 ˜ ẽ) = C ′ [·1 ] | C ′ [·2 ] drift (C1 [·1 ] | C2 [·2 ]; ã; b̃; d; 1 2 (c2-rem-l) (c2-rem-r) ˜ c; ẽ) = C ′ [·1 , ·2 ] drift (C[·1 , ·2 ]; ã; b̃; d, ˜ ẽ) = C ′ [·1 , ·2 ] drift ((c)C[·1 , ·2 ]; ã, c ; b̃; d; ˜ ẽ, c) = C ′ [·1 , ·2 ] drift (C[·1 , ·2 ]; ã; b̃; d; ˜ ẽ) = C ′ [·1 , ·2 ] drift ((c)C[·1 , ·2 ]; ã; b̃, c ; d; (c2-skip) (c2-par) ˜ ẽ) = C ′ [·1 , ·2 ] c 6∈ d, ˜ ẽ drift (C[·1 , ·2 ]; ã; b̃; d; ˜ ẽ) = (c)C ′ [·1 , ·2 ] drift ((c)C[·1 , ·2 ]; ã; b̃; d; ˜ ẽ) = C ′ [·1 , ·2 ] drift (C[·1 , ·2 ]; ã; b̃; d; ˜ ẽ) = C ′ [·1 , ·2 ] | R drift (C[·1 , ·2 ] | R; ã; b̃; d; Table 5: Definition of drift on contexts with two holes (r-comm) (r-auth) drift (C[·1 , ·2 ]; a; a) = C ′ [·1 , ·2 ] C[a!b.P, a?x.Q] → C ′ [(a)P, (a)Q{b/x}] drift (C[·1 , ·2 ]; a, b; a) = C ′ [·1 , ·2 ] C[ahbi.P, a(b).Q] → C ′ [(a)P, (a)(b)Q)] (r-stru) (r-newc) P ≡ P ′ → Q′ ≡ Q P →Q P →Q (νa)P → (νa)Q Table 6: Reduction rules. For example, drift ((a)·; a; ∅) = · drift ((a)((a) · | R); a; ∅) = (a)(· | R) drift (·; a; ∅) is undefined drift ((a)(b)·; a, b; ∅) = · drift ((a)·; a, b; ∅) is undefined drift ((a) · | (b)0; a, b; ∅) is undefined. For the sake of defining reduction, where a pair of interacting processes must be identified, we re˜ ẽ), quire a generalization of the operation to contexts with two holes. The operator drift (C[·1 , ·2 ]; ã; b̃; d; defined inductively by the rules shown in Table 5, takes as arguments a context with two holes, two lists of names ã and b̃ representing the names of authorizations which are to be removed and two list of names d˜ and ẽ representing names of authorizations already removed. Lists ã and d˜ refer to the ·1 hole while b̃ and ẽ refer to the ·2 hole. We briefly describe the rules reading from conclusion to premise. Rule (c2-spl) describes the case for two contexts with one hole each, in which case the respective operation (for one-hole contexts) is used to obtain the resulting context, considering the name lists ã and d˜ for the context on the left hand side and b̃ and ẽ for the context on the right hand side. The remaining rules follow exactly the same lines of the ones shown in Table 4, duplicating authorization removal so as to address the two pairs of lists in a dedicated way. For example, drift ((b)(a)(a)(·1 | ·2 ); a, b; a; ∅; ∅) = ·1 | ·2 drift ((b)(a)(·1 | (a)·2 ); a, b; a; ∅; ∅) = · | · drift ((a)(b) ·1 | (a)·2 ; a, b; a; ∅; ∅) = ·1 | ·2 drift ((b)(·1 | (a)(a)·2 ); a, b; a; ∅; ∅) is undefined. Notice that the operation carried out for contexts with two holes relies at some point on the operators for contexts with one hole and the fact that the derivation is possible only if the axioms for empty contexts are true. Thus, the operator is undefined if the proper authorizations are lacking. As before, lists d˜ and ẽ are used only internally by the operator. For the rest of presentation we abbreviate drift (C[·1 , ·2 ]; ã; b̃; ∅; ∅) with drift (C[·1 , ·2 ]; ã; b̃). We may now present the reduction rules, shown in Table 6. Rule (r-comm) states that two processes can synchronize on name a, passing name b from emitter to receiver, only if both processes are under the scope of, at least one per each process, authorizations for name a. The yielded process 7 considers the context where the two authorizations have been removed by the drift operation, and specifies the confined authorizations for a which scope only over the continuations of the communication prefixes P and Q. Analogously to (r-comm), rule (r-auth) states that two process can exchange authorization (b) on a name a only if the first process is under the scope of, at least one, authorization b and, again, if both processes are authorized to perform an action on name a. As before, the yielded process considers the context where the authorizations have been removed by the drift operation. Notice that the authorization for b is removed for the delegating process and confined to the receiving process so as to model the exchange. Finally, the rule (r-stru) closes reduction under structural congruence, and rule (r-newc) closes reduction under the restriction construct (νa). Note there are no rules that close reduction under parallel composition and authorization scoping, as these constructs are already addressed by the static contexts in (r-comm) and (r-auth). There is also no rule dedicated to replicated input since, thanks to structural congruence rule (sc-rep), a single copy of replicated process may be distinguished and take a part in a synchronization captured by (r-comm). To illustrate the rules and the drift operation, consider process P = (a)((a)(Q | a!b.R1 ) | a?x.R2 ). where we may say that P = C[a!b.R1 , a?x.R2 ] and C[·1 , ·2 ] = (a)((a)(Q | ·1 ) | ·2 ). Applying drift to the context C[·1 , ·2 ] to remove the two authorizations for name a we have drift (C[·1 , ·2 ]; a; a) = (Q | ·1 ) | ·2 . Thus, P → (Q | (a)R1 ) | (a)R2 {b/x}, where we observe that the authorizations are confined to the continuations R1 and R2 {b/x}. Synchronizations in our model are tightly coupled with the notion of authorization, in the sense that in the absence of the proper authorizations the synchronizations cannot take place. We characterize such undesired configurations, referred to as error processes, by identifying the redexes singled-out in the reduction semantics which are stuck due to the lack of the necessary authorizations. Roughly, this is the case when the premise of the reduction rules is not valid, hence when the drift operation is not defined. We introduce some abbreviations useful for the remaining presentation: a prefix αa stands for any communication prefix along name a, i.e. a!b, a?x, ahbi or a(b) and (νã) stands for (νa1 ) . . . (νan ) when ã = a1 , . . . , an . Definition 2.1 (Error). Process P is an error if P ≡ (νc̃)C[αa .Q, α′a .R] and 1. αa = a!b, α′a = a?x and drift (C[·1 , ·2 ]; a; a) is undefined, or 2. αa = ahbi, α′a = a(b) and drift (C[·1 , ·2 ]; a, b; a) is undefined. Notice that the definition of errors is aligned with that of reduction, where structural congruence is used to identify a configuration (possibly in the scope of a number of restrictions) that directly matches one of the redexes given for reduction, but where the respective application of drift is undefined. The type analysis presented afterwards singles out processes that never incur in errors, but first we show an alternative characterization of the operational semantics. 2.2 Action Semantics In this section we introduce a labeled transition system (LTS) that provides an equivalent (as shown later) alternative representation of the operational semantics of our model. As usual the LTS is less compact, albeit more informative, with respect to the reduction semantics. The basic notion is that of observable actions, ranged over by α, which are identified as follows: α ::= (a)i a!b | (a)i a?b | (a)i (b)j ahbi | (a)i a(b) | (νb)(a)i a!b | τω where ω is of the form (a)i+j (b)k and i, j, k ∈ {0, 1}. We may recognize the communication action prefixes together with some annotations that capture carried/lacking authorizations and bound names. Intuitively, a communication action tagged with (a)0 represents the action is not carrying an authorization on a, while (a)1 represents the action is carrying an authorization on a. Notice in the case for authorization delegation two such annotations are present, one for each name involved. As usual (νb) is used to denote the name in the object of the communication is bound (cf. π-calculus bound output). In the case of internal steps, the ω annotation identifies the authorizations lacking for the synchronization to take place, and we use τ to abbreviate τ(a)0 (b)0 where no authorizations are lacking. For a given label α, n(α), fn(α) and bn(α) represents the set of label names, free names and bound names, respectively, all defined in expected lines. 8 (l-out) (l-out-a) (l-in) a!b a!b.P −−→ (a)P (l-in-a) ahbi a?b a(b) a?x.P −−→ (a)P {b/x} ahbi.P −−→ (a)P a(b).P −−→ (a)(b)P (l-par) (l-in-rep) α P − →Q (a)a?b !(a)a?x.P −−−−→ (a)P {b/x} | !(a)a?x.P α P |R− →Q|R (l-open) (l-res) α P − →Q (a)i a!b a∈ / n(α) P −−−−→ Q α (νb)(a) a!b (νb)P −−−−−−−→ Q (l-scope-ext) τω(a) (l-scope) σa P −−−→ Q α P −→ Q τω P − →Q τω(a) 6= α 6= σa α (a)σa (a)P −→ Q a 6= b i (νa)P − → (νa)Q (l-scope-int) bn(α) ∩ fn(R) = ∅ (a)P − → (a)Q (a)P −−−→ Q (l-comm) (a)i a!b P −−−−→ P ′ (a)j a?b Q −−−−−→ Q′ ω = (a)2−i−j τ ω P ′ | Q′ P | Q −→ (l-close) (νa)(b)i b!a P −−−−−−−→ P ′ (b)j b?a Q −−−−→ Q′ ω = (b)2−i−j τω ′ a∈ / f n(Q) ′ P | Q −→ (νa)(P | Q ) (l-auth) (b)k (a)i ahbi P −−−−−−−→ P ′ (a)j a(b) Q −−−−−→ Q′ ω = (a)2−i−j (b)1−k τ ω P ′ | Q′ P | Q −→ Table 7: The transition rules. The transition relation is the least relation included in P × A × P, where P is the set of all processes and A is the set of all actions, that satisfies the rules in Table 7, which we now briefly describe. The rules (l-out), (l-in), (l-out-a), (l-in-a) capture the actions that correspond to the communication prefixes. Notice that in each rule the continuation is activated under the scope of the authorization required for the action (and provided in case of authorization reception), so as to capture confinement. Notice the labels are not decorated with the corresponding authorizations, which represents that the actions are not carrying any authorizations, omitting (a)0 annotations. In contrast, replicated input is authorized by construction, which is why in (l-in-rep) the label is decorated with the corresponding authorization. Rule (l-par) is adopted from the π-calculus, lifting the actions of one of the branches (the symmetric rule is omitted) while avoiding unintended name capture. The rules for restriction (l-res) and (l-open) follow the lines of the ones given for the π-calculus. Rule (l-res) says that actions of P are also actions of (νa)P, provided that the restricted name is not specified in the action, and (l-open) captures the bound output case, opening the scope of the restricted name a, thus allowing for scope extrusion. The rule (l-scope-int) shows the case of a synchronization that lacks an authorization on a, so at the level of the authorization scope the action exhibited no longer lacks the respective authorization and leads to a state which no longer specifies the authorization scope. We use ω(a) to abbreviate (a)2 (b)k , (a)1 (b)k , and (b)i+j (a)1 in which case ω is obtained by the respective exponent decrement. We remark that in contrast to the extrusion of a restricted name via bound output, where the scope floats up to the point a synchronization (rule (l-close) explained below), authorization scopes actually float down to the level of communication prefixes (cf. rules (l-out), (l-in), (l-out-a), (l-in-a)), so as to capture confinement. Rule (l-scope-ext) follows similar lines as (l-scope-int) as it also refers to lacking authorizations, specifically for the case of an (external) action that is not carrying a necessary authorization. We use σa to denote both an action that specifies a as communication subject (cf. αa ) and is annotated with (a)0 (including bound output), and of the form (b)i bhai where i ∈ {0, 1} (which includes (a)1 ahai where a second authorization on a is lacking). We also use (a)σa to denote 9 the respective annotation exponent increase. Rule (l-scope) captures the case of an action that is not lacking an authorization on a, in which case the action crosses seamlessly the authorization scope for a. The synchronization of parallel processes is expressed by the last three rules, omitting the symmetric cases. In rule (l-comm) one process is able to send and other to receive a name b along name a so the synchronization may take place. Notice that if the sending and receiving actions are not carrying the appropriate authorizations, then the transition label τω specifies the lacking authorizations (the needed two minus the existing ones). In rule (l-close) the scope of a bound name is closed. One process is able to send a bound name a and the other to receive it, along name b, so the synchronization may occur leading to a configuration where the restriction scope is specified (avoiding unintended name capture) so as to finalize the scope extrusion. The authorization delegation is expressed by rule (l-auth), where an extra annotation for ω is considered given the required authorization for the delegated authorization. Carried authorization annotations, considered here up to permutation, thus identify, in a compositional way, the requirements for a synchronization to occur. To illustrate the transition system, let us consider process P = (a)((a)(a)((b)ahbi.0 | a(b).0) | R). ahbi (b)ahbi Using the rule (l-out-a) we obtain ahbi.0 −−→ (a)0 and using (l-scope-ext) we get (b)ahbi.0 −−−−→ a(b) (a)0. In parallel, by rule (l-in-a) a(b).0 −−→ (a)(b)0, and using the rule (l-auth) we obtain τ(a)(a) (b)ahbi.0 | a(b).0 −−−−→ (a)0 | (a)(b)0. Since the action is pending on two authorizations (a) we now apply (l-scope-int) twice τ (a)(a)((b)ahbi.0 | a(b).0) − → (a)0 | (a)(b)0. Applying (l-par) and (l-scope) we get τ P − → (a)(((a)0 | (a)(b)0) | R). For the sake of showing the equivalence between the semantics induced by reduction and by the labelled transition system we must focus on τ transitions where no authorizations are lacking. τ Theorem 2.1 (Harmony). P → Q if and only if P − →≡ Q. Proof. We get one implication by induction on the derivation P → Q and the other by induction on τ the derivation on P − → Q (See Appendix A.1). Both presentations of the semantics inform on the particular nature of authorizations in our model. As usual, the labeled transition system is more directly explicit, but the more compact reduction semantics allows for a more global view of authorization manipulation. In what follows we present the type system that allows to statically identify processes that never incur in authorization errors. 3 Type System In this section we present a typing discipline that allows to statically identify safe processes, i.e., that never incur in an error (cf. Definition 2.1), hence that do not exhibit actions lacking the proper authorizations. As mentioned in the Introduction, our typing analysis addresses configurations where authorizations can be granted contextually. Before presenting the typing language which talks about the names that can be safely communicated on channels, we introduce auxiliary notions that cope with name generation, namely symbol annotations and well-formedness. Since the process model includes name restrictions and our types contain name identities, we require a symbolic handling of such bound names when they are included in type specifications. Without loss of generality, we refine the process model for the purpose of the type analysis adding an explicit symbolic representation of name restrictions. In this way we avoid a more involved treatment of bound names in typing environments. Formally, we introduce a countable set of symbols S ranged over by r, s, t, . . . , disjoint with the set of names N , and symbol ν not in N ∪ S. Also, in order to introduce a unique association of 10 ω ::= ϕ | ν T ::= ω(T ) | ∅ Table 8: Syntax of types restricted names and symbols, we refine the syntax of the name creation construct (νa)P in two possible ways: (νa : r)P and (νa : ν)P, decorated with symbol from S or with symbol ν, respectively. We use sym(P ) to denote a set of all symbols from S in process P. Names associated with symbols from S may be subject to contextual authorizations, while names associated with symbol ν are not subject to contextual authorizations. The latter can be communicated in a more flexible way since on the receiver side there can be no expectation of relying on contextual authorizations. For the purpose of this section we adopt the reduction semantics, adapted here considering refined definitions of structural congruence and reduction. In particular for structural congruence, we omit rule (sc-res-inact) ((νa)0 ≡ 0) and we decorate name restriction accordingly in rules (sc-res-swap), (sc-res-extr) and (sc-scope-auth)—e.g., P | (νa : r)Q ≡ (νa : r)(P | Q) and P | (νa : ν)Q ≡ (νa : ν)(P | Q) keeping the side condition a ∈ / fn(P ). We remark that the omission of axiom (sc-res-inact) is not new in process models where name restriction is decorated with typing information (cf. [1]). The annotations with symbols from S allow to yield a unique identification of the respective restricted names. The processes we are interested in have unique occurrences of symbols from S and do not contain occurrences of such symbols in replicated input. We say that process P is well-formed if it does not contain two occurrences of the same symbol from S and for any subprocess P ′ of P that is prefixed by replicated input sym(P ′ ) = ∅. As shown later, any typable process is well-formed, and we may show that well-formedness is preserved by structural congruence and reduction. We may now introduce the type language, which syntax is given in Table 8, that allows to identify safe instantiations of channel names that are subject to contextual authorizations. By ϕ we represent a set of names from N and of symbols from S. We use ω, which stands for a set ϕ or the symbol ν, to characterize either names that may be instantiated (with a name in ϕ) or that are not subject to contextual authorizations (ν). In a type ω(T ) the carried type (T ) characterizes the names that can be communicated in the channel. Type ∅ represents (ground) names that cannot be used for communication. As usual, we define typing environments, denoted with ∆, as a set of typing assumptions each associating a type to a name a : T . We represent by names(T ) the set of names that occur in type T and by names(∆) the set of names that occur in all entries of ∆. We may now present the type system, defined inductively in the structure of processes, by the rules given in Table 9. A typing judgment ∆ ⊢ρ P states that P uses channels as prescribed by typing environment ∆ and that P can only be placed in contexts that provide the authorizations given in ρ, which is a multiset of names (from N , including their multiplicities). The use of a multiset can be motivated by considering process a!b.0 | a?x.0 that can be typed as a : {a}({b}(∅)) ⊢ρ a!b.0 | a?x.0 where necessarily ρ contains {a, a} which specifies that the process can only be placed in contexts that offer two authorizations on name a (one is required per each communicating prefix). We comment on the salient points of the typing rules: • (t-stop): The inactive process is typable using any ∆ and ρ. • (t-par): If processes P1 and P2 are typed under the same environment ∆, then P1 | P2 is typed under ∆ also. Consider that P1 and P2 own enough authorizations when placed in contexts providing authorizations ρ1 and ρ2 , respectively. Then, the process P1 | P2 will have enough authorizations if it is placed in a context providing the sum of authorizations from ρ1 and ρ2 . By ρ1 ⊎ ρ2 we represent the addition operation for multisets which sums the frequencies of the elements. The side condition sym(P1 ) ∩ sym(P2 ) = ∅ is necessary to ensure the unique association of symbols and names. • (t-auth): Processes (a)P and P are typed under the same environment ∆, due to the fact that scoping is a non-binding operator. If process P owns enough authorizations when placed in a context that provides authorizations ρ ⊎ {a}, then (a)P owns enough authorizations when placed in a context that provides authorizations ρ. • (t-new): If process P is typable under an environment that contains an entry for a, then the process with restricted name (νa : r)P is typed under the environment removing the entry for a and where each occurrence of name a in ∆ is substituted by the symbol r. By ∆{r/a} we represent the environment obtained by replacing every occurrence of a by r in every typing 11 (t-stop) ∆ ⊢ρ 0 (t-auth) (t-par) ∆ ⊢ρ1 P1 ∆ ⊢ρ2 P2 sym(P1 ) ∩ sym(P2 ) = ∅ ∆ ⊢ρ1 ⊎ρ2 P1 | P2 ∆ ⊢ρ⊎{a} P ∆ ⊢ρ (a)P (t-new) ∆′ = ∆{r/a} r ∈ / sym(P ) ∆′ ⊢ρ (νa : r)P ∆, a : {a}(T ) ⊢ρ P a∈ / ρ, names(T ) (t-new-rep) ∆, a : ν(T ) ⊢ρ P a ∈ / ρ, names(T, ∆) ∆ ⊢ρ (νa : ν)P (t-out) ∆ ⊢ρ P ∆(a) = ω(ω ′ (T )) ∆(b) = ω ′′ (T ) ω ′′ ⊆ ω ′ ∆ ⊢ρ a!b.P a∈ /ρ⇒ω⊆ρ (t-in) ∆, x : T ⊢ρ P ∆(a) = ω(T ) x ∈ / ρ, names(∆) ∆ ⊢ρ a?x.P a∈ /ρ⇒ω⊆ρ (t-rep-in) ∆, x : T ⊢{a} P ∆(a) = ω(T ) x ∈ / ρ, names(∆) sym(P ) = ∅ ∆ ⊢ρ !(a)a?x.P (t-deleg) ∆ ⊢ρ P ∆(a) = ω(T ) a ∈ /ρ⇒ω⊆ρ ∆ ⊢ρ⊎{b} ahbi.P (t-recep) ∆ ⊢ρ⊎{b} P ∆(a) = ω(T ) a ∈ /ρ⇒ω⊆ρ ∆ ⊢ρ a(b).P Table 9: Typing rules. assumption in ∆, hence in every type, where we exclude the case when a has an entry in ∆. The side condition r ∈ / sym(P ) is necessary for the uniqueness of the symbol and name pairings and a ∈ / ρ, names(T ) says that the context cannot provide authorization for the private name and for ensuring consistency of the typing assumption. The symbolic representation of a bound name in the typing environment enables us to avoid the case when a restricted (unforgeable) name could be sent to a process that expects to provide a contextual authorization for the received name. For example consider process (νb : r)(a)a!b.0 | (a)(d)a?x.x!c.0 where a contextual authorization for d is specified, a configuration excluded by our type analysis since the assumption for the type of channel a carries a symbol (e.g., a : {a}({r}(∅))) for which no contextual authorizations can be provided. Notice that the typing of the process in the scope of the restriction uniformly handles the name, which leaves open the possibility of considering contextual authorizations for the name within the scope of the restriction. • (t-new-rep): The difference with respect to rule (t-new) is that no substitution is performed since the environment must already refer to symbol ν in whatever pertains to the restricted name (notice the side condition). For example to type process (νb : ν)(a)a!b.0 the type of a must be ω(ν(T )) for some ω and T where ν identifies the names communicated in a are never subject to contextual authorizations. • (t-out): Process P is typed under an environment where types of names a and b are such that all possible replacements for name b (which are given by ω ′′ ) are safe to be communicated along name a (which is formalized by ω ′′ ⊆ ω ′ , where ω ′ is the carried type of a), and also that T (the carried type of b) matches the specification given in the type of a. In such case the process a!b.P is typed under the same environment. There are two possibilities to ensure name a is authorized, namely the context may provide directly the authorization for name a or it may provide authorizations for all replacements of name a, formalized as a ∈ / ρ ⇒ ω ⊆ ρ. Notice this latter option is crucial to address contextual authorizations and that in such case 12 ω does not contain symbols (since ρ by definition does not). • (t-in): This rule is readable under the light of principles explained in the previous rule. • (t-rep-in): The continuation is typed considering an assumption for the input bound name x and that ρ = {a}, which specifies that the expected context provides authorizations only for name a. In such a case, the replicated input is typable considering the environment obtained by removing the entry for x, which must match the carried type of a, provided that x ∈ / ρ, names(∆) since it is bound to this process, and that process P does not contain any symbols from S, necessary to ensure the unique association of symbols and names when copies of the replicated process are activated (see the discussion on the example shown in (5) at the end of this Section). In that case, process !(a)a?x.P can be placed in any context that conforms with ∆ and (any) ρ. • (t-deleg), (t-recep): In these rules the typing environment is the same in premises and conclusion. The handling of the subject of the communication (a) is similar to, e.g., rule (t-out). The way in which the authorization is addressed in rule (t-recep) follows the lines of rule (t-auth). In rule (t-deleg) the authorization for b is added to the ones expected from the context. Notice that in such way no contextual authorizations can be provided for delegation, but generalizing the rule is direct following the rules for other prefixes. We say process P is well-typed if ∆ ⊢∅ P and ∆ only contains assumptions of the form a : {a}(T ) or a : ν(T ). At top level the typing assumptions address the free names of the process, which are not subject to instantiation. Free names are either characterized by a : {a}(T ) which says that a cannot be replaced, or by a : ν(T ) which says that a is not subject to contextual authorizations. For example, process (a)a!b.0 | (a)(b)a?x.x!c.0 is typable under the assumption that name b has type {b}({c}(∅)), while it is not typable under the assumption ν({c}(∅)). The fact that no authorizations are provided by the context (ρ = ∅) means that the process P is self-sufficient in terms of authorizations. We may now present our results, starting by mentioning some fundamental properties. We may show that typing derivations enjoy standard properties (Weakening and Strengthening) and that typing is preserved under structural congruence (Subject Congruence). As usual, to prove typing is preserved under reduction we need an auxiliary result that talks about name substitution. Lemma 3.1 (Substitution). Let ∆, x : ω(T ) ⊢ρ P and x ∈ / names(∆). 1. If ∆(a) = {a}(T ) and a ∈ ω then ∆ ⊢ρ{a/x} P {a/x}. 2. If ∆(a) = ν(T ) and ν = ω then ∆ ⊢ρ{a/x} P {a/x}. Proof. The proof is by induction on the depth of the derivation ∆ ⊢ρ P (See Appendix A.2). We remark that the name (a) must be contained in the set of possible instantiations for the name that a is replacing (x), and the two names must have the same carried type (T ). Even though subtyping is not present, the inclusion principle used in Lemma 3.1 already hints on a substitutability notion. Our first main result says that typing is preserved under reduction. Theorem 3.1 (Subject Reduction). If P is well-typed, ∆ ⊢∅ P and P → Q then ∆ ⊢∅ Q. Proof. The proof is by case analysis on last reduction step (See Appendix A.2). Not surprisingly, since errors involve redexes, the proof of Theorem 3.1 is intertwined with the proof of the error absence property included in our second main result. Proposition 3.1 captures the soundness of our typing analysis, i.e., that well-typed processes are well-formed and are not stuck due to the lack of proper authorizations, hence are not errors (cf. Definition 2.1). Proposition 3.1 (Typing Soundness). 1. If ∆ ⊢ρ P then P is well-formed. 2. If P is well-typed then P is not an error. Proof. Immediate from auxiliary result (see Appendix A.2). As usual, the combination of Theorem 3.1 and Proposition 3.1 yields type safety. Corollary 3.1 (Type Safety). If P is well-typed and P →∗ Q then Q is not an error. 13 The type safety ensures that well-typed processes will never lack the necessary authorizations to carry out their communications. To illustrate the typing rules recall the example from the Introduction (exam)(minitest )(alice)alice?x.x?Task (1) and the type {alice}({exam, minitest }(∅)) assigned to channel name alice. Following typing rule (t-in), we see that name x is typed with {exam, minitest}(∅), i.e., the carried type of alice. Now, knowing that name x can be instantiated by exam or minitest in order to apply rule (t-in) considering contextual authorizations we must check whether the authorizations to use both names are provided (contained in ρ). Furthermore, consider that the process shown in (1) is composed in parallel with another process willing to send a name along alice, specifically (alice)alice!exam.0 | (exam)(minitest)(alice)alice?x.x?Task. (2) Considering the same typing assumption for alice (with type {alice}({exam, minitest }(∅))), and assuming that name exam has type {exam}(∅), by rule (t-out) we can conclude that it is safe to send name exam along alice, since {exam} is contained in {exam, minitest }, the (only) instantiation of exam is contained in the carried type of alice. Now consider that the latter process is placed in the context where name exam is restricted (νexam : r)((alice)alice!exam.0 | (exam)(minitest)(alice)alice?x.x?Task). (3) In order to type this process, the assumption for alice considers type {alice}({r, minitest}(∅)), representing that in alice a restricted name can be communicated. Hence, the process shown in (3) cannot be composed with others that rely on contextual authorizations for names exchanged in alice. This follows from the fact that the multiset of provided authorizations ρ by definition can contain only names and not symbols. To use names received along alice one has to specify an authorization for all possible receptions (e.g. (alice)alice?x.(x)x?Task), or rely on authorization delegation. Let us also consider process !(license)license?x.(νexam : r)((x)x!exam.0 | (x)(exam)x?y.y!task .0) (4) that models a server that receives a name and afterwards it is capable of both receiving (on the lhs) and sending (a fresh name, on the rhs) along the received name. Our typing analysis excludes this process since it contains a symbol (r) in a replicated input (see rule (t-rep-in)). To show why names bound inside a replicated input cannot be subject to contextual authorizations, even inside the scope of the restriction (like in (3)), consider that the process shown in (4) may evolve by receiving name alice twice, to (νexam1 : r)((alice)alice!exam1 .0 | (exam1 )(alice)alice?y.y!task .0) | (νexam2 : r)((alice)alice!exam2 .0 | (exam2 )(alice)alice?y.y!task .0). (5) where two copies of the replicated process are active in parallel, and where two different restricted names can be sent on alice, hence leading to an error when the contextual authorization does not match the received name (e.g., (exam2 )(alice)exam1 !task .0). In order to address name generation within replicated input we use distinguished symbol ν that captures the fact that such names are never subject to contextual authorizations. This means that names typed with ν both within their scope and outside of it cannot be granted contextual authorizations. Hence the process obtained by replacing the r annotation by ν in (4), concretely !(license)license?x.(νexam : ν)((x)x!exam .0 | (x)(exam)x?y.y!task .0) (6) is also not typable since a contextual authorization is expected for name exam. Notice this configuration leads to an error like the one shown in (5). However process !(license)license?x.(νexam : ν)(alice)alice!exam.0 (7) is typable, hence may be safely composed with contexts that comply with assumption alice : {alice}(ν(T )), i.e., do not rely on contextual authorizations for names received on alice. We remark that our approach can be generalized to address contextual authorizations for name generation in the context of certain forms of infinite behavior, namely considering recursion together with linearity constraints that ensure race freedom (like in the setting of behavioral types [10]). 14 4 Concluding remarks In the literature we find a plethora of techniques that address resource usage control, ranging from locks that guarantee mutual exclusion in critical code blocks to communication protocols (e.g., token ring). Several typing disciplines have been developed to ensure proper resource usage, such as [5, 9, 13], where capabilities are specified in the type language, not as a first class entity in the model. Therefore in such approaches it is not possible to separate resource and capability like we do—cf. the “unauthorized” intermediaries such as brokers mentioned in the Introduction. We distinguish an approach that considers accounting [5], in the sense that the types specify the number of messages that may be exchanged, which therefore relates to the notion of accounting presented here. We also find proposals of models that include capabilities as first class entities, addressing usage of channels and of resources as communication objects, such as [4, 8, 11, 14]. More specifically, constructs for restricting (hiding and filtering) the behaviors allowed on channels [8, 14], usage specification in a (binding) name scope construct [11], and authorization scopes for resources based on given access policies [4]. We distinguish our approach from [8, 14] since the proposed constructs are static and not able to capture our notion of a floating resource capability. As for [11], the usage specification directly embedded in the model resembles a type and is given in a binding scoping operator which contrasts with our non-binding authorization scoping. Also in [4] detailed usage policies are provided associated to the authorization scopes for resources. In both [4, 11] the models seem less adequate to capture our notion of floating authorizations as access is granted explicitly and controlled via the usage/policy specification, and for instance our notion of confinement does not seem to be directly representable. We believe our approach can be extended by considering some form of usage specifications like the ones mentioned above [4, 11], by associating to each authorization scoping more precise capabilities in the form of behavioral types [10]. It would also be interesting to resort to refinement types [6] to carry out our typing analysis, given that our types can be seen to some extent as refinements on the domain of names, an investigation we leave to future work. Perhaps even more relevant would be to convey our principles to the licensing domain where we have identified related patents [2, 3] for the purpose of certifying license usage. At this level it would be important to extend our work considering also non-consumptive authorizations in the sense of authorizations that can be placed back to their original scope after they have been used. We have presented a model that addresses floating authorizations, a notion we believe is unexplored in the existing literature. We based our development on previous work [7] by extending the model in a minimal way so to carry out our investigation, even though the required technical changes revealed themselves to be far from straightforward. We left out non-determinism in the form of choice since our focus is on the interplay between parallel composition and authorization scope, and we believe adding choice to our development can be carried out in expected lines. We remark that in [7] a certain form of accounting inconsistency when handling authorization delegation was already identified, while in this work we believe accounting is handled consistently throughout the model. We intend to study the behavioral theory of our model, also for the sake of illuminating our notion of floating authorizations and their accounting, where for instance an axiomatization of the behavioral semantics would surely be informative on the authorization scoping construct. We also presented a typing analysis that addresses contextual authorizations, which we also believe is unexplored in the literature in the form we present it here. Our typing rules induce a decidable type-checking procedure, since rules are syntax directed, provided as usual that a (carried) type annotation is added to name restrictions. However, we have already started working on a typechecking procedure nevertheless based on our typing rules but where the focus is on efficiency, namely at the level of distributing authorizations provided by the environment to (parallel) subsystems. This allows for fine-grained information on authorizations actually required by processes, which will hopefully lead to identifying principles that may be used for the sake of type inference. A notion of substitutability naturally arises in our typing analysis and we leave to future work a detailed investigation of a subtyping relation that captures such notion, but we may mention that our preliminary assessment actually hinted on some non standard features with respect to variance and covariance of carried types. References [1] Lucia Acciai and Michele Boreale. Spatial and behavioral types in the pi-calculus. Inf. Comput., 208(10):1118–1153, 2010. 15 [2] William Joseph Armstrong, Naresh Nayar, and Kevin Patrick Stamschror. Management of a concurrent use license in a logically-partitioned computer, October 25 2005. US Patent 6,959,291. [3] Paolo Baratti and Paolo Squartini. License management system, June 3 2003. US Patent 6,574,612. [4] Chiara Bodei, Viet Dung Dinh, and Gian Luigi Ferrari. Checking global usage of resources handled with local policies. Sci. Comput. Program., 133:20–50, 2017. [5] Ankush Das, Jan Hoffmann, and Frank Pfenning. Work analysis with resource-aware session types. CoRR, abs/1712.08310, 2017. [6] Timothy S. Freeman and Frank Pfenning. Refinement types for ML. In David S. Wise, editor, Proceedings of the ACM SIGPLAN’91 Conference on Programming Language Design and Implementation (PLDI), Toronto, Ontario, Canada, June 26-28, 1991, pages 268–277. ACM, 1991. [7] Silvia Ghilezan, Svetlana Jakšić, Jovanka Pantović, Jorge A. Pérez, and Hugo Torres Vieira. Dynamic role authorization in multiparty conversations. Formal Asp. Comput., 28(4):643–667, 2016. [8] Marco Giunti, Catuscia Palamidessi, and Frank D. Valencia. Hide and new in the pi-calculus. In Proceedings of the Combined 19th International Workshop on Expressiveness in Concurrency and 9th Workshop on Structured Operational Semantics, EXPRESS/SOS 2012, volume 89 of EPTCS, pages 65–79, 2012. [9] Daniele Gorla and Rosario Pugliese. Dynamic management of capabilities in a network aware coordination language. J. Log. Algebr. Program., 78(8):665–689, 2009. [10] Hans Hüttel, Ivan Lanese, Vasco T. Vasconcelos, Luı́s Caires, Marco Carbone, Pierre-Malo Deniélou, Dimitris Mostrous, Luca Padovani, António Ravara, Emilio Tuosto, Hugo Torres Vieira, and Gianluigi Zavattaro. Foundations of session types and behavioural contracts. ACM Comput. Surv., 49(1):3:1–3:36, 2016. [11] Naoki Kobayashi, Kohei Suenaga, and Lucian Wischik. Resource usage analysis for the pcalculus. Logical Methods in Computer Science, 2(3), 2006. [12] Davide Sangiorgi and David Walker. The Pi-Calculus - a theory of mobile processes. Cambridge University Press, 2001. [13] Nikhil Swamy, Juan Chen, and Ravi Chugh. Enforcing stateful authorization and information flow policies in fine. In Programming Languages and Systems, 19th European Symposium on Programming, ESOP 2010, Proceedings, volume 6012 of LNCS, pages 529–549. Springer, 2010. [14] José-Luis Vivas and Nobuko Yoshida. Dynamic channel screening in the higher order pi-calculus. Electr. Notes Theor. Comput. Sci., 66(3):170–184, 2002. 16 A Appendix A.1 Proofs from Section 2 α Lemma A.1 (Inversion on Labelling). Let P − → Q. 1. If α = (a)i a!b then a, b ∈ fn(P ). 2. If α = (νb)(a)i a!b then a ∈ fn(P ) and b ∈ bn(P ). 3. If α = (a)i a?b then a ∈ fn(P ). 4. If α = (a)i (b)j ahbi then a, b ∈ fn(P ). 5. If α = (a)i a(b) then a, b ∈ fn(P ). α Proof. The proof is by induction on the inference of P − → Q. We comment just the first and the second assertions. a!b 1 . The base case for P −−→ Q is the rule (l-in), then P = a!b.Q and a, b ∈ fn(P ). We comment only a!b a!b the case when the last applied rule is (l-res): (νc)P ′ −−→ (νc)Q′ is derived from P ′ −−→ Q′ , where c∈ / {a, b} and by the induction hypothesis a, b ∈ fn(P ′ ), which implies a, b ∈ fn(P ′ )\{c} = fn((νc)P ′ ). (a)a!b a!b The base case for α = (a)a!b is when (a)P ′ −−−−→ Q is derived from P ′ −−→ Q by (l-scope-ext). Then, by the first part of the proof a, b ∈ fn(P ′ ), thus a, b ∈ fn((a)P ′ ). (νb)(a)i a!b (a)i a!b 2 . We only comment the base case: (νb)P −−−−−−−→ Q is derived from P −−−−→ Q, where a 6= b, by the rule (l-open), then from the first assertion of this Lemma we get a, b ∈ fn(P ). From this it directly follows a ∈ fn((νb)P ) and b ∈ bn((νb)P ). α Lemma A.2 (LTS Closure Under Structural Congruence). If P ≡ P ′ and P − → Q, then there exists ′ ′ α ′ ′ some Q such that P − → Q and Q ≡ Q . Proof. The proof is by induction on the length of the derivation of P ≡ P ′ . We detail only the case when the last applied rule is (sc-res-extr) P1 | (νa)P2 ≡ (νa)(P1 | P2 ) if a ∈ / fn(P1 ). We have two possible transitions for (νa)(P1 | P2 ), by (l-res) and (l-open): α α • (l-res): Assume that (νa)(P1 | P1 ) − → (νa)R, where a ∈ / n(α) is derived from (P1 | P2 ) − → R. Then, possible transitions for P1 | P2 are: α α → P2′ . Since → P1 | P2′ , where bn(α) ∩ fn(P1 ) = ∅ is derived from P2 − – (l-par): P1 | P2 − α α ′ → P1 | (νa)P2′ . → (νa)P2 and by (l-par) P1 | (νa)P2 − a∈ / n(α), by (l-res) we get (νa)P2 − α α → P1′ , then, since fn((νa)P2 ) ⊆ → P1′ | P2 , where bn(α) ∩ fn(P2 ) = ∅ and P1 − If P1 | P2 − α ′ → P1 | (νa)P2 . fn(P2 ), by (l-par) we get P1 | (νa)P2 − α α 1 P1′ → P1′ | P2′ and α = τω , where ω = (b)2−i−j is derived from P1 −→ – (l-comm): P1 | P2 − α2 and P2 −→ P2′ , for α1 , α2 ∈ {(b)i b!c, (b)j b?c}. By Lemma A.1 we get b ∈ fn(P1 , P2 ). Thus from a ∈ / fn(P1 ) we get b 6= a. Then, we have two cases: (νa)α2 ∗ if c = a and α2 = (b)i b!a. Then, by (l-open) (νa)P2 −−−−→ P2′ and by (l-close) τω (νa)(P1′ | P2′ ); P1 | (νa)P2 −→ α τ ω 2 (νa)P2′ and by (l-comm) P1 | (νa)P2 −→ ∗ if c 6= a, then by (l-res) (νa)P2 −→ P1′ | (νa)P2′ . α → (νc)(P1′ | P2′ ) and α = τω , where ω = (b)2−i−j is derived from – (l-close): P1 | P2 − α2 α1 ′ P2′ , for α1 , α2 ∈ {(νc)(b)i b!c, (b)j b?c}. By Lemma A.1 we get P1 −→ P1 and P2 −→ b ∈ fn(P1 , P2 ) and c ∈ bn(P1 , P2 ). Since a ∈ / fn(P1 ) and assuming all bound names α2 (νa)P2′ and by (l-close) are different, we get a ∈ / {b, c}. Thus, by (l-res) (νa)P2 −→ τω ′ ′ P1 | (νa)P2 −→ (νc)(P1 | (νa)P2 ). α → P1′ | P2′ and α = τω , where ω = (b)2−i−j (c)1−k is derived from – (l-auth): P1 | P2 − α2 α1 P2′ , for α1 , α2 ∈ {(b)i (c)k bhci, (b)j b(c)}. By Lemma A.1 we get P1 −→ P1′ and P2 −→ α2 (νa)P2′ c, b ∈ fn(P1 , P2 ). Since a ∈ / fn(P1 ) we get a ∈ / {b, c}. Thus, by (l-res) (νa)P2 −→ τω ′ ′ and by (l-auth) P1 | (νa)P2 −→ P1 | (νa)P2 . 17 (νa)(b)i b!a • (l-open): Assume that (νa)(P1 | P2 ) −−−−−−−→ R, is derived from (b)i b!a P1 | P2 −−−−→ R, where a 6= b. Since a ∈ / fn(P1 ) and by Lemma A.1 we get that P1 | P2 (b)i b!a (b)i b!a could be only derived using (l-par) P1 | P2 −−−−→ P1 | P2′ from P2 −−−−→ P2′ . By (l-open) (νa)(b)i b!a (νa)(b)i b!a (νa)P2 −−−−−−−→ P2′ and by (l-par) we get P1 | (νa)P2 −−−−−−−→ P1 | P2′ . Lemma A.3 (Inversion on LTS). Let P and Q be processes. a!b 1. If P −−→ Q then ′ ′ ˜ ˜ P ≡ (ν d)C[a!b.P ] and Q ≡ (ν d)C[(a)P ] and drift (C[·]; a) is undefined; (a)a!b 2. If P −−−−→ Q then ′ ˜ ˜ − [(a)P ′ ], for C − [·] = drift (C[·]; a); P ≡ (ν d)C[a!b.P ] and Q ≡ (ν d)C (νb)a!b 3. If P −−−−→ Q then ′ ′ ˜ ˜ P ≡ (ν d)(νb)C[a!b.P ] and Q ≡ (ν d)C[(a)P ] and drift (C[·]; a) is undefined; (νb)(a)a!b 4. If P −−−−−−→ Q then ′ ˜ ˜ − [(a)P ′ ], for C − [·] = drift (C[·]; a); P ≡ (ν d)(νb)C[a!b.P ] and Q ≡ (ν d)C a?b ′ ′ ˜ ˜ 5. If P −−→ Q then P ≡ (ν d)C[a?x.P ] and Q ≡ (ν d)C[(a)P {b/x}] and drift (C[·]; a) is undefined; (a)a?b ′ ˜ ˜ − [(a)P ′ {b/x}], for C − [·] = drift (C[·]; a), 6. If P −−−−→ Q then P ≡ (ν d)C[a?x.P ] and Q ≡ (ν d)C (a)ahbi ′ ˜ ˜ − [(a)P ′ ], for C − [·] = drift (C[·]; a) and 7. If P −−−−→ Q then P ≡ (ν d)C[ahbi.P ] and Q ≡ (ν d)C drift (C[·]; a, b) is undefined; (b)ahbi ′ ˜ ˜ − [(a)P ′ ], for C − [·] = drift (C[·]; b) and 8. If P −−−−→ Q then P ≡ (ν d)C[ahbi.P ] and Q ≡ (ν d)C drift (C[·]; a, b) is undefined; (a)(b)ahbi ′ ˜ ˜ − [(a)P ′ ], for C − [·] = drift (C[·]; a, b); 9. If P −−−−−−→ Q then P ≡ (ν d)C[ahbi.P ] and Q ≡ (ν d)C a(b) ′ ′ ˜ ˜ 10. If P −−→ Q then P ≡ (ν d)C[a(b).P ] and Q ≡ (ν d)C[(a)(b)P ] and drift (C[·]; a) is undefined; (a)a(b) ′ ˜ ˜ − [(a)(b)P ′ ], for C − [·] = drift (C[·]; a); 11. If P −−−−→ Q then P ≡ (ν d)C[a(b).P ] and Q ≡ (ν d)C τ 12. If P − → Q then either ′ ˜ – P ≡ (ν d)C[a!b.P , a?x.P ′′ ] and − ˜ [(a)P ′ , (a)P ′′ {b/x}], for C − [·1 , ·2 ] = drift (C[·1 , ·2 ]; a; a), or Q ≡ (ν d)C ′ ˜ – P ≡ (ν d)C[ahbi.P , a(b).P ′′ ] and − ′ ˜ [(a)P , (a)(b)P ′′ ], for C − [·1 , ·2 ] = drift (C[·1 , ·2 ]; a, b; a); Q ≡ (ν d)C τ(a) 13. If P −−→ Q then either ′ ˜ ˜ − [(a)P ′ , (a)P ′′ {b/x}], for – P ≡ (ν d)C[a!b.P , a?x.P ′′ ] and Q ≡ (ν d)C − − C [·1 , ·2 ] = drift (C[·1 , ·2 ]; a; ∅), or C [·1 , ·2 ] = drift (C[·1 , ·2 ]; ∅; a), and drift (C[·1 , ·2 ]; a; a) is undefined, or ′ ˜ ˜ − [(a)P ′ , (a)(b)P ′′ ], for – P ≡ (ν d)C[ahbi.P , a(b).P ′′ ] and Q ≡ (ν d)C − − C [·1 , ·2 ] = drift (C[·1 , ·2 ]; a, b; ∅), or C [·1 , ·2 ] = drift (C[·1 , ·2 ]; b; a), and drift (C[·1 , ·2 ]; a, b; a) is undefined, or ′ ˜ ˜ − [(b)P ′ , (b)(a)P ′′ ], for – P ≡ (ν d)C[bhai.P , b(a).P ′′ ] and Q ≡ (ν d)C − C [·1 , ·2 ] = drift (C[·1 , ·2 ]; b; b) and drift (C[·1 , ·2 ]; b, a; b) is undefined. 18 α Proof. The proof is by induction on the inference of P − → Q. We comment just the first two assertions. a!b ′ ′ ˜ ˜ 1 . Suppose P −−→ Q and let us show that P ≡ (ν d)C[a!b.P ] and Q ≡ (ν d)C[(a)P ] and a!b drift (C[·]; a) is undefined. We get the base case by rule (l-out) a!bP −−→ (a)P. Here, a!bP = C[a!bP ] and (a)P = C[(a)P ], where C[·] = ·. The operator drift (C[·]; a) is undefined, since the second parameter of the operator is not an empty list. For induction steps we have next cases of the last applied rule: (l-res), (l-scope) and (l-par). If the last applied rule is (l-res), we immediately get the result from the induction hypothesis. If the last applied rule is (l-scope), we get a!b a!b ′ ˜ P −−→ Q from the (c)P −−→ (c)Q, where c 6= a. By induction hypothesis P ≡ (ν d)C[a!b.P ] and ′ ˜ Q ≡ (ν d)C[(a)P ] and drift (C[·]; a) is undefined. Considering all free and bound names are different, ′ ′ ˜ ˜ by (sc-scope-auth) we get (c)P ≡ (ν d)(c)C[a!b.P ] and (c)Q ≡ (ν d)(c)C[(a)P ]. For C ′ [·] = (c)C[·] we ′ ′ ′ ′ ′ ˜ ˜ get that (c)P ≡ (ν d)C [a!b.P ] and (c)Q ≡ (ν d)C [(a)P ] and drift (C [·]; a) is undefined since c 6= a. Case (l-par) we get by similar reasoning. (a)a!b (a)a!b 2 . Consider now P −−−−→ Q. We get the base case by rule (l-scope-int): (a)P −−−−→ Q is derived a!b ′ ′ ˜ ˜ from P −−→ Q. By the first part of the proof we get P ≡ (ν d)C[a!b.P ] and Q ≡ (ν d)C[(a)P ] and ˜ Then, by (sc-scope-auth) drift (C[·]; a) is undefined. By Lemma A.1 we get a ∈ fn(P ), thus a 6∈ d. ′ ˜ we get (a)P ≡ (ν d)(a)C[a!b.P ]. For C ′ [·] = (a)C[·], we get drift (C ′ [·]; a) = C[·], which implies Q ≡ ′ ˜ (ν d)C[(a)P ]. Again, for the inductions steps we have same possibilities for the last applied rule : (l-res), (l-scope) and (l-par), all three cases are similar as in the first part of the proof. Proposition A.1 (Inversion on Drift). then: 1. If drift (C[·1 , ·2 ]; a; a) is defined and C[·1 , ·2 ] = C ′ [C1 [·] | C2 [·]] – (case (a) in C1 and C2 ): C1 [·] = C1′ [(a)C1′′ [·]] and C2 [·] = C2′ [(a)C2′′ [·]], where drift (C1′′ [·]; a) and drift (C2′′ [·]; a) are undefined, or – (case (a) in C1 and not in C2 ): C1 [·] = C1′ [(a)C1′′ [·]] and C ′ [·] = C3′ [(a)C3′′ [·]], where drift (C1′′ [·]; a), drift (C2 [·]; a) and drift (C3′′ [·]; a) are undefined, or – ( case (a) not in C1 and it is in C2 ): C2 [·] = C2′ [(a)C2′′ [·]] and C ′ [·] = C3′ [(a)C3′′ [·]], where drift (C2′′ [·]; a), drift (C1 [·]; a) and drift (C3′′ [·]; a) are undefined, or – (case (a) not in C1 and not in C2 ): C ′ [·] = C3 [(a)C3′ [·]] and C3′ [·] = C4 [(a)C4′ [·]], where drift (C1 [·]; a), drift (C2 [·]; a), drift (C4 [·]; a, a) and drift (C4′ [·]; a) are undefined. 2. If drift (C[·1 , ·2 ]; a, b; a) is defined and C[·1 , ·2 ] = C ′ [C1 [·] | C2 [·]] then: – (case (a), (b) in C1 and (a) in C2 ): C1 [·] = C11 [(a)C12 [·]] and C12 [·] = C13 [(b)C14 [·]], and C2 [·] = C2′ [(a)C2′′ [·]], where drift (C12 [·]; a), drift (C14 [·]; b) and drift (C2′′ [·]; a) are undefined, or – (case (a), (b) in C1 and (a) in C2 ): C1 [·] = C11 [(b)C12 [·]] and C12 [·] = C13 [(a)C14 [·]], and C2 [·] = C2′ [(a)C2′′ [·]], where drift (C12 [·]; b), drift (C14 [·]; a) and drift (C2′′ [·]; a) are undefined, or – (case (a), (b) in C1 and (a) not in C2 ): C1 [·] = C11 [(a)C12 [·]] and C12 [·] = C13 [(b)C14 [·]], and C ′ [·] = C3′ [(a)C3′′ [·]], where drift (C12 [·]; a), drift (C14 [·]; b), drift (C2 [·]; a) and drift (C3′′ [·]; a) are undefined, or – (case (a), (b) in C1 and (a) not in C2 ): C1 [·] = C11 [(b)C12 [·]] and C12 [·] = C13 [(a)C14 [·]] and C ′ [·] = C3′ [(a)C3′′ [·]], where drift (C12 [·]; b), drift (C14 [·]; a), drift (C2 [·]; a) and drift (C3′′ [·]; a) are undefined, or – the rest of 10 cases are analog. τ Lemma A.4 (Harmony - LTS). If P → Q then there is Q′ such that Q ≡ Q′ and P − → Q′ . Proof. The proof is by induction on the derivation P → Q. We obtain two base cases: • (r-comm): C[a!b.P ′ , a?x.Q′ ] → C − [(a)P ′ , (a)Q′ {b/x}], for C − [·1 , ·2 ] = drift (C[·1 , ·2 ]; a; a). By (l-out) and a!b a?b (l-in) we get a!b.P ′ −− → (a)P ′ and a?x.Q′ −−→ (a)Q′ {b/x}. By Proposition A.1 we distinguish four cases for the structure of the context C[·1 , ·2 ] = C ′ [C1 [·] | C2 [·]]. We comment only the case when C1 [·] = C1′ [(a)C1′′ [·]] and C2 [·] = C2′ [(a)C2′′ [·]], where drift (C1′′ [·]; a) and drift (C2′′ [·]; a) are undefined, thus in contexts C1′′ [·] and C2′′ [·] the holes are not in the scope of authorizations (a). a!b By induction on contexts C1′′ [·] and C2′′ [·] using rules (l-par) and (l-scope) we get C1′′ [a!b.P ′ ] −−→ (a)a!b a?b C1′′ [(a)P ′ ] and C2′′ [a?x.Q′ ] −−→ C2′′ [(a)Q′ {b/x}]. By (l-scope-ext) we get (a)C1′′ [a!b.P ′ ] −−−−→ 19 (a)a?b C1′′ [(a)P ′ ] and (a)C2′′ [a?x.Q′ ] −−−−→ C2′′ [(a)Q′ {b/x}]. Proceeding by induction on contexts C1′ [·] (a)a!b and C2′ [·] using rules (l-par) and (l-scope) we get C1′ [(a)C1′′ [a!b.P ′ ]] −−−−→ C1′ [C1′′ [(a)P ′ ]] and (a)a?b C2′ [(a)C2′′ [a?x.Q′ ]] −−−−→ C2′ [C2′′ [(a)Q′ {b/x}]]. By (l-comm) τ C1′ [(a)C1′′ [a!b.P ′ ]] | C2′ [(a)C2′′ [a?x.Q′ ]] − → C1′ [C1′′ [(a)P ′ ]] | C2′ [C2′′ [(a)Q′ {b/x}]]. By induction on the structure of context C ′ [·] and using rules (l-par) and (l-scope) again, we get τ C[a!b.P ′ , a?x.Q′ ] − → C ′ [C1′ [C1′′ [(a)P ′ ]] | C2′ [C2′′ [(a)Q′ {b/x}]]]. Now we just need to note that drift (C[·1 , ·2 ]; a; a) = C ′ [C1′ [C1′′ [·]] | C2′ [C2′′ [·]]. • (r-auth) apply similar reasoning. For the induction step we have two possible last applied rules: τ (r-newc): Assume that (νa)P → (νa)Q is derived from P → Q. By induction hypothesis P − → Q′ τ where Q ≡ Q′ . By (l-res) we get (νa)P − → (νa)Q′ . By contextually of ≡, from Q ≡ Q′ we get ′ (νa)Q ≡ (νa)Q . (r-stru): Assume that P → Q is derived from P ≡ P ′ → Q′ ≡ Q. From the induction hypothesis τ ′ τ P − → Q′′ , where Q′ ≡ Q′′ . By Lemma A.2 we get P − → Q′′′ , where Q′′′ ≡ Q′′ . Since the structural congruence is equivalence relation we get Q′′′ ≡ Q′′ ≡ Q′ ≡ Q. τ Lemma A.5 (Harmony - Reduction). If P − → Q then P → Q. τ Proof. The proof is by induction on the derivation P − → Q. The base cases are obtained by: α τ α → P2 and Q1 − → P2 | Q2 is derived from P1 − • (l-comm): If P1 | Q1 − → Q2 , where α, α ∈ {(a)a!b, (a)a?b}. By Lemma A.3, one possibility is, up to the structural congruence P1 , Q1 ∈ {(ν d˜1 )C1 [a!b.P1′ ], (ν d˜2 )C2 [a?b.Q′1 ]} and ˜ − [(a)P ′ ], (ν d˜2 )C − [(a)Q′ {b/x}]}. P2 , Q2 ∈ {(ν d)C 1 1 1 2 where C1− = drift (C1 [·]; a) and C2− = drift (C2 [·]; a). By (sc-res-extr) we have (ν d˜1 )C1 [a!b.P1′ ] | (ν d˜2 )C2 [a?b.Q′1 ] ≡ (ν d˜1 , d˜2 )(C[a!b.P1′ , a?b.Q′1 ]) and (ν d˜1 )C1− [(a)P1′ ] | (ν d˜2 )C2− [(a)Q′1 {b/x}] ≡ (ν d˜1 , d˜2 )C − [(a)P1′ , (a)Q′1 {b/x}], where C[·1 , ·2 ] = C1 [·1 ] | C2 [·2 ] and C − [·1 , ·2 ] = drift (C ′ [·1 , ·2 ]; a; a). By (r-comm) and (r-newc) we get (ν d˜1 , d˜2 )C[a!b.P1′ , a?b.Q′1 ] → (ν d˜1 , d˜2 )C − [(a)P1′ , (a), Q′1 {b/x}]. The proof is analogous if P1 , Q1 ∈ {(ν d˜1 )C1 [a!b.P1′ ], (ν d˜2 )C2 [!(a)a?b.Q′1 ]} and P2 , Q2 ∈ {(ν d˜1 )C1− [(a)P1′ ], (ν d˜2 )C2− [(a)Q′1 {b/x} | !(a)a?b.Q′1 ]}, where C1− [·] = drift (C1 [·]; a) and C2− [·] = drift (C2 [·]; ∅) = C2 [·]. • (l-close) and (l-auth) we get by the similar reasoning, where for the second we apply (r-auth) instead of rule (r-comm). For the induction step, the last applied rule is one of the following: τ τ • (l-res): (νa)P − → (νa)Q is derived from P − → Q. By induction hypothesis P → Q and by (r-newc) (νa)P → (νa)Q τ(a) τ • (l-scope-ext): (a)P − → Q is derived from P −−→ Q. By Lemma A.3, we have three cases, ′ ˜ ˜ − [(a)P ′ , (a)P ′′ {b/x}], we detail only the case when P ≡ (ν d)C[a!b.P , a?x.P ′′ ] and Q ≡ (ν d)C − − where C [·1 , ·2 ] = drift (C[·1 , ·2 ]; a; ∅), or C [·1 ; ·2 ] = drift (C[·1 , ·2 ]; ∅; a), and drift (C[·1 , ·2 ]; a; a) is undefined. By ′ ˜ (sc-scope-auth) we get (a)P ≡ (ν d)(a)C[a!b.P , a?x.P ′′ ]. − Then drift ((a)C[·1 , ·2 ]; a, a) = C [·1 , ·2 ]. Thus, by (r-comm), (r-newc) and (r-stru) we get the proof. 20 τ τ τ τ • (l-scope): (c)P − → (c)Q is derived from P − → Q, or P | R − → Q | R is derived from P − → Q. By − ˜ ˜ induction hypothesis P → Q. Then P ≡ (ν d)C[a!b.P , a?b.P ] and Q ≡ (ν d)C [(a)P , (a)P 1 2 1 2 {b/a}], ˜ where C − [·1 , ·2 ] = drift (C[·1 , ·2 ]; a; a) or P ≡ (ν d)C[ahbi.P , a(b).P ] and 1 2 ˜ − [(a)P1 , (a)(b)P2 ], where C − [·1 , ·2 ] = drift (C[·1 , ·2 ]; a, b; a). Thus, by (sc-scope-auth) Q ≡ (ν d)C ˜ we get (c)P ≡ (ν d)(c)C[a!b.P 1 , a?b.P2 ] or ˜ (c)P ≡ (ν d)(c)C[ahbi.P 1 , a(b).P2 ] where in the former case we get the proof by (r-comm), (r-newc) and (r-stru), and in the latter case we get the proof by (r-auth), (r-newc) and (r-stru). • (l-par): by similar reasoning as for (l-scope). τ Theorem 2.1 (Harmony) P → Q if and only if P − →≡ Q. Proof. The proof follows directly from Lemma A.4 and Lemma A.5. A.2 Proofs from Section 3 Proposition A.2 (Preservation of Well-formedness). If P is well-formed and P ≡ Q or P → Q then Q is also well-formed and sym(P ) = sym(Q). Proof. The proof is by induction on the last applied structural congruence or reduction rule. We detail only the case when the last applied reduction rule is (r-newc). Let P = (νa : r)P ′ , Q = (νa : r)Q′ , and P → Q be derived from P ′ → Q′ . Since P is well-formed r ∈ / sym(P ′ ) and P ′ ′ ′ is well-formed. By induction hypothesis we get Q is well-formed and sym(P ) = sym(Q′ ). Thus, r∈ / sym(Q′ ), Q is well-formed and sym(P ) = sym(Q). Lemma A.6 (Inversion on Typing). 1. If ∆ ⊢ρ (νa : r)P then ∆′ , a : {a}(T ) ⊢ρ P, where ∆ = ′ ∆ {r/a} and r ∈ / sym(P ) and a ∈ / ρ, names(T ). 2. If ∆ ⊢ρ (νa : ν)P then ∆, a : ν(T ) ⊢ρ P, where a ∈ / ρ, names(T, ∆). 3. If ∆ ⊢ρ (a)P then ∆ ⊢ρ⊎{a} P. 4. If ∆ ⊢ρ a!b.P then ∆ ⊢ρ P, where ∆(a) = ω(ω ′ (T )), ∆(b) = ω ′′ (T ), ω ′′ ⊆ ω ′ and if a ∈ / ρ then ω ⊆ ρ. 5. If ∆ ⊢ρ a?x.P then ∆, x : T ⊢ρ P, where ∆(a) = ω(T ), x ∈ / ρ, names(∆) and if a ∈ / ρ then ω ⊆ ρ. 6. If ∆ ⊢ρ !(a)a?x.P then ∆, x : T ⊢{a} P where sym(P ) = ∅ and ∆(a) = ω(T ) and x ∈ / ρ, names(∆). / ρ′ then ω ⊆ ρ′ . 7. If ∆ ⊢ρ ahbi.P then ∆ ⊢ρ′ P, ∆(a) = ω(T ), where ρ = ρ′ ⊎ {b} and if a ∈ 8. If ∆ ⊢ρ a(b).P then ∆ ⊢ρ⊎{b} P, where ∆(a) = ω(T ) and if a ∈ / ρ then ω ⊆ ρ. 9. If ∆ ⊢ρ P1 | P2 then ∆ ⊢ρ1 P1 and ∆ ⊢ρ2 P2 , where ρ = ρ1 ⊎ ρ2 and sym(P1 ) ∩ sym(P2 ) = ∅. The following two results (weakening and strengthening properties) are fundamental to prove Subject Congruence, which in turn is crucial to prove Subject Reduction. We write a ↔ r or a ↔ ν depending on whether the name a is bound in the process, or the process is in a context were the name a is bound, with (νa : r) or (νa : ν), respectively. Lemma A.7 (Weakening). / fn(P ) ∪ ρ. Then 1. Let ∆ ⊢ρ P and a ∈ 1. if a ↔ r and r ∈ / sym(P ) and ∆′ = ∆{a/r} then ∆′ , a : {a}(T ) ⊢ρ P ; 2. if a ↔ ν then ∆, a : ν(T ) ⊢ρ P. 2. If ∆ ⊢ρ P then ∆ ⊢ρ⊎ρ′ P. Proof. The proof is by induction on the depth of the derivation ∆ ⊢ρ P. 1 . We detail only two cases when the last applied rule is (t-out) or (t-rep-in). 21 • (t-out): Let ∆ ⊢ρ b!c.P be derived from ∆ ⊢ρ P, where ∆(b) = ω(ω ′ (T ′ )), ∆(c) = ω ′′ (T ′ ), ω ′′ ⊆ ω ′ . and if b ∈ / ρ then ω ⊆ ρ. Then, we have two cases: -If a ↔ r and r ∈ / sym(P ) and ∆′ = ∆{a/r}, by induction hypothesis ∆′ , a : {a}(T ) ⊢ρ P . ′ Since ∆ (b) = (ω(ω ′ (T ′ ))){a/r}, ∆′ (c) = (ω ′′ (T ′ )){a/r}, then ω ′′ {a/r} ⊆ ω ′ {a/r}. Since from b∈ / ρ it follows ω ⊆ ρ, then if r ∈ ω it follows b ∈ ρ. If r ∈ / ω then ω{a/r} = ω. Thus, by (t-out) we get ∆′ , a : {a}(T ) ⊢ρ b!c.P. -If a ↔ ν then by induction hypothesis ∆, a : ν(T ) ⊢ρ P. Since ∆ does not change we get the result directly by (t-out). • (t-rep-in): Let ∆ ⊢ρ !(b)b?xP be derived from ∆, x : T ′ ⊢{b} P, with ∆(b) = ω(T ′ ), where without loss of generality we can assume that x 6= a. Again, we have two cases: -If a ↔ r and r ∈ / sym(P ) and ∆′ = ∆{a/r}, by induction hypothesis ∆′ , x : T ′ {a/r}, a : {a}(T ) ⊢{b} P. Since ∆′ (b) = (ω(T ′ )){a/r} by (t-rep-in) we get ∆′ , a : {a}(T ) ⊢ρ !(b)b?xP. -If a ↔ ν then by induction hypothesis ∆, x : T ′ , a : ν(T ) ⊢{b} P. Again, we get the result directly by (t-rep-in). 2 . We detail only the case when the last applied rule is (t-in). Let ∆ ⊢ρ a?x.P be derived from ∆, x : T ⊢ρ P, where ∆(a) = ω(T ), x ∈ / ρ, names(∆) and if a ∈ / ρ then ω ⊆ ρ. By induction hypothesis ∆, x : T ⊢ρ⊎ρ′ P. Without loss of generality we can assume that x is new to ρ′ , i.e. x∈ / ρ′ . Since we can conclude that if a ∈ / ρ ⊎ ρ′ then ω ⊆ ρ ⊎ ρ′ , by (t-in) we get ∆ ⊢ρ⊎ρ′ a?x.P. Lemma A.8 (Strengthening). 1. If ∆, a : {a}(T ) ⊢ρ P and a ∈ / fn(P ) ∪ ρ and a ↔ r and r∈ / sym(P ) then ∆′ ⊢ρ P, where ∆′ = ∆{r/a}. 2. If ∆, a : ν(T ) ⊢ρ P and a ∈ / fn(P ) ∪ ρ then ∆ ⊢ρ P. Proof. The proof is by induction on the depth of the derivation ∆ ⊢ρ P. We comment only the case when the last applied rule is (t-in). We have two cases: -If a ↔ r and r ∈ / sym(P ) and ∆′ = ∆{r/a}, and ∆, a : {a}(T ) ⊢ρ b?x.P. From a ∈ / fn(b?xP ), without loss of generality, we can conclude a 6= b and a 6= x. By Lemma A.6 we get ∆, a : {a}(T ), x : T ′ ⊢ρ P , ∆(b) = ω(T ′ ), and if b ∈ / ρ then ω ⊆ ρ. By induction hypothesis ∆′ , x : T ′ {r/a} ⊢ρ P. Since a∈ / ρ then if a ∈ ω it follows b ∈ ρ. If a ∈ / ω then ω{r/a} = ω. Thus, using (t-in) we get ∆′ ⊢ρ b?x.P. -If a ↔ ν and ∆, a : {a}(T ) ⊢ρ b?x.P. Using the same arguments we can again assume a 6= b and a 6= x. By Lemma A.6 we get ∆, a : ν(T ), x : T ′ ⊢ρ P , ∆(b) = ω(T ′ ), and if b ∈ / ρ then ω ⊆ ρ. By induction hypothesis ∆, x : T ′ ⊢ρ P. Thus, using (t-in) we get ∆ ⊢ρ b?x.P. Lemma A.9 (Subject Congruence). If ∆ ⊢ρ P and P ≡ Q then ∆ ⊢ρ Q. Proof. The proof is by induction on the depth of the derivation P ≡ Q. We comment only three cases when the last applied rule is (sc-par-inact), (sc-res-extr) or (sc-rep): 1 . P | 0 ≡ P . From ∆ ⊢ρ P | 0 by Lemma A.6 we get ∆ ⊢ρ1 P and ∆ ⊢ρ2 0, where ρ1 ⊎ ρ2 = ρ. By Lemma A.7 we get ∆ ⊢ρ P. If ∆ ⊢ρ P, by (t-stop) we get ∆ ⊢∅ 0 and by (t-par) we conclude ∆ ⊢ρ P | 0. 2 . P | (νa : r)Q ≡ (νa : r)(P | Q) or P | (νa : ν)Q ≡ (νa : ν)(P | Q), if a ∈ / fn(P ). To show implication from right to the left we have two cases: -If a ↔ r then from ∆ ⊢ρ P | (νa : r)Q by Lemma A.6 we get ∆ ⊢ρ1 P and ∆ ⊢ρ2 (νa : r)Q, where ρ1 ⊎ ρ2 = ρ and sym(P ) ∩ sym((νa : r)Q) = ∅. Applying Lemma A.6 we get ∆′ , a : / ρ2 and r ∈ / sym(Q). From sym(P ) ∩ sym((νa : {a}(ϕ) ⊢ρ2 Q where ∆′ = ∆{a/r} and a ∈ r)Q) = ∅ we get r ∈ / sym(P ) and from a ∈ / fn(P ) and a ∈ bn((νa : r)Q) without loss of generality can assume a ∈ / ρ1 . By Lemma A.7 we get ∆′ , a : {a}(ϕ) ⊢ρ1 P where ∆′ = ∆{a/r}. ′ By (t-par) ∆ , a : {a}(ϕ) ⊢ρ P | Q and by (t-new) ∆ ⊢ρ (νa : r)(P | Q). -If a ↔ ν then from ∆ ⊢ρ P | (νa : ν)Q by Lemma A.6 we get ∆ ⊢ρ1 P and ∆ ⊢ρ2 (νa : ν)Q, / ρ2 . By where ρ1 ⊎ ρ2 = ρ. Applying Lemma A.6 again we get ∆, a : ν(ϕ) ⊢ρ2 Q where a ∈ Lemma A.7 we get ∆, a : ν(ϕ) ⊢ρ1 P. By (t-par) ∆, a : ν(ϕ) ⊢ρ P | Q and by (t-new-rep) ∆ ⊢ρ (νa : ν)(P | Q). To show implication from left to the right we again have two cases: 22 -If a ↔ r then from ∆ ⊢ρ (νa : r)(P | Q) by Lemma A.6 we get ∆′ , a : a(T ) ⊢ρ P | Q where ∆′ = ∆{a/r} and r ∈ / sym(P | Q) and a ∈ / ρ. By Lemma A.6 ∆′ , a : {a}(T ) ⊢ρ1 P ′ / fn(P ) ∪ ρ1 and ∆ , a : {a}(T ) ⊢ρ2 Q, where ρ1 ⊎ ρ2 = ρ and sym(P ) ∩ sym(Q) = ∅. Since a ∈ / sym(Q) and a ∈ / ρ2 by (t-new) we get and r ∈ / sym(P ) by Lemma A.8 ∆ ⊢ρ1 P. Using r ∈ ∆ ⊢ρ2 (νa : r)Q, and by (t-par) we get ∆ ⊢ρ P | (νa : r)Q. -If a ↔ ν then from ∆ ⊢ρ (νa : ν)(P | Q) by Lemma A.6 we get ∆, a : ν(T ) ⊢ρ P | Q where a∈ / ρ. By Lemma A.6 ∆, a : {a}(T ) ⊢ρ1 P and ∆, a : {a}(T ) ⊢ρ2 Q, where ρ1 ⊎ ρ2 = ρ. Since a∈ / fn(P ) ∪ ρ1 by Lemma A.8 ∆ ⊢ρ1 P. Using (t-new-rep) we get ∆ ⊢ρ2 (νa : ν)Q, and by (t-par) we get ∆ ⊢ρ P | (νa : ν)Q. 3 . !(a)a?x.P ≡!(a)a?x.P | (a)a?x.P. We show only one implication. Suppose ∆ ⊢ρ !(a)a?x.P | (a)a?x.P. By Lemma A.6 we get ∆ ⊢ρ1 !(a)a?x.P and ∆ ⊢ρ2 (a)a?x.P, where ρ1 ⊎ ρ2 = ρ. By the same Lemma we get sym(P ) = ∅ and ∆, x : T ⊢{a} P, where ∆(a) = ω(T ) and x ∈ / ρ1 , names(∆). By (t-rep-in) we get ∆ ⊢ρ !(a)a?x.P. Lemma 3.1 (Substitution). Let ∆, x : ω(T ) ⊢ρ P and x ∈ / names(∆). Then 1. If ∆(a) = {a}(T ) and a ∈ ω then ∆ ⊢ρ{a/x} P {a/x}. 2. If ∆(a) = ν(T ) and ν = ω then ∆ ⊢ρ{a/x} P {a/x}. Proof. The proof is by induction on the depth of the derivation ∆ ⊢ρ P. We detail two cases: • ∆, x : ω(ω ′ (T )) ⊢ρ x!b.P. By Lemma A.6 ∆, x : ω(ω ′ (T )) ⊢ρ P, where ∆(b) = ω ′′ (T ) and ω ′′ ⊆ ω ′ and if x ∈ / ρ then ω ⊆ ρ. By induction hypothesis ∆ ⊢ρ{a/x} P {a/x}. If ∆(a) = {a}(ω ′ (T )) and x ∈ ρ then a ∈ ρ{a/x} and if x 6∈ ρ then by ω ⊆ ρ we get a ∈ ω ⊆ ρ = ρ{a/x}. If ∆(a) = ν(ω ′ (T )) then x ∈ ρ which implies a ∈ ρ{a/x}. By (t-out) we get ∆ ⊢ρ{a/x} (x!b.P ){a/x}. • ∆, x : ω(T ) ⊢ρ b!x.P. By Lemma A.6 ∆, x : ω(T ) ⊢ρ P, where ∆(b) = ω ′ (ω ′′ (T )) and ω ⊆ ω ′′ and if b ∈ / ρ then ω ⊆ ρ. By induction hypothesis ∆ ⊢ρ{a/x} P {a/x}. If ∆(a) = {a}(T ) then a ∈ ω ⊆ ω ′′ and if a : ν(T ) then ν = ω ⊆ ω ′′ . Thus, by (t-out) we get ∆ ⊢ρ{a/x} (b!x.P ){a/x}. Lemma A.10 (Authorization Safety). If ∆ ⊢∅ C[P1 , P2 ] and ∆ ⊢ρ1 P1 and ∆ ⊢ρ2 P2 and a ∈ ρ1 ∩ρ2 then drift (C[·1 , ·2 ]; a; a) is defined. Proof. By induction on the structure of C[·1 , ·2 ]. Notation We use (νc̃ : Ω̃) to abbreviate (νc1 : Ω1 ) . . . (νcn : Ωn ), where Ω ranges over symbols from S and ν. Lemma A.11 (Interaction Safety). 1. If P ≡ (νc̃ : Ω̃)C[a!b.P1 , a?x.P2 ] and P is well-typed with ∆ ⊢∅ P then drift (C[·1 , ·2 ]; a; a) is defined and if C ′ [·1 , ·2 ] = drift (C[·1 , ·2 ]; a; a) and Q ≡ (νc̃ : Ω̃)C ′ [(a)P1 , (a)P2 {b/x}] then ∆ ⊢∅ Q. 2. If P ≡ (νc̃ : Ω̃)C[ahbi.P1 , a(b).P2 ] and P is well-typed with ∆ ⊢∅ P then drift (C[·1 , ·2 ]; a, b; a) is defined and if C ′ [·1 , ·2 ] = drift (C[·1 , ·2 ]; a, b; a) and Q ≡ (νc̃ : Ω̃)C ′ [(a)P1 , (a)(b)P2 ] then ∆ ⊢∅ Q. Proof. The proof is by induction on the structure of the context C[·1 , ·2 ]. We detail only the first statement. If ∆ ⊢∅ P by Lemma A.9 we get ∆ ⊢∅ (νc̃ : Ω̃)C[a!b.P1 , a?x.P2 ] and by consecutive application of Lemma A.6. 1 and 2, we get ∆′ ⊢∅ C[a!b.P1 , a?x.P2 ], where ∆′ = ∆, ∆′′ and for each c ∈ dom(∆′′ ), ∆′′ (c) = c(T ) or ∆′′ (c) = ν(T ). By consecutive application of Lemma A.6. 3 and 9, we get ∆′ ⊢ρ1 a!b.P1 and ∆′ ⊢ρ2 a?x.P2 , for some multisets of names ρ1 , ρ2 . By the same Lemma again ∆′ ⊢ρ1 P1 and ∆′ , x : ω(T ) ⊢ρ2 P2 , where ∆′ (a) = {a}(ω(T )) or ∆′ (a) = ν(ω(T )) and thus a ∈ ρ1 , a ∈ ρ2 . Furthermore, ∆′ (b) = {b}(T ) or ∆′ (b) = ν(T ), and b ∈ ω and x ∈ / ρ2 ∪ names(∆′ ). Hence we have ρ2 {b/x} = ρ2 , and by Lemma ′ 3.1 we get ∆ ⊢ρ2 P2 {b/x}. By (t-auth) we get ∆′ ⊢ρ′1 (a)P1 and ∆′ ⊢ρ′2 (a)P2 {b/x}, 23 where ρ1 = ρ′1 ⊎ {a} and ρ2 = ρ′2 ⊎ {a}. Since ∆′ ⊢∅ C[a!b.P1 , a?x.P2 ], and a ∈ ρ1 , a ∈ ρ2 by Lemma A.10 we conclude drift (C[·1 , ·2 ]; a; a) is defined. By Proposition A.1 we distinguish four cases for the structure of the context C[·1 , ·2 ] = C ′′ [C1 [·1 ] | C2 [·2 ]]. We comment only the case when C1 [·] = C1′ [(a)C1′′ [·]] and C2 [·] = C2′ [(a)C2′′ [·]], where drift (C1′′ [·]; a) and drift (C2′′ [·]; a) are undefined, thus in contexts C1′′ [·] and C2′′ [·] the holes are not in the scope of authorizations (a). By consecutive application of (t-par) and (t-auth) we get ∆′ ⊢ρ′′1 (a)C1′′ [a!b.P1 ] and ∆′ ⊢ρ′′2 (a)C2′′ [a?x.P2 ], but also ∆′ ⊢ρ′′1 C1′′ [(a)P1 ] and ∆′ ⊢ρ′′2 C2′′ [(a)P2 {b/x}], for some ρ′′1 , ρ′′2 . Since C ′ [·1 , ·2 ] = C ′′ [C1′ [C1′′ [·1 ]] | C2′ [C2′′ [·2 ]]], again by consecutive application of (t-par) and (t-auth) we get ∆′ ⊢∅ C ′ [(a)P1 , (a)P2 {b/x}] then by consecutive application of (t-new) and (t-new-rep) we get ∆ ⊢∅ (νc̃ : Ω̃)C ′ [(a)P1 , (a)P2 {b/x}]. By Lemma A.9 we get ∆ ⊢∅ Q. Theorem 3.1 (Subject Reduction). If P is well-typed, ∆ ⊢∅ P , and P → Q then ∆ ⊢∅ Q. Proof. The proof is by case analysis on last reduction step. We have two base cases, when the rules applied are (r-comm) or (r-auth), which both we get directly by Lemma A.11. For the induction steps we have two cases: • If the last applied rule is (r-newc) then we have two cases – (νa : r)P ′ → (νa : r)Q′ is derived from P ′ → Q′ . Let ∆ ⊢∅ (νa : r)P ′ . By Proposition A.2 we get (νa : r)Q′ is well-formed, thus r ∈ / sym(Q′ ). By Lemma A.6 we get ∆′ , a : ′ ′ ′ {a}(T ) ⊢ρ P , where r ∈ / sym(P ) and ∆ = ∆{a/r}. By induction hypothesis we get ∆′ , a : {a}(T ) ⊢ρ Q′ , and by (t-new) we get ∆ ⊢∅ (νa : r)Q′ . – (νa : ν)P ′ → (νa : ν)Q′ is derived from P ′ → Q′ . Let ∆ ⊢∅ (νa : ν)P ′ . By Lemma A.6 we get ∆, a : ν(T ) ⊢ρ P ′ . By induction hypothesis we get ∆, a : ν(T ) ⊢ρ Q′ , and by (t-new-rep) we get ∆ ⊢∅ (νa : ν)Q′ . • If the last applied rule is (r-struc) then P → Q is derived from P ′ → Q′ , where P ≡ P ′ and Q ≡ Q′ . Let ∆ ⊢∅ P. By Lemma A.9 we get ∆ ⊢∅ P ′ . By induction hypothesis ∆ ⊢∅ Q′ and by Lemma A.9 we get ∆ ⊢∅ Q. Proposition 3.1 (Typing Soundness) 1 . If ∆ ⊢ρ P then P is well-formed. 2 . If P is well-typed then P is not an error. Proof. 1 . Directly from the typing rules. 2 . Immediate from Lemma A.11. Corollary 3.1 (Type Safety). If P is well-typed and P →∗ Q then Q is not an error. Proof. The proof follows directly from Theorem 3.1 and Proposition 3.1(2). 24
6cs.PL
GROWTH OF PERIODIC GRIGORCHUK GROUPS arXiv:1802.09077v1 [math.GR] 25 Feb 2018 ANNA ERSCHLER AND TIANYI ZHENG A BSTRACT. On torsion Grigorchuk groups we construct random walks of finite entropy and power-law tail decay with non-trivial Poisson boundary. Such random walks provide near optimal volume lower estimates for these groups. In particular, for the first Grigorchuk group G we show that its volume growth function vG,S pnq satisfies that log 2 « 0.7674, λ0 is the posilimnÑ8 log log vG,S pnq{ log n “ α0 , where α0 “ log λ0 3 2 tive root of the polynomial X ´ X ´ 2X ´ 4. 1. I NTRODUCTION Let Γ be a finitely generated group and let S be a finite generating set of Γ. The word length lS pγq of an element γ P Γ is the smallest integer n ě 0 for which there exists s1 , . . . , sn P S Y S ´1 such that γ “ s1 . . . sn . The growth function vΓ,S pnq counts the number of elements with word length lS pγq ď n, that is vΓ,S pnq “ #tγ P Γ : lS pγq ď nu. A finitely generated group Γ is of polynomial growth if there exists 0 ă D ă 8 and a constant C ą 0 such that vΓ,S pnq ď CnD . It is of exponential growth if there exists λ ą 1 and c ą 0 such that vΓ,S pnq ě cλn . If vΓ,S pnq is sub-exponential but Γ is not of polynomial growth, we say Γ is a group of intermediate growth. The first examples of groups of intermediate growth are constructed by Grigorchuk in [29]. Grigorchuk groups are indexed by infinite strings ω in t0, 1, 2u8 (whose definitions are recalled in Subsection 2.4). Following [29], for any such ω, we associate automorphisms a, bω , cω , dω of the rooted binary tree. Consider the group Gω generated by S “ ta, bω , cω , dω u. For the string ω “ p012q8 , the corresponding group is called the first Grigorchuk group, which was introduced in Grigorchuk [28]. By [29], if ω is eventually constant then Gω is virtually abelian (hence of polynomial growth); otherwise Gω is of intermediate growth. The group Gω is periodic (or torsion) if and only if ω contains all three letters 0, 1, 2 infinitely often. A long-standing open question, since the construction of Grigorchuk groups of intermediate growth in [29], is to find the asymptotics of their growth functions. Among them the first Grigorchuk group G “ G012 has been the most investigated. In Grigorchuk [29], it was shown that ` ˘ exppcn1{2 q ď vG,S pnq ď exp Cnβ , where β “ log32 31. The upper bound above which shows that G is of sub-exponential growth is based on norm contracting property. The property considered in [29] is as follows. There is an integer d ě 2 and an injective homomorphism ψ “ pψi qdi“1 from a Key words and phrases. Grigorchuk groups, growth function, Poisson boundary. The work of the first named author is supported by the ERC grant GroIsRan. 1 2 ANNA ERSCHLER AND TIANYI ZHENG finite index subgroup H of G into Gd such that for any h P H, with respect to word length |¨| “ lS on G, (1.1) d ÿ |ψi phq| ď η|h| ` C i“1 for some constant C ą 0 and contraction coefficient η P p0, 1q. Later Bartholdi in [4] has shown that there exist choices of norm that achieve better contraction coefficient than the word length lS , and therefore a better upper bound for growth. His upper bound in [4] states that vG,S pnq ď exp pCnα0 q log 2 3 2 where α0 “ log λ0 « 0.7674, where λ0 is the positive root of the polynomial X ´ X ´ 2X ´ 4. 1{2 The lower bound en proved by Grigorchuk uses what he calls anti-contraction prop1{2 erties on G. It remained open whether vG,S grows strictly faster than en until Leonov [36] introduced an algorithm ` ˘which led to better anti-contraction coefficient ` and showed ˘ that vG,S pnq ě exp cn0.504 . Bartholdi [5] obtained that vG,S pnq ě`exp cn0.5157 . In ˘ the thesis of Brieussel [13], Corollary 1.4.2 states that vG,S pnq ě exp cn0.5207 . Let µřbe a probability measure on a group Γ. A function f : Γ Ñ R is µ-harmonic if f pxq “ yPG f pxyqµpyq for all x P Γ. Among several definitions of the Poisson boundary of pΓ, µq, also called the Poisson-Furstenberg boundary, one is formulated in terms of the measure theoretic boundary that represents all bounded µ-harmonic functions on Γ, see [34]. In particular the Poisson boundary of pΓ, µq is trivial if and only if all bounded µharmonic functions ř on Γ are constant. The (Shannon) entropy of a measure µ is defined as Hpµq “ ´ gPΓ µpgq log µpgq. When Γ is finitely generated, the entropy criterion of Kaimanovich-Vershik [34] and Derriennic [22] provides a quantitative relation between the growth function of Γ and the tail decay of a measure µ of finite entropy and non-trivial Poisson boundary on Γ, see more details reviewed in Subsection 2.1. In this paper we construct probability measures with non-trivial Poisson boundary on torsion Grigorchuk groups. The measures are chosen to have finite entropy and explicit control over their tail decay, that is, with an upper bound on µ ptg : lS pgq ě nuq . The main contribution of the paper is that on a collection of Grigorchuk groups, including these indexed by periodic strings containing three letters 0, 1, 2, we construct such measures with good tail decay that provide near optimal volume lower estimates. Our main result Theorem 8.3 specialized to the first Grigorchuk group G012 is the following. log 2 Theorem 1.1. Let α0 “ log λ0 « 0.7674, where λ0 is the positive root of the polynomial X 3 ´ X 2 ´ 2X ´ 4. For any  ą 0, there exists a constant C ą 0 and a non-degenerate symmetric probability measure µ on G “ G012 of finite entropy and nontrivial Poisson boundary, where the tail decay of µ satisfies that for all r ě 1, µ ptg : lS pgq ě ruq ď C r´α0 ` . As a consequence, for any  ą 0, there exists a constant c ą 0 such that for all n ě 1, ` ˘ vG,S pnq ě exp c nα0 ´ . We construct measures of non-trivial Poisson boundary needed for the proof of Theorem 1.1 by introducing and studying some asymptotic invariants of the group, related to the diameter and shape of what we call "quasi-cubic sets" and "uniformised quasi-cubic sets" (see Subsection 1.1 where we sketch the proof). The main problem we address is how to GROWTH OF PERIODIC GRIGORCHUK GROUPS 3 use the geometric and algebraic structure of the groups to construct measures with good control over the tail decay such that careful analysis of the induced random walks on the Schreier graph can be performed to show non-triviality of the Poisson boundary. The volume lower bound in Theorem 1.1 matches up in exponent with Bartholdi’s upper bound in [4]. In particular, combined with the upper bound we conclude that the volume exponent of the first Grigorchuk group G exists and is equal to α0 , that is lim nÑ8 log log vG,S pnq “ α0 . log n It was open whether the limit exists. Our argument applies to a large class of ω satisfying certain assumptions, see Theorem 8.3. In particular the assumption of the theorem is verified by all periodic strings containing 3 letters 0, 1, 2, or strings that are products of 201 and 211. For general ω, volume upper bounds on Gω are based on the norm contracting property (1.1) first shown in Grigorchuk [29], and suitable choices of norms are given in the work of Bartholdi and the first named author [8]. Combined with upper bounds from [8], we derive the following two corollaries from Theorem 8.3. For a periodic string ω that contains all three letters 0, 1, 2, we show that the volume exponent of Gω exists. Let Mi , i P t0, 1, 2u, be matrices defined as fi fi » fi » » 1 0 0 2 1 0 2 0 1 M0 “ – 0 2 1 fl , M1 “ – 0 1 0 fl , M2 “ – 1 2 0 fl . 1 0 2 0 1 2 0 0 1 Corollary 1.2. Let ω P t0, 1, 2u8 be a periodic string ω “ pω0 . . . ωq´1 q8 of period q which contains all three letters 0, 1, 2. Then the growth exponent of the Grigorchuk group Gω exists and log log vGω ,S pnq “ αω , lim nÑ8 log n where αω “ q log 2 log λ and λ “ λω0 ...ωq´1 is the spectral radius of the matrix Mω0 . . . Mωq´1 . By [29, Theorem 7.2] the family tGω u provides a continuum of mutually non-equivalent growth functions. When ω is not periodic, Grigorchuk showed in [29] that for some choices of ω, the growth of Gω exhibits oscillating behavior: limnÑ8 log log vGω pnq{ log n does not exist. Together with upper bounds from [8], our lower bounds show that given numbers α ď β in rα0 , 1s, there exists a Gω which realizes these prescribed numbers as lower and upper volume exponents. Corollary 1.3. For any α, β such that α0 ď α ď β ď 1, where α0 « 0.7674 is the volume exponent of G012 , there exists ω P t0, 1, 2u8 such that the Grigorchuk group Gω satisfies log log vGω ,S pnq “ α, log n log log vGω ,S pnq lim sup “ β. log n nÑ8 lim inf nÑ8 We mention that for some groups of intermediate growth there is no way to obtain a near optimal lower bound of the growth function using tail decay of measures of nontrivial Poisson boundary. There are extensions of the first Grigorchuk group that are of intermediate growth, where the growth function can be arbitrarily close to exponential but any random walk with finite α0 -moment has trivial Poisson boundary, see Remark 9.2 at the end of the paper. 4 ANNA ERSCHLER AND TIANYI ZHENG F IGURE 1.1. Orbital Schreier graph of the right most ray o “ 18 under the action of the first Grigorchuk group. 1.1. Sketch of the arguments for the first Grigorchuk group. For a nilpotent group Γ and any probability measure µ on Γ, it is known that the Poisson boundary of pΓ, µq is trivial. For non-degenerate measure µ on a finitely generated nilpotent group this result is due to Dynkin and Maljutov [23], for a general case see Azencott [1, Proposition 4.10]. If we assume that the growth function is sub-exponential, then as a corollary of the entropy criterion, any finitely ř supported measure µ on Γ (more generally, any measure µ on Γ of finite first moment gPΓ lS pgqµpgq ă 8) has trivial Poisson boundary. If the growth of Γ α is bounded by vΓ,S ř pnq ď exppCn q for some 0 ă α ă 1, then all measures with finite αmoment, that is gPΓ lS pgqα µpgq ă 8, have trivial Poisson boundary (see Corollary 2.3). Since the volume growth of the first Grigorchuk group G “ G012 satisfies vG,S pnq ď exppCnα0 q by [4], we have to look for measures with infinite α0 -moment in order to have non-trivial Poisson boundary. The first Grigorchuk group G is generated by four automorphisms a, b, c, d of the rooted binary tree (in Subsection 2.4 we recall the definition of these automorphisms, see also Figure 2.1). The group G acts on the boundary of the tree BT by homeomorphisms. The orbital Schreier graph S of o is a half line as shown in Figure 1.1, where o “ 18 is the right most ray of the tree. In [24] random walks with non-trivial Poisson boundary are used to show that for Gω , where ω is not eventually constant and contains only finite number of 2 (for example ω “ p01q8 ), its volume growth satisfies ` ˘ vGω ,S pnq ě exp c n{ log1` n . The measures with non-trivial Poisson boundary constructed in [24] come from transient symmetric random walks on Z, where it is well-known and easy to see what is the best tail condition on such measures on Z. The situation remained completely unclear for other Grigorchuk groups with ω containing all three letters infinitely often. Since for such ω the group Gω is torsion, the argument in [24] relying on an infinite order element cannot be applied. Here we need to introduce a new construction of meausures for the first Grigorchuk group. Consider the groupoid of germs of the action G ñ BT. The isotropy group Gx of the groupoid of germs of G at x P BT is the quotient of the stabilizer Gx of x by the subgroup of elements of G that act trivially in a neighborhood of x. For the first Grigorchuk group G, at x in the orbit o ¨ G, Gx is isomorphic to pZ{2Zq ˆ pZ{2Zq and its elements can be listed as tid, b, c, du. See more details in Section 3. Given a group element g, we denote its germ GROWTH OF PERIODIC GRIGORCHUK GROUPS 5 at x by Φg pxq, which is the germ of gτ ´1 in the neighborhood of x where τ is a finitary automorphism of the tree such that x ¨ g “ x ¨ τ . This does not depend on the choice of τ , see precise definition in formula (3.3)). Our goal is to construct a non-degenerate probability measure µ on G such that along the µ-random walk trajectory pWn q8 n“1 , the coset of ΦWn poq in Go { xby stabilizes with probability 1. Such almost sure stabilization provides non-trivial events in the tail σ-field of the random walk, which implies the Poisson boundary of pG, µq is non-trivial. Our first construction of a measure with controlled (but not near optimal) tail decay and non-trivial Poisson boundary on G is of the form µ “ 12 puS ` ηq, where uS is the uniform measure on S “ ta, b, c, du and η is a symmetric measure supported on the subgroup Hb of G. Here Hb is the subgroup of G that consists of g P G such that germs Φg pxq are in xby for all x P o ¨ G. For such a measure µ, if the η-induced random walk on the orbit of o is transient, then the Poisson boundary of µ is non-trivial, see Remark 3.4. In the situation of ω containing only 0 and 1 infinitely often, the subgroup Hb contains an infinite order element ab, thus in this case one can apply well known results for random walks on xaby “ Z. For the first Grigorchuk group, the subgroup Hb is locally finite and the orbit of o under Hb is not the full orbit o ¨ G, but rather rays cofinal with 18 such that at locations 3k ` 1, k ě 1, the digits are 1 (see Lemma 6.2). Since the subgroup Hb is locally finite, unlike Z there is no "simple random walk" on it that one can take convex combinations of convolution powers of the corresponding measure to produce a measure with transient induced random walk on the orbit of o. Rather, we build the measures from a sequence of group elements satisfying an injectivity property for their action on the orbit o ¨ G. For g1 , g2 , . . . P G, we say the sequence satisfies the cube independence property on o ¨ G if for any n ě 1 and x P o ¨ G, the map from the hypercube to the orbit t0, 1un Ñ o ¨ G pε1 , . . . εn q ÞÑ x ¨ gnεn . . . g1ε1 is injective. We call the set Fn “ tgnεn . . . g1ε1 : pε1 , . . . εn q P t0, 1un u an n-quasi-cubic set and the uniform measure uFn on Fn an n-quasi-cubic measure. Given such a sequence pgn q, we take convex combination over all n-quasi-cubic measures and their inverses. The cube independence property guarantees that for such measures, the induced random walks on the orbit of o satisfy good isoperimetric inequalities. We prove a sufficient criterion for such induced random walks to be transient in Proposition 5.4. F IGURE 1.2. Portrtrait of ζ 3 pacq in the first Grigorchuk group. More generally, words ζ n paxq, where x “ c or x “ d, represents an element in the stabilizer of level n, and the labels (sections) at the vertices of level n are ax or xa. 6 ANNA ERSCHLER AND TIANYI ZHENG Our choice of elements satisfying the cube independence property on G is closely related to words that are known to have what is called asymptotically maximal inverted orbit growth, see [7]. Let ζ be the substitution on tab, ac, adu˚ defined as ζ : ab ÞÑ abadac, ac ÞÑ abab, ad ÞÑ acac. (1.2) n pacqq8 n“1 achieves asymptotic maximal inverted orbit growth, see the proof of Then pζ [7, Proposition 4.7]. With considerations of germs in mind, we take the sequence to be gn “ ζ n pacq if n ” 0, 1 mod 3 and gn “ ζ n padq if n ” 2 mod 3. Then gn has xbygerms for n ” 1, 2 mod 3 and has xcy-germs for n ” 0 mod 3. For our construction it is important that this sequence pgn q satisfies the cube independence property. As an illustration of Proposition 5.4, in Subsection 5.2 we find an optimal moment condition for measures on G which induce transient random walks on the orbit of o “ 18 . A near optimal measure can be taken to be of the form η0 “ 8 ÿ ¯ ´ cn uFn ` uFn´1 , n“1 1` where cn “ C2nn , Fn is the n-quasi-cubic set formed by g1 , . . . , gn and uF is the uniform measure on F . In Section 6 we explain how to use the subsequence g1 , g2 , g4 , g5 , g7 , g8 , . . . of only xby-germs and a related sequence that is more adapted to Hb to produce finite entropy symmetric measures supported on Hb such that the induced random walks `on the orbit of ˘ o are transient. In particular it already provides a volume lower bound exp cn0.57 for G better than previously known bounds, see Corollary 6.4. However taking a measure supported on Hb is too restrictive, see the remark at the end of Section 6. In Section 7 we carry out the main construction which removes this restriction and produces measures with non-trivial Poisson boundary and near optimal tail decay. We now give an informal sketch of the construction. Return to the "full" cube independent sequence pgn q8 n“1 . The measure η0 built from this sequence has near optimal tail decay among measures that induce transient random walks on the Schreier graph. However in the sequence we have germs of both types: gn has xby-germs for n ” 1, 2 mod 3 and has xcy-germs for n ” 0 mod 3. One can check that xγy-coset of ΦWn poq does not stabilize for any γ P tb, c, du, where Wn is the random walk driven by 21 puS ` η0 q. With the goal to achieve almost sure stabilization of xby-coset of ΦWn poq along the random walk trajectory, we want to perform modifications to the elements used in the construction of η0 that prevent such stabilization, namely these gn with xcy-germs. It turns out for such considerations, transience of the induced random walks on the Schreier graph is not sufficient. To observe almost sure stabilization of xby-coset of ΦWn poq for a µ-random walk Wn , we need to show a weighted sum of the Green function GPµ over the Schreier graph is finite, see the criterion in Proposition 3.3: ÿ GPµ po, xqµ ptg P G : pg, xq is not a xby -germuq ă 8. xPo¨G Thus the behavior of the Green function of the induced random walk is essential. Informally we call a ray x P BT that carries a non-xby germ a bad location. Assume that the Green function GPµ po, xq decays with distance dS po, xq, then to control the effect of xcygerm elements, it is to our advantage to push the bad locations to be further away from the ray o. Note that when we perform modifications to the measure, all terms in the summation are affected: both the Green function of Pµ and the µ-weights on the bad locations. GROWTH OF PERIODIC GRIGORCHUK GROUPS 7 Recall that for n divisible by 3, gn “ ζ n pacq, it is in the n-level stabilizer and the section at any vertex v in level n is in tac, cau. Therefore gn has 2n bad locations on the Schreier graph and the distance of these locations to o is bounded by C2n . To move these locations further from o, without causing disturbances globally, we rely on certain branching properties of the group. Let kn be an integer divisible by 3, we introduce a conjugation of the generator c that swaps on level kn ` 2 the section at 1kn `2 with the section at its sibling. Explicitly, take the element hkn which is in the rigid stabilizer of 1kn and acts as baba in the subtree rooted at 1kn . Denote by ckn the conjugate ckn “ h´1 kn chkn . The portrait of ckn is illustrated in Figure 1.3. For n and kn both divisible by 3, take g̃n “ ζ n packn q. Then g̃n still has 2n locations on the Schreier graph such that pg̃n , xq is a c-germ, but now the distance of these locations to o is comparable to 2n`kn . We remark that the parameters pkn q need to be chosen carefully: the word length of element g̃n is approximately 2kn p2{η0 qn , therefore if kn is too large, the tail decay wouldn’t be near n´α0 ; on the other hand if kn is not sufficiently large then the effect it introduces is not strong enough to achieve the goal of stabilization. In the end we will take kn « A log n with constant A large enough. F IGURE 1.3. A portrtrait of ck , for k ” 0 mod 3. There are k ` 3 levels of the tree that shown on the picture. The portrait is the same as the portrait of c up to level k, while at level k ` 2 left and right branches are permuted. Take a parameter sequence pkn q, in the cube independent sequence pgn q, keep these gn such that n ” 1, 2 mod 3 and replace these gn with n ” 0 mod 3 by the modified element g̃n . This modified sequence satisfies the cube independence property, we can form the n-quasi-cubic sets and define a measure η of the same form as η0 using this sequence. It is possible that with some choice like cn “ 2´nβ , β close to 1 and kn “ A log n, one can observe almost sure stabilization for the resulting measure 12 puS ` ηq. However for such a measure µ we didn’t manage to obtain good enough estimates on the induced Green function to verify the summability condition. Here the issue is that because of the modifications, the induced transition kernel on the Schreier graph becomes more singular (compared to the one induced by η0 ). 8 ANNA ERSCHLER AND TIANYI ZHENG F IGURE 1.4. A conjugated element cv , in usual notation on the first Grigorchuk group. The levels of the form 3j ´ 1 are traced with dotted lines. There are two possiblities for the portraits between 3j ´ 1 and 3j ` 2. Here the picture is shown for indexing vertex v “ 11p11˚q . . . p11˚qp110qp111qp110qp110q110. To overcome this difficulty, we randomize over the choice of conjugates ckn to produce less singular induced transition kernels. We take a collection of conjugates cv of c, indexed by vertices v of the form 11 loooooooomoooooooon 11 ˚ 11 ˚ . . . 11˚ 110, where at ˚ the digit can be 0 or kn digits 1, see Figure 1.4. Given such a conjugate cv , as before apply ` ˘ the substitution ζ to obtain g̃nv “ ζ n pacv q. We call an n-quasi-cubic set formed by g̃jv with each v a random vertex chosen uniformly from the corresponding indexing set a uniformised quasi-cubic set. The final measure we take is of a similar form to η discussed in the previous paragraph, but involves what we call uniformised quasi-cubic measures. For more detailed description of these measures see Example 7.10. Although the construction appears to be more complicated, the resulting induced transition kernel is more homogeneous. For such transition kernels, techniques from Barlow-Grigor’yan-Kumagai [3] based on what is called the Meyer’s construction and the Davies method for off-diagonal heat kernel estimates of jumping processes can be applied. In this way we obtain good enough decay estimate for the induced Green function in terms of the Schreier graph distance on the orbit of o. Together with explicit estimates of the µ-weights at bad locations we show the weighted sum of Green function over the Schreier graph is finite with appropriate choice of parameters. The construction provides finite entropy measures on G with near optimal tail decay and non-trivial Poisson boundary. 1.2. Organization of the paper. Section 2 reviews background on Poisson boundary and its connection to growth, groups acting on rooted trees and some basic properties of Grigorchuk groups. In Section 3 we formulate the criterion for stabilization of cosets of germ GROWTH OF PERIODIC GRIGORCHUK GROUPS 9 configurations. Section 4 provides quick examples of measures (without explicit tail control) with non-trivial Poisson boundary on the first Grigorchuk group. In Section 5 we define the cube independence property and show how to build explicit measures with transient induced random walks from sequences satisfying this property. Section 6 discusses measures with restricted germs on the first Grigorchuk group that induce transient random walks on the orbit of 18 , in particular volume lower bounds such measures provide and their limitations. Section 7 contains the main result of the paper: we construct finite entropy measures on Gω with near optimal tail decay and non-trivial Poisson boundary, where ω satisfies what we call Assumption pFrpDqq. In Section 8 we derive volume lower estimates for Gω from measures constructed in Section 7. We close the paper with a few remarks and questions. Conventions that are used throughout the paper: ‚ We consider right group actions Γ ñ X and write the action of group element g on x P X as x ¨ g. ‚ Given a probability measure µ on Γ, we say µ is non-degenerate if its support generates G as a semigroup. Let X1 , X2 , . . . be i.i.d. random variables with distribution µ on Γ and Wn “ X1 . . . Xn . We refer to pWn q8 n“1 as a µ-random walk. ‚ On a regular rooted tree T, given a vertex u P T and v P T Y BT, uv denotes the concatenation of the strings, that is the ray with prefix u followed by v. Given u, v P T Y BT, u ^ v denotes the longest common prefix of u and v. ‚ Given a finite set F , uF denotes the uniform distribution on F . ‚ Let v1 , v2 two non-decreasing functions on N or R, v1 À v2 if there is a constant C ą 0 such that v1 pxq ď v2 pCxq for all x in the domain. Let » be the equivalence relation that v1 » v2 if v1 À v2 and v2 À v1 . Note that for finitely generated infinite groups, the » equivalence class of the growth function does not depend on the choice of generating set. 2. P RELIMINARIES 2.1. Boundary behavior of random walks and connection to growth. We recall the notion of the invariant σ-field and the tail σ-field of a random walk. Let µ be a probability measure on a countable group Γ. For x P Γ, let Px be the law of the random walk trajectory pW0 , W1 , . . .q starting at W0 “ x. Endow the space of infinite trajectories GN with the usual Borel σ-field A. The shift s : ΓN Ñ ΓN acts by spg1 , g2 , . . .q “ pg2 , g3 , . . .q. The invariant σ-field I is defined as I “ tA P A : s´1 pAq “ Au, it is also referred to as the stationary σ-field. There is a correspondence between I and the space of bounded µ-harmonic functions on Γ. In particular, the invariant σ-field I is trivial (i.e. any event A P I satisfies Px pAq “ 0 or 1) if and only if all bounded µ-harmonic functions are constant, see [34]. ´n The intersection A8 “ X8 A is called the tail σ-field or exit σ-field of the random n“0 s walk. When µ is aperiodic, the Px -completion of A8 and the Px -completion of I coincide. Therefore for µ aperiodic, all bounded µ-harmonic functions are constant if and only if the tail σ-field A8 is Px -trivial for some (hence all ) x P Γ. The (Shannon) entropy of a probability measure µ on Γ is ÿ Hpµq “ ´ µpgq log µpgq. gPΓ 10 ANNA ERSCHLER AND TIANYI ZHENG In the case that the measure µ has finite entropy Hpµq ă 8, the (Avez) asymptotic entropy of µ is defined as ` ˘ H µpnq hµ “ lim . nÑ8 n The entropy criterion of Kaimanovich-Vershik [34] and Derriennic [22], states that for µ of finite entropy, all bounded µ-harmonic functions are constant if and only if the Avez asymptotic entropy hµ “ 0. Given a probability measure of finite entropy and non-trivial Poisson boundary on a finitely generated group Γ, by the entropy criterion and the Shannon theorem, one can derive lower estimate for the volume growth of Γ from the tail decay of the measure. The following lemma extends [24, Lemma 6.1]. Lemma 2.1. Let Γ be a finitely generated group and |¨| “ lS a word distance on Γ. Suppose Γ admits a probability measure µ of finite entropy such that the Poisson boundary pΓ, µq is nontrivial. Let ÿ %n “ inf tr ą 0 : µ ptg : |g| ě ruq ă 1{nu and φprq “ |g|µpgq. g:|g|ďr Then there exists a constant c “ cpΓ, µq ą 0 such that vΓ,S pRn q ě exp pcnq where Rn “ nφp%n q. Proof. If the measure µ has finite first moment, in other words the function φprq is bounded, then Γ has exponential growth. In this case the claim is true. In what follows we assume that φprq Ñ 8 as r Ñ 8. Let µ% be the truncation of measure µ at radius %, that is µ% pgq “ µpgq1t|g|ď%u . Because of the triangle inequality |gh| ď |g| ` |h|, we have ÿ ÿ |g|µpnq |g|µ% pgq “ nφp%q. % pgq ď n g g It follows from Markov inequality that µpnq % ptg : |g| ě Ruq ď nφp%q . R pnq For all n ě 2 , the total mass of the convolution power µ%n satisfies ÿ 1 n n µpnq %n pgq “ p1 ´ µptg : |g| ą %n uqq ě p1 ´ 1{nq ě . 4 g Take Rn “ 8nφp%n q, then 1 nφp%n q 1 ´ “ . 4 Rn 8 Denote by h the asymptotic entropy of µ. By the entropy criterion, non-triviality of Poisson boundary of pG, µq is equivalent to h ą 0. By Shannon’s theorem, for any  ą 0, there exists a constant N such that for any n ą N , there is a finite set Vn Ă G such that µpnq pVn q ě 1 ´  and µpnq pBpe, Rn qq ě µpnq %n pBpe, Rn qq ě e´nph`q ď µpnq pxq ď e´nph´q for x P Vn . Consider the intersection Vn1 “ tg : |g| ď Rn u X Vn , we have 1 ´  ď µpnq pVn1 q ď |Vn1 | max1 µpnq pgq ď |Vn1 |e´nph´q . gPVn 8 GROWTH OF PERIODIC GRIGORCHUK GROUPS Choose  ą 0 to be a constant less than large, 1 2 11 mint1{8, hu. We obtain that for all t sufficiently vS pRn q ě |Vn1 | ě 1 1 nh e2 . 16  We record the following two corollaries of Lemma 2.1. Corollary 2.2. Suppose that Γ admits a probability measure µ of finite entropy with nontrivial Poisson boundary. Suppose µ satisfies µ ptg : |g| ě ruq ď C , rα `prq where α P p0, 1q and ` is a slowly varying function such that `pxq „ `pxb q as x Ñ 8 for some b ą 0. Then there exists a constant c “ cpΓ, µq ą 0 such that vS pnq ě exppcnα `pnqq. Proof. Let f be the asymptotic inverse of rα `prq, then f pxq „ pr`# prqq1{α , where `# is the de Bruijn conjugate of `, see [12, Proposition 1.5.15.]. Let żr dx φ̃prq “ . α `pxq x 1 Then φ̃prq „ 1 1´α {`pxq, 1´α x see [12, Proposition 1.5.8.]. It follows that Rn “ 4nφp%n q ď C1 nφ̃pf pnqq ď C2 n1{α `# pnq´1`1{α {`pn1{α `# pnq1{α q. Under the assumption that `pxq „ `pxb q for some b ą 0, we have `# pxq „ 1{`pxq and the bound simplifies to Rn ď Cpn{`pnqq1{α . By Lemma 2.1, we have there exists constants C, c ą 0 which depend on µ such that ´ ¯ vS Cpn{`pnqq1{α ě exppcnq. Since the asymptotic inverse of px{`pxqq1{α is xα `pxq in this case, we conclude that there exists a constant c “ cpΓ, µq ą 0 such that vS pnq ě exppcnα `pnqq.  α Corollary 2.3. Let Γ be a finitely generated group such that vΓ prq À er , where α P p0, 1q. Then any probability measure µ on Γ with finite α-moment ÿ |g|α µpgq ă 8 gPG has finite entropy and trivial Poisson boundary. ř Proof. We first show that µ has finite entropy. Write M “ gPG |g|α µpgq. Let X1 be a ř8 random variable with distribution µ and Z “ k“1 k1Bpe,2k qzBpe,2k´1 q pX1 q. Then HpX1 q ď 8 ÿ k“1 P pZ “ kq H pX1 |Z “ kq ` HpZq. 12 ANNA ERSCHLER AND TIANYI ZHENG We have 8 ÿ P pZ “ kq H pX1 |Z “ kq ď k“1 8 ÿ ˇ ˇ P pZ “ kq log ˇBpe, 2k qˇ k“1 ďC ÿ |g|α µpgq ă 8. gPG For Z, by the inequality ´a log a ď 2e M , 2pk´1qα HpZq “ ´ 8 ÿ ´1 ? a and the Markov inequality PpZ “ kq ď PpZ “ kq log PpZ “ kq ď 2e´1 k“1 8 ÿ PpZ “ kq1{2 ă 8. k“1 We conclude that µ has finite entropy. Suppose on the contrary µ has non-trivial Poisson boundary. Since µ has finite αmoment, we have %n “ inftr : µptg : |g| ě ruq ď 1{nu ď r1{α , ÿ φprq “ |g|µpgq “ opr1´α q as r Ñ 8. g:|g|ďr Therefore by Lemma 2.2, we have that vW,T pRn q Á en where Rn {n1{α Ñ 0 as n Ñ 8. This contradicts the upper bound vΓ prq À expprα q.  2.2. Permutational wreath products. Let Γ be a group acting on a set X from the right. Let A be a group, ř the permutational wreathřproduct W “ A oX Γ is defined as the semidirect product X A ¸ Γ, where Γ acts on X A by permuting coordinates. The support suppf of f : X Ñ A consists of points of x P X such that f pxq ‰ idA . Elements of ř ř X A are viewed as finitely supported functions X Ñ A. The action of Γ on X A is τg f pxq “ f px ¨ gq. ´1 It follows that supppτ ř g f q “ psuppf q ¨ g . Elements in W “ A oX Γ are recorded as pairs pf, gq where f P X A and g P Γ. Multiplication in W is given by pf1 , g1 qpf2 , g2 q “ pf1 τg1 f2 , g1 g2 q. When Γ and A are finitely generated, W “ A oX Γ is finitely generated as well. For more information about Cayley graphs of permutational wreath products, see [7, Section 2]. 2.3. Groups acting on rooted trees. We review some basics for groups acting on rooted trees. For more background and details, we refer to [10, Part 1], [20, Chapter VIII] or [38, Chapter 1]. Let d “ pdj qjPN be a sequence of integers, dj ě 2 for all j P N. The spherically symmetric rooted tree Td is the tree with vertices v “ v1 . . . vn with each vj P t0, 1, . . . , dj ´1u. The root is denoted by the empty sequence H. Edge set of the tree is tpv1 . . . vn , v1 . . . vn vn`1 qu. The index n is called the depth or level of v, denoted |v| “ n. Denote by Tnd the finite subtree of vertices up to depth n and Ln the vertices of level n. The boundary BTd of the tree Td is the set of infinite rays x “ v1 v2 . . . with vj P t0, 1, . . . , dj ´ 1u for each j P N. The group of automorphisms AutpTd q of the rooted tree is the group of tree automorphisms that fix the root H. The group AutpTd q admits the following canonical isomorphism ψ : AutpTd q Ñ AutpTsd q ot0,1,...,d1 ´1u Sd1 , GROWTH OF PERIODIC GRIGORCHUK GROUPS 13 where Sd is the permutation group on the set t0, 1, . . . , d ´ 1u, and s is the shift on the sequences, spd1 , d2 , . . .q “ pd2 , d3 , . . .q. We refer to the isomorphism ψ as the wreath recursion. As the isomorphism is canonical, we omit ψ and identify an automorphism and its image under ψ: for g P AutpTd q, write g “ pg0 , . . . , gd1 ´1 q τ1 pgq where the sections gj P AutpTsd q and τ1 pgq P Sd1 . The section gj represents the action of g on the subtree Tj rooted at the vertex j. The permutation τ1 pgq describes how the subtrees rooted at j, j P t0, 1, . . . , d1 ´ 1u are permuted. We refer to τ1 pgq as the root permutation of g. Apply the wreath recursion n times, we have ψ n : AutpTd q Ñ AutpTsn d q oLn AutpTnd q, g ÞÑ pgv qvPLn τn pgq, where finitary permutation τn pgq is the projection of g to the automorphism group of the finite tree Tnd , and gv is called the section of g at vertex v. Since the isomorphism ψ n is canonical, we write g “ pgv qvPLn τn pgq. Let G be a subgroup of AutpTd q. Given a vertex u P Td , the vertex stabilizer StG puq consists of these elements in G that fix u, that is StG puq “ tg P G : u ¨ g “ uu. The n-th level stabilizer StG pLn q consists of the automorphisms in G that fixes all the vertices on level n, StG pLn q “ XvPLn StG pvq. The rigid vertex stabilizer of u in G, denoted by RistG puq, consists of the automorphisms in G that fix all vertices not having u as a prefix. An element g P RistG puq only acts on the subtree rooted at u: if |u| “ n, then under the wreath recursion ψ n , the finitary permuation τn pgq is equal to identity, and the section gv is equal to identity for any v ‰ u. Since automorphisms in different rigid vertex stabilizers on the same level act on disjoint subtrees, they commute with other other. The rigid n-th level stabilizer is defined as ź RistG pLn q “ RistG puq. uPLn We now recall the definitions of branch groups. Let T be a rooted tree of constant valency d and G be a subgroup of AutpTq acting level transitively. (1) If all rigid n-th level stabilizers RistG pLn q, n P N, have finite index in G, then we say G is a branch group. (2) We say G is a regular branch group if it acts on a regular tree T of constant valency d, and there exists a finite index subgroup K ă G such that K d is contained in ψpKq as a finite index subgroup, that is pK, . . . , K q is a finite index subgroup of loooomoooon d copies ψpKq. In this case we say G is branching over K. The group of automorphisms of the subtree rooted at u is embedded in AutpTd q as rigid vertex stabilizer of u by (2.1) ιp¨ : uq : AutpTusn d q Ñ AutpTsn d q oLn AutpTnd q h ÞÑ pgv q, where gu “ h and gv “ e for any v ‰ u. It follows from the definition that if G is branching over K, then for any vertex u P T, RistG puq contains K as a subgroup. In particular, we have that ιph, uq P K for any h P K, u P T. 14 ANNA ERSCHLER AND TIANYI ZHENG 2.4. Grigorchuk groups. The groups tGω u were introduced by Grigorchuk in [29] as first examples of groups of intermediate growth. We recall below the definition of these groups. Let t0, 1, 2u be the three non-trivial homomorphisms from the 4-group pZ{2Zq ˆ pZ{2Zq “ tid, b, c, du to the 2-group Z{2Z “ tid, au. They are ordered in such a way that 0, 1, 2 vanish on d, c, b respectively. For example, 0 maps id, d to id and b, c to a. Let 8 Ω “ t0, 1, 2u be the space of infinite sequences over letters t0, 1, 2u. The space Ω is endowed with the shift map s : Ω Ñ Ω, spω0 ω1 . . .q “ ω1 ω2 . . .. Given an ω P Ω, the Grigorchuk group Gω acting on the rooted binary tree is generated by ta, bω , cω , dω u, where a “ pid, idqε, ε transposes 0 and 1, and the automorphisms bω , cω , dω are defined recursively according to ω as follows. The wreath recursion sends ψn : Gsn ω Ñ Gsn`1 ω ot0,1u S2 by ψn pbsn ω q “ pωn pbq, bsn`1 ω q , ψn pcsn ω q “ pωn pcq, csn`1 ω q , ψn pdsn ω q “ pωn pdq, dsn`1 ω q . The string ω determines the portrait of the automorphisms bω , cω , dω by the recursive definition above. The first Grigorchuk group corresponds to the periodic sequence ω “ p012q8 and is often denoted as G012 . See Figure 2.1 for the portraits of these tree automorphisms. F IGURE 2.1. Portraits of generators of the first Grigorchuk group. By [29], if ω is eventually constant, then Gω has polynomial growth; otherwise Gω is of intermediate growth. When ω contains infinitely many of each of the three symbols t0, 1, 2u, Gω is an infinite torsion group. The following substitutions are used to obtain words with asymptotically maximal inverted orbit growth in [8, Section 3.2]. Define self-substitutions ζi , i P t0, 1, 2u, of GROWTH OF PERIODIC GRIGORCHUK GROUPS 15 tab, ac, adu by (2.2) ζ0 : ab ÞÑ abab, ac ÞÑ acac, ad ÞÑ abadac, ζ1 : ab ÞÑ abab, ac ÞÑ adacab, ad ÞÑ adad, ζ2 : ab ÞÑ acabad, ac ÞÑ acac, ad ÞÑ adad. ˚ ˚ It is understood that ζωn sends tabsn`1 ω , acsn`1 ω , adsn`1 ω u to tabsn ω , acsn ω , adsn ω u by the rules specified above, for example if ωn “ 0, then ζωn pabsn`1 ω q “ absn ω absn ω . ˚ One step wreath recursion gives that for w P tab, ac, adu , # pawa, wq if ζωn pwq contains an even number of a, (2.3) ψn pζωn pwqq “ pwa, awqε if ζωn pwq contains an odd number of a. This formula is used in [8, Section 3.2] (where there is a misprint), see also lecture notes of Bartholdi [6, Section F]. It follows from 2.3 that if g P Gsn`1 ω can be represented by a word in tabsn`1 ω , acsn`1 ω , adsn`1 ω u, then the substitution ζωn can be applied to g and the resulting image in Gsn ω does not depend on the choice of the representing word. The composition ζω0 ˝ . . . ˝ ζωn maps such g P Gsn`1 ω into Gω . Usually, the recursion on the first Grigorchuk group G012 is recorded as (2.4) a “ pid, idqε, b “ pa, cq, c “ pa, dq, d “ pid, bq. Compared with the general notation for Gω , the following identification is made: ω “ p012q8 and (2.5) b “ bω “ cs2 ω “ dsω , c “ bsω “ cω “ ds2 ω , d “ bs2 ω “ csω “ dω . Note that under this identification, when applying the substitutions ζi along the string ω “ p012q8 , we have the substitution ζ mentioned in the Introduction: ζ : ab ÞÑ abadac, ac ÞÑ abab, ad ÞÑ acac. For example, for n ” 0 mod 3, ζωn´1 “ ζ2 and ζωn´1 pabsn ω q “ acsn´1 ω absn´1 ω adsn´1 ω , ζωn´1 pacsn ω q “ acsn´1 ω acsn´1 ω , ζωn´1 padsn ω q “ adsn´1 ω adsn´1 ω in general notation. By the identification explained in (2.5), ζωn´1 can be written as the substitution ζ. We mention another useful substitution on G012 : the substitution σ on ta, b, c, du˚ such that (2.6) σpaq “ aca, σpbq “ c, σpcq “ d, σpdq “ b. It gives an homomorphism from G012 to itself. The substitution σ is used in the proof of 1{2 the anti-contraction property which leads to the lower bound en by Grigorchuk [29]. It also appears in Lysionok’s recursive presentation of the group G012 in [37]. In later sections where only the first Grigorchuk group is discussed we will adopt the usual notation as in (2.4). One should keep in mind the identification discussed above to avoid possible confusions with general notation for Gω . 2.5. Sections along a ray. A tree automorphism can be described by its portrait, see for example [10, Section 1.4]. For our purposes, it is useful to describe an automorphism by its sections along a ray (finite or infinite) which it fixes. Let T be the rooted binary tree. Let g P AutpTq and suppose v P T is a vertex such that v ¨ g “ v. Write v “ v1 v2 . . . vn . Since v is fixed by g, g is completely described by its sections at v̌1 , v1 v̌2 , . . . , v1 . . . vn´1 v̌n and v, where v̌j denotes the opposite of vj , 16 ANNA ERSCHLER AND TIANYI ZHENG F IGURE 2.2. A portrait of ra, bscra, bs´1 along 10 v̌j “ 1 ´ vj . More formally, under the wreath recursion, g “ pg0 , g1 q (there is no root permutation because v is fixed by g). Then record gv̌1 and continue to perform wreath recursion to gv1 . Record the section gv1 v̌2 and continue with gv1 v2 . The procedure stops when we reach level n and record the sections at v and its sibling. For an automorphism g which fixes an infinite ray v “ v1 v2 . . . P BT, g is described by the collection of sections tgv1 ...v̌n unPN . When all the sections gv1 ...v̌n P S2 , following the terminology of [10, Definition 1.24], we say that the automorphism g is directed along the infinite ray v, . For example, in the Grigorchuk group Gω , the generators bω , cω , dω are directed along the ray 18 . When v ¨ g “ v and all the sections gv1 ...v̌n are represented by short words from an explicit collection, we draw the picture of these sections along v to describe the element g. Although this picture is not a portrait in the strict sense, it effectively describes how g acts on the tree. Example 2.4. Take in the first Grigorchuk group the element g “ ra, bscra, bs´1 . Then the vertex 10 is fixed by g. The portrait of g along 10 is given by g0 “ cac, g11 “ id and g10 “ b. See Figure 2.2. 3. S TABILIZATION OF GERM CONFIGURATIONS The main purpose of this section is to formulate and prove Proposition 3.3 which provides a sufficient condition for stabilization of cosets of germ configurations. We recall the notion of germs of homeomorphisms. Let X be a topological space. A germ of homeomorphism of X is an equivalence class of pairs pg, xq where x P X and g is a homeomorphism between a neighborhood of x and a neighborhood of gpxq; and two germs pg1 , x1 q and pg2 , x2 q are equal if x1 “ x2 and g1 , g2 coincide on a neighborhood of x1 . A composition pg1 , x1 qpg2 , x2 q is defined if and only if x1 ¨ g1 “ x2 . The inverse of the a germ pg, xq is pg, xq´1 “ pg ´1 , x ¨ gq. A groupoid of germs of homeomorphisms on X is a set of germs of homeomorphisms of X that is closed under composition and inverse, and that contains all identity germs pidX , xq, x P X . Let G be a group acting by homeomorphisms on X from the right. Its groupoid of germs, denoted by G, is the set of germs tpg, xq : g P G, x P X u. For x P X , the isotropy group of G at x, denoted by Gx , is the set of germs tpg, xq : g P StG pxqu. In other words, Gx is the quotient of the stabilizer StG pxq by the subgroup of G which consists of elements acting trivially on a neighborhood of x. GROWTH OF PERIODIC GRIGORCHUK GROUPS 17 Suppose there is a group L acting by homeomorphisms on X such that for any point x P X , the orbits x ¨ L “ x ¨ G and the isotropy group Lx of its groupoid L is trivial. We refer to such an L as an auxiliary group with trivial isotropy. Write conjugation of a germ pg, xq P Gx by σ P L as ` ˘ pg, xqσ :“ σ ´1 gσ, x ¨ σ P Gx¨σ . It’s easy to see that since L has trivial isotropy groups, if x ¨ σ1 “ x ¨ σ2 for σ1 , σ2 P L, then pg, xqσ1 “ pg, xqσ2 . With the auxiliary group L chosen, let Ĝ be the groupoid of germs of the group xG, Ly. The isotropy group Ĝx is called the group of germs in [24]. Notation 3.1. Let G ñ X by homeomorphisms and L be an auxiliary group with trivial isotropy. Suppose the isotropy group Ĝo of Ĝ is non-trivial at some point o P X . Let Ho ť Ĝo be a proper subgroup of Ĝo . For each point x P o ¨ G, fix a choice of σx P L such that o ¨ σx “ x. Let ! ) Hx :“ pg, xq P Ĝx : pσx gσx´1 , oq P H0 , then Hx is a proper subgroup of Ĝx . Let H “ HpHo q be the following sub-groupoid of G: (3.1) H :“ tpg, xq : g P G, x P o ¨ G, pgσ ´1 , xq P Hx where σ P L, x ¨ g “ x ¨ σu. We now discuss some examples of groupoid of germs of groups of acting on rooted trees. Let G ă AutpTd q, then G acts on the boundary of the tree X “ BTd by homeomorphisms. Let L be the subgroup of AutpTd q that consists of all finitary automorphisms. In other words, an element g P AutpTd q is in L if there exists a finite level n such that all sections gv for v P Ln are trivial. The group L is locally finite. For G ă AutpTd q, we use the group LG “ tγ P L : x ¨ γ P x ¨ G for all x P BTu as an auxiliary group with trivial isotropy groups. In particular if G acts level transitively, then L is used as the auxiliary group. The isotropy groups of the groupoid of germs are easy to recognize in directed groups (called spinal groups in [10, Chapter 2]). Example 3.2. Let Gω be a Grigorchuk group and o “ 18 . For any ω, Gω acts level transitively. Use the finitary automorphisms L as the auxiliary group. From the definition of the group we have that if x R o ¨ Gω , that is x is not cofinal with 18 , then the isotropy group pGω qx is trivial. For ω eventually constant, say eventually constant 0, we have that pdω , oq “ pid, oq and pbω , oq “ pcω , oq in pGω q´o . In¯ this case for x cofinal with 18 , pGω qx » Z{2Z. For ω not eventually constant then Ĝω “ pGω qx “ tid, b, c, du for x cofinal with 18 . In this case x a group element g has γ-germ at x, where γ P tb, c, du, if there is a finite level n such that the section of g at x1 . . . xn is γsn ω . When ω is not eventually constant, the subgroup xby “ tid, bu is a proper subgroup of Ĝo . We refer to the corresponding sub-groupoid Hb “ Hpxbyq of G as the groupoid of xby-germs. The groupoid of xcy-germs (xdy-germs resp.) is defined in the same way from the subgroup tid, cu (tid, du resp.) of Ĝo . Proposition 3.3 below provides a sufficient condition for stabilization of H-cosets of germs based on the Green function of the induced random walk on the orbit. This criterion is applied to verify non-triviality of Poisson boundary for the measures with good control 18 ANNA ERSCHLER AND TIANYI ZHENG over tail decay constructed in Section 7 on Grigorchuk groups. Given a probability measure µ on G, its induced transition kernel Pµ on an orbit o ¨ G is given by ÿ µpgq1ty“x¨gu . Pµ px, yq “ gPG The Green function GPµ px, yq of the Pµ -random walk is GPµ px, yq “ 8 ÿ Pµn px, yq. n“0 We refer to the book [40, Chapter I] for general background on random walks on graphs. In many situations, estimates on transition probabilities of the induced Pµ -random walk are available while the µ-random walk on the group G is hard to understand. Proposition 3.3. Let G be a countable group acting by homeomorphisms on X from the right and L be an auxiliary group with trivial isotropy. Assume that the isotropy group Ĝo is nontrivial at some point o P X and Ĝo “ Go . Let µ be a non-degenerate probability measure on G. Let Pµ be the induced transition kernel on the orbit o ¨ G and GPµ the Green function of the Pµ -random walk. Suppose there exists a proper subgroup Ho ť Ĝo such that ÿ (3.2) GPµ po, xqµ ptg P G : pg, xq R Huq ă 8, xPo¨G where H “ HpH0 q is the sub-groupoid of G associated with Ho defined in (3.1). Then the Poisson boundary of pG, µq is non-trivial. Remark 3.4. Suppose µ have the following additional property: there exists a finite subset V Ď o ¨ G such that for any element g in the support of µ, pg, xq P H for all x R V , then the condition in Proposition 3.3 is equivalent to GPµ po, oq ă 8. In other words, the induced Pµ -random walk is transient on the orbit o ¨ G. In this special case the claim is given by [24, Proposition 2]. For example, it can be applied to measures of the form µ “ 21 pν ` ηq, where ν is of finite support and for any element g in the support of η, pg, xq P H for all x P o ¨ G. In this case we say η is supported on a subgroup of restricted germs. It is natural to consider G as an embedded subgroup of the (unrestricted) permutational wreath product Ĝo o oo¨G G as follows. ´ś ¯ Denote by W the semi-direct product xPo¨G Ĝx ¸ G. Record elements of W as pairs pΦ, gq, where g P G and Φ assigns each point x P o ¨ G an element in the isotropy group Ĝx at x. Denote by suppΦ the set of points x where Φpxq is not equal to identity of Gx . The action of G on ‘xPo¨G Ĝx is given by pτg Φqpxq “ σΦpx ¨ gqσ ´1 , where σ P L satisfies x ¨ σ “ x ¨ g. One readily checks that τ is a well-defined (doesn’t ś depend on the choice of σ) left action of G on xPo¨G Ĝx . Multiplication in W is given by pΦ, gqpΦ1 , g 1 q “ pΦτg Φ1 , gg 1 q. The semi-direct product W is isomorphic to the permutational wreath product Ĝx o oo¨G G. We now describe an embedding ϑ : G ãÑ W. Fact 3.5. Let ϑ : G Ñ W by defined as ϑpgq “ pΦg , gq such that for x P o ¨ G, (3.3) Φg pxq “ pgσ ´1 , xq P Gx , where σ P L, x ¨ g “ x ¨ σ. Then ϑ is a monomorphism. GROWTH OF PERIODIC GRIGORCHUK GROUPS 19 Proof. Let g1 , g2 P G and σ1 , σ2 P L such that x ¨ g1 “ x ¨ σ1 , x ¨ g1 g2 “ x ¨ g1 σ2 . Then ` ˘σ´1 Φg1 pxq pg1 ¨ Φg2 q pxq “ pg1 σ1´1 , xq g2 σ2´1 , x ¨ g1 1 “ pg1 σ1´1 , xqpσ1 g2 σ2´1 σ1´1 , x ¨ g1 σ1´1 q “ pg1 g2 σ2´1 σ1´1 , xq “ Φg1 g2 pxq. It follows that ϑ is homomorphism. It is clearly injective.  Proof of Proposition 3.3. Let X1 , X2 . . . be i.i.d. random variables on G, Wn “ X1 . . . Xn . Let ϑ : G Ñ W, ϑpgq “ pΦg , gq, be the embedding as described in Fact 3.5. Along the random walk trajectory Wn , consider the Ho -coset of the germ at o. Denote by π pΦWn poqq the (right) coset of ΦWn poq in Go {Ho . By the rule of multiplication in W, ` ˘σ´1 ΦWn`1 poq “ ΦWn poq ΦXn`1 po ¨ Wn q n , σn P L, o ¨ Wn “ o ¨ σn . Therefore the event ( ` ˘( π pΦWn poqq ‰ π ΦWn`1 poq “ ΦXn`1 po ¨ Wn q R Ho¨Wn . By definition of the sub-groupoid of germs H, ( ΦXn`1 po ¨ Wn q R Ho¨Wn “ tpXn`1 , o ¨ Wn q R Hu . Then 8 ÿ 8 ÿ ` ` ˘˘ P π pΦWn poqq ‰ π ΦWn`1 poq “ P ppXn`1 , o ¨ Wn q R Hq n“0 8 ÿ n“0 ÿ ÿ “ µpgq1tpg,xqRHu P px “ o ¨ Wn q n“0 xPo¨G gPG ÿ “ GPµ po, xqµ ptg : pg, xq R Huq . xPo¨G If the summation is finite, by the Borel-Cantelli lemma, π pΦWn poqq stabilizes a.s. along the random walk trajectory pWn q. For each coset γHo in Ĝo {Ho , consider the tail event ! ) AγHo “ lim π pΦWn poqq “ γHo . nÑ8 Given γ P Ĝo “ Go , let g P G be a group element such that o ¨ g “ o and Φg poq “ γ. Note that Pid pAHo q “ Pg pAγHo q and for any m P N, Pid pAHo q “ Pg pAγHo q ě µpmq pg ´1 qPid pAγHo q , Pid pAγHo q ě µpmq pgqPg pAγHo q “ µpmq pgqPid pAHo q . Since µ is non-degenerate, there exists a finite m such that µpmq pgq, µpmq pg ´1 q ą 0. Then Pid pAHo q “ 0 would imply Pid pAγHo q “ 0 for all `γ P Go . On the other ˘ hand since π pΦWn poqq stabilizes with probability 1, we have Pid YγHo PGo {Ho AγHo “ 1. It follows that Pid pAHo q ą 0. Since Pid pAγHo q ě µpmq pgqPid pAHo q ą 0, it follows that Pid pAH0 q ă 1. We conclude that AHo is a non-trivial tail event and the Poisson boundary of pG, µq is non-trivial.  20 ANNA ERSCHLER AND TIANYI ZHENG The boundary behavior of random walk in Proposition 3.3 can be viewed as a lamplighter boundary. Under the embedding ϑ : g ÞÑ pΦg , gq, we refer to Φg as the germ configuration of g. Let pWn q be a random walk on G with a non-degenerate step distribution µ. If (3.2) holds, then for every point x P o ¨ G, the coset of ΦWn pxq in Ĝx {Hx stabilizes with probability one along an infinite trajectory of the random walk pWn q. Thus ś ś if we view x Ĝx {Hx as the space of germ configurations mod x Hx , then when stabilization occurs, we have a limit configuration ΦW8 in this space of cosets. Endowed with the hitting distribution, it can be viewed as a µ-boundary. 4. MEASURES WITH NONTRIVIAL P OISSON BOUNDARIES ON THE FIRST G RIGORCHUK GROUP In this section, we give quick examples of non-degenerate symmetric probability measures on the first Grigorchuk group with non-trivial Poisson boundary. Choices of such measures with better quantitative control over the tail decay will be discussed in Section 6 and Section 7. Recall that the first Grigorchuk group G “ G012 acts on the rooted binary tree, and it is generated by ta, b, c, du where a “ p1, 1qε, b “ pa, cq, c “ pa, dq, d “ p1, bq. As explained in Example 3.2, the generators b, c, d have nontrivial germs at o “ 18 . The isotropy group of G at o is Go » pZ{2Zq ˆ pZ{2Zq. List the elements of Go as tid, b, c, du, where b stands for the germ pb, oq, similarly c and d stand for the corresponding germs. Take the following proper subgroup of Go : Ho “ tid, bu. The group L of finitary automorphisms of the rooted binary tree plays the role of the auxiliary group. Recall the definition of the sub-groupoid Hb “ HpHo q as in (3.1), which we will refer to as the sub-groupoid of b-germs. Now consider the subgroup Hb ă G which consists of group elements that only have trivial or b-germs, that is (4.1) Hb “ tg P G : pg, xq P Hb for all x P 18 ¨ Gu. Given an element in G, one can recognize whether it is in Hb from its sections in a deep enough level. Fact 4.1. Let g P G be a group element. Then g P Hb if and only if there exists k P N such that the section gv is in the set tid, a, bu for all v P L3k . Proof. The “if” direction follows from definition of Hb . We show the only if direction. Since G is contracting, for any g P G, there exists a finite level n such that all sections gv , v P Ln , are in the nucleus N “ tid, a, b, c, du. Perform the wreath recursion down further 1 or 2 levels such that n ” 0 mod 3. Suppose on the contrary there exists a vertex v P Ln such that the section is c or d. Then pg, v18 q is a c-germ or d-germ, a contradiction with g P Hb . Thus the level n satisfies the condition in the statement.  A key property we will use is that the orbit of 18 under the action of Hb is infinite. Recall the notation ιpg, uq as defined in (2.1), which denotes the automorphism in the rigid stabilizer of u that acts as g in the subtree rooted at u. Note that for any n P N, ιpra, bs, 1n q P G. Explicitly we have ιpra, bs : 1n q “ σ n pababq where σ is the homomorphism given by substitution a ÞÑ cac, b ÞÑ d, c ÞÑ b, d ÞÑ c. More generally, ιpg, uq P G GROWTH OF PERIODIC GRIGORCHUK GROUPS 21 F IGURE 4.1. Portrtrait of σ k pababq in the first Grigorchuk group in usual notation. If k is divisible by 3, then the element belongs to Hb (the group with germs equal to the germ of b or trivial.) G for any g P K “ xra, bsy and any vertex u P T, because G ` is regularly ˘ branching over k the subgroup K, see [10, Proposition 1.25]. The portrait of ι ra, bs, 1 is drawn in Figure ` ˘ 4.1. The subset tι ra, bs, 13k : k ě 0u is contained in Hb . Since 18 ¨ ra, bs “ 10018 , it follows that ` ˘ 18 ¨ ι ra, bs, 13k “ 13k`1 0018 . Therefore the orbit 18 ¨ Hb is infinite. By [24, Theorem 4], we can take a measure with non-trivial Poisson boundary of the form µ “ 21 pν ` ηq, where suppν “ ta, b, c, du and η is a symmetric measure supported on Hb with transient induced random walk on the orbit 18 ¨ Hb . Existence of such a measure η is deduced from the fact that the orbit 18 ¨ Hb is infinite by the following lemma. It is [24, Lemma 7.1] with the assumption of A being finitely generated dropped. Since the subgroup Hb is not finitely generated, we include a proof of the lemma. Let A be a countable group and B a subgroup of A. Given a probability measure η on A, recall that the induced transition kernel Pη on the (left) cosets of B is ÿ Pη pBx, Byq “ ηpgq1tBxg“Byu , gPA where x, y P A and Bx, are cosets of B. We say the measure η is transient with respect řBy 8 to B if GPη pB, Bq “ n“0 Pηn pB, Bq ă 8. Lemma 4.2. Let A be a countable group and B ă A a subgroup of infinite index. Then there exists a non-degenerate symmetric probability measure η on A that is transient with respect to B. Apply Lemma 4.2 to the group Hb and its subgroup Hb X StG p18 q. Since the orbit 18 ¨ Hb is infinite, there is a symmetric measure η on Hb such that the induced random walk Pη on 18 ¨ Hb is transient. Let uS be uniform on the generating set S “ ta, b, c, du and take µ “ 12 puS ` ηq. Since obviously the Dirichlet forms of Pµ and Pη satisfies EPµ ě 21 EPη , by comparison principle (see for example [40, Corollary 2.14]), the induced random walk Pµ on 18 ¨ G is transient as well. Since η is supported on the subgroup Hb with only b-germs and ν is of finite support, as explained in Remark 3.4, transience of 22 ANNA ERSCHLER AND TIANYI ZHENG Pµ verifies the condition (3.2) in Proposition 3.3. We conclude that pG, µq has non-trivial Poisson boundary. Proof of Lemma 4.2. First take a symmetric measure µ on A such that µpidq “ 21 and the support of µ generate the group A. The induced random walk Pµ on the cosets BzA is irreducible since suppµ generates A. Since BzA is infinite, Pµ admits no non-zero invariant vector in `2 pBzAq, therefore Pµn pB, Bq Œ 0 as n Ñ 8 by strict convexity of a Hilbert space. Now we prove that if Pµn pB, Bq Ñ 0 as n Ñ 8, then some convex linear combinations of convolution powers of µ, that is measures of the form 8 8 ÿ ÿ η“ cn µpnq , cn “ 1, cn ě 0, n“1 n“1 induce transient random walks on BzA. Following [11], we call η a discrete subordination of µ. Let ψ be a smooth strictly increasing functionřon p0, 8q such that ψp0q “ 0, ψp1q “ 8 1. Suppose that we have expansion ψp1´sq “ 1´ n“1 cn sn for |s| ď 1 with coefficients cn ě 0. Then one can take 8 ÿ µψ :“ I ´ ψpI ´ µq “ cn µpnq . n“1 The class of functions ψ that are suitable for this operation is the Bernstein functions, see the book [39] and [11]. The induced random walk transition operator Pµ is a self-adjoint operator acting on I´P 2 ` pA{Bq. Denote by Es µ the spectral resolution of I ´ Pµ , ż1 I ´ Pµ “ sdEsI´Pµ . 0 Then ż1 ψpsqdEsI´Pµ . I ´ Pµψ “ ψ pI ´ Pµ q “ 0 It follows that ż1 Pµ2n pB, Bq “ ψ @ D p1 ´ ψpsqq2n d EsI´Pµ 1B , 1B . 0 1´Pµ 2 Since there A is no non-zero E Pµ -invariant vector in ` pBzAq, limsÑ0` Es I´Pµ N psq “ Es 1B , 1B , then in particular N psq Ñ 0 as s Ñ 0`. Since 8 ÿ n“0 Pµ2n pB, Bq ψ 8 ż1 ÿ “ “ 0. Write ż1 2n s´1 dN ˝ ψ ´1 psq, p1 ´ ψpsqq dN psq “ n“0 0 0 to make the Green function finite, it suffices to take some ψ such that N ˝ ψ ´1 psq ď cs1` for some  ą 0 near 0. For example one can take the measure ν on p0, 8q such that 1 νppx, 8qq “ N p1{xq 1` , x ě 1, ş and ψ to be the Bernstein function with representing measure ν, ψpsq “ p0,8q p1 ´ ř8 e´st qνpdtq. Note that the coefficients cn in the expansion ψp1 ´ sq “ 1 ´ n“1 cn sn are positive. We conclude that for this choice the Pµψ -random walk on BzA is transient.  GROWTH OF PERIODIC GRIGORCHUK GROUPS 23 As explained in the proof of Lemma 4.2, the measure η with transient induced random walk on the orbit of o is obtained from discrete subordination of some non-degenerate measure on Hb . We wish to point out that in general, the measure η does not necessarily have finite entropy. In Section 5, we develop a direct method to construct measures with transient induced random walks such that the resulting measures have finite entropy and explicit tail decay bounds. Unlike the general Lemma 4.2, this construction heavily relies on the structure of the groups under consideration. This will be crucial in applications to growth estimates. 5. F URTHER CONSTRUCTION OF MEASURES WITH TRANSIENT INDUCED RANDOM WALK 5.1. Measures constructed from cube independent elements. In this subsection we describe a construction of measures with transient induced random walks. It is particularly useful in groups acting by homeomorphisms possessing a rich collection of rigid stabilizers. Transience of the induced random walk is deduced from `2 -isoperimetric inequalities. Let P be a transition kernel on a countable graph X. We assume that P is reversible with respect to π, that is πpxqP px, yq “ πpyqP py, xq. The Dirichlet form of P is defined by 1 ÿ pf pxq ´ f pyqq2 P px, yqπpxq. EP pf q “ 2 x,yPX Denote by }f }`2 pπq the `2 -norm of f with respect to the measure π. Given a finite subset Ω Ă X, denote by λ1 pΩq the smallest Dirichlet eigenvalue: ! ) λ1 pΩq “ inf EP pf q : suppf Ď Ω, }f }`2 pπq “ 1 . An inequality of the form λ1 pΩq ě ΛpπpΩqq is referred to as an `2 -isoperimetric inequality. It is also known as a Faber-Krahn inequality. The following isoperimetric test for transience is from [32, Theorem 6.12]. It is a consequence of the connection between `2 -isoperimetric inequalities and on-diagonal heat kernel upper bound, see Coulhon [16, Proposition V.1] or Grigor’yan [33]. Proposition 5.1 (Isoperimetric test for transience [32]). Suppose v0 “ inf xPX πpxq ą 0. Assume that λ1 pΩq ě ΛpπpΩqq holds for all finite non-empty subset Ω Ă X, where Λ is a continuous positive decreasing function on rv0 , 8q. If ż8 ds ă 8, 2 v0 s Λpsq then the Markov chain P on X is transient. The best possible choice of the function Λ is defined as the `2 -isoperimetric profile ΛP of P , ΛP pvq :“ inf tλ1 pΩq : Ω Ă X and πpΩq ď vu . A useful way to obtain lower bounds on ΛP is through `1 -isoperimetry. By Cheeger’s inequality (see [35, Theorem 3.1]) ˆ ˙2 1 |BP Ω| (5.1) λ1 pΩq ě , 2 πpΩq 24 ANNA ERSCHLER AND TIANYI ZHENG ř where |BP Ω| “ xPΩ,yPΩc πpxqP px, yq is the size of the boundary of Ω with respect to pP, πq. In what follows we will consider Pµ on X induced by a symmetric probability measure µ on G, G ñ X. In this case Pµ is symmetric and reversible with respect to π ” 1. Lemma 5.2. Let G be a countable group acting on X, o P X be a point such that the orbit o ¨ G is infinite. Suppose there is a sequence of finite subsets Fn Ď G with |Fn | Õ 8 as n Ñ 8 and a constant c0 ą 0 such that inf |x ¨ Fn | ě c0 |Fn |. xPo¨G Let pλn q be a sequence of positive numbers such that ř8 n“1 λn “ 1 and 8 ÿ 1 ă 8. p|F λ | n ´ |Fn´1 |q n“1 n Let µ“ 8 ¯ ÿ λn ´ uFn ` uFn´1 , 2 n“1 where uF denotes the uniform measure on the set F . Then the induced Pµ -random walk on o ¨ G is transient. ¯ ´ Proof. Denote by Pn the transition kernel on o¨G induced by the measure 12 uFn ` uFn´1 . Under the assumption that inf xPo¨H |x ¨ Fn | ě c0 |Fn |, we have that for any set U Ă o ¨ G with |U | ď c20 |Fn |, |BPn U | c0 ě . |U | 4 Indeed, the size of the boundary is given by ÿ ÿ 1 ÿ 1` ˘ 1U c px ¨ gq ` 1U c px ¨ g ´1 q . |BPn U | “ Pn px, yq “ |F | 2 n gPF xPU,yPU c xPU n The assumption that inf xPo¨H |tx ¨ Fn u| ě c0 |Fn | implies that for any x, ÿ ÿ 1U c px ¨ gq “ |x ¨ Fn | ´ 1U px ¨ gq ě c0 |Fn | ´ |U |. gPFn It follows that for |U | ď gPFn c0 2 |Fn |, |BPn U | 1 c0 |Fn | ´ |U | c0 ě ě . |U | 2 |F0 | 4 We mention that the argument above is well-known, it is a step in the proof of the CoulhonSaloff-Coste isoperimetric inequality [17]. By Cheeger’s inequality (5.1), the `2 -isoperimetric profile of Pn satisfies 1 ´ c0 ¯2 c0 ΛPn pvq ě for all v ď |Fn |. 2 4 2 ř8 Now the random walk induced by µ is the convex linear combination Pµ “ n“1 λn Pn . By definition it is clear that EPµ ě λn EPn . Therefore we have a piecewise lower bound on ΛPµ : ´c ı 1 ´ c0 ¯2 c0 0 ΛPµ pvq ě λn for v P |Fn´1 |, |Fn | , n P N. 2 4 2 2 GROWTH OF PERIODIC GRIGORCHUK GROUPS 25 Plug the estimate into the isoperimetric test for transience, we have ż8 8 ÿ ds 1 ď C . 2 Λ psq s λ p|F | ´ |Fn´1 |q Pµ n 1 n“1 n If the summation on the right hand side of the inequality is finite, then by Proposition 5.1, the induced random walk Pµ is transient.  Example 5.3. Suppose there is a sequence of Fn satisfying the assumption of Lemma 5.2 with volume |Fn | „ θn . Then one can choose the sequence pλn q to be λn “ C θ´n n1` for any  ą 0. The resulting convex linear combination µ as in the statement of the lemma induces transient random walk on the orbit of o. The condition in Lemma 5.2 forces Fn X StG pxq to be small for all x in the orbit. Such sets are not common to observe, especially in the situation of totally non-free actions. In applications to Grigorchuk groups, the subsets Fn are built from a sequence of elements which satisfy an injective property which we refer to as "cube independence" defined below. We have mentioned the definition of cube independence property for k “ 1 in the Introduction, now we formulate a more general definition. For a sequence of elements g1 , g2 , . . . P G, we say the sequence satisfies the cube independence property on x0 ¨ G with parameters k “ pkn q 8 n“1 , kn P N, if for any n ě 1 and x P x0 ¨ G, the map t0, 1, . . . , k1 u ˆ . . . ˆ t0, 1, . . . , kn u Ñ x0 ¨ G pε1 , . . . εn q ÞÑ x ¨ gnεn . . . g1ε1 is injective. When the parameters kn are constant 1, we omit reference to k and say the sequence has the cube independence property. Any other ordering of the elements g1 , . . . , gn in the definition would serve the same purpose, but we choose to formulate it this way because in examples we consider it is easier to verify inductively. By definition it is clear that cube independence property is inherited by subsequences. Proposition 5.4. Suppose g1 , g2 , . . . P G is a sequence of elements satisfying the cube independence property on the orbit x0 ¨ G with k “ pkn q, kn P N. Let Fn “ tgnεn . . . g1ε1 : εj P t0, 1, . . . , kj u, 1 ď j ď nu . For any  ą 0, let µ“ ÿ n ´ ¯ C n1` uFn ` uFn´1 , 2p1 ` k1 q . . . p1 ` kn q where C is the normalizing constant such that µ has total mass 1. Then µ is a symmetric probability measure on G of finite entropy such that the induced Pµ -random walk on x0 ¨ G is transient. Proof. By śndefinition of cube independence property, śn we have for all x P x0 ¨ G, |x ¨ Fn | “ |Fn | “ j“1 p1 ` kj q. Choose λn “ C n1` j“1 p1 ` kj q´1 , then 8 8 ÿ 1 1 2 ÿ ´1´ ď2 “ n ă 8. λ p|Fn | ´ |Fn´1 |q λ |F | C n“1 n“1 n n n“1 n 8 ÿ 26 ANNA ERSCHLER AND TIANYI ZHENG ´ ¯ ř8 Therefore by Lemma 5.2, the convex combination µ “ n“1 λ2n uFn ` uFn´1 induces transient random walk on the orbit o ¨ G. The entropy of µ is bounded by Hµ p1q ď 8 ÿ λn log |Fn | n“1 ˜ ¸ n ź n1` śn “C log p1 ` kj q ă 8, j“1 p1 ` kj q n“1 j“1 śn where the series is summable because j“1 p1 ` kj q ě 2n . 8 ÿ  Remark 5.5. As mentioned in the Introduction, we refer to the set Fn as an n-quasi-cubic set and the measure uFn an n-quasi-cubic measure. By definition bounds on the length of elements g1 , g2 , . . .řgive explicit estimates of the truncated moments and tail decay of n µ. More precisely, if j“1 p1 ` kj q|gj | ď `n , then maxt|g|, g P Fn u ď `n and for the measure µ in Corollary 5.4, µ pBpe, `n qc q ď C1 n1` . p1 ` k1 q . . . p1 ` kn q One way to produce a cube independent sequence is to select suitable elements from level stabilizers. Lemma 5.6. Let G ă AutpTd q and suppose that gn P G satisfies that gn P StG pLn q and the root permutation of the section pgn qv has no fixed point for all v P Ln . Then the sequence pgn qně0 has the cube independence property on 18 ¨ G. Proof. Given x P 18 ¨ G, we need to show injectivity of the map t0, 1un Ñ 18 ¨ G pε1 , . . . εn q ÞÑ x ¨ gnεn . . . g1ε1 . Since xg2 , . . . , gn y is in the stabilizer of level 2, we have that the first two digits of y “ x ¨ gnεn . . . g1ε1 is x1 x2 ¨ g1 . Combined with the assumption on the root permutation of pg1 qv , v P L1 , the second digit of y is different from x2 if and only if ε1 “ 1. Thus ε1 ε1 x ¨ gnεn . . . g1ε1 “ x ¨ gnn . . . g11 implies ε1 “ ε11 . The same argument recursively shows that εj “ ε1j for all 1 ď j ď n.  5.2. Critical constant of recurrence. In this subsection we consider an explicit sequence of cube independent elements on the first Grigorchuk group G, obtained by applying certain substitutions. As an application of Proposition 5.4, we evaluate the critical constant for recurrence of pG, StG p18 qq. The notion of critical constant for recurrence of pG, Hq, where H is a subgroup of G, is introduced in [25]. For a group G equipped with a length function l and a subgroup H ă G of infinite index, the critical constant for recurrence crt pG, Hq with respect to l, is defined as the sup β, where the sup is over all β ě 0 such that there exists a symmetric probability measure µ on G with transient induced random walk on HzG and µ has finite β-moment with respect to l on G: ÿ lpgqβ µpgq ă 8. gPG GROWTH OF PERIODIC GRIGORCHUK GROUPS 27 When G is finitely generated and l is the word distance on a Cayley graph of G, we omit reference to l. For the rest of this subsection, G denotes the first Grigorchuk group G012 and we use the usual notation for G as in (2.4). By [25, Theorem 2], for H the stabilizer StG p18 q, the critical constant crt pG, StG p18 qq ă 1. We show that indeed crt pG, StG p18 qq is equal to the growth exponent of the permutational wreath product pZ{2Zq oS G, S “ 18 ¨ G. Theorem 5.7. Let G be the first Grigorchuk group. Then log 2 , log λ0 where λ0 is the postivie root of the polynomial X 3 ´ X 2 ´ 2X ´ 4, α0 « 0.7674. crt pG, StG p18 qq “ α0 “ The proof of Theorem 5.7 consists of two parts. To show the lower bound, we construct an explicit measure with transient induced random walks on the orbit of 18 by applying Proposition 5.4. Recall the substitutions ζ of tab, ac, adu˚ , which is used to produce words with asymptotic maximal inverted orbit growth in [7, Proposition 4.7], ζ : ab ÞÑ abadac, ac ÞÑ abab, ad ÞÑ acac. By direct calculation ζpabq “ pb, abaqε, ζpacq “ pca, acq, ζpadq “ pda, adq. Fact 5.8. Let w be a word in the alphabet tab, ac, adu such that it has even number of a’s. Then ζ n pwq is in the n-th level stabilizer, and the section at the vertex v “ x1 . . . xn is given by # w if x1 ` . . . ` xn ” n mod 2 n pζ pwqqv “ awa if x1 ` . . . ` xn ” n ´ 1 mod 2. Proof. The claim can be verified by induction on n. For w with even number of a’s, ζpwq “ pawa, wq. Note that if w has even number of a’s then so does ζpwq. Applied to ζ n´1 pwq, we have ζ n pwq “ paζ n´1 pwqa, ζ n´1 pwqq. Then the induction hypothesis on ζ n´1 pwq implies the statement on ζ n pwq.  8 By Fact 5.8 and Lemma 5.6, we have that pζ n pacqqn“1 form a cube independent sequence. With considerations of germs in mind (although not relevant in this subsection), we prefer to take the following sequence. Example 5.9. As mentioned in the Introduction, take the following sequence of elements pgn q8 n“1 in G: # ζ n pacq if n ” 0, 1 mod 3 (5.2) gn “ ζ n padq if n ” 2 mod 3. Then by Fact 5.8 and Lemma 5.6, pgn q has the cube independence property. With this sequence of cube independent elements, take the n-quasi-cubic sets Fn “ tgnεn . . . g1ε1 : εj P t0, 1u, 1 ď j ď nu . and the convex combination (5.3) η0 “ 8 ¯ ÿ C n1` ´ ´1 u ` u F n Fn 2n n“1 28 ANNA ERSCHLER AND TIANYI ZHENG where C ą 0 is the normalization constant such that η0 is a probability measure. Then by Proposition 5.4, the η0 -induced random walk on the orbit of 18 is transient. By definition the length of gn can be estimated by eigenvalues of the matrix associated with the substitution ζ. Record the number of occurrences of ab, ac, ad in a word w as a column vector lpwq, then by definition of the substitution ζ, we have lpζpwqq “ M lpωq where the matrix M is » fi 1 2 0 M “ – 1 0 2 fl . 1 0 0 It follows that ¨ ˛ 0 ` ˘ |ζ n pacq| “ 2 2 2 M n ˝ 1 ‚, 0 ¨ ˛ 0 ` ˘ |ζ n padq| “ 2 2 2 M n ˝ 0 ‚. 1 Therefore |gn | ď Cλn0 , where λ0 is the spectral radius of M , that is the positive root of the characteristic polynomial X 3 ´ X 2 ´ 2X ´ 4. Proof of lower bound in Theorem 5.7. Consider the measure η0 defined in (5.3) which induces a transient random walk on the orbit of 18 by Corollary 5.4. Since n n ÿ ÿ maxt|g| : g P Fn u ď |gj | ď C λn0 “ C 1 λn0 , j“1 j“1 it follows that ` ˘ Cn1` . η0 g : |g| ě C 1 λn0 ď 2n log 2 This tail estimate implies that for any β ă log λ0 , µ has finite β-moment. Since the η0 induced random walk on the orbit of 18 is transient, it implies log 2 crt pG, StG p18 qq ě α0 “ . log λ0  The upper bound crt pG, StG p18 qq ď α0 is a consequence of the volume growth estimate of W “ pZ{2Zq oS G in [7]. Proof of upper bound in Theorem 5.7. We show a slightly stronger statement: for any nondegenerate probability measure µ on G with finite α0 -moment, the induced random walk on the orbit of 18 is recurrent. Suppose the claim is not true, let µ be a probability measure on G with finite α0 -moment and transient induced random walk on the orbit of 18 . On W , let ν be the uniform measure on the lamp group at o “ 18 , that is ν is uniform on tid, δo1 u. Since the random walk induced by µ on the orbit 18 ¨ G is transient, the measure ζ “ 21 pµ ` νq has non-trivial Poisson boundary by [9, Proposition 3.3]. On the other hand the volume growth functions satisfy vG,S prq ď vW,T prq À expprα0 q GROWTH OF PERIODIC GRIGORCHUK GROUPS 29 by [7, Lemma 5.1]. Since ζ has finite α0 -moment, Lemma 2.3 implies pW, ζq has trivial Poisson boundary, which is a contradiction.  Note that in the definition of the critical constant crt pG, Hq we restrict to symmetric random walks on G. A priori the critical constant might become strictly larger if one includes non-symmetric random walks. For example, for G “ Z and H “ t0u, crt pZ, t0uq “ 1 while biased random walk of finite range, for example µp1q “ 1 ` p and µp´1q “ 1 ´ p, p P p0, 1{2q, is transient. However the upper bound proved above shows that the critical constant of pG, StG p18 qq remains α0 if we take sup of moment over all measures with transient induced random walk on the orbit of 18 . Remark 5.10. The measure η0 with transient induced random walk defined in (5.3) can be used to show volume lower estimates for certain extensions of the first Grigorchuk group. For example, consider "double Grigorchuk groups" as in [25] which are defined as follows. Take an ω P t0, 1, 2u8 such that ω is not a shift of p012q8 and not eventually constant. Take the directed automorphism g “ bω as defined in Subsection 2.4, that is bω is a generator of the group Gω . Let Γ be the group generated by S 1 “ ta, b, c, d, gu. Since Γ has generators from two strings, it is called a double Grigorchuk group. For example, for the group Gpmq in [25, Corollary 2], the corresponding string is ω “ pp012qm 22q8 . Using the measure η0 one can show an improvement of [25, Corollary 2]. At o “ 18 , the isotropy group of the groupoid of germs of Γ is strictly larger than G. Take H “ G and apply Proposition 3.3 to the measure µ “ 12 puS 1 ` η0 q, where η0 is the measure on G defined in (5.3), then we have that µ has non-trivial Poisson boundary. It follows by Corollary 2.2 that for any  ą 0, there exists c ą 0 such that for all n ą 1, ` ˘ vΓ,S 1 pnq ě exp cnα0 { log1` n . We remark that there is a gap in the proof of [25, Proposition 4.1], in which in order to guaranteethat the measure ν considered has finite entropy, one needs to strengthen the assumption in the statement to vΓ2 ,T2 pnq ď exp pCnγ q for all n, for some γ ă 1, C ą 0 (assuming for infinitely many n is not sufficient). 6. M ORE EXAMPLES OF MEASURES WITH RESTRICTED GERMS ON THE FIRST G RIGORCHUK GROUP In this section we exhibit more examples of symmetric measures on the first Grigorchuk group with non-trivial Poisson boundary of the form 21 puS `ηq, where η is supported on the subgroup Hb which consists of elements with only trivial or b-germs. Compared to Section 4, the improvement is that the measures have finite entropy and explicit tail estimates. As a consequence we derive volume lower bounds for G012 from these measures, which can already be better than previously known estimates, see Corollary 6.4. Throughout this section denote by G the first Grigorchuk group and S the standard generating set ta, b, c, du. Recall the subgroup Hb which consists of elements of G that have only trivial or b-germs defined in (4.1). We have the following example of a sequence of elements in Hb which satisfies the cube independence property. Example 6.1. Take the sequence of elements pgn q satisfying the cube independence property defined in (5.2). From the definition, we have that for n ” 1, 2 mod 3, gn P Hb ; while for n ” 0 mod 3, gn has c-germs. Filter out the elements with c-germs and keep the subsequence g1 , g2 , g4 , g5 , g7 , g8 . . . with b-germs. For convenience of notation, relabel the elements as ĥ2k´1 “ g3k´2 , ĥ2k “ g3k´1 , k P N. 30 ANNA ERSCHLER AND TIANYI ZHENG With the sequence pĥn q in Example 6.1, take the corresponding quasi-cubic sets ! ) Ĥn “ ĥεnn . . . ĥε11 : εj P t0, 1u, 1 ď j ď n . For any  ą 0, take cn “ C n1` 2n and η1 “ 8 ¯ ÿ cn ´ uĤn ` uĤn´1 . 2 n“1 Then by Proposition 5.4, the induced random walk Pη1 on 18 ¨ Hb is transient. Let uS be uniform on the generating set S “ ta, b, c, du and µ1 “ 12 puS ` η1 q. Then by comparison principle [40, Corollary 2.14], the random walk Pµ1 on 18 ¨ G is transient. Since η1 is supported on the subgroup Hb and uS has finite support, by Proposition 3.3, pG, µ1 q has non-trivial Poisson boundary. Since η1 has finite entropy and uS is of finite support, µ1 also has finite entropy. We now estimate its tail decay. From the length estimate of the elements gn , we have n ˇ ˇ ÿ 3 n ˇ ˇ maxt|h| : h P Ĥn u ď ˇĥj ˇ ď C 1 λ02 , j“1 where λ0 is the spectral radius of M , the positive root of the characteristic polynomial X 3 ´ X 2 ´ 2X ´ 4. Therefore as explained in the remark after Corollary 5.4, ´ ´ ¯ ¯ Cn1` 3 n c µ1 B e, C 1 λ02 . ď 2n In other words, 2 c µ1 pB pe, rq q ď Cr´ 3 log2 λ0 log1` r. By Corollary 2.2, we conclude that ´ ¯ 2 vG prq ě exp cr 3 log2 λ0 { log1` r . The exponent in the bound is 3 log2 λ0 “ 23 α0 « 0.5116. This estimate is non-trivial in the 2 sense that the exponent is strictly larger than 1{2, however it is worse than the lower bound exppr0.5153 q proved in Bartholdi [5]. It is clear that in the construction of η1 , skipping every third element in the cube independent sequence pgn q leads to a significant loss. We can improve the construction by choosing another cube independent sequence that is more adapted to Hb . Note the following property of Hb . Lemma 6.2. The subgroup Hb defined as in (4.1) is locally finite. The orbit 18 ¨ Hb is 18 ¨ Hb “ tx “ x1 x2 . . . P BT : x is cofinal with 18 , x3i`1 “ 1 for all i P Nu. Proof. We first show Hb is locally finite. Let h1 , . . . , hk be a finite collection of elements in Hb . By Fact 4.1, there exists a level 3n, n P N such that for every hj , its sections on level 3n are in the set tid, a, bu. It follows that xh1 , . . . , hk y is a subgroup of xa, by oL3n AutpT3n q, where T3n is the finite rooted binary of 3n levels. Since xa, by is finite, we conclude that xh1 , . . . , hk y is finite. Recall that for any n P N, ra, bs is in the rigid stabilizer of 1n . When n ” 0 mod 3, the element ιprb, as : 1n q has b-germs. Consider the collection ιprb, as : 1n q and ιprb, as2 : 1n q, n “ 0, 3, . . .. Since 18 ¨ baba “ 1018 and 18 ¨ babababa “ 11018 , it follows that the set x “ x1 x2 . . . P BT where x is cofinal with 18 and x3i`1 “ 1 for all i P N is contained in the orbit 18 ¨ Hb . GROWTH OF PERIODIC GRIGORCHUK GROUPS 31 Consider the projection of G to the abelian group xb, c, dy “ Z{2Z ˆ Z{2Z. Note that if the the projection of g is not in the subgroup xby, then g R Hb . ř Indeed under the wreath recursion to level 3, g “ pgv qvPL3 τ , the projections satisfy ḡ “ vPL3 ḡv . Thus ḡ R xby implies at least one of the sections gv satisfies that ḡv R xby. Therefore the claim follows from induction on length of g. Next we show that for any h P Hb , x “ 18 ¨ h satisfies x3i`1 “ 1 for all i P N. This can be seen by induction on word length of h. For |h| “ 1, h “ a or h “ b, the claim is true. Suppose the statement is true for |h| ă n. For h of length |h| “ n, take a word w of length n representing h and perform the wreath recursion to level 3. We claim that if h P Hb then all sections wv , v P L3 , have even number of a’s. As a consequence of the claim, the 4-th digit of 18 ¨ h is 1. To verify the claim, if wv1 v2 v3 has odd number of a’s, then by the definitions of the generators we have that the projection of the section at its sibling wv1 v2 v̌3 to xb, c, dy is not contained in xby. This contradicts with the assumption that h P Hb . Apply the induction hypothesis to h111 , we conclude that x “ 18 ¨ h satisfies x3i`1 “ 1 for all i P N.  Observe that since the subgroup Hb acts trivially on levels 3k ` 1, at the corresponding levels we can use the substitution σ instead of ζ, where σ is the substitution on ta, b, c, du˚ given by σpaq “ aca, σpbq “ c, σpcq “ d, σpdq “ b. When applied to a word in tab, ac, adu˚ , σ always doubles its length while typically the substitution ζ results in a multiplicative factor larger than 2. Define a sequence of words phn q8 n“1 by ` 2 ˘k´1 h2k´1 “ ζ ˝ σ ζpacq and h2k “ pζ 2 ˝ σqk´1 ˝ ζ 2 padq. Note that ζpacq “ abab and ζ 2 padq “ abababab, thus h2k “ h22k´1 . b Lemma 6.3. The sequence of elements phn q8 n“1 belong to the subgroup H and satisfy the 8 b cube independence property on the orbit 1 ¨ H . Proof. Note that σpababq “ pid, ababq. By definition of σ, we have that for any word w, σpwq “ pw1 , wq where w1 isDin xa, dy. Since any element γ in the finite dihedral group @ a, d|a2 “ d2 “ 1, padq4 “ 1 satisfies γ 4 “ 1, it follows that if σpw4 q “ pid, w4 q for ` ˘j ` ˘j any word w. Since σpababq “ pacq4 , we have σ ˝ ζ 2 ˝ σ ζpacq “ pid, ζ 2 ˝ σ ζpacqq ` 2 ˘k´1 for all j ě 1. Combined with Fact 5.8, h2k´1 “ ζ ˝ σ ζpacq is in the level stabilizer of the level 3k ´ 2. Moreover in the level 3k ´ 2, at a vertex v P 13k´2 ¨ Hb , the section belongs to tac, cau; otherwise the section is trivial. Since h2k “ h22k´1 , h2k is in the level stabilizer of the level 3k ´ 1 and at a vertex v P 13k´1 ¨ Hb , the section belongs to tad, dau; otherwise the section is trivial. From the description of the sections we conclude that hn P Hb and by Lemma 5.6 they form a cube independent sequence.  With this cube independent sequence we perform the same procedure as before. Take the quasi-cubic sets Hn “ thεnn . . . hε11 : εj P t0, 1u, 1 ď j ď nu , and form the convex combination 8 ¯ ÿ C n1` cn ´ uHn ` uHn´1 with cn “ . η2 “ 2 2n n“1 32 ANNA ERSCHLER AND TIANYI ZHENG Let µ2 “ 12 puS ` η2 q. By Proposition 5.4 and Proposition 3.3, we have that pG, µ2 q has non-trivial Poisson boundary. The length of the elements phn q can be estimated using the substitution matrices. We obtain the following: Corollary 6.4. For any  ą 0, there exists a non-degenerate symmetric probability measure µ on G “ G012 of the form µ “ 12 puS ` ηq of finite entropy and nontrivial Poisson boundary, where η is supported on the subgroup Hb and the tail decay of µ satisfies 2 µ pBpe, rqc q À r´ log2 λ1 log1` r. The number λ1 is the largest real root of the polynomial X 3 ´15X 2 `44X ´32, 0.5700. As a consequence, ´ ¯ 2 vG pnq Á exp n log2 λ1 { log1` n . 2 log2 λ1 « Proof. For a word w in tab, ac, adu˚ , recall that lpωq records the number of occurrences of ab, ac, ad as a column vector. Then lpσpwqq “ Alpωq where the matrix is » fi 0 1 0 A “ – 1 1 2 fl . 1 0 0 Recall the matrix M that lpζpwqq “ M lpωq. Then ˇ “ ˇ` ˘k ˇ ˇ 2 ˇ ζ ˝ σ pababqˇ “ 2 2 fi » ‰ ` 2 ˘k 2 2 M A – 0 fl . 0 Let λ1 be the largest real eigenvalue of the matrix fi » 6 5 4 M 2 A “ – 2 5 4 fl . 2 3 4 In other words λ1 is the largest real root of the characteristic polynomial X 3 ´ 15X 2 ` 44X ´ 32. Numerically λ1 « 11.3809. It follows that n{2 |hn | ď Cλ1 . Therefore from definition of η2 we have that the tail of µ2 “ 12 puS ` η2 q satisfies ´ ´ ¯c ¯ n1` n{2 À n . µ2 B e, λ1 2 The statement follows.  One cannot have a measure µ with the following property: µ “ 21 pν ` ηq, where η is supported on the subgroup Hb with smaller germ group xby and ν is of finite support, pG, µq has non-trivial Poisson boundary and η has finite α-moment for α close to the critical constant crt pG, StG p18 qq. The main drawback is that the action of any element in Hb fixes the digits x3k`1 , k P N as explained in Lemma 6.2. The orbit of 18 under Hb is much smaller than its orbit under G. Indeed by norm contracting calculations one can bound from above the growth of pZ{2Zq o18 ¨Hb Hb with respect to the induced word distance and show that a measure η on Hb with transient induced random walk on the orbit of o cannot have tail decay close to r´α0 . GROWTH OF PERIODIC GRIGORCHUK GROUPS 33 7. M AIN CONSTRUCTION OF MEASURES OF NON - TRIVIAL P OISSON BOUNDARY ON G RIGORCHUK GROUPS In this section we prove our main result on existence of measures on Gω with non-trivial Poisson boundary and near optimal tail decay, where ω satisfies the following assumption. Notation 7.1. We say the string ω satisfies Assumption pFrpDqq, where D P N, if for every integer k ě 0, the string ωkD . . . ωkD`D´1 contains at least one of the following two substring: t201, 211u. "Fr" in the notation stands for frequency. Given a string ω that satisfies Assumption pFrpDqq, define pmk q8 k“0 and Iω as follows: ‚ for each k let mk be the smallest number in t0, . . . , D ´ 3u such that ωkD`mk ωkD`mk `1 ωkD`mk `2 P t201, 211u ; ‚ let Iω be the set Iω :“ tkD ` mk ` 3 : k ě 0u. Note that by definition D ě 3. The value of D is not important, as long as it is finite. Let π be a permutation of letters t0, 1, 2u and πpωq be the string pπpωqqi “ πpωi q. Then by definition of Grigorchuk groups it is clear that Gω is isomorphic to Gπpωq . We call ω ÞÑ πpωq a renaming of letters. We may also take a finite shift of ω if the resulting string is more convenient. Example 7.2. The following examples of ω satisfies Assumption pFrpDqq with some finite D depending on the sequence: ‚ Up to a renaming of letters t0, 1, 2u, every periodic sequence ω which contains all three letters. ‚ A sequence of the form p012qi1 1j1 . . . p012qik 1jk . . . with all ik , jk uniformly bounded. ‚ A word obtained by concatenating powers of 201 and 211. 7.1. Distance bounds on the Schreier graph. In this subsection we review some elementary facts about distances on the orbital Schreier graph of 18 under action of Gω . Let o “ 18 P BT and denote by Sω its Schreier graph under the action of Gω : the vertex set of Sω is o ¨ Gω and two vertices x, y P o ¨ Gω are connected by an edge labelled with s P ta, bω , cω , dω u if y “ x ¨ s. The Schreier graph Sω can be constructed by applying global substitution rules, see for example [30, Section 7]. Let dSω denote the graph distance on the Schreier graph Sω . Because the unlabelled Schreier graph of o does not depend on the sequence ω, it follows that the graph distance also doesn’t depend on ω. For this reason we can omit reference to ω and write dS for the graph distance. It is convenient to read the distance dS from the Gray code enumeration of the orbit o ¨ Gω . Explicitly, for x “ x1 x2 . . . P BT, flip all digits of x to the ray x̌1 x̌2 . . . where x̌i “ 1 ´ xi . The Grey code of x is x̄ “ x̄1 x̄2 . . . where x̄i “ x̌1 ` . . . ` x̌i mod 2. Note that for x cofinal with 18 , its Gray code x̄ has only finitely many 1’s . We regard such an x̄ as an element in t0u Y N represented by a binary string. Then on the Schreier graph of o, dS px, yq “ |x̄ ´ ȳ| . 8 The distance to 1 constant 0. is particularly easy to read because the Gray code of the point 18 is 34 ANNA ERSCHLER AND TIANYI ZHENG Fact 7.3. Let x P BT be a point that is cofinal with 18 . Let npxq “ maxtk : xk “ 0u. Then 2npxq´1 ď dS px, 18 q ď 2npxq ´ 1. Proof. We dS px, 18 q “ |x̄|. Since the maximum index of digit 0 in x is npxq, the Grey code of x is of the form u1000 . . . where u is a prefix of length npxq ´ 1.  For general points a similar upper bound holds. Fact 7.4. Let x, y be two points cofinal with 18 . Denote by s the shift on strings. Then dS px, yq ď 2n dS psn x, sn yq ` 2n ´ 1. Proof. Write x and y in Gray codes. The Grey code of x is x “ usn x, where u is some prefix of length n, similarly ȳ “ vsn y, where v is some prefix of length n. It follows that dS px, yq “ |x̄ ´ ȳ| ď |usn x ´ usn y| ` |usn y ´ vsn y| ď 2n dS psn x, sn yq ` 2n ´ 1.  As a consequence we have the following estimate of displacement. Recall that |¨|Gω denotes the word length in the group Gω equipped with generating set ta, bω , cω , dω u. Lemma 7.5. Let g P Gω and g “ pgv qvPLn τ be its wreath recursion to level n. Then for x “ x1 x2 . . . P BT, ´ ¯ dS px, x ¨ gq ď 2n |gx1 ...xn |Gsn ω ` 1 . Proof. Write x “ vx1 , where v is the prefix v “ x1 . . . xn and x1 “ sn x. Then x ¨ g “ pv ¨ τ qx1 ¨ gv . Therefore dS px, x ¨ gq ď 2n dS px1 , x ¨ gv q ` 2n ´ 1 ď 2n p|gv | ` 1q.  7.2. Construction of the measures . Throughout the rest of this section we assume that ω satisfies Assumption pFrpDqq. The sketch for the first Grigorchuk group in the Introduction and explicit descriptions in Example 7.10 may help to understand the definitions. To avoid possible confusion about indexing, keep in mind that the string ω P t0, 1, 2u8 starts with ω0 , ω “ ω0 ω1 . . . while tree vertices are recorded as v “ v1 v2 . . .. First take a sequence of words obtained by substitutions: # ζω0 ˝ . . . ζωn´1 pabsn ω q if ωn´1 ‰ 2, (7.1) gn “ ζω0 ˝ . . . ζωn´1 pacsn ω q if ωn´1 “ 2. The sequence pgn q has the cube independence property by Lemma 5.6. From its definition in (7.1), gn has b-germs if ωn´1 ‰ 2 and c-germs if ωn´1 “ 2. Our goal is to construct a symmetric measure on Gω such that along the corresponding random walk trajectory pWn q, the xby-coset of the germ ΦWn p18 q stabilizes. To this end we introduce modifications to these gn with c-germs. The modifications are performed by taking conjugations of generators csj ω . Recall the notation that ι ph, vq denotes the group element in the rigid stabilizer of v and acts as h in the subtree rooted at v. The following fact about rigid stabilizers will be used repeatedly. GROWTH OF PERIODIC GRIGORCHUK GROUPS 35 Fact 7.6. For n P N, let γ be the letter in tb, c, du be such that ωn´1 pγq “ id. Then for any vertex v P Ln , rγ sn ω , as is in the rigid stabilizer RistGω pvq and |ι prγsn ω , as , vq| ď 2n`2 . Proof. The claim that rγ sn ω , as is in the rigid stabilizer RistGω pvq is equivalent to that G n Kn “ xrγsn ω , asy s ω is in RistGω pvq, where γ P tb, c, du is the letter that ωn´1 pγq “ id. Note that γ “ γn is determined by ωn´1 , although we omit the subscript to lighten notation. The claim can be shown by induction on n. For n “ 1, let y be a letter y ‰ γ, then payω aγω q2 “ pid, aγsω aγsω q, the claim is true. Suppose it is true for n ´ 1. For n, let y be a letter such that ωn´2 pyq “ id if ωn´2 ‰ ωn´1 ; and y ‰ γ if ωn´2 “ ωn´1 . Then in either case, paysn´1 ω aγsn´1 ω q2 “ pid, aγsn ω aγsn ω q and it is easy to check that paysn´1 ω aγsn´1 ω q2 P Kn´1 . Similarly pysn´1 ω aγsn´1 ω aq2 “ paγsn ω aγsn ω , idq. We have verified the induction step for rγsn ω , as and the claim follows. To see the length estimate, for g P Kn , let w be a reduced word representing g and apply the substitution a ÞÑ aya, b ÞÑ b, c ÞÑ c, d ÞÑ d to the word w, where y is a letter such that ωn´2 pyq “ id if ωn´2 ‰ ωn´1 ; and y ‰ γ if ωn´2 “ ωn´1 . Then the resulting word w1 satisfies that |w1 | ď 2|w| and its image h in Gsn´1 ω satisfies h “ pid, gq. This is because g can be written as a product of elements of g g the form ra, γsn ω s , rγsn ω , as where g P Gsn ω , and the substitution induces a homomorphism from Gsn ω to Gsn´1 ω . The image of aw1 a in Gsn´1 ω is pg, idq. Therefore starting from rγsn ω , as at vertex v, apply this substitution procedure recursively up the levels, we obtain a word of length 2n`2 such that its image in Gω is ι prγsn ω , as , vq.  For k, n P N both divisible by D, define the set Wkn of vertices of depth k such that ui “ 1 except for those i with n ` i P Iω , (7.2) Wkn :“ tu P Lk : u “ u1 . . . uk , ui “ 1 if n ` i R Iω u . Recall that the set Iω is defined in Notation 7.1. The cardinality of the set Wkn is 2k{D . Given an integer j, denote by j̄ the residue of j mod D, j̄ P t0, . . . , D ´ 1u. We now define the set Vkj which will be the index set of a collection of conjugates of the element 1 pj ` D ´ j̄ ` kq csj ω in Gj “ Gsj ω . Let k be an integer divisible by D, write `pk, jq “ D j and define Vk the collection of vertices ! ) (7.3) Vkj :“ 1D´j̄ u1m`pj,kq `2 0 : u P Wkj`D´j̄ , where m` is defined in Notation 7.1, m` P t0, . . . , D ´ 3u. In words, Vkj is obtained from the set Wkj`D´j̄ by appending some 1’s as prefix to match with D-blocks and adding 1m`pj,kq `2 0 at the end. It is important that any v P Vkj ends with digit 0. The cardinality of the set Vkj is 2k{D , the same as the cardinality of Wkj`D´j̄ . Given a vertex v “ v1 . . . vk1 P Vkj , where k 1 “ D ´ j̄ ` k ` m`pj,kq ` 3 denotes the length of v, take the following sequence of elements in Gj “ Gsj ω : # id if vi “ 1 v (7.4) hi :“ ι prbsj`i´2 ω , as , v1 . . . vi´2 q if vi “ 0. By definition of Vkj in (7.3), if vi “ 0 then the string ωj`i´3 ωj`i´2 ωj`i´1 is either 201 or 211. Since the digit ωj`i´3 in this case must be 2, by Fact 7.6, rbsj`i´2 ω , as is in the rigid 36 ANNA ERSCHLER AND TIANYI ZHENG F IGURE 7.1. A conjugated element for v “ 110, the only label c is at v (the corresponding ray is red). The picture shows a turn over 201 on the left and a turn over 211 on the right, in general notation. stabilizer of the vertex v1 . . . vi´2 in Gj . The letter following ωj`i´3 is different from 2, therefore rbsj`i´2 ω , as acts as bsj`i´1 ω a on the right subtree. Since hvi is in the rigid stabilizer of v1 . . . vi´2 , it is easy to verify recursively that by definition of the elements hvi in (7.4), we have 18 ¨ hv1 hv2 . . . hvk1 “ v18 . For each v P Vkj , take the conjugation of csj ω in Gj (7.5) cvj :“ phv1 hv2 . . . hvk1 q ´1 csj ω phv1 hv2 . . . hvk1 q . We have the following description of the element cvj . The portrait of an element along a ray segment is explained in Subsection 2.5. Lemma 7.7. Let v P Vkj , D|k and write k 1 “ |v| the length of v. The vertex v is fixed by cvj and along the ray segment v the only nontrivial sections of cvj are at tv1 . . . vi 0 : ωj`i ‰ 1, 0 ď i ď k 1 ´ 1u. Among these, for i ď k 1 ´ 2 and ωj`i ‰ 1, if vi`2 “ 0 then the section at v1 . . . vi 0 is bsj`i`1 ω absj`i`1 ω , otherwise the section is a. For i “ k 1 ´ 1, at level k 1 , the only non-trivial section is csj`k1 ω at v. Proof. For those indices i such that vi “ 0, conjugation by hvi is nontrivial only in the subtree rooted at v1 . . . vi´2 , where the section is conjugated by rbsj`i´2 ω , as. Effect of conjugation by rbsj`i´2 ω , as is drawn explicitly in Figure 7.1 with subscripts omitted. The portrait of cvj is obtained by applying these conjugations one by one (where every nontrivial conjugation corresponding to a 0 in v results in a turn illustrated in the pictures).  Remark 7.8. The reason we need 201 or 211 in Assumption pFrpDqq to perform these conjugations is the following: the digit 2 is needed for rb, as to be in the rigid stabilizer at the corresponding level, the second digit different from 2 implies rb, as acts as ab, ba on the next level, and the last digit 1 implies that the sections of c that gets swapped are c and id. As a consequence, cvj fixes the ray 18 and vertices of the form 1m 0. It is possible that the arguments can work through under the weaker assumption that one can find 20 or 21 in every D-block, but it simplifies calculations to assume the third digit is 1. GROWTH OF PERIODIC GRIGORCHUK GROUPS 37 Next we apply the substitutions ζx to acvj , which is an element in Gj , to obtain an element in Gω . Given j and a vertex v P Vkj where D|k, define ` ˘ (7.6) g̃jv :“ ζω0 ˝ . . . ˝ ζωj´1 acvj . Lemma 7.9. The element g̃jv is well defined (the substitutions ζωi ’s can be applied). It is in the j-th level stabilizer and when ωj´1 ‰ 1, the sections of g̃jv at vertices of Lj are in ( acvj , cvj a . Proof. As explained in the proof of Fact 7.6, in Gj each non-trivial hvi which is defined to ˚ be ι prbsj`i´2 ω , as , v1 . . . vi´2 q, it can be represented as a reduced word in tab, ac, adu , where b is understood as bsj ω , so do c, d. It follows that after applying the conjugations to c, the element cvj can be represented either by a reduced word of the form wa, where w P tab, ac, adu˚ , or by γw where γ P tb, c, du and w P tab, ac, adu˚ . In first case acvj can be represented by a word in tba, ca, dau˚ , in the second case it can be represented by a word in tab, ac, adu˚ . In either case the substitutions ζωi can be applied to acvj . The second claim follows from (2.3).  Let pkn q be a sequence of increasing positive integers divisible by D to be determined later, kn ! n. For n divisible by D, we proceed to construct a measure υn on Gω which will replace the n-quasi-cubic measure. First take the following sets Fj,n , 1 ď j ď n. ‚ For an index j such that ωj´1 “ 2 and n ´ kn `ă j˘ ď n, define Fj,n to be the following set of elements g̃jv “ ζω0 ˝ . . . ˝ ζωj´1 acvj , ! ) j 8 |1 ě n ´ j ` D (7.7) Fj,n :“ g̃jv | v P V2k and ^ v| , n where u ^ v denotes the longest common prefix of two rays u and v. The set Fj,n j is indexed by the subset of V2k which consists of vertices with prefix 1n´j`D . n 2kn ´pn´j`j̄q D . The cardinality of Fj,n is 2 ‚ For indices j P t1, . . . , nu other than those with ωj´1 “ 2 and n ´ kn ă j ď n as specified above, keep the single element gj and set Fj,n “ tgj u, where gj is defined in (7.1). In what follows n is always an integer divisible by D. Take the direct product n ź (7.8) Fn “ Fi,n i“1 n and the product of the hypercube t0, 1u with Fn , Λn “ t0, 1un ˆ Fn . (7.9) Define θn : Λn Ñ Gω to be the map θn pp, γqq “ γnn . . . γ11 , where  “ p1 , . . . , n q P t0, 1un and γ “ pγ1 , . . . , γn q, γi P Fi,n . Take the measure υn on Gω to be the push-forward of the uniform measure uΛn under θn , that is |tp, γq P Λn : θn pp, γqq “ gu| . |Λn | In other words, a random element with distribution υn can be obtained as follows. Take independent random variables ti , γi | 1 ď i ď nu where for each i, i is uniform on t0, 1u (7.10) υn pgq “ 38 ANNA ERSCHLER AND TIANYI ZHENG and γi is uniform on the set Fi,n . Then the group element γnn . . . γ11 has distribution υn . We refer to υn as a uniformised n-quasi-cubic measure. For the purpose of symmetrization, set the measure υ̌n to be ˘ ` υ̌n pgq “ υn g ´1 . Finally, for β P p0, 1q, take the convex combination of the measures (7.11) µβ “ 1 1 uS ` 2 2 ÿ Cβ 2´nβ pυn ` υ̌n q , nPN,D|n where uS is the uniform measure on the generating set ta, bω , cω , dω u, Cβ ą 0 is the normalization constant such that µβ is a probability measure. Note that although suppressed in the notations, the measure µβ depends on the sequence pkn q. Example 7.10. We explain the definitions on the first Grigorchuk group G “ G012 , in the usual notation as in (2.4). The correspondence between two systems of notations (usual and general) on G is explained in (2.5). The defining string of G is p012q8 “ 01p201q8 , with a shift of two digits it satisfies Assumption FrpDq, D “ 3. In Notation 7.1, for the shifted string ω “ p201q8 , we have mk “ 0 and Iω “ 3N. On G the sequence pgn q defined in formula (7.1) is # gj “ ζ j pacq if j ” 0, 1 mod 3, ζ j padq if j ” 2 mod 3, in the usual notation. This sequence has appeared in Subsection 5.2 and Section 6. Among them those gj with j ” 0 mod 3 have c-germs, for which we will perform the conjugations. In what follows k is divisible by 3 and n ” 2 mod 3 (where 2 comes from the shift of two digits from p012q8 to p201q8 ). The set Wkn defined in (7.2) is Wkn “ tu : |u| “ k and u3j`1 “ u3j`2 “ 1 for all j ě 0u . In other words, Wkn consists of vertices of length k that are concatenations of segments 111 and 110. For j ” 0 mod 3, the set Vkj defined in (7.3) is ! ) Vkj “ 11u110 : u P Wkj`2 , that is vertices of the form 11 p11˚q . . . p11˚q 110, where at ˚ the digit can be 0 or 1. The looooooomooooooon k digits Vkj is b cardinality of the set 2 . Note that the set Vkj is contained in the Hb -orbit of the vertex 12`k`3 , where H is the subgroup of G which consists of elements with only xbygerms, see Figure 7.2. Figure 1.4 draws the portrait of a conjugated element cv “ cvj indexed by v P Vkj as defined in (7.5). Note that since p012q8 is of periodicity 3, for all j ” 0 mod 3, cvj is the same element, thus we can omit reference to j. For n ” 2 mod 3, take a parameter kn divisible by 3. In the sequence pgj qnj“1 , for these j ď n ´ kn or j ” 1, 2 mod 3, let Fj,n “ tgj u; for these j such that j ” 0 mod 3 k{3 GROWTH OF PERIODIC GRIGORCHUK GROUPS 39 F IGURE 7.2. Grey and black vertices are on the orbit of the rightmost ray under Hb . These are vertices of the form p˚qp˚ ˚ 1qp˚ ˚ 1q . . . . The subsets of grey vertices on levels ” 2 mod 3 show vertices that are in the indexing set for conjugaction in the definition of cv . They are of the from p11qp11˚qp11˚q . . . . Grey verticies of any level are prefixes of such allowed vertices. and n ´ kn ă j ď n, replace gj by the set Fj,n defined in (7.7), which is $ , ’ / & . j v n´j`3 p11˚q . . . p11˚q 110 and v has prefix 1 . Fj,n “ ζ pac q : v “ 11 looooooomooooooon ’ / % 2kn digits The uniformised n-quasi-cubic measure υn can be described as follows. For 1 ď j ď n, independently choose each γj uniformly from the set Fj,n , and choose an independent random variable p1 , . . . , n q uniformly from t0, 1un , then the random group element γnn . . . γ1n has distribution υn . Finally the measure µβ defined with parameter sequence pkn q in (7.11) is a convex combination of uS , S “ ta, b, c, du and the uniformised n-quasi-cubic measures υn and their inverses υ̌n , over all n ” 2 mod 3. 7.3. Non-triviality of the Poisson boundary. The goal of this subsection is to show that with some appropriate choices of β and A, the measure µβ defined in (7.11) with kn “ A tlog2 nu has non-trivial Poisson boundary. Recall that as explained in Example 3.2, the isotropy group of the groupoid of germs of Gω ñ BT at 18 is isomorphic to Z{2Z ˆ Z{2Z “ xby ˆ xcy. An element g P Gω has only xby-germs if and only if there is a level n such that all sections gv are in tid, a, bsn ω u, v P Ln . Let H “ xby ă pGω qo and Hb be the set of germs that are either trivial or b as in (3.1). To apply Proposition 3.3, we need to verify that the summation ÿ ` (˘ GPµβ po, xqµβ g P G : pg, xq R Hb xPo¨G is finite, where Pµβ is the transition kernel on o ¨ G induced by µβ . To this end we show the following upper estimate on the Green function. 40 ANNA ERSCHLER AND TIANYI ZHENG 1 Corollary 7.11. Let β P p1 ´ D , 1q and kn “ A tlog2 nu. For any  ą 0, there exists a constant C “ Cpβ, D, q ą 0 such that for any x, y P 18 ¨ G, the Green function satisfies ˙β´1 ˆ 1´β 2A dS px, yq plog2 dS px, yqq´ 1`β p D ´q . GPµβ px, yq ď C 2A log2 dS px, yq Corollary 7.11 is proved in Subsection 7.5. For the µβ -weights in the summation, we have the following. Proposition 7.12. Let υn be defined as in (7.10) and o “ 18 . Let f : R` Ñ R` be a non-increasing function such that there exists constants D1 P pD, 8q, 1 f p2xq ě 2´ D1 for all x ě 1. f pxq Then there exists a constant C “ CpD1 q ă 8 such that ÿ f pdS po, xqq υn ` g P G : pg, xq R Hb (˘ ` ˘ ď C2n f 2n`2kn . xPo¨G The same inequality holds with υn replaced by υ̌n . Proposition 7.12 is proved in Subsection 7.6. With these two estimates we prove that for some appropriate choice of parameters, along the random walk trajectory the xby-coset of the germ at 18 stabilizes. ˘ ` 1 ,1 Theorem 7.13. Let ω be a string satisfying Assumption pFrpDqq. Then for β P 1 ´ D and integer A ą Dp1`βq 2p1´βq divisible by D, the measure µβ on Gω defined as in (7.11) with kn “ A tlog2 nu has non-trivial Poisson boundary. Proof. We show that the summation ÿ ` (˘ GPµβ po, xqµβ g P G : pg, xq R Hb xPo¨G is finite, then non-triviality of the Poisson boundary pGω , µβ q follows from Proposition 3.3. ` ˘ 1´β 2A Let  ą 0 be a small constant such that 1`β D ´  ą 1. By Corollary 7.11, there is a constant C ă 8 only depending on β, D,  such that ˆ ˙β´1 1´β 2A dS px, yq GPµβ px, yq ď C plog2 dS px, yqq´ 1`β p D ´q . log2A d px, yq S 2 ´ ¯β´1 ´ 1´β 2A ´ s plog2 sq 1`β p D q . Then f satisfies the assumption of PropoLet f psq “ C log2A s 2 sition 7.12 with D1 “ 1 1´β ą D. By Proposition 7.12, (˘ υn ` υ̌n ` g P G : pg, xq R Hb 2 xPo¨G ÿ (˘ υn ` υ̌n ` g P G : pg, xq R Hb ď f pdS po, xqq 2 xPo¨G ` ˘ ďC 1 2n f 2n`2kn , ÿ GPµβ po, xq GROWTH OF PERIODIC GRIGORCHUK GROUPS 41 where C 1 is a constant depending only on β. Summing up this estimate to µβ , ÿ (˘ ` GPµβ po, xqµβ g P G : pg, xq R Hb xPo¨G ÿ ÿ f pdS po, xqq2´nβ ďCβ D|n xPo¨G ďCβ C 1 ÿ (˘ υn ` υ̌n ` g P G : pg, xq R Hb 2 ˘ ` 2´nβ 2n f 2n`2kn D|n ˆ ďCβ C 1 C ÿ 2np1´βq D|n ďCβ C 1 C 8 ÿ 1´β 2n`2kn pn ` 2kn q2A ˙β´1 2A ´ 1´β 1`β p D ´q pn ` 2kn q 2A n´ 1`β p D ´q . n“1 In the last step we plugged in kn “ A tlog2 nu. Since we have follows that the summation is finite. 1´β 1`β ` 2A D ˘ ´  ą 1, it  The rest of the section is devoted to the proofs of Corollary 7.11 and Proposition 7.12. 7.4. Estimates on the induced transition kernel. In this subsection we give some bounds on the transition kernel Pµβ , which will be used to derive Green function upper bounds. We use definitions and notations from Subsection 7.2. By the definition of the set Fj,n in (7.7) we have the following: Fact 7.14. Let j be an index such that ωj´1 “ 2 and n ´ kn ă j ď n. Then on the finite level n ` D ` 1, the action of any element g̃jv P Fj,n is the same as the element gj . Proof. This is because in the definition of Fj,n , the ray segment v is required to satisfy |v ^ 18 | ě n ´ pj ´ j̄q ` D. The first level that sees the difference between the portraits of g̃jv and gj is ě n ` D ` 2.  Because of the previous fact, the following uniqueness property is inherited from pgn q. n n Lemma 7.15. Let x P Ln`D`1 . Suppose pi , γi qi“1 , p˜ i , γ̃i qi“1 P Λn are such that x ¨ γnn . . . γ11 “ x ¨ γ̃n˜n . . . γ̃1˜1 . Then i “ ˜i for all 1 ď i ď n. We derive a displacement estimate from Lemma 7.5 and description of elements in Fj,n from Lemma 7.7 and Lemma 7.9. Lemma 7.16. Let j be an index such that ωj´1 “ 2 and n ´ kn ă j ď n. Let g̃jv P Fj,n , then for any x P 18 ¨ G, # j`1 ˘ ` 2j`|s x^sv|`4 if |sj`1 x ^ sv| ě n ´ j ` D, v dS x, x ¨ g̃j ď 2j`2 if |sj`1 x ^ sv| ă n ´ j ` D. Proof. We show the second bound first. Since by definitions, v has prefix 1n´j`j̄`D , |sj`1 x ^ sv| ă n ´ j ` D implies that |sj`1 x ^ 18 | ă n ´ j ` D. In this case the action of g̃jv on x is the same as gj , that is x ¨ g̃jv “ x ¨ gj . Therefore ˘ ` dS x, x ¨ g̃jv “ dS px, x ¨ gj q ď 2j`2 . 42 ANNA ERSCHLER AND TIANYI ZHENG Now suppose |sj`1 x ^ sv| ě n ´ j ` D. By definition of g̃jv and Lemma 7.9, depending řj parity of i“1 xi , we need to consider psj xq ¨ acvj or psj xq ¨ cvj a. By description of cvj in Lemma 7.7 and the distance bound in Lemma 7.5, we have that for any ray y, dS py, y ¨ cvj q ď 2|y^v|`4 . Since ˘ ` ˘ ` ˘ ( ` dS x, x ¨ g̃jv ď 2j max dS psj x, sj x ¨ acvj q, dS psj x, sj x ¨ cvj aq , the claim follows.  Lemma 7.16 implies that max dS px, x ¨ γq ď 2j`2kn `2D`4 . γPFj,n By the triangle inequality, for any x and  P t0, 1un , max dS px, x ¨ γnn . . . γ11 q ď 2n`2kn `2D`5 . γPFn The purpose of introducing the conjugations cvj and randomizing over v in the construction of the measure υn is to average so that the tail decays of measures is lighter than the maximum indicated above. Lemma 7.17. We have the following upper bounds: (i): Let j be a level such that n ´ kn ď j ď n and ωj´1 “ 2. For any ` such that n ď ` ď j ` 2kn ` 2D ` 4 and x P 18 ¨ G, ` (˘ 1 uFj,n γ : dS px, x ¨ γq ě 2` ď 2´ D p`´nq`2 . (ii): For any p1 , . . . , n q P t0, 1un , n ď ` ď n ` 2kn ` 2D ` 5 and x P 18 ¨ G, ` (˘ 1 uFn γ : dS px, x ¨ γnn . . . γ11 q ě kn 2` ď 8kn 2´ D p`´nq . Proof. (i). By Lemma 7.16, for such `, ˇ ` (˘ ` v ˇ j`1 (˘ uFj,n γ : dS px, x ¨ γq ě 2` ď uFj,n g̃3j : ˇs x ^ sv ˇ ě ` ´ j ´ 4 . j Recall that Fj,n is indexed by strings v P V2k and |18 ^ v| ě n ´ j ` D. The numˇ j`1 ˇ n ber of such strings v such that ˇs x ^ sv ˇ ě ` ´ j ´ 4 is bounded from above by 1 2 D pD´j̄`2kn ´p`´j´3qq , because the first ` ´ j ´ 3 digits of v is prescribed to agree with 1 1sj`1 x. By definition, the size of Fj,n is 2 D p2kn ´pn´j`j̄qq . Therefore, for the uniform measure on Fj,n , we have that uFj,n ` ˇ ˇ (˘ 2 D1 p2kn ´p`´j`j̄´3´Dqq 1 v g̃3j : ˇsj`1 x ^ sv ˇ ě ` ´ j ´ 4 ď ď 4 ¨ 2´ D p`´nq . 1 2 D p2kn ´pn´j`j̄qq (ii). Since for i ď n ´ kn , Fi,n “ tgi u, by triangle inequality we have for all x, ` ˘ n´kn dS x, x ¨ γn´k . . . γ11 ď 2n´kn `3 . n GROWTH OF PERIODIC GRIGORCHUK GROUPS 43 For indices i ą n ´ kn , ` ` (˘ n´kn `1 ˘ uFn γ : dS x, x ¨ γnn . . . γn´k ě kn 2` n `1 (˘ ` ` j`1  ˘ ďuFn γ : Dj, n ´ kn ă j ď n and dS x ¨ γnn . . . γj`1 , x ¨ γnn . . . γj j ě 2` n ÿ ` (˘ sup uFj,n γj : dS px, x ¨ γj q ě 2` ď 8 j“n´kn `1 xP1 ¨G 1 ď4kn 2´ D p`´nq . Combining the two parts, we obtain (˘ ` uFn γ : dS px, x ¨ γnn . . . γ11 q ě kn 2` (˘ ` ` n´kn ˘ ě kn 2` ´ 2n´kn `3 ďuFn γ : dS x, x ¨ γnn . . . γn´k n 1 ď8kn 2´ D p`´nq .  Because of the modifications, the induced transition kernel Pµβ on the Schreier graph Sω is not comparable to a transition kernel expressed in terms of the distance function dS px, yq. Indeed the jump kernel Pµβ px, ¨q depends on the location x, rather than the distance dS px, ¨q. The following upper bounds somewhat consider the worst scenario. 1 ă Proposition 7.18. Consider µβ defined in (7.11) with kn “ A tlog2 nu, where 1 ´ D β ă 1 and A is an integer divisible by D. There exists constant C “ CpD, βq ă 8 such that: (i): For any x, y P 18 ¨ G , Pµβ px, yq ď CdS px, yq´1´β plog2 dS px, yqq 1 `βq 2Ap1´ D plog2 log2 dS px, yqq 1 1` D . (ii): For any x P 18 ¨ G, ÿ 1 2Apβ´ D q 1` 1 Pµβ px, yq ď Cr´β plog2 rq plog2 log2 rq D . y:dS px,yqěr ÿ 1 q 2Apβ´ D dS px, yq2 Pµβ px, yq ď Cr2´β plog2 rq 1 1` D plog2 log2 rq . y:dS px,yqďr Proof. (i). Given x, y, write `px, yq “ log2 dS px, yq and let n0 “ min tn : `px, yq ď n ` 2kn ` 2D ` 5u . Then for n ă n0 , y R x ¨ θn pΛn q. For n ě n0 , either y R x ¨ θn pΛn q, in this case υn does not contribute to Pµβ px, yq; or by Lemma 7.15 there is a unique  P t0, 1un such that there exists γ P Fn with x ¨ γnn . . . γ11 “ y. In the latter case, 1 Pυn px, yq “ n uFn ptγ : x ¨ γnn . . . γ11 “ yuq ď 2´n . 2 Moreover, by the second claim in Lemma 7.17, if n ă `px, yq ` log2 kn , ´! )¯ 1 Pυn px, yq ď n uFn γ : dS px, x ¨ γnn . . . γ11 q ě 2`px,yq 2 1 8 ď n kn 2´ D p`px,yq´n´log2 kn q . 2 Since the induced transition probability Pυ̌n px, yq “ Pυn py, xq, it satisfies the same bound in terms of `px, yq. 44 ANNA ERSCHLER AND TIANYI ZHENG Split Pµβ px, yq into two parts: `px,yq ÿ an pPυn px, yq ` Pυ̌n px, yqq 2 něn0 ÿ an II “ pPυn px, yq ` Pυ̌n px, yqq , 2 I“ ną`px,yq where the coefficients are an “ Cβ 2´βn . For the first part, the upper bound on Pυn px, yq above implies Iď `px,yq ÿ něn0 8an 1` D1 ´ 1 p`px,yq´nq kn 2 D 2n 1 “ 2´ D `px,yq`3 `px,yq ÿ něn0 1 ď ACβ 2´ D `px,yq`3 Cβ 1` 1 kn D 1 np1´ `βq D 2 `px,yq ÿ 1 1 2´np1´ D `β q plog2 `px, yqq1` D něn0 1 1 `β q 1 ´D `px,yq ´n0 p1´ D ďC2 2 1 plog2 `px, yqq1` D . Since n0 ` 2kn0 ď `px, yq ď n0 ` 2kn0 ` 2D ` 5, we have 1 1 1 I ď C 1 2´ D `px,yq 2´p`px,yq´2kn0 qp1´ D `β q plog2 `px, yqq1` D 1 1 ď C 1 2´`px,yqp1`βq `px, yq2Ap1´ D `βq plog2 `px, yqq1` D “ C 1 dS px, yq´1´β plog2 dS px, yqq 1 2Ap1´ D `βq plog2 log2 dS px, yqq 1 1` D . For the second part, from the bound Pυn px, yq ď 2´n we deduce II ď Cβ 2´p1`βq`px,yq “ Cβ dS px, yq´1´β . Combine these two parts we obtain statement (i). (ii). To bound the tail, note that ÿ Pυn px, yq “ y:dS px,yqěr ÿ Pυ̌n px, yq “ y:dS px,yqěr 1 2n 1 2n ÿ uFn ptγ : d px ¨ γnn . . . γ11 , xq ě ruq , Pt0,1un ÿ uFn ´! ´ ¯ )¯ ´1 γ : d x ¨ pγnn . . . γ11 q , x ě r . Pt0,1un Then it follows from Lemma 7.16 that for n ď log2 r ď n ` 2kn ` 2D ` 5, 1 2 ÿ y:dS px,yqěr pPυn ` Pυ̌n q px, yq ď sup uFn x, ´! ´ ¯ )¯ ´1 γ : d x ¨ pγnn . . . γ11 q , x ě r 1 1 1` D ´D plog2 r´nq ď 8kn 2 . GROWTH OF PERIODIC GRIGORCHUK GROUPS 45 ( Let n0 “ min n : 2n`2kn `2D`5 ě r . Then ÿ Pµβ px, yq ď log ÿ2 r něn0 y:dS px,yqěr log ÿ2 r ď ÿ an y:dS px,yqěr ÿ 1 pPυn ` Pυ̌n q px, yq ` 2 nąlog 1 1 1` D ´D plog2 r´nq 8an kn 2 ÿ ` něn0 an 2 r an nąlog2 r 1 1 1` D plog2 r´n0 q ´D ď C 1 2´βn0 kn0 2 ` Cβ r´β , where in the last step the assumption that β ą 1{D is used. By definition of n0 , we have that ÿ 2A β´ 1 1` 1 Pµβ px, yq ď C 1 r´β plog2 rq p D q plog2 log2 rq D . y:dS px,yqěr Finally, for the truncated second moment, by the tail bound obtained above, we obtain ÿ 2 dS px, yq Pµβ px, yq ď log ÿ2 r j“1 y:dS px,yqďr ÿ p2j q2 Pµβ px, yq y:dS px,yqě2j´1 1` 1 2A β´ 1 ď Cr2´β plog2 rq p D q plog2 log2 rq D .  1 7.5. Upper bounds on the Green function. Throughout this subsection β P p1 ´ D , 1q and kn “ A tlog2 nu, and the measure µβ is defined in (7.11). The following on-diagonal upper bound does not depend on the choice of pkn q because by construction, on the finite level Ln the transition kernel induced by υn coincide with the one induced by uFn . The same argument as in Lemma 5.2 implies that the ηβ -induced random walk on the orbit 18 ¨ Gω admits the following on-diagonal upper bound. Proposition 7.19. Let Pµβ be the transition kernel on 18 ¨ Gω induced by µβ . Then there exists a constant C “ Cpβq ă 8 such that for t P N, sup x,yP18 ¨G Pµt β px, yq ď C . t1{β Proof. Let Pn be the transition kernel on the orbit of o induced by 12 pυn ` υ̌n q. As in the proof of Lemma 5.2, from Lemma 7.15 we derive that for a set U Ă o ¨ Gω with volume |U | ď 2n´1 , |BPn U | 1 ě . |U | 2 Then by the Cheeger inequality (5.1) and the fact that Pµβ is a convex combination of Pn ’s, we have that the `2 -isoperimetric profile of Pµβ satisfies ΛPµβ p2n´1 q ě Cβ ´nβ 2 , n ě 1. 2 That is, ΛPµβ pvq ě cβ v ´β for v ě 1. Such a lower bound for the `2 -isoperimetric profile implies the stated upper bound, see [16, Proposition II.1] or [33, Theorem 1.1].  46 ANNA ERSCHLER AND TIANYI ZHENG We will need an off-diagonal upper bound on Pµt β , which can be deduced from the Meyer’s construction and the Davies method as in Barlow-Grigor’yan-Kumagai [3]. Originally, the Davies method [18, 19] was developed to derive Gaussian off-diagonal upper bounds. It was extended to more general Markov semigroups in [14]. It has been successfully applied to jump processes, see for example [2, 3, 15] and references therein. Let Jpx, yq be a symmetric transition kernel on a countable set X. For technical reasons, it is more convenient to consider continuous time random walk. Let Pt be the associated heat semigroup and ppt, x, yq its transition density. The following proposition follows from the proof of heat kernel upper bound in [3, Section 3], see also [15, Section 4.4]. It states that if we have an on-diagonal upper bound and upper bounds on the tail of Jpx, ¨q and growth of truncated second moment of Jpx, ¨q, then the Davies method provides an offdiagonal upper bound on ppt, x, yq. Note that a uniform volume condition µpBρ px, rqq — V prq is not required for such an upper bound. Proposition 7.20 ([3]). Let Jpx, yq be a symmetric transition kernel on a countable set X and let ρ be a metric on X. Suppose (i): There exists 0 ă C0 ă 8 and β ą 0 such that for all t ą 0, we have C0 . t1{β sup ppt, x, xq ď xPX (ii): There exists an increasing function φ : p0, 8q Ñ p0, 8q such that φp2rq ď cφ φprq for all r ą 0 and for all x P X, r ą 0, ÿ 1 , Jpx, yq1tρpx,yqąru ď φprq yPX ÿ ρ2 px, yqJpx, yq1tρpx,yqďru ď yPX r2 . φprq Then there exists a constant C “ C pC0 , cφ , βq ą 0 such that for any x, y P X and t ď φpρpx, yqq, ppt, x, yq ď Ct φ pρpx, yqq 1 1` β `t sup Jpu, vq. ρpu,vqěρpx,yq Since this bound is crucial in the argument for non-triviality of the Poisson boundary but the formulation of Proposition 7.20 is not the same as in [3], we explain its proof for the reader’s convenience at the end of this subsection. Plugging in the bounds in Propositions 7.19 and 7.18, we obtain an off-diagonal upper bound for the transition probability and the upper bound on the Green function stated in Corollary 7.11. We remark that these bounds are not sharp, however it is sufficient for our purposes. Proof of Corollary 7.11. Let J “ Pµβ be the induced jumping kernel on the Schreier graph and ppt, x, yq be the heat kernel of the corresponding jumping process in continuous time. By Proposition 7.19, the lower bound on `2 -isoperimetric profile of J implies sup ppt, x, yq ď x,yPX C t1{β . Let 1 ´2Apβ´ D q´ φprq “ rβ plog2 rq , GROWTH OF PERIODIC GRIGORCHUK GROUPS 47 then by Proposition 7.18, we have that there exists a constant C “ Cpβ, D, q ă 8 such that ÿ C Jpx, yq1tdS px,yqąru ď . φprq yPX ÿ ρ2 px, yqJpx, yq1tdS px,yqďru ď yPX Cr2 . φprq Plugging these bounds in Proposition 7.20, we have that for t ď φpdS px, yqq, Ct ppt, x, yq ď φ pdS px, yqq 1 1` β `t sup Jpu, vq. dS pu,vqědS px,yq Note that φ pdS px, yqq 1 ´p1` β q ˆ “ dS px, yq log2A 2 dS px, yq ˙´1´β 2A 1 plog2 dS px, yqq´p D ´qp1` β q . By Proposition 7.18, there exists C “ Cpβ, q ą 0 ˆ ˙´1´β 2A dS px, yq sup Jpu, vq ď C plog2 dS px, yqq´p D ´q . 2A log2 dS px, yq dS pu,vqědS px,yq Combining these two parts, we obtain that for t ď φpdS px, yqq, ˙´1´β ˆ 2A dS px, yq plog2 dS px, yqq´p D ´q , ppt, x, yq ď Ct 2A log2 dS px, yq where C is a constant only depending on β, D, . Compared with the on-diagonal bound ppt, x, yq ď Ct´1{β , note that for t in the interval φ1 pdS px, yqq ď t ď φpdS px, yqq, where ˙β ˆ β 2A r plog2 rqp D ´q 1`β , φ1 prq “ 2A log2 r it is better to use the on-diagonal bound. We conclude that the heat kernel satisfies that for all t ą 0, # + ˆ ˙´1´β 1 2A d px, yq S ppt, x, yq ď C min t´ β , t plog2 dS px, yqq´p D ´q . log2A 2 dS px, yq It is elementary and well-known that when Jpx, xq ě α ą 0, the continuous time transition probability and discrete time transition probabilities are comparable, because the former is a Poissonization of the later, see for example [21, Subsection 3.2]. By [21, Theorem 3.6], the discrete time transition probability Pµt β px, yq ď Cppt, x, yq where C ą 0 is a constant that only depends on µβ pidq. Therefore Pµt β px, yq admits the same upper bound as ppt, x, yq with C a larger constant. To obtain the estimate on the Green function, sum up the transition probability upper bound over t P 0 Y N, Gµβ px, yq “ 8 ÿ t“0 Pµt β px, yq “ φ1 pdÿ S px,yqq t“0 Pµt β px, yq ` ÿ tąφ1 pdS px,yqq Pµt β px, yq. 48 ANNA ERSCHLER AND TIANYI ZHENG For the first part, we have φ1 pdÿ S px,yqq Pµt β px, yq t“0 φ1 pdÿ S px,yqq ˙´1´β 2A dS px, yq ďC plog2 dS px, yqq´p D ´q t 2A log2 dS px, yq t“0 ˆ ˙´1´β 2A dS px, yq ď Cφ1 pdS px, yqq2 plog2 dS px, yqq´p D ´q 2A log2 dS px, yq ˆ ˙β´1 1´β 2A dS px, yq plog2 dS px, yqq´ 1`β p D ´q . “C 2A log2 dS px, yq For the second part, ÿ Pµt β px, yq ď tąφ1 pdS px,yqq ˆ ÿ Ct´1{β tąφ1 pdS px,yqq 1 C φ1 pdS px, yqq1´ β 1 ´ 1{β ˆ ˙β´1 1´β 2A C dS px, yq “ plog2 dS px, yqq´ 1`β p D ´q . 2A 1 ´ 1{β log2 dS px, yq ď Combining these two parts, we obtain the stated upper bound on the Green function.  Proof of Proposition 7.20 following [3]. First split the jumping kernel J into two parts: J1R px, yq “ Jpx, yq1tρpx,yqďRu and J2R px, yq “ Jpx, yq1tρpx,yqąRu . Let pR pt, x, yq be transition density of the jumping process with jump kernel J1R . Then as a consequence of the Meyer’s construction, see [3, Lemma 3.1], we have › › (7.12) ppt, x, yq ď pR pt, x, yq ` t ›J2R ›8 . The Dirichlet forms satisfy # EJ pf, f q ´ EJ1R pf, f q ď 2 4 }f }2 + sup ÿ xPX yPX Jpx, yq1tρpx,yqąru 2 ď 4 }f }2 {φpRq. It follows that 4t 4t sup pR pt, x, yq ď e φpRq sup ppt, x, yq ď Ce φpRq t´1{β . x,y x,y By [16], this bound turns into Nash inequality ˆ 2p1`βq }f }2 ď C EJ1R pf, f q ` ˙ 4 2 2β }f }2 }f }1 φpRq Then by [14, Theorem 3.25], for any function ψ on X, ˆ ˙ 1 4t ´β 2 (7.13) pR pt, x, yq ď C2 t exp ` 72ΛR pψq t ´ ψpyq ` ψpxq , φpRq where C2 ą 0 is a constant and the quantity ΛR pψq is defined as › › › › ( ΛR pψq2 “ max ›e´2ψ Γpeψ , eψ q›8 , ›e2ψ Γpe´ψ , e´ψ q›8 , ÿ ΓR pf, gqpxq “ pf pyq ´ f pxqqpgpyq ´ gpxqqJ1R px, yq. yPX GROWTH OF PERIODIC GRIGORCHUK GROUPS 49 Take a parameter λ ą 0 and for any two points x0 ‰ y0 , take the function ψpxq “ λ pρpx, x0 q ´ ρpx, y0 qq` . Note that ψ is λ-Lipschitz with respect to the metric ρ. Then by the inequality pez ´ 1q2 ď z 2 e2|z| , z P R and Assumption (ii), we have ÿ ρ2 px, yqJpx, yq1tρpx,yqďRu e´2ψpxq Γpeψ , eψ qpxq ď λ2 e2λR yPX 2 2λR ďλ e R2 {φpRq. The same calculation applies to ´ψ, therefore ΛR pψq2 ď λ2 e2λR φ2 pRq. The inequality (7.13) evaluated at points x0 , y0 states ˆ ˙ 4t pR pt, x0 , y0 q ď C2 t´1{β exp ` 72pλRq2 e2λR t{φpRq ´ λρpx0 , y0 q φpRq ˆ ˙ 4t ď C2 t´1{β exp ` 72e3λR t{φpRq ´ λρpx0 , y0 q . φpRq We now restrict to the case t ď φpρpx0 , y0 qq. Choose λ and R to be β ρpx0 , y0 q, 3p1 ` βq ˆ ˙ 1 φpRq λ“ log . 3R t R“ We conclude that for t ď φpρpx, yqq, pR pt, x, yq ď Ct . φpρpx, yqq1`1{β The statement is obtained by combining this bound with (7.12).  7.6. Proof of Proposition 7.12. In addition to the Green function estimates, we need to bound the probability under µβ that a point x carries a germ pg, xq not in Hb . We estimate contributions of each υn and υ̌n as in the statement of Proposition 7.12. Proof of Proposition 7.12. To lighten notation, write H “ Hb for the sub-groupoid of xbygerms, o “ 18 , G “ Gω and d “ dS . Let pγ, q be a random variable with uniform distribution on the set Λn defined in (7.9) and write γ  “ γnn . . . γ11 . Then by definition of the measure υn in (7.10), ˜ ¸ ÿ ÿ f pdpo, xqq υn ptg P G : pg, xq R Huq “ E f pd po, xqq 1tpγ  ,xqRHu , xPo¨G xPo¨G where expectation is taken with respect to uniform distribution on Λn . Recall the multiplication rule in the groupoid of germs: ` n´1 ˘ pγ  , xq “ pγnn , xq γn´1 , x ¨ γnn . . . pγ11 , x ¨ γnn . . . γ22 q . Since H is a sub-groupoid, it follows that the indicator is bounded by 1tpγ  ,xqRHu ď n´1 ÿ i“0 1tpγ n´i ,x¨γnn ...γ n´i`1 qRHu . n´i n´i`1 50 ANNA ERSCHLER AND TIANYI ZHENG Therefore ˜ ¸ ÿ f pd po, xqq 1tpγ  ,xqRHu E xPo¨G ˜ n´1 ÿ ď ¸ ÿ f pd po, xqq 1tpγ n´i ,x¨γnn ...γ n´i`1 qRHu E i“0 n´i xPo¨G n´1 1 ÿ E “ 2 i“0 ˜ n 1 ÿ “ E 2 j“1 ˜ n´i`1 ¸ ¯¯ ´ ´ ` n´i`1 ˘´1 1tpγn´i ,xqRHu f d o, x ¨ γnn . . . γn´i`1 ÿ xPo¨G ¸ ´ ´ ¯¯ ´ f d o, x ¨ γj`1j`1 . . . γn´n 1tpγj ,xqRHu ÿ . xPo¨G Similarly, for υ̌n we have ÿ f pdpo, xqq υ̌n ptg P G : pg, xq R Hx uq xPo¨G ¸ ˜ ÿ “E xPo¨G 1 ˜ n´1 ÿ ď f pd po, xqq 1tpγ ´1 ...γn´n ,xqRHu ¸ ÿ E i“0 n 1 ÿ E “ 2 j“1 xPo¨G f pd po, xqq 1!´γ ´i`1 ,x¨γ ´1 ...γ ´i ¯RH) i`1 1 i ˜ ¸ ÿ ` ` ˘˘ j´1 f d o, x ¨ γj´1 . . . γ11 1tpγ ´1 ,xqRHu . j xPo¨G Recall that by the definition of Fn in (7.8), only for those levels j such that ωj´1 “ 2, an element γj P Fj,n has germs not in H. Therefore the summation is over 1 ď j ď n with ωj´1 “ 2. We split the sums into j ď n ´ kn and n ´ kn ă j ď n. For n ´ kn ă j ď n such that ωj´1 “ 2, by definition of the set Fj,n in (7.7), an element γj P Fj,n is of the form ` ˘ γj “ g̃jv “ ζω0 ˝ . . . ˝ ζωj´1 acvj . j`D´j̄ where v “ 1D´j̄ u1m`1 0, u P W2k , m “ m`pj,2kn q P t0, 1, . . . , D ´ 3u and n 8 |1 ^ v| ě n ´ j ` D. It follows from Lemma 7.7 that the collection of points which carry germs not in H is exactly ` ˘ ( Bpj, vq : “ x : g̃jv , x R H # + j`1 ÿ m`2 8 “ x : x “ x1 . . . xj`1 v2 . . . vD´j̄`2kn 1 01 : j ` 1 ` (7.14) xi is odd . i“1 j In particular, the cardinality of this set is 2 and on the Schreier graph the distance from a point in this set to 18 is comparable to 2j`2kn . Lemma 7.21. Let n ´ kn ă j ď n be a level such that ωj´1 “ 2 and g̃jv P Fj,n . Suppose f : R Ñ R is a non-increasing function. Let pγ, q be a random variable with uniform distribution on the set Λn defined in (7.9). ` ˘ (i): Let x be a point such that g̃jv , x R H, then ´ ´ ´ ¯¯¯ ` ˘ 1 1` 2 ´ E f d o, x ¨ γj`1j`1 . . . γn´n ď f 2j`2kn ` f p2n q kn D 2´ D pj`2kn ´nq . GROWTH OF PERIODIC GRIGORCHUK GROUPS (ii): Let x be a point such that 51 ´` ˘ ¯ ´1 g̃jv , x R H, then ˘ ˘˘˘ ` ` ` ` 1 1` 2 j´1 ď f 2j`2kn ` f p2n q kn D 2´ D pj`2kn ´nq . E f d o, x ¨ γj´1 . . . γ11 ` ˘ ( Proof of Lemma 7.21. (i). Let x be a point from the set Bpj, vq “ x : g̃jv , x R H as described in (7.14). Let q0 be the position of the first occurrence of 0 in sn`D x. Note that by (7.14), 2 ď q0 ď D ´ j̄ ` 2kn ` D. ´ ´m the substring in We first claim that for all m P tj ` 1, . . . , nu, in x ¨ γj`1j`1 . . . γm q0 ´1 positions n ` D ` 1 to n ` D ` q0 remains 1 0. To see this, denote by z the length n ` D ` 1 prefix of x, z “ x1 . . . xn`D`1 , and consider the section at z: (7.15) ´ ´ ¯ ¯ ´ ¯ ` ´ ˘ ´ ´ ´ ´m m ´ γj`1j`1 . . . γm “ γj`1j`1 γj`2j`2 . ´ ´j`1 . . . γm z¨γ j`1 ...γ m´1 z z z¨γj`1 j`1 m´1 Note that by (7.14), z has 1n`D´j as suffix. Recall that by Fact 7.14 the action of γ` is the same as g` on the finite level Ln`D`1 . By definitions of the elements g` in (7.1) and Lemma 7.5 we have that dpy, y ¨ g` q ď 2``2 for any y P Ln`D`1 . It follows that ´ ¯ ´ d z, z ¨ γj`1j`1 . . . γ`´` ď 2j`3 ` . . . ` 2``2 ď 2``3 ´ 1. Therefore ´ ¯ ´ ¯ ` ˘ ´ ´ d 1n`D`1 , z ¨ γj`1j`1 . . . γ`´` ď d 1n`D`1 , z ` d z, z ¨ γj`1j`1 . . . γ`´` ď 2j`1 ´ 1 ` 2``3 ´ 1. ´ It follows in particular since D ě 3, for ` ď n, the pn`D`1q-th digit of z¨γj`1j`1 . . . γ`´` remains 1. From the description of sections of γ`´1 we have that in the product (7.15) every factor belongs to the set tid, bsn`D`1 ω u Y tcusn`D`1 ω u , where cusn`D`1 ω is the section at 1 of cusn`D ω , that is cusn`D ω “ pωn`D pcq, cusn`D`1 ω q, u P Wkn`D for some k. Action of any element from this set of possible sections fixes the vertex 1q0 ´2 0. The claim follows. By the claim shown in the previous paragraph, the`digit 0˘ at the pn`D `q0 q-th position ensures that for any pγ, q and any point x such that g̃jv , x R H, ´ ¯ ´ d o, x ¨ γj`1j`1 . . . γn´n ě 2n`D`1 . Denote by Aj pxq the event * " ´ ¯ 1 ´ Aj pxq “ pγ, q : d x, x ¨ γj`1j`1 . . . γn´n ě dpo, xq . 2 Since f is assumed to be non-increasing, we have ´ ´ ´ ¯¯¯ ´ E f d o, x ¨ γj`1j`1 . . . γn´n ´ ´ ´ ¯¯ ¯ ´ ´ ´ ¯¯ ¯ ´ ´ “E f d o, x ¨ γj`1j`1 . . . γn´n 1Aj pxqc ` E f d o, x ¨ γj`1j`1 . . . γn´n 1Aj pxq ˆ ˙ ` ˘ 1 ďf d po, xq ` f 2n`D P pAj pxqq . 2 52 ANNA ERSCHLER AND TIANYI ZHENG Since dpo, xq ě 2j`2kn `2 , we have ¯ ´ ´ ¯ ´ P pAj pxqq ď P d x, x ¨ γj`1j`1 . . . γn´n ě 2j`2kn ˆ ´ n ¯ ÿ ´ ´ ´ P d x ¨ γj`1j`1 . . . γ`´` , x ¨ γj`1j`1 . . . γ``1``1 ě ď `“j`1 1 2j`2kn n´j ˙ 1 ď pn ´ jq2´ D pj`2kn ´n´log2 pn´jq´log2 kn q . In the last step we applied Lemma 7.17. We have proved (i). ´ ´m m (ii). The proof of (ii) is similar, with γj`1j`1 . . . γm replaced by γm . . . γ11 . We omit the repetition.  We now return to the proof of Proposition 7.12. For 1 ď j ď n ´ kn and ωj´1 “ 2, γj “ gj , we have # + j`1 ÿ 8 Bj “ tx : pgj , xq R Hu “ x : x1 . . . xj`1 1 , j ` 1 ` xi is odd . i“1 Since γj “ gj in this case, we can write ˜ ¸ ¯¯ ÿ ´ ´ ´j`1 E f d o, x ¨ γj`1 . . . γn´n 1tpγj ,xqRHu xPo¨G ´ ´ ´ ¯¯¯ ´ E f d o, x ¨ γj`1j`1 . . . γn´n . ÿ “ x:pgj ,xqRH Note that if we choose x uniform from Bj and pγ, q uniform from Λn , then in x ¨ ´ γj`1j`1 . . . γn´n the distribution of the first n digits is uniform on t0, 1un . Therefore ´ ´ ´ ¯¯¯ ´ E f d o, x ¨ γj`1j`1 . . . γn´n ÿ x:pgj ,xqRH ď2j EuLn pf pdp1n , zqqq ď 2j n ÿ f p2n´i q2´i . i“0 For n ´ kn ă j ď n, use (i) in Lemma 7.21. Combining these two parts, we obtain ˜ ¸ n ¯¯ ÿ ÿ ´ ´ ´j`1 ´n E f d o, x ¨ γj`1 . . . γn 1tpγj ,xqRHu j“1 n´k ÿn ď j“1 xPo¨G 2j n ÿ n ÿ f p2n´i q2´i ` i“0 ďC2n´kn f p2n q ` C ¯ ´ ` ˘ 1 1` 2 2j f 2j`2kn ` f p2n q kn D 2´ D pj`2kn ´nq j“n´kn `1 n ÿ ` ˘ ` ˘ 2j f 2j`2kn ď C 1 2n f 2n`2kn . j“n´kn `1 1 In the last line we applied the assumption on f that f p2xq ě 2´1{D f pxq and D1 ą D ě 3. GROWTH OF PERIODIC GRIGORCHUK GROUPS 53 The calculation for υ̌n is similar. For 1 ď j ď n ´ kn , use the fact that the first j´1 is uniform, we have pj ´ 1q-digits of x ¨ γ11 . . . γj´1 ˜ ¸ ¯¯ ÿ ´ ´ ´ E f d o, x ¨ γ11 . . . γj´1j´1 1tpγ ´1 ,xqRHu j xPo¨G ď 2j EuLj pf pd po, zqqq ď 2j j ÿ f p2j´i q2´i . i“0 Combine with (ii) in Lemma 7.21, we conclude that ¸ ˜ n ÿ ÿ E j“1 n´k n ´1 ÿ ď j“1 ` ` f dS o, x ¨ j´1 γj´1 . . . γ11 ˘˘ 1tpγ ´1 ,xqRHu j . xPo¨G 2j j ÿ f p2j´i q2´i ` ` i“0 n ÿ ´ ` ¯ ˘ 1 1` 2 2j f 2j`2kn ` f p2n q kn D 2´ D pj`2kn ´nq j“n´kn n ÿ ďC2n´kn f p2n´kn q ` C ` ˘ ` ˘ 2j f 2j`2kn ď C 1 2n f 2n`2kn . j“n´kn 1 In the last line we applied the assumption on f that f p2xq ě 2´1{D f pxq and D1 ą D ě 3.  8. A PPLICATIONS TO VOLUME LOWER ESTIMATES OF G RIGORCHUK GROUPS In this section we derive volume lower estimate for Gω from Theorem 7.13, where ω satisfies Assumption pFrpDqq as defined in Notation 7.1. Throughout the section we use notations for Gω as reviewed in Subsection 2.4. Let ω be a string that satisfies Assumption pFrpDqq and µβ be a measure with nontrivial Poisson boundary as in Theorem 7.13. The construction of µβ is in Subsection 7.2. Recall that µβ is built from measures υn , n P DN. We bound the length of elements in the support of υn . Let Mi be the matrix associated with the substitution ζi , i P t0, 1, 2u, such that lpζi pωqq “ Mi lpωq where lpωq is the column vector that records occurrence of ab, ac, ad in ω. Explicitly » fi » fi » fi 2 0 1 2 1 0 1 0 0 M0 “ – 0 2 1 fl , M1 “ – 0 1 0 fl , M2 “ – 1 2 0 fl . 0 0 1 0 1 2 1 0 2 Define the number Lω n to be ¨ (8.1) Lω n :“ ` 1 1 1 ˘ ˛ 1 Mω0 . . . Mωn´1 ˝ 1 ‚. 1 Lemma 8.1. Let υn be defined as in (7.10) and Lω n be as in (8.1). Then supt|g| : g P suppυn u ď 22kn `2D`4 Lω n. Proof. An element in the support of υn is of the form g “ γnn . . . γ11 , where γj P Fj,n . For those indices j such that Fj,n “ tgj u, we have ¨ ˛ 1 ` ˘ |γj | ď 2 2 2 Mω0 . . . Mωj´1 ˝ 1 ‚. 1 54 ANNA ERSCHLER AND TIANYI ZHENG Otherwise γj “ g̃jv for some v as in (7.6). By definition of cvj in (7.5) we have ˇ vˇ ˇcj ˇ G sj ω ď1`2 2knÿ `2D |hvi | Gsj ω , i“1 hvj where is defined in (7.4). The element ι prbsj`i´2 ω , as , v1 . . . vi´2 q can be obtained by applying the substitutions σi . We have |hvi | Gsj ω ď 2i`1 . Therefore 2knÿ `2D ˇ vˇ ˇacj ˇ G j ď 2 ` 2 |hvi | Gsj ω ď 22kn `2D`2 . s ω i“1 Since g̃jv is obtained by applying substitutions ζi to acvj , ¨ ˇ vˇ ` ˇg̃j ˇ ď 22kn `2D`2 2 From the triangle inequality |g| ď ÿ |g| ď 2Lω j ` jăn´kn řn j“1 2 2 ˘ ˛ 1 Mω0 . . . Mωj´1 ˝ 1 ‚. 1 |γj |, we have for g P suppυn , ÿ 2kn `D`4 ω 22kn `D`2 2Lω Ln . j ď2 n´kn ďjďn  We obtain a tail estimate of µβ as an immediate corollary of Lemma 8.1. Corollary 8.2. Let µβ be defined as in (7.11) with parameters β ą 0 and pkn q, kn ď n. Then µβ is of finite entropy and there exists constant C ą 0 depending on β, D such that ´ ` ˘c ¯ C µβ B id, 22kn Lω ď nβ . n 2 ˘k n ` , the entropy Proof. Since the size of the support of υn is bounded by |Λn | ď 2n 22kn of µβ is bounded by ÿ ÿ ` ˘ Hpµβ q ď C 2´nβ Hpυn q ď C 2´nβ n ` 2kn2 ă 8. D|n D|n By Lemma 8.1, supt|g| : g P suppυn u ď 22kn `2D`4 Ln , thus ´ ` ÿ ˘c ¯ 1 ď Cβ ď C2´nβ . µβ B id, 22kn Lω n jβ 2 jěn´2D  Combine Theorem 7.13 with the tail estimate in Corollary 8.2 we deduce the following. Theorem 8.3. Let ω be a string satisfying Assumption pFrpDqq. For any  ą 0, there exists a constant C “ CpD, q ą 0 and a non-degenerate symmetric probability measure µ on Gω of finite entropy and nontrivial Poisson boundary with tail decay c ´1` µ pBpid, Lω , n q q ď Cn where the number Lω n is defined in (8.1). As a consequence, there exists constant c “ cpD, q such that for all n ě 1, ` 1´ ˘ vGω ,S pLω . n q ě exp cn GROWTH OF PERIODIC GRIGORCHUK GROUPS 55 Proof. Given  ą 0, take maxt1 ´ , 1 ´ 1{Du ă β ă 1. By Theorem 7.13 there exists A ą 0 such that the measure µβ with kn “ A tlog2 nu has non-trivial Poisson boundary ω on Gω . Note that Lω n`1 ě 2Ln for any n and ω. By Corollary 8.2, ´ ` ˘c ¯ C µβ B id, n2A Lω ď nβ . n 2 Then the tail estimate stated follows. The volume lower bound follows from Lemma 2.1.  Applied to periodic strings which contain all three letters, we obtain Corollary 1.2 stated q log 2 in the Introduction. By [8, Proposition 4.6], the set of quantities log λω , where λω is the spectral radius of Mω0 . . . Mωq´1 , coming from periodic ω containing all three letters is dense in rα0 , 1s. Therefore the volume exponents of the collection tGω u, where ω is a periodic string with all three letters, form a dense subset of rα0 , 1s. Proof of Corollary 1.2. Up to a renaming of letters t0, 1, 2u, a periodic string ω containing all three letters satisfies Assumption pFrpDqq with D “ 2q. For the tail estimate in ω n{q Theorem 8.3, note that the length Lω where λ “ λω0 ...ωq´1 is the n satisfies Ln ď 3λ spectral radius of Mω0 . . . Mωq´1 . Therefore by Theorem 8.3, for any  ą 0, there exists a constant c ą 0 such that for all n ě 1, vGω pnq ě exppcnα´ q, log 2 where α “ qlog λ . By [8, Proposition 4.4], for such a period string ω, the permutation wreath extension Wω “ pZ{2Zq oS Gω has growth ´ q log 2 ¯ vWω pnq » exp n log λ . The statement follows.  We now consider strings ω in t201, 211u˚ to prove Corollary 1.3. The strategy to choose a string to approximate a prescribed volume function follows [8]. The main result of [8] states that any sub-multiplicative function that grows uniformly faster than exp pnα0 q can be realized as the growth function of some permutational wreath extension Wω “ pZ{2Zq oS Gω , ω P t0, 1, 2u8 . Roughly speaking, the procedure relies on the fact that the string 201 exhibits the sum contracting coefficient η0 while for the string 211 the coefficient is 1 (no sum-contraction). Careful choice of length pik , jk q in the product p201qi1 p211qj1 p201qi2 p211qj2 . . . of these two types of strings allows to approximate prescribed volume function as in [8, Section 5]. Proof of Corollary 1.3. Let ω P t201, 211u8 . By the volume estimate [8, Corollary 4.2] and [8, Lemma 5.1, Corollary 5.2], we have that there exists a constants C, c ą 0 such that exppcnq ď vWω ,T pLω n q ď exppCnq, where Wω is the permutation wreath product pZ{2Zq oS Gω . Let f : R` Ñ R` be a function such that f p2Rq ď f pRq2 ď f p2R{η0 q, where η0 is the real root of X 3 ` X 2 ` X ´ 2. For such a function f , the proof in [8, Section 5] produces a string ω is the form p012qi1 2j1 p012qi2 2j3 . . . such that the volume growth of Wω is equivalent to f . For this result, one can use a string of the form p201qi1 p211qj1 p201qi2 p211qj2 . . . instead. This is because the properties of p012qn and 2n in [8, Lemma 5.3 ] are satisfied 56 ANNA ERSCHLER AND TIANYI ZHENG by 201 and 211. Following the notations of [8], similar to [8, Lemma 5.3 ], there exists constants A1 ď 1, B 1 ě 1 such that for all V P ∆1 and n P N, η pV, p201qn q ě η03n A1 , ηpV, p211qn q ď 23n B 1 . Using this property of p201qn instead of p012qn and p211qn instead of 2n , the proof in [8, Section 5] carries over verbatim and shows the following: for a prescribed function f : R` Ñ R` be a function such that f p2Rq ď f pRq2 ď f p2R{η0 q, there exists a string ω P t201, 211u8 such that the volume growth of Wω is equivalent to f . By Theorem 8.3, since ω P t201, 211u8 satisfies AssumptionpDq with D “ 3, we have that for any  ą 0, there exists a constant c ą 0 such that for all n ě 1, ` 1´ ˘ vGω ,S pLω . n q ě exp cn Combined with the estimates on vWω pnq we have that if the volume of Wω is equivalent to f , then for any  ą 0 there exists c ą 0 such that ¯ ´c  exp  log f pnq ď vGω ,S pnq ď f pnq. n The statement follows by choosing an f satisfying the condition f p2Rq ď f pRq2 ď f p2R{η0 q with lower exponent α and upper exponent β.  9. F INAL REMARKS AND QUESTIONS 9.1. On Gω without Assumption pFrpDqq. When the string ω does not satisfy Assumption pFrpDqq in Notation 7.1, the construction in Section 7 does not apply. For example, consider strings of the form 0i1 1i1 2i1 0i2 1i2 2i2 . . . where in Ñ 8 as n Ñ 8. It is known from [29] that if the sequence pin q grows rapidly, the growth of Gω for such ω is close to exponential along a subsequence. However different ideas are needed to obtain good volume lower estimates for these ω’s. For any ω that is not eventually constant, one can apply the construction that takes a measure with restricted germs as in Section 6 to obtain measures with non-trivial Poisson boundary. The same argument that proves Corollary 6.4 extends to general ω, we omit the detail here. For the periodic string ωt “ p0t´2 12q8 , by Theorem 1.2 explicit calculation shows that when t Ñ 8, the the volume exponent αωt “ limnÑ8 1 ´ αωt „ log log vG 0t´2 12 log n pnq satisfies c as t Ñ 8, t for some number c ą 0. This kind of dependence on frequencies of the letters can be observed in general strings. Given ω P t0, 1, 2u8 , let `n pxq count the number of occurrences of the symbol x in the first n digits, x P t0, 1, 2u. Let θn “ 1 min t`n p0q, `n p1q, `n p2qu . n Then there exists absolute constants c, C ą 0 such that n1´Cθn { log1` n À log vGω ,S pnq À n1´cθn . GROWTH OF PERIODIC GRIGORCHUK GROUPS 57 9.2. Critical constant of the Liouville property. Kaimanovich and Vershik conjectured in [34] that any group of exponential growth admits a probability measure with non-trivial Poisson boundary. In a very recent preprint [27], Frisch, Hartman, Tamuz and Ferdowsi answered this conjecture positively. In [27] the authors completely characterize countable groups that can admit random walks with non-trivial Poisson boundary: a countable group G admits a probability measure with non-trivial Poisson boundary if and only if it admits a quotient with infinite conjugacy class property. In particular, for a finitely generated group G, there exists a symmetric probability measure µ of finite entropy and non-trivial Poisson boundary on G if and only if G is not virtually nilpotent. On a finitely generated group that is not virtually nilpotent one can then ask whether tail decay of measures with non-trivial Poisson boundary provides useful information about the growth of the group. Similar in flavor to the critical constant of recurrence (see Subsection 5.2), given a countable group Γ equipped with a length function l, one can define the critical constant of the Liouville property of Γ with respect to l to be sup β where the sup is over all β ě 0 such that there exists a non-degenerate symmetric probability measure µ on Γ with ř finite entropy and non-trivial Poisson boundary such that µ has finite β-moment, that is gPΓ lpgqβ µpgq ă 8. When Γ is finitely generated and l is the word length we omit reference to l. For example, for the lamplighter group pZ{2Zq o Z and polycyclic groups that are not virtually nilpotent, the critical constant of the Liouville property is 1; while for pZ{2Zq o Z2 it is 2 and for pZ{2Zq o Z3 , d ě 3, it is 8. These examples are of exponential growth. For intermediate growth groups, the critical constant of the Liouville property is bounded from above by the upper growth exponent. Results in this paper imply that for ω periodic containing all letters 0, 1, 2, the volume exponent of the Grigorchuk group Gω , the critical constant of recurrence of pGω , StGω p18 qq and the critical constant of Liouville property of Gω all coincide. By [24], these three exponents are equal to 1 on Gω where ω contains exactly two letters infinitely often. Recall that the FC-center of a group Γ, ZFC pΓq, consists of elements with finite conjugacy classes. By [1, Theorem IV. 1], for any non-degenerate measure µ on Γ, bounded µ-harmonic functions are constant on ZFC pΓq. As a consequence, the critical constant of the Liouville property for Γ with respect to l is the same as its quotient Γ{ZFC pΓq with respect to the quotient length function ¯l. On the other hand, the volume growth of Γ can be much faster than that of Γ{ZFC pΓq. For example, it is known that FC-central extensions of the first Grigorchuk group can have growth arbitrarily close to exponential and have arbitrarily large Følner function, see the remarks below. Therefore one cannot expect random walks with non-trivial Poisson boundary to provide near optimal lower bound on general intermediate growth groups. The Gap Conjecture (strong version) of Grigorchuk asks if the growth of a finitely ? generated group being strictly smaller than e n implies that it is polynomial. A weaker formulation of the conjecture, called the Gap Conjecture with parameter β, asks if growth β strictly smaller than en implies polynomial growth. There are related gap conjecture type questions regarding various asymptotic characteristics of the groups, see the survey of Grigorchuk [31] for more information. If the Gap Conjectures of Grigorchuk, strong or weak, hold true, one can ask (having in mind the results of this paper) whether stronger statements hold true for any group Γ of super-polynomial growth: let Γ be a finitely generated group of super-polynomial growth, is it true that there exists a finite entropy measure µ with power-law tail decay bound, that is µ ptg : |g|S ě ruq ď Cr´β for some C, β ą 0, 58 ANNA ERSCHLER AND TIANYI ZHENG such that the Poisson boundary of pΓ, µq is non-trivial? Can one always choose such µ with β ě 1{2 ´ ? Remark 9.1. The following construction provides FC-central extensions. Let F be a group equipped with a finite generating set S (typically a free group or free product). Suppose we have a sequence of quotients F Ñ Γk , k P N, and F Ñ G. Each quotient group is marked with the generating set S. Let Rk be the largest radius r such that in the Cayley graph of pΓk , Sq, the ball of radius r around id is the same as the ball of same radius around id in the Cayley graph pG, Sq. Take the the universal group of the sequence pΓk q, Γ “ F{ pX8 k“1 ker pF Ñ Γk qq . Suppose pΓk , Sq is a sequence of marked finite groups such that with respect to pG, Sq, Rk Ñ 8 as k Ñ 8. Then the group Γ is an FC-central extension of G. To see this, first note that G is a quotient of Γ. Suppose w P kerpF Ñ Γq, then it is in kerpF Ñ Γk q for every k. It follows that w is in kerpF Ñ Gq because Rk Ñ 8 as k Ñ 8. We need to show any element γ P ker pΓ Ñ Gq has finite conjugacy class in Γ. Let w be a word in S Y S ´1 which represents γ, where γ P kerpΓ Ñ Gq. Since lim Rk “ 8, there is a finite k0 such that for k ą k0 , the ball of radius |w| around id in Γk agrees with the ball of same radius in G. In particular the image of w in Γk with k ą k0 is identity. Therefore the conjugacy class of γ is contained in the product of Γk , 1 ď k ď k0 . Since each Γk is assumed to be finite, we conclude that the conjugacy class of γ is finite. Remark 9.2. In [26] it is shown that intermediate growth groups can have arbitrarily large Følner functions. The groups are obtained as direct products of piecewise automatic groups with returns. Each factor group Γk (represented as a piecewise automatic group with return PApτ1 , τ2 , ik , jk q) is a finite quotient of the free product F “ Z{2Z ˚ pZ{2Z ˆ Z{2Zq. Let S “ ta, b, c, du be a generating set of the free product, Z{2Z “ xay and Z{2Z ˆ Z{2Z “ tid, b, c, du. Because the action of the first Grigorchuk group G on the tree is contracting, this sequence pΓk , Sq satisfies the property that with respect to pG, Sq, Rk Ñ 8 as k Ñ 8. In other words pΓk , Sq converges to pG, Sq as k Ñ 8 in the ChabautyGrigorchuk topology, which is also called the Cayley topology. Then the universal group of the sequence pΓk q (referred to as direct product of piecewise automatic groups in [26]), Γ “ F{ pX8 k“1 ker pF Ñ Γk qq, is an FC-central extension of G. By [26], Γ is of intermediate growth and its Følner function can be arbitrarily large with suitable choices of parameters. In particular the growth of Γ can be arbitrarily close to exponential. Since the group Γ is torsion, by [1, Theorem IV. 1], for any measure µ on Γ, bounded µ-harmonic functions factor through the quotient Γ{ZFC pΓq “ G. Since the growth of G is bounded by exp pnα0 q, it follows that any measure µ on Γ with finite α0 -moment has trivial Poisson boundary. R EFERENCES [1] Robert Azencott, Espaces de Poisson des groupes localement compacts, Lecture Notes in Mathematics, Vol. 148, Springer-Verlag, Berlin-New York, 1970. MR0501376 [2] Martin T. Barlow, Richard F. Bass, Zhen-Qing Chen, and Moritz Kassmann, Non-local Dirichlet forms and symmetric jump processes, Trans. Amer. Math. Soc. 361 (2009), no. 4, 1963–1999. MR2465826 [3] Martin T. Barlow, Alexander Grigor’yan, and Takashi Kumagai, Heat kernel upper bounds for jump processes and the first exit time, J. Reine Angew. Math. 626 (2009), 135–157. MR2492992 [4] Laurent Bartholdi, The growth of Grigorchuk’s torsion group, Internat. Math. Res. Notices 20 (1998), 1049– 1054. MR1656258 , Lower bounds on the growth of a group acting on the binary rooted tree, Internat. J. Algebra [5] Comput. 11 (2001), no. 1, 73–88. MR1818662 GROWTH OF PERIODIC GRIGORCHUK GROUPS [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] 59 , Growth of groups and wreath products, Groups, graphs and random walks, 2017, pp. 1–76. MR3644003 Laurent Bartholdi and Anna Erschler, Growth of permutational extensions, Invent. Math. 189 (2012), no. 2, 431–455. MR2947548 , Groups of given intermediate word growth, Ann. Inst. Fourier (Grenoble) 64 (2014), no. 5, 2003– 2036. MR3330929 , Poisson-Furstenberg boundary and growth of groups, Probab. Theory Related Fields 168 (2017), no. 1-2, 347–372. MR3651055 Laurent Bartholdi, Rostislav I. Grigorchuk, and Zoran Šuniḱ, Branch groups, Handbook of algebra, Vol. 3, 2003, pp. 989–1112. MR2035113 A. Bendikov and L. Saloff-Coste, Random walks on groups and discrete subordination, Math. Nachr. 285 (2012), no. 5-6, 580–605. MR2902834 N. H. Bingham, C. M. Goldie, and J. L. Teugels, Regular variation, Encyclopedia of Mathematics and its Applications, vol. 27, Cambridge University Press, Cambridge, 1989. MR1015093 Jérémie Brieussel, Croissance et moyennabilité de certains groupes d’automorphismes d’un arbre enraciné, thése de doctorat, université Diderot Paris 7, 2008. E. A. Carlen, S. Kusuoka, and D. W. Stroock, Upper bounds for symmetric Markov transition functions, Ann. Inst. H. Poincaré Probab. Statist. 23 (1987), no. 2, suppl., 245–287. MR898496 Zhen-Qing Chen and Takashi Kumagai, Heat kernel estimates for jump processes of mixed types on metric measure spaces, Probab. Theory Related Fields 140 (2008), no. 1-2, 277–317. MR2357678 Thierry Coulhon, Ultracontractivity and Nash type inequalities, J. Funct. Anal. 141 (1996), no. 2, 510–539. MR1418518 Thierry Coulhon and Laurent Saloff-Coste, Isopérimétrie pour les groupes et les variétés, Rev. Mat. Iberoamericana 9 (1993), no. 2, 293–314. MR1232845 E. B. Davies, Explicit constants for Gaussian upper bounds on heat kernels, Amer. J. Math. 109 (1987), no. 2, 319–333. MR882426 , Heat kernels and spectral theory, Cambridge Tracts in Mathematics, vol. 92, Cambridge University Press, Cambridge, 1989. MR990239 Pierre de la Harpe, Topics in geometric group theory, Chicago Lectures in Mathematics, University of Chicago Press, Chicago, IL, 2000. MR1786869 Thierry Delmotte, Parabolic Harnack inequality and estimates of Markov chains on graphs, Rev. Mat. Iberoamericana 15 (1999), no. 1, 181–232. MR1681641 Yves Derriennic, Quelques applications du théorème ergodique sous-additif, Conference on Random Walks (Kleebach, 1979) (French), 1980, pp. 183–201, 4. MR588163 E. B. Dynkin and M. B. Maljutov, Random walk on groups with a finite number of generators, Dokl. Akad. Nauk SSSR 137 (1961), 1042–1045. MR0131904 Anna Erschler, Boundary behavior for groups of subexponential growth, Ann. of Math. (2) 160 (2004), no. 3, 1183–1210. MR2144977 , Critical constants for recurrence of random walks on G-spaces, Ann. Inst. Fourier (Grenoble) 55 (2005), no. 2, 493–509. MR2147898 , Piecewise automatic groups, Duke Math. J. 134 (2006), no. 3, 591–613. MR2254627 Joshua Frisch, Yair Hartman, Omer Tamuz, and Pooya Vahidi Ferdowsi, Choquet-Deny groups and the infinite conjugacy class property, arXiv preprint arXiv:1802.00751 (2018). Rostislav I. Grigorchuk, On Burnside’s problem on periodic groups, Funktsional. Anal. i Prilozhen. 14 (1980), no. 1, 53–54. MR565099 , Degrees of growth of finitely generated groups and the theory of invariant means, Izv. Akad. Nauk SSSR Ser. Mat. 48 (1984), no. 5, 939–985. MR764305 , Some problems of the dynamics of group actions on rooted trees, Tr. Mat. Inst. Steklova 273 (2011), no. Sovremennye Problemy Matematiki, 72–191. MR2893544 , Milnor’s problem on the growth of groups and its consequences, Frontiers in complex dynamics, 2014, pp. 705–773. MR3289926 Alexander Grigor’yan, Analysis on graphs, Lecture Notes, available at https://www.math.unibielefeld.de/ grigor/aglect2.pdf. , Heat kernel upper bounds on a complete non-compact manifold, Rev. Mat. Iberoamericana 10 (1994), no. 2, 395–452. MR1286481 V. A. Kaı̆manovich and A. M. Vershik, Random walks on discrete groups: boundary and entropy, Ann. Probab. 11 (1983), no. 3, 457–490. MR704539 60 ANNA ERSCHLER AND TIANYI ZHENG [35] Gregory F. Lawler and Alan D. Sokal, Bounds on the L2 spectrum for Markov chains and Markov processes: a generalization of Cheeger’s inequality, Trans. Amer. Math. Soc. 309 (1988), no. 2, 557–580. MR930082 [36] Yu. G. Leonov, A lower bound for the growth function of periods in Grigorchuk groups, Mat. Stud. 8 (1997), no. 2, 192–197, 237. MR1685935 [37] I.G. Lysionok, A system of defining relations for the Grigorchuk group, Mat. Zametki 38 (1985), 503–511. [38] Volodymyr Nekrashevych, Self-similar groups, Mathematical Surveys and Monographs, vol. 117, American Mathematical Society, Providence, RI, 2005. MR2162164 [39] René L. Schilling, Renming Song, and Zoran Vondraˇ cek, Bernstein functions, Second, De Gruyter Studies in Mathematics, vol. 37, Walter de Gruyter & Co., Berlin, 2012. Theory and applications. MR2978140 [40] Wolfgang Woess, Random walks on infinite graphs and groups, Cambridge Tracts in Mathematics, vol. 138, Cambridge University Press, Cambridge, 2000. MR1743100 A NNA E RSCHLER — D ÉPARTEMENT DE MATHÉMATIQUES ET APPLICATIONS , É COLE NORMALE SUPÉRIEURE , CNRS, PSL R ESEARCH U NIVERSITY, 45 RUE D ’U LM , 75005 PARIS — [email protected] T IANYI Z HENG — D EPARTMENT OF M ATHEMATICS , UC S AN D IEGO , 9500 G IMAN D R . L A J OLLA , CA 92093 — [email protected]
4math.GR
This manuscript is the pre-submission manuscript provided by the authors. For the final, post-review version, please see: http://dx.doi.org/10.1038/nature14422 Robots that can adapt like animals arXiv:1407.3501v4 [cs.RO] 27 May 2015 Antoine Cully,1,2 Jeff Clune,6 Danesh Tarapore,1,2 Jean-Baptiste Mouret1−5,∗ As robots leave the controlled environments of factories to autonomously function in more complex, natural environments1,2,3 , they will have to respond to the inevitable fact that they will become damaged4,5 . However, while animals can quickly adapt to a wide variety of injuries, current robots cannot “think outside the box” to find a compensatory behavior when damaged: they are limited to their pre-specified selfsensing abilities, can diagnose only anticipated failure modes6 , and require a pre-programmed contingency plan for every type of potential damage, an impracticality for complex robots4,5 . Here we introduce an intelligent trial and error algorithm that allows robots to adapt to damage in less than two minutes, without requiring self-diagnosis or pre-specified contingency plans. Before deployment, a robot exploits a novel algorithm to create a detailed map of the space of high-performing behaviors: This map represents the robot’s intuitions about what behaviors it can perform and their value. If the robot is damaged, it uses these intuitions to guide a trial-and-error learning algorithm that conducts intelligent experiments to rapidly discover a compensatory behavior that works in spite of the damage. Experiments reveal successful adaptations for a legged robot injured in five different ways, including damaged, broken, and missing legs, and for a robotic arm with joints broken in 14 different ways. This new technique will enable more robust, effective, autonomous robots, and suggests principles that animals may use to adapt to injury. Robots have transformed the economics of many industries, most notably manufacturing7 , and have the power to deliver tremendous benefits to society, such as in search and rescue8 , disaster response9 , health care3 , and transportation10 . They are also invaluable tools for scientific exploration, whether of distant planets1,4 or deep oceans2 . A major obstacle to their widespread adoption in more complex environments outside of factories is their fragility4,5 : Robots presently pale in comparison to natural animals in their ability to invent compensatory behaviors after an injury (Fig. 1A). Current damage recovery in robots typically involves two phases: self-diagnosis, and then selecting the best, pre-designed contingency plan11,12,13,14 . Such self-diagnosing robots are expensive, because self-monitoring sensors are expensive, and are difficult to design, because robot engineers cannot foresee every possible situation: this approach often fails either because the diagnosis is incorrect12,13 or because an appropriate contingency plan is not provided14 . Injured animals respond differently: they learn by trial and error how to compensate for damage (e.g. learning which limp minimizes pain)15,16 . Similarly, trial-and-error learning algorithms could allow robots to creatively discover compensatory behaviors without being limited to their designers’ assumptions about how damage may occur and how to compensate for each damage type. However, state-of-the-art learning algorithms are impractical because of the “curse of dimensionality”17 : the fastest 1 Sorbonne Universités, UPMC Univ Paris 06, UMR 7222, ISIR, F-75005, Paris CNRS, UMR 7222, ISIR, F-75005, Paris, France 3 Inria, Villers-lès-Nancy, F-54600, France 4 CNRS, Loria, UMR 7503, Vandœuvre-lès-Nancy, F-54500, France 5 Université de Lorraine, Loria, UMR 7503, Vandœuvre-lès-Nancy, F-54500, France 6 University of Wyoming, Laramie, WY, USA ∗ Corresponding author: [email protected] 2 Cully, Clune, Tarapore, and Mouret. 2015 algorithms constrain the search to a few behaviors (e.g. tuning only 2 parameters, requiring 5-10 minutes) or require human demonstrations17 . Algorithms without these limitations take several hours17 . Damage recovery would be much more practical and effective if robots adapted as creatively and quickly as animals (e.g. in minutes) and without expensive self-diagnosing sensors. Here, we show that rapid adaptation can be achieved by guiding an intelligent trial-and-error learning algorithm with an automatically generated, pre-computed, behavior-performance map that predicts the performance of thousands of different behaviors (Supplementary Video S1). The key insight is that, whereas current learning algorithms either start with no knowledge of the search space17 or with minimal knowledge from a few human demonstrations17,18 , animals better understand the space of possible behaviors and their value from previous experience19 , enabling injured animals to intelligently select tests that validate or invalidate whole families of promising compensatory behaviors. We have robots store knowledge from previous experience in the form of a map of the behavior-performance space. Guided by this map, a damaged robot tries different types of behaviors that are predicted to perform well and, as tests are conducted, updates its estimates of the performance of those types of behaviors. The process ends when the robot predicts that the most effective behavior has already been discovered. The result is a robot that quickly discovers a way to compensate for damage (e.g. Fig. 1C) without a detailed mechanistic understanding of its cause, as occurs with animals. We call this approach “Intelligent Trial and Error” (Fig. 1D). The behavior-performance map is created with a novel algorithm and a simulation of the robot, which either can be a standard physics simulator or can be automatically discovered12 . The robot’s designers only have to describe the dimensions of the space of possible behaviors and a performance measure. For instance, walking gaits could be described by how much each leg is involved in a gait (a behavioral measure) and speed (a performance measure). For grasping, performance could be the amount of surface contact, and it has been demonstrated that 90% of effective poses for the 21-degree-of-freedom human hand can be captured by a 3-dimensional behavioral space20 . To fill in the behavior-performance map, an optimization algorithm simultaneously searches for a high-performing solution at each point in the behavioral space (Fig. 2A,B and Extended Data Fig. 1). This step requires simulating millions of behaviors, but needs to be performed only once per robot design before deployment (Methods). A low confidence is assigned to the predicted performance of behaviors stored in this behavior-performance map because they have not been tried in reality (Fig. 2B and Extended Data Fig. 1). During the robot’s mission, if it senses a performance drop, it selects the most promising behavior from the behaviorperformance map, tests it, and measures its performance. The robot subsequently updates its prediction for that behavior and nearby behaviors, assigns high confidence to these predictions (Fig. 2C and Extended Data Fig. 1), and continues the selection/test/update process until it finds a satisfactory compensatory behavior (Fig. 2D and Extended Data Fig. 1). All of these ideas are technically captured via a Gaussian process model21 , which approximates the performance function arXiv preprint | 1 A C B Image: Michael Brashier Image: Michael Lloyd D 0.11 m/s 1st trial Goal: Fast, straight walking 3rd trial 0.30 m/s 2nd trial 0.22 m/s Learning guided by self-knowledge Compensatory behavior Figure 1| With Intelligent Trial and Error, robots, like animals, can quickly adapt to recover from damage. (A) Most animals can find a compensatory behavior after an injury. Without relying on predefined compensatory behaviors, they learn how to avoid behaviors that are painful or no longer effective. (B) An undamaged, hexapod robot. (C) One type of damage the hexapod may have to cope with (broken leg). (D) After damage occurs, in this case making the robot unable to walk straight, damage recovery via Intelligent Trial and Error begins. The robot tests different types of behaviors from an automatically generated map of the behavior-performance space. After each test, the robot updates its predictions of which behaviors will perform well despite the damage. This way, the robot rapidly discovers an effective compensatory behavior. with already acquired data, and a Bayesian optimization procedure22,23 , which exploits this model to search for the maximum of the performance function (Methods). The robot selects which behaviors to test by maximizing an information acquisition function that balances exploration (selecting points whose performance is uncertain) and exploitation (selecting points whose performance is expected to be high) (Methods). The selected behavior is tested on the physical robot and the actual performance is recorded. The algorithm updates the expected performance of the tested behavior and lowers the uncertainty about it. These updates are propagated to neighboring solutions in the behavioral space by updating the Gaussian process (Methods). These updated performance and confidence distributions affect which behavior is tested next. This select-test-update loop repeats until the robot finds a behavior whose measured performance is greater than 90% of the best performance predicted for any behavior in the behavior-performance map (Methods). We first test our algorithm on a hexapod robot that needs to walk as fast as possible (Fig. 1B, D). The robot has 18 motors, an onboard computer, and a depth camera that allows the robot to estimate its walking speed (Supplementary Methods). The gait is parametrized by 36 real-valued parameters that describe the amplitude of oscillation, phase shift, and duty cycle for each joint (Supplementary Methods). The behavior space is 6-dimensional, where each dimension is the proportion of time the ith leg spends in contact with the ground (i.e. the duty factor)7 (Supplementary Methods). The created behavior-performance map contains approximately 13,000 different gaits (Supplementary Video S2 shows examples). We tested our robot in six different conditions: undamaged (Fig. 3A:C1), four different structural failures (Fig. 3A:C2C5), and a temporary leg repair (Fig. 3A:C6). We compare the walking speed of resultant gaits with a widely-used, classic, hand-designed tripod gait7 (Supplementary Methods). For each of the 6 damage conditions, we ran our adaptation step 5 times for each of 8 independently generated behavior-performance maps (with the default “duty factor” behavioral description), leading to 6 × 5 × 8 = 240 experiments in total. We also ran our adaptation step 5 times on 8 independently generated behaviorperformance maps defined by an alternate behavioral descrip- Cully, Clune, Tarapore, and Mouret. 2015 tion (“body orientation”, see Supplementary Methods) on two damage conditions (Fig. 3B-C), leading to 2 × 5 × 8 = 80 additional experiments. When the robot is undamaged (Fig. 3A:C1), our approach yields dynamic gaits that are 30% faster than the classic reference gait (Fig. 3B, median 0.32 m/s, 5th and 95th percentiles [0.26; 0.36] vs. 0.24m/s), suggesting that Intelligent Trial and Error is a good search algorithm for automatically producing successful robot behaviors, putting aside damage recovery. In all the damage scenarios, the reference gait is no longer effective (~0.04 m/s for the four damage conditions, Fig. 3B:C2-C5). After Intelligent Trial and Error, the compensatory gaits achieve a reasonably fast speed (> 0.15m/s) and are between 3 and 7 times more efficient than the reference gait for that damage condition (in m/s, C2: 0.24 [0.18; 0.31] vs. 0.04; C3: 0.22 [0.18; 0.26] vs. 0.03; C4: 0.21 [0.17; 0.26] vs. 0.04; C5: 0.17 [0.12; 0.24] vs. 0.05; C6: 0.3 [0.21; 0.33] vs 0.12). These experiments demonstrate that Intelligent Trial and Error allows the robot to both initially learn fast gaits and to reliably recover after physical damage. Additional experiments reveal that these capabilities are substantially faster than state-of-the-art algorithms (Extended Data Fig. 2), and that Intelligent Trial and Error can help with another major challenge in robotics: adapting to new environments (Extended Data Fig. 3). On the undamaged or repaired robot (Fig. 3: C6), Intelligent Trial and Error learns a walking gait in less than 30 seconds (Fig. 3C, undamaged: 24 [16; 41] seconds, 3 [2; 5] physical trials, repaired: 29 [16; 82] seconds, 3.5 [2; 10] trials). For the four damage scenarios, the robot adapts in approximately one minute (66 [24; 134] seconds, 8 [3; 16] trials). Our results are qualitatively unchanged when using different behavioral characterizations, including randomly choosing 6 descriptors among 63 possibilities (Fig. 3B-C and Extended Data Fig. 4). Additional experiments show that reducing the high-dimensional parameter space to a low-dimensional behavior space via the behavior-performance map is the key component for intelligent trial and error: standard Bayesian optimization in the original parameter space does not find working controllers (Extended Data Fig. 2). We investigated how the behavior-performance map is updated when the robot loses a leg (Fig. 3A:C4). Initially the map arXiv preprint | 2 A Map Creation Confidence level Performance 0 Simulation (undamaged) 0.2 0.4 1 0.8 0.6 0.6 0.4 0.8 0.2 Adaptation Step 1 0 E 0 0 0 0.2 1 0.8 0.6 0.4 1 0.8 0.6 0.6 0.4 0.8 0 0.4 1 0.8 0.6 0.6 0.6 0.4 0.8 0.2 1 Walking robot 0.2 0.2 0.4 0.4 0.8 0.2 0.2 1 0 1 0 Figure 2| (A & B). Creating the behavior-performance map: A user reduces a high-dimensional search space to a low-dimensional behavior space by defining dimensions along which behaviors vary. In simulation, the high-dimensional space is then automatically searched to find a high-performing behavior at each point in the low-dimensional behavior space, creating a “behavior-performance” map of the performance potential of each location in the low-dimensional space. In our hexapod robot experiments, the behavior space is six-dimensional: the portion of time that each leg is in contact with the ground. The confidence regarding the accuracy of the predicted performance for each behavior in the behavior-performance map is initially low because no tests on the physical robot have been conducted. (C & D) Adaptation Step: After damage, the robot selects a promising behavior, tests it, updates the predicted performance of that behavior in the behavior-performance map, and sets a high confidence on this performance prediction. The predicted performances of nearby behaviors–and confidence in those predictions–are likely to be similar to the tested behavior and are thus updated accordingly. This select/test/update loop is repeated until a tested behavior on the physical robot performs better than 90% of the best predicted performance in the behavior-performance map, a value that can decrease with each test (Extended Data Fig. 1). The algorithm that selects which behavior to test next balances between choosing the behavior with the highest predicted performance and behaviors that are different from those tested so far. Overall, the Intelligent Trial and Error approach presented here rapidly locates which types of behaviors are least affected by the damage to find an effective, compensatory behavior. predicts large areas of high performance. During adaptation, these areas disappear because the behaviors do not work well on the damaged robot. Intelligent Trial and Error quickly identifies one of the few, remaining, high-performance behaviors (Fig. 4 and Extended Data Fig. 5 and 6). The same damage recovery approach can be applied to any robot, such as a robotic arm. We tested 14 different damage conditions with a planar, 8-joint robotic arm (Fig. 3D-F and Extended Data Fig. 7). The behavior-performance map’s behavioral dimensions are the x, y position of the end-effector and the performance measure is minimizing the variance of the 8 specified motor angles (Supplementary Methods). During adaptation, performance is measured as distance to the target. Like with the hexapod robot, our approach discovers a compensatory behavior in less than 2 minutes, usually in less than 30 seconds, and with fewer than 10 trials (Fig. 3F and Extended Data Fig. 7). While natural animals do not use the specific algorithm we present, there are parallels between Intelligent Trial and Error and animal learning. Like animals, our robot does not have a predefined strategy for how to cope with every possible damage condition: in the face of a new injury, it exploits its intuitions about how its body works to experiment with different behaviors to find what works best. Also like animals24 , Intelligent Trial and Error allows the quick identification of working behaviors with a few, diverse tests instead of trying behaviors at random or trying small modifications to the best behavior found so far. Additionally, the Bayesian optimization procedure followed by our robot appears similar to the technique employed by humans when they optimize an unknown function23 , and there is strong evidence that animal brains learn probability distributions, combine them with prior knowledge, and act as Bayesian optimizers25,26 . An additional parallel is that Intelligent Trial and Error primes the robot for creativity during a motionless period, after which Cully, Clune, Tarapore, and Mouret. 2015 the generated ideas are tested. This process is reminiscent of the finding that some animals start the day with new ideas that they may quickly disregard after experimenting with them27 , and more generally, that sleep improves creativity on cognitive tasks28 . A final parallel is that the simulator and Gaussian process components of Intelligent Trial and Error are two forms of predictive models, which are known to exist in animals29,12 . All told, we have shown that combining pieces of nature’s algorithm, even if differently assembled, moves robots more towards animals by endowing them with the ability to rapidly adapt to unforeseen circumstances. Supplementary Information and methods the end of this document. are appended at Acknowledgments. Thanks to Luigi Tedesco, Stéphane Doncieux, Nicolas Bredeche, Shimon Whiteson, Roberto Calandra, Jacques Droulez, Pierre Bessière, Florian Lesaint, Charles Thurat, Serena Ivaldi, Jingyu Li, Joost Huizinga, Roby Velez, Henok Mengistu, Tim Clune, and Anh Nguyen for helpful feedback and discussions. Thanks to Michael Brashier for the photo of the three-legged dog. This work has been funded by the ANR Creadapt project (ANR12-JS03-0009), the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement number 637972), and a Direction Géneérale de l’Armement (DGA) scholarship to A.C. Author Contributions A.C. and J.-B. M designed the study. A.C. and D.T. performed the experiments. A.C., J.-B. M, D.T. and J.C. discussed additional experiments, analyzed the results, and wrote the paper. arXiv preprint | 3 C1 C2 B Walking Speed (m/s) 0.4 0.35 0.3 0.25 0.2 0.15 C3 C4 0.1 0.05 C 6 5 4 C1 C3 0 Adaptation Time and Number of Trials C6 Trials C5 C3 C4 C5 C6 3 2 1 C1 C2 C1 C2 Dim 6 Initial Map Post-Adaptation Map 100% Dim 4 Dim 2 60% Dim 2 Dim 4 Dim 5 C3 80% Dim 1 Dim 3 C1 Dim 5 Dim 3 Dim 1 C3 C4 C5 C6 Figure 3| (A) Conditions tested on the physical hexapod robot. C1: The undamaged robot. C2: One leg is shortened by half. C3: One leg is unpowered. C4: One leg is missing. C5: Two legs are missing. C6: A temporary, makeshift repair to the tip of one leg. (B) Performance after adaptation. Box plots represent Intelligent Trial and Error. The central mark is the median, the edges of the box are the 25th and 75th percentiles, the whiskers extend to the most extreme data points not considered outliers, and outliers are plotted individually. Yellow stars represent the performance of the handmade reference tripod gait (Supplementary Methods). Conditions C1-C6 are tested 5 times each for 8 independently created behavior-performance maps with the “duty factor” behavior description (i.e. 40 experiments per damage condition, Supplementary Methods). Damage conditions C1 and C3 are also tested 5 times each for 8 independently created behavior-performance maps with the “body orientation” behavior description (Supplementary Methods). (C) Time and number of trials required to adapt. Box plots represent Intelligent Trial and Error. (D) Robotic arm experiment. The 8-joint, planar robot has to drop a ball into a bin. (E) Example conditions tested on the physical robotic arm. C1: One joint is stuck at 45 degrees. C2: One joint has a permanent 45-degree offset. C3: One broken and one offset joint. A total of 14 conditions were tested (Extended Data Fig. 7). (F) Time and number of trials required to reach within 5 cm of the bin center. Each condition is tested with 15 independently created behavior-performance maps. 40% Dim 6 <20% Proportion of the maximum expected performance A Figure 4| An example behavior-performance map. This map stores high-performing behaviors at each point in a six-dimensional behavior space. Each dimension is the portion of time that each leg is in contact with the ground. The behavioral space is discretized at five values for each dimension (0; 0.25; 0.5; 0.75; 1). Each colored pixel represents the highest-performing behavior discovered during map creation at that point in the behavior space. The matrices visualize the six-dimensional behavioral space in two dimensions according to the legend in the top-left. The behavior-performance map is created with a simulated robot (bottom left) in the Open Dynamics Engine physics simulator (http://www.ode.org). The left matrix is a pre-adaptation map produced by the map creation algorithm. During adaptation, the map is updated as tests are conducted (in this case, in the damage condition where the robot is missing one leg: Fig. 3A:C4). The right matrix shows the state of the map after a compensatory behavior is discovered. The arrows and white circles represent the order in which behaviors were tested on the physical robot. The red circle is the final, discovered, compensatory behavior. Amongst other areas, high-performing behaviors can be found for the damaged robot in the first two columns of the third dimension. These columns represent behaviors that least use the central-left leg, which is the leg that is missing. Cully, Clune, Tarapore, and Mouret. 2015 arXiv preprint | 4 Author information Correspondence and requests for materials should be addressed to J.-B. M. (email: [email protected]). 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. J. G. Bellingham and K. Rajan. “Robotics in remote and hostile environments.” In: Science 318.5853 (Nov. 2007), pp. 1098–102. ISSN: 1095-9203. DOI : 10.1126/science.1146230. D. R. Yoerger. “Underwater robotics”. In: Springer handbook of robotics. Springer, 2008, pp. 987–1008. E. Broadbent, R. Stafford, and B. MacDonald. “Acceptance of healthcare robots for the older population: review and future directions”. In: International Journal of Social Robotics 1.4 (2009), pp. 319–330. K. Sanderson. “Mars rover Spirit (2003-10)”. In: Nature 463.7281 (2010), p. 600. J. Carlson and R. R. Murphy. “How UGVs physically fail in the field”. In: IEEE Transactions on Robotics 21.3 (2005), pp. 423–437. M. Blanke and J. Schröder. Diagnosis and fault-tolerant control. Springer, 2006. B. Siciliano and O. Khatib. Springer handbook of robotics. Springer, 2008. R. R. Murphy. “Trial by fire [rescue robots]”. In: Robotics & Automation Magazine, IEEE 11.3 (2004), pp. 50–61. K. Nagatani, S. Kiribayashi, Y. Okada, K. Otake, K. Yoshida, S. Tadokoro, T. Nishimura, T. Yoshida, E. Koyanagi, M. Fukushima, and S. Kawatsuma. “Emergency response to the nuclear accident at the Fukushima Daiichi Nuclear Power Plants using mobile rescue robots”. In: Journal of Field Robotics 30.1 (2013), pp. 44–63. S. Thrun, M. Montemerlo, H. Dahlkamp, D. Stavens, A. Aron, J. Diebel, P. Fong, J. Gale, M. Halpenny, G. Hoffmann, et al. “Stanley: The robot that won the DARPA Grand Challenge”. In: Journal of field Robotics 23.9 (2006), pp. 661–692. V. Verma, G. Gordon, R. Simmons, and S. Thrun. “Real-time fault diagnosis”. In: Robotics & Automation Magazine 11.2 (2004), pp. 56–66. J. Bongard, V. Zykov, and H. Lipson. “Resilient machines through continuous self-modeling”. In: Science 314.5802 (2006), pp. 1118–1121. W. G. Fenton, T. M. McGinnity, and L. P. Maguire. “Fault diagnosis of electronic systems using intelligent techniques: a review”. In: IEEE Transactions on Systems, Man, and Cybernetics, Part C: Applications and Reviews 31.3 (2001), pp. 269–281. J. Kluger and J. Lovell. Apollo 13. Mariner Books, 2006. ISBN: 9780618619580. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 5 S. L. Jarvis, D. R. Worley, S. M. Hogy, A. E Hill, K. K. Haussler, and R. F. Reiser II. “Kinematic and kinetic analysis of dogs during trotting after amputation of a thoracic limb”. In: American journal of veterinary research 74.9 (2013), pp. 1155–1163. A Fuchs, B Goldner, I Nolte, and N Schilling. “Ground reaction force adaptations to tripedal locomotion in dogs.” In: Veterinary journal 201.3 (Sept. 2014), pp. 307–15. ISSN: 1532-2971. DOI: 10.1016/j.tvjl.2014.05.012. J. Kober, J. A. Bagnell, and J. Peters. “Reinforcement learning in robotics: a survey”. In: The International Journal of Robotics Research 32.11 (2013), pp. 1238–1274. DOI: 10.1177/0278364913495721. B. D. Argall, S. Chernova, M. Veloso, and B. Browning. “A survey of robot learning from demonstration”. In: Robotics and autonomous systems 57.5 (2009), pp. 469–483. E. Thelen. “Motor development: a new synthesis”. In: American psychologist (1995), pp. 79–95. M. Santello. “Postural hand synergies for tool use”. In: The Journal of Neuroscience 18.23 (1998), pp. 10105–10115. C. E. Rasmussen and C. K. I. Williams. Gaussian processes for machine learning. MIT Press, 2006. ISBN: 0-262-18253-X. J. Mockus. Bayesian approach to global optimization: theory and applications. Kluwer Academic, 2013. A. Borji and L. Itti. “Bayesian optimization explains human active search”. In: Advances in Neural Information Processing Systems 26 (NIPS). 2013, pp. 55–63. S. Benson-Amram and K. E. Holekamp. “Innovative problem solving by wild spotted hyenas”. In: Proceedings of the Royal Society B: Biological Sciences 279.1744 (2012), pp. 4087–4095. A. Pouget, J. M. Beck, W. J. Ma, and P. E. Latham. “Probabilistic brains: knowns and unknowns”. In: Nature neuroscience 16.9 (2013), pp. 1170– 1178. K. P. Körding and D. M. Wolpert. “Bayesian integration in sensorimotor learning”. In: Nature 427.6971 (2004), pp. 244–247. S. Derégnaucourt, P. P. Mitra, O. Fehér, C. Pytte, and O. Tchernichovski. “How sleep affects the developmental learning of bird song”. In: Nature 433.7027 (2005), pp. 710–716. U. Wagner, S. Gais, H. Haider, R. Verleger, and J. Born. “Sleep inspires insight”. In: Nature 427.6972 (2004), pp. 352–355. M. Ito. “Control of mental activities by internal models in the cerebellum”. In: Nature Reviews Neuroscience 9.4 (2008), pp. 304–313. 1 Methods Notations • c: Parameters of a controller (vector) • x: A location in a discrete behavioral space (i.e. a type of behavior) (vector) • χ: A location in a discrete behavioral space that has been tested on the physical robot (vector) • P: Behavior-performance map (stores performance) (associative table) • C: Behavior-performance map (stores controllers) (associative table) • P(x): Max performance yet encountered at x (scalar) • C(x): Controller currently stored in x (vector) • χ1:t : All previously tested behavioral descriptors at time t (vector of vectors) • P1:t : Performance in reality of all the candidate solutions tested on the robot up to time t (vector) • P(χ1:t ): Performance in the behavior-performance map for all the candidate solutions tested on the robot up to time t (vector) • f (): Performance function (unknown by the algorithm) (function) 2 • σnoise : Observation noise (a user-specified parameter) (scalar) • k(x, x): Kernel function (see section “kernel function”) (function) • K: Kernel matrix (matrix) • k: Kernel vector [k(x, χ1 ), k(x, χ2 ), ..., k(x, χt )] (vector) • µt (x): Predicted performance for x (i.e. the mean of the Gaussian process) (function) • σt2 (x): Standard deviation for x in the Gaussian process (function) 1.1 Intelligent Trial and Error algorithm (IT&E) The Intelligent Trial and Error Algorithm consists of two major steps (Extended Data Fig. 1): the behavior-performance map creation step and the adaptation step (while here we focus on damage recovery, Intelligent Trial and Error can search for any type of required adaptation, such as learning an initial gait for an undamaged robot, adapting to new environments, etc.). The behavior-performance map creation step is accomplished via a new algorithm introduced in this paper called multi-dimensional archive of phenotypic elites (MAP-Elites), which is explained in the next section. The adaptation step is accomplished via a second new algorithm introduced in this paper called the mapbased Bayesian optimization algorithm (M-BOA), which is explained in the “Adaptation Step” section below. 1.2 Behavior-performance map creation (via the MAP-Elites algorithm) The behavior-performance map is created by a new algorithm we introduce in this paper called the multi-dimensional archive of phenotypic elites (MAP-Elites) algorithm. MAP-Elites searches for the highest-performing solution for each point in a userdefined space: the user chooses the dimensions of the space that they are interested in seeing variation in. For example, when designing robots, the user may be interested in seeing the highestperforming solution at each point in a two-dimensional space where one axis is the weight of the robot and the other axis is the height of the robot. Alternatively, a user may wish to see weight vs. cost, or see solutions throughout a 3D space of weight vs. cost vs. height. Any dimension that can vary could be chosen by the user. There is no limit on the number of dimensions that can be chosen, although it becomes computationally more expensive to Cully, Clune, Tarapore, and Mouret. 2015 fill the behavior-performance map and store it as the number of dimensions increases. It also becomes more difficult to visualize the results. We refer to this user-defined space as the “behavior space”, because usually the dimensions of variation measure behavioral characteristics. Note that the behavioral space can refer to other aspects of the solution (as in this example, where the dimensions of variation are physical properties of a robot such as its height and weight). If the behavior descriptors and the parameters of the controller are the same (i.e. if there is only one possible solution/genome/parameter set/policy/description for each location in the behavioral space), then creating the behaviorperformance map is straightforward: one simply needs to simulate the solution at each location in the behavior space and record the performance. However, if it is not known a priori how to produce a controller/parameter set/description that will end up in a specific location in the behavior space (i.e. if the parameter space is of higher dimension than the behavioral space: e.g., in our example, if there are many different robot designs of a specific weight, height, and cost, or if it is unknown how to make a description that will produce a robot with a specific weight, height, and cost), then MAP-Elites is beneficial. It will efficiently search for the highest-performing solution at each point of the low-dimensional behavioral space. It is more efficient than a random sampling of the search space because high-performing solutions are often similar in many ways, such that randomly altering a high-performing solution of one type can produce a highperforming solution of a different type (see Extended Data Fig. 10 and Supplementary Experiment S4). For this reason, searching for high-performing solutions of all types simultaneously is much quicker than separately searching for each type. For example, to generate a lightweight, high-performing robot design, it tends to be more effective and efficient to modify an existing design of a light robot rather than randomly generate new designs from scratch or launch a separate search process for each new type of design. MAP-Elites begins by generating a set of random candidate solutions. It then evaluates the performance of each solution and records where that solution is located in the behavior space (e.g. if the dimensions of the behavior space are the height and weight, it records the height and weight of each robot in addition to its performance). For each solution, if its performance is better than the current solution at that location in the behavior-performance map, then it is added to the behavior-performance map, replacing the solution in that location. In other words, it is only kept if it is the best of that type of solution, where “type” is defined as a location in the behavior space. There is thus only one solution kept at each location in the behavior space (keeping more could be beneficial, but for computational reasons we only keep one). If no solution is present in the behavior-performance map at that location, then the newly generated candidate solution is added at that location. Once this initialization step is finished, Map-Elites enters a loop that is similar to stochastic, population-based, optimization algorithms, such as evolutionary algorithms30 : the solutions that are in the behavior-performance map form a population that is improved by random variation and selection. In each generation, the algorithm picks a solution at random via a uniform distribution, meaning that each solution has an equal chance of being chosen. A copy of the selected solution is then randomly mutated to change it in some way, its performance is evaluated, its location in the behavioral space is determined, and it is kept if it outperforms the current occupant at that point in the behavior space (note that mutated solutions may end up in different behavior space locations than their “parents”). This process is repeated until a stopping criterion is met (e.g. after a fixed amount of time has expired). In our experiments, we stopped each MAP-Elites run after 40 million iterations. Because MAP-Elites is a stochastic arXiv preprint | 6 A Behavior-Performance B Online adaptation on the robot Evaluation in simulation Random Replace if selection best so far of this from Repertoire behavior type B1 Expected performance Uncertainty Performance threshold Uncertainty Actual performance (unknown) Behavioral descriptor Performance A2 Lowered performance threshold B2 Updated expectations Behavioral descriptor Stop because a solution is above the performance threshold Behavioral descriptor B4 B4 Evaluation on the damaged robot Evaluation on the damaged robot Current best solution for this behavior type Previously encountered solutions (not stored) B3 Performance Random parameter variation Performance A1 Performance Map Generation Behavioral descriptor Behavior-Performance Map Extended Data Figure 1 | An overview of the Intelligent Trial and Error Algorithm. (A) Behavior-performance map creation. After being initialized with random controllers, the behavioral map (A2), which stores the highest-performing controller found so far of each behavior type, is improved by repeating the process depicted in (A1) until newly generated controllers are rarely good enough to be added to the map (here, after 40 million evaluations). This step, which occurs in simulation, is computationally expensive, but only needs to be performed once per robot (or robot design) prior to deployment. In our experiments, creating one map involved 40 million iterations of (A1), which lasted roughly two weeks on one multi-core computer (Supplementary Methods, section “Running time”). (B) Adaptation. (B1) Each behavior from the behaviorperformance map has an expected performance based on its performance in simulation (dark green line) and an estimate of uncertainty regarding this predicted performance (light green band). The actual performance on the now-damaged robot (black dashed line) is unknown to the algorithm. A behavior is selected to try on the damaged robot. This selection is made by balancing exploitation—trying behaviors expected to perform well— and exploration—trying behaviors whose performance is uncertain (Methods, section “acquisition function”). Because all points initially have equal, maximal uncertainty, the first point chosen is that with the highest expected performance. Once this behavior is tested on the physical robot (B4), the performance predicted for that behavior is set to its actual performance, the uncertainty regarding that prediction is lowered, and the predictions for, and uncertainties about, nearby controllers are also updated (according to a Gaussian process model, see Methods, section “kernel function”), the results of which can be seen in (B2). The process is then repeated until performance on the damaged robot is 90% or greater of the maximum expected performance for any behavior (B3). This performance threshold (orange dashed line) lowers as the maximum expected performance (the highest point on the dark green line) is lowered, which occurs when physical tests on the robot underperform expectations, as occurred in (B2). search process, each resultant behavior-performance map can be different, both in terms of the number of locations in the behavioral space for which a candidate is found, and in terms of the performance of the candidate in each location. The pseudo-code of the algorithm is available in Supplementary Figure 8. More details and experiments about MAP-Elites are available in (Mouret and Clune, 2015)31 . 1.3 Adaptation step (via M-BOA: the map-based Bayesian optimization algorithm) The adaptation step is accomplished via a Bayesian optimization algorithm seeded with a behavior-performance map. We call this approach a map-based Bayesian optimization algorithm, or MBOA. Bayesian optimization is a model-based, black-box optimization algorithm that is tailored for very expensive objective functions (a.k.a. cost functions)32,33,22,34,35,23 . As a black-box optimization algorithm, Bayesian optimization searches for the maximum of an unknown objective function from which samples can be obtained (e.g., by measuring the performance of a robot). Like all model-based optimization algorithms (e.g. surrogate-based algorithms36,37,38 , kriging39 , or DACE40,41 ), Bayesian optimization creates a model of the objective function with a regression method, uses this model to select the next point to acquire, then updates the model, etc. It is called Bayesian because, in its general formulation22 , this algorithm chooses the next point by computing a posterior distribution of the objective function using the likelihood of the data already acquired and a prior on the type of function. Here we use Gaussian process regression to find a model21 , which is a common choice for Bayesian optimization42,35,33,32 . Gaussian processes are particularly interesting for regression because they not only model the cost function, but also the uncer- Cully, Clune, Tarapore, and Mouret. 2015 tainty associated with each prediction. For a cost function f , usually unknown, a Gaussian process defines the probability distribution of the possible values f (x) for each point x. These probability distributions are Gaussian, and are therefore defined by a mean (µ) and a standard deviation (σ). However, µ and σ can be different for each x; we therefore define a probability distribution over functions: P (f (x)|x) = N (µ(x), σ 2 (x)) (1) where N denotes the standard normal distribution. To estimate µ(x) and σ(x), we need to fit the Gaussian process to the data. To do so, we assume that each observation f (χ) is a sample from a normal distribution. If we have a data set made of several observations, that is, f (χ1 ), f (χ2 ), ..., f (χt ), then the vector [f (χ1 ), f (χ2 ), ..., f (χt )] is a sample from a multivariate normal distribution, which is defined by a mean vector and a covariance matrix. A Gaussian process is therefore a generalization of a n-variate normal distribution, where n is the number of observations. The covariance matrix is what relates one observation to another: two observations that correspond to nearby values of χ1 and χ2 are likely to be correlated (this is a prior assumption based on the fact that functions tend to be smooth, and is injected into the algorithm via a prior on the likelihood of functions), two observations that correspond to distant values of χ1 and χ2 should not influence each other (i.e. their distributions are not correlated). Put differently, the covariance matrix represents that distant samples are almost uncorrelated and nearby samples are strongly correlated. This covariance matrix is defined via a kernel function, called k(χ1 , χ2 ), which is usually based on the Euclidean distance between χ1 and χ2 (see the “kernel function” sub-section below). Given a set of observations P1:t = f (χ1:t ) and a sampling 2 noise σnoise (which is a user-specified parameter), the Gaussian arXiv preprint | 7 A 0.3 Variants using MAP-Elites Performance (m / s) 0.25 0.2 0.15 0.1 Variants not using MAP-Elites 0.05 0 50 B 100 C After 17 trials 0.4 0.35 0.35 Performance (m / s) 0.4 0.3 0.25 0.2 0.15 Intelligent Trial and Error Variant 1 Variant 2 Variant 3 Variant 4 Variant 5 4 Variants 5 0 Tr Int ia e l a lli nd ge n Er 11t ro r Tr Int ia e l a lli nd ge n Er 11t ro r Variant 3 Variant 3 Variant 4 Variant 5 0.15 0.05 1 2 Variant 2 0.2 0.05 Behavior-performance map creation MAP-Elites MAP-Elites MAP-Elites MAP-Elites none none Intelligent Trial and Error Variant 1 0.25 0.1 0 p < 10-94 0.3 0.1 1 Performance (m / s) p < 10-67 150 After 150 trials 1 2 3 4 5 1 0 Variants Priors on performance yes none none none none none Search algorithm Bayesian Optimization random search Bayesian optimization policy gradient Bayesian optimization policy gradient equivalent approach Lizotte et al. (2007) Kohl et al. (2004) Extended Data Figure 2 | The contribution of each subcomponent of the Intelligent Trial and Error Algorithm. (A) Adaptation progress versus the number of robot trials. The walking speed achieved with Intelligent Trial and Error and several “knockout” variants that are missing one of the algorithm’s key components. Some variants (4 and 5) correspond to state-of-the-art learning algorithms (policy gradient: Kohl et al. 2004; Bayesian optimization: Lizotte et al. 2007, Tesch et al., 2011, Calandra et al. 2014,). The bold lines represent the medians and the colored areas extend to the 25th and 75th percentiles. (B, C) Adaptation performance after 17 and 150 trials. Shown is the the speed of the compensatory behavior discovered by each algorithm after 17 and 150 evaluations on the robot, respectively. For all panels, data are pooled across six damage conditions (the removal of each of the 6 legs in turn). See Supplementary Experiment S2 for methods and analysis. Cully, Clune, Tarapore, and Mouret. 2015 arXiv preprint | 8 25 0.4 20 0.3 15 0.2 10 0.1 5 0 -20 -10 0 10 20 0 Damaged robot 0.5 25 0.4 20 0.3 15 0.2 10 0.1 5 0 Slope Angle (degree) -20 -10 0 10 20 Adaptation Time (iterations) 0.5 Performance (m / s) B Undamaged robot Adaptation Time (iterations) Performance (m / s) A 0 Slope Angle (degree) Extended Data Figure 3 | The Intelligent Trial and Error Algorithm is robust to environmental changes. Each plot shows both the performance and required adaptation time for Intelligent Trial and Error when the robot must adapt to walk on terrains of different slopes. (A) Adaptation performance on an undamaged robot. On all slope angles, with very few physical trials, the Intelligent Trial and Error Algorithm (pink shaded region) finds fast gaits that outperform the reference gait (black dotted line). (B) Adaptation performance on a damaged robot. The robot is damaged by having each of the six legs removed in six different damage scenarios. Data are pooled from all six of these damage conditions. The median compensatory behavior found via Intelligent Trial and Error outperforms the median reference controller on all slope angles. The middle, black lines represent medians, while the colored areas extend to the 25th and 75th percentiles. In (A), the black dashed line is the performance of a classic tripod gait for reference. In (B), the reference gait is tried in all six damage conditions and its median (black line) and 25th and 75th percentiles (black colored area) are shown. See Supplementary Experiment S3 for methods and analysis. process is computed as follows33,21 : the update equation for the mean function (µt (x), equation 2): P (f (x)|P1:t , x) = N (µt (x), σt2 (x)) µt (x) = P(x) + k| K−1 (P1:t − P(χ1:t )) where : µt (x) = k| K−1 P1:t σt2 (x) = k(x, x) − k| K−1 k   k(χ1 , χ1 ) · · · k(χ1 , χt )   .. .. 2 .. K=  + σnoise I . . .  k(χt , χ1 ) · · · k(χt , χt )  k = k(x, χ1 ) k(x, χ2 ) · · · k(x, χt ) where P(x) is the performance of x according to the simulation and P(χ1:t ) is the performance of all the previous observations, also according to the simulation. Replacing P1:t (eq. 2) by P1:t − P(χ1:t ) (eq. 3) means that the Gaussian process models the difference between the actual performance P1:t and the performance from the behavior-performance map P(χ1:t ). The term P(x) is the prediction of the behavior-performance map. M-BOA therefore starts with the prediction from the behaviorperformance map and corrects it with the Gaussian process. The pseudo-code of the algorithm is available in Supplementary Figure 8. (2) Our implementation of Bayesian optimization uses this Gaussian process model to search for the maximum of the objective function f (x), f (x) being unknown. It selects the next χ to test by selecting the maximum of the acquisition function, which balances exploration – improving the model in the less explored parts of the search space – and exploitation – favoring parts that the models predicts as promising. Here, we use the “Upper Confidence Bound” acquisition function (see the “information acquisition function” section below). Once the observation is made, the algorithm updates the Gaussian process to take the new data into account. In classic Bayesian optimization, the Gaussian process is initialized with a constant mean because it is assumed that all the points of the search space are equally likely to be good. The model is then progressively refined after each observation. The key concept of the map-based Bayesian optimization algorithm (M-BOA) is to use the output of MAP-Elites as a prior for the Bayesian optimization algorithm: thanks to the simulations, we expect some behaviors to perform better than others on the robot. To incorporate this idea into the Bayesian optimization, M-BOA models the difference between the prediction of the behavior-performance map and the actual performance on the real robot, instead of directly modeling the objective function. This idea is incorporated into the Gaussian process by modifying (3) Kernel function The kernel function is the covariance function of the Gaussian process. It defines the influence of a controller’s performance (on the physical robot) on the performance and confidence estimations of not-yet-tested controllers in the behaviorperformance map that are nearby in behavior space to the tested controller (Extended Data Fig. 9a). The Squared Exponential covariance function and the Matérn kernel are the most common kernels for Gaussian processes33,34,21 . Both kernels are variants of the “bell curve”. Here we chose the Matérn kernel because it is more general (it includes the Squared Exponential function as a special case) and because it allows us to control not only the distance at which effects become nearly zero (as a function of parameter ρ, Extended Data Fig. 9a), but also the rate at which distance effects decrease (as a function of parameter ν). The Matérn kernel function is computed as follows43,44 (with ν = 5/2):    √  √ 2 1 ,x2 ) k(x1 , x2 ) = 1 + 5d(xρ1 ,x2 ) + 5d(x3ρ exp − 5d(xρ1 ,x2 ) 2 where d(x1 , x2 ) is the Euclidean distance in behavior space. (4) Cully, Clune, Tarapore, and Mouret. 2015 arXiv preprint | 9 A 0.45 After 17 trials Performance (m / s) 0.4 0.35 0.3 Duty factor 0.25 0.2 0.15 0.1 0.05 B m do (Ya le Ra n w) ) an g Lo w erleg erleg an g le (Pi le Lo w Lo w erleg an g F( GR En 0.45 (R oll tch ) e) tiv Re la F( To t al) n GR tio De via e) (R ela (To er gy er gy En tiv ta en t em lac Di sp Or Du ty ien ta fac tio to n r 0 l) Reference gait After 150 trials Performance (m / s) 0.4 0.35 0.3 Duty factor 0.25 0.2 0.15 0.1 0.05 le do m erle ga ng ng Lo w erleg a Ra n (Ya w) (R oll ) (Pi le ng Lo w ga r-le le tch ) e) tiv Re la GR F( To ta l) GR F( tio n via De ) (R ela tiv e Lo we En er gy rg y En e lac sp Di Or ie nt a tio em en t n r to fac Du ty (To ta l) Reference gait 0 Extended Data Figure 4 | The Intelligent Trial and Error Algorithm is largely robust to alternate choices of behavior descriptors. (A, B) The speed of the compensatory behavior discovered by Intelligent Trial and Error for various choices of behavior descriptors. Performance is plotted after 17 and 150 evaluations in panels A and B, respectively. Experiments were performed on a simulated, damaged hexapod. The damaged robot has each of its six legs removed in six different damage scenarios. Data are pooled across all six damage conditions. As described in Supplementary Experiment S5, the evaluated behavior descriptors characterize the following: (i) Time each leg is in contact with the ground (Duty factor); (ii) Orientation of the robot frame (Orientation); (iii) Instantaneous velocity of the robot (Displacement); (iv) Energy expended by the robot in walking (Energy (Total), Energy (Relative)); (v) Deviation from a straight line (Deviation); (vi) Ground reaction force on each leg (GRF (Total), GRF (Relative)); (vii) The angle of each leg when it touches the ground (Lower-leg angle (Pitch), Lower-leg angle (Roll), Lower-leg angle (Yaw)); and (viii) A random selection without replacement from subcomponents of all the available behavior descriptors (i-vii) (Random). For the hand-designed reference gait (yellow) and the compensatory gaits found by the default duty factor behavior descriptor (green), the bold lines represent the medians and the colored areas extend to the 25th and 75th percentiles of the data. For the other treatments, including the duty factor treatment, black circles represent the median, the colored area extends to the 25th and 75th percentiles of the data, and the colored circles are outliers. See Supplementary Experiment S5 for methods and analysis. Cully, Clune, Tarapore, and Mouret. 2015 arXiv preprint | 10 100% <20% Post-Adaptation Map Dim 6 40% Dim 4 60% Next tested behavior Currently tested behavior Tested behavior Dim 2 80% Proportion of the maximum expected performance Initial Map Dim 5 Dim 3 Dim 1 Dim 1 Dim 2 Dim 4 Dim 3 Dim 5 Dim 6 Extended Data Figure 5 | How the behavior performance map is explored to discover a compensatory behavior (normalized each iteration to highlight the range of remaining performance predictions). Colors represent the performance prediction for each point in the map relative to the highest performing prediction in the map at that step of the process. A black circle indicates the next behavior to be tested on the physical robot. A red circle indicates the behavior that was just tested (note that the performance predictions surrounding it have changed versus the previous panel). Arrows reveal the order that points have been explored. The red circle in the last map is the final, selected, compensatory behavior. In this scenario, the robot loses leg number 3. The six dimensional space is visualized according to the inset legend. Cully, Clune, Tarapore, and Mouret. 2015 arXiv preprint | 11 100% <20% Post-Adaptation Map Dim 6 40% Dim 4 60% Next tested behavior Currently tested behavior Tested behavior Dim 2 80% Proportion of the maximum expected performance Initial Map Dim 5 Dim 3 Dim 1 Dim 1 Dim 2 Dim 4 Dim 3 Dim 5 Dim 6 Extended Data Figure 6 | How the behavior performance map is explored to discover a compensatory behavior (non-normalized to highlight that performance predictions decrease as it is discovered that predictions from the simulated, undamaged robot do not work well on the damaged robot). Colors represent the performance prediction for each point in the map relative to the highest performing prediction in the first map. A black circle indicates the next behavior to be tested on the physical robot. A red circle indicates the behavior that was just tested (note that the performance predictions surrounding it have changed versus the previous panel). Arrows reveal the order that points have been explored. The red circle in the last map in the sequence is the final, selected, compensatory behavior. In this scenario, the robot loses leg number 3. The six dimensional space is visualized according to the inset legend. The data visualized in this figure are identical to those in the previous figure: the difference is simply whether the data are renormalized for each new map in the sequence. Cully, Clune, Tarapore, and Mouret. 2015 arXiv preprint | 12 Extended Data Figure 7 | Intelligent Trial and Error works on a completely different type of robot: supplementary data from the robotic arm experiment. (A) The robotic arm experimental setup. (B) Tested damage conditions. (C) Example of behavior performance maps (colormaps) and behaviors (overlaid arm configurations) obtained with MAP-Elites. Left: A typical behavior-performance map produced by MAP-Elites with 5 example behaviors, where a behavior is described by the angle of each of the 8 joints. The color of each point is a function of its performance, which is defined as having low variance in the joint angles (i.e. a zigzag arm is lower performing than a straighter arm that reaches the same point). Right: Neighboring points in the map tend to have similar behaviors, thanks to the performance function, which would penalize more jagged ways of reaching those points. That neighbors have similar behaviors justifies updating predictions about the performance of nearby behaviors after a testing a single behavior on the real (damaged) robot. (D) Performance vs. trial number for Intelligent Trial and Error and traditional Bayesian optimization. The experiment was conducted on the physical robot, with 15 independent replications for each of the 14 damage conditions. Performance is pooled from all of these 14×15 = 210 experiments. (E) Success for each damage condition. Shown is the success rate for the 15 replications for each damage condition, defined as the percentage of replicates in which the robot reaches within 5 cm of the bin center. (F) Trials required to adapt. Shown is the number of iterations required to reach within 5 cm of the basket center. (G) Accuracy after 30 physical trials. Performance after 30 physical trials for each damage condition (with the stopping criterion disabled). See Supplementary Experiment S1 for methods and analysis. Cully, Clune, Tarapore, and Mouret. 2015 arXiv preprint | 13 procedure I NTELLIGENT T RIAL AND E RROR A LGORITHM (IT&E) Before the mission: C REATE BEHAVIOR - PERFORMANCE MAP ( VIA THE MAP-E LITES ALGORITHM IN SIMULATION ) while In mission do if Significant performance fall then A DAPTATION S TEP ( VIA M-BOA ALGORITHM ) procedure MAP-E LITES A LGORITHM (P ← ∅, C ← ∅) for iter = 1 → I do if iter < 400 then c0 ← random_controller() else c ← random_selection(C) c0 ← random_variation(c) 0 x ←behavioral_descriptor(simu(c0 )) p0 ←performance(simu(c0 )) if P(x0 ) = ∅ or P(x0 ) < p0 then P(x0 ) ← p0 C(x0 ) ← c0 return behavior-performance map (P and C) . Creation of an empty behavior-performance map (empty N-dimensional grid). . Repeat during I iterations (here we choose I = 40 million iterations). . The first 400 controllers are generated randomly. . The next controllers are generated using the map. . Randomly select a controller c in the map. . Create a randomly modified copy of c. . Simulate the controller and record its behavioral descriptor. . Record its performance. . If the cell is empty or if p0 is better than the current stored performance. . Store the performance of c0 in the behavior-performance map according . to its behavioral descriptor x0 . . Associate the controller with its behavioral descriptor. procedure M-BOA (M AP - BASED B AYESIAN O PTIMIZATION A LGORITHM ) ∀x ∈ map: . Initialisation. P (f (x)|x) = N (µ0 (x), σ02 (x)) . Definition of the Gaussian Process. where µ0 (x) = P(x) . Initialize the mean prior from the map. σ02 (x) = k(x, x) . Initialize the variance prior (in the common case, k(x, x) = 1). while max(P1:t ) < α max(µt (x)) do . Iteration loop. χt+1 ← arg maxx (µt (x) + κσt (x)) . Select next test (argmax of acquisition function). Pt+1 ← performance(physical_robot(C(χt+1 ))). . Evaluation of xt+1 on the physical robot. 2 P (f (x)|P1:t+1 , x) = N (µt+1 (x), σt+1 (x)) . Update the Gaussian Process. where µt+1 (x) = P(x) + k| K−1 (P1:t+1 − P(χ1:t+1 )) . Update the mean. 2 σt+1 (x) = k(x, x) − k| K−1 k . Update the variance.   k(χ1 , χ1 ) ··· k(χ1 , χt+1 )   .. .. 2 .. K= . Compute the observations’ correlation matrix.  + σnoise I . . . k(χt+1 , χ1 ) · · · k(χt+1 , χt+1 )   k = k(x, χ1 ) k(x, χ2 ) · · · k(x, χt+1 ) . Compute the x vs. observation correlation vector. Extended Data Figure 8 | Pseudo-code for the Intelligent Trial and Error Algorithm, the MAP-Elites algorithm, and the Map-based Bayesian Optimization Algorithm (M-BOA). Notations are described at the beginning of the methods section. Cully, Clune, Tarapore, and Mouret. 2015 arXiv preprint | 14 Because the model update step directly depends on ρ, it is one of the most critical parameters of the Intelligent Trial and Error Algorithm. We selected its value after extensive experiments in simulation (Extended Data Fig. 9 and section 1.6). Information acquisition function The information acquisition function selects the next solution that will be evaluated on the physical robot. The selection is made by finding the solution that maximizes the acquisition function. This step is another optimization problem, but does not require testing the controller in simulation or reality. In general, for this optimization problem we can derive the exact equation and find a solution with gradient-based optimization45 . For the specific behavior space in the example problem in this paper, though, the discretized search space of the behavior-performance map is small enough that we can exhaustively compute the acquisition value of each solution of the behavior-performance map and then choose the maximum value. Several different acquisition functions exist, such as the probability of improvement, the expected improvement, or the Upper Confidence Bound (UCB)33,42 . We chose UCB because it provided the best results in several previous studies33,42 . The equation for UCB is: xt+1 = arg max(µt (x) + κσt (x)) (5) x where κ is a user-defined parameter that tunes the tradeoff between exploration and exploitation. The acquisition function handles the exploitation/exploration trade-off of the adaptation (M-BOA) step. In the UCB function (Eq. 5), the emphasis on exploitation vs. exploration is explicit and easy to adjust. The UCB function can be seen as the maximum value (argmax) across all solutions of the weighted sum of the expected performance (mean of the Gaussian, µt (x)) and of the uncertainty (standard deviation of the Gaussian, σt (x)) of each solution. This sum is weighted by the κ factor. With a low κ, the algorithm will choose solutions that are expected to be highperforming. Conversely, with a high κ, the algorithm will focus its search on unexplored areas of the search space that may have high-performing solutions. The κ factor enables fine adjustments to the exploitation/exploration trade-off of the M-BOA algorithm (the adaptation step). We describe how we chose the κ value in supplementary methods, section 1.6. Code availability The source code (for GNU/Linux) for the experiments of this paper is available at the following URL: http://pages.isir.upmc.fr/~mouret/code/ite_source_code.tar.gz An implementation of the Bayesian optimization algorithm is freely available on: http://github.com/jbmouret/limbo 1.4 Hexapod Experiment Physical robot The robot is a 6-legged robot with 3 degrees of freedom (DOFs) per leg. Each DOF is actuated by positioncontrolled servos (MX-28 Dynamixel actuators manufactured by Robotis). The first servo controls the horizontal (front-back) orientation of the leg and the two others control its elevation. An RGB-D camera (Xtion, from ASUS) is fixed on top of the robot. Its data are used to estimate the forward displacement of the robot via an RGB-D SLAM algorithm146 from the robot operating system (ROS) framework247 . Simulator The simulator is a dynamic physics simulation of the undamaged 6-legged robot on flat ground (Fig. 4). We weighted each segment of the leg and the body of the real robot, and we 1 2 http://wiki.ros.org/ccny_openni_launch http://www.ros.org Cully, Clune, Tarapore, and Mouret. 2015 used the same masses for the simulations. The simulator is based on the Open Dynamics Engine (ODE, http://www.ode.org). Parametrized controller The angular position of each DOF is governed by a periodic function γ parametrized by its amplitude α, its phase φ, and its duty cycle τ (the duty cycle is the proportion of one period in which the joint is in its higher position). The function is defined with a square signal of frequency 1Hz, with amplitude α, and duty cycle τ . This signal is then smoothed via a Gaussian filter in order to remove sharp transitions, and is then shifted according to the phase φ. Angular positions are sent to the servos every 30 ms. In order to keep the “tibia” of each leg vertical, the control signal of the third servo is the opposite of the second one. Consequently, angles sent to the ith leg are: • γ(t, αi1 , φi1 , τi1 ) for DOF 1 • γ(t, αi2 , φi2 , τi2 ) for DOF 2 • −γ(t, αi2 , φi2 , τi2 ) for DOF 3 This controller makes the robot equivalent to a 12 DOF system, even though 18 motors are controlled. There are 6 parameters for each leg (αi1 , αi2 , φi1 , φi2 , τi1 , τi2 ), therefore each controller is fully described by 36 parameters. Each parameter can have one of these possible values: 0, 0.05, 0.1, ... 0.95, 1. Different values for these 36 parameters can produce numerous different gaits, from purely quadruped gaits to classic tripod gaits. This controller is designed to be simple enough to show the performance of the algorithm in an intuitive setup. Nevertheless, the algorithm will work with any type of controller, including bio-inspired central pattern generators48 and evolved neural networks49,50,51,52 . Reference controller Our reference controller is a classic tripod gait7,53,54,55,56,57 . It involves two tripods: legs 1-4-5 and legs 23-6 (Fig. 4). This controller is designed to always keep the robot balanced on at least one of these tripods. The walking gait is achieved by lifting one tripod, while the other tripod pushes the robot forward (by shifting itself backward). The lifted tripod is then placed forward in order to repeat the cycle with the other tripod. This gait is static, fast, and similar to insect gaits53,58 . Table S1 shows the 36 parameters of the reference controller. The amplitude orientation parameters (αi1 ) are set to 1 to produce the fastest possible gait, while the amplitude elevation parameters (αi2 ) are set to a small value (0.25) to keep the gait stable. The phase elevation parameters (φi2 ) define two tripods: 0.25 for legs 2-3-5; 0.75 for legs 1-4-5. To achieve a cyclic motion of the leg, the phase orientation values (φi1 ) are chosen by subtracting 0.25 to the phase elevation values (φi2 ), plus a 0.5 shift for legs 1-3-5, which are on the left side of the robot. All the duty cycle parameters (τi ) are set to 0.5 so that the motors spend the same proportion of time in their two limit angles. The actual speed of the reference controller is not important for the comparisons made in this paper: it is simply intended as a reference and to show that the performance of classic, hand-programmed gaits tend to fail when damage occurs. Random variation of controller’s parameters Each parameter of the controller has a 5% chance of being changed to any value in the set of possible values, with the new value chosen randomly from a uniform distribution over the possible values. Main Behavioral descriptor (duty factor) The default behavioral descriptor is a 6-dimensional vector that corresponds to the proportion of time that each leg is in contact with the ground (also called duty factor). When a controller is simulated, the algorithm records at each time step (every 30 ms) whether each leg arXiv preprint | 15 Leg number First joint Two last joints αi1 φi 1 τi1 αi2 φi 2 τi2 1 1.00 0.00 0.5 0.25 0.75 0.5 2 1.00 0.00 0.5 0.25 0.25 0.5 3 1.00 0.50 0.5 0.25 0.25 0.5 4 1.00 0.50 0.5 0.25 0.75 0.5 5 1.00 0.00 0.5 0.25 0.75 0.5 6 1.00 0.00 0.5 0.25 0.25 0.5 Extended Data Table 1| Parameters of the reference controller. is in contact with the ground (1: contact, 0: no contact). The result is 6 Boolean time series (Ci for the ith leg). The behavioral descriptor is then computed with the average of each time series:   x=  P t C1 (t) numTimesteps(C1 )  .. .    P C6 (t) numTimesteps(C6 ) (6) t During the generation of the behavior-performance map, the behaviors are stored in the maps’s cells by discretizing each dimension of the behavioral descriptor space with these five values: {0, 0.25, 0.5, 0.75, 1}. During the adaptation phase, the behavioral descriptors are used with their actual values and are thus not discretized. Alternative Behavioral descriptor (orientation) The alternative behavioral descriptor tested on the physical robot (we investigated many other descriptors in simulation: Supplementary Experiment S5) characterizes changes in the angular position of the robot during walking, measured as the proportion of 15ms intervals that each of the pitch, roll and yaw angles of the robot frame are positive (three dimensions) and negative (three additional dimensions):  1 P  U (ΘT (k) − 0.005π) K Pk T  1 (k) − 0.005π)   K  Pk U (−Θ T  1 U (Ψ (k) − 0.005π)  K Pk  x= (7) T 1    K Pk U (−Ψ (k) − 0.005π)  T  1  U (Φ (k) − 0.005π) K Pk T 1 k U (−Φ (k) − 0.005π) K where ΘT (k), ΨT (k) and ΦT (k) denote the pitch, roll and yaw angles, respectively, of the robot torso (hence T ) at the end of interval k, and K denotes the number of 15ms intervals during the 5 seconds of simulated movement (here, K = 5s/0.015s ≈ 334). The unit step function U (·) returns 1 if its argument exceeds 0, and returns 0 otherwise. To discount for insignificant motion around 0 rad, orientation angles are only defined as positive if they exceed 0.5% of π rad. Similarly, orientation angles are only defined as negative if they are less than −0.5% of π rad. Performance function In these experiments, the “mission” of the robot is to go forward as fast as possible. The performance of a controller, which is a set of parameters (section 1.4: Parametrized controller), is defined as how far the robot moves in a pre-specified direction in 5 seconds. During the behavior-performance map creation step, the performance is obtained thanks to the simulation of the robot. All odometry results reported on the physical robot, during the adaptation step, are measured with the embedded simultaneous location and mapping (SLAM) algorithm46 . The accuracy of this algorithm was evaluated by comparing its measurements to ones made by hand on 40 different walking gaits. These experiments revealed that the median measurement produced by the odometry algorithm is reasonably accurate, being just 2.2% lower than the handmade measurement (Extended Data Fig. 9d). Some damage to the robot may make it flip over. In such cases, the visual odometry algorithm returns pathological distance- Cully, Clune, Tarapore, and Mouret. 2015 traveled measurements either several meters backward or forward. To remove these errors, we set all distance-traveled measurements less than zero or greater than two meters to zero. The result of this adjustment is that the algorithm appropriately considers such behaviors low-performing. Additionally, the SLAM algorithm sometimes reports substantially inaccurate low values (outliers on Supplementary Fig. 9d). In these cases the adaptation step algorithm will assume that the behavior is lowperforming and will select another working behavior. Thus, the overall algorithm is not substantially impacted by such infrequent under-measurements of performance. Stopping criterion In addition to guiding the learning process to the most promising area of the search space, the estimated performance of each solution in the map also informs the algorithm of the maximum performance that can be expected on the physical robot. For example, if there is no controller in the map that is expected to perform faster on the real robot than 0.3m/s, it is unlikely that a faster solution exists. This information is used in our algorithm to decide if it is worth continuing to search for a better controller; if the algorithm has already discovered a controller that performs nearly as well as the highest value predicted by the model, we can stop the search. Formally, our stopping criterion is max(P1:t ) ≥ α max(µt (x)), with α = 0.9 x∈P (8) where x is a location in the discrete behavioral space (i.e. a type of behavior) and µt is the predicted performance of this type of behavior. Thus, when one of the tested solutions has a performance of 90% or higher of the maximum expected performance of any behavior in the map, the algorithm terminates. At that point, the highest-performing solution found so far will be the compensatory behavior that the algorithm selects. An alternative way the algorithm can halt is if 20 tests on the physical robot occur without triggering the stopping criterion described in equation 8: this event only occurred in 2 of 240 experiments performed on the physical robot described in the main text. In this case, we selected the highest-performing solution encountered during the search. This user-defined stopping criterion is not strictly necessary, as the algorithm is guaranteed to stop in the worst case after every behavior in the map is tested, but it allows a practical limit on the number of trials performed on the physical robot. Initiating the Adaptation Step The adaptation step is triggered when the performance drops by a certain amount. The simplest way to choose that threshold is to let the user specify it. Automating the selection of this value, and the impact of triggering the algorithm prematurely, is an interesting question for future research in this area. Main parameters of MAP-Elites • parameters in controller: 36 • parameter values (controller): 0 to 1, with 0.05 increments • size of behavioral space: 6 • possible behavioral descriptors: {0, 0.25, 0.5, 0.75, 1} arXiv preprint | 16 • iterations: 40 million Main parameters of M-BOA 2 • σnoise : 0.001 • α: 0.9 • ρ: 0.4 • κ: 0.05 1.5 Robotic Arm Experiment Physical robot The physical robot is a planar robotic arm with 8 degrees of freedom (Extended Data Fig. 7a) and a 1-degreeof-freedom gripper. The robot has to release a ball into a bin (a variant of the classic “pick and place” task in industrial robotics). To assess the position of the gripper, a red cap, placed on top of the gripper, is tracked with a video camera. The visual tracking is achieved with the “cmvision” ROS package, which tracks colored blobs (http://wiki.ros.org/cmvision). The eight joints of the robot are actuated by position-controlled servos manufactured by Dynamixel. To maximize the reliability of the the arm, the type of servo is not the same for all the joints: heavy-duty servos are used near the base of the robot and lighter ones are used for the end of the arm. The first joint, fixed to the base, is moved by two MX-28 servos mounted in parallel. The second joint is moved by an MX-64 servo. The 3 subsequent servos are single MX-28s, and the 3 remaining servos are AX-18s. All the robot’s joints are limited to a motion range of ±π/2. Simulator The generation of the behavior-performance map is made with a simulated robot in the same way as for the hexapod experiment. For consistency with the simulated hexapod experiments, we used the dynamic (as opposed to kinematic) version of the simulator, based on the ODE library. Any joint configuration that resulted in the arm colliding with itself was not added to the map. Parametrized controller The controller defines the target position for each joint. The controller is thus parametrized by eight continuous values from 0 to 1 describing the angle of each joint, which is mapped to the the total motion range of each joint of ±π/2. The 8 joints are activated simultaneously and are driven to their target position by internal PID controllers. We chose this simple control strategy to make the experiments easy to reproduce and highlight the contribution of Intelligent Trial & Error for damage recovery. More advanced control strategies, for instance visual servoing7 , would be more realistic in a industrial environment, but they would have made it hard to analyze the experimental results because both Intelligent Trial & Error and the controller would compensate for damage at the same time. Randomly varying the controller’s parameters Each parameter of the controller (section “Parametrized controller”) has a 12.5% chance of being changed to any value from 0 to 1, with the new value chosen from a polynomial distribution as described on p. 124 of (Deb, 2000), with ηm = 10.0. Behavioral descriptor Because the most important aspect of the robot’s behavior in this task is the final position of the gripper, we use it as the behavioral descriptor:   xg behavioral_descriptor(simu(c)) = (9) yg where (xg , yg ) denotes the position of the gripper once all the joint have reached their target position. Cully, Clune, Tarapore, and Mouret. 2015 The size of the working area of the robot is a rectangle measuring 1.4m × 0.7m. For the behavior-performance map, this rectangle is discretized into a grid composed of 20000 square cells (200 × 100). The robot is 62cm long. Performance function Contrary to the hexapod experiment, for the robotic arm experiment the performance function for the behavior-map creation step and for the adaptation step are different. We did so to demonstrate that the two can be different, and to create a behavior-performance map that would work with arbitrary locations of the target bin. For the behavior-performance map generation step (accomplished via the MAP-Elites algorithm), the performance function captures the idea that all joints should contribute equally to the movement. Specifically, high-performance is defined as minimizing the variance of the joint angles, that is: performance(simu(c))) = − i=7 1X (pi − m)2 8 i=0 (10) where Pi=7pi is the angular position of joint i (in radians) and m = 1 i=0 pi is the mean of the joint angles. This performance func8 tion does not depend on the target. The map is therefore generic: it contains a high-performing controller for each point of the robot’s working space. For the adaptation step (accomplished via the M-BOA algorithm), the behavior-performance map, which is generic to many tasks, is used for a particular task. To do so, the adaption step has a different performance measure than the step that creates the behavior-performance map. For this problem, the predicted performance measure is the Euclidean distance to the target (closer is better). Specifically, for each behavior descriptor x in the map, performance is P(x) = −||x − b|| (11) where b is the (x, y) position of the target bin. Note that the variance of the joint angles, which is used to create the behaviorperformance map, is ignored during the adaptation step. The performance of a controller on the physical robot is minimizing the Euclidean distance between the gripper (as measured with the external camera) and the target bin: performance(physical_robot(C(χ))) = −||xg − b|| (12) where xg is the position of the physical gripper after all joints have reached their final position, b is the position of the bin, and C(χ) is the controller being evaluated (χ is the position in simulation that controller reached). If the gripper reaches a position outside of the working area, then the camera cannot see the marker. In these rare cases, we set the performance of the corresponding controller to a low value (−1 m). For the control experiments with traditional Bayesian optimization on the physical robot (see Supplementary Experiment S1), self-collisions are frequent during adaptation, especially given that we initialize the process with purely random controllers (i.e. random joint angles). While a single self-collision is unlikely to break the robot, hundreds of them can wear out the gearboxes because each servo continues to apply a force for a period of time until it determines that it cannot move. To minimize costs, and because we ran 210 independent runs of the algorithm (14 scenarios × 15 replicates), we first tested each behavior in simulation (taking the damage into account) to check that there were no self-collisions. If we detected a self-collision, the performance for that behavior was set to a low value (−1m). Auto-collisions are much less likely with Intelligent Trial & Error because the behavior-performance map contains only controllers that do not self-collide on the undamaged, simulated arXiv preprint | 17 robot. As a consequence, in the Intelligent Trial & Error experiments we did not simulate controllers before testing them on the physical robot. Stopping criterion Because the robot’s task is to release a ball into a bin, the adaptation step can be stopped when the gripper is above the bin. The bin is circular with a diameter of 10 cm, so we stopped the adaptation step when the red cap is within 5 cm of the center of the bin. Main MAP-Elites parameters for the robotic arm experiment: • parameters in controller: 8 • controller parameter values: 0 to 1 (continuous) • dimensions in the behavioral space: 2 • simulated evaluations to create the behavior-performance map: 20 million Main M-BOA parameters for the robotic arm experiment: 2 • σnoise : 0.03 • ρ: 0.1 • κ: 0.3 1.6 Selection of parameters All of the data reported in this section comes from experiments with the simulated hexapod robot, unless otherwise stated. Selecting the ρ value For ρ between 0.1 and 0.8, we counted the number of behaviors from the map that would be influenced by a single test on the real hexapod robot (we considered a behavior to be influenced when its predicted performance was affected by more than 25% of the magnitude of the update for the tested behavior): with ρ = 0.2, the update process does not affect any neighbor in the map, with ρ = 0.4, it affects 10% of the behaviors, and with ρ = 0.8, it affects 80% of them. Additional values are shown in Extended Data Fig. 9c. The previous paragraph describes tests we conducted to determine the number of behaviors in the map affected by different ρ values, but those experiments do not tell us how different ρ values affect the performance of the algorithm overall. To assess that, we then repeated the experiments from the main paper with a set of possible values (ρ ∈ [0.1 : 0.025 : 0.8]) in simulation (i.e., with a simulated, damaged robot), including testing on 6 separate damage scenarios (each where the robot loses a different leg) with all 8 independently generated replicates of the default 6dimensional behavior-performance map. The algorithm stopped if 20 adaptation iterations passed without success according to the stopping criteria described in the main text and section 1.4: Stopping criterion. The results reveal that median performance decreases only modestly, but significantly, when the value of ρ increases: changing ρ from 0.1 to 0.8 only decreases the median value 12%, from 0.25 m/s to 0.22 m/s (p-value = 9.3 × 10−5 via Matlab’s Wilcoxon ranksum test, Extended Data Fig. 9b). The variance in performance, especially at the extreme low end of the distribution of performance values, is not constant over the range of explored values. Around ρ = 0.3 the minimum performance (Extended Data Fig. 9b, dotted red line) is higher than the minimum performance for more extreme values of ρ. A larger effect of changing ρ is the amount of time required to find a compensatory behavior, which decreases when the value of ρ increases (Extended Data Fig. 9b). With a ρ value lower than 0.25, the algorithm rarely converges in less than the allotted 20 iterations, which occurs because many more tests are required to cover all the promising areas of the search space to know if a higher-performing behavior exists than the best-already-tested. On the other hand, with a high ρ value, the algorithm updates Cully, Clune, Tarapore, and Mouret. 2015 its predictions for the entire search space in a few observations: while fast, this strategy risks missing promising areas of the search space. In light of these data, we chose ρ = 0.4 as the default value for our hexapod experiments because it represents a good tradeoff between a high minimum performance and a low number of physical tests on the robot. The value of ρ for the robotic arm experiment has been chosen with the same method. Selection of the κ value For the hexapod robot experiments, we chose κ = 0.05. This relatively low value emphasizes exploitation over exploration. We chose this value because the exploration of the search space has already been largely performed during the behavior-performance map creation step: the map suggests which areas of the space will be high-performing, and should thus be tested, and which areas of the space are likely unprofitable, and thus should be avoided. For the robotic arm experiments, we chose κ = 0.3, which emphasizes exploration more, because it experimentally leads to better results. 1.7 Running time Computing hardware All computation (on the physical robots and in simulation) was conducted on a hyperthreaded 16-core computer (Intel Xeon E5-2650 2.00GHz with 64Gb of RAM). This computational power is mainly required for the behaviorperformance map creation step. Creating one map for the hexapod experiment took 2 weeks, taking advantage of the fact that map creation can easily be parallelized across multiple cores. Map creation only needs to be performed once per robot (or robot design), and can happen before the robot is deployed. As such, the robot’s onboard computer does not need to be powerful enough to create the map. For the hexapod robot experiment, the most expensive part of adaptation is the Simultaneous Localization And Mapping (SLAM) algorithm46,59,60 , which measures the distance traveled on the physical hexapod robot. It is slow because it processes millions of 3D points per second. It can be run on less powerful computers, but doing so lowers its accuracy because fewer frames per second can be processed. As computers become faster, it should be possible to run high-accuracy SLAM algorithms in low-cost, onboard computers for robots. The rest of the adaptation step needs much less computational power and can easily be run on an onboard computer, such as a smartphone. That is because it takes approximately 15,000 arithmetic operations between two evaluations on the physical robot, which requires less than a second or two on current smartphones. Measuring how long adaptation takes (hexapod robot) The reported time to adapt includes the time required for the computer to select each test and the time to conduct each test on the physical robot. Overall, evaluating a controller on the physical hexapod robot takes about 8 seconds (median 8.03 seconds, 5th and 95th percentiles [7.95; 8.21] seconds): 0.5-1 second to initialize the robot, 5 seconds during which the robot can walk, 0.5-1 second to allow the robot to stabilize before taking the final measurement, and 1-2 seconds to run the SLAM algorithm. Identifying the first controller to test takes 0.03 [0.0216; 0.1277] seconds. The time to select the next controller to test increases depending on the number of previous experiments because the size of the Kernel Matrix (K matrix, see Methods and Extended Data Fig. 8), which is involved in many of the arithmetic operations, grows by one row and one column per test that has been conducted. For example, selecting the second test takes 0.15 [0.13; 0.22] seconds, while the 10th selection takes 0.31 [0.17; 0.34] seconds. arXiv preprint | 18 Covariance kernel output 0.8 0.7 0.4 15 0.3 12.5 10 0.2 7.5 0.15 0.3 0.2 0.1 0.1 0.05 1 0.5 1.5 2 Distance 2.5 Measured performance (m) 90 80 70 60 50 40 30 5 2.5 0 0.1 d Proportion of affected solutions (percent) c100 0.2 0.3 0.4 0.5 ρ parameter 0.6 0.7 0 0.8 2.2 101.4% 100% 97.8% 2 91.7% 1.8 1.6 1.4 1.2 1 20 0.8 10 0 0 17.5 0.25 0.5 0 20 0.35 0.6 0 22.5 0.4 Performance (m / s) 0.9 b 0.45 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Adaptation Time (iterations) 1.0 ρ parameter a 0.2 0.4 0.6 ρ parameter 0.8 0.5 1 1.5 Real performance (m) 2 Extended Data Figure 9 | The effect of changing the algorithm’s parameters. (a) The shape of the Matérn kernel function for different values of the ρ parameter. (b) Performance and required adaptation time obtained for different values of ρ. For each ρ value, the M-BOA algorithm was executed in simulation with 8 independently generated behavior-performance maps and for 6 different damage conditions (each case where one leg is missing). (c) The number of controllers in the map affected by a new observation according to different values of the ρ parameter. (d) The precision of the odometry value. The distances traveled by the physical robot, as measured manually (“real performance”) is compared to the measurements automatically provided by the simultaneous location and mapping (SLAM) algorithm(“measured performance”). The dashed black line indicates the hypothetical case where SLAM measurements are error-free and thus are the same as manual measurements. In (b), (c) and (d), the middle, black lines represent medians and the borders of the shaded areas show the 25th and 75th percentiles. The dotted lines are the minimum and maximum values. The gray bars show the ρ value chosen for the hexapod experiments in the main text. Cully, Clune, Tarapore, and Mouret. 2015 arXiv preprint | 19 2 Supplementary Experiments S1 Additional conditions for the robotic arm Methods We investigated 11 damage conditions on the physical robot in addition to the 3 described in the main text (Fig. 3). We used the same setup as described in the main text (see main text and section 1.5). Extended Data Fig. 7 shows the 14 scenarios. For each of the 14 damage scenarios, we replicated experiments on the physical robot with 15 independently generated behavior-performance maps (210 runs in total). We also replicated control experiments, which consist of traditional Bayesian optimization directly in the original parameter space (i.e. without behavior-performance maps), 15 times for each of the 14 damage conditions (210 runs in total). For both the experimental and control treatments, each experiment involved 30 evaluations on the physical robot (31 if the first trial is counted). In many cases, not all 30 evaluations were required to reach the target, so we report only the number of trials required to reach that goal. Results After running the MAP-Elites algorithm for 20 million evaluations, each of the 15 generated maps contain more than 11, 000 behaviors (11,209 [1,1206; 1,1217] behaviors, Extended Data Fig. 7c). In all the generated maps, the regions of different performance values for behaviors are arranged in concentric shapes resembling cardioids (inverted, heart-shaped curves) that cover the places the robot can reach (Extended Data Fig. 7c). The black line drawn over the shown map corresponds to all the positions of the end-effector for which all the degrees of freedom are set to the same angle (from −π/4 to +π/4), that is, for the theoretically highest achievable performance (i.e. the lowest possible variance in servo angles). The performance of the behaviors tends to decrease the further they are from this optimal line. The adaptation results (Extended Data Fig. 7e) show that the Intelligent trial and error algorithm manages to reach the goal of being less than 5 cm from the center of the bin for all the runs in all the tested scenarios save two (scenarios 11 & 12). For these two scenarios, the algorithm still reaches the target 60% and 80% of the time, respectively. For all the damage conditions, the Intelligent Trial and Error algorithm reaches the target significantly more often than the Bayesian optimization algorithm (p < 10−24 ). Specifically, the median number of iterations to reach the target (Extended Data Fig. 7f) is below 11 iterations (27.5 seconds) for all scenarios except 11 and 12, for which 31 and 20 iterations are required, respectively. When the robot is not able to reach the target, the recorded number of iterations is set to 31, which explains why the median number of iterations for the Bayesian optimization algorithm is equal to 31 for most damage conditions. For all the damage conditions except one (scenario 11), the Intelligent Trial and Error algorithm used fewer trials to reach the target than the traditional Bayesian optimization algorithm. If the robot is allowed to continue its experiment after reaching the 5 cm radius tolerance, for a total of 31 iterations (Extended Data Fig. 7g), it reaches an accuracy around 1 cm for all the damage conditions except the two difficult ones (scenarios 11 and 12). This level of accuracy is never achieved with the classic Bayesian optimization algorithm, whose lowest median accuracy is 2.6cm. Scenarios 11 and 12 appear to challenge the Intelligent Trial and Error algorithm. While in both cases the success rate is improved, though not substantially, in case 11 the median accuracy is actually lower. These results stem from the fact that the difference between the successful pre-damage and post-damage behaviors is so large that the post-damage solutions for both scenarios lie outside of the map. This illustrates a limit of the proposed approach: if the map does not contain a behavior able to cope Cully, Clune, Tarapore, and Mouret. 2015 with the damage, the robot will not be able to adapt. This limit mainly comes from the behavioral descriptor choice: we chose it because of its simplicity, but it does not capture all of the important dimensions of variation of the robot. More sophisticated descriptors are likely to allow the algorithm to cope with such situations. On the other hand, this experiment shows that with a very simple behavioral descriptor, using only the final position of the end-effector, our approach is able to deal with a large variety of different target positions and is significantly faster than the traditional Bayesian optimization approach (Extended Data Fig. 7d, maximum p-value over each time step < 10−16 ), which is the current state of the art technique for direct policy search in robotics32,61,42,17 . 3 Supplementary Experiments S2 The contribution of each subcomponent of the Intelligent Trial and Error Algorithm Methods The Intelligent Trial and Error Algorithm relies on three main concepts: (1) the creation of a behavior-performance map in simulation via the MAP-Elites algorithm, (2) searching this map with a Bayesian optimization algorithm to find behaviors that perform well on the physical robot, and (3) initializing this Bayesian optimization search with the performance predictions obtained via the MAP-Elites algorithm: note that the second step could be performed without the third step by searching through the MAP-Elites-generated behavior-performance map with Bayesian optimization, but having the initial priors uniformly set to the same value. We investigated the contribution of each of these subcomponents by testing five variants of our algorithm : in each of them, we deactivated one of these three subcomponents or replaced it with an alternative algorithm from the literature. We then tested these variants on the hexapod robot. The variants are as follows: • Variant 1 (MAP-Elites in 6 dimensions + random search): evaluates the benefit of searching the map via Bayesian optimization by searching that map with random search instead. Each iteration, a behavior is randomly selected from the map and tested on the robot. The best one is kept. • Variant 2 (MAP-Elites in 6 dimensions + Bayesian optimization, no use of priors): evaluates the contribution of initializing the Gaussian process with the performance predictions of the behavior-performance map. In this variant, the Gaussian process is initialized with a constant mean (the average performance of the map: 0.24 m/s) at each location in the behavior space and a constant variance (the average variance of the map’s performance: 0.005 m2 /s2 ). As is customary, the first few trials (here, 5) of the Bayesian optimization process are selected randomly instead of letting the algorithm choose those points, which is known to improve performance.42 • Variant 3 (MAP-Elites in 6 dimensions + policy gradient): evaluates the benefit of Bayesian optimization compared to a more classic, local search algorithm17,62 ; there is no obvious way to use priors in policy gradient algorithms. • Variant 4 (Bayesian optimization in the original parameter space of 36 dimensions): evaluates the contribution of using a map in a lower-dimensional behavioral space. This variant searches directly in the original 36-dimensional parameter space instead of reducing that space to the lowerdimensional (six-dimensional) behavior space. Thus, in this variant no map of behaviors is produced ahead of time: the algorithm searches directly in the original, high-dimensional space. This variant corresponds to one of the best algorithms known to learn locomotion patterns32,42 . In this variant, the Gaussian process is initialized with a constant mean set to arXiv preprint | 20 zero and with a constant variance (0.002m2 /s2 ). As described above, the five first trials are selected from pure random search to prime the Bayesian optimization algorithm42 . • Variant 5 (Policy gradient in the original parameter space of 36 dimensions): a stochastic gradient descent in the original parameter space62 . This approach is a classic reinforcement learning algorithm for locomotion17 and it is a baseline in many papers32 . It was necessary to compare these variants in simulation because doing so on the physical robot would have required months of experiments and would have repeatedly worn out or broken the robot. We modified the simulator from the main experiments (section 1.4: Simulator) to emulate 6 different possible damage conditions, each of which involved removing a different leg. For variants in which MAP-Elites creates a map (variants 1, 2 and 3), we used the same maps from the main experiments (the eight independently generated maps, which were all generated with a simulation of the undamaged robot): In these cases, we launched ten replicates of each variant for each of the eight maps and each of the six damage conditions. There are therefore 10 × 8 × 6 = 480 replicates for each of those variants. For the other variants (4 and 5), we replicated each experiment 80 times for each of the six damage conditions, which also led to 80 × 6 = 480 replicates per variant. In all these simulated experiments, to roughly simulate the distribution of noisy odometry measurements on the real robot, the simulated performance values were randomly perturbed with a multiplicative Gaussian noise centered on 0.95 with a standard deviation of 0.1. We analyze the fastest walking speed achieved with each variant after two different numbers of trials: the first case is after 17 trials, which was the maximum number of iterations used by the Intelligent Trial and Error Algorithm, and the second case is after 150 trials, which is approximately the number of trials used in previous work62,32,42 . Results After 17 trials on the robot, Intelligent Trial and Error significantly outperforms all the variants (Extended Data Fig. 2b, p < 10−67 , Intelligent Trial and Error performance: 0.26 [0.20; 0.33] m/s), demonstrating that the three main components of the algorithm are needed to quickly find high-performing behaviors. Among the investigated variants, the random search in the map performs the best (Variant 1: 0.21 [0.16; 0.27] m/s), followed by Bayesian optimization in the map (Variant 2: 0.20 [0.13; 0.25] m/s), and policy gradient in the map (Variant 3: 0.13 [0; 0.23] m/s). Variants that search directly in the parameter space did not find any working behavior (Variant 4, Bayesian optimization: 0.04m/s, [0.01; 0.09]; Variant 5, policy gradient: 0.02 [0; 0.06] m/s). There are two reasons that random search performs better than one might expect. First, the map only contains high-performing solutions, which are the result of the intense search of the MAPElites algorithm (40 million evaluations in simulation). The map thus already contains high-performing gaits of nearly every possible type. Therefore, this variant is not testing random controllers, but is randomly selecting high-performing solutions. Second, Bayesian optimization and policy gradient are not designed for such a low number of trials: without the priors on performance predictions introduced in the Intelligent Trial and Error Algorithm, the Bayesian optimization process needs to learn the overall shape of the search space to model it with a Gaussian process. 17 trials is too low a number to effectively sample six dimensions (for a uniform sampling with only two possible values in each dimension, 26 = 64 trials are needed; for five possible values, 56 = 15, 625 samples are needed). As a consequence, with this low number of trials, the Gaussian process that models the performance function is not informed enough to effectively guide the search. For the policy gradient algorithm, a gradient is estimated by empirically measuring the partial derivative of the Cully, Clune, Tarapore, and Mouret. 2015 performance function in each dimension. To do so, following62 , the policy gradient algorithm performs 15 trials at each iteration. Consequently, when only 17 trials are allowed, it iterates only once. In addition, policy gradient is a local optimization algorithm that highly depends on the starting point (which is here chosen randomly), as illustrated by the high variability in the performance achieved with this variant (Extended Data Fig. 2b). The issues faced by Bayesian optimization and policy gradient are exacerbated when the algorithms search directly in the original, 36-dimensional parameter space instead of the lowerdimensional (six-dimensional) behavior space of the map. As mentioned previously, no working controller was found in the two variants directly searching in this high-dimensional space. Overall, the analysis after 17 trials shows that: • The most critical component of the Intelligent Trial and Error Algorithm is the MAP-Elites algorithm, which reduces the search space and produces a map of high-performing behaviors in that space: p < 5 × 10−50 when comparing variants searching in the behavior-performance map space vs. variants that search in the original, higher-dimensional space of motor parameters. • Bayesian optimization critically improves the search, but only when it is initialized with the performance obtained in simulation during the behavior-performance map creation step (with initialization: 0.26 [0.20; 0.33] m/s, without initialization: 0.20 [0.13; 0.25] m/s, p = 10−96 ). To check whether these variants might perform better if allowed the number of evaluations typically given to previous state-ofthe-art algorithms62,32,42 , we continued the experiments until 150 trials on the robot were conducted (Extended Data Fig. 2c). Although the results for all the variants improved, Intelligent Trial and Error still outperforms all them (p < 10−94 ; Intelligent Trial and Error: 0.31 [0.26; 0.37] m/s, random search: 0.26 [0.22; 0.30] m/s, Bayesian optimization: 0.25 [0.18; 0.31] m/s, policy search: 0.23 [0.19, 0.29] m/s). These results are consistent with the previously published results62,32,42,17 , which optimize in 4 to 10 dimensions in a few hundred trials. Nevertheless, when MAP-Elites is not used, i.e. when we run these algorithms in the original 36 dimensions for 150 evaluations, Bayesian optimization and policy gradient both perform much worse (Bayesian optimization: 0.08 [0.05; 0.12]; policy gradient: 0.06 [0.01; 0.12] m/s). These results shows that MAP-Elites is a powerful method to reduce the dimensionality of a search space for learning algorithms, in addition to providing helpful priors about the search space that speed up Bayesian optimization. Overall, these additional experiments demonstrate that each of the three main components of the Intelligent Trial and Error Algorithm substantially improves performance. The results also indicate that Intelligent Trial and Error significantly outperforms previous algorithms for both damage recovery63,12,64,65,66 and gait learning67,62,68,48,69,32,61,42,17,49 , and can therefore be considered the state of the art. 4 Supplementary Experiments S3 Robustness to environmental changes Methods The map creation algorithm (MAP-Elites) uses an undamaged robot on flat terrain. The main experiments show that this algorithm provides useful priors for damage recovery on a flat terrain. In these supplementary experiments, we evaluated, in simulation, if the map created on flat terrain also provides a useful starting point for discovering gaits for sloped terrains. We first evaluated the effect slopes have on undamaged robots (Extended Data Fig. 3a). We launched 10 replicates for each of the eight maps and each one-degree increment between −20◦ and +20◦ , for a total of 10 × 8 × 41 = 3280 experiments. As in arXiv preprint | 21 Supplementary Experiments S2, to roughly simulate the distribution of noisy odometry measurements on the real robot, we perturbed performance values with a multiplicative Gaussian noise centered on 0.95 with a standard deviation of 0.1. Results The results show that, when the slope is negative (descending), the Intelligent Trial and Error approach finds fast gaits in fewer than than 3 trials. For reference, a hand-designed, classic, tripod gait (section 1.4) falls on slopes below −15◦ degrees. When the slope is positive (ascent), Intelligent Trial and Error finds slower behaviors, as is expected, but even above 10◦ the gait learned by Intelligent Trial and Error outperforms the reference gait on flat ground. Overall, for every slope angle, the controller found by Intelligent Trial and Error is faster than the hand-designed reference controller. We further evaluated damage recovery performance for these same slopes with the same setup as Experiments S2 (6 damage conditions). We launched 10 replicates for each damage condition, for 8 independently generated behavior-performance maps, and each two-degree increment between −20◦ and +20◦ degrees. There are therefore 480 replicates for each two-degree increment between −20◦ and +20◦ , for a total of 480 × 21 = 10080 experiments. Intelligent Trial and Error is not critically affected by variations of slope between −10◦ and +10◦ (Extended Data Fig. 3b): for these slopes, and for all 6 damage conditions, Intelligent Trial and Error finds fast gaits (above 0.2 m/s) in less than 15 tests on the robot despite the slope. As expected, it finds faster gaits for negative slopes (descent) and slower gaits for positive slopes (ascent). For slopes below −10◦ and above 10◦ , the algorithm performs worse and requires more trials. These results likely are caused by the constraints placed on the controller and the limited sensors on the robot, rather than the inabilities of the algorithm. Specifically, the controller was kept simple to make the science clearer, more intuitive, and more reproducible. Those constraints, of course, prevent it from performing the more complex behaviors necessary to deal with highly sloped terrain. For example, the constraints prevent the robot from keeping its legs vertical on sloped ground, which would substantially reduce slippage. Nevertheless, the median Intelligent Trial and Error compensatory gait still outperforms the median performance of the reference gait on all slope angles. 5 Supplementary Experiments S4 Comparison between MAP-Elites and Random Sampling Methods The MAP-Elites algorithm is a stochastic search algorithm that attempts to fill a discretized map with the highest- Cully, Clune, Tarapore, and Mouret. 2015 performing solution at each point in the map. As explained in the main text, each point in the map represents a different type of behavior, as defined by the behavioral dimension of the map. MAP-Elites generates new candidate points by randomly selecting a location in the map, changing the parameters of the controller that is stored there, and then saving that controller in the appropriate map location if it is better than the current occupant at that location. Intuitively, generating new candidate solutions from the best solutions found so far should be better than generating a multitude of controllers randomly and then keeping the best one found for each location in the map. In this section we report on experiments that confirm that intuition. To understand the advantages of MAP-Elites over random sampling, we compared the two algorithms by generating data with the simulated hexapod. The experiments have the same virtual robot, environment, controller, performance function, and behavioral descriptors as in the main experiments (see Methods). We analyzed the number of cells for which a solution is found (an indication of the diversity of behavior types the algorithms generate), the average performance of behaviors in the map, and the maximum performance discovered. We replicated each experiment 8 times, each of which included 20 million evaluations on the simulated robot. Results The results show that the MAP-Elites algorithm outperforms random sampling on each of these measures (Extended Data Fig. 10). After 20 million evaluations, about 13000 cells (median: 12968, 5th & 95th percentiles: [12892; 13018]) are filled by MAP-Elites (about 83% percent of the map), whereas random sampling only filled approximately 8600 (8624 [8566; 8641]) cells (about 55% percent of the map) (Extended Data Fig. 10a). The difference between the two algorithms is large and appears early (Extended Data Fig. 10a); after only 1 million evaluations, MAPElites filled 10670 [10511; 10775] cells (68% of the map), whereas random sampling filled 5928 [5882; 5966] cells (38% of the map). The solutions discovered by MAP-Elites are not only more numerous, but also outperform those found by random sampling (Extended Data Fig. 10b): with MAP-Elites, after 20 million evaluations the average performance of filled cells is 0.22 [0.22; 0.23] m/s, whereas it is 0.06 [0.06; 0.06] m/s with random sampling, which is similar to the performance obtained with the reference controller on a damaged robot (Fig. 3). These two results demonstrate that MAP-Elites is a much better algorithm than random sampling to find a map of the diverse, “elite” performers in a search space. In addition, MAP-Elites is a better optimization algorithm, as measured by the performance of the best single solution produced. The performance of the best solution in the map after 20 million evaluations is 0.40 [0.39;0.41] m/s with MAP-Elites, compared to 0.21 [0.20; 0.22] m/s with random sampling. arXiv preprint | 22 a 14,000 Number of behaviors 12,000 10,000 8,000 6,000 4,000 2,000 0 0 5 15 10 20 Number of evaluations × 10 6 b 0.5 Mean performance (m/s) c Maximum performance (m/s) 0.5 0.45 0.45 0.4 0.4 0.35 0.35 0.3 0.3 0.25 0.25 0.2 0.2 0.15 0.15 0.1 0.1 0.05 0.05 0 0 5 15 10 20 Number of evaluations × 10 6 MAP-Elites 0 0 5 15 10 20 Number of evaluations x 106 Random Sampling Extended Data Figure 10 | Comparing MAP-Elites and random sampling for generating behavior-performance maps. (a) The number of points in the map for which a behavior is discovered. (b) The mean performance of the behaviors in the map. (c) The maximum performance of the behaviors in the map. For all these figures, the middle lines represent medians over 8 independently generated maps and the shaded regions extend to the 25th and 75th percentiles, even for (a) and (b), where the variance of the distribution is so small that it is difficult to see. See Supplementary Experiment S4 for methods and analysis. 6 Supplementary Experiments S5 Alternative behavioral descriptors Methods To create a map with MAP-Elites, one has to define the dimensions of the behavioral space, i.e. the behavioral descriptors. The main experiments show that using a predefined behavioral descriptor (the proportion of time that each leg of a hexapod robot is in contact with the ground, i.e. the duty factor) creates a map that provides useful priors for damage recovery. This section describes how we tested (in simulation) how performance is affected by alternative behavioral descriptors, including descriptors that have a different number of dimensions. We also evaluated how performance is affected if the behavioral descriptors are randomly selected from a large list of potential descriptors. This test simulates the algorithm’s performance if the behavioral descriptors are chosen without insight into the problem domain. The behavioral descriptors we tested are as follows: 1. Duty factor (6-dimensional): This descriptor is the default one from the main experiment. It corresponds to the proportion of time each leg is in contact with the ground:   x=  P t C1 (t) numTimesteps .. . P C6 (t) numTimesteps     (13) t where Ci (t) denotes the Boolean value of whether leg i is in contact with the ground at time t (1: contact, 0: no contact). 2. Orientation (6-dimensional): This behavioral descriptor characterizes changes in the angular position of the robot during walking, measured as the proportion of 15ms intervals that each of the pitch, roll and yaw angles of the robot frame are positive (three dimensions) and negative (three additional dimensions):  1 P  U (ΘT (k) − 0.005π) K Pk T 1  (k) − 0.005π)   K  Pk U (−Θ T  1 U (Ψ (k) − 0.005π)  k K   P x= 1 (14) T   K Pk U (−Ψ (k) − 0.005π)  T  1  U (Φ (k) − 0.005π) K Pk T 1 k U (−Φ (k) − 0.005π) K Cully, Clune, Tarapore, and Mouret. 2015 where ΘT (k), ΨT (k) and ΦT (k) denote the pitch, roll and yaw angles, respectively, of the robot torso (hence T ) at the end of interval k, and K denotes the number of 15ms intervals during the 5 seconds of simulated movement (here, K = 5s/0.015s ≈ 334). The unit step function U (·) returns 1 if its argument exceeds 0, and returns 0 otherwise. To discount for insignificant motion around 0 rad, orientation angles are only defined as positive if they exceed 0.5% of π rad. Similarly, orientation angles are only defined as negative if they are less than −0.5% of π rad. 3. Displacement (6-dimensional): This behavioral descriptor characterizes changes in the postion of the robot during walking. It is measured as the proportion of 15ms intervals that the robot is positively or negatively displaced along each of the x, y, and z axes:  1 P  U (∆x(k) − 0.001) K Pk 1    K Pk U (−∆x(k) − 0.001)   1  U (∆y(k) − 0.001) k K  x= (15)  1 P U (−∆y(k) − 0.001)   K  Pk 1  U (∆z(k) − 0.001)  K Pk 1 k U (−∆z(k) − 0.001) K where [∆x(k), ∆y(k), ∆z(k)] denote the linear displacement in meters of the robot during interval k, and K denotes the number of 15ms intervals during 5 seconds of simulated movement (here, K = 5s/0.015s ≈ 334). The unit step function U (·) returns a value of 1 if its argument exceeds 0, and returns a value of 0 otherwise. To ignore insignificant motion, linear displacements are defined to be positive if they exceed 1mm, and are defined to be negative if they are less than −1mm. arXiv preprint | 23 4. Total energy expended per leg (6-dimensional): This behavioral descriptor captures the total amount of energy expended to move each leg during 5 seconds of movement:  E  1 ME .. .  x=     E6 ME (16) where Ei denotes the energy utilized by leg i of the robot during 5 seconds of simulated movement, measured in N.m.rad. ME is the maximum amount of energy available according to the servo model of the simulator, which for 5 seconds is 100 N.m.rad. 5. Relative energy expended per leg (6-dimensional): This behavioral descriptor captures the amount of energy expended to move each leg relative to the energy expended by all the legs during 5 seconds of simulated movement:   E1 P i=1..6 Ei .. .  x=     E6 P i=1..6 (17) Ei where Ei denotes the energy utilized by leg i of the robot during 5 seconds of simulated movement, measured in N.m.rad. 6. Deviation (3-dimensional): This descriptor captures the range of deviation of the center of the robot frame versus the expected location of the robot if it traveled in a straight line at a constant speed.   0.95 max(x(t))−min(x(t))  0.2   y y ×t)−min(y(t)− final ×t) 0.95 max(y(t)− final 5 5        t    x=   t t t 0.2   0.95 max(z(t))−min(z(t)) t (18) where Fi denotes the ground reaction force (GRF) each leg i generates, averaged over 5 seconds of simulated movement. MF is the maximum such force that each leg can apply, which is 10N. 8. Relative ground reaction force per leg (6-dimensional): This behavioral descriptor corresponds to the amount of force each leg applies to the ground, relative to that of all the legs:   F1 P i=1..6 0.2 where [x(t), y(t), z(t)] denote the position of robot’s center at time t, and [xfinal , yfinal , zfinal ] denote its final position after 5 seconds. The robot’s task is to move along the y-axis. Its starting position is (0,0,0). The deviation along the x and z axes is computed as the maximum difference in the robot’s position in those dimensions at any point during 5 seconds. For the y axis, yfinal corresponds to the average speed of the robot (the 5 distance covered divided by total time), therefore yfinal × t is 5 the expected position at timestep t if the robot was moving at constant speed. The deviation from the y axis is computed with respect to this “theoretical” position. To obtain values in the range [0,1], the final behavioral descriptors are multiplied by 0.95 and then divided by 20 cm (these values were determined empirically). 7. Total ground reaction force per leg (6-dimensional): This behavioral descriptor corresponds to the amount of force each leg applies to the ground, measured as a fraction the total possible amount of force that a leg could apply to the ground. Specifically, the measurement is  F  1    F6 P i=1..6 (20) Fi where Fi denotes the ground reaction force (GRF) each leg i generates, averaged over 5 seconds of simulated movement. 9. Lower-leg pitch angle (6-dimensional): This descriptor captures the pitch angle for the lower-leg with respect to the ground (in a global coordinate frame), averaged over 5 seconds:  P L    x=  t Θ1 (t) π×N1 .. . ΘL 6 (t) π×N6 P t     (21) where ΘL i (t) is the pitch angle of lower-leg i (hence the L in ΘL i ) when it is in contact with the ground at time t, and Ni is the number of time-steps for which lower-leg i touches the ground. The foot pitch angles are in range [0, π] (as the leg can not penetrate the ground) and normalized to [0, 1]. 10. Lower-leg roll angle (6-dimensional): This descriptor captures the roll angle for the lower-leg with respect to the ground (in a global coordinate frame), averaged over 5 seconds:  P L    x=  t Fi .. .  x=  t Ψ1 (t) π×N1 .. . L t Ψ6 (t) π×N6 P     (22) L where ΨL i (t) is the roll angle of lower-leg i (hence L in Ψi ) when it is in contact with the ground at time t, and Ni is the number of time-steps for which lower-leg i touches the ground. The foot roll angles are in range [0, π] (as the leg can not penetrate the ground) and normalized to [0, 1]. 11. Lower-leg yaw angle (6-dimensional): This descriptor captures the yaw angle for the lower-leg with respect to the ground (in a global coordinate frame), averaged over 5 seconds:  P L  Φ1 (t)+π 2π×N1 t   x=  .. . P L t Φ6 (t)+π 2π×N6     (23) L where ΦL i (t) is the yaw angle of lower-leg i (hence L in Φi ) when it is in contact with the ground at time t,and Ni is the number of time-steps for which lower-leg i touches the ground. The foot yaw angles are in range [−π, π] and are normalized to [0, 1]. MF  x=  .. . F6 MF    Cully, Clune, Tarapore, and Mouret. 2015 (19) arXiv preprint | 24 12. Random (6-dimensional): The random behavioral descriptor differs from the other intentionally chosen descriptors in that it does not consist of one type of knowledge, but is instead randomly selected as a subset of variables from the previously described 11 behavioral descriptors. This descriptor is intended to simulate a situation in which one has little expectation for which behavioral descriptor will perform well, so one quickly picks a few different descriptor dimensions without consideration or experimentation. Instead of generating one such list in this fashion, we randomly sample from a large set to find the average performance of this approach over many different possible choices. For the random descriptor, each of the 6-dimensions is selected at random (without replacement) from the 1×3+10× 6 = 63 available behavior descriptor dimensions described in the previous 11 descriptors (1 of the above descriptors is three-dimensional and the other 10 are six-dimensional):   x=  R1 ..  .  R6 (24) where Ri denotes the ith dimension of the descriptor, randomly selected uniformly and without replacement from the 63 available dimensions in behavior descriptors 1-11. It was necessary to compare these behavioral descriptors in simulation because doing so on the physical robot would have required months of experiments and would have repeatedly worn out or broken the robot. We modified the simulator from the main experiments (section 1.4) to emulate 6 different possible damage conditions, each of which involved removing a different leg. The MAP-Elites algorithm, run for 3 million iterations, was used to create the behavior-performance maps for each of the behavioral descriptors (using a simulation of the undamaged robot). During the generation of the behavior-performance maps, the behaviors were stored in the map’s cells by discretizing each dimension of the behavioral descriptor space with these five values: {0, 0.25, 0.5, 0.75, 1} for the 6-dimensional behavioral descriptors, and with twenty equidistant values between [0, 1] for the 3-dimensional behavioral descriptor. During the adaptation phase, the behaviors were used with their actual values and thus not discretized. We independently generated eight maps for each of the 11 intentionally chosen behavioral descriptors. Twenty independently generated maps were generated for the random behavioral descriptor. We launched ten replicates of each descriptor for each of the maps (eight for intentionally chosen behavioral descriptors and twenty for random behavioral descriptor) and each of the six damage conditions. There are therefore 10×8×6 = 480 replicates for each of the intentionally chosen descriptors, and 10 × 20 × 6 = 1200 replicates for the random descriptor. In all these simulated experiments, to roughly simulate the distribution of noisy odometry measurements on the real robot, the simulated performance values were randomly perturbed with a multiplicative Gaussian noise centered on 0.95 with a standard deviation of 0.1. We analyze the fastest walking speed achieved with each behavioral descriptor after two different numbers of trials: the first case is after 17 trials, and the second case is after 150 trials. Results The following results include 17 trials on the simulated robot, which was the maximum number of trials required for Intelligent Trial and Error to find a compensatory gait in the Supplementary Experiment S2. The post-adaptation performance Cully, Clune, Tarapore, and Mouret. 2015 achieved with our alternative, intentionally chosen behavioral descriptors (numbers 2-11) was similar to the original duty factor behavioral descriptor (number 1) (Extended Data Fig. 4a). All 11 alternative, intentionally chosen descriptors (numbers 2-11) led to a median performance within 17% of the duty factor descriptor (performance: 0.241 [0.19; 0.29] m/s). The difference in performance was effectively nonexistent with the deviation descriptor (0.241 [0.14; 0.31] m/s), the total GRF descriptor (0.237 [0.15; 0.30] m/s), and the lower-leg roll angle descriptor (0.235 [0.14; 0.31] m/s). The lowest performance was discovered with the relative GRF descriptor (16.7% lower than the duty factor descriptor, 0.204 [0.08; 0.31] m/s). In terms of statistical significance, the performance achieved with the duty factor descriptor was no different from the deviation (p = 0.53) and total GRF (p = 0.29) descriptors. With all the remaining descriptors, the difference in performance was statistically significant (p < 10−3 ), but it did not exceed 0.04m/s. Additionally, the compensatory behaviors discovered with all our 11 alternative, intentionally chosen descriptors were always faster than the reference gait for all damage conditions. To check whether our alternative, intentionally chosen behavioral descriptors lead to better performance if allowed a higher number of evaluations, we extended the experiments to 150 trials on the robot (Extended Data Fig. 4b). After 150 trials, the difference in performance between the duty factor behavioral descriptor (0.277 [0.24; 0.34] m/s) and our alternative behavioral descriptors was further reduced. For all but three alternative, intentionally chosen descriptors (displacement, total GRF and lower-leg yaw angle), the median performance was within 4% of the duty factor descriptor. The difference in performance was at ±3.6% with the orientation (0.274 [0.22; 0.32] m/s), total energy (0.274 [0.19; 0.33] m/s), relative energy (0.273 [0.20; 0.32] m/s), deviation (0.287 [0.21; 0.34] m/s), relative GRF (0.266 [0.15; 0.35] m/s), lower-leg pitch angle (0.271 [0.21; 0.34] m/s) and lowerleg roll angle (0.268 [0.17; 0.34] m/s) descriptors. In the three remaining behavioral descriptors, displacement, total GRF, and lower-leg yaw angle, the performance was 0.264 [0.18; 0.32] m/s, 0.299 [0.25; 0.35] m/s and 0.255 [0.18; 0.32] m/s, respectively (difference at ±7.8% of duty factor descriptor in all three cases). In terms of statistical significance, the performance achieved with the duty factor descriptor was barely statistically significantly different from the deviation descriptor (p = 0.041). In all the remaining descriptors, the performance difference was statistically significant (p < 10−2 ), but no larger than 0.02m/s. Our random behavioral descriptor also performed similarly to the duty factor descriptor. After 17 trials, the performance of M-BOA with the maps generated by the random descriptor was 0.232 [0.14; 0.30] m/s (4.2% lower than the duty factor descriptor performance). While the difference is statistically significant (p < 10−3 ), the difference in performance itself was negligible at 0.01m/s. This difference in performance was further reduced to 3.6% after 150 trials (random descriptor performance: 0.274 [0.21; 0.34] m/s, duty factor description performance: 0.277 [0.24; 0.34] m/s, p = 0.002). Moreover, as with the intentionally chosen behavioral descriptors, the compensatory behavior discovered with the random descriptor was also faster than the reference gait. These experiments show that the selection of the behavioral dimensions is not critical to get good results. Indeed, all tested behavioral descriptors, even those randomly generated, perform well (median > 0.20 m/s after 17 trials). On the other hand, if the robot’s designers have some prior knowledge about which dimensions of variation are likely to reveal different types of behaviors, the algorithm can benefit from this knowledge to further improve results (as with the duty factor descriptor). arXiv preprint | 25 7 Caption for Supplementary Videos 43. Video S1 44. This video can be viewed at: https://youtu.be/T-c17RKh3uE Damage Recovery in Robots via Intelligent Trial and Error. The video shows the Intelligent Trial and Error Algorithm in action with the two robots introduced in this paper: the hexapod robot and the 8 degrees of freedom robotic arm (Fig. 3). The video shows several examples of the different types of behaviors that are produced during the behavior-performance map creation step, from classic hexapod gaits to more unexpected forms of locomotion. Then, it shows how the hexapod robot uses that behavior-performance map to deal with a leg that has lost power (Fig. 3a:C3). Finally, the video illustrates how the Intelligent Trial and Error Algorithm can be applied to the second robot and to different damage conditions. 45. Video S2 52. This video can be viewed at: http://youtu.be/ycLspV5lXK8 A Behavior-Performance Map Containing Many Different Types of Walking Gaits. In the behavior-performance map creation step, the MAP-Elites algorithm produces a collection of different types of walking gaits. The video shows several examples of the different types of behaviors that are produced, from classic hexapod gaits to more unexpected forms of locomotion. 53. Supplementary References 57. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. A. E. Eiben and J. E. Smith. Introduction to evolutionary computing. Springer, 2003. J.-B. Mouret and J. Clune. “Illuminating search spaces by mapping elites”. In: arXiv preprint arXiv:1504.04909 (2015). D. J. Lizotte, T. Wang, M. H. Bowling, and D. Schuurmans. “Automatic Gait Optimization with Gaussian Process Regression.” In: Proceedings of the the International Joint Conference on Artificial Intelligence (IJCAI). Vol. 7. 2007, pp. 944–949. E. Brochu, V. M. Cora, and N. De Freitas. “A tutorial on Bayesian optimization of expensive cost functions, with application to active user modeling and hierarchical reinforcement learning”. In: arXiv preprint arXiv:1012.2599 (2010). J. Snoek, H. Larochelle, and R. P. Adams. “Practical Bayesian Optimization of Machine Learning Algorithms”. In: Advances in Neural Information Processing Systems 25 (NIPS). 2012, pp. 2951–2959. T. L. Griffiths, C. Lucas, J. Williams, and M. L. Kalish. “Modeling human function learning with Gaussian processes”. In: Advances in Neural Information Processing Systems 21 (NIPS). 2009, pp. 553–560. A. J. Booker, J. E. Dennis Jr, P. D. Frank, D. B. Serafini, V. Torczon, and M. W. Trosset. “A rigorous framework for optimization of expensive functions by surrogates”. In: Structural optimization 17.1 (1999), pp. 1–13. A. I. J. Forrester and A. J. Keane. “Recent advances in surrogate-based optimization”. In: Progress in Aerospace Sciences 45.1 (2009), pp. 50–79. Y Jin. “Surrogate-assisted evolutionary computation: Recent advances and future challenges”. In: Swarm and Evolutionary Computation 1.2 (2011), pp. 61–70. T. W. Simpson, T. M. Mauery, J. J. Korte, and F. Mistree. “Comparison of response surface and kriging models for multidisciplinary design optimization”. In: American Institute of Aeronautics and Astronautics 98.7 (1998), pp. 1–16. D. R. Jones, M. Schonlau, and W. J. Welch. “Efficient global optimization of expensive black-box functions”. In: Journal of Global optimization 13.4 (1998), pp. 455–492. J. Sacks, W. J. Welch, T. J. Mitchell, H. P. Wynn, et al. “Design and analysis of computer experiments”. In: Statistical science 4.4 (1989), pp. 409–423. R. Calandra, A. Seyfarth, J. Peters, and M. P. Deisenroth. “An experimental comparison of Bayesian optimization for bipedal locomotion”. In: Proceedings of the IEEE International Conference on Robotics and Automation (ICRA). 2014. Cully, Clune, Tarapore, and Mouret. 2015 46. 47. 48. 49. 50. 51. 54. 55. 56. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. B. Matérn et al. “Spatial variation. Stochastic models and their application to some problems in forest surveys and other sampling investigations.” In: Meddelanden fran statens Skogsforskningsinstitut 49.5 (1960). M. L. Stein. Interpolation of spatial data: some theory for kriging. Springer, 1999. A. V. Fiacco and G. P. McCormick. Nonlinear programming: sequential unconstrained minimization techniques. Vol. 4. Siam, 1990. I. Dryanovski, R. G. Valenti, and J. Xiao. “Fast visual odometry and mapping from rgb-d data”. In: Proceedings of the IEEE International Conference on Robotics and Automation (ICRA). IEEE. 2013, pp. 2305–2310. M. Quigley, K. Conley, B. P. Gerkey, J. Faust, T. Foote, J. Leibs, R. Wheeler, and A. Y. Ng. “ROS: an open-source Robot Operating System”. In: Proceedings of ICRA’s workshop on Open Source Software. 2009. A. Sproewitz, R. Moeckel, J. Maye, and A. Ijspeert. “Learning to move in modular robots using central pattern generators and online optimization”. In: The International Journal of Robotics Research 27.3-4 (2008), pp. 423–443. J. Yosinski, J. Clune, D. Hidalgo, S. Nguyen, J. Zagal, and H. Lipson. “Evolving Robot Gaits in Hardware: the HyperNEAT Generative Encoding Vs. Parameter Optimization”. In: Proceedings of ECAL (2011), pp. 890–897. J. Clune, K. Stanley, R. Pennock, and C. Ofria. “On the performance of indirect encoding across the continuum of regularity”. In: IEEE Transactions on Evolutionary Computation 15.3 (2011), pp. 346–367. J. Clune, B. Beckmann, C. Ofria, and R. Pennock. “Evolving coordinated quadruped gaits with the HyperNEAT generative encoding”. In: Proceedings of the IEEE Congress on Evolutionary Computation. 2009, pp. 2764–2771. S. Lee, J. Yosinski, K. Glette, H. Lipson, and J. Clune. “Evolving gaits for physical robots with the HyperNEAT generative encoding: the benefits of simulation.” In: Applications of Evolutionary Computing. Springer, 2013. D. Wilson. “Insect walking”. In: Annual Review of Entomology 11.1 (1966), pp. 103–122. U. Saranli, M. Buehler, and D. Koditschek. “Rhex: A simple and highly mobile hexapod robot”. In: The International Journal of Robotics Research 20.7 (2001), pp. 616–631. J. Schmitz, J. Dean, T. Kindermann, M. Schumm, and H. Cruse. “A biologically inspired controller for hexapod walking: simple solutions by exploiting physical properties”. In: The biological bulletin 200.2 (2001), pp. 195–200. X. Ding, Z. Wang, A. Rovetta, and J. Zhu. “Locomotion analysis of hexapod robot”. In: Proceedings of Conference on Climbing and Walking Robots (CLAWAR) (2010), pp. 291–310. S. Steingrube, M. Timme, F. Wörgötter, and P. Manoonpong. “Self-organized adaptation of a simple neural circuit enables complex robot behaviour”. In: Nature Physics 6.3 (2010), pp. 224–230. F. Delcomyn. “The Locomotion of the Cockroach Pariplaneta americana”. In: Journal of Experimental Biology 54.2 (1971), pp. 443–452. S. Thrun, W. Burgard, D. Fox, et al. Probabilistic robotics. MIT press Cambridge, 2005. M. G. Dissanayake, P. Newman, S. Clark, H. F. Durrant-Whyte, and M. Csorba. “A solution to the simultaneous localization and map building (SLAM) problem”. In: IEEE Transactions on Robotics and Automation 17.3 (2001), pp. 229–241. M. Tesch, J. Schneider, and H. Choset. “Using response surfaces and expected improvement to optimize snake robot gait parameters”. In: Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE. 2011, pp. 1069–1074. N. Kohl and P. Stone. “Policy gradient reinforcement learning for fast quadrupedal locomotion”. In: Proceedings of the IEEE International Conference on Robotics and Automation (ICRA). Vol. 3. IEEE. 2004, pp. 2619– 2624. M. S. Erden and K. Leblebicioğlu. “Free gait generation with reinforcement learning for a six-legged robot”. In: Robotics and Autonomous Systems 56.3 (2008), pp. 199–212. D. J. Christensen, J. C. Larsen, and K. Stoy. “Fault-tolerant gait learning and morphology optimization of a polymorphic walking robot”. In: Evolving Systems 5 (2014), pp. 21–32. S. Mahdavi and P. Bentley. “Innately adaptive robotics through embodied evolution”. In: Autonomous Robots 20.2 (2006), pp. 149–163. S. Koos, A. Cully, and J.-B. Mouret. “Fast damage recovery in robotics with the T-resilience algorithm”. In: The International Journal of Robotics Research 32.14 (2013), pp. 1700–1723. G. Hornby, S. Takamura, T. Yamamoto, and M. Fujita. “Autonomous evolution of dynamic gaits with two quadruped robots”. In: IEEE Transactions on Robotics 21.3 (2005), pp. 402–410. T. Barfoot, E. Earon, and G. D’Eleuterio. “Experiments in learning distributed control for a hexapod robot”. In: Robotics and Autonomous Systems 54.10 (2006), pp. 864–872. S. Koos, J.-B. Mouret, and S. Doncieux. “The transferability approach: Crossing the reality gap in evolutionary robotics”. In: IEEE Transactions on Evolutionary Computation 17.1 (2013), pp. 122–145. arXiv preprint | 26
9cs.NE
arXiv:1707.09561v1 [stat.ME] 29 Jul 2017 Fine-Gray Competing Risks Model with High-Dimensional Covariates: Estimation and Inference Jue Hou1 , Jelena Bradic1 and Ronghui Xu1,2 1 Department of Mathematics, 2 Department of Family Medicine and Public Health, University of California San Diego, CA 92093 Abstract The purpose of this paper is to construct confidence intervals for the regression coefficients in the Fine-Gray model for competing risks data with random censoring, where the number of covariates can be larger than the sample size. Despite strong motivation from biostatistics applications, highdimensional Fine-Gray model has attracted relatively little attention among the methodological or theoretical literatures. We fill in this blank by proposing first a consistent regularized estimator and then the confidence intervals based on the one-step bias-correcting estimator. We are able to generalize the partial likelihood approach for the Fine-Gray model under random censoring despite many technical difficulties. We lay down a methodological and theoretical framework for the one-step bias-correcting estimator with the partial likelihood, which does not have independent and identically distributed entries. We also handle for our theory the approximation error from the inverse probability weighting (IPW), proposing novel concentration results for time dependent processes. In addition to the theoretical results and algorithms, we present extensive numerical experiments and an application to a study of non-cancer mortality among prostate cancer patients using the linked Medicare-SEER data. Key words: p-values, survival analysis, high-dimensional inference, one-step estimator. 1 1 Introduction In many applications, we want to use data to draw inferences about the effect of a covariate on a specific event in the presence of many risks competing for the same event: Examples include medical studies about the effect of a medical treatment on health outcomes of chronically ill patients, studies of the unemployment duration and transitions to employment and labor market programs, or evaluations of environmental determinants of child mortality, and studying internetwork competition risk “strategic gridlock,” a study of how firms use alliances to respond to the alliance networks of their rivals. Historically, most datasets have been too small to meaningfully explore heterogeneity between different risk factors beyond considering cause-specific models only. Recently, however, there has been an explosion of experimental data sets where it is potentially feasible to develop estimates in full competing risks models. High-dimensional regression has attracted increased interest in statistical analysis and has provided a useful tool in modern biomedical, ecological, astrophysical or economics data pertaining to setting where the number of parameters is greater than the number of samples (see Bühlmann and Van De Geer (2011) for an overview). Regularized methods (Fan and Li, 2001; Tibshirani, 1996) provide straightforward interpretation of resulting estimators, while allowing the number of covariates to be exponentially larger than the sample size. Considerable research effort has been devoted to developing regularized methods to handle various regression settings (Ravikumar et al., 2010; Belloni and Chernozhukov, 2011; Obozinski et al., 2011; Meinshausen and Bühlmann, 2006; Basu and Michailidis, 2015; Cho and Fryzlewicz, 2015) including those for time-to-event data (Sun et al. (2014); Bradic et al. (2011); Gaı̈ffas and Guilloux (2012); Johnson (2008); Lemler (2013); Bradic and Song (2015); Huang et al. (2006); among others). However, regression has not been studied for the competing risks setting, a scenario frequently encountered in practice, with random censoring and high-dimensional covariates. As an illustration project of how information contained in patients’ electronic medical records can be harvested for the purposes of precision medicine, we consider the data set linking the Surveillance, Epidemiology and End Results (SEER) Program database of the National Cancer Institute with the federal health insurance program Medicare database for prostate cancer patients of age 65 or older. When restricted to patients diagnosed between 2004 and 2009 in the SEERMedicare database, after excluding additional patients with missing clinical records, we have a total of 57,011 patients who have information available on 7 relevant clinical variables (age, PSA, Gleason score, AJCC stage, and AJCC stage T, N, M, respectively), 5 demographical variables (race, marital status, metro, registry and year of diagnosis), plus 8971 binary insurance claim codes. Until December 2013 (end of follow-up for this data) there were a total of 1,247 deaths due to cancer, and 5,221 deaths unrelated to cancer. The goal of this paper is to develop methodology for the Fine-Gray model with many more covariates than the number of events, which can be used to appropriately and flexibly evaluate the impact of risk factors on the non-cancer versus cancer mortality, as reflected in these clinical, demographical, and claim codes which indirectly describe events that occur in surgical procedures, hospitalization and outpatient activities. This understanding will then in turn aid in clinical decision making as to whether pursue aggressive cancer-directed therapy in the presence of pre-existing comorbidities. There are at least three major challenges for addressing high-dimensional competing risks regression under the Fine-Gray model, which directly associates the risk factors with the cumulative incidence function of a particular cause. The structure of the score function related to the partial likelihood is a rather subtle issue with many of the unobserved factors ruining a simple martin- 2 gale representation. Shrinkage effects of the regularization methods add on a bias component that is non-ignorable when inference is of primary interest. Additionally, the structure of the sample information matrix prevents naive usage of Wald or Score type hypothesis testing methods, and basing theoretical analysis on the Hessian matrix renders problematic implementations. Attempts to tackle inference problems for the Fine-Gray regression model along this direction would also undesirably require implementation of bootstrap ideas. However, given the known problems of the bootstrap in high-dimensional setting this approach is no longer applicable. Development of highdimensional inferential methods for competing risks data and the Fine-Gray model in particular, may have been hampered by these considerations. In this paper we propose a natural and sensible formulation of inferential procedure for this highdimensional competing risks regression. In the first step we formulate a l1 regularized estimator of the high-dimensional parameter of interest and derive its finite-sample properties where the interplay between the sparsity and ambient dimension and the sample size can be directly seen. We note that our results are easily generalizable to a number of sparsity-inducing penalties but due to simplicity of presentation we present details only for the l1 regularization. In the second step we formulate a bias-corrected estimator by formulating a new pragmatic estimator of the variance that allows broad dependence structures within the Fine-Gray model. This step compensates for the potential bias of the first estimator that arises due to variables that may be weakly correlated with the other risk scaues but are important due to their correlation with the risk of interest. We find that the second step estimator is effective at capturing strong signal as well as weak signals. This combination leads to an effective and simple-to-implement estimator in the Fine-Gray model with many features. 1.1 Setup and notation For subject i = 1, ..., n in a study, let Ti be the event time, with the event type or cause i (we use the two words interchangeably in the following). Under the Fina-Gray model that we consider below, without loss of generality we assume that the event type of interest is ‘1’, and we code all the other event types as ‘2’ without further specifying them. In the presence of a potential right-censoring time Ci , the observed time is Xi = Ti ∧ Ci . The type of the event i is also observed if δi = I(Ti ≤ Ci ) = 1. Let Zi (·) be the vector of covariates that are possibly time-dependent. Assume that the observed data {(Xi , δi , δi i , Zi (·))} are independent and identically distributed (i.i.d.) for i = 1, . . . , n. Since the cumulative incidence function (CIF) is often the quantity of interest that can be estimated from data, Fine and Gray (1999) proposed a proportional subdistribution hazards model where the CIF  Z t  β o> Zi (u) 1 F1 (t|Zi (·)) = Pr(Ti ≤ t, i = 1|Zi (·)) = 1 − exp − e h0 (u)du , (1) 0 the p-dimensional coefficient β o is the unknown parameter of interest, and h10 (t) is the baseline subdistribution hazard. Under model (1) the corresponding subdistribution hazard h1 (t|Zi (·)) = o> h10 (t)eβ Zi (t) . Throughout the paper, we assume that there exists so = |supp(β o )| for some so ≤ n. Note that if we define an improper random variable Ti1 = Ti I(i = 1) + ∞I(i > 1), then the subdistribution hazard can be seen as the conditional hazard of Ti1 given Zi (·). Fine and Gray (1999) proposed to estimate β based on the partial likelihood principle with complete data, i.e. when there is no censoring, and with censoring complete data. i.e. when the censoring times Ci ’s are always observed even if Ci > Ti . For the more general random censoring where Ci > Ti is not 3 observed, inverse probability weighting (IPW) was used to obtain consistent estimating equations for β o . We denote the counting process for type 1 event as Ni1 (t) = I(Ti1 ≤ t) and its observed counterpart as Nio (t) = I(δi i = 1)I(Xi ≤ t). We also denote the counting process for the censoring time as Nic (t) = I(Ci ≤ t). Let Yi (t) = 1 − Ni1 (t−) (note that this is not the ‘at risk’ indicator like under the classic Cox model), and ri (t) = I(Ci ≥ Ti ∧ t). Note that ri (t)Yi (t) = I(t ≤ Xi ) + I(t > Xi )I(δi i > 1) is always observable, even though Yi (t) or ri (t) may not. Let G(t) = Pr(Ci ≥ t) and b be the Kaplan-Meier estimator for G(·). Here we assume that C is independent of T ,  let G(·) and Z. Following the notation of Fine and Gray we call the IPW at-risk process: ωi (t)Yi (t) = ri (t)Yi (t) b G(t) b ∧ Xi ) G(t ; (2) in other words, the weight for subject i is one if t < Xi , zero after being censored or failure due to b b i ) after failure due to other causes. The modified log partial likelihood that cause 1, and G(t)/ G(X gives rise to the weighted score function in Fine and Gray (1999) for β is    n Z t∗  n  X X > m(β) = n−1 β > Zi (t) − log  ωj (t)Yj (t)eβ Zj (t)  dNio (t), (3)  0  i=1 j=1 where t∗ < ∞ is the maximal follow-up time. In the following for a vector v, let v⊗0 = 1, v⊗1 = v and v⊗2 = vv> . We define for l = 0, 1, 2 o n > s(l) (t, β) = E G(t)/G(t ∧ Xi )ri (t)Yi (t)eβ Zi (t) Zi (t)⊗l , µ(t) = s(1) (t, β o )/s(0) (t, β o ), (l) S (t, β) = n −1 n X ωi (t)Yi (t)eβ > Zi (t) Zi (t)⊗l , Z̄(t, β) = S(1) (t, β)/S (0) (t, β). (4) i=1 1.2 Organization of the paper This paper s organized as follows. In Section 2, we provide estimation and inference methodology developed for high-dimensional Fine-Gray model. Bounds for the prediction error of the Lasso estimator is presented in Section 3.1. We also discuss a related result whose rate matches those of linear models (see Theorem 1∗ ). Section 3.2 studies the sampling distribution of a newly develop test statistics while allowing ultra high-dimensionality of the parameter space. We examine our regularized estimator and a one-step bias -correction estimator thorough Numerical Examples in Section 4 and a real data study in Section 5. 2 2.1 Estimation and inference for competing risks with more parameters than samples Regularized estimator A natural estimator to consider is a l1 -regularized estimator, where the particular loss function of interest would be the modified partial log-likelihood as defined in (3). That is, we consider n o b (5) β(λ) = argmin −m(β) + λkβk1 β∈Rp 4 for a suitable choice of the tuning parameter λ > 0. Whenever possible we suppress λ in the b to denote the l1 -regularized estimator. In this paper we quantify nonnotation above and use β asymptotic oracle risk bound for the estimator above while allowing p  n with a minimal set of assumptions. Theoretical studies of this kind is novel, since in the context of competing risks the martingale structures typically utilized in the high-dimensional work are ruined and new techniques needed to be developed. In particular, we show that the inverse probability weighting has a finitesample effect that separates this model from the classic Cox model, for example (see comments after Theorem 1). We also establish that a certain tighter bound can be established whenever the hazard rate is bounded (see Theorem 1∗ ). Finally, results presented therein can easily be broadened to any sparsity encouraging and convex penalty function. 2.2 One-step corrected estimator For the purposes of constructing confidence intervals or testing significance of certain covariates, utilizing a naive regularized estimation as above is not appropriate; for example, construction of confidence intervals for those coefficients that have been shrunk to zero is impossible. On the other b can only be established under restrictive hand, firm guarantees of correct variable selection of β set of assumptions including but not limited to the assumption of minimal signal strength of the true parameter β o (Wasserman and Roeder, 2009; Fan and Lv, 2010; Meinshausen and Yu, 2009) which cannot be verified in practice. Therefore, it is of interest to develop inferential tools that do not depend on such assumptions and are yet able to provide theoretical guarantees of the quality of estimation and/or testing for example. Inspired by the work of Zhang and Zhang (2014) and van de Geer et al. (2014), we propose the one-step bias-correction estimator b := β b +Θ b b ṁ(β), b (6) b is defined in (5), Θ b is an estimator of the “asymptotic” precision matrix Θ to be defined where β b below, and ṁ(β) is the score function, i.e. derivative of the modified log partial likelihood (3) b evaluated at β, n Z t∗ X −1 ṁ(β) = n {Zi (t) − Z̄(t, β)}dNio (t). i=1 0 The above construction of the one-step estimator is inspired by the first order Taylor expansion of ṁ(·), b − m̈(β o )(β b − β o ) ≈ m̈(β o )[β o − {β b +Θ b b b ṁ(β)}] ṁ(β o ) ≈ ṁ(β) = m̈(β o ){β o − b}. (7) The notation ≈ in the above indicates that the equivalence is approximate with the higher order error terms omitted, and the negative Hessian −m̈(β o ) ∈ Rp×p will have its limit denoted as Σ. b and When p ≤ n an inverse of such a Hessian matrix would naturally be a good candidate for Θ −1 with it Θ = Σ. However, when p ≥ n such an inverse does not necessarily exist. Therefore, b such that −m̈(β o )Θ b ≈ Ip with Ip denoting the p × p we aim to find a good candidate matrix, Θ identity matrix. Although the construction here is inspired by the early works under the linear models, the specifics and theoretical analysis remain a challenge. In the following we will elucidate b the construction of Θ. 5 2.3 Construction of the inverse Hessian matrix We start by writing the negative Hessian of the modified log partial likelihood (3): ) ( n Z t∗ X S(2) (t, β) ⊗2 −1 − Z̄(t, β) dNio (t). −m̈(β) = n (0) (t, β) S i=1 0 (8) We define Σ=E "Z 0 t∗ ⊗2 {Zi (t) − µ(t)} # dNio (t) =E "Z t∗ 0 {Zi (t) − #⊗2 µ(t)} dNio (t) . (9) Under regularity conditions to be specified later, we have Σ as the “asymptotic negative Hessian” in the sense that the element-wise maximal norm kΣ + m̈(β)kmax converges to zero in probability. Our goal is to estimate its inverse Σ−1 = Θ = (θ 1 , . . . , θ p )> , where θ j ’s are the rows of Θ. By (9), the positive semi-definite matrix Σ is also the second moment of the random vector Z t∗ Ui = {Zi (t) − µ(t)} dNio (t) (10) 0 with µ(t) defined in (4). The expectation of U i is zero, "Z ∗ t E(U i ) = E 0 {Zi (t) − µ(t)} Yi (t)I(Ci ≥ # t> t)eβ Zi (o) h10 (t)dt = 0. Hence, we may draw inspiration from the works on inverting high-dimensional variance-covariance matrix (Zhou et al., 2011) to estimate our inverse Θ. Consider the minimizers of the expected loss functions 2 ∗ 2 γ ∗j = argmin E(Uj − U > τj2 = E(Uj − U > (11) −j γ j ) , −j γ j ) , γ j ∈Rp where Uj is the jth element of U , and U −j is a p − 1 dimensional vector created by dropping the jth element from U . Note that τj2 can also be alternatively written as ∗ ∗> > ∗ E{(Uj − U > −j γ j )Uj } − γ j E{(Uj − U −j γ j )U −j }. (12) 2 ∗ By the convexity of the target function E(Uj − U > −j γ j ) , γ j must satisfy the first order KarushKuhn-Tucker conditions (KKT) > ∗ −γ ∗> j E{(Uj − U −j γ j )U −j } = 0. (13) Applying (13) to (12), we have ∗ τj2 = E{(Uj − U > −j γ j )Uj }. > 2 We can then define a vector θ 1 = (1, −γ ∗> 1 ) /τ1 that satisfies > ∗> > ∗ θ> 1 Σ = E{(U1 − U −1 γ 1 )U }/ E{(U1 − U −1 γ 1 )U1 } = (1, 0p−1 ) = e1 . Without loss of generality, we may define θ j accordingly for j = 2, . . . , p, satisfying θ > j Σ = ej . The > matrix Θ = (θ 1 , . . . , θ p ) satisfies ΘΣ = (e1 , . . . , ep ) = Ip , 6 therefore it is the inverse of Σ. Using the empirical version of (11), we propose a consistent estimator for Θ. Due to the non-linearity of matrix inversion, the negative Hessian (8), in which we have the difference of two matrices inside an integral, is not easy to work with. Instead, we derive the sample version of (9) as the alternative form: n Z t∗ X b ⊗2 dN o (t). b = n−1 {Zi (t) − Z̄(t, β)} (14) Σ i=1 i 0 b is that it can be written as the sample second moment Σ b = n−1 Pn U b ⊗2 The advantage of Σ i i=1 where Z t∗ o b bi = U {Zi (t) − Z̄(t, β)}dN (15) i (t). 0 We define b = n−1 Γj (γ j , β) n  X i=1 b > γj bi,j − U U i,−j 2 , j = 1, . . . , p, (16) b i , and U b i,−j is a p − 1 dimensional vector obtained by dropping bi,j is the jth element of U where U b i . We then define the nodewise LASSO in our context to be the jth element from U b + 2λj kγ k1 }, b j = argmin {Γj (γ j , β) γ j γ j ∈Rp−1 b j and τbj2 to construct Accordingly, we use γ b jk Θ b + λj kb τbj2 = Γj (b γ j , β) γ j k1 .  γj,k /(b τj2 ), k < j;  −b 1/(b τj2 ), k = j; =  γ bj,k−1 /(b τj2 ), k > j. (17) (18) b j,j = 1 and |(Θ b j,k | ≤ λj for j 6= k. Choosing b Σ) b Σ) By the first order KKT condition, we have (Θ bΣ b − Ip kmax goes to zero. The one-step estimator λmax = maxj=1,...,p λj = op (1), we achieve that kΘ b hence converges to the true coefficient β o approximately at the rate proposed in (6) with such Θ equivalent to ṁ(β o ), as illustrated in (7). Our proposed estimator is innovative in several aspects. Given the difficulty imposed by the model, we cannot make high-dimensional inference by simply inverting the XX > with the covariate matrix X. The modified log partial likelihood (3) has dependent entries. The covariates Zi (t) for i = 1, . . . , n are allowed to be time-dependent. Nevertheless, we identify for our model that the key element for the high-dimensional inference is each observation’s contribution to the score, the U i ’s. Our solution generalizes high-dimensional matrix inversion in a non-trivial way to complex models with non-standard likelihoods and weighting. 2.4 Confidence Intervals To construct the confidence intervals for components of β o , we need the asymptotic distribution b We first establish the asymptotic distribution of the score ṁ(β o ). With p > n, we have of b. to restrict the space in which we want to establish the asymptotic distribution. In general, it is impossible to establish convergence in distribution of ṁ(β o ) to a jointly Gaussian random variable 7 in Rp due to exploding dimensions. The asymptotic distribution for ṁ(β o ) is established in the following sense — for any c ∈ Rp such that kck1 = 1 we have √ d nc> ṁ(β o ) → N (0, c> Vc), √ where V is the variance-covariance matrix for nṁ(β o ). Obtaining the result above is technically challenging. As mentioned earlier apart from the high-dimensionality the modified log partial likelihood (3) has dependent summands. In addition, the IPW creates additional dependency through the Kaplan-Meier estimator. We construct the following estimator for V: n X b )⊗2 , (b ηi + ψ i b = n−1 V where ηbi and ψbi are defined as follows: bi = η Z 0 Z t∗ b c1 {Zi (t) − Z̄(t, β)}ω i (t)dMi (t), (20) t∗ b(t) cc q dMi (t), b(t) 0 π Z n X −1 b(t) = n q I(t > Xi ) b = ψ i (19) i=1 π b(t) = n−1 i=1 n X i=1 t I(Xi ≥ t), t∗ (21) b c1 {Zi (u) − Z̄(u, β)}ω i (u)dMi (u), b> As illustrated in (7), we have √ √ I(Xi ≥ t) n π b(t) (23) n β Zi (t) X ci1 (t) = dNio (t) − ωi (t)Yi (t)e n−1 dNjo (t), dM b S (0) (t, β) cic (t) = I(Xi ≥ t)dNic (t) − dM (22) j=1 n X −1 j=1 I(Xj ≥ t)dNjc (t). (24) (25) b − β o ) asymptotically equivalent to nc> (b d nc> Θṁ(β o ) → N (0, c> ΘVΘ> c). √ b − β o ) using a “sandwich” estimator c> Θ bV bΘ b > c. We may now estimate the variance of nc> (b Therefore a (1 − α)100% confidence interval for c> β o is q q   > > >b >b > > b b b b b b c b − Z1−α/2 c ΘV Θ c/n, c b + Z1−α/2 c ΘV Θ c/n (26) with standard normal quantile Z1−α/2 . Our proposed approach addresses various practical questions as special cases. First, we can construct confidence interval for a chosen coordinate βjo in β o . To that end, one needs to consider c = ej , the j-th natural basis for Rp and apply the result (26). Generally, we can construct confidence interval for any linear contrasts c> β o , potentially of any dimension. For example, we can have confidence intervals for the linear predictors Z> β o if the non-time-dependent covariate Z 8 is also sparse so that we may assume kZk1 to be bounded. As the dual problem, we may use the Wald test statistic q √ >b bV bΘ b >c (27) Z = n(c b − θ0 )/ c> Θ to test the hypothesis with H0 : c> β o = θ0 . 3 Theory b b b and the confidence intervals described in the Now we present the theory for the estimators β, previous section. First, we introduce some additional notations. Unlike the low-dimension situation in Fine and Gray (1999) where various empirical process results are applicable, none of the general results can be directly applied in high-dimension. This is a big challenge for our theory where the convergence of the empirical average of the time-dependent processes to their common expectation is needed at various places. We generalize some empirical process results while relying heavily on the martingale theory elsewhere. The counting process martingales Z t o> 1 1 Mi (t) = Ni (t) − Yi (u)eβ Zi (u) h10 (u)du (28) 0 are essentially helpful tools in high-dimensions for establishing theory with dependent partial likelihoods. Unfortunately, the uncensored counting processes {Ni1 (t), i = 1, . . . , n} are not always observable. The observable counterpart Nio (t) has no known martingale related to it under the observed filtration Ft = σ{Nio (u), I(Xi ≥ u), ri (u) : u ≤ t, i = 1, . . . , n}. The Doob-Meyer compensator for the submartingale Nio (t) under the observed filtration involves the nuisance distribution of Ti |i > 1. To utilize the martingale structure for our theory, we have to define the “censoring complete” filtration Ft∗ = σ{Nio (u), I(Ci ≥ u), Zi (·) : u ≤ t, i = 1, . . . , n}, on which we have a martingale Mi1 (t) defined in (28), Z t Z t o> 1 o I(Ci ≥ t)dMi (u) = Ni (t) − I(Ci ≥ u)Yi (u)eβ Zi (u) h10 (u)du. 0 (29) (30) 0 To relate the martingale (30) with our modified log partial likelihood m(β), we define its proxy with Ft∗ measurable integrand   n Z t∗ n X X > m(β) e = n−1 β > Zi (t) − log  I(Cj ≥ t)Yj (t)eβ Zj (t)  dNio (t). (31) i=1 0 j=1 We define processes related to m(β) e and its derivatives as e (l) (t, β) = n−1 S n X i=1 I(Ci ≥ t)Yi (t)eβ > Zi (t) Zi (t)⊗l , e β) = S e (1) (t, β)/Se(0) (t, β). Z(t, (32) They can also be seen as proxies to the processes in (4). In fact, we can compute the following expectation by first conditioning on observed filtration n o h i n o > e (l) (t, β) = E E{I(Ci ≥ t)Yi (t)|Ft }eβ> Zi (t) Zi (t)⊗l = E ω E S ei (t)Yi (t)eβ Zi (t) Zi (t)⊗2 , 9 where ω ei (t) = ri (t)G(t)/G(t ∧ Xi ) is the weight with the true censoring distribution G(·). We denote their expectations as n o n o > e (l) (t, β) = E ω s(l) (t, β) = E S ei (t)Yi (t)eβ Zi (t) Zi (t)⊗2 . (33) e (l) (t, β) differs from S(l) (t, β) only at Our proxies precisely targets those weighted samples, as S those summands with observed type-2 events. We require below mild additional assumptions to control this approximation error. Note that the Kaplan-Meier estimator for G(t) can be written as  Y dNic (u) b = 1− G(t) . I(Xi ≥ u) u≤t b To study the convergence of G(t) to G(t), we denote a martingale related to Nic (t), the counting process of observed censoring. Let the censoring hazard be defined as hc (t) = −d log(G(t))/dt. Under the “censoring” filtration Ft = σ{Nic (u), Ti , i , Zi (·) : u ≤ t, i = 1, . . . , n}, we have a martingale Mic (t) = Nic (t) − Z t I(Ci ≥ u)hc (u)du. 0 (34) (35) We use the integration-by-parts arguments (Murphy, 1994, the Helly-Bray argument on page 727) with random martingale measures, e.g. dMi1 (t), in our proof. In a rigorous sense, we should specify the element w in the probability space Ω for each dMi1 (t; w) when we apply integration-byparts to the deterministic measure dMi1 (t; w) or solve integral equations involving dMi1 (t; w). The total variation of Mi1 (t; w) is defined as ∗ t _ Mi1 (t; w) 0 = sup n X sup k=1,2,... 0≤t1 <···<tk ≤t∗ j=2 |Mi1 (tj ; w) − Mi1 (tj−1 ; w)|. (36) Since Mi1 (t; w) can be decomposed into a nondecreasing counting process Ni1 (t) minus another Rt o> nondecreasing compensator 0 Yi (u)eβ Zi (u) h10 (u)du, we have a bound for its total variation ∗ t _ Mi1 (t; w) 0 ≤ Ni1 (t∗ ) + Z t∗ Yi (u)eβ 0 o> Zi (u) 1 h0 (u)du. (37) Similar conclusion also applies to Mic (t), i.e. we have a bound for its total variation ∗ t _ 0 Mic (t; w) ≤ Nic (t∗ ) + Z 0 t∗ I(Ci ≥ t)hc (u)du. As a convention, from hereon we suppress the w in the notation to keep it simple. 10 (38) 3.1 Oracle inequality b − β o k1 based on the following We first establish oracle inequality for the initial estimation error kβ regularity conditions. All constants are assumed to be independent of n, p and so . (C1) (Conditions on the design) Suppose that {(Ti , Ci , i , Zi (t)) : t ∈ [0, ∞)} are i.i.d. with Ci independent of (Ti , i , Zi ). There exists a finite t∗ such that Pr(Ci > t∗ ) = 0. For any t ∈ [0, t∗ ], G(t) = I(Ci ≥ t) is differentiable, and its hazard function hc (t) = −G0 (t)/G(t) ≤ Kc . With probability equals one, the covariates satisfy sup sup kZi (t)k∞ ≤ K/2. (39) i=1,...,n t∈[0,t∗ ] There exist positive M and r∗ such that h i o> inf E I(Ci ≥ t∗ )I(t∗ < Ti1 < ∞) min{M, eβ Zi (t) } > r∗ . t∈[0,t∗ ] (40) (C2) (Continuity conditions for estimation) Zi (t) may have jumps at ti,1 < ti,2 < · · · < ti,Kzi with minimal gap between jumps bounded away from zero, mini=1,...,n min1<k≤Kzi ti,k − ti,k+1 ≥ D. Between two consecutive jumps, Zi (t) has at most cz elements Lipschitz continuous with Lipschitz constant Lz and the rest elements constant. The baseline CIF F1 (t; 0) is differentiable. The baseline subdistribution hazard h10 (t) = −d log{F1 (t; 0)}/dt ∈ [h∗ , Kh ] over (0, t∗ ) for h∗ > 0 and Kh < ∞. (C3) (Lower bound for restricted eigenvalue) For the M in (40), the smallest eigenvalue of matrix   h i ⊗2  o>   β Z(t) Z ∗  t  E Z(t){1 − F1 (t; Z)} min{M, e } 1   h i Σ(M ) = E Z(t) − h (t)dt 0 o>    0  E {1 − F1 (t; Z)} min{M, eβ Z(t) } is at least ρ∗ > 0. Remark 1. The conditions above are minimal in the sense that they appear in the oracle inequality under the Cox model (Huang et al., 2013, (3.9) on page 1149; (4.5) and Theorem 4.1 on page 1154). Remark 2. Due to missing censoring times among those with observed type-2 events, we have to make the additional assumptions to control the weighting errors. Although the weighted at-risk processes ωi (t)’s are asymptotically unbiased, the approximation errors in the tail t → ∞ is poor for any finite n. To avoid unnecessary complications, we set the t∗ as the final administrative censoring time, following the conventional design in the low-dimensional literature (Andersen and Gill, 1982). As a result, the partial likelihood (3) becomes an integral over the finite support [0, t∗ ]. We can let t∗ go to infinity under more delicate assumptions by a martingale representation of approximation error (See Lemma B.8(ii) in supplement), but we decide not to replace the more straightforward assumptions here by the obscured ones that are harder to verify. Remark 3. Condition (39) in (C1) is equivalent to the apparently weaker assumption (see for example Huang et al. (2013) equation (3.9)): sup sup kZi (t) − Zj (t)k∞ ≤ K. 1≤i<j≤n t∈[0,t∗ ] 11 (41) This can be seen by noting that the Cox model formulation is invariant when subtracting Zi (t) by any deterministic ζ(t). Remark 4. Condition (40) in (C1) can be interpreted in two statements. First, the at-risk rate for type 1 events is bounded away from zero. Second, relative-risks arbitrarily close to zero needs to be truncated at a finite M ; this is necessary in high-dimensions, in order to rule out the irregular situation where the non-zero expectation of the relative risks is dominated by a diminishing proportion of the excessively large relative risks. The same argument applies for (C3) in which a lower bound of the restricted eigenvalue of the negative Hessian (Bickel et al., 2009) is defined. Remark 5. Since the continuity condition (C2) may appear obscure, we offer some extra explanation. This has to do with the fact that the subjects with observed type 2 events remain indefinitely in the risk sets for type 1 events, as seen in the definitions of S(l) (t, β o ). These subject all have their Ti1 = ∞, and under the proportional hazard model one would not expect their type o> 1 relative risks eβ Zi (t) to be excessively large. When the Zi ’s are not time-dependent, we can use this fact to establish a slow growing rate of the maximal relative risks among those subjects. This is no longer the case with time-dependent Zi (t)’s, unless the linear predictor processes β o> Zi (t) have certain continuity property. We propose (C2) taking into account likely practical scenarios, where the covariates are either measured at the baseline only, or otherwise at finitely many discrete time points. Note that the coordinate wise continuity in Zi (t) is insufficient as p grows to infinity. The concentration of the empirical average of the time-dependent processes around their expectation is one major challenge in establishing theory with high-dimensional covariates for survival data. We prove two widely applicable lemmas in the Appendix. Lemma A.1(i) produces concentration results for empirical average of processes with certain continuity property around their mean over an independently generated random grid. We use it to establish empirical bounds from the assumed population bound, and control the approximation errors. Lemma A.2(i) produces uniform concentration results for counting process martingales. We use it to establish sharper concentration results for martingales. The regular deterministic cone-invertibility argument (Huang et al., 2013; van de Geer, 2007; van de Geer and Bühlmann, 2009) remains valid under the Fine-Gray model. Let O be the indices set for non-zero elements in β o and Oc be its compliment in {1, . . . , p}. We define the cone set with ξ>1 C(ξ, O) = {b ∈ Rp : kbOc k1 ≤ ξkbO k1 }, (42) and the compatibility factor with negative Hessian −m̈(β o ) on the cone set p  so b> {−m̈(β o )b} o κ ξ, O; −m̈(β ) = sup . kbO k1 06=b∈C(ξ,O) (43) b defined On the event {kṁ(β o )k∞ < λ(ξ − 1)/(ξ + 1)}, the estimation error of LASSO estimator β in (5) has the bound eς (ξ + 1)so λ b − β o k1 ≤ kβ (44) 2 , 2κ ξ, O; −m̈(β o ) 2 where ς is the smaller solution to ςe−ς = K(ξ + 1)so λ/{2κ ξ, O; −m̈(β o ) }. The probabilistic condition of kṁ(β o )k∞ decaying to zero, however, is not straightforward in the presence of both competing risks and censoring. The greatest challenge, as stated in the beginning of this section, is the lack of the martingale property in ṁ(β o ). Even if we use its martingale proxy ė o ), the error in ωi (t) − I(Ci ≥ t) can be amplified in their product with the relative risks. In m(β 12 the following we first show that the relative risks among subjects with observed type 2 events has sub-Gaussian tails. This is achieved through the argument that their CIF cannot be arbitrarily close to one. Otherwise, these subjects would have probability close to one experiencing type 1 event, contrary to the observed fact. As CIF is monotone increasing in relative risks, it is also unlikely to observe excessively large relative risks among the subjects with observed type 2 events. e (l) (t, β o ) around zero We then use Lemma A.1(i) to establish the concentration of S(l) (t, β o ) − S across all observed type 1 event time. We state our result on the probabilistic condition for LASSO estimation error in the following lemma. o Lemma 1. Denote Ke,ε = ecz Lz kβ k∞ D log(n/ε)/Dh∗ , ) ( r r Ke,ε K l 4M 2 (1 + Kc t∗ ) 4 log(2/ε) 4M 2 Kc t∗ 2 log(2npl /ε) 1 (l) , Cn,p,ε = + + + r∗2 n r∗2 n n n 2l (45) n o p (1) (0) and Ċ(n, p, ε) = 2Cn,p,ε + KCn,p,ε /r∗ + K 2 log(2p/ε)/n. Under Assumptions (C1) and (C2),   2 2 2 2 Pr kṁ(β o )k∞ < Ċ(n, p, ε) ≥ 1 − e−nr∗ /(2M ) − ne−n(r∗ −2/n) /(8M ) − 5. This lemma then directly translates into a bound on the bias of estimation. Theorem 1. For ξ > 1 and a small ε > 0, set λ = Ċ(n, p, ε)(ξ − 1)/(ξ + 1) with Ċ(n, p, ε) from Lemma 1. Let Cκ > 0 satisfying ς = 2K(ξ + 1)so λ/(2Cκ )2 ≤ 1/e, and η ≤ 1 be the smaller solution of ηe−η = ς. Assume that n > − log(ε/3)/(2p2∗ ). Under regularity conditions (C1) and (C2), eη (ξ + 1)so λ 2Cκ2  2 2 2 2 occurs with probability no less than Pr κ(ξ, O; m̈(β o )) > Cκ − e−nr∗ /(2M ) − ne−n(r∗ −2/n) /(8M ) − 5ε. b − β o k1 < kβ In Lemma 1, Ke,ε comes from the ε-tail bound of the maximal relative risk among observed o type 2 events. In contrary to its natural upper bound ekβ k1 K  eso , Ke,ε is only of the order of (l) log(n). Cn,p,ε is the ε-tail bound of the approximation error sup k∈1...KN 1 e (l) (T 1 , β o )kmax kS(l) (T(k) , βo ) − S (k) 1 ,...,T1 over the ordered observed type 1 event times T(1) (KN ) with KN being the total number of (0) unique observed type 1 event times. Focusing on the leading terms, we have Cn,p,ε of the order p √ (1) log(n)/ n, and Cn,p,ε of the order log(n) log(p)/n. p Hence, we obtain Ċ(n, p, ε), the diminishing tail bound for kṁ(β o )k∞ , to be of the order log(n) log(p)/n. Despite the complicated expression, p our result differs from the rate log(p)/n (established for the Cox or the linear model) only by a factor of log(n), which comes from the weights ωi (t) among the terms of magnitude eso  n. For the oracle inequality, we may directly assume the compatibility factor κ ξ, O; −m̈(β o ) to be bounded away from zero. Then, for the regularization parameter   λ choosen to be of the order p p o b log(n) log(p)/n we obtain kβ − β k1 = Op so log(n) log(p)/n .  The conclusion of the Theorem 1 involves the compatibility factor κ ξ, O; −m̈(β o ) . To obtain  b − β o k1 converging to zero in probability, we have to assume that Pr κ(ξ, O; m̈(β o )) > Cκ kβ 13 converges to zero for a sequence of Cκ bounded away from zero, as sample size n goes to infinity. Alternatively, we may achieve an equivalent conclusion under the condition (C3) which is used later for the asymptotic distribution. In the following lemma, we show that the negative Hessian has a lower bound converging to a positive definite matrix Σ(M ) whose eigenvalues are assumed to be bounded away from zero by (C3). Thus, we obtain a lower bound of the restricted eigenvalue of the negative Hessian in the cone C(ξ, O). Using the connection between the compatibility factor  and the restricted eigenvalue (van de Geer and Bühlmann, 2009), we show that κ ξ, O; −m̈(β o ) , the compatibility factor in the cone C(ξ, O), is bounded away from zero with probability tending to 1. Lemma 2. Denote n o (2) (1) (0) C̈(n, p, ε) = 2Cn,p,ε + 4KCn,p,ε + (5/2)K 2 Cn,p,ε /r∗   q  2 ∗ ∗ 2 + K (1 + t Kh ) 2 log p(p + 1)/ε /n + (2/r∗ )t Kh tn,p,ε , where tn,p,ε is the solution of p(p + 1) exp{−nt2n,p,ε /(2 + 2tn,p,ε /3)} = ε/2.221. Under Assumptions (C1)- (C3),    q o Pr κ ξ, O; −m̈(β ) ≥ ρ∗ − so (ξ + 1)C̈(n, p, ε) ≥ 1 − 6ε. p Under the rate condition so log(n) log(p)/n = o(1), we obtain an asymptotically l1 -consistent b With β b therefore being in a small neighborhood of the true parameter regularized estimator β. o of interest β , we are able to establish theory on statistical inference using the local quadratic approximation of m(β) at β o . 3.2 Asymptotic normality for one-step estimator and honest coverage of confidence intervals b and honest coverage of the We establish the asymptotic normality for the one-step estimator b confidence intervals based on slightly stronger regularity conditions. (D1) (Bound on linear predictors) The true linear predictors are uniformly bounded with probability one sup sup β o> Zi (t) ≤ Kb . (46) i=1,...,n t∈[0,t∗ ] (D2) (Conditions on design) Suppose that {(Ti , Ci , i , Zi (t)) : t ∈ [0, ∞)} are i.i.d., Ci is independent of (Ti , i , Zi ). There exists a finite t∗ such that Pr(Ci > t∗ ) = 0. For any t ∈ [0, t∗ ], G(t) = I(Ci ≥ t) is differentiable, and its hazard function hc (t) = −G0 (t)/G(t) ≤ Kc . With probability one, the covariates satisfy supi=1,...,n supt∈[0,t∗ ] kZi (t)k∞ ≤ K/2. There exists r∗ > 0, such that   E I(Ci ≥ t∗ )I(t∗ ≤ Ti1 < ∞) > r∗ . (47) (D3) (Continuity conditions for inference) Each Zi (t) is generated from random processes dzi (t), ∆zi (t) and the counting process Niz (t), Z t Z t z Zi (t) = Zi (0) + di (u)du + ∆zi (u)dNiz (u). 0 0 14 β o> dzi (t) is uniformly bounded between ±Lz and uniformly Lipschitz-Ldz . Each ∆zi (t) is bounded in l∞ -norm by K in accordance with (D2), and |β o> ∆zi (t)| ≤ 2K b in accordance with  p z n/(log(p) log(n)) (D1). The Ni (t)’s have a common cap on the number of jumps Kz = o and a bounded intensity function hN (t) ≤ LN . The baseline CIF F1 (t; 0) is differentiable. The baseline subdistribution hazard h10 (t) = −d log{F1 (t; 0)}/dt exists and is bounded by Kh . (D4) (Invertibility of negative Hessian) The smallest eigenvalue of the asymptotic Hessian matrix (Z ∗ ) t Σ=E (Z(t) − µ(t))⊗2 h10 (t)dt , 0 with µ(t) = s(1) (t, β o )/s(0) (t, β o ), is at least ρ∗ > 0. The rows of the asymptotic precision matrix (θ 1 , . . . , θ p )> = Θ = Σ−1 are sparse with sparsity constants s1 , . . . , sp ≤ smax < n. Also, kθ j /Θj,j k1 ≤ Kγ . (D5) (Rate condition for inference) The dimensions and sparsity parameters satisfy so (smax + √ so ) log(p)/ n = o(1). We make notably stronger assumptions in (D1) and (D3) than those required only for oracle inequality in the previous section. We explain their inevitability in the following discussion. Like other works in high-dimensional inference beyond linear regression where normality is assumed, the restriction on the linear predictor β o> Zi (t) becomes unavoidable (van de Geer et al., √ 2014; Fang et al., 2017). In our case, the asymptotic normality of nṁ(β o ) depends fundamentally √ ė o ). As a necessary condition, the predictable quadratic on the asymptotic tightness of nm(β √ ė o ) variation under filtration Ft∗ of the martingale n, m(β Z t∗ n X o> −1 e β o )}⊗2 h1 (t)dt, n I(Ci ≥ t)Yi (t)eβ Zi (t) {Zi (t) − Z(t, (48) 0 0 i=1 must have a finite bound independent of the dimension of the covariates. This requires that the magnitude of the summands in (48) either be bounded or have light tails. Hence, we cannot allow o> the relative risk eβ Zi (t) to grow arbitrarily large. Additionally, we are able to achieve an improved estimation error for the initial estimator with (D1). The extra log(n) in the rate of Theorem 1 o> from bounding eβ Zi (t) with large probability is no longer necessary. p p Theorem 1*. Under (D1)-(D5), we can choose λ  log(np)/n and Cκ = p∗ /2, such that  p  b − β o k1 = Op so log(p)/n = op (1). kβ √ In addition, we use Condition (D3) to derive a sharper n-negligible bound for the approxiė o ) that is needed for the purposes of asymptotic normality. mation error between ṁ(β o ) and m(β o> Naturally, the conclusion requires extra smoothness of eβ Zi (t) Zi (t)⊗l ’s compared to the Lipschitz continuity of (C2). We go one step further to make sure that their derivatives are also Lipschitz. Finally, (D4) is a standard assumption for the validity of the nodewise penalized regressions (17). If we define the population versions of the nodewise components defined in (15)-(17), Z t∗ 2 U= {Z(t) − µ(t)}dN o (t), Γ̄j (γ) = E{Uj − U > i,−j γ} , 0 γ ∗j = argmin Γ̄j (γ), τj2 = Γ̄j (γ ∗j ), γ∈Rp−1 15 (49) then the true parameters {γ ∗j , τj2 : j = 1, . . . , p} uniquely define the inverse negative Hessian Θ as described in Section 2.1. We prove this statement in the following Lemma. Lemma 3. Under (D4), Θj, j = 1/τj2 and θ j,−j τj2 = γ ∗j . Moreover, kγ ∗j k1 ≤ Kγ , τj2 ≥ ρ∗ and kΘk1 ≤ Kγ /ρ∗ . Lemma 3 also shows that kγ ∗j k1 and kΘk1 do not grow with p. We use Lemma A.1(ii) and A.2(ii) to control the time-dependent processes for normality. Lemma A.1(ii) extends the uniform concentration over a countable grid in Lemma A.1(i) to the entire domain [0, t∗ ], and this result is useful when we assess the approximation error between the two processes in an integral over absolutely continuous measures like h10 (t)dt. We apply Lemma A.2(ii)  −1/2 to bound op n errors involving martingale integrals with diminishing measurable integrands. With all the preparation above, we start with the estimation error of the nodewise-LASSO. It is worth noting that the techniques from van de Geer and Bühlmann (2009) rely on i.i.d. entries in the linear regression model. Unlike those, the nodewise LASSO under our model (17) has dependent b in their definitions (15). Hence, our proof adopts the additional b i ’s through the common Z̄(t, β) U b i ’s by their i.i.d. proxies. We eventually establish the error rates approximation of the dependent U b − Θk1 τj2 − τj2 | in the following Lemma, which then leads to the error rate for kΘ of kb γ j − γ ∗j k1 and |b in Lemma 3.   p p γ j −γ ∗j k1 = Op so sj log(p)/n Lemma 4. Under (D1)-(D5), choosing λj  so log(p)/n, we have supj kb   p p b − Θk1 = Op so smax log(p)/n . and supj |b τj2 − τj2 | = Op (so sj log(p)/n). Thus, kΘ b Remark 6. The total error of kΘ−Θk 1 is a product of the error from the initial estimator p of the order so , the error from the nodewise LASSO of order smax and the dimensions factor log(p)/n. b ’s Compared to the linear regression case (Zhang and Zhang, 2014; van de Geer et al., 2014), our U b are affected by the estimation error of initial estimator β. It therefore makes sense to have the extra so in our rate. Compared to the generalized linear model (GLM) case (van de Geer et al., 2014), b involving the initial estimator. Thus, our b ’s are dependent with each other through Z̄(t, β) our U error rate from two different sources takes the multiplicative form so smax instead of the summation so + smax for the GLM. In general, we consider our rate to be optimal under the our model. b proposed in (7). Using Lemma 4, we can establish the approximation condition for b b satisfies the approximation condition Lemma 5. Under (D1)-(D5), the one-step estimator b o √ >n √  b = Op so (smax + so ) log(p)/ n = op (1) nc Θṁ(β o ) + β o − b for any c such that kck1 = 1. Next, we show the asymptotic normality of ṁ(β o ). Define the asymptotic variance of ṁ(β o ) similar to that from Fine and Gray (1999) as V = E{η i + ψ i }⊗2 , 16 (50) with Z t∗ {Zi (t) − µ(t)}e ωi (t)dMi1 (t), 0 Z t∗ Z t∗ q(t) ψi = I(Xi ≥ t)dMic (t), π(t) 0 "0 Z ∗ ηi = t q(t) = E I(t > Xi ) t (51) (52) # {Zi (u) − µ(u)}e ωi (u)dMi1 (u) , π(t) = Pr(Xi ≥ u), (53) (54) and Mi1 (t), Mic (t) as defined in (28) and (35). Lemma 6. Under conditions (D1)-(D5), for directional vector c ∈ Rp with kck1 = 1 and c> ΘVΘ> c → √ √ d ν 2 ∈ (0, ∞), nc> Θṁ(β o )/ c> ΘVΘ> c → N (0, 1). The proof uses the same approach as the initial low-dimensional result in Fine and Gray (1999). We approximate ṁ(β o ) by the sample average of i.i.d. terms η i + ψ i plus an op n−1/2 term. We note that the same approach involves nontrivial techniques to apply in high-dimensions. In particular, we discover and exploit the martingale property of the term {ωi (t) − I(Ci ≥ t)}/G(t). The last piece is the element-wise convergence of the “meat” matrix (19) in the “sandwich” variance estimator. We achieve the following result by repeatedly using Lemmas A.1(ii) and A.2(i).  o b ψ b (β)−η b b Lemma 7. Under conditions (D1)-(D5), supi=1,...,n kb η i (β)+ −ψ k = O p kβ − β k1 + i i i ∞  p b − Vkmax = op (1). log(p)/n = op (1). Hence, kV Putting Lemmas 6 and 7 together, we obtain the main result stated in the Theorem below. Theorem 2. Let c ∈ Rp with kck1 = 1 and c> ΘVΘc → ν 2 ∈ (0, ∞). Under (D1)-(D5), √ > b nc (b − β o ) d q → N (0, 1). > bV bΘ b c c> Θ The theorem justifies all the proposed inference and testing procedures in Section 2.4. 4 Simulation Experiments To assess the finite sample properties of our proposed methods, we conduct extensive simulation experiments with various dimensions and dependence structure among covariates. 4.1 Setup 1 Our first simulation setup follows closely the one of Fine and Gray (1999) but considers highdimensional covariates. In particular, each Zi is a vectors consisting of i.i.d. standard normal random variables. For cause 1, only β1,1 = β1,2 = 0.5 are non-zero. The cumulative incidence function is: > Pr(Ti ≤ t, i = 1|Zi ) = 1 − [1 − p{1 − exp(−t)}]exp(β1 Zi ) . 17 For cause 2, β2,1 = β2,3 = · · · = β2,p−1 = −0.5 and β2,2 = β2,4 = · · · = β2,p = 0.5, with  >  Pr(Ti ≤ t|εi = 2, Zi ) = 1 − exp teβ2 Zi . We consider four different combinations: n = 200, p = 300; n = 200, p = 500; n = 200, p = 1000; and n = 500, p = 1000. Note that this setup considers sparsity for cause 1 but non-sparsity for cause 2 effects. As the Fine-Gray model does not require modeling cause 2 in order to make inference on cause 1, we expect that the non-sparsity in cause 2 effects should not affect the inference on cause 1. The results are presented in Table 1. We focus on inference for the two non-zero coefficients β1,1 and β1,2 , as well as one arbitrarily chosen zero coefficient β1,10 . The mean estimates is the average b over the 100 repetitions, reported together with other quantities described below. of the one-step b b is bias-corrected, and that the We can see from the average estimates column that the one-step b presence of many non-zero coefficients for cause 2 does not affect our inference on cause 1. In practice the choice of the tuning parameters is particularly challenging; the optimal value is determined up to a constant. Moreover, the theoretical results are asymptotic in nature. These together with the finite sample effects of n  p, lead to suboptimal performance of many proposed one-step correction estimators (van de Geer et al., 2014; Fang et al., 2017). This is more so for survival models, due to the nonlinearity of the loss function and the presence of censoring – both require larger sample size (in order to observe asymptotic statements in the finite samples). In the following we propose a finite-sample correction to the construction of confidence intervals and in particular the estimated standard error (SE). b denote the asymptotic standard error as given in section 2.4. As a finite-sample Let se(bbj ; β) b in place of se(bbj ; β), b where the variance estimation based correction we propose to consider se(bbj ; b) b is replaced by the one-step b. b This can be viewed as another on the initial LASSO estimate β iteration of the bias-correction formula. The resulting SE is therefore a “two-step” SE estimator. We report the coverage rate of the confidence intervals constructed with this finite-sample correction in Table 1 and we observe good coverage close to the nominal level of 95%. We note that with 100 simulation runs the margin of error for the simulated coverage probability is about 2.18%, if the true coverage is 95%; that is, the observed coverage can range between 95+/−4.36%. We note that the coverage is good for all three coefficients, where non-zero or zero. In contrast, results in the existing literature suffer under-coverage of the non-zero coefficients. The last column ‘level/power’ in Table 1 refers to the empirical rejection rate of the null hypothb at a nominal esis that the coefficient is zero, by the two-sided Wald test Z = (bbj − β1,j )/se(bbj ; β) b is used, the nominal level is well preserved 0.05 significance level. We see that although se(bbj ; β) for the zero coefficient β1,10 , and the power is high for the non-zero coefficients β1,1 and β1,2 for the given sample sizes and signal strength. Table 1: Simulation results with independent covariates β1,1 β1,2 β1,10 True Mean Est SD 0.5 0.5 0 0.51 0.47 0.03 0.16 0.15 0.12 SE SE corrected n=200, p=300 0.13 0.25 0.14 0.22 0.15 0.18 18 Coverage Level/Power 0.94 0.94 0.98 0.92 0.93 0.04 β1,1 β1,2 β1,10 0.5 0.5 0 0.51 0.48 -0.01 0.16 0.15 0.10 β1,1 β1,2 β1,10 0.5 0.5 0 0.46 0.48 -0.00 0.17 0.14 0.11 β1,1 β1,2 β1,10 0.5 0.5 0 0.51 0.50 -0.00 0.10 0.10 0.07 n=200, p=500 0.14 0.19 0.13 0.19 0.14 0.16 n=200, p=1000 0.13 0.18 0.13 0.18 0.14 0.17 n=500, p=1000 0.08 0.14 0.08 0.15 0.08 0.14 0.93 0.93 1.00 0.95 0.88 0.01 0.94 0.93 0.99 0.86 0.92 0.06 0.99 0.99 1.00 1.00 0.99 0.03 We repeat the above simulations with different values for β1,1 to investigate the power of the Wald test. The results are illustrated in Figure 1, where we see that the power increases with n and decreases with p as expected. Figure 1: Power curve for testing β1,1 = 0 at nominal level 0.05 1.00 0.75 Power Setup n = 200, p = 300 0.50 n = 200, p = 1000 n = 500, p = 1000 0.25 0.00 0.00 0.25 0.50 0.75 1.00 β1,1 4.2 Setup 2 In the second setup we consider the case where the covariates are not all independent, which is more likely the case in practice for high dimensional data. We consider the block dependence structure also used in Binder et al. (2009). We consider n = 500, p = 1000; β1,1∼8 = 0.5, β1,9∼12 = −0.5 and the rest are all zero. β2,1∼4 = β2,13∼16 = 0.5, β2,5∼8 = −0.5 and the rest of β 1 are all zero. The covariates are grouped into four blocks of size 4, 4, 8 plus the rest, with the within-block correlations equal to 0.5, 0.35, 0.05 and 0. The four blocks are separated by the horizontal lines in Table 2. 19 Table 2 shows the inferential results for the non-zero coefficients β1,1 ∼ β1,12 , as well as the zero coefficients β1,13 ∼ β1,16 from the third correlated block that also contains some of the nonzero coefficients, and plus arbitrarily chosen zero coefficient β1,30 . The initial LASSO estimator tended to select only one of every four non-zero coefficients of the correlated covariates (data not shown), as it is known that block dependence structure is particularly challenging for the Lasso type estimators. On the other hand, the one-step estimator performed remarkably well, capturing all of the non-zero coefficients. Compared to the results in the last part of Table 1 with the same n and p, the block correlated b although the CI coverage remained high. The power also covariates led to slightly more bias in b, remained high, although in the third block with the mixed signal and noise variables the type I error rates appeared slightly high. Table 2: Simulation results with block correlated covariates β1,1 β1,2 β1,3 β1,4 β1,5 β1,6 β1,7 β1,8 β1,9 β1,10 β1,11 β1,12 β1,13 β1,14 β1,15 β1,16 β1,30 True Mean Est SD 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 -0.5 -0.5 -0.5 -0.5 0 0 0 0 0 0.47 0.48 0.47 0.47 0.48 0.46 0.47 0.47 -0.44 -0.42 -0.41 -0.43 -0.01 -0.02 -0.02 -0.02 -0.00 0.10 0.10 0.10 0.10 0.10 0.10 0.09 0.08 0.08 0.08 0.08 0.07 0.06 0.05 0.06 0.06 0.05 5 SE SE corrected n=500, p=1000 0.07 0.12 0.07 0.12 0.07 0.12 0.07 0.12 0.06 0.11 0.06 0.11 0.06 0.11 0.06 0.11 0.06 0.11 0.06 0.11 0.06 0.11 0.05 0.11 0.05 0.11 0.05 0.11 0.06 0.11 0.05 0.11 0.06 0.11 Coverage Level/Power 0.97 0.94 0.98 0.94 0.93 0.94 0.95 0.98 0.93 0.92 0.91 0.94 0.98 1.00 0.99 1.00 1.00 1.00 0.98 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 0.11 0.06 0.08 0.05 0.01 SEER-Medicare data example The SEER-Medicare linked database contains clinical information and claims codes for 57011 patients diagnosed between 2004 and 2009. The clinical and demographic information were collected at diagnosis, and the insurance claim data were from the year prior to diagnosis. The clinical information contained PSA, Gleason Score, AJCC stage and year of diagnosis. Demographic information included age, race, and marital status. The same data set was considered in Hou et al. (2017), where the emphasis was on variable selection and prediction error. Our focus is on testing and construction of confidence intervals. 20 There were 9326 binary claims codes in the data. Here we would like to identify the risk factors for non-cancer mortality using the Fine-Gray model. We kept only the claims codes with at least 10 and at most 1990 occurrences. The resulting dataset had 1197 covariates. In the following we consider 413 patients diagnosed during the year of 2004. Among them 76 died from the cancer and 337 had deaths unrelated to cancer. We center and standardize all the covariates before performing the analysis. To determine the penalty parameters λ and λj we used 10-fold cross-validation. In Table 3 we present the result for a selected set of the coefficients (due to space the set of all variables is not presented in full although we have computed 1197 p-values). We presented some variables with the larges p-values and some that Lasso (initial estimator) returned as zero initially. We also focused on heart disease and colon cancer as potential significan non-cancer mortality (different than prostate cancer) as well as prostate cancer variables. A descriptions of the variables b one-step estimate is given in Table 4. For each coefficient, we report the initial LASSO estimate β, b b, corrected SE, the 95% CI constructed with the corrected SE and the Wald test p-value (2-sided) calculated using the uncorrected SE. 21 Table 3: Inference for the SEER-Medicare linked data on non-cancer mortality among prostate cancer patients Variables Age Marital Race.OvW Race.BvW PSA GleasonScore AJCC-T2 ICD-9 51881 ICD-9 4280 CPT 93015 ICD-9 42731 CPT 72050 ICD-9 6001 CPT 74170 ICD-9 2948 ICD-9 49121 ICD-9 2989 ICD-9 79093 ICD-9 41189 CPT 45380 ICD-9 3320 Initial estimate βb 0.075 0 0 0.244 0 0 0 0.866 0.404 -0.061 0.135 0 0 0 0.539 0.150 0.079 -0.056 0 0 0 bb One-step estimate and Inference se(bb) 95% CI p-value 0.096 0.218 -0.213 0.528 0.005 0.084 -0.130 1.357 0.697 -1.042 0.459 3.718 -2.454 -1.689 0.746 0.476 0.450 -0.348 1.332 -2.250 0.378 0.009 0.147 0.224 0.122 0.003 0.050 0.146 0.361 0.062 0.327 0.191 0.208 0.577 0.288 0.205 0.215 0.135 0.176 0.434 0.544 0.373 [ 0.078, 0.114] [-0.071, 0.507] [-0.652, 0.225] [ 0.288, 0.767] [-0.000, 0.010] [-0.014, 0.182] [-0.418, 0.157] [ 0.650, 2.064] [ 0.576, 0.818] [-1.683, -0.401] [ 0.086, 0.833] [ 3.310, 4.125] [-3.585, -1.322] [-2.255, -1.124] [ 0.343, 1.148] [ 0.055, 0.896] [ 0.184, 0.715] [-0.693, -0.002] [ 0.480, 2.184] [-3.318, -1.182] [-0.353, 1.110] 2e-24∗ 0.042 0.317 1e-04∗ 0.041 0.085 0.218 4e-07∗ 2e-06∗ 4e-05∗ 0.001∗ 4e-05∗ 0.000∗ 0.001∗ 0.009 0.015 0.062 0.088 0.003∗∗ 0.003∗∗ 0.327 ∗ denotes 5% significance after Bonferoni correction ∗∗ denotes 10% significance after Bonferoni correction Table 4: Description of the variables in Table 3 Code Description Age Marital Race.OvW Race.BvW PSA GleasonScore AJCC-T2 ICD-9 51881 ICD-9 4280 CPT 93015 ICD-9 42731 CPT 72050 Age at diagnosis marSt1: married vs other Race: Other vs White Race: Black with White PSA Gleason Score AJCC stage-T: T2 vs T1 Acute respiratry failure (Acute respiratory failure) Congestive heart failure; nonhypertensive [108.] Global Cardiovascular Stress Test Cardiac dysrhythmias [106.] Diagnostic Radiology (Diagnostic Imaging) Procedures of the Spine and Pelvis 22 ICD-9 6001 CPT 74170 ICD-9 2948 ICD-9 49121 ICD-9 2989 ICD-9 41189 CPT 45380 ICD-9 3320 Nodular prostate Diagnostic Radiology (Diagnostic Imaging) Procedures of the Abdomen Delirium dementia and amnestic and other cognitive disorders [653] Obstructive chronic bronchitis Unspecified psychosis acute and subacute forms of ischemic heart disease, other Under Endoscopy Procedures on the Rectum Parkinsons disease [79.] In Table 3 we see that the claims codes ICD-9 4280, CPT 93015, ICD-9 42731 are all related to the heart disease, and are all significant at 5% level Bonferonni correction for the 21 variables included in the table. A heart attack indicator variable, ICD-9 41189, shows up significant at 10% level (again with correction for multiple testing). An indicator of a disease in the abdomen, CPT 74170, is significant at 5% although the initial Lasso regularized method failed to include such variable. Similar result is seen for the indicator of a fall (CPT 72050) which for an elderly person can be fatal. An indicator of a colon cancer (CPT 45380) turns out to be significant at 10% although the Lasso method set it to zero initially. Therefore, our one-step method is able to recover important risk factors that would be missed by the initial LASSO estimator. In contrast, non-life-threatening diseases, as expected, are not significant for non-cancer mortality. These include Parkinson’s (ICD-9 3320), Psychosis (ICD-9 2989), Bronchitis (ICD-9 49121) and Dementia (ICD-9 2948) in the table. We also note that the prostate cancer related variables, PSA, Gleason Score, AJCC and ICD-9 6001, all have large p-values for non-cancer mortality. This is consistent with the results in Hou et al. (2017), where under the competing risk models the predictors for a second cause is only secondary in importance in predicting the events due to the first cause. 6 Discussion This article focuses on estimation and inference under the Fine-Gray model with many more covariates than the number of events, which is well-known to be the effective sample size for survival data. The article proposes conditions under which a Lasso estimator performs well in terms of prediction error. It also develops a new one-step estimator that can be utilized for asymptotically optimal inference: confidence intervals and testing. An often overlooked restriction on the time-dependent covariates Zi (t), i = 1, . . . , n, under the Fine-Gray model is that Zi (t) must be observable even after the i-th subject experiences a type 2 event. In practice, Zi (t) should be either time independent or external (Kalbfleisch and Prentice, 2002). In our case the continuity conditions (C2) and (D3) are easily satisfied if the majority of the elements in Zi (t) are time independent, which is most likely to be the case in practice. Our theory does not apply in studies involving longitudinal variables that are supposed to be truly measured continuously over time. We have illustrated that the method based on regularization only (without bias correction) might have serious disadvantages in many complex data situations – for example, it may potentially fail to identify important variables that are associated with the response. From the analysis of the SEER-medicare data we see that variables like CPT 72050 (related to fall) or CPT 74170 (related to diagnostic imaging of the abdomen, often for suspected malignancies) would not have been discovered as important risk factors for non-cancer mortality by regularization alone. In reality, 23 both can be life threatening events for an elderly patient. The one-step estimate, on the other hand, was able to detect these therefore providing a valuable tool for practical applications. The one-step estimator is applicable as long as the model is sparse, and no minimum signal strength is required; this is another important aspect which makes the estimator more desirable for practical use than the LASSO type estimators. Acknowledgement We would like to acknowledge our collaboration with Dr. James Murphy of the UC San Diego Department of Radiation Medicine and Applied Sciences on the linked Medicare-SEER data analysis project that motivated this work. We would also like to thank his group for help in preparing the data set. Supplementary Materials In this section we provide details of all of the theoretical results. Preseding the proof of each statement we present the needed preliminary lemmas (numbered in letters). A Concentration Inequalities for Time-dependent Processes Lemma A.1. Let {(Si (t), Ni (t)) ∈ Rq × N : i = 1, . . . , n, t ∈ [0, t∗ ]} be i.i.d. pairs of random processes. Each Ni (t) is aP counting process bounded by KN . Denote its jumps as 0 ≤ ti1 < · · · < tiKi ≤ t∗ . Let S̄(t) = n−1 ni=1 Si (t) and E{Si (t)} = s(t). Suppose sup1≤i<j≤n supt∈[0,t∗ ] kSi (t) − Sj (t)kmax ≤ KS almost surely. Then,  2 (i) Pr supi=1,...,n supj=1,...,Ki S̄(tij ) − s(tij ) max > KS x + (KS )/n < 2nKN qe−nx /2 . (ii) Assume in addition that each Si (t) is càglàd generated by Z t Z t Si (t) = Si (0) + ds (u)du + Js (u)dNi (u) 0 0 some ds (t) and Js (t) satisfying kds (t)kmax < LS and kJs (u)kmax < KS , and E{Ni (t)} = Rfor t N N h 0 i (u)du for some hi (t) ≤ LN . We have p sup sup S̄(t) − s(t) max = Op ( log(nKN q)/n). i=1,...,n t∈[0,t∗ ] Lemma A.2. Let {MRi (t) : t ∈ [0, t∗ ], i = 1, . . . , n} be a Ft -adapted counting process martint gales Mi (t) = Ni (t) − 0 Yi (t)hi (u)du satisfying supi=1,...,n supt∈[0,t∗ ] hi (t) ≤ Kh . Let {Φi (t) : t ∈ [0, t∗ ], i = 1, . . . , n} be the q dimensional Ft− -measurable processes such that sup sup kΦi (t)kmax ≤ KΦ . i=1,...,n t∈[0,t∗ ] P Rt For MΦ (t) = n−1 ni=1 0 Φi (u)dMi (u) , we have   2 (i) Pr supt∈[0,t∗ ] kMΦ (t)kmax ≥ KΦ (1 + Kh t∗ )x + KΦ Kh t∗ /n ≤ 2qe−nx /4 . (ii) Assume in addition supi=1,...,n supt∈[0,t∗ ] kΦi (t)kmax = Op (an ) and Kh t∗  O(1). Then, p supt∈[0,t∗ ] kMΦ (t)kmax = Op (an log(q)/n). 24 B Proofs of Main Results We state the related preliminary results before the proof of each of the main results. The proofs of the preliminary results are given in the next section. Proof of Lemma A.1. (i) Without loss of generality, let t11 be the first jump time of N1 (t). By the i.i.d. assumption, t11 is independent of all Si (t) with i ≥ 2. Thus, the sequence Ll = n −1 l X i=2 is a martingale with respect to filtration bounded as {Si (t11 ) − s(t11 )}   σ Si (t), i ≤ l , l = 2, . . . , n . The increment is n−1 {Si (t11 ) − s(t11 )} = n−1 ESj {Si (t11 ) − Sj (t11 )} ≤ n−1 KS . 2 /2 Applying Azuma (1967) inequality to Ln , we get Pr (kLn kmax > KS x) < 2qe−nx the dropped first term is also bounded by KS /n, we get  2 Pr S̄(t11 ) − s(t11 ) max > KS x + KS /n < 2qe−nx /2 . . Since We use simple union bound to extend the result to all tij ’s whose number is at most nKN . (ii) Define a deterministic set Tn = {kt∗ /n : k = 1, . . . , n} ∪ Tz . By the union bound of Hoeffding (1963) inequality, we have   2 Pr sup S̄(t) − s(t) max > KS x < 2(n + |Tz |)qe−nx /2 . t∈Tn Combining the result from Lemma A.1(i), we obtain p S̄(t) − s(t) max = Op ( log(npq)/n) over a grid containing Tn and jumps of Ni (t). We only need to show that the variation of S̄(t) − s(t) is sufficiently small inside each bin created by the grid. Let t0 and t00 be consecutive elements by order in Tn . By our construction, there is no jump of any of the counting processes Ni (t) in the interval (t0 , t00 ). Otherwise, the jump time is another element in Tn between t0 and t00 so that t0 and t00 are not consecutive elements by order. Under the assumption of the lemma, elements of all Si (t)’s are LS −Lipschitz in (t0 , t00 ). Moreover, |t00 − t0 | ≤ t∗ /n because of the deterministic {kt∗ /n : k = 1, . . . , n} ⊂ Tn . Along with the càglàd property, we obtain a bound of variation of S̄(t) in (t0 , t00 ) sup kS̄(t) − S̄(t00 )kmax ≤ sup t∈(t0 ,t00 ) sup kSi (t) − Si (t00 )kmax ≤ LS |t00 − t0 | ≤ LS t∗ /n. i=1,...,n t∈(t0 ,t00 ) For any t ∈ (t0 , t00 ), we bound the variation of s(t) by Z t00 Z t00 00 ∗ ks(t) − s(t )kmax ≤ E kds (u)kmax du + E{kJs (u)kmax hN i (u)}du ≤ (LS + KS LN )t /n. t t 25 For arbitrary t ∈ [0, t∗ ], we find the the corresponding bin (t0 , t00 ] contains t. Putting the results together, we have p kS̄(t)−s(t)kmax ≤ kS̄(t)−S̄(t00 )kmax +ks(t)−s(t00 )kmax +kS̄(t00 )−s(t00 )kmax ≤ Op ( log(npq)/n)+O(1/n). Proof of Lemma A.2. (i) The summands in MΦ (t) are the integrals of Ft− -measurable processes over Ft -adapted martingales, so MΦ (t) is a Ft -adapted martingale (Kalbfleisch and Prentice, 2002). Suppose {Ti : i = 1, . . . , n} are the jump times of {Ni (t)}. We artificially set Ti = t∗ if Ni (t) has no jump in [0, t∗ ]. Define 0 ≤ R1 ≤ · · · ≤ RKN +n be the order statistics of {Ti : i = 1, . . . , n} ∪ {kt∗ /n : k = 1, . . . , n}. Hence, {Rk : k = 1, . . . , 2n} is a set of ordered Ft stopping times. Applying optional stopping theorem, we get a discrete time martingale MΦ (Rk ) adapted to FRk . The increment of MΦ (Rk ) comes from either the counting part or the compensator part, which we can bound separately. By our construction of Rk ’s, each left-open right-closed bin P (Rk , Rk+1 ] satisfies two conditions. There is at most one jump from ni=1 Ni (t) in the bin at Rk+1 . The length of the bin is at most t∗ /n. The increment of the martingale MΦ (t) over (Rk , Rk+1 ] is decomposed into two coordinate-wise integrals, a jump minus a compensator, MΦ (t) = n −1 n Z X Rk+1 Φi (u)dNi (u) − n Rk i=1 −1 n Z X i=1 Rk+1 Φi (u)hi (u)du. Rk With the assumed a.s. upper bound for supt∈[0,t∗ ] kΦi (t)kmax ≤ KΦ , we have almost surely the jump of MΦ (t) in the bin be bounded by n −1 n Z X i=1 Rk+1 Φi (u)dNi (u) Rk max ≤ KΦ /n. Additionally with the assumed upper bound for supi=1,...,n supt∈[0,t∗ ] hi (t) ≤ Kh , we have the compensator of MΦ (t) increases over the bin by at most Z Rk+1 n Rk −1 n X Φi (u)hi (u)du i=1 max ≤ KΦ Kh (Rk+1 − Rk ) ≤ KΦ Kh t∗ /n. We obtain a uniform concentration inequality for MΦ (Rk ) by Azuma (1967) ! Pr sup k=1,...,2n kMΦ (Rk )kmax ≥ KΦ (1 + Kh t∗ )x 2 /4 ≤ 2qe−nx . Remark that the uniform version of Azuma (1967) is the application of Doob’s maximal inequality (Durrett, 2013, Theorem 5.4.2, page 213). For t ∈ (Rk , Rk+1 ), we use the bounded increment derived above Z Rk+1 + n X kMΦ (t) − MΦ (Rk )kmax ≤ n−1 Φi (u)hi (u)du ≤ KΦ Kh t∗ /n. Rk + i=1 26 max (ii) Under the additional assumption supi=1,...,n supt∈[0,t∗ ] kΦi (t)kmax = Op (an ), we can find KΦ,ε for every ε > 0 such that ! Pr sup sup kΦi (t)kmax ≤ KΦ,ε an i=1,...,n t∈[0,t∗ ] ≥ 1 − ε/2 for any n. We apply Lemma A.2(i) to obtain that event ( p sup kMΦ (t)kmax ≤ KΦ,ε an {(1 + Kh t∗ ) 2 log(4q)/n + Kh t∗ /n}, sup t∈[0,t∗ ] sup kΦi (t)kmax ≤ KΦ,ε an i=1,...,n t∈[0,t∗ ] ) occurs with probability no less than 1 − ε. P Lemma B.4*. Under (D2), supt∈[0,t∗ ] |n/{ ni=1 I(Xi ≥ t∗ )}|, supt∈[0,t∗ ] |S (0) (t, β o )−1 | and supt∈[0,t∗ ] |Se(0) (t, β o )−1 | are all Op (1). Lemma B.3. Let {ai (t) : t ∈ [0, t∗ ], i = 1, . . . , n} be a set of nonnegative processes. Under (39), Pn a (t)Zi (t)⊗l E{ai (t)Zi (t)⊗l } i=1 Pni ≤ (K/2)l . ≤ (K/2)l , and a (t) E{a (t)} i i=1 i max max e (l) (t, β)/Se(0) (t, β) and s(l) (t, β)/s(0) (t, β) As a result, the maximal norms of S(l) (t, β)/S (0) (t, β) and S are all uniformly bounded by (K/2)l . P o> 1 ,...,T1 Lemma B.4. Define Se(0) (t; M ) = n−1 ni=1 I(Ci ≥ t∗ )Yi (t∗ ) min{M, eβ Zi (t) }. Let T(1) (KN ) be the observed type-1 events. Under (C1), the event ( )   X Ωr∗ = n−1 (B.1) I(Xi ≥ t∗ ) ≥ r∗ /(2M ), sup Se(0) T 1 ; M ≥ r∗ /2 (k) k∈1...KN i=1 2 2 occurs with probability at least 1 − e−nr∗ /(2M ) − ne−n(r∗ −2/n) 1 ) ≥ r /2. On Ωr∗ , we have supk∈1...KN Se(0) (T(k) ∗ Lemma B.5. Define 2 /(8M 2 ) . o Ke,ε Under (C2), the event Ωe,ε = ( sup ecz Lz kβ k∞ D = log(n/ε) Dh∗ sup I(δi i > 1)e i=1,...,n t∈[0,t∗ ] β o> Zi (t) (B.2) < Ke,ε ) (B.3) occurs with probability at least 1 − ε. Lemma B.6. Define the IPW weights with true G(t) as ω ei (t) = ri (t)G(t)/G(Xi ∧ t) and o n p ω Cn,p,ε = 4(M/r∗ )2 (1 + Kc t∗ ) 4 log(2/ε)/n + Kc t∗ /n . n o ω On event Ωr∗ , ΩKM,ε = supt∈[0,t∗ ] supt∈[0,t∗ ] |ωi (t) − ω ei (t)| ≤ Cn,p,ε occurs with probability at least Pr(Ωr∗ ) − ε. 27 e (l) (t, β o ). Let T 1 , . . . , T 1 Lemma B.7. Define ∆(l) (t) = S(l) (t, β o ) − S (1) (KN ) be the observed type-1 events for some KN ≤ n. Denote ( ) r r l 2 (1 + K t∗ ) 2 K t∗ l /ε) K K 4M 4 log(2/ε) 2 log(2np 4M 1 e,ε c c (l) Cn,p,ε = + + + r∗2 n r∗2 n n n 2l as in (45) Under (C1) and (C2), ( Ω∆,ε = max sup l=0,1,2 k∈1...KN  1 ∆(l) T(k)  max (l) ≤ Cn,p,ε ) ∩ Ωr∗ ∩ Ωe,ε ∩ ΩKM,ε , (B.4) with Ωr∗ , Ωe,ε and ΩKM,ε defined in Lemmas B.4, B.5 and B.6, occurs with probability at least 2 2 2 2 1 − e−nr∗ /(2M ) − ne−n(r∗ −2/n) /(8M ) − 5ε. On Ω∆,ε , we have for l = 1, 2,     1 , βo e (l) T 1 , β o S(l) T(k) S (k) (l) (0)    − sup ≤ 2{Cn,p,ε + (K/2)l Cn,p,ε }/r∗ . o 1 (0) e k∈1...KN S (0) T 1 , β o S T , β (k) (k) max Proof of Lemma 1. o 1 ,...,T1 Let T(1) (KN ) be the observed type-1 events. We may decompose the score ṁ(β ) as its martingale proxy plus an approximation error,   o X n  e T 1 , β o − Z̄ T 1 , β o . ė o ) + n−1 ṁ(β o ) = m(β Z (k) (k) k=1,...,KN Rt Recall that the counting process for observed type-1 event can be written as Nio (t) = 0 I(Ci ≥ ė o ) takes the form of the Cox model score with counting process {Nio (t)} u)dNi1 (t). Moreover, m(β and at-risk process {I(Ci ≥ t)Yi (t)}. The “censoring complete” filtration Ft∗ can also be equivalently generated by {Nio (t), I(Ci ≥ t)Yi (t), Zi (t)}. Thus, we may apply Huang et al. (2013) Lemma 3.3 under (39) from (C1), 2 ė o )k∞ > Kx) ≤ 2pe−nx /2 . Pr(km(β Notice that the inequality is sharper than that in Lemma A.2(i) because the compensator part of ė o ) is zero. m(β The concentration result for approximation error     1 , βo e (1) T 1 , β o     S(1) T(k) S (k) e T 1 , β o − Z̄ T 1 , β o =   −  Z (k) (k) 1 , βo 1 , βo S (0) T(k) Se(0) T(k) is established in Lemma B.7 on Ω∆,ε . We obtain the concentration inequality for ṁ(β o ) by adding the bounds and tail probabilities together. Proof of Lemma 2. Our strategy here is the same as that for Lemma 1. We first show that κ(ξ, O; m̈(β o )) is lower ë o )) plus a diminishing error. Since m(β ë o ) takes the form of a Cox model bounded by κ(ξ, O; −m(β Hessian, we then may apply the results from Huang et al. (2013). 28 By Lemma 4.1 in Huang et al. (2013) (for a similar result, see van de Geer and Bühlmann (2009) Corollary 10.1), ë o )) − so (ξ + 1)2 km̈(β o ) − m(β ë o )kmax . κ2 (ξ, O; −m̈(β o )) ≥ κ2 (ξ, O; −m(β o 1 ,...,T1 ë o ) as Let T(1) (KN ) be the observed type-1 events. We can write m̈(β ) − m(β       1 , βo e (2) T 1 , β o KN     S S(2) T(k) X ⊗2 ⊗2 (k) 1 e T 1 , βo .  −   − Z̄ T(k)  , βo +Z −n−1 (k) o o 1 1 (0) (0) e T(k) , β S T(k) , β k=1 S e β o )k∞ are both bounded by K/2. On By Lemma B.3, supt∈[0,t∗ ] kZ̄(t, β o )k∞ and supt∈[0,t∗ ] kZ(t, ë o )kmax ≤ the with l = 2 and twice with l = 1 to get km̈(β o ) − m(β n Ω∆,ε , we apply Lemma B.7 once o (2) (1) (0) 2Cn,p,ε + 4KCn,p,ε + (5/2)K 2 Cn,p,ε /r∗ . Our (C1) and (C3) contains all the condition for Theorem 4.1 in Huang et al. (2013). Hence, we may apply their result   q  2 o 2 2 2 ∗ ∗ 2 ë κ (ξ, O; −m(β )) ≥ κ (ξ, O; Σ(M ))−so (ξ+1) K (1 + t Kh ) 2 log p(p + 1)/ε /n + (2/r∗ )t Kh tn,p,ε with probability at least Pr(Ω∆,ε ) − 3ε. We have bounded Se(0) (t; M ) away from zero at all observed 2 2 type-1 events in Ω∆,ε , so the e−nr∗ /(8M ) term is absorbed into Pr(Ω∆,ε ). Proof of Theorem 1. Observe that the same techniques as those of Huang et al. (2013) apply (see for example Lemmas 3.1 and 3.2 therein). The structure of the partial likelihood is the same as that of the Cox model modular the IPW weight functions wj (t). Following the same line of proof we can easily obtain b − β o k1 ≤ kβ eς (ξ + 1)so λ 2 2κ ξ, O; −m̈(β o ) (B.5) with ςb = supt∈[0,t∗ ] sup1≤i<j≤n |b> {Zi (t) − Zj (t)}| in the event kṁ(β o )k1 ≤ λ(ξ − 1)/(ξ + 1). The proof is then completed by utilizing Lemma 1 and Lemma 2. Proof of Theorem 1*. Since we assume (D1) now, the relative risks are bounded almost surely from above and below o> by constants 0 < e−Kb ≤ eβ Zi (t) ≤ eKb < ∞. We may set M = eKb to directly obtain (C1) and (C3) from (D2) and (D4). We can also improve the rate of estimation error in Theorem 1 by log(n) because we need not let Ke,ε in Lemma B.7 to grow with n. Proof of Lemma 3. Denote U= Z 0 t∗ {Z(t) − µ(t)}dN o (t). Without loss of generality, we set j = 1. Since we define γ ∗1 = argminγ Γ̄(γ) as the minimizer of a convex function, it must satisfy the first order condition n o ∗ ∇γ Γ̄(γ ∗1 ) = E (U1 − U > γ )U −1 = 0p−1 . −1 1 29 Recall that τ12 = Γ̄(γ ∗1 ). Applying the first order condition, we get ∗ 2 > ∗ τ12 = E{U1 − U > −1 γ 1 } = E{(U1 − U −1 γ 1 )U1 }. > 2 p We construct a vector θ 1 = (1, −γ ∗> 1 ) /τ1 ∈ R . Then, θ 1 satisfies ∗> > 2 > θ> 1 Σ = (1, −γ 1 ) E{U U }/τ1 = (1, 0p−1 ). Hence, we have (θ 1 , . . . , θ p )> = Σ−1 = Θ. We can directly bound kγ ∗j k1 = kθ j /Θj,j k1 − 1 ≤ Kγ − 1 < Kγ . By (D4), the minimal eigenvalue of Σ is at least ρ∗ . We obtain through a spectral decomposition that the maximal eigenvalue of Θ = Σ−1 is at most ρ−1 ∗ . Hence, we have  −1 τj2 = e> Θe ≥ ρ∗ j j and kΘk1 ≤ max kθ j /Θj, jk max |Θj,j | ≤ Kγ /ρ∗ . j=1,...,p Lemma B.8. Denote j=1,...,p e (l) (t, β o ) ∆(l) (t) = S(l) (t, β o ) − S (B.6) e (l) (t, β o ) in (32). Under (D1) - (D3) and (D5), for S(l) (t, β o ) in (4) and S p  (i) supt∈[0,t∗ ] k∆(0) (t)kmax = Op log(n)/n ; supl=1,2 supt∈[0,t∗ ] k∆(l) (t)kmax , supt∈[0,t∗ ] kZ̄(t, β o )−  p e β o )k∞ , supt∈[0,t∗ ] kZ(t, e β o )−µ(t)k∞ and supt∈[0,t∗ ] kZ̄(t, β o )−µ(t)k∞ are all Op Z(t, log(p)/n ; (ii) Define ∆i (t) = {ωi (t) − I(Ci > t)}Yi (t). Let φ(Z) be a differentiable operator Rp 7→ Rq ∗ adapted process uniformly bounded by Kφ  1 with k∇φ(Z)k1 < Lh  1, and g(t) be a Ft− 0 q 0 in R with bound kg(t)kmax = Kg  1. Whenever qq = p, we have n −1/2 n Z X i=1 t∗ n 0 −1 n X j=1 ∆j (t)φ(Zj (t))g(t)> I(Ci ≥ t)dMi1 (t) = op (1); (B.7) max o o o e e e e ∈ Rp , sup (iii) for any β t∈[0,t∗ ] kZ̄(t, β ) − Z̄(t, β)k∞ = Op (kβ − β k1 ); if kβ − β k1 = op (1), e> o> sup sup i=1,...,n t∈[0,t∗ ] Proof of Lemma 6. eβ Zi (t) eβ Zi (t) e − β o k1 ). = Op (kβ − e S (0) (t, β o ) S (0) (t, β) 30 Since ωi (t)Yi (t) 6= I(Ci ≥ t)Yi (t) implies i > 1 thus Ni1 (t∗ ) = 0, we have the equivalence dNio (t) = ωi (t)dNi1 (t) = I(Ci ≥ t)dNi1 (t). Recall for the following calculation that (l) o S (t, β ) = n −1 n X ωi (t)Yi (t)eβ o> Zi (t) Zi (t)⊗l , i=1 e (l) (t, β o ) = n−1 S n X i=1 o I(Ci ≥ t)Yi (t)eβ o> Zi (t) Zi (t)⊗l , e (l) (t, β o ), ∆ (t) = S (t, β ) − S e (l) (t, β o )} = s(l) (t, β o ) E{S(l) (t, β o )} = E{S (l) (l) Z̄(t, β o ) = S(1) (t, β o )/S (0) (t, β o ), e βo ) = S e (1) (t, β o )/Se(0) (t, β o ), Z(t, µ(t) = s(1) (t, β o )/s(0) (t, β o ), Yi (t) = 1 − Ni1 (t−) Z t o> and Mi1 (t) = Ni1 (t) − Yi (t)eβ Zi (u) h10 (u)du. 0 We decompose √ o nṁ(β ) =n −1/2 n Z X i=1 =n −1/2 =n −1/2 +n −1/2 + n−1/2 + n−1/2 t∗  0 n Z X i=1  0 n Z X i=1 t∗ t∗ 0 n Z X Zi (t) − Z̄(t, β o ) dNio (t) Zi (t) − Z̄(t, β o ) ωi (t)dMi1 (t) n o e β o ) I(Ci ≥ t)dM 1 (t) µ(t) − Z(t, i t∗ i=1 0 n Z t∗ X i=1 0 n Z t∗ X i=1 0 n o e β o ) − Z̄(t, β o ) I(Ci ≥ t)dM 1 (t) Z(t, i  Z̄(t, β o ) − µ(t) ∆(0) (t)h10 (t)dt {Zi (t) − µ(t)} ωi (t)dMi1 (t) ,I1 + I2 + I3 + I4 . p e β o )k∞ = Op ( log(p)/n) from Lemma Notice that I1 is a Ft∗ martingale. We have kµ(t) − Z(t, p √ 2 B.8(i). Hence, we can apply Lemma A.2(ii) to get kI1 k∞ = nOp ( log(p)/n ) = op (1). We further decompose I2 into 3 terms − n−1/2 + n−1/2 ,I20 + I200 n Z X t∗ i=1 0 n Z t∗ X i=1 0 + I2000 . n X ∆(1) (t) 1 −1/2 I(C ≥ t)dM (t) − n i i Se(0) (t, β o ) i=1 ∆(0) (t) Se(0) (t, β o ) Z 0 t∗ ∆(0) (t) Se(0) (t, β o ) {µ(t) − Z̄(t, β o )}I(Ci ≥ t)dMi1 (t) 31 µ(t)I(Ci ≥ t)dMi1 (t) By (D1) and (D3), each Mi1 (t) has one jump at observed event time and eKb Kh −Lipschitz elsewhere. Since the {Ci , Ti1 : i = 1, . . . , n} is a set of independent continuous random variables, there is no tie among them with probability one. Hence, we may modify the integrand in I20 and I200 at observed cenP o> soring times without changing the integral. Replacing ∆(l) (t) with n−1 nj=1 ∆i (t)eβ Zi (t) Zi (t)⊗l , we can apply Lemma B.8(ii) to get that kI20 k∞ and kI200 k∞ are both op (1). The total variation of Mi1 (t) is at most max{1, eKb Kh t∗ }  1. By Lemma B.8(i), k∆(0) (t){µ(t)− p p 000 Z̄(t, β o )}k∞ = Op ( log(n) log(p)/n). p Hence, we obtain kI2 k∞ = Op ( log(n) log(p)/n) = op (1). Similarly, we obtain kI3 k∞ = Op ( log(n) log(p)/n) = op (1). Besides the one in Lemma B.6, ωi (t) − ω ei (t) has another martingale representation. Denote the Nelson-Aalen estimator n Z t X I(Xi ≥ u) c b Pn dNic (u). H (t) = I(X ≥ u) j 0 j=1 i=1 We have a Ft martingale M c (t) b c (t) − =H Z t c h (u)du = 0 n Z X i=1 0 t I(Xi ≥ u) Pn dMic (u). j=1 I(Xj ≥ u)  By Lemma A.2(i), supt∈[0,t∗ ] |M c (t)| = Op n−1/2 For t > Xi and δi i > 1, with an error Ri (t) = ωi (t) − ω ei (t) = −e ωi (t) Z t I(u > Xi )dM c (u) + Ri (t) 0  R  Z t n o b t G(t) b c (Xi ) − H b c (t) + G(t) e− 0 I(u>Xi )dM c (u) + − exp H I(u > Xi )dM c (u) . b i) G(Xi ) G(X 0 It is the discrepancy between the Kaplan-Meier and the Nelson-Aalen plus a second order Tailer expansion remainder. We shall show that it is Op (1/n). Since Z t   I(u > Xi )dM c (u) ≤ 2 sup |M c (t)| = Op n−1/2 , t∈[0,t∗ ] 0 the second order remainder e− Rt 0 I(u>Xi )dM c (u) + Z t I(u > Xi )dM c (u) = Op (1/n). 0 P P Under (D2), { ni=1 I(Xi ≥ t)}−1 ≤ { ni=1 I(Xi ≥ t∗ )}−1 = Op (1/n). Let ck be an observed b b c (t) at ck is a second order remainder censoring time. The increment in − log(G(t)) −H    1 1 log 1 − Pn − Pn = Op n−2 . i=1 I(Xi ≥ ck ) i=1 I(Xi ≥ ck ) b b c (t)| = Op (1/n). Applying the Mean Value Theorem, we obtain Hence, supt∈[0,t∗ ] | − log(G(t)) −H b − exp{−H b c (t)}| = Op (1/n). Under (D2), G(t) ≥ G(t∗ ) > r∗ and − log(G(t)) ≤ supt∈[0,t∗ ] |G(t) b b c (t) are uniformly √n consistent. − log(G(t∗ )) < − log(r∗ ). We have shown that both G(t) and H b i ) is bounded away from zero and H b c (t) is bounded with probability tending We obtain that G(X to one. Putting these together, we obtain supi=1,...,n supt∈[0,t∗ ] |Ri (t)| = Op (1/n). 32 Define e(t) = n q Pn −1 −1 n X i=1 I(t ≥ Xi ) Z t∗ t {Zi (u) − µ(u)} ω ei (u)dMi1 (u), π b(t) = n q(t)}, π(t) = E{b π (t)}. We write I4 as i.i.d. sum plus i=1 I(Xi ≥ t) and q(t) = E{e error through integration by parts, n −1/2 =n−1/2 n Z X t∗ i=1 0 n Z t∗ X i=1 0 {Zi (t) − µ(t)} ω ei (t)dMi1 (t) +n −1/2 {Zi (t) − µ(t)} ω ei (t)dMi1 (t) + n−1/2 n Z X t∗ i=1 0 n Z t∗ X i=1 0 n X Z t∗ n Z t∗ X {Zi (t) − µ(t)} {ωi (t) − ω ei (t)}dMi1 (t) {Zi (t) − µ(t)} Ri (t)dMi1 (t) q(t) q(t) I(Xk ≥ u)dMkc (t) + n−1/2 {b π (t) − π(t)}I(Xk ≥ u)dMkc (t) π(t) π b (t)π(t) k=1 0 k=1 0 Z ∗ n X t 1 e(0)} I(Xk ≥ u)dMkc (t) + n−1/2 {q(0) − q π b (t) k=1 0 Z ∗ n X t {q(0) − q(t) − q e(0) + q e(t)} − n−1/2 I(Xk ≥ u)dMkc (t) π b (t) 0 − n−1/2 (1) ,I4 + (1) (3) k=1 (2) (3) I4 + I4 (4) (5) (6) + I4 + I4 + I4 . I4 +I4 is already a sum of i.i.d.. We have shown that supt∈[0,t∗ ] |Ri (t)| = Op (1/n). Hence, we have  R t∗ (2) ei (u)dMi1 (u) is uniformly bounded kI4 k∞ = Op n−1/2 = op (1). I(t ≥ Xi ) t {Zi (u) − µ(u)} ω by K(Kh t∗ + 1). It has at most one jump and is KKh −Lipschitz elsewhere. Hence, we can apply p e(t)k∞ = Op ( log(p)/n) and supt∈[0,t∗ ] |π(t) − π Lemma A.1(ii) to get supt∈[0,t∗ ] kq(t) − q b(t)| = p R ∗ P (5) (4) (6) t n b(t)−1 I(Xk ≥ u)dMkc (t) in I4 are all Ft Op ( log(n)/n). Notice that I4 , I4 and n−1 k=1 0 π p (4) martingales. We may apply Lemmas A.2(i) and A.2(ii) to obtain I4 = Op ( log(n) log p/n) = p √ (5) (6) op (1), I4 = Op ( log p/n) = op (1) and I4 = Op (log p/ n) = op (1). By Lemma 3, we can bound the l1 norm of c> Θ by kc> Θk1 = p X p X i=1 j=1 |ci ||Θij | ≤ p X i=1 |ci |Kγ /ρ∗ = Kγ /ρ∗ . Finally, we write c> Θṁ(β o ) as i.i.d. sum "Z ∗ Z n t X −1/2 > 1 n c Θ {Zi (t) − µ(t)} ω ei (t)dMi (t) − ,n−1/2 i=1 n X i=1 0 0 t∗ # q(t) I(Xi ≥ u)dMic (t) + op (1) π(t) c> Θ{η i − ψ i } + op (1). We have E{c> Θη i } = 0 because of its martingale structure. We show E{c> Θψ i } = 0 again by 33 introducing its martingale proxy "Z ∗ t E{c> Θψ i } = E 0 +E "Z # c> Θ {Zi (t) − µ(t)} I(Ci ≥ t)dMi1 (t) 0 t∗ > c Θ {Zi (t) − µ(t)} E{e ωi (t) − I(Ci ≥ # t)|Ti , Zi (·)}dMi1 (t) . The first term above is zero because of the martingale structure. The second term is zero because the IPW weights satisfy E{e ωi (t) − I(Ci ≥ t)|Ti , Zi (·)} = 0. Each c> Θ{ψ i − η i } is mean zero and bounded by Kγ /ρ∗ K(1 + Kh t∗ ) + Kγ /ρ∗ K(1 + Kh t∗ )(1 + Kc t∗ )2/r∗ with probability equaling one. The variance c> ΘVΘc has a bounded and non-degenerating limit ν 2 . Hence, {c> Θ(ψ i − η i ) : i = 1, . . . , n} satisfies the Lindeberg condition. By Lindeberg-Feller CLT, P √ c> Θṁ(β o ) c> Θ ni=1 {η i − ψ i } d √ √ n = + op (1) → N (0, 1). > > c ΘVΘc nc ΘVΘc Proof of Lemma 7. We define ei = η with Z t∗ 0 fi1 (u), {Zi (u) − µ(u)}e ωi (u)dM fi1 (t) = Nio (t) − n−1 M n Z X j=1 0 t o> Yi (u)eβ Zi (u) dNjo (u). Se(0) (u, β o ) f1 (t) is at most 1 + 2e2Kb /r∗ with probability tending Under (D1) and (D2), the total variation of M i e i and η b i is to one by Lemma B.4*. The difference between η ( o> ) n Z t∗ b > Zi (u) β Zi (u) β X e e −1 b bi − η e i =n η dNjo (u) {Zi (u) − Z̄(u, β)}ω − i (u)Yi (u) o (0) (0) b e S (u, β ) S (u, β) j=1 0 Z t∗ b i (u)}dM fi1 (u). + {µ(u)e ωi (u) − Z̄(u, β)ω 0   p b − β o k1 + log(p)/n . e i k∞ = Op kβ By Lemmas B.6, B.8(i) and B.8(iii), supi=1,...,n kb ηi − η Then, we study n Z t∗ X e i = n−1 ηi − η {Zi (u) − µ(u)}e ωi (u)I(Cj ≥ u)dMj1 (u). j=1 0 We have the bound kZi (u) − µ(u)k∞ ≤ K from Lemma B.3. ω ei (u) is not Ft∗ measurable, but we ∗ can define a new filtration Fi,t = σ{Xi , δi , i , Zi (·), I(Cj ≥ u), Nj1 (u), Zj (·) : u ≤ t, j 6= i} for each i, such that X Z t∗ −1 e i + Op (1/n) n {Zi (u) − µ(u)}e ωi (u)I(Cj ≥ u)dMj1 (u) = η i − η j6=i 0 34 ∗ martingale. Hence, we can apply Lemma A.2(i) to get is a Fi,t   p e i k∞ ≥ K(1 + eKb Kh t∗ ) 4 log(2np/ε)/n + K(1 + 2eKb Kh t∗ )/n ≤ ε/n. Pr kη i − η p e i k∞ = Op ( log(p)/n). Hence, supi=1,...,n kb η i − η i k∞ = Taking union bound, we get kη i − η   p b − β o k1 + log(p)/n . Op kβ b(t) and q(t) also take a similar form. We can likewise define Recall that q e(t) = n q and ∗ −1 e (t) = n q n X Z I(t > Xi ) t i=1 −1 n X t∗ I(t > Xi ) Z t∗ t i=1 f1 (u) {Zi (u) − µ(u)}e ωi (u)dM i {Zi (u) − µ(u)}e ωi (u)dMi1 (u). By Lemmas B.6, B.8(i) and B.8(iii), we have sup   p b − β o k1 + log(p)/n . b(t)k∞ = Op kβ sup ke q(t) − q i=1,...,n t∈[0,t∗ ] By Lemma A.1(ii), supt∈[0,t∗ ] ke q∗ (t) − q(t)k = Op ∗ e (t) − q e(t) = n q −1 n X I(t > Xi )n i=1 −1 n Z X t∗  p log(p)/n . We only need to find the rate for n−1 t j=1 n X i=1 {Zi (u) − µ(u)}e ωi (u)I(Cj ≥ u)dMj1 (u). ∗ martingale e i . Applying Lemma A.2(ii) to the Fi,t We repeat the trick for η i − η Mqi (t) =n −1 XZ j6=i t n−1 0 n X i=1 {Zi (u) − µ(u)}e ωi (u)I(Cj ≥ u)dMj1 (u) and obtain supi=1,...,n supt∈[0,t∗ ] kMqi (t)k∞ = Op ( p sup kMqi (t)k∞ + Op (1/n) = Op ( log(p)/n). e(t)k∞ ≤ 2 sup sup ke q∗ (t) − q t∈[0,t∗ ] p log(p)/n). Hence, i=1,...,n t∈[0,t∗ ]   p b − β o k1 + log(p)/n . Putting the rates together, we have supt∈[0,t∗ ] kb q(t) − q(t)k∞ = Op kβ  p We can directly obtain supt∈[0,t∗ ] |b π (t) − π(t)| = Op log(n)/n from Lemma A.1(ii). Define e = ψ i Z t∗ 0 q(t) cc dMi (t) π(t) cc (t) is at most 1 + 2/r∗ with probability tending to one by Lemma B.4*. The total variation of M i   p o b e b Using the results so far, we have sup kψ − ψ k∞ = Op kβ − β k1 + log(p)/n . The i=1,...,n remainder e = n−1 ψi − ψ i n Z X j=1 0 t∗ i i q(t) I(Ci ≥ t)I(Xj ≥ t)dMjc (t) π(t) 35 is a Ft martingale. We can put the n martingales in Rp into a Rnp vector and apply Lemma A.2(i), p  p  e k∞ = Op sup kψ i − ψ log(np)/n = O log(p)/n . p i i=1,...,n   p b k∞ = Op kβ b − β o k1 + log(p)/n . Therefore, we get supi=1,...,n kψ i − ψ i Finally, we decompose b − Vkmax ≤n−1 kV n X i=1 + n−1 + n b k∞ kb b − η − ψ k∞ kb ηi + ψ ηi + ψ i i i i n X b − η − ψ k∞ kη + ψ k∞ kb ηi + ψ i i i i i i=1 n X −1 i=1 (η i + ψ i )(η i + ψ i )> − V . max b − η − ψ k∞ = op (1). Moreover, sup b k∞ is We have shown that supi=1,...,n kb ηi + ψ ηi + ψ i i i i=1,...,n kb i Pn > is an −1 + ψ )(η + ψ ) (η Op (1) by Lemmas B.3 and B.4*. In addition, we observe that n i i i i=1 i average of i.i.d. terms whose expectation is defined as V. By Lemmas B.3 and B.4*, we have the uniform maximal bound sup k(η i + ψ i )(η i + ψ i )> kmax = sup k(η i + ψ i )k2∞ i=1,...,n i=1,...,n is also Op (1). We finish theP proof by applying Hoeffding (1963) inequality to the last term in the n > −1 decomposition above, n i=1 (η i + ψ i )(η i + ψ i ) − V max . Lemma B.9. On the event Ωγ := have under (D4) n b ∇γ Γj γ ∗j , β  ∞ o ≤ (ξj − 1)λj /(ξj + 1), ∀j = 1, . . . , p , we b j − γ ∗j belongs to the cone e j := γ (i) the estimation error γ Cj (ξj , Oj ) := {v ∈ Rp−1 : kvOjc k1 ≤ ξj kvOj k1 } (B.8) (ii) and kb γ j − γ ∗j k1 ≤ {sj λj (ξj + 1)}/{2κj (ξj , Oj )2 }, with compatibility factor κj (ξj , Oj ) = sup 06=g∈Cj (ξj ,Oj ) q b sj g> ∇2γ Γ(γ ∗ , β)g kgOj k1 (B.9) for all j = 1, . . . , p. Lemma B.10. Under (D1)-(D5), maxj=1,...,p Lemma B.11. Under (D1)-(D5),   p b −Σ (i) Σ = Op so log(p)/n ; b ∇γ Γj γ ∗j , β max 36  ∞ = Op  b − β o k1 + kβ  p log(p)/n . e such that kβ e − β o k1 = op (1), (ii) for any β e −Σ −m̈(β) max   p e − β o k1 + log(p)/n . = Op kβ Lemma B.12. Under (D1)-(D5), setting ξmax = maxj=1,...,p ξj  1, we have   Pr inf κj (ξj , Oj )2 ≥ ρ∗ /2 → 1. j Proof of Lemma 4. p By Lemma B.10, we may choose ξ1 = · · · = ξp = 2 and λ1 = · · · = λp = λε  Op (so log(p)/n) such that Ωγ defined in Lemma B.9 occurs with probability 1 − ε. Then, we establish the oracle inequality by Lemma B.9,     2λε ∗ 2 Pr max kb γ j − γ j k1 /sj ≤ ≥ Pr min κj (ξj , Oj ) ≥ ρ∗ /2 − ε. j=1,...,p j=1,...,p ρ∗  2 We have shown that Pr min  j=1,...,ppκj (ξj , Oj ) ≥ ρ∗ /2 tends to one in Lemma B.12. Hence, maxj=1,...,p kb γ j − γ ∗j k1 = Op so smax log(p)/n . R t∗ Define according to (49) U i = 0 {Zi (t)−µ(t)}dNio (t). By Lemma B.3, supi=1,...,n kU i k∞ ≤ K. We introduce n n Z t∗ X X −1 > ∗ −1 e Γj (γ) = n {Uj − U i,−j γ j } = n {Zij (t) − µj (t) − γ > Zi,−j (t) + γ > µ−j (t)}2 dNio (t) i=1 i=1 0 and decompose b −Γ e j (γ ∗ ) + Γ e j (γ ∗ ) − Γ̄j (γ ∗ ). τbj2 − τj2 = Γj (b γ j , β) j j j   p b −Γ e j (γ ∗ ) = Op so sj log(p)/n by the results from Theorem 1*, Lemma B.8 and first Γj (b γ j , β) j e j (γ ∗ ) is the average of i.i.d. terms. The expectation of the part of this Lemma. Apparently, Γ j ∗ ∗ e summands in Γj (γ j ) is defined as Γ̄j (γ j ) in (49). Hence, we finish the proof by applying Hoeffding (1963). b Lemma Along with  3, we can prove with the previous results in this Lemma, kΘ − Θk1 = p Op so smax log(p)/n . Proof of Lemma 5. We decompose o √ √ √ √ >n b = nc> {Θ − Θ} b + nc> Θ{ṁ(β o ) − ṁ(β)} b + nc> (β o − β). b b ṁ(β) nc Θṁ(β o ) + β o − b (B.10) p b b By Lemma 4, kΘ − Θk1 = Op (so smax log(p)/n). Each summand in ṁ(β) is the integral of b over a counting measure dN o (t). By the KKT condition Zi (t) minus a weighted average Z̄(t, β) i p b and Theorem 1*, kṁ(β)k∞  λ  O( log(p)/n). Putting these together, we obtain √ > √ √  b ≤ nkck1 kΘ − Θk b ∞ = Op so smax log(p)/ n = op (1). b ṁ(β)| b 1 kṁ(β)k n|c {Θ − Θ} b ≤ λ  n−(1/2−d) . Hence, the first term in (B.10) By the KKT condition and Theorem 1, kṁ(β)k is op (1). Like in the proof of Lemma 6, we have kc> Θk1 ≤ kck1 kΘk1 ≤ Kγ /r∗ from Lemma 3. 37 b − β o ). Applying mean value theorem to h(r) = c> Θṁ(βr ), we get Define β r = β o + r(β b = −h0 (e b − βo ) c> Θṁ(β o ) − c> Θṁ(β) r) = −c> Θm̈(β re)(β  p  b − β o k1 = Op so log(p)/n . By for some re ∈ [0, 1]. By Theorem 1*, we have kβ re − β o k1 = rekβ  p  Lemma B.11(ii), k − m̈(β re) − Σkmax = Op so log(p)/n . Along with Theorem 1* and Lemma 3, we have √ > √ b + c> (β o − β)| b = n|c> Θ{Σ + m̈(β )}(β o − β)| b n|c Θ{ṁ(β o ) − ṁ(β)} re √ b − β o k1 ≤ nkck1 kΘk1 k − m̈(β re) − Σkmax kβ  √ =Op s2o log(p)/ n . Proof of Theorem 2. Be Lemmas 6 and 5, we have b − β o ) √ Θṁ(β o ) √ c> (b d = n + op (1) → N (0, 1). n > > > > c ΘVΘ c c ΘVΘ c In Lemma 7, we have shown that kVkmax is bounded by K 2 (1 + Kh eKb t∗ )2 {1 + 2(1 + Kc )/r∗ }2 with probability tending to one. In Lemma 3, we have shown that kΘk1 is bounded by Kγ /ρ∗ . Then, we can apply Lemmas 7 and 4 to get > bV bΘ b c| ≤kck1 kΘ − Θk b 1 kVkmax kΘk1 kck1 |c> ΘVΘ> c − c> Θ b − Θk1 }kV − Vk b max kΘk1 kck1 + kck1 {kΘk1 + kΘ b − Θk1 }{kV b − Vkmax + kVkmax }kΘ − Θk b 1 kck1 + kck1 {kΘk1 + kΘ b 1 ) + Op (kV − Vk b max ) = op (1). =2Op (kΘ − Θk Note that we use the following fact p p p p X X X X kc Θk1 = | ci Θi,j | ≤ |ci | |Θi,j | ≤ kck1 kΘk1 . > j=1 C i=1 i=1 j=1 Proofs of Preliminary Results Proof of Lemma B.3. P P Notice all ai (t)’s are nonnegative. Hence, ni=1 |ai (t)| = ni=1 ai (t). We apply Hölder’s inequality for each coordinate Pn  Pn  n n o n o X ai (t)Zi (t)⊗l |ai (t)| ai (t) ⊗l ⊗l i=1 Pn Pn = Z (t) . Zi (t) ≤ Pi=1 sup i ai (t) | ni=1 ai (t)| i=1,...,n j j i=1 ai (t) i=1 j i=1 Pn Hence, the maximal norm of i=1 ai (t)Zi (t)⊗l is bounded by (K/2)l under (39). Similar result can be achieved with the sum replaced by the expectation. e (l) (t, β)/Se(0) (t, β) and s(l) (t, β)/s(0) (t, β), we To apply the result above to S(l) (t, β)/S (0) (t, β), S > > set ai (t) as ωi (t)Yi (t)eβ Zi (t) and I(Ci ≥ t)Yi (t)eβ Zi (t) . 38 Proof of Lemma B.4. Since {I(Xi ≥ t∗ ), i = 1, . . . , n} are i.i.d. Bernoulli random variable, we may apply Hoeffding (1963) inequality for lower tail, ! n X −1 ∗ ∗ Pr n I(Xi ≥ t ) < Pr(Xi ≥ t ) − x ≤ exp(−2nx2 ). i=1 By (40), we can find lower bounds for the probability Pr(Xi ≥ t∗ ) ≥ Pr(Ci ≥ t∗ , ∞ > Ti1 ≥ t∗ ) = G(t∗ ) E{F1 (∞; Zi ) − F1 (t∗ ; Zi )} ≥ r∗ /M. We may relax the inequality at x = r∗ /(2M ) to Pr n−1 n X i=1 I(Xi ≥ t∗ ) < r∗ /(2M ) ! 2 2 ≤ e−nr∗ /(2M ) . Because I(Ci ≥ t) ≥ I(Ci ≥ t∗ ) and Yi (t) ≥ Yi (t∗ ), Se(0) (t; M ) is a lower bound for Se(0) (t). The summands in Se(0) (t; M ) are i.i.d. uniformly bounded by M . Thus, we may apply Lemma A.1(i) with one-sided version, ! 2 Pr sup Se(0) (t; M ) < E{Se(0) (t; M )} − M x − M/n < ne−nx /2 . k∈1...KN By (C2), the expectation has a lower bound h i o> E{Se(0) (t; M )} = G(t∗ ) E {1 − F1 (t; Zi )} min{M, eβ Zi (t) } > r∗ . We relax the inequality at x = (r∗ /2 − 1/n)/M , Pr e(0) S sup k∈1...KN (t; M ) < r∗ ! 2 /(8M 2 ) < ne−n(r∗ −2/n) . Proof of Lemma B.5. Since i > 1 implies Ti1 = ∞, the probability of observing a type-2 event conditioning on Zi (·) has an upper bound  Z ∞   β o> Zi (u) 1 Pr i > 1|Zi (·) = exp − e h0 (u)du 0   Z ∞   β o> Zi (u) 1 ≤ exp −Ke x I e ≥ Ke x h0 (u)du . 0 Hence, we may derive a bound for Pr δi i > 1, sup eβ t∈[0,t∗ ] o> Zi (t) > Ke ! ≤ Pr i > 1 39 sup eβ t∈[0,t∗ ] o> Zi (t) > Ke ! if we can bound  R ∞  βo> Z (u) o> 0 i I e ≥ K x h10 (u)du away from zero with a certain x whenever eβ Zi (t ) > e 0 Ke for some t0 ∈ [0, t∗ ]. Under (C2), there is an interval I 0 containing t0 of length D in which Zi (·) has no jumps. The variation of linear predictor is bounded sup β o> Zi (t) − β o Zi (t0 ) ≤ cz Lz kβ o k∞ D. t∈I 0 o> So, the relative risk eβ Zi (t) is greater than Ke exp{−cz Lz kβ o k∞ D} over I 0 . Hence, we get a lower bound for Z ∞   o> I eβ Zi (u) ≥ Ke exp{−cz Lz kβ o k∞ D} h10 (u)du ≥ Dh∗ . 0 We finish the proof by taking a union bound over i = 1, . . . , n. Proof of Lemma B.6. Rt Recall that Mic (t) = I(Ci ≤ t) − 0 I(Ci ≥ u)hc (u)du is a counting process martingale adapted to complete data filtration Ft . By Kalbfleisch and Prentice (2002), the Kaplan-Meier estimator b G(t) has the martingale representation M G (t) = n Z t X b b G(t) G(u−)I(X ≥ u) Pn i − 1 = n−1 dMic (u). −1 G(t) G(u)n I(X ≥ u) j 0 j=1 i=1 For δi i > 1 and t > Xi , ωi (t) − ω ei (t) = − b G(t) G(t) M G (Xi ) + M G (t), b i) G(Xi ) G(X so we will be able to establish a concentration result for the error from Kaplan-Meier n−1 n X o> {ωi (t) − ω ei (t)}Yi (t)eβ Zi (t) Zi (t)⊗l i=1 max ≤ 2Ke,ε (K/2)l sup |M G (t)| t∈[0,t∗ ] P if we first obtain a concentration result for supt∈[0,t∗ ] |M G (t)|. On event n−1 nj=1 I(Xj ≥ u) ≥ r∗ /(2M ), the integrated functions are Ft− -adapted with uniform p bound 2(M / r∗ )2 . The hazard c h (t) ≤ Kc by (C1). Hence, we may apply Lemma A.2(i) with x = 4 log(2/ε)/n to obtain ! n o p Pr sup |M G (t)| < 2(M/r∗ )2 (1 + Kc t∗ ) 4 log(2/ε)/n + Kc t∗ /n ≤ Pr(Ωr∗ ∩ Ωe,ε ) − ε. t∈[0,t∗ ] Proof of Lemma B.7. A sharper inequality is available if Zi ’s are not time-dependent. We may exploit the martingale structure of ∆(l) (t)/G(t). With general time-dependent covariates, we would decompose the apb and the error proximation error ∆(l) (t) into two parts, the error from Kaplan-Meier estimate G(t) from missingness in Ci ’s among the type-2 events. 40 Define the indicator υi (t) = I(t > Xi )I(δi i > 1). Since {ωi (t) − I(Ci ≥ t)}Yi (t) is non-zero only when υ(t) = 1, we may alternatively write (l) ∆ (t) = n n X o> {ωi (t) − I(Ci ≥ t)}υi (t)eβ Zi (t) Zi (t)⊗l . −1 i=1 We may use the upper bound supi=1,...,n supt∈[0,t∗ ] υi (t)eβ n−1 o> n X o> {ωi (t) − ω ei (t)}υi (t)eβ Zi (t) Zi (t)⊗l i=1 Zi (t) max ≤ Ke,ε on Ωe,ε . By Lemma B.6, ω ≤ Ke,ε (K/2)l Cn,p,ε on Ωe,ε ∩ ΩKM,ε . Define the error from missingness in Ci ’s among the type-2 events as n X o> {e ωi (t) − I(Ci ≥ t)}υi (t)eβ Zi (t) Zi (t)⊗l . e (l) (t) = n−1 ∆ i=1 Since E{ri (t)|Ti } = G(t ∧ Ti ), Fine and Gray (1999) has shown that E{e ωi (t)|Ti } = E{I(Ci ≥ t)|Ti } = G(t). n (l) o e (t) = 0. Hence, we can apply Lemma A.1(i) with Applying tower property, we have E ∆ p x = 2 log(2npl /ε)/n q !   (l) e Pr sup ∆ T1 ≤ Ke,ε (K/2)l 2 log(2npl /ε)/n + 1/n ≥ Pr(Ωr∗ ∩ Ωe,ε ) − ε. (k) k∈1...KN max This finishes the proof of the first result. We prove the other result by decomposing the differences into terms with ∆(l) (t), e (l) (t, β o ) 1 S(l) (t, β o ) S(l) (t, β o ) S (l) = ∆ (t) − − ∆(0) (t). S (0) (t, β o ) Se(0) (t, β o ) Se(0) (t, β o ) S (0) (t, β o )Se(0) (t, β o ) S(l) (t, β o )/S (0) (t, β o ) is the weighted average of Zi (t)⊗l , so its maximal norm is bounded by (K/2)l . On the event Ωr∗ , e (l) (t, β o ) S(l) (t, β o ) S − S (0) (t, β o ) Se(0) (t, β o ) ∞ ≤ 2 Kl k∆(l) (t)k∞ + l−1 |∆(0) (t)|. r∗ 2 r∗     1 1 We can simply plug in the bounds and tail probabilities for ∆(0) T(k) and ∆(1) T(k) in (B.4). Proof of Lemma B.4*. Consider the event Ωr∗ = ( n −1 n X i=1 ∗ ) I(Xi ≥ t )I(i = 1) ≥ r∗ /2 . 41 Each I(Xi ≥ t∗ )I(i = 1) is i.i.d. with expectation G(t∗ ) E[{F1 (∞; Z) − F1 (t∗ ; Z)}]. Applying 2 Hoeffding (1963) under (47), we get that Ωr∗ occurs with probability 1 − e−nr∗ . ∗ ∗ (0) (t, β o ) and S e(0) (t, β o ) are Apparently, we have I(XP i ≥ t ) ≥ I(Xi ≥ t )I(i = 1). Morevoer, S P n n ∗ −1 ∗ −K b . On Ω , sup both lower bounded by n r∗ t∈[0,t∗ ] |n/{ i=1 I(Xi ≥ t )}| ≤ 2/r∗ i=1 I(Xi ≥ t )e and ( ) max sup |S (0) (t, β o )−1 |, sup |Se(0) (t, β o )−1 | ≤ 2eKb /r∗ . t∈[0,t∗ ] t∈[0,t∗ ] Proof of Lemma B.8. (i) By (D1) and (D2), we have eβ o> Zi (t) Z ⊗l i (t) o> max ≤ (K/2)l eKb  1. Thus, all terms involved are bounded. Moreover, eβ Zi (t) Zi (t)⊗l jumps only at the jumps of Niz (t) by (D3). Define the outer product of arrays u ∈ Rp1 ×···×pd and v ∈ Rq1 ×···×qd0 as u ⊗ v ∈ Rp1 ×···×pd ×q1 ×···×qd0 , (u ⊗ v)i1 ,...,id+d0 = ui1 ,...,id × vid+1 ,...,id+d0 . Between two consecutive jumps of Niz (t), d βo> Zi (t) e Zi (t)⊗l dt = eβ ≤e o> Zi (t) Zi (t)⊗l β o> dzi (t) + I(l > 0)eβ o> Zi (t) max Kb Hence, eβ o> Zi (t) Z (t)⊗l i l l−1 {(K/2) Lz + I(l > 1)(K/2) lZi (t)⊗l−1 ⊗ dzi (t) max Lz }  1. satisfies the continuity condition for Lemma A.1(ii). e (l) (t) = Like in Lemma B.7, we first replace ωi (t) by ω ei (t) = ri (t)G(t)/G(Xi ∧ t). Denote ∆ P o> e (l) (t)kmax = ωi (t)−I(Ci ≥ t)}Yi (t)eβ Zi (t) Zi (t)⊗l . By Lemma B.6, supt∈[0,t∗ ] k∆(l) (t)−∆ n−1 ni=1 {e  e (l) (t), Op n−1/2 . Then, we apply Lemma A.1(ii) to the i.i.d. mean zero process ∆ q  (l) l e sup k∆ (t)kmax = Op log(np Kz )/n . t∈[0,t∗ ] Similarly, e (l) (t, β o ) − s(l) (t, β o )kmax = Op sup kS t∈[0,t∗ ] q  l log(np Kz )/n . Finally, we extend to results to the quotients by decomposition e (1) (t, β o ) 1 S(l) (t, β o ) S(1) (t, β o ) S (l) − = ∆ (t) − ∆(0) (t). S (0) (t, β o ) Se(0) (t, β o ) Se(0) (t, β o ) S (0) (t, β o )Se(0) (t, β o ) The denominators are bounded away from zero by Lemma B.4* by choosing M = eKb . Rt (ii) First, we show that ∆i (t) is related to the martingales Mic (t) = Nic (t)− 0 {1−Nic (u−)}hc (u)du. ∆i (t) is non-zero only after an observed type-2 event. To simplify notation, we define the indicator for non-zero ∆i (t), υi (t) = ri (t)Yi (t)I(t > Xi ) = I(δi i > 1)I(t > Xi ). 42 Denote the Nelson-Aalen type estimator for censoring cumulative hazard as n Z tnX n o−1 X c b H (t) = I(Xi ≥ u)dNic (u). I(Xj ≥ u) i=1 0 j=1 R b b i )−1+ t G(u−)d b b c (u)/G(X b i ). Let ck and ck+1 be two consecutive Define Ri (t) = G(t)/ G(X H Xi observed censoring times greater than Xi . The increment Ri (ck+1 ) − Ri (ck ) is in fact ( Pn ) b k) 1 G(c j=1 I(Xj ≥ ck+1 ) − 1 Pn = 0. − 1 + Pn b i) G(X j=1 I(Xj ≥ ck+1 ) j=1 I(Xj ≥ ck+1 ) For t > Xi , we have Ri (t) = 0. Thus, b b i ) − 1 + N c (t) − N c (Xi ) − Ri (t)}υi (t) ∆i (t) ={G(t)/ G(X i i Pn Z t Z t c j=1 I(Xj ≥ u)dMj (u) c Pn ωi (u−)υi (u) υi (u)dMi (u) − = + Xi Xi j=1 I(Xj ≥ u) Z t {I(Ci ≥ u) − ωi (u−)}υi (u)hc (u)du. + (C.11) Xi Notice υi (t) does not change beyond Xi if Ci > Xi , i.e. an event is observed. Since hc (u) ≤ Kc < ∞, we may modify the integrand at countable many points without changing the integral Z t Z t {I(Ci ≥ u) − ωi (u−)}υi (u)hc (u)du = − ∆i (u)hc (u)du. Xi Xi Hence, (C.11) gives an first order linear integral equation for ∆i (u). The general solution to the related homogeneous problem Z t ∆i (t) = − ∆i (u)hc (u)du, ∆i (Xi ) = 0 Xi has only one unique solution ∆i (t) = 0. Thus, R t we only need to find one specific solution to (C.11). Define an integral operator I ◦ f = Xi f (u)hc (u)du. Then, the solution to f (t) = g(t) − I ◦ f (t) can be written as f (t) = (1 − I + I 2 − I 3 + . . . ) ◦ g(t) , e−I ◦ g(t). By inductively using integration by parts, we are able to calculate Z t n   1 X n n−k n k c I ◦ g(t) = (−1) H (t) H c (u)k dg(t). n! k Xi k=1 Hence, the solution can be calculated as the series f (t) = = ∞ X (−1) I ◦ g(t) = n=1 ∞ Z t X k=1 Xi Z ∞ X n X {−H c (t)}n−k H c (u)k dg(u) (n − k)! k! Xi n=1 k=1 Z t ∞ X H c (u)k {−H c (t)}n−k dg(u) = G(t) G(u)−1 dg(u). k! (n − k)! Xi n n n=k 43 t Applying to (C.11), we get ∆i (t) = G(t) Z t Xi G(u)−1 dMi∆ (u), with a Ft − martingale Pn Z t Z t c j=1 I(Xj ≥ u)dMj (u) ∆ c Pn . Mi (t) = I(Ci ≥ u)υi (u)dMi (u) − ωi (u−)υi (u) 0 0 j=1 I(Xj ≥ u) Now, we use the martingale structure to prove the Lemma. Denote the Ft∗ martingale g M (t) = n −1 n Z X i=1 t G(u)eβ o> 0 Zj (u) g(u)I(Ci ≥ u)dMi1 (u). Mg (t) satisfies the condition for Lemma A.2(i). Hence, we have supt∈[0,t∗ ] kMg (t)kmax = p  Op log(q 0 )/n . Also define e i (t) = {e ∆ ωi (t) − I(Ci > t)}Yi (t).  e i (t)| = Op n−1/2 . The total variation of each By Lemma B.6, supi=1,...,n supt∈[0,t∗ ] |∆i (t) − ∆ ∆i (t) is at most 2. Hence, we can apply integration by parts to (B.7), G −1 ∗ ∗ g (t )M (t −) ⊗ n − n1/2 Z t∗ 0 −1/2 n X j=1 ∗ ∆j (t −)φ(Zj (t −)) − n Mg (t) ⊗ G−1 (t)n−1 ,I1 − I2 − I3 . ∗ n X −1/2 n Z X j=1 0 t∗ Mg (t) ⊗ φ(Zj (t))dMj∆ (t) ∆j (t)dφ(Zj (t)) j=1 p  e j (t∗ −)| = log(q 0 )/n and supj=1,...,n |∆j (t∗ −) − ∆ We have shown that |Mg (t∗ −)| = Op  Op n−1/2 . By assumption, kφ(Zj (t∗ −))k p max ≤ Kφ  1. As a result, we may replace the e i (t) with with an Op e j (t∗ −)φ(Zj (t∗ −))’s are log(q 0 )/n error. Since ∆ ∆i (t) in I1 by ∆ p  P e j (t∗ −)φ(Zj (t∗ −))kmax = Op log(q)/n by i.i.d. mean zero random variables, kn−1 nj=1 ∆ p  Hoeffding (1963). Multiplying the rates together, we get kI1 kmax = Op log(q) log(q 0 )/n = op (1). I2 can be expanded as n −1/2 n Z X j=1 0 t∗ −1 G(t) Pn   ωk (t−)υk (t)h(Zk (t)) k=1P M (t) I(Cj ≥ t)υj (t)h(Zj (t))− I(Xj ≥ t) dMjc (t) n I(X ≥ t) k k=1 g P By Lemma B.4*, n { nk=1 I(Xk ≥ t)}−1 = Op (1). The integrand in I2 is the product of Mg (t)  p and a Op (1) term. Hence, we can apply Lemma A.2(ii) to get kI2 kmax = Op log(q 0 ) log(qq 0 )/n = op (1). 44 By (D3), we may further expand I3 into Z n1/2 t∗ Mg (t) ⊗ G−1 (t)n−1 0 +n 1/2 Z t∗ 0 ,I30 + g M (t) ⊗ G −1 n X (t)n ∆j (t)∇φ(Zj (t))> dzj (t)dt j=1 −1 n X ∆j (t)4φ(Zj (t))dNjz (t) j=1 I300 , where 4φ(Zj (t)) = φ(Zj (t))−φ(Zj (t−)). By assumption on h(Z) and (D3), |∇φ(Zj (t))> dzj (t)| and 4φ(Zj (t)) are bounded by Lh Lz and Lh K, respectively. With supt∈[0,t∗ ] |Mg (t)| =  p p log(q 0 )/n and Njz (t∗ ) < Kz = o( n/(log(p) log(n))), we may replace the ∆j (t)’s by Op e j (t)∇φ(Zj (t))> dz (t) has mean zero and at most Kz + 1 e j (t)’s with an op (1) error. Each ∆ ∆ j jumps, and it is (Lh Lz + Kφ Ldz )-Lipschitz between two consecutive jumps under (D3) and conditions on φ(z). By applying Lemma A.1(ii), we get sup t∈[0,t∗ ] Hence, kI30 kmax n−1 n X j=1 e j (t)∇φ(Zj (t))> dzj (t) ∆ max p = Op ( log(nq)/n). p = Op ( log(q 0 ) log(nq)/n) + op (1) = op (1). By applying Lemma A.1(i) to e j (t)4h(Zj (t)), Njz (t) : j = 1, . . . , n}, {∆ we get at the jumps of Niz (t)’s, at the tik , satisfy sup sup i=1,...,n k∈1...KN n−1 n X j=1 p p ∆j (tik )4φ(Zj (tik )) = Op ( log(nKz q)/n) = Op ( log(nq)/n).  p  Hence, kI300 kmax = Op Kz log(nq) log(q 0 )/n = op (1). This completes the proof. e − β o } and hj (r; t) = Z̄j (t, β ). The subscript j means the j-th element (iii) Define β r = β o + r{β r of corespondent vector. By mean-value theorem, we have some r ∈ (0, 1) such that ! (2) (t, β )S (0) (t, β ) − S(1) (t, β )⊗2 S r r r o > e −β } hj (1; t) − hj (0; t) = {β S (0) (t, β r )2 j ! > n β Z (t) X r i ω (t)Y (t)e i i e − β o }> = {β {Zi (t) − Z̄j (t, β r )}⊗2 (0) (t, β ) nS r i=1 j Since each {Zi (t) − Z̄j (t, β r )}⊗2 max ≤ K 2 under (D2), their weighted average > n X ωi (t)Yi (t)eβr Zi (t) i=1 nS (0) (t, β r ) {Zi (t) − Z̄j (t, β r )}⊗2 45 max ≤ K 2. Hence, we have shown that e ∞ ≤ kβ e − β o k1 K 2 = Op (kβ e − β o k1 ). sup kZ̄(t, β o ) − Z̄(t, β)k t∈[0,t∗ ] By a similar argument, we can show for some r ∈ (0, 1) > > o> > n e e − β o )> X ωj (t)Yj (t)eβr Zj (t) eβ Zi (t) eβ Zi (t) eβr Zi (t) (β − = {Zi (t) − Zj (t)}. e S (0) (t, β o ) S (0) (t, β) S (0) (t, β r ) nS (0) (t, β r ) j=1 e − β o k1 ≤ Kb , n−1 On event {kβ Hence, o> i=1 I(Xi ≥ t∗ ) ≥ r∗ /2}, we have e > r∗ /2 ∗ e2Kb , inf S (0) (t, β) t∈[0,t∗ ] |eβ Pn Zi (t) e > Zi (t) /S (0) (t, β o ) − eβ inf S (0) (t, β o ) > r∗ /2 ∗ eKb . t∈[0,t∗ ]   e − β o k1 . e ≤ kβ e − β o k1 2Ke4Kb /r∗ = Op kβ /S (0) (t, β)| e − β o k1 = op (1) from The event occurs with probability tending to one because we havekβ Theorem 1* and supt∈[0,t∗ ] |S (0) (t, β o )−1 | = Op (1) from Lemma B.4*. Proof of Lemma B.9. b b j (γ) = Γj (γ, β). To simplify notation, wherever possible we will use Γ e j := γ b j − γ ∗j belong to a certain (i) We want to prove that for all j = 1, . . . , p, the differences γ convex cone. It follows from the KKT conditions that, for l = 1, . . . , p − 1,  b ∂ Γ (b γ )   ∂γj j + λj sgn(b b j,l 6= 0; γ j,l ) = 0 if γ j,l   b j (b ∂Γ γj ) ∂γ j,l b j,l = 0. if γ ≤ λj  Denote Oj := l ∈ {1, . . . , p − 1} : γ ∗j,l 6= 0 and Ojc := {1, . . . , p − 1} \ Oj . For ξj > 1, it follows from the KKT conditions above that on the event b j (γ ∗ )k∞ ≤ (ξj − 1)λj /(ξj + 1)}, Ω0 := {k∇γ Γ j with γ̄ j = αb γ j + (1 − α)γ ∗j , α ∈ (0, 1) 2b 0 ≤ 2e γ> γj j ∇γ Γj (γ̄ j )e  b γ j ) − ∇γ Γ b j (γ ∗ ) e> =γ j ∇γ Γj (b j b b j (b X X ∂ Γj (b γj ) ∂Γ γj ) ∗ b e> e j,l e j,l + −γ = γ γ j ∇γ Γj (γ j ) ∂γ j,l ∂γ j,l c l∈Oj ≤ −λj =− l∈Oj X l∈Ojc b j,l sgn(b γ γ j,l ) + λj 2λj e c γ ξj + 1 j,Oj 1 + X l∈Oj |e γ j,l | + 2ξj λj e γ ξj + 1 j,Oj 1 . 46 (ξj − 1)λj e j,Oj γ ξj + 1 1 + (ξj − 1)λj e j,Ojc γ ξj + 1 1 e /ke e=γ b − γ ∗ . By part (i) and convexity (ii) Let v = γ γ k1 be the l1 -standardized direction for γ of Γj in γ j , any x ∈ (0, ke γ k1 ] satisfies n o b j (γ ∗ + xv) − ∇γ Γ b j (γ ∗ ) ≤ − 2λj kvOc k1 + 2ξj λj vO k1 . v > ∇γ Γ j j ξj + 1 ξj + 1 We relax the inequality about x above to establish an upper bound for ke γ k1 . By the definition of κj , the left hand side can be bounded by n o xkvOj k21 κj (ξj , Oj ) ∗ b j (γ ∗ + xv) − ∇γ Γ b j (γ ∗ ) = xv> ∇2 Γ b v > ∇γ Γ . γ j (γ )v ≥ sj The right hand side can be bounded using the complete square {kvOj k1 − 2/(ξj + 1)}2 , − 2λj 2ξj λj 2λj kvOjc k1 + vOj k1 = 2λj kvOj k1 − ≤ λj (ξj + 1)kvOj k21 . ξj + 1 ξj + 1 ξj + 1 Combining the bounds for both sides in the inequality, we get an upper bound for ke γ k1 . Proof of Lemma B.10. We define e j (γ) = n−1 Γ n Z X i=1 0 t∗ {Zij (t) − µj (t) − γ > Zi,−j (t) + γ > µ−j (t)}2 dNio (t).   p b − ∇γ Γ b − β o k1 + log(p)/n . b j (γ ∗ , β) e j (γ ∗ )k∞ = Op kβ By Lemmas B.8 and 3, maxj=1,...,p k∇γ Γ j j ∗ ∗ e ∇γ Γj (γ j ) is the average of i.i.d. vectors with mean ∇γ Γ̄j (γ j ) = 0 and maximal bound K 2 (1+Kγ ). e 1 (γ ∗ ), . . . , ∇γ Γ e p (γ ∗ )) to get We can apply Hoeffding (1963) to the matrix (∇γ Γ p 1 p p e j (γ ∗ )k∞ = k(∇γ Γ e 1 (γ ∗ ), . . . , ∇γ Γ e p (γ ∗ ))kmax = Op ( log(p2 )/n) = Op ( log(p)/n). max k∇γ Γ j 1 p j=1,...,p Proof of Lemma B.11. (i) We define e = n−1 Σ n Z X i=1 0 t∗ {Zi (t) − µ(t)}⊗2 dNio (t). b − The total variation of each Nio (t) is at most 1. By Lemma B.8, we have supt∈[0,t∗ ] kZ̄(t, β)   p b − β o k1 + log(p)/n . Hence, µk∞ = Op kβ     p p b − β o k1 + log(p)/n = Op kβ b − β o k1 + log(p)/n . b − Σk e max ≤ 2KOp kβ kΣ e is average of i.i.d. with mean Σ and bounded maximal norm K 2 . We apply Hoeffding Now, Σ (1963) with union bound,   e − Σkmax ≥ K 2 x ≤ 2p2 e2nx2 . Pr kΣ Choosing x = p p e − Σkmax = Op ( log(p)/n). log(2p2 /ε)/(2n), we have kΣ 47 (ii) We alternatively use the following form   > n Z t∗  n  β Z (t) X X j ωj (t)Yj (t)e ⊗2 ⊗2 dNio (t). m̈(β) = n−1 Z (t) − Z̄(t, β) n−1 i (0) (t, β)   S i=1 0 j=1 By Lemma B.8(iii), we have e − m̈(β o )kmax = Op (kβ e − β o k1 ). km̈(β) We also have a similar form for   > n Z t∗  n  β Z (t) X X j I(Cj ≥ t)Yj (t)e −1 ⊗2 ⊗2 −1 e ë m(β) =n Zi (t) − Z(t, β) dNio (t). n (0) e   S (t, β) i=1 0 j=1 By Lemma B.8(i), we have ë o )kmax = Op km̈(β o ) − m(β  p log(p)/n . Finally, we use the martingale property of ( ) n Z t∗ X e (2) (t, β o ) S o −1 o ⊗2 e =n e β ) ë m(β )−Σ − Z(t, I(Ci ≥ t)dMi1 (t) o (0) e S (t, β ) i=1 0 Z ∗ n X t e β o )}⊗2 I(Ci ≥ t)dM 1 (t) − n−1 {Zi (t) − Z(t, i + n−1 i=1 0 n Z t∗ X i=1 0 h i e β o )}⊗2 − {Zi (t) − µ(t)}⊗2 I(Ci ≥ t)dN o (t) {Zi (t) − Z(t, i under filtration Ft∗ . The integrands in the first two martingale terms are bounded by K 2 . Hence, we  can apply Lemma A.2(ii) to obtain that their maximal norms are both p Op log(p)/n . We apply Lemma B.8(i) to the integrand of the third term, equivalently expressed as e β o )}{Zi (t) − Z(t, e β o )}> + {Zi (t) − µ(t)}{µ(t) − Z(t, e β o )}> . {µ(t) − Z(t, p  e max = Op ë o ) − Σk Therefore, we obtain km(β log(p)/n . We put the rates together by the triangle inequality. Proof of Lemma B.12. The proof is similar to that of Lemma 2. Define the compatibility factor for Cj (ξj , Oj ) and symmetric matrix Φ as p sj g> Φg κj (ξj , Oj ; Φ) = sup . 06=g∈Cj (ξj ,Oj ) kgOj k1 48  b . Notice that Apparently, κj (ξj , Oj ) = κj ξj , Oj ; ∇2γ Γ(γ ∗ , β) b ∇2γ Γ(γ ∗ , β) =n −1 n Z X i=1 0 t∗ b ⊗2 dN o (t) = Σ b −j,−j , {Zi,−j (t) − Z̄−j (t, β)} i b −j,−j is a Σ b dropping its jth row and column. By Lemma 4.1 in Huang et al. (2013) (for where Σ a similar result, see van de Geer and Bühlmann (2009) Corollary 10.1),  b −j,−j ≥ κ2 (ξj , Oj ; Σ−j,−j ) − sj (ξj + 1)2 kΣ−j,−j − Σ b −j,−j kmax . κj (ξj , Oj )2 = κ2j ξj , Oj ; Σ j For any non-zero g ∈ Rp−1 , let g∗ be its embedding   gk ∗ 0 gk =  gk−1 into Rp defined as k<j k=j k>j Then, we may establish a lower bound for the smallest eigenvalue of Σ−j,−j by (D4) inf 06=g∈Rp−1 g> Σ−j,−j g = inf 06=g∈Rp−1 g∗> Σg∗ ≥ ρ∗ kgk22 . Hence, inf j=1,...,p κ2j (ξj , Oj ; Σ−j,−j ) ≥ ρ∗ . Using the result in Lemma B.11(i) under (D5), we have inf j=1,...,p b max smax max (ξj + 1)2 = ρ∗ − op (1). κj (ξj , Oj )2 ≥ ρ∗ − kΣ − Σk j=1,...,p  Therefor, if ξmax  1, we must have that inf j κj (ξj , Oj )2 ≥ ρ∗ /2 occurs with probability tending to one. References Andersen, P. K. and Gill, R. (1982). “Cox’s regression model for counting processes: a large sample study”, Annals of Statistics 10, 1100–1120. Azuma, K. (1967). “Weighted sums of cerntain dempendent random variables”, Tôhoku Mathematical Journal 19, 357–367. Basu, S. and Michailidis, G. (2015). “Regularized estimation in sparse high-dimensional time series models”, The Annals of Statistics 43, 1535–1567. Belloni, A. and Chernozhukov, V. (2011). “l1-penalized quantile regression in high-dimensional sparse models”, The Annals of Statistics 39, 82–130. Bickel, P. J., Ritov, Y., and Tsybakov, A. B. (2009). “Simultaneous analysis of LASSO and Dantzig selector”, Annals of Statistics 37, 1705–1732. Binder, H., Allignol, A., Schumacher, M., and Beyersmann, J. (2009). “Boosting for highdimensional time-to-event data with competing risks”, Bioinformatics 25, 890–896. Bradic, J., Fan, J., and Jiang, J. (2011). “Regularization for cox’s proportional hazards model with np-dimensionality”, Annals of Statistics 39, 3092. 49 Bradic, J. and Song, R. (2015). “Structured estimation for the nonparametric cox model”, Electronic Journal of Statistics 9, 492–534. Bühlmann, P. and Van De Geer, S. (2011). Statistics for high-dimensional data: methods, theory and applications (Springer Science & Business Media). Cho, H. and Fryzlewicz, P. (2015). “Multiple-change-point detection for high dimensional time series via sparsified binary segmentation”, Journal of the Royal Statistical Society: Series B (Statistical Methodology) 77, 475–507. Durrett, R. (2013). Probability: Theory and Examples, 4th edition (Cambridge University Press). Fan, J. and Li, R. (2001). “Variable selection via nonconcave penalized likelihood and its oracle properties”, Journal of the American statistical Association 96, 1348–1360. Fan, J. and Lv, J. (2010). “A selective overview of variable selection in high dimensional feature space”, Statistica Sinica 20, 101. Fang, E. X., Ning, Y., and Liu, H. (2017). “Testing and confidence intervals for high dimensional proportional hazards models”, to appear in Journal of the Royal Statistical Society: Series B (Statistical Methodology) . Fine, J. P. and Gray, R. J. (1999). “A proportional hazard model for the subdistribution of a competing risk”, Journal of the American Statistical Association 94, 496–509. Gaı̈ffas, S. and Guilloux, A. (2012). “High-dimensional additive hazards models and the lasso”, Electronic Journal of Statistics 6, 522–546. Hoeffding, W. (1963). “Probability inequalities for sums of bounded random variables”, Journal of the American Statistical Association 58, 13–30. Hou, J., Paravati, A., Xu, R., and Murphy, J. (2017). “High-Dimensional Variable Selection and Prediction under Competing Risks with Application to SEER-Medicare Linked Data”, ArXiv e-prints:1704.07989 . Huang, J., Ma, S., and Xie, H. (2006). “Regularized estimation in the accelerated failure time model with high-dimensional covariates”, Biometrics 62, 813–820. Huang, J., Sun, T., Ying, Z., Yu, Y., and Zhang, C.-H. (2013). “Oracle inequalities for the LASSO in the Cox model”, Annals of Statistics 41, 1142–1165. Johnson, B. A. (2008). “Variable selection in semiparametric linear regression with censored data”, Journal of the Royal Statistical Society: Series B (Statistical Methodology) 70, 351–370. Kalbfleisch, J. D. and Prentice, R. L. (2002). The Statistical Analysis of Failure Time Data (2nd ed.) (John Wiley & Sons, Inc., Hoboken, New Jersey). Lemler, S. (2013). “Oracle inequalities for the lasso in the high-dimensional multiplicative aalen intensity model”, Les Annales de l’Institut Henri Poincaré, arXiv preprint 21, 109–137. Meinshausen, N. and Bühlmann, P. (2006). “High-dimensional graphs and variable selection with the lasso”, The Annals of Statistics 1436–1462. 50 Meinshausen, N. and Yu, B. (2009). “Lasso-type recovery of sparse representations for highdimensional data”, The Annals of Statistics 246–270. Murphy, S. A. (1994). “Consistency in a proportional hazards model incorporating a random effect”, Annals of Statistics 22, 712–731. Obozinski, G., Wainwright, M. J., and Jordan, M. I. (2011). “Support union recovery in highdimensional multivariate regression”, The Annals of Statistics 39, 1–47. Ravikumar, P., Wainwright, M. J., and Lafferty, J. D. (2010). “High-dimensional ising model selection using l1-regularized logistic regression”, The Annals of Statistics 38, 1287–1319. Sun, H., Lin, W., Feng, R., and Li, H. (2014). “Network-regularized high-dimensional cox regression for analysis of genomic data”, Statistica Sinica 24, 1433. Tibshirani, R. (1996). “Regression shrinkage and selection via the lasso”, Journal of the Royal Statistical Society. Series B (Methodological) 267–288. van de Geer, S. and Bühlmann, P. (2009). “On the conditions used to prove aracle results for the Lasso”, Electronic Journal of Statistics 3, 1360–1392. van de Geer, S., Bühlmann, P., Ritov, Y., and Dezeure, R. (2014). “On asymptotically optimal confidence regions and tests for high-dimensional models”, Annals of Statistics 42, 1166–1202. van de Geer, S. A. (2007). The deterministic LASSO., Technical Report 140 (ETH Zürich, Switzerland). Wasserman, L. and Roeder, K. (2009). “High dimensional variable selection”, The Annals of Statistics 37, 2178. Zhang, C.-H. and Zhang, S. S. (2014). “Confidence intervals for low dimensional parameters in high dimensional linear models”, Journal of the Royal Statistical Society, Series B 76, 217–242. Zhou, S., Rütimann, P., Xu, M., and Bühlmann, P. (2011). “High-dimensional covariance estimation based on gaussian graphical models”, Journal of Machine Learning Research 12, 2975–3026. 51
10math.ST
Survey of Visual Question Answering: Datasets and Techniques Akshay Kumar Gupta Indian Institute of Technology Delhi [email protected] arXiv:1705.03865v2 [cs.CL] 11 May 2017 Abstract Visual question answering (or VQA) is a new and exciting problem that combines natural language processing and computer vision techniques. We present a survey of the various datasets and models that have been used to tackle this task. The first part of this survey details the various datasets for VQA and compares them along some common factors. The second part of this survey details the different approaches for VQA, classified into four types: non-deep learning models, deep learning models without attention, deep learning models with attention, and other models which do not fit into the first three. Finally, we compare the performances of these approaches and provide some directions for future work. 1 Introduction Visual Question Answering is a task that has emerged in the last few years and has been getting a lot of attention from the machine learning community (Antol et al., 2015) (Wu et al., 2016a). The task typically involves showing an image to a computer and asking a question about that image which the computer must answer. The answer could be in any of the following forms: a word, a phrase, a yes/no answer, choosing out of several possible answers, or a fill in the blank answer. Visual question answering is an important and appealing task because it combines the fields of computer vision and natural language processing. Computer vision techniques must be used to understand the image and NLP techniques must be used to understand the question. Moreover, both must be combined to effectively answer the question in context of the image. This is challenging because historically both these fields have used distinct methods and models to solve their respective tasks. This survey describes some prominent datasets and models that have been used to tackle the visual question answering task and provides a comparison on how well these models perform on the various datasets. Section 2 covers VQA datasets, Section 3 describes models and Section 4 discusses the results and provides some possible future directions. 2 Datasets Several large-scale datasets have been released in the past 2-3 years for the VQA task. We discuss these datasets below. Table 1 contains a summary of these datasets. 2.1 DAQUAR (Malinowski and Fritz, 2014) The DAtaset for QUestion Answering on Realworld images (or DAQUAR), released in 2015, was the first dataset and benchmark released for the VQA task. It takes images from the NYUDepth V2 dataset which contains images along with their semantic segmentations. Every pixel of an image is labeled with an object class (or no object) out of 894 possible classes. The images are all of indoor scenes. There are a total of 1449 images (795 training, 654 test). The authors generated question answer pairs in two ways: 1) Automatically, using question templates. The authors define 9 templates for questions, whose answers can be taken from the existing NYU-Depth V2 dataset annotations. An example of a question template is ‘How many [object] are in [image id]?’. 2) Using human annotations. They asked 5 participants to generate questions and answers with the constraint that answers must be either colors, numbers or classes or sets of these. The resultant dataset contains a total of 12468 question- DAQUAR Visual7W Visual Madlibs COCO-QA FM-IQA VQA (COCO) VQA (Abstract) Number of Images 1,449 47,300 10,738 117,684 158,392 204,721 50,000 Number of Questions 12,468 327,939 360,001 117,684 316,193 614,163 150,000 Avg. questions per image 8.60 6.93 33.52 1.00 1.99 3.00 3.00 Average question length 11.5 6.9 4.9 9.65 7.38 (Chinese) 6.2 6.2 Average answer length 1.2 2.0 2.8 1.0 3.82 (Chinese) 1.1 1.1 Q/A generation Human Human Human Automatic Human Human Human Table 1: VQA Datasets answer pairs (6794 training, 5674 test). A reduced dataset containing only 37 object classes is also available. The authors propose two evaluation metrics for this dataset: One is simple accuracy, which is not a very good metric for multi-word answers, and the second is WUPS score which gives a score for a generated answer between 0.0 and 1.0 based on average match between answer and ground truth answers. Typically the WUPS score is thresholded at 0.9 (That is, if the WUPS score for an answer is above 0.9 then it is correct.) were used to generate the questions. A separate set of three workers were used to rate the questions and those with less than two positive votes were discarded. Multiple choice answers were generated both automatically and by AMT workers. AMT workers were also asked to draw bounding boxes of objects mentioned in the question in the image, firstly to resolve textual ambiguity (Eg. An image has two red cars. Then ‘red car’ in the question could refer to either of these.), and secondly to enable answers of a visual nature (‘pointing’ at an object). The dataset contains 47,300 images and 327,939 questions. 2.3 Visual Madlibs (Yu et al., 2015) The Visual Madlibs dataset is a fill-in-the-blanks as well as multiple choice dataset. Images are collected from MS-COCO. Descriptive fill-in-theblank questions are generated automatically using templates and object information. Each question generated in this way is answered by a group of 3 AMT workers. The answer can be a word or a phrase. Multiple choices for the blanks are also provided as an additional evaluation benchmark. The dataset contains 10,738 images and 360,001 questions. The multiple choice questions are evaluated on the accuracy metric. Figure 1: Taken from (Ren et al., 2015) 2.2 Visual7W (Zhu et al., 2016) Visual 7W is a dataset generated using images from the MS-COCO dataset (Lin et al., 2014) for image captioning, recognition and segmentation. The Visual7W dataset gets it name from generating multiple-choice questions of the form (Who, What, Where, When, Why, How and Which). Workers on Amazon Mechanical Turk (AMT) 2.4 COCO-QA (Ren et al., 2015) The COCO-QA dataset is another dataset based on MS-COCO. Both questions and answers are generated automatically using image captions from MS-COCO and broadly belong to four categories: Object, Number, Color and Location. There is one question per image and answers are single-word. The dataset contains a total of 123,287 images. Evaluation is done using either accuracy or WUPS score. candidate responses. To evaluated open-ended answers, a machine generated answer is normalized by the VQA evaluation system and then evaluated as Score = min(#humans who provided that exact answer / 3, 1). So, an answer is considered completely correct if it matches the responses of at least three human annotators. If it matches none of the 10 candidate responses then it is given a score of 0. The original VQA dataset has 204,721 MS-COCO images with 614,163 questions and 50,000 abstract images with 150,000 questions. The 2017 iteration of the VQA challenge has a bigger dataset with a total of 265,016 MS-COCO and abstract images and an average of 5.4 questions per image. The exact number of questions is not mentioned on the challenge website. Figure 2: Taken from (Ren et al., 2015) 2.5 FM-IQA (Gao et al., 2015) The Freestyle Multilingual Image Question Answering dataset (FM-IQA) takes images from the MS-COCO dataset and uses the Baidu crowdsourcing server to get workers to generate questions and answers. Answers can be words, phrases or full sentences. Question/answer pairs are available in Chinese as well as their English translations. The dataset contains 158,392 images and 316,193 questions. They propose human evaluation through a visual Turing Test, which may be one reason this dataset has not gained much popularity. 2.6 VQA (Antol et al., 2015) The Visual Question Answering (VQA) dataset is the most widely used dataset for the VQA task. This dataset was released as part of the visual question answering challenge. It is divided into two parts: one dataset contains real-world images from MS-COCO, and another dataset contains abstract clipart scenes created from models of humans and animals to remove the need to process noisy images and only perform high level reasoning. Questions and answers are generated from crowd-sourced workers and 10 answers are obtained for each question from unique workers. Answers are typically a word or a short phrase. Approximately 40% of the questions have a yes or no answer. For evaluation, both open-ended answer generation as well as multiple choice formats are available. Multiple choice questions have 18 Figure 3: Taken from (Antol et al., 2015) 3 Models The VQA task was proposed after deep learning approaches had already gained wide popularity due to their state-of-the-art performance on various vision and NLP tasks (Krizhevsky et al., 2012) (Bahdanau et al., 2014). As a result almost all work on VQA in the literature involves deep learning approaches, as opposed to more classical approaches like graphical models. There are a couple of models which use a non-neural approach, which are detailed in the first subsection. In addition, several simple baselines that authors use involve non-neural methods, which are also described. The second sub-section describes deep learning models which do not involve the use of attention-based techniques. The third sub-section details attention-based deep learning models for VQA. Results of all the models described are summarized in Tables 2 and 3. 3.1 Non-deep learning approaches 3.1.1 Answer Type Prediction (ATP) (Kafle and Kanan, 2016) propose a Bayesian framework for VQA in which they predict the answer type for a question and use this to generate the answer. The possible answer types vary across the datasets they consider. For instance, for COCO-QA they consider four answer types: object, color, counting, and location. Their model computes the probability of an answer a and answer type t given the image x and question q, P (A = a, T = t|x, q) = P (x|A=a,T =t,q)P (A=a|T =t,q)P (T =t|q) P (x|q) (1) which follows from Bayes’ rule. They can then marginalize over all answer types to obtain P (A = a|x, q). The denominator is constant for a given question and image and can thus be ignored. They model the three probabilities in the numerator with three separate models. The second and third probabilities are both modeled using logistic regression. The features used for the question was the skip-thought vector representation (Kiros et al., 2015) of the question (They use the pretrained skip thought model). The first probability is modeled as a conditional multivariate Gaussian, similar in principle to Quadratic Discriminant Analysis. The original image features are used in this model. The authors also introduced some simple VQA baselines, like feeding only image features or only question features to a logistic regression classifier, feeding both image and question features to a logistic regressor, and feeding the same features to a multi-layer perceptron. They evaluated results on the DAQUAR, COCO-QA, Visual7W and VQA datasets. 3.1.2 Multi-World QA (Malinowski and Fritz, 2014) This paper models the probability of an answer given a question and an image as P (A = a|Q, W ) = ΣT P (A = a|T, W )P (T |Q) (2) Here T is a latent variable corresponding to semantic tree obtained from a semantic parser run on the question. W is the world, which is a representation of the image. This can be just the original image or the image along with additional features obtained from segmentation. P (A = a|T, W ) is evaluated using a deterministic evaluation function. P (T |Q) is obtained by training a simple log-linear model. This model will be called SWQA (Single World Question Answering). The authors further extend the SWQA model to a multi-world scenario to model uncertainty in segmentation and class labeling. Different labelings lead to different worlds, so the probability is now modeled as P (A = a|Q, W ) = ΣW ΣT P (A = a|T, W )P (W |S)P (T |Q) (3) Here S is a set of segments along with a distribution over class labels for each segment. So sampling from the distribution for each segment will give us one possible world. As the above equation becomes intractable, the authors sample a fixed number of worlds from S. This model will be called MWQA (Multi World Question Answering). These models are evaluated on the DAQUAR dataset. 3.2 Non-attention Deep Learning Models Deep learning models for VQA typically involve the use of Convolutional Neural Networks (CNNs) to embed the image and word embeddings such as Word2Vec (Mikolov et al., 2013) along with Recurrent Neural Networks (RNNs) to embed the question. These embeddings are combined and processed in various ways to obtain the answer. The following model descriptions assume that the reader is familiar with both CNNs (Krizhevsky et al., 2012) as well as RNN-variants like Long Short Term Memory units (LSTMs) (Hochreiter and Schmidhuber, 1997) and Gated Recurrent Units (GRUs) (Cho et al., 2014). Some approaches do not involve the use of RNNs. These are discussed first. 3.2.1 iBOWIMG (Zhou et al., 2015) propose a baseline model called iBOWIMG for VQA. They use the output of a later layer of the pre-trained GoogLe Net model for image classification (Szegedy et al., 2015) to extract image features. The word embeddings of each word in the question are taken as the text features, so the text features are simple bag-of- words. The image and text features are concatenated and softmax regression is performed across the answer classes. They showed that this model achieved performance comparable to several RNN based approaches on the VQA dataset. 3.2.2 Full-CNN (Ma et al., 2015) propose a CNN-only model that we refer to here as Full-CNN. They use three different CNNs: an image CNN to encode the image, a question CNN to encode the question, and a join CNN to combine the image and question encoding together and produce a joint representation. The image CNN uses the same architecture as VGGnet (Simonyan and Zisserman, 2014) and obtains a 4096-length vector from the second-last layer of this network. This is passed through another fully connected layer to get the image representation vector of size 400. The question CNN involves three layers of convolution + max pooling. The size of the convolutional receptive field is set to 3. In other words, the kernel looks at a word along with its immediate neighbors. The joint CNN, which they call the multi-modal CNN, performs convolution across the question representation with receptive field size 2. Each convolution operation is provided the full image representation. The final representation from the multi-modal CNN is given to a softmax layer to predict the answer. The model is evaluated on the DAQUAR and COCO-QA datasets. The following models use both CNNs as well as RNNs. 3.2.3 Ask Your Neurons (AYN) (Malinowski et al., 2016) This model uses a CNN to encode the image x and obtain a continuous vector representation of the image. The question q is encoded using an LSTM or a GRU network for which the input at time step t is the word embedding for the tth question word qt , as well as the encoded image vector. The hidden vector obtained at the final time step is the question encoding. A simple bag of words baseline the authors use is to encode the question as the sum of all the word embeddings. The answer can be decoded in two different ways, either as a classification over different answers, or as a generation of the answer. Classification is performed by a fully connected layer followed by a softmax over possible answers. Gener- ation, on the other hand, is performed by a decoder LSTM. This LSTM at each time point takes as input the previously generated word, as well as the question and image encoding. The next word is predicted using a softmax over the vocabulary. An important point to note is that this model shares some weights between the encoder and decoder LSTMs. The model is evaluated on the DAQUAR dataset. 3.2.4 Vis+LSTM (Ren et al., 2015) This model is very similar to the AYN model. The model uses the final layer of VGGnet to obtain the image encoding. They use an LSTM to encode the question. In contrast to the previous model, they provide the encoded image as the first ‘word’ to this LSTM network, before the question. The output of this LSTM goes through a fully connected followed by softmax layer. They call this model Vis+LSTM. The authors also propose a 2Vis+BLSTM model, which uses a bidirectional LSTM instead. The backward LSTM gets the image encoding as first input as well. The outputs of both LSTMs are concatenated and then passed through a fully connected and softmax layer. 3.2.5 Dynamic Parameter Prediction (DPPnet) (Noh et al., 2016) The authors of this paper argue that having a fixed set of parameters is not powerful enough for the VQA task. They take the architecture of VGG net, remove its final softmax layer and add three more fully connected layers, the last of which is followed by a softmax over possible answers. The second of these fully connected layers does not have a fixed set of parameters. Instead, the parameters come from a GRU network. This GRU network is used to encode the question, and the output from the network is passed through a fully connected layer to give a small vector of candidate parameter weights. This vector is then mapped to the larger vector of parameter weights required by the second fully connected layer above, using an inverse hashing function. This hashing technique is included by the authors to avoid having to predict the full set of parameter weights which could be expensive and may lead to over-fitting. The dynamic parameter layer can alternatively be seen as multiplying the image representation and question representation together to get a joint representation, as opposed to combining them in a linear SWQA MWQA Vis+LSTM AYN 2Vis+BLSTM Full-CNN DPPnet ATP SAN CoAtt AMA DAQUAR (Reduced) Accuracy WUPS WUPS (%) at 0.9 (%) at 0 (%) 9.69 14.73 48.57 12.73 18.10 51.47 34.41 46.05 82.23 34.68 40.76 79.54 35.78 46.83 82.15 42.76 47.58 82.60 44.48 49.56 83.95 45.17 49.74 85.13 45.50 50.20 83.60 - DAQUAR (All) Accuracy WUPS (%) at 0.9 (%) 7.86 11.86 21.67 27.99 23.40 29.59 28.98 34.80 28.96 34.74 29.30 35.10 - WUPS at 0 (%) 38.79 65.11 62.95 67.81 67.33 68.60 - Accuracy (%) 53.31 55.09 54.95 61.19 63.18 61.60 65.40 69.73 COCO-QA WUPS at 0.9 (%) 63.91 65.34 65.36 70.84 73.14 71.60 75.10 77.14 Table 2: Results of various models on DAQUAR (reduced), DAQUAR (full), COCO-QA fashion. The model is evaluated on the DAQUAR, COCO-QA and VQA datasets. 3.3 Attention-based Deep Learning Techniques Attention based techniques are some of the most popular techniques that are being used across many tasks like machine translation (Bahdanau et al., 2014), image captioning (Xu et al., 2015) etc. For the VQA task, attention models involve focusing on important parts of the image, question or both in order to effectively give an answer. 3.3.1 Where to Look (Shih et al., 2016) propose an attention-based model henceforth referred to as WTL. They use VGGnet for encoding the image and concatenate the outputs of the final two layers of VGGnet to obtain image encoding. Question representation is obtained by averaging the word vectors of each word in the question. An attention vector is computed over the set of image features to decide which region in the image to give importance to. This vector is computed in the following way: If − − V = (→ v1 , → v2 . . . − v→ K ) is the set of image features, → − and q is the question embedding, then the importance of the j th region is computed as − − gj = (A→ vj + bA )T (B → q + bB ) The attention weights are obtained on normalising → − g . The final image representation is an attention weighted sum of the different regions. This is concatenated to the question embedding and passed to a dense+softmax layer. The model is evaluated on the VQA dataset. The loss function is a max margin based loss that takes into account the VQA evaluation metric. 3.3.2 Recurrent Spatial Attention (R-SA) (Zhu et al., 2016) This model is a step above the previous model in two ways. Firstly, it uses LSTMs to encode the question, and secondly, it computes attention over the image repeatedly after scanning each word of the question. More concretely, we repeatedly compute an attention weighted sum of image features, rt , at each time step t of the LSTM. rt goes as an additional input to the next time step of LSTM. The attention weights at used to obtain rt are computed using a dense+softmax layer over the previous hidden state of the LSTM ht−1 and the image itself. Thus intuitively as we read the question we repeatedly decide which parts of the image to attend to, and parts to attend to now depend both on the current word as well as the previous attention weighted image through ht−1 . This model is evaluated on the Visual7W dataset, for both the textual answering task as well as the pointing task (which points out a region in the image as an answer). The softmax crossentropy loss between actual and predicted answer was used for the textual answering task. For the pointing task, log likelihood of a candidate region is obtained by taking dot product of feature representing that region and last state of LSTM. Again cross-entropy loss was used to train the model. 3.3.3 Stacked Attention Networks (SAN) (Yang et al., 2016) This model is similar in spirit to the previous model in that it repeatedly computes attention over WUPS at 0 (%) 88.25 88.64 88.58 90.61 91.32 90.90 92.00 92.50 iBOWIMG DPPnet WTL AYN SAN ATP NMN CoAtt AMA Y/N 76.5 80.7 78.4 79.3 80.5 81.2 79.7 81.01 Test-Development Open Ended Number Other All 35.0 42.6 55.7 37.2 41.7 57.2 36.4 46.3 58.4 36.6 46.1 58.7 37.5 46.7 59.6 38.0 44.0 58.6 38.7 51.7 61.8 38.42 45.23 59.17 M.C. All 62.4 65.8 - Y/N 76.8 80.3 78.2 80.3 81.2 81.07 Test-Standard Open Ended Number Other All 35.0 42.6 55.9 36.9 42.2 57.4 36.3 46.3 58.4 58.9 37.8 47.6 60.1 37.7 44.0 58.7 62.1 37.12 45.83 59.44 M.C. All 62.4 66.1 - Table 3: Results of various models on VQA dataset the image to get finer-grained visual information to predict the answer. However, while the previous model does this word by word, this model first encodes the entire question using either an LSTM or a CNN. This question encoding is used to attend over the image using a similar equation as before. Then the attention weighted image is concatenated with the question encoding and used to again compute attention over the original image. This can be repeated k times after which the question and the final image representation are used to predict the answer. The authors argue that this sort of ‘stacked’ attention helps the model to iteratively discard unimportant regions of the image. The authors experiment with k=1 and k=2 and report results on DAQUAR, COCO-QA and VQA datasets. 3.3.4 Hierarchical Co-attention (CoAtt) (Lu et al., 2016) This paper differs from the previous attention based methods in that in addition to modelling the visual attention, it also models question attention, that is, which part of the question to give importance to. They model two forms of coattention: 1) Parallel co-attention, in which image and question attend over each other simultaneously. This is done by computing an affinity matrix C = tanh(QT W I) where W is a learnable weight matrix. Cij represents the affinity of the ith word in the question and j th region in the image. This matrix C is used to obtained both image and question attention vectors. 2) Alternating co-attention. In this we iteratively attend on image followed by query followed by image again (similar to SANs in spirit). One additional idea that the authors use is encode the question at different levels of abstraction: word, phrase and question level. Question level representation is obtained by LSTM while word and phrase level representation are obtained from CNNs. They present results on VQA and COCOQA datasets 3.4 Other Models The following models use more ideas than simply changing how to attend to the image or question and as such do not fit in the previous sections. 3.4.1 Neural Module Networks (NMNs) (Andreas et al., 2016) This model involves generating a neural network on the fly for each individual image and question. This is done through choosing from various sub-modules based on the question and composing these to generate the neural network. Modules are of five kinds: Attention[c] (which computes an attention map for a given image and given c; c can be ‘dog’ for instance, then Attention[dog] will try to find a dog), classification[c] (which outputs a distribution over labels belonging to c for a given image and attention map; c can be ‘color’), reattention[c] (which takes an attention map and recomputes it based on c; c can be ‘above’ which means shift attention upward), Measurement[c] (which outputs a distribution over labels based on attention map alone) and combination[c] (which merges two attention maps as specified by c; c could be ‘and’ or ‘or’). To decide which modules to compose together, they first parse the question using a dependency parser and use this dependency to create a symbolic expression based on the head word. An example from the paper is ‘What is standing on the field?’ becomes what(stand). These symbolic forms are then used to identify which modules to use. The whole system is then trained end to end through backpropagation. The authors test their model on the VQA dataset and also a more challenging synthetic dataset as they found that the VQA dataset did not require too much high level reasoning or composition. 3.4.2 Incorporating Knowledge Bases (Wu et al., 2016b) present the Ask Me Anything (AMA) model, that tries to leverage information from an external knowledge base to help guide visual question answering. It first obtains a set of attributes like object names, properties etc. of the images based on caption of the image. Image captioning model is trained on using standard image captioning techniques on the MS-COCO dataset. There are 256 possible attributes and the attribute generator is trained on MS-COCO using a variation of the VGG net. The top five attributes are used to generate queries for the DBpedia database (Auer et al., 2007). Each query returns a text which is summarized using Doc2Vec (Le and Mikolov, 2014). This summary is passed as an additional input to the decoder LSTM which generates the answer. The authors show results on VQA and COCO-QA datasets. 4 Discussion and Future Work As has been the trend in recent years, deep learning models outperform earlier graphical model based approaches across all VQA datasets. However, it is interesting to note that the Answer Type Prediction (ATP) model performs better than the non-attention models, which proves that simply introducing convolutional and/or recurrent neural networks is not enough: identifying parts of the image that are relevant in a principled manner is important. ATP is even competitive with or better than some attention models like Where to Look (WTL) and Stacked Attention Networks (SAN). Significant improvement is shown by Hierarchical Co-Attention Networks (CoAtt), which was the first to attend on the question in addition to the image. This may be helpful especially for longer questions, which are harder to encode into a single vector representation by LSTMs/GRUs, so first encoding each word and then using the image to attend to important words helps the model perform better. The Neural Module Networks (NMN) uses the novel and interesting idea of automatically composing sub-modules for each im- age/question pair which performs similar to CoAtt on the VQA dataset, but outperforms all models on a synthetic dataset requiring more high level reasoning, indicating that this could be a valuable approach in the real world. However, more investigation is required to judge the performance of this model. The best performing model on COCO-QA is Ask Me Anything (AMA) which incorporates information from an external knowledge base (DBpedia). A possible reason for improved performance is that the knowledge base helps answer questions that involve world or common sense knowledge that may not be present in the dataset. The performance of this model is not as good on VQA dataset, which might be because not too many questions in this dataset require world knowledge. This model naturally gives rise to two avenues for future work. The first would be recognizing when external knowledge is needed: some sort of model hybrid of CoAtt and AMA along with a decision maker for whether to access the KB might provide the best of both worlds. The decision might even be a soft one to enable end to end training. The second direction would be exploring the use of other knowledge bases like Freebase (Bollacker et al., 2008), NELL (Carlson et al., 2010) or OpenIE extractions (Schmitz et al., 2012). As we have seen, novel ways of computing attention continue to improve performance on this task. This has been seen in the textual question answering task as well (Xiong et al., 2016) (Seo et al., 2016), so more recent models from that space can be used to guide VQA models. A study providing an estimated upper bound on performance for the various VQA datasets would be very valuable as well to get an idea for the scope of possible improvement, especially for COCO-QA which is automatically generated. Finally, most VQA tasks treat answering as a classification task. Only the VQA dataset allows for answer generation in a limited manner. It would be interesting to explore answering as a generation task more deeply, but dataset collection and effective evaluation methodologies for this remain an open question. 5 Conclusion The field of VQA has grown by leaps and bounds despite being introduced just a few years ago. Deep learning methods for VQA continue to be the models receiving the most attention and showing state-of-the-art results. We surveyed the most prominent of these models and listed their performance over various large-scale datasets. Significant improvements in performance continue to be seen on many datasets, which means there is still plenty of room for future innovation in this task. Ryan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Skip-thought vectors. In NIPS. References Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. 2014. Microsoft coco: Common objects in context. In ECCV. Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. 2016. Deep compositional question answering with neural module networks. In CVPR. Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. 2015. Vqa: Visual question answering. In ICCV. Sören Auer, Christian Bizer, Georgi Kobilarov, Jens Lehmann, Richard Cyganiak, and Zachary Ives. 2007. Dbpedia: A nucleus for a web of open data. The semantic web pages 722–735. Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473 . Kurt Bollacker, Colin Evans, Praveen Paritosh, Tim Sturge, and Jamie Taylor. 2008. Freebase: a collaboratively created graph database for structuring human knowledge. In Proceedings of the 2008 ACM SIGMOD international conference on Management of data. Andrew Carlson, Justin Betteridge, Bryan Kisiel, Burr Settles, Estevam R. Hruschka Jr., and Tom M. Mitchell. 2010. Toward an architecture for neverending language learning. In AAAI. Kyunghyun Cho, Bart Van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078 . Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. 2012. Imagenet classification with deep convolutional neural networks. In NIPS. Quoc V Le and Tomas Mikolov. 2014. Distributed representations of sentences and documents. In ICML. Jiasen Lu, Jianwei Yang, Dhruv Batra, and Devi Parikh. 2016. Hierarchical question-image coattention for visual question answering. In NIPS. Lin Ma, Zhengdong Lu, and Hang Li. 2015. Learning to answer questions from image using convolutional neural network. arXiv preprint arXiv:1506.00333 . Mateusz Malinowski and Mario Fritz. 2014. A multiworld approach to question answering about realworld scenes based on uncertain input. In NIPS. Mateusz Malinowski, Marcus Rohrbach, and Mario Fritz. 2016. Ask your neurons: A deep learning approach to visual question answering. arXiv preprint arXiv:1605.02697 . Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. 2013. Distributed representations of words and phrases and their compositionality. In NIPS. Hyeonwoo Noh, Paul Hongsuck Seo, and Bohyung Han. 2016. Image question answering using convolutional neural network with dynamic parameter prediction. In CVPR. Mengye Ren, Ryan Kiros, and Richard Zemel. 2015. Exploring models and data for image question answering. In NIPS. Michael Schmitz, Robert Bart, Stephen Soderland, Oren Etzioni, et al. 2012. Open language learning for information extraction. In EMNLP. Haoyuan Gao, Junhua Mao, Jie Zhou, Zhiheng Huang, Lei Wang, and Wei Xu. 2015. Are you talking to a machine? dataset and methods for multilingual image question. In NIPS. Minjoon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. 2016. Bidirectional attention flow for machine comprehension. arXiv preprint arXiv:1611.01603 . Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural computation 9(8):1735–1780. Kevin J Shih, Saurabh Singh, and Derek Hoiem. 2016. Where to look: Focus regions for visual question answering. In CVPR. Kushal Kafle and Christopher Kanan. 2016. Answertype prediction for visual question answering. In CVPR. Karen Simonyan and Andrew Zisserman. 2014. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556 . Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. 2015. Going deeper with convolutions. In CVPR. Qi Wu, Damien Teney, Peng Wang, Chunhua Shen, Anthony Dick, and Anton van den Hengel. 2016a. Visual question answering: A survey of methods and datasets. arXiv preprint arXiv:1607.05910 . Qi Wu, Peng Wang, Chunhua Shen, Anthony Dick, and Anton van den Hengel. 2016b. Ask me anything: Free-form visual question answering based on knowledge from external sources. In CVPR. Caiming Xiong, Victor Zhong, and Richard Socher. 2016. Dynamic coattention networks for question answering. arXiv preprint arXiv:1611.01604 . Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron C Courville, Ruslan Salakhutdinov, Richard S Zemel, and Yoshua Bengio. 2015. Show, attend and tell: Neural image caption generation with visual attention. In ICML. Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alex Smola. 2016. Stacked attention networks for image question answering. In CVPR. Licheng Yu, Eunbyung Park, Alexander C Berg, and Tamara L Berg. 2015. Visual madlibs: Fill in the blank description generation and question answering. In ICCV. Bolei Zhou, Yuandong Tian, Sainbayar Sukhbaatar, Arthur Szlam, and Rob Fergus. 2015. Simple baseline for visual question answering. arXiv preprint arXiv:1512.02167 . Yuke Zhu, Oliver Groth, Michael Bernstein, and Li FeiFei. 2016. Visual7w: Grounded question answering in images. In CVPR.
2cs.AI
TextureGAN: Controlling Deep Image Synthesis with Texture Patches Wenqi Xian †1 Patsorn Sangkloy †1 Varun Agrawal 1 Amit Raj 1 Jingwan Lu 2 Chen Fang 2 Fisher Yu 3 James Hays 1 arXiv:1706.02823v2 [cs.CV] 23 Dec 2017 1 2 Georgia Institute of Technology Adobe Research 3 UC Berkeley Figure 1. With TextureGAN, one can generate novel instances of common items from hand drawn sketches and simple texture patches. You can now be your own fashion guru! Top row: Sketch with texture patch overlaid. Bottom row: Results from TextureGAN. Abstract eling and rendering pipeline dates back at least 20 years to image-based rendering techniques [33]. These techniques and later “image-based” graphics approaches focus on re-using image content from a database of training images [22]. For a limited range of image synthesis and editing scenarios, these non-parametric techniques allow nonexperts to author photorealistic imagery. In the last two years, the idea of direct image synthesis without using the traditional rendering pipeline has gotten significant interest because of promising results from deep network architectures such as Variational Autoencoders (VAEs) and Generative Adversarial Networks (GANs). However, there has been little investigation of fine-grained texture control in deep image synthesis (as opposed to coarse texture control through “style transfer” methods). In this paper we introduce TextureGAN, the first deep image synthesis method which allows users to control object texture. Users “drag” one or more example textures onto sketched objects in a scene and the network realistically applies these textures to the indicated objects. This “texture fill” operation is difficult for a deep network to learn for several reasons: (1) Existing deep networks aren’t particularly good at synthesizing highresolution texture details even without user constraints. Typical results from recent deep image synthesis methods are at low resolution (e.g. 64x64) where texture is not prominent or they are higher resolution but relatively flat (e.g. birds with sharp boundaries but few fine-scale de- In this paper, we investigate deep image synthesis guided by sketch, color, and texture. Previous image synthesis methods can be controlled by sketch and color strokes but we are the first to examine texture control. We allow a user to place a texture patch on a sketch at arbitrary locations and scales to control the desired output texture. Our generative network learns to synthesize objects consistent with these texture suggestions. To achieve this, we develop a local texture loss in addition to adversarial and content loss to train the generative network. We conduct experiments using sketches generated from real images and textures sampled from a separate texture database and results show that our proposed algorithm is able to generate plausible images that are faithful to user controls. Ablation studies show that our proposed pipeline can generate more realistic images than adapting existing methods directly. 1. Introduction One of the “Grand Challenges” of computer graphics is to allow anyone to author realistic visual content. The traditional 3d rendering pipeline can produce astonishing and realistic imagery, but only in the hands of talented and trained artists. The idea of short-circuiting the traditional 3d mod† indicates equal contribution 1 tails). (2) For TextureGAN, the network must learn to propagate textures to the relevant object boundaries – it is undesirable to leave an object partially textured or to have the texture spill into the background. To accomplish this, our network must implicitly segment the sketched objects and perform texture synthesis, tasks which are individually difficult. (3) The network should additionally learn to foreshorten textures as they wrap around 3d object shapes, to shade textures according to ambient occlusion and lighting direction, and to understand that some object parts (handbag clasps) are not to be textured but should occlude the texture. These texture manipulation steps go beyond traditional texture synthesis in which a texture is assumed to be stationary. To accomplish these steps the network needs a rich implicit model of the visual world that involves some partial 3d understanding. Fortunately, the difficulty of this task is somewhat balanced by the availability of training data. Like recent unsupervised learning methods based on colorization [47, 23], training pairs can be generated from unannotated images. In our case, input training sketches and texture suggestions are automatically extracted from real photographs which in turn serve as the ground truth for initial training. We introduce local texture loss to further fine-tune our networks to handle diverse textures unseen on ground truth objects. We make the following contributions: • We are the first to demonstrate the plausibility of finegrained texture control in deep image synthesis. In concert with sketched object boundaries, this allows non-experts to author realistic visual content. Our network is feed-forward and thus can run interactively as users modify sketch or texture suggestions. • We propose a “drag and drop” texture interface where users place particular textures onto sparse, sketched object boundaries. The deep generative network directly operates on these localized texture patches and sketched object boundaries. • We explore novel losses for training deep image synthesis. In particular we formulate a local texture loss which encourages the generative network to handle new textures never seen on existing objects. 2. Related Work Image Synthesis. Synthesizing natural images has been one of the most intriguing and challenging tasks in graphics, vision and machine learning research. Most of the existing approaches fall into non-parametric and parametric types. On one hand, non-parametric approaches have a long-standing history. They are typically data-driven or example-based, i.e., directly exploit and borrow existing image pixels for the target tasks [1, 3, 6, 13, 33]. Therefore, non-parametric approaches often excel at generating realistic results while having limited generalization ability, i.e., being restricted by the limitation of data and examples, e.g., data bias and long-tail distribution. On the other hand, parametric approaches, especially deep learning based approaches, have achieved promising results in recent years. Different from non-parametric methods, these approaches utilize image datasets as training data to fit deep parametric models, and have shown superior modeling power and generalization ability in image synthesis [11, 21], e.g., hallucinating diverse and relatively realistic images that are different from training data. Generative Adversarial Networks (GANs) [11] are a type of parametric method that has been widely applied and studied for image synthesis. The main idea is to train paired generator and discriminator networks jointly, where the goal of the discriminator is to classify between ‘real’ images and generated ‘fake’ images, and the generator aims to fool the discriminator so that the generated images are indistinguishable from real images. Once trained, the generator can be used to synthesize images driven by a compact vector of noise. Compared to the blurry and low-resolution outcome from other deep learning methods [21, 4], GANbased methods [35, 32, 17, 49] generate more realistic results with richer local details and of higher resolution. Controllable Image Synthesis and Conditional GANs. Practical image synthesis tools require perceptually controllable interfaces, ranging from high-level attributes, such as object classes [34], object poses [4], natural language descriptions [36], to fine-grained details, such as segmentation masks [17], sketches [37, 12], color scribbles [37, 48], and cross-domain images [9, 44]. While the ‘vanilla’ GAN is able to generate realistic looking images from noise, it controllable. Conditional GANs are models that synthesize images based on input modalities other than simple noise, thus offering more control over the generated results. Compared to vanilla GANs, conditional GANs introduce additional discriminators or losses to guide generators to output images with desired properties, e.g., an object category discriminator [34], a discriminator to judge visual-text association [36], or a simple pixel-wise loss between generated images and target images [17]. It is worth highlighting several recent and concurrent works on sketch or color-constrained deep image synthesis. Scribbler [37] demonstrates an image synthesis framework that takes as input user sketches and short color strokes, and generates realistic looking output that follows the input sketch and has colorization schemes consistent to color strokes. A similar system is employed for automatically painting cartoon images [29]. Recently, a user-guided interactive image colorization system was proposed in [48], offering users the control of color when coloring or recoloring an input image. Distinct from these works, our system simultaneously supports richer user guidance signals including structural sketches, color patches and texture swatches. Moreover, we offer studies on the effect of several variants of improved loss functions and show synthesized results of various object categories. Texture Synthesis and Style Transfer. Texture synthesis and style transfer are two closely related topics in image synthesis. Given an input texture image, texture synthesis aims at generating new images with visually similar textures. Style transfer has two inputs – content and style images – and aims to synthesize images with the layout and structure of the content image and the texture of the style image. Non-parametric texture synthesis and style transfer methods typically re-sample given example images to form the output [6, 5, 40, 14]. TextureShop [7] is similar to our method in that it aims to texture an object with a user-provided texture, although TextureShop used non-parametric texture synthesis and shape-from-shading to foreshorten the texture so that it appears to follow the object surface. Recently, a new deep style transfer method [8, 9] demonstrated that the correlations (i.e., Gram matrix) between features extracted from a pre-trained deep neural network capture the characteristics of textures well and showed promising results in synthesizing textures and transferring styles. In [8, 9], texture synthesis and style transfer are formalized as an optimization problem, where an output image is generated by minimizing a loss function of two terms, one of which measures content similarity between the input content image and the output, and the other measures style similarity between the input style and the output using the Gram matrix. Shortly after, there have been many work on improving [8, 9] from the aspects for generalization [46, 15, 26], efficiency [39, 19] and controllability [10]. Recently, several texture synthesis methods have used GANs to improve the quality of the generated results. [25] uses adversarial training to discriminate between real and fake textures based on a feature patch from the VGG network. Instead of operating on feature space, [18, 2] apply adversarial training at the pixel level to encourage the generated results to be indistinguishable from real texture. Our proposed texture discriminator in section 3.2.1 differs from prior work by comparing a pair of patches from generated and ground truth textures instead of using a single texture patch. Intuitively, our discriminator is tasked with the finegrained question of “is this the same texture?” rather than the more general “is this a valid texture?”. Fooling such a discriminator is more difficult and requires our generator to synthesize not just realistic texture but also texture that is faithful to various input texture styles. Similar to texture synthesis, image completion or inpainting methods have also showed promising results using GANs. Our task has similarities to the image completion problem, which attempts to fill in missing regions of an image, although our missing area is significantly larger and partially constrained by sketch, color, or texture. Similar to our approach, [43] computes texture loss between patches to encourage the inpainted region to be faithful to the original image regions. However, their texture loss only accounts for similarity in feature space. Our approach is similar in spirit to [16] which proposes using both global and local discriminators to ensure that results are both realistic and consistent with the image context, whereas our texture discriminator is instead checking consistency between input texture patch and output image. 3. TextureGAN We seek an image synthesis pipeline that can generate natural images based on an input sketch and some number of user-provided texture patches. Users can provide rough sketches that outline the desired objects to control the generation of semantic content, e.g. object type and shape, but sketches do not contain enough information to guide the generation of texture details, materials, and patterns. To guide the generation of fine-scale details, we want users to somehow control texture properties of objects and scene elements. Towards this goal, we introduce TextureGAN, a conditional generative network that learns to generate realistic images from input sketches with overlaid textures. We argue that instead of providing just an unanchored texture sample, users can more precisely control the generated appearance by directly placing small texture patches over the sketch, since locations and sizes of patches provide important information that influence the visual appearance. In this setup, the user can ‘drag’ rectangular texture patches of arbitrary sizes into different sketch regions as additional input to the network. For example, the user can specify a striped texture patch for a shirt and a dotted texture patch for a skirt. The input patches guide the network to propagate the texture information to the relevant regions respecting semantic boundaries (e.g. dots should appear on the skirt but not on the legs). A major challenge for a network learning this task is the uncertain pixel correspondence between the input texture and the unconstrained sketch regions. To encourage the network to produce realistic textures, we propose a patchbased texture loss 3.2.1 based on a texture discriminator and a Gram matrix style loss. This not only helps the generated texture follow the input faithfully, but also helps the network learn to propagate the texture patch and synthesize new texture. TextureGAN also allows users to more precisely control the colors in the generated result. One limitation of previous color control with GANs [37] is that the input color constraints in the form of RGB need to fight with the network’s understanding about the semantics, e.g., bags are mostly black and shoes are seldom green. To address this problem, we train the network to generate images in the Lab color space. We convert the groundtruth images to Lab, enforce the content, texture and adversarial losses only on the L channel, and enforce a separate color loss on the ab channels. We show that combining the controls in this way allows the network to generate realistic photos closely following the user’s color and texture intent without introducing obvious visual artifacts. Figure 2 shows our training pipeline. We use the network architecture proposed in Scribbler [37] with additional skip connections. Details of our network architecture are included in the supplementary material. We use a 5-channel image as input to the network. The channels support three different types of controls – one channel for sketch, two channels for texture (one intensity and one binary location mask), and two channels for color (including but not limited to texture color). Section 4.2 describes the method we used to generate each input channel of the network. We first train TextureGAN to reproduce ground-truth shoe, handbag, and clothes photos given synthetically generated input control channels. We then generalize TextureGAN to support a broader range of textures and to propagate unseen textures better by fine-tuning the network with a separate texture-only database. 3.1. Ground-truth Pre-training We aim to propagate the texture information contained in small patches to fill in an entire object. As in Scribbler [37], we use feature and adversarial losses to encourage the generation of realistic object structures. However, we find that these losses alone cannot reproduce fine-grained texture details. Also, Scribbler uses pixel loss to enforce color constraints, but fails when the input color is rare for that particular object category. Therefore, we redefine the feature and adversarial losses and introduce new losses to improve the replication of texture details and encourage precise propagation of colors. For initial training, we derive the network’s input channels from ground-truth photos of objects. When computing the losses, we compare the generated images with the ground-truth. Our objective function consists of multiple terms, each of which encourages the network to focus on different image aspects. Feature Loss LF . It has been shown previously that the features extracted from middle layers of a pre-trained neural network, VGG-19 [38], represent high-level semantic information of an image [12, 37]. Given a rough outline sketch, we would like the generated image to loosely follow the object structures specified by the sketch. Therefore, we decide to use a deeper layer of VGG-19 for feature loss (relu 4 2). To focus the feature loss on generating structures, we convert both the ground-truth image and the generated image from RGB color space to Lab and generate grayscale images by repeating the L channel values. We then feed the grayscale image to VGG-19 to extract features. The feature loss is defined as the L2 difference in the feature space. During back propagation, the gradients passing through the L channel of the output image are averaged from the three channels of the VGG-19 output. Adversarial Loss LADV . Generative adversarial networks (GANs) have been shown to generate realistic images from random noise seeds [11]. In GANs, a generator network and a discriminator network are trained simultaneously in a minimax game. The discriminator tries to distinguish generated images from real photos while the generator tries to generate realistic images tricking the discriminator into thinking they are real. By alternating the optimization of the generator and the discriminator until convergence, the generator would ideally generate images indistinguishable from real photos. In recent work, the concept of adversarial training has also been adopted in the context of image to image translation. In particular, one can attach a trainable discriminator network at the end of the image translation network and use it to constrain the generated result to lie on the training image manifold. Previous work proposed to minimize the adversarial loss (loss from the discriminator network) together with other standard losses (pixel, feature losses, etc). The exact choice of losses depends on the different applications [37, 17, 12]. Our work follows the same line. We use adversarial loss on top of feature, texture and color losses. The adversarial loss pushes the network towards synthesizing sharp and realistic images, but at the same time constrains the generated images to choose among typical colors in the training images. The network’s understanding about color sometimes conflicts with user’s color constraints, e.g. a user provides a rainbow color constraint for a handbag, but the adversarial network thinks it looks fake and discourages the generator from producing such output. Therefore, we propose applying the adversarial loss Ladv only on grayscale image (the L channel in Lab space). The discriminator is trained to disregard the color but focus on generating sharp and realistic details. The gradients of the loss only flow through the L channel of the generator output. This effectively reduces the search space and makes GAN training easier and more stable. We perform the adversarial training using the techniques proposed in DCGAN [35] with the modification proposed in LSGAN [32]. LSGAN proposed replacing the cross entropy loss in the original GAN with linear least square loss for higher quality results and stable training. Style Loss LS . In addition to generating the right content following the input sketch, we would also like to propagate the texture details given in the input texture patch. The Figure 2. TextureGAN pipeline. A feed-forward generative network is trained end-to-end to directly transform a 5-channel input to a high-res photo with realistic texture details. The red arrows indicate losses that are active for “texture fine tuning”. See text for detailed description of various losses. previous feature and adversarial losses sometimes struggle to capture fine-scale details, since they focus on getting the overall structure correct. Similar to deep learning based texture synthesis and style transfer work [8, 9], we use style loss to specifically encourage the reproduction of texture details, but we apply style loss on the L channel only. We adopt the idea of matching the Gram matrices (feature correlations) of the features extracted from certain layers of the pretrained classification network (VGG-19). The Gram mal trix Gij ∈ RNl xNl is defined as: X l l l Gij = Fik Fjk (1) k where, Nl is the number of feature maps at network layer l, l Fik is the activation of the ith filter at position k in layer l. We use two layers of the VGG-19 network (relu3 2, relu4 2) to define our style loss. Pixel Loss LP . We find that adding relatively weak L2 pixel loss on the L channel stabilizes the training and leads to the generation of texture details that are more faithful to the user’s input texture patch. Color Loss LC . All losses above are applied only on the L channel of the output to focus on generating sketchconforming structures, realistic shading, and sharp highfrequency texture details. To enforce the user’s color constraints, we add a separate color loss that penalizes the L2 difference between the ab channels of the generated result and that of the ground-truth. Our combined objective function is defined as: L = LF + wADV LADV + wS LS + wP LP + wC LC (2) The exact training details can be found in section 4.4. 3.2. External Texture Fine-tuning One problem of training with “ground-truth” images is that it is hard for the network to focus on reproducing lowlevel texture details due to the difficulty of disentangling the texture from the content within the same image. For example, we do not necessarily have training examples of the same object with different textures applied which might help the network learn the factorization between structure and texture. Also, the Gram matrix-based style loss can be dominated by the feature loss since both are optimized for the same image. There is not much room for the network to be creative in hallucinating low-level texture details, since it tends to focus on generating high-level structure, color, and patterns. Finally, many of the ground-truth texture patches contain smooth color gradients without rich details. Trained solely on those, the network is likely to ignore “hints” from an unseen input texture patch at test time, especially if the texture hint conflicts with information from the sketch. As a result, the network often struggles to propagate high-frequency texture details in the results especially for textures that are rarely seen during training. To train the network to propagate a broader range of textures, we fine-tune our network to reproduce and propagate textures for which we have no ground truth output. To do this, we introduce a new patch-based, local texture loss and adapt our existing losses to encourage faithfulness to a texture rather than faithfulness to a ground truth output object photo. We use all the losses introduced in the previous sections except the global style loss LS . We keep the feature and adversarial losses, LF , LADV , unchanged, but modify the pixel and color losses, L0P , L0C , to compare the gener- ated result with the entire input texture from which input texture patches are extracted. To prevent color and texture bleeding, the losses are applied only on the foreground object, as approximated by a segmentation mask (Section 4.1). 3.2.1 Patch-based Texture Loss To encourage better propagation of texture, we propose a patch-based texture loss Lt , that is only applied to small local regions of the output image. For handbags and shoes, we utilize foreground background separation (section 4.1) to locate the foreground object and apply the texture loss within the foreground. For clothes, we use the detailed segmentation of clothes items [24, 28] to apply texture loss within the semantic region where the input patch is placed. The texture loss Lt is composed of three terms: Lt = Ls + wp Lp + wadv Ladv (3) Local Discriminator Loss Ladv . We introduce a patchbased adversarial loss that decides whether a pair of texture patches have the same texture. We train the discriminator to recognize a pair of cropped patches from the same texture as a positive example, and a pair of patches from different textures (one from the input texture and one from the generated result) as a negative example. We define Ladv as P follows: Ladv = − (Dtxt (G(xi ), It ) − 1)2 . We use 0 to indicate fake and 1 to indicate real. Local Style Loss Ls and Pixel Loss Lp . To strengthen the texture propagation, we also use Gram matrix-based style loss and L2 pixel loss on the cropped patches. We randomly sample two patches of size 50x50 from the generated result and the input texture (from the separate texture database), compute texture loss on the L channel of the patches and average them. We propagate the gradients of the texture loss only through the corresponding patch region in the output. While performing the texture fine-tuning, the network is trying to adapt itself to understand and propagate new types of textures, and might ‘forget’ what it learnt from the ground-truth pretraining stage. Therefore, when training on external textures, we mix in iterations of ground-truth training fifty percent of the time. Our final objective function becomes: L = LF + wADV LADV + wP L0P + wC L0C + Lt (4) 4. Training Setup We train TextureGAN on three object-centric datasets – handbags [49], shoes [45] and clothes [27, 28, 30, 31]. Each photo collection contains large variations of colors, materials, and patterns. These domains are also chosen so that we can demonstrate plausible product design applications. For supervised training, we need to generate (input, output) image pairs. For the output of the network, we convert the ground-truth photos to Lab color space. For the input to the network, we process the ground-truth photos to extract 5-channel images. The five channels include one channel for the binary sketch, two channels for the texture (intensities and binary location masks), and two channels for the color controls. In this section, we describe how we obtain segmentation masks used during training, how we generate each of the input channels for the ground-truth pre-training, and how we utilize the separate texture database for the network finetuning. We also provide detailed training procedures and parameters. 4.1. Segmentation Mask For our local texture loss, we hope to encourage samples of output texture to match samples of input texture. But the output texture is localized to particular image regions (e.g. the interior of objects) so we wouldn’t want to compare a background patch to an input texture. Therefore we only sample patches which fall inside an estimated foreground segmentation mask. Our handbag and shoe datasets are product images with consistent, white backgrounds so we simply set the white pixels as background pixels. For clothes, the segmentation mask is already given in the dataset. With the clothes segmentation mask, we process the ground-truth photos to white out the background. Note that segmentation masks are not used at test time. 4.2. Data Generation for Pre-training Sketch Generation. For handbags and shoes, we generate sketches using the deep edge detection method used in pix2pix [42, 17]. For clothes, we leverage the clothes parsing information provided in the dataset [27, 28]. We apply Canny edge detection on the clothing segmentation mask to extract the segment boundaries and treat them as a sketch. We also apply xDoG [41] on the clothes image to obtain more variation in the training sketches. Finally, we mix in additional synthetic sketches generated using the methods proposed in Scribbler [37]. Texture Patches. To generate input texture constraints, we randomly crop small regions within the foreground objects of the ground-truth images. We randomly choose the patch location from within the segmentation and randomize the patch size. We convert each texture patch to the Lab color space and normalize the pixels to fall into 0-1 range. For each image, we randomly generate one or two texture patches. For clothes, we extract texture patches from one of the following regions – top, skirt, pant, dress, or bag. We pass a binary mask to the network to indicate the spatial support of the texture. Figure 4. Effect of Proposed local losses. a) Results from the ground-truth model without any local losses, b) with local pixel loss, c) with local style loss, d) with local texture discriminator loss. With local discriminator loss, the network tends to produce more consistent texture throughout the object. Figure 3. The effect of texture loss and adversarial loss. a) The network trained using all proposed losses can effectively propagate textures to most of the foreground region; b) Removing adversarial loss leads to blurry results; c) Removing texture loss harms the propagation of textures. 4.3. Data Generation for Fine-tuning To encourage diverse and faithful texture reproduction, we fine-tune TextureGAN by applying external texture patches from a leather-like texture dataset. We queried “leather” in Google and manually filtered the results to 130 high resolution leather textures. From this clean dataset, we sampled roughly 50 crops of size 256x256 from each image to generate a dataset of 6,300 leather-like textures. We train our models on leather-like textures since they are commonly seen materials for handbags, shoes and clothes and contain large appearance variations that are challenging for the network to propagate. 4.4. Training Details For pre-training, we use the following parameters on all datasets. wADV = 1, wS = 0.1, wP = 10 and wC = 100. We use the Adam optimizer [20] with learning rate 1e-2. For fine-tuning, we optimize all the losses at the same time but use different weight settings. wADV = 1e4, wS = 0, wP = 1e2, wC = 1e3, ws = 10, wp = 0.01, and wadv = 7e3. We also decrease the learning rate to 1e-3. We train most of the models at input resolution of 128x128 except one clothes model at the resolution of 256x256 (Figure 6). 5. Results and Discussions Ablation Study. Keeping other settings the same, we train networks using different combinations of losses to analyze how they influence the result quality. In Figure 3, given the input sketch, texture patch and color patch (first column), the network trained with the complete objective function (second column) correctly propagates the color and texture to the entire handbag. If we turn off the texture loss (fourth column), the texture details within the area of the input patch are preserved, but difficult textures cannot be fully propagated to the rest of the bag. If we turn off the adversarial loss (third column), texture is synthesized, but that texture is not consistent with the input texture. Our ablation experiment confirms that style loss alone is not sufficient to encourage texture propagation motivating our local patchbased texture loss (Section 3.2.1). External Texture Fine-tuning Results. We train TextureGAN on three datasets – shoes, handbags, and clothes – with increasing levels of structure complexity. We notice that for object categories like shoes that contain limited structure variations, the network is able to quickly generate realistic shading and structures and focus its remaining capacity for propagating textures. The texture propagation on the shoes dataset works well even without external texture fine-tuning. For more sophisticated datasets like handbags and clothes, external texture fine-tuning is critical for the propagation of difficult textures that contain sharp regular structures, such as stripes. Figure 4 demonstrates how external texture fine-tuning with our proposed texture loss can improves the texture consistency and propagation. The “ground truth” pre-trained model is faithful to the input texture patch in the output only directly under the patch and does not propagate it throughout the foreground region. By fine-tuning the network with texture examples and enforcing local style loss, local pixel loss, and local texture loss we nudge the network to apply texture consistently across the object. With local style loss (column c) and local texture discriminator loss (column d), the networks are able to propagate texture better than without fine tuning (column a) or just local pixel loss (column b). Using local texture discriminator loss tends to produce Figure 5. Results for shoes and handbags on different textures. Odd rows: input sketch and texture patch. Even rows: generated results. a resolution of 256x256. The clothes dataset contains large variations of structures and textures, and each image in the dataset contains multiple semantic regions. Our network can also handle multiple texture patches. As shown in figure 6, we put different texture patches on different parts of the clothes (middle left and bottom left). The network can propagate the textures within semantic regions of the sketch while respecting the sketch boundaries. Figure 7 shows results on human-drawn handbags. These drawings differ from our synthetically generated training sketches but the results are still high quality. 6. Conclusion Figure 6. Applying multiple texture patches on the sketch. Our system can also handle multiple texture inputs and our network can follow sketch contours and expand the texture to cover the sketched object. Figure 7. Results on human-drawn sketches. more visually similar result to the input texture than style loss. Figure 5 shows the results of applying various texture patches to sketches of handbags and shoes. These results are typical of test-time result quality. Figure 6 shows results on the clothes dataset trained at We have presented an approach for controlling deep image synthesis with input sketch and texture patches. With this system, the user can draw the object structure through sketching and precisely control the generated details with texture patches. TextureGAN is feed-forward which allows users to see the effect of their edits in real time. By training TextureGAN with local texture constraints, we demonstrate its effectiveness on sketch and texture-based image synthesis. TextureGAN also operates in Lab color space, which enables separate controls on color and content. Furthermore, our results on fashion datasets show that our pipeline is able to handle a wide variety of texture inputs and generates texture compositions that follow the sketched contours. In the future, we hope to apply our network on more complex scenes. References [1] C. Barnes, E. Shechtman, A. Finkelstein, and D. Goldman. Patchmatch: A randomized correspondence algorithm for structural image editing. ACM Transactions on GraphicsTOG, 28(3):24, 2009. 2 [2] U. Bergmann, N. Jetchev, and R. Vollgraf. Learning texture manifolds with the periodic spatial gan. arXiv preprint arXiv:1705.06566, 2017. 3 [3] T. Chen, M. ming Cheng, P. Tan, A. Shamir, and S. min Hu. Sketch2photo: internet image montage. ACM SIGGRAPH Asia, 2009. 2 [4] A. Dosovitskiy, J. T. Springenberg, and T. Brox. Learning to generate chairs with convolutional neural networks. CoRR, abs/1411.5928, 2014. 2 [5] A. A. Efros and W. T. Freeman. Image quilting for texture synthesis and transfer. In Proceedings of the 28th annual conference on Computer graphics and interactive techniques, pages 341–346. ACM, 2001. 3 [6] A. A. Efros and T. K. Leung. Texture synthesis by nonparametric sampling. In Computer Vision, 1999. The Proceedings of the Seventh IEEE International Conference on, volume 2, pages 1033–1038. IEEE, 1999. 2, 3 [7] H. Fang and J. C. Hart. Textureshop: Texture synthesis as a photograph editing tool. ACM Trans. Graph., 23(3):354– 359, Aug. 2004. 3 [8] L. Gatys, A. S. Ecker, and M. Bethge. Texture synthesis using convolutional neural networks. In Advances in Neural Information Processing Systems, pages 262–270, 2015. 3, 5 [9] L. A. Gatys, A. S. Ecker, and M. Bethge. Image style transfer using convolutional neural networks. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2414–2423, June 2016. 2, 3, 5 [10] L. A. Gatys, A. S. Ecker, M. Bethge, A. Hertzmann, and E. Shechtman. Controlling perceptual factors in neural style transfer. arXiv preprint arXiv:1611.07865, 2016. 3 [11] 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, 4 [12] Y. Güçlütürk, U. Güçlü, R. van Lier, and M. A. van Gerven. Convolutional sketch inversion. In Proceeding of the ECCV workshop on VISART Where Computer Vision Meets Art, 2016. 2, 4 [13] J. Hays and A. A. Efros. Scene completion using millions of photographs. In ACM Transactions on Graphics (TOG), volume 26, page 4. ACM, 2007. 2 [14] A. Hertzmann, C. E. Jacobs, N. Oliver, B. Curless, and D. H. Salesin. Image analogies. In Proceedings of the 28th annual conference on Computer graphics and interactive techniques, pages 327–340. ACM, 2001. 3 [15] X. Huang and S. Belongie. Arbitrary style transfer in realtime with adaptive instance normalization. arXiv preprint arXiv:1703.06868, 2017. 3 [16] S. Iizuka, E. Simo-Serra, and H. Ishikawa. Globally and Locally Consistent Image Completion. ACM Transactions on Graphics (Proc. of SIGGRAPH 2017), 36(4):107:1–107:14, 2017. 3 [17] P. Isola, J.-Y. Zhu, T. Zhou, and A. A. Efros. Imageto-image translation with conditional adversarial networks. arXiv preprint arXiv:1611.07004, 2016. 2, 4, 6 [18] N. Jetchev, U. Bergmann, and R. Vollgraf. Texture synthesis with spatial generative adversarial networks. arXiv preprint arXiv:1611.08207, 2016. 3 [19] J. Johnson, A. Alahi, and L. Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In European [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] 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. 7 D. P. Kingma and M. Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. 2 J.-F. Lalonde, D. Hoiem, A. A. Efros, C. Rother, J. Winn, and A. Criminisi. Photo clip art. ACM Transactions on Graphics (SIGGRAPH 2007), 26(3):3, August 2007. 1 G. Larsson, M. Maire, and G. Shakhnarovich. Learning representations for automatic colorization. In European Conference on Computer Vision (ECCV), 2016. 2 C. Lassner, G. Pons-Moll, and P. V. Gehler. A generative model for people in clothing. In Proceedings of the IEEE International Conference on Computer Vision, 2017. 6 C. Li and M. Wand. Precomputed real-time texture synthesis with markovian generative adversarial networks. In European Conference on Computer Vision, pages 702–716. Springer, 2016. 3 Y. Li, C. Fang, J. Yang, Z. Wang, X. Lu, and M.-H. Yang. Diversified texture synthesis with feed-forward networks. arXiv preprint arXiv:1703.01664, 2017. 3 X. Liang, S. Liu, X. Shen, J. Yang, L. Liu, J. Dong, L. Lin, and S. Yan. Deep human parsing with active template regression. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 37(12):2402–2414, Dec 2015. 6 X. Liang, C. Xu, X. Shen, J. Yang, S. Liu, J. Tang, L. Lin, and S. Yan. Human parsing with contextualized convolutional neural network. In Proceedings of the IEEE International Conference on Computer Vision, pages 1386–1394, 2015. 6 Y. Liu, Z. Qin, Z. Luo, and H. Wang. Auto-painter: Cartoon image generation from sketch by using conditional generative adversarial networks. arXiv preprint arXiv:1705.01908, 2017. 2 Z. Liu, P. Luo, S. Qiu, X. Wang, and X. Tang. Deepfashion: Powering robust clothes recognition and retrieval with rich annotations. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 6 Z. Liu, S. Yan, P. Luo, X. Wang, and X. Tang. Fashion landmark detection in the wild. In European Conference on Computer Vision (ECCV), 2016. 6 X. Mao, Q. Li, H. Xie, R. Y. Lau, Z. Wang, and S. P. Smolley. Least squares generative adversarial networks. arXiv preprint ArXiv:1611.04076, 2016. 2, 4 L. McMillan and G. Bishop. Plenoptic modeling: An imagebased rendering system. In Proceedings of the 22nd annual conference on Computer graphics and interactive techniques, pages 39–46. ACM, 1995. 1, 2 A. Odena, C. Olah, and J. Shlens. Conditional image synthesis with auxiliary classifier gans. arXiv preprint arXiv:1610.09585, 2016. 2 A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. 2, 4 S. Reed, Z. Akata, X. Yan, L. Logeswaran, B. Schiele, and H. Lee. Generative adversarial text to image synthesis. In [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] Proceedings of The 33rd International Conference on Machine Learning, volume 3, 2016. 2 P. Sangkloy, J. Lu, C. Fang, F. Yu, and J. Hays. Scribbler: Controlling deep image synthesis with sketch and color. Computer Vision and Pattern Recognition, CVPR, 2017. 2, 3, 4, 6 K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In Proceedings of the International Conference on Learning Representations (ICLR), 2015. 4 D. Ulyanov, V. Lebedev, A. Vedaldi, and V. Lempitsky. Texture networks: Feed-forward synthesis of textures and stylized images. In Int. Conf. on Machine Learning (ICML), 2016. 3 L.-Y. Wei and M. Levoy. Fast texture synthesis using treestructured vector quantization. In Proceedings of the 27th annual conference on Computer graphics and interactive techniques, pages 479–488. ACM Press/Addison-Wesley Publishing Co., 2000. 3 H. WinnemöLler, J. E. Kyprianidis, and S. C. Olsen. Xdog: an extended difference-of-gaussians compendium including advanced image stylization. Computers & Graphics, 36(6):740–753, 2012. 6 S. ”Xie and Z. Tu. Holistically-nested edge detection. In Proceedings of IEEE International Conference on Computer Vision, 2015. 6 C. Yang, X. Lu, Z. Lin, E. Shechtman, O. Wang, and H. Li. High-resolution image inpainting using multi-scale neural patch synthesis. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 3 D. Yoo, N. Kim, S. Park, A. S. Paek, and I. S. Kweon. Pixellevel domain transfer. In European Conference on Computer Vision, pages 517–532. Springer, 2016. 2 A. Yu and K. Grauman. Fine-grained visual comparisons with local learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 192– 199, 2014. 6 H. Zhang and K. Dana. Multi-style generative network for real-time transfer. arXiv preprint arXiv:1703.06953, 2017. 3 R. Zhang, P. Isola, and A. A. Efros. Colorful image colorization. In ECCV, 2016. 2 R. Zhang, J.-Y. Zhu, P. Isola, X. Geng, A. S. Lin, T. Yu, and A. A. Efros. Real-time user-guided image colorization with learned deep priors. ACM Transactions on Graphics (TOG), 9(4), 2017. 2 J.-Y. Zhu, P. Krähenbühl, E. Shechtman, and A. A. Efros. Generative visual manipulation on the natural image manifold. In Proceedings of European Conference on Computer Vision (ECCV), 2016. 2, 6
1cs.CV
arXiv:1702.08895v1 [math.ST] 28 Feb 2017 Minimax density estimation for growing dimension Daniel J. McDonald Department of Statistics Indiana University Bloomington, IN, 47405 [email protected] Version: March 1, 2017 Abstract This paper presents minimax rates for density estimation when the data dimension d is allowed to grow with the number of observations n rather than remaining fixed as in previous analyses. We prove a non-asymptotic lower bound which gives the worst-case rate over standard classes of smooth densities, and we show that kernel density estimators achieve this rate. We also give oracle choices for the bandwidth and derive the fastest rate d can grow with n to maintain estimation consistency. 1 Introduction A convincing argument for the use of sparsity or other structural priors in machine learning and statistics often begins with a discussion of the “curse of dimensionality” (e.g. Donoho, 2000). Unmistakable evidence of this curse is simply demonstrated in the fundamental scenario of non-parametric density estimation: the best estimator has squared L2 error on the order of n−4/(4+d) given n independent observations in d dimensions, a striking contrast with the parametric rate d/n. If d is even moderately large (but fixed), accurate estimation requires significantly more data than if d were small. In fact, we will show that if d is allowed to increase with n, estimation accuracy degrades even more quickly than the non-parametric rate above indicates. At first, it may seem that allowing d to grow with n is a rather strange scenario, but the use of “triangular array” asymptotics is exceedingly common in the theory of high-dimensional estimation. Theoretical results for the lasso, beginning at least with (Greenshtein and Ritov, 2004), regularly adopt this framework allowing the number of predictors to grow with n. Bühlmann and van de Geer (2011) introduce the idea at the very beginning of their foundational text, and it has been widely adopted in the literature on regularized linear models (e.g. Belloni et al., 2011; Bickel et al., 2009; Meinshausen, 2007; Nardi and Rinaldo, 2008; Ye and Zhang, 2010). Under this framework, the marginal distribution of the predictors has support whose dimension is increasing with n. In the scenario of high-dimensional regression, the dimension can increase very quickly (often on the order of d = o(nα ), α > 1) as long as most of these dimensions are irrelevant for predicting the response. The extension of these results for linear models to the non-linear scenario has been studied mainly in the case of generalized (sparse) additive models (Ravikumar et al., 2008, 2009; Yuan and Zhou, 2015) which allow for predictor specific non-linearities as long as the final predictions are merely additive across dimensions. Fully nonparametric regression without the additivity assumption has been completely ignored outside of the fixed-d framework, although it is a natural extension of the work presented here. Another motivation for appropriating the triangular array framework in non-parametric density estimation is the burgeoning literature on manifold estimation (Genovese et al., 2012a,b; Talwalkar et al., 2008). Given high-dimensional data, a natural assumption is that the data is supported on a low-dimensional manifold embedded in the high-dimensional space. While estimating the manifold is possible, we may also wish to estimate a density or a regression function supported on the manifold. Recent work has focused on density estimation when the dimension of the manifold is fixed and known (Asta, 2013; Bhattacharya and Dunson, 2010; Hendriks, 1990; Pelletier, 2005), but the extension of such results to manifolds of growing dimension is 1 missing. Such an extension presumes that the minimax framework we present can be extended to manifolds. As pointed out by a reviewer, the short answer is yes. The lower bound we derive applies immediately. The only modification we need relates to our upper bound: the kernel should depend on the metric given by the manifold rather than Euclidean distance as we use here. A specific application of our setting would be from fMRI data. Given a sequence of 3D resting-state fMRI scans from a patient, researchers seek to estimate the dependence between cubic centimeter voxels (e.g. Bullmore and Sporns, 2009). Each scan can contain on the order of 30,000 voxels, while the number of scans for one individual is smaller. It is too much to estimate the dependence between all voxels, so the data are averaged into a small number (∼20–200) of regions. To estimate the dependence, standard methods assume everything is multivariate Gaussian and estimate the covariance or precision matrix. But the Gaussian assumption cannot be tested without density estimates. Using our results, we could estimate smooth densities. As the number of scans grows, we would want to increase the number of regions. Our work illustrates how quickly the number of regions can grow. The remainder of this section introduces the statistical minimax framework, discusses the specific data generating model we examine and details notation, presents some background on the estimator we use which achieves the minimax rate, and gives a short overview of related literature. In Section 2, we give our main results and discuss their implications, specifically obtaining the fastest rate at which d can grow with n to yield estimation consistency. Section 3 gives the proof of our lower bound over all possible estimators while the proof of the matching upper bound for the kernel density estimator is given in Section 4. Finally, we discuss these results in Section 5, provide some related results for other loss functions, and suggest avenues for future research. 1.1 The Minimax Framework In order to evaluate the feasibility of density estimation under the triangular array, we use the statistical minimax framework. In our situation, this framework begins with a specific class of possible densities we are willing to consider and provides a lower bound on the performance of the best possible estimator over this class. With this bound in hand, we have now quantified the difficulty of the problem. If we can then find an estimator which achieves this bound (possibly up to constants), then we can be confident that this estimator performs nearly as well as possible for the given class of densities. Thus, the minimax framework reveals gaps between proposed estimators and the limits of possible inference. Of course if the bounds fail to match, then we won’t know whether they are too loose, or the estimator is poor. 1.2 Model and Notation We specify the following setting for density estimation in a triangular array. Suppose for each n ≥ 1, (n) Xi ∈ Rd(n) , i = 1, . . . , n are independent with common density f (n) in some class which we define below. For notational convenience, we will generally suppress the dependence on (n). To be clear, in specifying this model, we do not assume a relationship for some sequence of densities {f (n) }∞ n=1 , but rather we seek to understand the limits of estimation when there is a correspondence between d(n) and n. Thus, we seek non-asymptotic results which Q this behavior. We will also employ the following notation: given P characterize vectors s, x ∈ Rd , let |s| = i si , s! = i si ! and xs = xs11 · · · xsdd . Then define Ds = ∂xs11 ∂ |s| . · · · ∂xsdd Let ⌊β⌋ denote the largest integer strictly less than β. Throughout, we will use a and A for positive constants whose values may change depending on the context. Even were d fixed at 1, it is clear that density estimation is impossible were we to allow f to be arbitrary.1 For this reason, we will restrict the class of densities we are willing to allow. Definition 1 (Nikol’skii class). Let p ∈ [2, ∞). The isotropic Nikol’skii class Np (β, C) is the set of functions f : Rd → R such that: 1 In the sense that, an adversary can choose a density and give us a finite amount of data on which our estimators will perform arbitrarily poorly. 2 (i) fR ≥ 0 a.e. (ii) f = 1. (iii) partial derivatives Ds f exist whenever |s| ≤ ⌊β⌋ R 1/p p β−|s| (iv) (Ds f (x + t) − Ds f (x)) dx ≤ C ktk1 , for all t ∈ Rd . This definition essentially characterizes the smoothness of the densities in a natural way. It can be shown easily that the Nikol’skii class generalizes Sobolev and Hölder classes under similar conditions (see e.g. Tsybakov, 2009, p. 13). 1.3 Parzen-Rosenblatt Kernel Estimator Given a sample X1 , . . . , Xn , the Parzen-Rosenblatt kernel density estimator on Rd at a point x is given by   n 1 X x − Xi b . fh (x) = K nhd i=1 h We will consider only certain functions K. d Definition 2. We say that R K : RR → βR is an isotropic kernel R of order β if K(u) = G(u1 )G(u2 ) · · · G(ud ) for G : R → R satisfying G = 1, |u| |G(u)|du < ∞, and uj G(u)du = 0, for 0 < j ≤ ⌊β⌋. For the standard case β = 2, the Epanechnikov kernel G(u) = 0.75(1 − u2 )I(|u| ≤ 1) satisfies these 2 conditions and is often the default in software. The Gaussian kernel, G(u) = (2π)−1/2 e−u /2 , is also a member of this class. For β > 2, the kernel must take negative values, possibly resulting in negative density estimates, although, using the positive-part estimator eliminates this pathology without affecting the results. Kernels for such β can be constructed using an orthonormal basis (see Tsybakov, 2009, p. 11). The intuition for this estimator is that it can be seen as a smooth generalization of the histogram density estimator which uses local information rather than fixed bins. Thus, if we believe the density is smooth, using such a smoothed out version is natural. Another way to see this is to observe that the kernel estimator is the convolution of K with the empirical density function fn , defined implicitly via Rx P 1 I(x ≤ x). Using the empirical density itself is an unbiased estimator of the f (y)dy = F (x) = i n n −∞ n true density (and it satisfies the central limit theorem for fixed d), but by adding bias through the kernel, we may be able to reduce variance, and achieve lower estimation risk for densities which “match” the kernel in a certain way. In this work, we have chosen, for simplicity, to use isotropic kernels and the isotropic Nikol’skii class of densities. Basically, densities f ∈ Np (β, C) have the same degree of smoothness in all directions. The same is true of the kernels which satisfy Definition 2. Allowing anisotropic smoothness is a natural extension, although the notation becomes complicated very quickly. For the anisotropic case under fixed-d asymptotics, see for example Goldenshluger and Lepski (2011). 1.4 Related Work Density estimation in the minimax framework is a well-studied problem with many meaningful contributions over the last six decades, and we do not pretend to give a complete overview here. Recent advances tend to build on one of four frameworks: (1) the support of f , (2) the smoothness of f , (3) whether the loss is adapted to the nature of the smoothness, and (4) whether the estimator can adapt to different degrees of smoothness. For a comprehensive overview of these and other concerns, an excellent resource is Goldenshluger and Lepski (2014) which presents results for adaptive estimators over classes of varying smoothness when the loss is not necessarily adapted to the smoothness. It also contextualizes and compares existing work. For previous results most similar to those we present in terms of function classes and losses, see Hasminskii and Ibragimov (1990). Other important work is given in Devroye and Györfi (1985); Goldenshluger and Lepski (2011); Juditsky and Lambert-Lacroix (2004); Kerkyacharian et al. (1996). Unlike in the density estimation setting, there are some related results in the information theory literature which endeavor to address the limits of estimation under the triangular array. Essentially, this work examines the estimation of the joint distribution of a d-block of random variables observed in sequence from an ergodic 3 process supported on a finite set of points. Marton and Shields (1994) show that if d grows like log n, then these joint distributions can be estimated consistently. An extension of these results to the case of a Markov random field embedded in a higher dimension is given by Steif (1997). Our results are slightly slower than these (see Corollary 5), but estimating continuous densities rather than finitely supported distributions is more difficult. 2 Main results Our main results give non-asymptotic rates for density estimation under growing dimension. It generalizes existing results in that, had d been fixed, we recover the usual rate. Deriving the minimax rate for density estimation requires two components: (1) finding the risk of the best possible estimator for the hardest density in our class and (2) exhibiting an estimator which achieves this risk. Our results are only rate minimax in that the upper and lower bounds match in d and n, but constants may be different. We first present the lower bound. Our proof is given in Section 3. Theorem 3 (Lower bound for density estimation). For any d ∈ Z+ , β > 1, p ∈ [2, ∞), choose n > n∗ with ∗ n = −2d 64 kΓ0 k2 " −(d+1)(2β+d) 4β+d kΓ0 kp C  σ ϕ(1/σ) # ≥c d(d+β) #1/β . Then, inf sup fb f ∈Np (β,C) for c(v) a function only of v and κ := Ef " nβ dd ϕ(1/σ) . σkΓ0 k22 1  2β+d f − fb p   1 C κ−β , 8 2 81/p The infimum is over all estimators fb. This result says that there exists a triangular array {f (n) } of densities in Np (β, C) so that the best risk we can hope to achieve over all possible estimators fb is ! 1    d  2β+d d =O Ef f − fb . nβ p The specific constant κ as well as the minimum n∗ are properties of the proof technique, so their forms are 2 not really relevant (except that κ is independent of n and d). Specifically, ϕ(u) = (2π)−1/2 e−u /2 is the standard normal density, σ > 0 is the standard deviation to be chosen, and Γ0 is a small perturbation we make explicit below. One could make other choices for the “worst case” density which result in different values. We also note that here C is the same constant in each equation (and in the remainder of the paper): it quantifies the smoothness of the class Np (β, C). Our second result shows that, for an oracle choice of the bandwidth h, kernel density estimators can achieve this rate. That is, for any density in Np (β, C), the risk of the kernel density estimator is optimal. The proof is given in Section 4. Theorem 4 (Upper bound for kernels). Let f ∈ Np (β, C). Let K(u) be an isotropic kernel of order ℓ = ⌊β⌋ R which satisfies K 2 (u)du < ∞. Take d ∈ Z+ , p ∈ [2, ∞). Finally, take h = A(d2 n)−1/(2β+d) for some constant A. Then, for n large enough, ! 1    d  2β+d d b =O sup Ef fh (x) − f (x) . nβ p f ∈Np (β,C) Our results so far have been finite sample bounds (which nonetheless depend on d and n). However, we also wish to know how quickly d can increase so that the estimation risk can still go to zero asymptotically (estimation consistency). Clearly, to have any hope that kernel density estimators are consistent, d must increase quite slowly with n. 4 Corollary 5. If d = o  β log n W (β log n)  , then sup f ∈Np (β,C) Ef  fbh (x) − f (x) p  = o (1) . Here W is the Lambert W function, implicitly defined as the inverse of u 7→ u exp(u). For n large, one can show using a series expansion that W (log n) = log log n − log log log n + o(1). So essentially, we require d to grow just slightly slower than log n, the information theoretic rate for estimating finite distributions with a sample from an ergodic process (see Section 1.4). While we have stated both main theorems in terms of expectations, analogous high-probability bounds can be derived similarly without extra effort. 3 Lower bound for density estimation The technique we use for finding the lower bound is rather standard. The idea is to convert the problem of density estimation into one of hypothesis testing. This proceeds by first noting that the probability that the error exceeds a constant is a lower bound for the risk. We then further reduce this lower bound by searching over only a finite class rather than all possible densities. Finally, we ensure that there are sufficiently many members in this class which are well-separated from each other but difficult to distinguish from the true density. Relative to previous techniques for minimax lower bounds for density estimation, the main difference in our proof is that we must choose different members of our finite class such that they have the right dependence on d. Our construction will make use of the Kullback-Leibler divergence. Definition 6 (KL divergence). The Kullback-Leibler divergence between two probability measures P and P ′ is (R dP P ≪ P′ dP log dP ′ ′ KL(P, P ) = ∞ else. If both P and P ′ have Radon-Nikodym derivatives with respect to the same dominating measure µ, then we can replace distributions with densities and integrate with respect to µ. As long as the KL divergence between the true density and the alternatives is small on average, it will be difficult to discriminate between them. Therefore, the probability of falsely rejecting the true density will be large. The following lemma makes the process explicit. Lemma 7 (Tsybakov 2009). Let L : R+ → R+ which is monotone increasing with L(0) = 0 and L 6≡ 0, and let A > 0 such that L(A) > 0. 1. Choose elements θ0 , θ1 , . . . , θM , M ≥ 1 in some class Θ; 2. Show that ρ(θj , θk ) ≥ 2τ > 0, ∀0 ≤ j < k ≤ M for some semi-distance ρ; 3. Show that Pθj ≪ Pθ0 , ∀j = 1, . . . , M and M 1 X KL(Pθj , Pθ0 ) ≤ α log M, M j=1 with 0 < α < 1/8. Then for ψ = τ /A we have h i b θ)) ≥ c(α)L(A), inf sup Eθ L(ψ −1 ρ(θ, θb θ∈Θ where inf θb denotes the infimum over all estimators and c(α) > 0 is a constant depending only on α. 5 To use this result, we first choose a base density f0 and M alternative densities in Np (β, C). We then show that these densities are sufficiently well-separated from each other in the Lp -norm, p ∈ [2, ∞), that is we take ρ(u, u′ ) = ρ(u − u′ ) = ku − u′ kp . Finally, we show that the KL-divergence between the alternatives and f0 is uniformly small, and therefore small on average. Our proof will use L(u) = u, though, as discussed following the proof, other choices of monotone increasing functions (e.g. L(u) = u2 ) simply modify the conclusion but not the proof. In order to get the “right” rate, we need to choose a base density and a series of small perturbations to create a large collection of alternatives. Getting the perturbations to be the right size and allow sufficiently many of them is the main trick to derive tight bounds. In our case, it is the choice Γ(u) (described below) that has this effect. The multiplicative dependence on d turns out to be the necessary deviation from existing lower bounds. Determining that this is the appropriate modification is an exercise in trial-and-error, and even this seemingly minor one is enough to compel a complete overhaul of the proof. The densities. Define f0 (x) = Let Γ0 : R → R+ satisfy 1 σd Qd i=1 ϕ(xi /σ) where ϕ(u) is the standard Gaussian density. (ℓ) (ℓ) (i) |Γ0 (u) − Γ0 (u′ )| ≤ |u − u′ |β−ℓ /2, ∀u, u′ , ℓ ≤ ⌊β⌋, (ii) Γ0 ∈ C ∞ (R), (iii) Γ0 (u) > 0 ⇔ u ∈ (−1/2, 1/2). d There exist many functions satisfying these conditions: e.g. Γ0 (u) = a−1 du exp(−1/(1 − 4u2 ))I(|u| < 1/2) (s) for some a > 0, since it is infinitely continuously differentiable and Γ0 Q Define Γ(u) = dC di=1 Γ0 (ui ), and for any integer m > 0, let ∞ is decreasing in s. γm,j (x) = m−β Γ(mx − j), j ∈ {1, . . . , m}d . P Note that γm,j (x) > 0 ⇔ kxk∞ ≤ 1. Finally, take fω (x) = f0 (x) + j ω(j)γm,j (x) where for any j, d ω(j) ∈ {0, 1} so that ω = {ω(j)}j is a binary vector in R(m−1) . Now, we show that f0 , fω are densities in Np (β, C). For f0 , this is a density which is infinitely differen(s) tiable, so we choose σ > 0 such that f0 (x) p ≤ C/2. We also have that for any j, the functions γm,j are ji ± non-zero only on non-intersecting intervals of the form (0, . . . , m X j h i (s) (s) ω(j) γm,j (x + t) − γm,j (x) 1 2m , . . . , 0), (s) so for any |s| < β, (s) ≤ dCm−β+|s| sup Γ0 (x + z) − Γ0 (x) |z|<t d p p ≤ 2−d dCm−β+|s| sup |z|d(β−|s|) < C/2, z∈[0,1] ∀m > 0, so, fω is sufficiently smooth R R by the triangle inequality. As long as fω is a density, we will have fω ∈ Np (β, C). First, Γ0 = 0, so fω = 1. It remains to show that fω ≥ 0. We have X j d ≤ m−β kΓk∞ ≤ dCm−β kΓ0 k∞ . ω(j)γm,j (1) ∞ The smallest value taken by f0 on the interval [−1, 1] where we are adding perturbations is inf u∈[−1,1] f0 (u) = (ϕ(1/σ)/σ)d . So, it is sufficient to require (1) to be smaller. Therefore, we require " m > dC  σ kΓ0 k∞ ϕ(1/σ) 6 d #1/β . Sufficient separation of alternatives. kfω − fω′ kp = X We have for any fω , fω′ , = m−β−d/p H 1/p (ω, ω ′ ) kΓkp , (ω(j) − ω ′ (j))γm,j j p where H is the Hamming distance between binary vectors. We will use some of the fω as our collection of M alternatives. But we need to know how many there are in the collection that are far enough apart. The following theorem tells us about the size of such a collection. Lemma 8 (Varshamov-Gilbert; Tsybakov 2009). Let m ≥ 8. Then there is a subset D of densities fω such that for all ω, ω ′ ∈ D, H(ω, ω ′ ) ≥ md /8 and |D| ≥ exp{md /8}. We now restrict our collection of densities to be only those corresponding to the set D. Then, m −β−d/p H 1/p ′ (ω, ω ) kΓkp ≥ m −β−d/p  md 8 1/p d d dC kΓ0 kp = 8−1/p dm−β C kΓ0 kp . Constant likelihood ratio. We have that for distributions P0 with density f0 and Pω with density fω ∈ D, Z fω (x) KL(Pω , P0 ) = n dxfω (x) log f0 (x) d R   Z d X Y 1 dx  d =n ϕ(xi /σ) + ω(j)γm,j (x) σ i=1 Rd j    ! d d X Y Y 1 1 ϕ(xi /σ) + ϕ(xi /σ)  ω(j)γm,j (x) − log × log  d σ i=1 σ d i=1 j  " P # Z d X Y ω(j)γm,j (x) 1 j dx  d ≤n ϕ(xi /σ) + ω(j)γm,j (x) 1 Qd σ i=1 Rd i=1 ϕ(xi /σ) j σd P 2 Z j ω(j)γm,j (x) = dx 1 Qd [0,1]d i=1 ϕ(xi /σ) σd !d σ kΓ0 k22 ≤n d2 C 2 m−2β ϕ(1/σ) Therefore, we must choose m so that for n, d, large enough, 2 n σ kΓ0 k2 ϕ(1/σ) !d C 2 m−2β ≤ α log |D| with 0 < α < 1/8. This is equivalent to requiring 8 which is equivalent to σ kΓ0 k22 ϕ(1/σ) !d d2 C 2 m−2β−d ≤  σ kΓ0 k22 ϕ(1/σ) 1 (d2 n) m≤ (8C)2 7 1 8n 1 !d  2β+d  . Completing the result. Combining the results of the previous two sections gives us the following lower bound on density estimators in increasing dimensions. (d+1)/β 2 1/(2β+d) Proof of Theorem 3. Choose an integer m = kΓ0 kp κ−1 where for convenience we define d (d n)  d/(2β+d) d→∞ ϕ(1/σ) ϕ(1/σ) −1 κd := (64C 2 )1/2β+d σkΓ −−−→ κ = σkΓ > κ−1 . Then, we 2 2 . Note that κd < κ for all d so κd 0 k2 0 k2 have the following:   d 1/β σkΓ0 k∞ ∗ 1. The functions f0 , fω are densities in Np (β, C) as, for n > n , m > dC ϕ(1/σ) . 2. For all fω , fω′ ∈ D, −β  d (d+1)/β −1 2 1/(2β+d) d κd (d n) C kΓ0 kp kfω − fω′ kp ≥ 8−1/p dm−β C kΓ0 kp = 8−1/p d kΓ0 kp d/(2β+d) −β/(2β+d) = 2(8−1/p )C kΓ0 kp κ−β n d d ≥2 C −1/p −β d/(2β+d) −β/(2β+d) 8 κ d n =: 2Aψnd , 2 where A = C2 8−1/p κ−β and ψnd = (dd n−β )1/(2β+d) . P (d+1)/β 1 < 1 for all d, β by construction of Γ0 . Therefore, 3. M ω∈D KL(Pω , P0 ) ≤ α log |D| since kΓ0 kp  m≤ 1 (d2 n) 8C 2 2 σ kΓ0 k2 ϕ(1/σ) Therefore, all the conditions of Lemma 7 are satisfied. 1 !d  2β+d  . We note that Lemma 7 actually allows more general lower bounds which are immediate consequences of those presented here. In particular, we are free to choose ρ to be other distances than Lp -norms, and we may take powers of those norms or apply other monotone-increasing functions L. For example, this gives the standard lower bound under the mean-squared error. We will not pursue these generalities further here, however, as finding matching upper bounds is often more difficult, requiring specific constructions for each combination L and ρ. Deriving lower bounds for 1 ≤ p < 2 is also of interest, although this requires more complicated proof techniques. The case of p = ∞ is actually a fairly straightforward extension, and we discuss it briefly in Section 5. 4 Upper bound for kernels To prove Theorem 4, we first use the triangle inequality to decompose the loss into a bias component and a variance component:     b b b + Efbh − f ] E fh − f ≤ E fh − Efh p p p "Z 1/p # Z 1/p =: E + |σ(x)|p . |b(x)|p We now give two lemmas which bound these components separately. For the bias, we will need a well known preliminary result. Lemma 9 (Minkowski’s integral inequality). Let (Ω1 , Σ1 , µ1 ), (Ω2 , Σ2 , µ2 ) be measure spaces, and let g : Ω1 × Ω2 → R. Then for p ∈ [1, ∞] Z 1/p Z Z 1/p Z p p g(x1 , x2 )dµ1 (x1 ) dµ2 (x2 ) |g(x1 , x2 )| dµ2 (x2 ) ≤ dµ1 (x1 ), Ω2 Ω1 Ω1 with appropriate modifications for p = ∞. 8 Ω2 Lemma 10. Let f ∈ Np (β, C) for p ∈ [1, ∞) and let K be an isotropic Kernel of order ℓ = ⌊β⌋. Then for all h > 0, d ≥ 1, and n ≥ 1, Z Z p  p Efbh (x) − f (x) dx = O dp hpβ . |b(x)| dx := For the bias, the proof technique depends on the smoothness of the density f as well as the smoothness of the kernel. It also holds for any p ∈ [1, ∞). Proof. By Taylor’s theorem X f (x + uh) = f (x) + us hDs f (x) + · · · + |s|=1 Z 1 X hℓ us (1 − τ )ℓ−1 Ds f (x + τ uh)dτ. (ℓ − 1)! 0 |s|=ℓ Since the kernel is of order ℓ, lower order polynomials in u are equal to 0, so   Z Z 1 X |b(x)| = us duΩℓ (u)  dτ (1 − τ )ℓ−1 Ds f (x + τ uh) 0 |s|=ℓ  Z = duΩℓ (u)  X us Z  1 dτ (1 − τ )ℓ−1 ∆(x, τ ) , 0 |s|=ℓ ℓ h where ∆(x, τ ) = Ds f (x + τ uh) − Ds f (x) and Ωℓ (u) = K(u) (ℓ−1)! . Now applying Lemma 9 twice, Z |b(x)|p dx ≤ Z dx  Z ℓ du|Ωℓ (u)| kuk1 Z ℓ du|Ωℓ (u)| kuk1 "Z Z du|Ωℓ (u)| kukℓ1 Z ≤ ≤ Z 1 dτ (1 − τ )ℓ−1 |∆(x, τ )| 0 dx Z 1 p dτ (1 − τ )ℓ−1 |∆(x, τ )| 0 1 ℓ−1 dτ (1 − τ ) 0 Z p dx∆(x, τ ) p #1/p 1/p !p p  . Because f ∈ Np (β, C), we have Z p dx∆(x, τ ) 1/p ≤ C(τ h kuk1 )β−ℓ . So, Z p |b(x)| ≤ = Z Z ℓ du|Ωℓ (u)| kuk1 Z 0 ℓ−1 dτ (1 − τ ) β−ℓ C(τ h kuk1 ) !p Z 1 β C kuk1 hβ dτ (1 − τ )ℓ−1 τ β−ℓ (ℓ − 1)! 0 !p Z d X β = O(dp hpβ ). |ui | |G(ui )|dui du|K(u)| = AChpβ 1 p i=1 Next we find an upper bound on the variance component. This result does not depend on the smoothness of the density, only on properties of the kernel. It does however depend strongly on p. Finally, note that the result is non-random, so we can ignore the outer expectation. 9 R Lemma 11. Let K : Rd → R be a function satisfying K 2 (u)du < ∞. Then for any h > 0, n ≥ 1 and any probability density f , and p ≥ 1,  p/2 ! Z Z  p 1 p b b fh (x) − Efh (x) dx = O |σ(x)| dx = . nhd Proof. The proof is an easy generalization of Proposition 1 in (Masaon, 2009) and is omitted. For intuition, we simply present the case of p = 2.    Z Xi − x 1 2 E K |σ(x)|2 dx ≤ nh2d h    Z Z z−x 1 2 dz dx f (z)K = nh2d h   Z  Z 1 z−x 2 = dx dz f (z) K nh2d h Z  1 = K 2 (u)du = O 1/nhd . d nh With these results in hand, we can now prove Theorem 4. Proof of Theorem 4. Applying Lemma 10 and Lemma 11 gives 1/2 !     1 . sup E fbh − f = O dhβ + O nhd p f ∈Np (β,C) 1 Taking h = A(d2 n)− 2β+d balances the terms and gives the result. 5 Discussion In this paper we have developed the first results for density estimation under triangular array asymptotics, where both the number of observations n and the ambient dimension d are allowed to increase. Our results generalize existing, fixed-d minimax results, in that, were d fixed rather than increasing, we would recover previously known minimax rates (both lower and upper bounds). Our results also show that kernel density estimators are minimax optimal, which should come as no surprise, since they are minimax optimal for fixed d. The results presented in this paper say essentially that, for n large enough there exist constants 0 < a < A < ∞ independent of d, n such that for n large enough, a  dd nβ 1  2β+d ≤ inf sup fb f ∈Np (β,C) E  fb − f p  ≤ sup f ∈Np (β,C) E  fbh − f p  ≤A  dd nβ 1  2β+d , for p ∈ [2, ∞) when fbh is the kernel density estimator with oracle h. This result generalizes immediately to p s a result for E fb − f . With longer proofs, we can generalize this result to E fb − f for some s 6= p p p and to the case p ∈ [1, 2). Another extension is to the case p = ∞ which picks up a factor of log n in the numerator of the rate. With the same techniques used here, we could also give results for nonparametric regression under triangular array asymptotics. R Given pairs (yi , xi ), kernel regression g(x) can be written in terms of densities as g(x) = E[Y | X = x] = yf (x, y)dy/f (x) for joint and marginal densities f (x, y) and f (x) respectively. So results for the Nadaraya-Watson kernel estimator Pn yi K((x − xi )/h) gbh (x) = Pi=1 n i=1 K((x − xi )/h) 10 can be obtained with similar proof techniques to those presented here. A related extension would consider the problem of conditional density estimation directly. Using a similar form, Pn K1 ((yi − y)/h)K2 ((x − xi )/h) qbh (x, y) = i=1 Pn i=1 K2 ((x − xi )/h) estimates the conditional density q(Y |X). If X ∈ Rd , this estimator has been shown to converge at a rate of O(n−β/(2β+1+d) ) under appropriate smoothness assumptions (see, e.g. Hall et al., 2004). Our results also suggest some open questions. Wavelet density estimators and projection estimators are known to be rate-minimax for d fixed in that upper bounds match those of kernels in n, though constants may be larger or smaller. Whether these methods also match for increasing d remains to be seen (the class of densities examined is usually slightly different). Histograms are also useful density estimators, and for fixed d, they are minimax over Lipschitz densities with a slower rate than that for kernels, again because the class of allowable densities is different. Upper bounds under the triangular array with a similar form to those presented here were shown in (McDonald et al., 2011, 2015), but deriving minimax lower bounds for this class remains an open problem. Extending our results to the manifold setting (as mentioned in §1) is the most obvious path toward fast rates for large d and is left as future work. Acknowledgements This material is based upon work supported by the National Science Foundation under Grant No. DMS– 1407439 and the Institute for New Economic Thinking under Grant No. INO14–00020. The author thanks the anonymous referees and the program committee for the 20th International Conference on Artificial Intelligence and Statistics for their insightful comments and Cosma Shalizi for comments on an early draft. References Asta, D. (2013), “Nonparametric density estimation on hyperbolic space,” in Neural Information Processing Systems (NIPS) workshop: Modern Nonparametric Methods in Machine Learning, eds. A. Gretton, M. Kolar, S. Kpotufe, J. Lafferty, and H. Liu. Belloni, A., Chernozhukov, V., and Wang, L. (2011), “Square-root lasso: pivotal recovery of sparse signals via conic programming,” Biometrika, 98(4), 791–806. Bhattacharya, A., and Dunson, D. B. (2010), “Nonparametric bayesian density estimation on manifolds with applications to planar shapes,” Biometrika, 97(4), 851–855. Bickel, P. J., Ritov, Y., and Tsybakov, A. B. (2009), “Simultaneous analysis of lasso and dantzig selector,” The Annals of Statistics, 37(4), 1705–1732. Bühlmann, P., and van de Geer, S. (2011), Statistics for high-dimensional data: Methods, theory and applications, Springer, New York. Bullmore, E., and Sporns, O. (2009), “Complex brain networks: graph theoretical analysis of structural and functional systems,” Nature Reviews Neuroscience, 10(3), 186–198. Devroye, L., and Györfi, L. (1985), Nonparametric Density Estimation: The L1 View, John Wiley & Sons, Inc., New York. Donoho, D. L. (2000), “High-dimensional data analysis: The curses and blessings of dimensionality,” in AMS Conference on Math Challenges of the 21st Century. Genovese, C., Perone-Pacifico, M., Verdinelli, I., and Wasserman, L. (2012a), “Minimax manifold estimation,” Journal of Machine Learning Research, 13, 1263–1291. Genovese, C. R., Perone-Pacifico, M., Verdinelli, I., and Wasserman, L. (2012b), “Manifold estimation and singular deconvolution under Hausdorff loss,” The Annals of Statistics, 40(2), 941–963. 11 Goldenshluger, A., and Lepski, O. (2011), “Bandwidth selection in kernel density estimation: Oracle inequalities and adaptive minimax optimality,” The Annals of Statistics, 39(3), 1608–1632. Goldenshluger, A., and Lepski, O. (2014), “On adaptive minimax density estimation on Rd ,” Probability Theory and Related Fields, 159(3), 479–543. Greenshtein, E., and Ritov, Y. (2004), “Persistence in high-dimensional linear predictor selection and the virtue of overparametrization,” Bernoulli, 10(6), 971–988. Hall, P., Racine, J., and Li, Q. (2004), “Cross-validation and the estimation of conditional probability densities,” Journal of the American Statistical Association, 99(468), 1015–1026. Hasminskii, R., and Ibragimov, I. (1990), “On density estimation in the view of Kolmogorov’s ideas in approximation theory,” The Annals of Statistics, 18(3), 999–1010. Hendriks, H. (1990), “Nonparametric estimation of a probability density on a riemannian manifold using fourier expansions,” The Annals of Statistics, 18, 832–849. Juditsky, A., and Lambert-Lacroix, S. (2004), “On minimax density estimation on R,” Bernoulli, 10(2), 187–220. Kerkyacharian, G., Picard, D., and Tribouley, K. (1996), “Lp adaptive density estimation,” Bernoulli, 2(3), 229–247. Marton, K., and Shields, P. C. (1994), “Entropy and the consistent estimation of joint distributions,” Annals of Probability, 22, 960–977, Correction, Annals of Probability, 24 (1996): 541–545. Masaon, D. M. (2009), “Risk bounds for kernel density estimators,” Journal of Mathematical Sciences, 163(3), 238–261. McDonald, D. J., Shalizi, C. R., and Schervish, M. (2011), “Estimating β-mixing coefficients,” in Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, eds. G. Gordon, D. Dunson, and M. Dudı́k, vol. 15, JMLR W&CP, arXiv:1103.0941. McDonald, D. J., Shalizi, C. R., and Schervish, M. (2015), “Estimating beta-mixing coefficients via histograms,” Electronic Journal of Statistics, 9, 2855–2883. Meinshausen, N. (2007), “Relaxed lasso,” Computational Statistics & Data Analysis, 52(1), 374–393. Nardi, Y., and Rinaldo, A. (2008), “On the asymptotic properties of the group lasso estimator for linear models,” Electronic Journal of Statistics, 2, 605–633. Pelletier, B. (2005), “Kernel density estimation on riemannian manifolds,” Statistics & Probability Letters, 73(3), 297–304. Ravikumar, P., Liu, H., Lafferty, J., and Wasserman, L. (2008), “Spam: Sparse additive models,” in Advances in Neural Information Processing Systems 20, eds. J. Platt, D. Koller, Y. Singer, and S. Roweis, pp. 1201–1208, MIT Press, Cambridge, MA. Ravikumar, P., Lafferty, J., Liu, H., and Wasserman, L. (2009), “Sparse additive models,” Journal of the Royal Statistical Society: Series B (Statistical Methodology), 71(5), 1009–1030. Steif, J. E. (1997), “Consistent estimation of joint distributions for sufficiently mixing random fields,” Annals of Statistics, 25, 293–304. Talwalkar, A., Kumar, S., and Rowley, H. (2008), “Large-scale manifold learning,” in IEEE Conference on Computer Vision and Pattern Recognition, 2008, IEEE. Tsybakov, A. (2009), Introduction to Nonparametric Estimation, Springer Verlag. Ye, F., and Zhang, C. (2010), “Rate minimaxity of the lasso and dantzig selector for the ℓq loss in ℓr balls,” The Journal of Machine Learning Research, 11, 3519–3540. 12 Yuan, M., and Zhou, D.-X. (2015), “Minimax optimal rates of estimation in high dimensional additive models: Universal phase transition,” arXiv:1503.02817. 13
10math.ST
Forward Link Interference Mitigation in Mobile Interactive Satellite Systems ∗ arXiv:1803.07335v1 [eess.SP] 20 Mar 2018 P. Henarejos, M. A. Vázquez † ‡ and G. Cocco Centre Tecnològic de Telecomunicacions de Catalunya, 08860 Castelldefels, Barcelona, Spain A. Pérez-Neira § Universitat Politècnica de Catalunya, 08034 Barcelona, Spain We present the results of the performance evaluation of polarization-time coding and soft interference cancellation in multi-beam satellite systems aected by co-channel interference in realistic setups. The standard of Broadband Global Area Network service (BGAN) has been considered as reference for the physical layer and realistic interference and channel models have been adopted. The work has been carried out in the framework of the Next Generation Waveform for Increased Spectral Eciency (NGWISE) project founded by the European Space Agency (ESA). I. Introduction Interactive satellite systems are a key communication solution with a huge potential market. Possible applications range from the provision of data connectivity to areas where cellular connection is not protable (e.g., rural) or infeasible (e.g., maritime and aircraft scenarios) to backing up in emergency situations, especially when involving large geographical areas. Far from being limited to broadcast transmissions, the above mentioned applications rely on multicast and multiple unicast connections. In this framework multi-beam satellites can provide a many-folds increase in spectral eciency with respect to global beam satellites, especially in case of architectures with a low frequency reuse factor. An even higher throughput can be provided, in principle, by leverage on polarization reusing on adjacent beams and transmission on both polarizations within a single beam. However, the adoption of aggressive fre- quency/polarization reuse schemes implies an increase of intra-system interference due to satellite antenna side-lobes, low directivity of user terminal (UT) antennas and polarization mismatch due to antennas imperfections and atmospheric propagation. 1 Moreover, mobile terminals are also keen to propagation impairment such as shadowing and fading, while the large propagation delay typical of satellite systems (especially GEO) prevents the availability of channel state information (CSIT). Time diversity is largely exploited in today's interactive mobile systems standards to overcome channel impairments in mobile broadcast systems. However, new diversity techniques have recently gained interest. Such techniques are based on polarization and spatial diversity that allow to apply multiple input-multiple output (MIMO) techniques such as precoding and polarization-time codes. Interference cancellation techniques 2 are also a potential solution that is currently being looked at in both the forward and the reverse link. 3 Dual polarization transmission has been evaluated for the mobile broadcast scenario in with promising results. The joint eect of outdated CSIT and the time variability of channel makes very dicult the use of 4, 5 linear precoding as it was applied in previous works. Apart from an increase in system diversity, the dual polarization transmission can provide an increase in spectral eciency especially in case of low cross-polar interference. ∗ Research Engineer, Communication Systems, [email protected] † Research Engineer, Communication Systems, [email protected] ‡ Post-doctorate Researcher, Communication Systems, [email protected] § Professor at Signal Theory and Communications Department at UPC and [email protected] 1 of 11 American Institute of Aeronautics and Astronautics Senior Researcher at CTTC, In the present paper present part of the results we obtained within the Next Generation Waveform for Increased Spectral Eciency (NGWISE) project founded by the European Space Agency (ESA). 6 More specically, we evaluate the impact of dual polarization transmission in terms of throughput in presence of cochannel interference in a multi-beam satellite system and evaluate the possibility of applying soft interference cancellation (SIC) in interference-limited setups. A realistic channel model is adopted and dierent scenarios are considered, namely maritime and terrestrial. The standard adopted in Broadband Global Area Network 7 service (BGAN) to 7 is used as reference standard for the physical layer. In the rest of the paper we will refer as BGAN standard for simplicity. Our results show that that a higher spectral eciency can be achieved through the considered techniques, which may lead to an increased overall system throughput. We also show that for a four-color frequency reuse scheme soft interference cancellation provides limited gain in terms of block error rate due to the low relative power and high number of interferers that can be assimilated to Gaussian noise. II. System Model Let us consider the forward link of a multi-beam geostationary satellite communication system. Co- channel interference among adjacent beams is mitigated through frequency reusing. A four colors frequency reuse scheme is considered in the following. A dual polarization transmission is assumed, i.e., the satellite and the user terminal antennas transmits and receive over two (almost-)orthogonal polarizations, respectively. The received signal at the user terminal can be expressed as: Y= where Y ∈ C2×2 H ∈ C2×2 having block length M. is the C(s) is the polarization-time code, which depends on the symbol We assume a general complex symbol mapping. The inter-beam interference is modelled through the matrix N∈C P is a matrix that accounts for the antennas characteristics in terms of co-polar, cross-polar gains s ∈ CM ×1 , 2×2 (1) is the channel matrix, the distribution of which depends on the scenario, and co-channel interference rejection while vector P HBC(s) + HBJ + N represents the received signal in two time instants from the two polarizations, transmitted power, B ∈ R2×2 √ J ∈ C2×2 . Thermal noise is taken into account through the term whose entries are zero mean Gaussian random variables with variance N. As is often the case in terrestrial communications, also in the satellite context the use of MIMO techniques is combined with channel coding leading to what is called a MIMO-BICM modulation. Figure 1 depicts the general block diagram of this scheme. The block Π and Π−1 in the picture represent the coded bit interleaver and deinterleaver, respectively. Figure 1. Equivalent MIMO-BICM scheme of the considered dual polarization setup. For this scenario, the main challenges to be faced are two. First, the MIMO transmission scheme (i.e. how symbols are transmitted by the two polarizations) must be decided. Secondly, the MIMO demodulator (i.e. how symbols from the two polarizations are detected) needs to be also obtained. For both the reference signal (i.e., the signal that is to be received by the user terminal) and the interfering 7 signals the BGAN standard is adopted. The BGAN standard, currently under denition, is designed to support both voice and broadband data services in a wide range of scenario such as maritime and land mobile. The channel code adopted in the BGAN standard is a turbo code with several possible congurations in terms of code rate and codeword length. The possible combinations of channel code parameters, modulation (QPSK, 16QAM), symbol rate and other physical layer characteristics are dened by the bearers. III. Polarization-Time Transmission and Reception Schemes In the present section we consider several possible MIMO modulation and demodulation solutions previously proposed in literature that are suited for application in the considered setup. Out of them, one modulation and one demodulation scheme are selected based on practical as well as theoretical considerations. 2 of 11 American Institute of Aeronautics and Astronautics III.A. • MIMO Transmission Scheme Alamouti: The objective of this polarization-time code is to obtain the maximum diversity gain by constructively adding up the channel gains from the two polarizations while rejecting the inter-symbol interference (ISI). 8 In this case M =2 and the coding matrix is s1 s2 Cala (s) = −s∗1 s∗2 ! . (2) The Maximum-Likelihood (ML) detection for this scheme is known to have low complexity, as it reduces to to a matrix multiplication and a set of comparisons. After optimally decoding this polarization-time code, the symbol obtains a diversity gain of Gd = kHBk2 = |h11 |2 b211 + |h22 |2 b222 , where b11 and b22 are the diagonal elements of B. (3) Note that this equivalent SISO gain is obtained when the ML detection is used. • Polarization Multiplexing: Polarization multiplexing obtains the full multiplexing gain (i.e. in two time instants 4 symbols are transmitted, 1 for each channel use of each antenna).9 and the coding matrix is Cmul (s) = • s1 s2 s3 s4 ! For this case M =4 . (4) Golden Code: this is a full diversity technique that still provides some coding gain.10 The coding matrix is constructed as follows Cgol (s) = where III.B. α= √ 1+ 5 and 2 β= ! s1 + αs2 s3 + αs4 i(s3 + βs4 ) s1 + βs2 , (5) √ 1− 5 2 . MIMO-BICM Demodulators A low complexity detector for the MIMO schemes presented above is the hard decision ML detector. The ML decision rule consists in solving the following optimization problem: arg min ŝ Note that the detected symbol ky − HC(ŝ)k22 . ŝ is obtained via a hard decision. (6) However, a channel code is usually included in all MIMO schemes, and thus the MIMO demodulator should output the log-likelihood ratios (LLR) for 11, 12 the coded symbols that are to be passed to the decoder Λl = log where p(cl |y, H) . The LLR for the l-th coded symbol is p(cl = 1|y, H) , p(cl = 0|y, H) (7) is the probability mass function of the coded bits conditioned on the channel output the channel matrix H. y and In order to reduce the complexity the log-sum approximation can be applied with little loss in terms of performance. 11 In the following we consider dierent schemes that aim at decreasing the demodulator complexity. 13 In order to reduce the number of demodulators to test, we refer to the recommendations in several demodulators were studied considering the mutual information as a measurement. In 14, 15 that for low data rates the soft-minimum mean square error (MMSE) 13 where it was shown demodulator outperforms the other designs. As an extension of this technique we propose the soft version of the MMSE-SIC receiver. In the following briey describe such schemes as well as the optimal solution for the uncoded case. • Soft-MMSE: this is a linear equalizer obtained through the minimization of the mean square error (MSE). Its expression is GMMSE = HH H + σ 2 I −1 HH . 3 of 11 American Institute of Aeronautics and Astronautics (8) • Soft-MMSE-SIC: this detector is the soft version of the V-BLAST demodulator. This technique iteratively decodes and subtracts the ISI. In order to adapt this to our setup we substitute the hard decision of the interference with a soft one. The resulting algorithm is the following: 1. Find the least faded polarization: ki = min gk k where gk , k = 1, 2 are the components of vector ski 2. Obtain the MMSE estimate of signal g = diag (9)  HHH −1  . transmitted in the polarization ki : sˆki = [GMMSE yn ]ki . (10) y 3. Subtract interference due to this symbol from yn = yn − sˆki [H]ki , where yn 4. Remove is the received signal at time instant ki th component from yn and the ki th (11) n. column of H. 5. Repeat 1-4 for the other polarization. III.C. System Design We chose one encoding/decoding scheme to be applied in our scenario among those presented so far. The choice has been a trade o between theoretical considerations and practical constraints either dictated by the BGAN standard or by other practical considerations such as complexity at the user terminal. • Transmission scheme: polarization multiplexing. It was shown in previous ESA projects that this method outperforms the Alamouti one when considering a given transmit power. Another possible choice would be to use Golden codes that, according to some preliminary results we obtained, shows an improve of around 1dB in FER with respect to Alamouti. increase in computational complexity as 4 However the Golden codes imply an symbols are mixed together in two time instants, which makes the detection more computationally demanding. Keeping in mind that in our study case low complexity at the receiver is an asset, we considered that the enhancement in terms of FER does not justify the increase in complexity. • 13 Detection scheme: Soft-MMSE-SIC. As described in this scheme outperforms the other demodulators and presents a good performance in the higher spectral eciency region. As a matter of facts it can be observed in gures 2 and 3 that the soft-MMSE demodulator performs slightly better in low data rates while at higher data rates it can be observed that the Soft-MMSE-SIC performs better. IV. Soft Interference Cancelation The diversity/multiplexing gains potentially delivered by polarization-time schemes may suer from the co-channel interference coming from other beams depending on the interference strength. In rst approximation (more accurate if the number of interferers is large) such interference can be assimilated to a background noise which can not be dealt with using the MIMO techniques presented in Section III. Interference cancelation may help in such case. A rst classication of interference cancelation methods can be done by distinguishing hard (HIC) and soft interference cancelation (SIC). In HIC one of the signals (usually the strongest one) is decoded treating the others as noise and than subtracted from the received waveform. Such scheme is relatively simple but has the drawback that, if the signal to be subtracted is not decoded correctly, error propagation can severely limit the performance of the system. SIC methods consist of a soft estimation of each of the transmitted signals followed by a decoding phase in which such estimation is taken into account by the decoder. Examples can be found in, 16 17 18 and. In the following we consider the iterative SIC scheme depicted in Fig. 4 for the case of two received signals (one reference signal and one interferer) in a SISO channel. In such scheme the received waveform is fed to the soft estimator, which performs detection and estimates the transmitted channel symbols for both signals. The estimation is performed using a turbo decoder that 4 of 11 American Institute of Aeronautics and Astronautics Figure 2. BLER for Soft-MMSE receiver at center of coverage for maritime scenario. Figure 3. BLER for Soft-MMSE-SIC receiver at center of coverage for maritime scenario. Figure 4. Iterative SIC scheme. 5 of 11 American Institute of Aeronautics and Astronautics been modied to output soft estimates of de considered signal. The detection/estimation is iterated a number Niter of times, after which a decision is taken on the symbols of both signals. The same method can easily be extended to the dual polarization case especially in case of high cross polarization rejection. V. Numerical Results In this section we present the performance evaluation results for the selected MIMO scheme in two scenarios, namely maritime and land mobile satellite with intermediate tree shadowing (LMS-ITS). The BGAN standard, operating in L-band has been adopted a reference for the physical layer. We consider the maritime scenario rst. The channel model is described in the following table. Fast fading Rician Rician factor 10 dB 2 Hz 1 K Doppler shift # taps Table 1. Channel parameters We focus on bearers types with symbol rate 33.6 Ksymbols/s. More specically, we focus on the BGAN F80T1Q4B bearer types characterized by QPSK modulation. The code rate for the dierent F80T1Q4B sub-bearers is described in the following table. Table 2. Code Rate of F80T1Q4B bearer types Bearer Name Coding Rate Data Rate (Kbps) F80T1Q4B-L8 0.34 21.6 F80T1Q4B-L7 0.40 25.6 F80T1Q4B-L6 0.48 30.4 F80T1Q4B-L5 0.55 35.2 F80T1Q4B-L4 0.63 40.0 F80T1Q4B-L3 0.70 44.8 F80T1Q4B-L2 0.77 49.2 F80T1Q4B-L1 0.83 52.8 F80T1Q4B-R 0.87 55.6 Depending on the geographical location of the user terminal (center/edge of coverage, center/edge of beam) the C/I may vary signicantly due to co-channel interference. In order to take this into account we rst derived the noise value from the C/N expression: C P AG = (12) N LKBT where P is the radiated power, B is the bandwidth, G is the antenna gain at the receiver, K is the Boltzmann constant, T is the antenna noise temperature at the receiver, L is the path-loss and A is the array factor at the transmitter. Hence, we can derive the noise power as: N = BN0 = KB G/T (13) B = 200 From the BGAN standard and common user terminal parameters, we have and L = 187.05 dB. Thus the noise power is N = −133 KHz, G/T = 12.5 dB C/I remains dBm. Note that in each simulation the constant, as it only depends on the position of the user terminal, while the C/N changes. As benchmark system we consider one in which a single polarization is considered (SISO system). The PSISO is assumed in both systems. In order to evaluate the advantage 2 deriving by using both polarizations we use the normalized throughput which is dened as follows same total power per beam P = Normalized Throughput = Throughput Dual Polarization Throughput SISO , (14) where Throughput = (1 − FER)Rate. 6 of 11 American Institute of Aeronautics and Astronautics (15) In the rst simulations we do not assume any correlation between polarizations given that the cross-polar interference is known to be very low in L band. A frequency reuse factor of performance of our method for 2 4 is assumed. We evaluate the beams representing the best and the worst case scenarios (center and edge of the beam coverage) assuming a user location both at the center of the beam and at the edge. Realistic beam patterns have been considered and co-channel interference from beams at the same frequency as the reference one have been taken into account. We indicate with C/I the ratio between the power of the reference signal and the total interference power. The polarization and beam gain values have been taken 19 from. Perfect channel state information at the receiver (CSIR) is assumed. Figures 5 and 6 show the throughput of the proposed scheme in the maritime channel normalized to the throughput of the benchmark (SISO) system. It can be seen how, given a code rate, our scheme is able to double the rate at expenses of incrementing the transmit power by 3dB. The impact of the C/I on the system is remarkable since, when considering the beam at the end of coverage, the power increment needed to get twice the SISO throughput is increased up to 4-5 dB. We also notice how bearers with higher channel code rate do not succeed in achieving 100% gain. In order to enhance the throughput for high rate bearers Figure 5. Normalized throughput versus transmit power for polarization-multiplexing scheme and Soft-MMSE-SIC receiver at center of coverage. we evaluated the performance of the SIC scheme considered in Section IV for a single polarization setup in a multibeam satellite system with frequency reuse 6, i.e., edge of beam at edge of coverage. 4 using the same interference pattern as in gure and We considered the best case scenario, i.e., AWGN and perfect symbol alignment across all signals. Only the strongest interferer (which has a relative C/I of about 14 dB) is taken into account by the detector/decoder, as the others have much smaller power and would determine an increase in complexity with limited gain in terms of BLER. The results of the simulations are shown in Fig. 7. It can be seen how the SIC gives only a marginal gain even in the best case scenario. This is due to the strong power unbalance between the reference signal and the interferers. As a matter of facts, when the SNR is such that the good signal starts to be de decodable, the stronger interferer is to weak to contribute to the decoding and thus almost no dierence is observed in BLER. Other simulations we carried out (not reported here for a matter of space) showed that, in case the C/I relative to the strong interferer and the reference signal have comparable power, SIC can signicantly enhance system's BLER in certain bearers. This is the case, for instance, of systems with more aggressive frequency reuse factors (e.g., 2). Thus we conclude that, for the considered setup, SIC does not bring signicant improvements. Hence, in the rest of the paper we will not consider SIC techniques. In the following we present the results we obtained in the ITS scenario and in a mixed LMS environment (MIX scenario). For such scenario, far more challenging than the maritime one, we used real channel measurements obtained for ITS and MIX scenarios in the context of ESA MIMOSA project. 7 of 11 American Institute of Aeronautics and Astronautics Note that Figure 6. Normalized throughput versus transmit power for polarization-multiplexing scheme and Soft-MMSE-SIC receiver at edge of coverage. Figure 7. BLER versus C/N in AWGN for the case in which SIC is applied on the reference signal and the strongest interferer in a multibeam satellite system with frequency reuse 4. The six strongest interferers have been considered. Three iterations have been used at the estimator. Bearer F80T1Q4B-L1 with rate 0.825 and QPSK modulation have been used for all signals. correlation eects are implicitly taken into account in the measurements. In Fig. 8 part of the measured channel realization in ITS is shown. The alternation of periods of moderate and deep fading can be observed. Figures 9 and 10 show the normalized throughput for the ITS and MIX channels. It can be seen that a certain throughput gain with respect to the SISO case can be achieved even for the considered channels if the loss in terms of C/N is tolerable. Note also that no interleaver is included in the considered bearers a . The inclusion of a time interleaver is likely to enhance the performance of the system signicantly and allow to exploit the full potential of dual polarization transmission. The following observations can be made: • Given a QPSK modulation with a determined code rate, the use of polarization multiplexing jointly with a Soft-MMSE-SIC demodulator is able to double the data rate at expenses of increasing the transmit power of 3 dB in the best case (in terms of C/I ) maritime scenario. • and 4−5 dB in the worse situations for the When considering more challenging scenarios (ITS,MIX), the use of dual polarization does not provide a the BGAN standard includes the use of a time interleaver with 80 msec depth for some higher order bearers 8 of 11 American Institute of Aeronautics and Astronautics Figure 8. ITS channel realization from real measurements. h11 and h22 components are shown. Figure 9. Normalized throughput versus transmit power for polarization-multiplexing scheme and Soft-MMSE-SIC receiver at center of coverage for ITS channel. the expected gain. This is mainly due to the absence of a time interleaver. • The fact that the results have been obtained with a low complexity demodulator makes the application of the considered techniques appealing from a practical perspective. From a system level perspective it is clear that a rate increase can be obtained also by considering more ecient MODCODS (i.e., higher channel code rates and higher order modulations). We evaluated this numerically and concluded that the use of a dual polarization is the best option for the considered setup since the increase in transmit power to obtain twice the throughput as in the SISO case is the less demanding one for a certain level of BLER. To illustrate this, we compare dierent ways to double the throughput. Such increase may be achieved using dual polarization, increasing the coderate and increasing the modulation order. In 11 these techniques are normalized by the baseline scenario. The most remarkable aspect is the fact that the spatial multiplexing with dual polarization is 1 dB powerless to achieve the same rate. 9 of 11 American Institute of Aeronautics and Astronautics Figure 10. Normalized throughput versus transmit power for polarization-multiplexing scheme and Soft-MMSE-SIC receiver at center of coverage for MIX channel. Figure 11. Doubling throughput techniques comparison. VI. Conclusions and future work We presented the results of our study on the application of polarization-time codes and soft interference cancellation in multibeam satellite systems. We adopted the BGAN standard and used realistic channel models and interference patterns. As future work we plan to extend the simulations to higher order modulations, investigate the use of single user precoding as described in the current high data rate terrestrial standards. As such techniques require feedback from the receiver the impact of system round-trip delay will be also studied. The use of the Soft-MMSE-SIC demodulator must be investigated also for the mobile broadcast standards where the use of long interleavers might increase the performance of the system yet maintaining a low complexity receiver. Another possible research line is to study systems with more aggressive frequency reuse factors using joint SIC and MIMO techniques, that are likely to provide good results in terms of throughput and system availability. 10 of 11 American Institute of Aeronautics and Astronautics Acknowledgements The present work has been carried out under the ARTES 1 programme founded by the European Space Agency. The view expressed herein can in no way be taken to reect the ocial opinion of the European Space Agency. References 1 G. Maral and M. Bousquet. Satellite Communications Systems - systems, techniques and technologies. John Wiley & Sons Ltd, 2009. 2 J.G. Andrews. Interference cancellation for cellular systems: a contemporary overview. IEEE Wireless Communications, 12(2):1929, Apr. 2005. 3 P. Arapoglou, P. Burzigotti, M. Bertinelli, A. Bolea Alamanac, and R. De Gaudenzi. To MIMO or not to MIMO in mobile satellite broadcasting systems. IEEE Transactions on Wireless Communications, 10(9):28072811, 2011. 4 A. Perez-Neira, C. Ibars, J. Serra, A. del Coso, J. Gomez, and M. Caus. Mimo applicability to satellite networks. In International Workshop on Signal Processing for Space Communications, pages 19, 2008. 5 P. Arapoglou, K. Liolis, M. Bertinelli, A. Panagopoulos, P. Cottis, and R. De Gaudenzi. Mimo over satellite: A review. IEEE Communications Surveys Tutorials, 13(1):2751, 2011. 6 European Space Agency. Next generation waveform for improved spectral eciency. http://telecom.esa.int/telecom/www/object/index.cfm?fobjectid=32272, 2013. 7 ETSI. Etsi ts 102 744-2-1, satellite component of umts (s-umts); family sl satellite radio interface; part 2: Physical layer specications; sub-part 1: Physical layer interface. Technical report, European Telecommunications Standards Institute, 2013. 8 S. Alamouti. A simple transmit diversity technique for wireless communications. Selected Areas in Communications, IEEE Journal on, 16(8):14511458, 1998. 9 P.W. Wolniansky, G.J. Foschini, G.D. Golden, and R. Valenzuela. V-blast: an architecture for realizing very high data rates over the rich-scattering wireless channel. In Signals, Systems, and Electronics, 1998. ISSSE 98. 1998 URSI International Symposium on, pages 295300, 1998. 10 J. C Belore, G. Rekaya, and E. Viterbo. The golden code: a 2 times;2 full-rate space-time code with nonvanishing determinants. Information Theory, IEEE Transactions on, 51(4):14321436, 2005. 11 S.H. Muller-Weinfurtner. Coding approaches for multiple antenna transmission in fast fading and ofdm. Signal Processing, IEEE Transactions on, 50(10):24422450, 2002. 12 M. Sellathurai, P. Guinand, and J. Lodge. Space-time coding in mobile satellite communications using dual-polarized channels. Vehicular Technology, IEEE Transactions on, 55(1):188199, 2006. 13 P. Fertl, J. Jalden, and G. Matz. Performance assessment of MIMO-BICM demodulators based on mutual information. Signal Processing, IEEE Transactions on, 60(3):13661382, 2012. 14 I.B. Collings, M. R G Butler, and M.R. McKay. Low complexity receiver design for MIMO bit-interleaved coded modulation. In Spread Spectrum Techniques and Applications, 2004 IEEE Eighth International Symposium on, pages 1216, 2004. 15 D. Seethaler, G. Matz, and F. Hlawatsch. An ecient mmse-based demodulator for mimo bit-interleaved coded modulation. In Global Telecommunications Conference, 2004. GLOBECOM '04. IEEE, volume 4, pages 24552459 Vol.4, 2004. 16 S. Verdu. Multi User Detection. Cambridge University Press, 1998. 17 X. Wang and H. V. Poor. Iterative (turbo) soft interference cancellation and decoding for coded CDMA. IEEE Transactions on Communications, 47(7):10461061, 1999. 18 G. Colavolpe, D. Fertonani, and A. Piemontese. SISO detection over linear channels with linear complexity in the number of interferers. IEEE Journal of Selected Topics in Signal Processing, 5(8):14751485, 2011. 19 ESA. Technical annex b: Technologies, models and requirements for the work of rg2 on mss. Technical report, European Space Agency, 2013. 11 of 11 American Institute of Aeronautics and Astronautics
7cs.IT
Clique-width and Well-Quasi-Ordering of Triangle-Free Graph Classes⋆ Konrad K. Dabrowski1, Vadim V. Lozin2 , and Daniël Paulusma1 arXiv:1711.08837v1 [math.CO] 23 Nov 2017 1 Department of Computer Science, Durham University, Lower Mountjoy, South Road, Durham DH1 3LE, United Kingdom {konrad.dabrowski,daniel.paulusma}@durham.ac.uk 2 Mathematics Institute, University of Warwick, Coventry CV4 7AL, United Kingdom [email protected] Abstract. Daligault, Rao and Thomassé asked whether every hereditary graph class that is well-quasi-ordered by the induced subgraph relation has bounded clique-width. Lozin, Razgon and Zamaraev (JCTB 2017+) gave a negative answer to this question, but their counterexample is a class that can only be characterised by infinitely many forbidden induced subgraphs. This raises the issue of whether the question has a positive answer for finitely defined hereditary graph classes. Apart from two stubborn cases, this has been confirmed when at most two induced subgraphs H1 , H2 are forbidden. We confirm it for one of the two stubborn cases, namely for the (H1 , H2 ) = (triangle, P2 + P4 ) case, by proving that the class of (triangle, P2 + P4 )-free graphs has bounded clique-width and is well-quasi-ordered. Our technique is based on a special decomposition of 3-partite graphs. We also use this technique to prove that the class of (triangle, P1 + P5 )-free graphs, which is known to have bounded cliquewidth, is well-quasi-ordered. Our results enable us to complete the classification of graphs H for which the class of (triangle, H)-free graphs is well-quasi-ordered. 1 Introduction A graph class G is well-quasi-ordered by some containment relation if for any infinite sequence G0 , G1 , . . . of graphs in G, there is a pair i, j with i < j such that Gi is contained in Gj . A graph class G has bounded clique-width if there exists a constant c such that every graph in G has clique-width at most c. Both being well-quasi-ordered and having bounded clique-width are highly desirable properties of graph classes in the areas of discrete mathematics and theoretical computer science. To illustrate this, let us mention the seminal project of Robertson and Seymour on graph minors that culminated in 2004 in the proof of Wagner’s conjecture, which states that the set of all finite graphs is well-quasi-ordered by the minor relation. As an algorithmic consequence, given a minor-closed graph class, it is possible to test in cubic time whether a given graph belongs to this class. The algorithmic importance of having bounded clique-width follows from the fact that many well-known NP-hard problems, such as Graph Colouring and Hamilton Cycle, become polynomial-time solvable for graph classes of bounded clique-width (this follows from combining results from several papers [6,16,19,27] with a result of Oum and Seymour [25]). Courcelle [5] proved that the class of graphs obtained from graphs of clique-width 3 via one or more edge contractions has unbounded clique-width. Hence the clique-width ⋆ This research was supported by EPSRC (EP/K025090/1 and EP/L020408/1) and the Leverhulme Trust RPG-2016-258. An extended abstract of this paper appeared in the proceedings of WG 2017 [9]. of a graph can be much smaller than the clique-width of its minors. On the other hand, the clique-width of a graph is at least the clique-width of any of its induced subgraphs (see, for example, [7]). We therefore focus on hereditary classes, that is, on graph classes that are closed under taking induced subgraphs. It is readily seen that a class of graphs is hereditary if and only if it can be characterised by a unique set F of minimal forbidden induced subgraphs. Our underlying research goal is to increase our understanding of the relation between well-quasi-orders and clique-width of hereditary graph classes. As a start, we note that the hereditary class of graphs of degree at most 2 is not well-quasi-ordered by the induced subgraph relation, as it contains the class of cycles, which form an infinite antichain. As every graph of degree at most 2 has cliquewidth at most 4, having bounded clique-width does not imply being well-quasi-ordered by the induced subgraph relation. In 2010, Daligault, Rao and Thomassé [13] asked about the reverse implication: does every hereditary graph class that is well-quasiordered by the induced subgraph relation have bounded clique-width? In 2015, Lozin, Razgon and Zamaraev [24] gave a negative answer. As the set F of minimal forbidden induced subgraphs in their counter-example is infinite, the question of Daligault, Rao and Thomassé [13] remains open for finitely defined hereditary graph classes, that is, hereditary graph classes for which F is finite. Conjecture 1 ([24]). If a finitely defined hereditary class of graphs G is well-quasiordered by the induced subgraph relation, then G has bounded clique-width. If Conjecture 1 is true, then for finitely defined hereditary graph classes the aforementioned algorithmic consequences of having bounded clique-width also hold for the property of being well-quasi-ordered by the induced subgraph relation. A hereditary graph class defined by a single forbidden induced subgraph H is well-quasi-ordered by the induced subgraph relation if and only if it has bounded clique-width if and only if H is an induced subgraph of P4 (see, for instance, [12,14,21]). Hence Conjecture 1 holds when F has size 1. We consider the case when F has size 2, say F = {H1 , H2 }. Such graph classes are said to be bigenic or (H1 , H2 )-free graph classes. In this case Conjecture 1 is also known to be true except for two stubborn open cases, namely (H1 , H2 ) = (K3 , P2 + P4 ) and (H1 , H2 ) = (P1 + P4 , P2 + P3 ); see [10]. Our Results. In Section 4, we prove that Conjecture 1 holds for the class of (K3 , P2 + P4 )-free graphs by showing that the class of (K3 , P2 + P4 )-free graphs has bounded clique-width and is well-quasi-ordered by the induced subgraph relation. We do this by using a general technique explained in Section 3. This technique is based on extending (a labelled version of) well-quasi-orderability or boundedness of clique-width of the bipartite graphs in a hereditary graph class X to a special subclass of 3-partite graphs in X. The crucial property of these 3-partite graphs is that no three vertices from the three different partition classes form a clique or independent set. We say that such 3-partite graphs curious. A more restricted version of this concept was used to prove that (K3 , P1 + P5 )-free graphs have bounded clique-width [8]. In Section 4 we show how to generalise results for curious (K3 , P2 + P4 )-free graphs to the whole class of (K3 , P2 + P4 )-free graphs. In the same section we also show how to apply our technique to prove that the class of (K3 , P1 + P5 )-free graphs is well-quasi-ordered (it was already known [8] that the class of (K3 , P1 + P5 )-free graphs has bounded cliquewidth). We note that our results also imply that the class of (K3 , P1 + 2P2 )-free graphs is well-quasi-ordered, which was not previously known (see [2,21]). See also Fig. 1 for pictures of the forbidden induced subgraphs mentioned in this paragraph. Dichotomies. Previously, well-quasi-orderability was known for (K3 , P6 )-free graphs [2], (P2 + P4 )-free bipartite graphs [20] and (P1 + P5 )-free bipartite graphs [20]. 2 K3 P1 + 2P2 P1 + P5 P2 + P4 Fig. 1. The forbidden induced subgraphs considered in our results. It has also been shown that H-free bipartite graphs are not well-quasi-ordered if H contains an induced 3P1 + P2 [21], 3P2 [15] or 2P3 [20]. Moreover, for every s ≥ 1, the class of (K3 , sP1 )-free graphs is finite due to Ramsey’s Theorem [26]. The above results lead to the following known dichotomy for H-free bipartite graphs. Theorem 1. Let H be a graph. The class of H-free bipartite graphs is well-quasiordered by the induced subgraph relation if and only if H = sP1 for some s ≥ 1 or H is an induced subgraph of P1 + P5 , P2 + P4 or P6 . Now combining the aforementioned known results for (K3 , H)-free graphs and H-free bipartite graphs with our new results yields the following new dichotomy for H-free triangle-free graphs, which is exactly the same as the one in Theorem 1. Theorem 2. Let H be a graph. The class of (K3 , H)-free graphs is well-quasi-ordered by the induced subgraph relation if and only if H = sP1 for some s ≥ 1 or H is an induced subgraph of P1 + P5 , P2 + P4 , or P6 . Besides our technique based on curious graphs, we also expect that Theorem 2 will itself be a useful ingredient for showing results for other graph classes, just as Theorem 1 has already proven to be useful (see e.g. [20]). For clique-width the following dichotomy is known for H-free bipartite graphs. Theorem 3 ([11]). Let H be a graph. The class of H-free bipartite graphs has bounded clique-width if and only if H = sP1 for some s ≥ 1 or H is an induced subgraph of K1,3 + 3P1 , K1,3 + P2 , P1 + S1,1,3 or S1,2,3 . It would be interesting to determine whether (K3 , H)-free graphs allow the same dichotomy with respect to the boundedness of their clique-width. The evidence so far is affirmative, but in order to answer this question two remaining cases need to be solved, namely (H1 , H2 ) = (K3 , P1 + S1,1,3 ) and (H1 , H2 ) = (K3 , S1,2,3 ); see Section 2 for the definition of the graph Sh,i,j . Both cases turn out to be highly non-trivial; in particular, the class of (K3 , P1 + S1,1,3 )-free graphs contains the class of (K3 , P1 + P5 )-free graphs, and the class of (K3 , S1,2,3 )-free graphs contains both the classes of (K3 , P1 + P5 )-free and (K3 , P2 + P4 )-free graphs. In Section 5 we give state-of-the-art summaries for well-quasi-orderability and boundedness of clique-width of bigenic graph classes (which include our new results), together with an overview of the missing cases for both problems (which include the missing cases mentioned in this section). 2 Preliminaries Throughout the paper, we consider only finite, undirected graphs without multiple edges or self-loops. Below, we define further graph terminology. 3 The disjoint union (V (G) ∪ V (H), E(G) ∪ E(H)) of two vertex-disjoint graphs G and H is denoted by G + H and the disjoint union of r copies of a graph G is denoted by rG. The complement G of a graph G has vertex set V (G) = V (G) and an edge between two distinct vertices u, v if and only if uv ∈ / E(G). For a subset S ⊆ V (G), we let G[S] denote the subgraph of G induced by S, which has vertex set S and edge set {uv | u, v ∈ S, uv ∈ E(G)}. If S = {s1 , . . . , sr } then, to simplify notation, we may also write G[s1 , . . . , sr ] instead of G[{s1 , . . . , sr }]. We use G \ S to denote the graph obtained from G by deleting every vertex in S, that is, G \ S = G[V (G) \ S]. We write G′ ⊆i G to indicate that G′ is an induced subgraph of G. The graphs Cr , Kr , K1,r−1 and Pr denote the cycle, complete graph, star and path on r vertices, respectively. The graphs K3 and K1,3 are also called the triangle and claw, respectively. A graph G is a linear forest if every component of G is a path (on at least one vertex). The graph Sh,i,j , for 1 ≤ h ≤ i ≤ j, denotes the subdivided claw, that is, the tree that has only one vertex x of degree 3 and exactly three leaves, which are of distance h, i and j from x, respectively. Observe that S1,1,1 = K1,3 . We let S denote the class of graphs, each connected component of which is either a subdivided claw or a path. For a set of graphs {H1 , . . . , Hp }, a graph G is (H1 , . . . , Hp )-free if it has no induced subgraph isomorphic to a graph in {H1 , . . . , Hp }; if p = 1, we may write H1 -free instead of (H1 )-free. A graph is k-partite if its vertex can be partitioned into k (possibly empty) independent sets; 2-partite graphs are also known as bipartite graphs. The biclique or complete bipartite graph Kr,s is the bipartite graph with sets in the partition of size r and s respectively, such that every vertex in one set is adjacent to every vertex in the other set. For a graph G = (V, E), the set N (u) = {v ∈ V | uv ∈ E} denotes the neighbourhood of u ∈ V . Let X be a set of vertices in G. A vertex y ∈ V \ X is complete to X if it is adjacent to every vertex of X and anti-complete to X if it is non-adjacent to every vertex of X. A set of vertices Y ⊆ V \ X is complete (resp. anti-complete) to X if every vertex in Y is complete (resp. anti-complete) to X. If X and Y are disjoint sets of vertices in a graph, we say that the edges between these two sets form a matching if each vertex in X has at most one neighbour in Y and vice versa (if each vertex has exactly one such neighbour, we say that the matching is perfect). Similarly, the edges between these sets form a co-matching if each vertex in X has at most one non-neighbour in Y and vice versa. We say that the set X dominates Y if every vertex of Y has at least one neighbour in X. Similarly, a vertex x dominates Y if every vertex of Y is adjacent to x. A vertex y ∈ V \ X distinguishes X if y has both a neighbour and a non-neighbour in X. The set X is a module of G if no vertex in V \ X distinguishes X. A module X is non-trivial if 1 < |X| < |V |, otherwise it is trivial. A graph is prime if it has only trivial modules. Two vertices are false twins if they have the same neighbourhood (note that such vertices must be non-adjacent). Clearly any prime graph on at least three vertices cannot contain a pair of false twins, as any such pair of vertices would form a non-trivial module. We will use the following structural result. Lemma 1 ([8]). Let G be a connected (K3 , C5 , S1,2,3 )-free graph that does not contain a pair of false twins. Then G is either bipartite or a cycle. 2.1 Clique-width The clique-width cw(G) of a graph G is the minimum number of labels needed to construct G by using the following four operations: 1. i(v): creating a new graph consisting of a single vertex v with label i; 2. G1 ⊕ G2 : taking the disjoint union of two labelled graphs G1 and G2 ; 4 3. ηi,j : joining each vertex with label i to each vertex with label j (i 6= j); 4. ρi→j : renaming label i to j. A class of graphs G has bounded clique-width if there is a constant c such that the clique-width of every graph in G is at most c; otherwise the clique-width is unbounded. Let G be a graph. We define the following operations. For an induced subgraph G′ ⊆i G, the subgraph complementation operation (acting on G with respect to G′ ) replaces every edge present in G′ by a non-edge, and vice versa. Similarly, for two disjoint vertex subsets S and T in G, the bipartite complementation operation with respect to S and T acts on G by replacing every edge with one end-vertex in S and the other one in T by a non-edge and vice versa. We now state some useful facts about how the above operations (and some other ones) influence the clique-width of a graph. We will use these facts throughout the paper. Let k ≥ 0 be a constant and let γ be some graph operation. We say that a graph class G ′ is (k, γ)-obtained from a graph class G if the following two conditions hold: 1. every graph in G ′ is obtained from a graph in G by performing γ at most k times, and 2. for every G ∈ G there exists at least one graph in G ′ obtained from G by performing γ at most k times. We say that γ preserves boundedness of clique-width if for any finite constant k and any graph class G, any graph class G ′ that is (k, γ)-obtained from G has bounded clique-width if and only if G has bounded clique-width. Fact 1. Vertex deletion preserves boundedness of clique-width [23]. Fact 2. Subgraph complementation preserves boundedness of clique-width [18]. Fact 3. Bipartite complementation preserves boundedness of clique-width [18]. Lemma 2 ([7]). Let G be a graph and let P be the set of all induced subgraphs of G that are prime. Then cw(G) = maxH∈P cw(H). 2.2 Well-quasi-orderability A quasi order ≤ on a set X is a reflexive, transitive binary relation. Two elements x, y ∈ X in this quasi-order are comparable if x ≤ y or y ≤ x, otherwise they are incomparable. A set of elements in a quasi-order is a chain if every pair of elements is comparable and it is an antichain if every pair of elements is incomparable. The quasi-order ≤ is a well-quasi-order if any infinite sequence of elements x1 , x2 , x3 , . . . in X contains a pair (xi , xj ) with xi ≤ xj and i < j. Equivalently, a quasi-order is a well-quasi-order if and only if it has no infinite strictly decreasing sequence x1 x2 x3 · · · and no infinite antichain. For an arbitrary set M , let M ∗ denote the set of finite sequences of elements of M . A quasi-order ≤ on M defines a quasi-order ≤∗ on M ∗ as follows: (a1 , . . . , am ) ≤∗ (b1 , . . . , bn ) if and only if there is a sequence of integers i1 , . . . , im with 1 ≤ i1 < · · · < im ≤ n such that aj ≤ bij for j ∈ {1, . . . , m}. We call ≤∗ the subsequence relation. Lemma 3 (Higman’s Lemma [17]). If (M, ≤) is a well-quasi-order then (M ∗ , ≤∗ ) is a well-quasi-order. To define the notion of labelled induced subgraphs, let us consider an arbitrary quasiorder (W, ≤). We say that G is a labelled graph if each vertex v of G is equipped with an element lG (v) ∈ W (the label of v). Given two labelled graphs G and H, we say that G is a labelled induced subgraph of H if G is isomorphic to an induced subgraph 5 of H and there is an isomorphism that maps each vertex v of G to a vertex w of H with lG (v) ≤ lH (w). Clearly, if (W, ≤) is a well-quasi-order, then a graph class X cannot contain an infinite sequence of labelled graphs that is strictly-decreasing with respect to the labelled induced subgraph relation. We therefore say that a graph class X is well-quasi-ordered by the labelled induced subgraph relation if it contains no infinite antichains of labelled graphs whenever (W, ≤) is a well-quasi-order. Such a class is readily seen to also be well-quasi-ordered by the induced subgraph relation. Daligault, Rao and Thomassé [13] showed that every hereditary class of graphs that is well-quasi-ordered by the labelled induced subgraph relation is defined by a finite set of forbidden induced subgraphs. Korpelainen, Lozin and Razgon [22] conjectured that if a hereditary class of graphs G is defined by a finite set of forbidden induced subgraphs, then G is well-quasi-ordered by the induced subgraph relation if and only if it is well-quasi-ordered by the labelled induced subgraph relation. Brignall, Engen and Vatter [4] recently found a class G ∗ with 14 forbidden induced subgraphs that is a counterexample for this conjecture, that is G ∗ is well-quasi-ordered by the induced subgraph relation but not by the labelled induced subgraph relation. However, so far, all known results for bigenic graph classes, including those in this paper, verify the conjecture for bigenic graph classes. Similarly to the notion of preserving boundedness of clique-width, we say that a graph operation γ preserves well-quasi-orderability by the labelled induced subgraph relation if for any finite constant k and any graph class G, any graph class G ′ that is (k, γ)-obtained from G is well-quasi-ordered by this relation if and only if G is. Lemma 4. [10] The following operations preserve well-quasi-orderability by the labelled induced subgraph relation: (i) Subgraph complementation, (ii) Bipartite complementation and (iii) Vertex deletion. Lemma 5 ([2]). A hereditary class X of graphs is well-quasi-ordered by the labelled induced subgraph relation if and only if the set of prime graphs in X is. In particular, X is well-quasi-ordered by the labelled induced subgraph relation if and only if the set of connected graphs in X is. Lemma 6 ([2,20]). (P7 , S1,2,3 )-free bipartite graphs are well-quasi-ordered by the labelled induced subgraph relation. Let (L1 , ≤1 ) and (L2 , ≤2 ) be well-quasi-orders. We define the Cartesian Product (L1 , ≤1 ) × (L2 , ≤2 ) of these well-quasi-orders as the order (L, ≤L ) on the set L := L1 × L2 where (l1 , l2 ) ≤L (l1′ , l2′ ) if and only if l1 ≤1 l1′ and l2 ≤2 l2′ . Lemma 3 implies that (L, ≤L ) is also a well-quasi-order. If G has a labelling with elements of L1 and of L2 , say l1 : V (G) → L1 and l2 : V (G) → L2 , we can construct the combined labelling in (L1 , ≤1 ) × (L2 , ≤2 ) that labels each vertex v of G with the label (l1 (v), l2 (v)). Lemma 7. Fix a well-quasi-order (L1 , ≤1 ) that has at least one element. Let X be 1 : V (G) → L1 . Then X is wella class of graphs. For each G ∈ X fix a labelling lG quasi-ordered by the labelled induced subgraph relation if and only if for every wellquasi-order (L2 , ≤2 ) and every labelling of the graphs in X by this order, the combined labelling in (L1 , ≤1 ) × (L2 , ≤2 ) obtained from these labellings also results in a wellquasi-ordered set of labelled graphs. Proof. If X is well-quasi-ordered by the labelled induced subgraph relation then by definition it is well-quasi-ordered when labelled with labels from these combined labellings obtained from these well-quasi-orders. If X is not well-quasi-ordered by the 6 labelled induced subgraph relation then there must be a well-quasi-order (L2 , ≤2 ) and an infinite set of graphs G1 , G2 , . . . whose vertices are labelled with elements of L2 such that these graphs form an infinite labelled antichain. For each graph Gi , replace 1 the label l on vertex v by (lG (v), l). The graphs are now labelled with elements of 1 the well-quasi-order (L1 , ≤1 ) × (L2 , ≤2 ) and result in an infinite labelled antichain of graphs labelled with such combined labellings. This completes the proof. ⊓ ⊔ 2.3 k-uniform Graphs For an integer k ≥ 1, a graph G is k-uniform if there is a symmetric square 0, 1 matrix K of order k and a graph Fk on vertices 1, 2, . . . , k such that G ∈ P(K, Fk ), where P(K, Fk ) is the graph class defined as follows. Let H be the disjoint union of infinitely many copies of Fk . For i = 1, . . . , k, let Vi be the subset of V (H) containing vertex i from each copy of Fk . Construct from H an infinite graph H(K) on the same vertex set by applying a subgraph complementation to Vi if and only if K(i, i) = 1 and by applying a bipartite complementation to a pair Vi , Vj if and only if K(i, j) = 1. Thus, two vertices u ∈ Vi and v ∈ Vj are adjacent in H(K) if and only if uv ∈ E(H) and K(i, j) = 0 or uv ∈ / E(H) and K(i, j) = 1. Then, P(K, Fk ) is the hereditary class consisting of all the finite induced subgraphs of H(K). The minimum k such that G is k-uniform is the uniformicity of G. The second of the next two lemmas follows directly from the above definitions. The following result was proved by Korpelainen and Lozin. The class of disjoint unions of cliques is a counterexample for the reverse implication. Lemma 8 ([21]). Any class of graphs of bounded uniformicity is well-quasi-ordered by the labelled induced subgraph relation. The following lemma follows directly from the definition of clique-width and the definition of k-uniform graphs (see also [1] for a more general result). Lemma 9. Every k-uniform graph has clique-width at most 2k. 3 Partitioning 3-Partite Graphs In Section 3.1, we first introduce a graph decomposition on 3-partite graphs. We then show how to extend results on bounded clique-width or well-quasi-orderability by the labelled induced subgraph relation from bipartite graphs in an arbitrary hereditary class of graphs to the 3-partite graphs in this class that are decomposable in this way. In Section 3.2, we then give sufficient conditions for a 3-partite graph to have such a decomposition. 3.1 The Decomposition Let G be a 3-partite graph given with a partition of its vertex set into three independent sets V1 , V2 and V3 . Suppose that each set Vi can be partitioned into sets Vi0 , . . . , Viℓ such that, taking subscripts modulo 3: k k – for i ∈ {1, 2, 3} if j < k then Vij is complete to Vi+1 and anti-complete to Vi+2 . For i ∈ {0, . . . , ℓ} let Gi = G[V1i ∪ V2i ∪ V3i ]. We say that the graphs Gi are the slices of G. If the slices belong to some graph class X, then we say that G can be partitioned into slices from X; see Fig. 2 for an example. 7 G0 G1 G2 G3 V1 V2 V3 Fig. 2. A 3-partite graph partitioned into slices G0 , . . . , G3 isomorphic to P3 . Lemma 10. If G is a 3-partite graph that can be partitioned into slices of clique-width at most k then G has clique-width at most max(3k, 6). Proof. Since every slice Gj of G has clique-width at most k, it can be constructed using the labels 1, . . . , k. Applying relabelling operations if necessary, we may assume that at the end of this construction, every vertex receives the label 1. We can modify this construction so that we use the labels 11 , . . . , k1 , 12 , . . . , k2 , 13 , . . . , k3 instead, in such a way that at all points in the construction, for each i ∈ {1, 2, 3} every constructed vertex in Vi has a label in {1i , . . . , ki }. To do this we replace: – creation operations i(v) by ij (v) if v ∈ Vj , – relabel operations ρj→k () by ρj1 →k1 (ρj2 →k2 (ρj3 →k3 ())) and – join operations ηj,k () by ηj1 ,k1 (ηj1 ,k2 (ηj1 ,k3 (ηj2 ,k1 (ηj2 ,k2 (ηj2 ,k3 (ηj3 ,k1 (ηj3 ,k2 (ηj3 ,k3 ())))))))). This modified construction uses 3k labels and at the end of it, every vertex in Vi is labelled with label 1i . We may do this for every slice Gj of G independently. We now show how to use these constructed slices to construct G[V (G0 ) ∪ · · · ∪ V (Gj )] using six labels in such a way that every vertex in Vi is labelled with label 1i . We do this by induction. If j = 0 then G[V (G0 )] = G0 , so we are done. If j > 0 then by the induction hypothesis, we can construct G[V (G0 ) ∪ · · · ∪ V (Gj−1 )] in this way. Consider the copy of Gj constructed earlier and relabel its vertices using the operations ρ11 →21 , ρ12 →22 and ρ13 →23 so that in this copy of Gj , every vertex in Vi is labelled 2i . Next take the disjoint union of the obtained graph with the constructed G[V (G0 ) ∪ · · · ∪ V (Gj−1 )]. Then, apply join operations η11 ,22 , η12 ,23 and η13 ,21 . Finally, apply the relabelling operations ρ21 →11 , ρ22 →12 and ρ23 →13 . This constructs G[V (G0 ) ∪ · · · ∪ V (Gj )] in such a way that every vertex in Vi is labelled with 1i . By induction, it follows that G has clique-width at most max(3k, 6). ⊓ ⊔ 8 Lemma 11. Let X be a hereditary graph class containing a class Z. Let Y be the set of 3-partite graphs in X that can be partitioned into slices from Z. If Z is well-quasiordered by the labelled induced subgraph relation then so is Y . Proof. For each graph G in Y , we may fix a partition into independent sets (V1 , V2 , V3 ) with respect to which the graph can be partitioned into slices from Z. Let (L1 , ≤1 ) be the well-quasi-order with L1 = {1, 2, 3} in which every pair of distinct elements is incomparable. By Lemma 7, we need only consider labellings of graphs in G of the form (i, l(v)) where v ∈ Vi and l(v) belongs to an arbitrary well-quasi-order L. Suppose G can be partitioned into slices G1 , . . . , Gk , with vertices labelled as in G. The slices along with the labellings completely describe the edges in G. Suppose H is another such graph, partitioned into slices H 1 , . . . , H k . If (H 1 , . . . , H ℓ ) is smaller than (G1 , . . . , Gk ) under the subsequence relation, then H is an induced subgraph of G. The result follows by Lemma 3. ⊓ ⊔ 3.2 Curious Graphs Let G be a 3-partite graph given together with a partition of its vertex set into three independent sets V1 , V2 and V3 . An induced K3 or 3P1 in G is rainbow if it has exactly one vertex in each set Vi . We say that G is curious with respect to the partition (V1 , V2 , V3 ) if it contains no rainbow K3 or 3P1 when its vertex set is partitioned in this way. We say that G is curious if there is a partition (V1 , V2 , V3 ) with respect to which G is curious. In this section we will prove that given a hereditary class X, if the bipartite graphs in X are well-quasi-ordered by the labelled induced subgraph relation or have bounded clique-width, then the same is true for the curious graphs in X. A linear order (x1 , x2 , . . . , xk ) of the vertices of an independent set I is – increasing if i < j implies N (xi ) ⊆ N (xj ), – decreasing if i < j implies N (xi ) ⊇ N (xj ), – monotone if it is either increasing or decreasing. Bipartite graphs that are 2P2 -free are also known as bipartite chain graphs. It is and it is well known (and easy to verify) that a bipartite graph G is 2P2 -free if and only if the vertices in each independent set of the bipartition admit a monotone ordering. Suppose G is a curious graph with respect to some partition (V1 , V2 , V3 ). We say that (with respect to this partition) the graph G is a curious graph of type t if exactly t of the graphs G[V1 ∪ V2 ], G[V1 ∪ V3 ] and G[V2 ∪ V3 ] contain an induced 2P2 . Curious Graphs of Type 0 and 1. Note that if G is a curious graph of type 0 or 1 with respect to the partition (V1 , V2 , V3 ) then without loss of generality, we may assume that G[V1 ∪ V2 ] and G[V1 ∪ V3 ] are both 2P2 -free. Lemma 12. Let G be a curious graph with respect to (V1 , V2 , V3 ), such that G[V1 ∪ V2 ] and G[V1 ∪ V3 ] are both 2P2 -free. Then the vertices of V1 admit a linear ordering which is decreasing in G[V1 ∪ V2 ] and increasing in G[V1 ∪ V3 ]. Proof. For a set S ⊆ V , we use NS (u) := N (u) ∩ S to denote the set of vertices in S that are adjacent to u. We may choose a linear order x1 , . . . , xℓ of the vertices of V1 according to their neighbourhood in V2 , breaking ties according to their neighbourhood in V3 i.e. an order such that: (i) if NV2 (xi ) ) NV2 (xj ) then i < j and (ii) if NV2 (xi ) = NV2 (xj ) and NV3 (xi ) ( NV3 (xj ) then i < j. 9 Clearly such an ordering is decreasing in G[V1 ∪ V2 ]. Suppose, for contradiction, that this order is not increasing in G[V1 ∪ V3 ]. Then there must be indices i < j such that NV3 (xi ) ) NV3 (xj ). Then NV2 (xi ) 6= NV2 (xj ) by Property (ii). By Property (i) it follows that NV2 (xi ) ) NV2 (xj ). This means that there are vertices y ∈ NV2 (xi ) \ NV2 (xj ) and z ∈ NV3 (xi ) \ NV3 (xj ). Now if y is adjacent to z then G[xi , y, z] is a rainbow K3 and if y is non-adjacent to z then G[xj , y, z] is a rainbow 3P1 . This contradiction implies that the order is indeed decreasing in G[V1 ∪ V3 ], which completes the proof. ⊓ ⊔ Lemma 13. If G is a curious graph of type 0 or 1 with respect to a partition (V1 , V2 , V3 ) then G can be partitioned into slices that are bipartite. Proof. Let x1 , . . . , xℓ be a linear order on V1 satisfying Lemma 12. Let V10 = ∅ and for i ∈ {1, . . . , ℓ}, let V1i = {xi }. We partition V2 and V3 as follows. For i ∈ {0, . . . , ℓ}, let V2i = {y ∈ V2 | xj y ∈ E(G) if and only if j ≤ i}. For i ∈ {0, . . . , ℓ}, let V3i = {z ∈ V3 | xj z ∈ / E(G) if and only if j ≤ i}. In particular, note that the vertices of V2ℓ ∪ V30 and V20 ∪ V3ℓ are complete and anti-complete to V1 , respectively. The following properties hold: – If j < k then V1j is complete to V2k and anti-complete to V3k . – If j > k then V1j is anti-complete to V2k and complete to V3k . If j < k and y ∈ V2j is non-adjacent to z ∈ V3k then G[xk , y, z] is a rainbow 3P1 , a contradiction. If j > k and y ∈ V2j is adjacent to z ∈ V3k then G[xj , y, z] is a rainbow K3 , a contradiction. It follows that: – If j < k then V2j is complete to V3k . – If j > k then V2j is anti-complete to V3k . For i ∈ {0, . . . , ℓ}, let Gi = G[V1i ∪ V2i ∪ V3i ]. The above properties about the edges between the sets Vji show that G can be partitioned into the slices G0 , . . . , Gℓ . Now, for each i ∈ {0, . . . , ℓ}, V1i is anti-complete to V3i , so every slice Gi is bipartite. This completes the proof. ⊓ ⊔ Curious Graphs of Type 2 and 3. Lemma 14. Fix t ∈ {2, 3}. If G is a curious graph of type t with respect to a partition (V1 , V2 , V3 ) then G can be partitioned into slices of type at most t − 1. Proof. Fix t ∈ {2, 3} and let G be a curious graph of type t with respect to a partition (V1 , V2 , V3 ). We may assume that G[V1 ∪ V2 ] contains an induced 2P2 . Claim 1. Given a 2P2 in G[V1 ∪ V2 ], every vertex of V3 has exactly two neighbours in the 2P2 and these neighbours either both lie in V1 or both lie in V2 . Let x1 , x2 ∈ V1 and y1 , y2 ∈ V2 induce a 2P2 in G such that x1 is adjacent to y1 but not to y2 and x2 is adjacent to y2 but not to y1 . Consider z ∈ V3 . For i ∈ {1, 2}, if z is adjacent to both xi and yi , then G[xi , yi , z] is a rainbow K3 , a contradiction. Therefore z can have at most one neighbour in {x1 , y1 } and at most one neighbour in {x2 , y2 }. If z is non-adjacent to x1 and y2 then G[x1 , y2 , z] is a rainbow 3P1 , a contradiction. Therefore, z can have at most one non-neighbour in {x1 , y2 }, and similarly z have have at most one non-neighbour in {x2 , y1 }. Therefore, if z is adjacent to x1 , then it must be non-adjacent to y1 , so it must be adjacent to x2 , so it must be non-adjacent to y2 . Similarly, if z is non-adjacent to x1 then it must be adjacent to y2 , so it must be non-adjacent to x2 , so it must be adjacent to y1 . Hence Claim 1 follows. 10 Consider a maximal set {H 1 , . . . , H q } of vertex-disjoint sets that induce copies of 2P2 in G[V1 ∪ V2 ]. We say that a vertex of V3 distinguishes two graphs G[H i ] and G[H j ] if its neighbours in H i and H j do not belong to the same set Vk . We group these sets H i into blocks B 1 , . . . , B p that are not distinguished by any vertex of V3 . In other words, every B i contains at least one 2P2 and every vertex of V3 is complete to one of the sets B i ∩ V1 and B i ∩ V2 and anti-complete to the other. For j ∈ {1, 2}, let Bji = B i ∩ Vj . We define a relation <B on the blocks as follows: – B i <B B j holds if B1i is complete to B2j , while B2i is anti-complete to B1j . For distinct blocks B i , B j at most one of B i <B B j and B j <B B i can hold. Claim 2. Let B i and B j be distinct blocks. There is a vertex z ∈ V3 that differentiates B i and B j . If z is complete to B2i ∪ B1j and anti-complete to B1i ∪ B2j then B i <B B j (see also Fig. 3). If z is complete to B2j ∪ B1i and anti-complete to B1j ∪ B2i then B j <B B i . By definition of the blocks B i and B j there must be a vertex z ∈ V3 that distinguishes them. Without loss of generality we may assume that z is complete to B2i ∪B1j and anticomplete to B1i ∪B2j . It remains to show that B i <B B j . If y ∈ B2i is adjacent to z ∈ B1j then G[x, y, z] is a rainbow K3 , a contradiction. If y ∈ B1i is non-adjacent to z ∈ B2j then G[x, y, z] is a rainbow 3P1 , a contradiction. Therefore B2i is anti-complete to B1j and B1i is complete to B2j . It follows that B i <B B j . Claim 2 follows by symmetry. Bi z Bj V1 V2 V3 Fig. 3. Two blocks B i and B j with B i <B B j and a vertex z ∈ V3 differentiating them. Claim 3. The relation <B is transitive. Suppose that B i <B B j and B j <B B k . Since B j and B k are distinct, there must be a vertex z ∈ V3 that distinguishes them and combining Claim 2 with the fact that B j <B B k it follows that z must be complete to B2j ∪ B1k . Suppose x ∈ B1i and y ∈ B2j . Then x is adjacent to y, since B i <B B j and y is adjacent to z by choice of z. Now x is must be non-adjacent to z otherwise G[x, y, z] would be a rainbow K3 . 11 Therefore z is anti-complete to B1i , so z distinguishes B i and B k . By Claim 2 it follows that B i <B B k . This completes the proof of Claim 3. Combining Claims 1–3, we find that <B is a linear order on the blocks. We obtain the following conclusion, which we call the chain property. Claim 4. The set of blocks admits a linear order B 1 <B B 2 <B · · · <B B p such that (i) if i < j then B1i is complete to B2j , while B2i is anti-complete to B1j and (ii) for each z ∈ V3 there exists an i ∈ {0, . . . , p} such that if j ≤ i then z is complete to B2j and anti-complete to B1j and if j > i then z is anti-complete to B2j and complete to B1j . Next consider the set of vertices in V1 ∪ V2 that do not belong to any set B i . Let R denote this set and note that G[R] is 2P2 -free by maximality of the set {H 1 , . . . , H q }. For i ∈ {1, 2} let Ri = R ∩ Vi . Claim 5. If x ∈ R1 has a neighbour in B2i , then x is complete to B2i+1 , and if x has a non-neighbour in B2i , then x is anti-complete to B2i−1 . If x ∈ R2 has a non-neighbour in B1i , then x is anti-complete to B1i+1 , and if x has a neighbour in B1i , then x is complete to B1i−1 . Suppose, for contradiction, that x ∈ R1 is adjacent to y ∈ B2i and non-adjacent to y ′ ∈ B2i+1 . Consider a vertex z ∈ V3 that distinguishes B i and B i+1 . Since B i <B B i+1 , Claim 2 implies that z is complete to B1i+1 ∪ B2i and anti-complete to B2i+1 ∪ B1i . Now if x is adjacent to z then G[x, y, z] is a rainbow K3 and if x is non-adjacent to z then G[x, y ′ , z] is a rainbow 3P1 . It follows that if x ∈ R1 has a neighbour in B2i then x is complete to B2i+1 and if x has a non-neighbour in B2i+1 , then x is anti-complete to B2i . The claim follows by symmetry. Claim 5 allows us to update the sequence of blocks as follows: Update Procedure. For i ∈ {1, 2}, if Ri contains a vertex x that has both a neighj bour y and a non-neighbour y ′ in B3−i for some j, we add x to the sets Bij and B j and remove it from Ri . Claim 6. Applying the Update Procedure preserves the chain property (see Claim 4) of the blocks B i . Assume that the chain property holds (possibly after some applications of the Update Procedure). Without loss of generality, assume x ∈ R1 has both a neighbour y and a non-neighbour y ′ in some set B2j (the case where x ∈ R2 follows similarly). We will show that the chain property continues to hold after adding x to B1j and Bj and removing it from R1 . Recall that every vertex of B1j has the same neighbourhood in V3 by definition of B j . We first show that x has the same neighbourhood in V3 as the vertices of B1j . If z ∈ V3 is non-adjacent to x, but complete to B1j , then z is anticomplete to B2j , so G[x, y ′ , z] is a rainbow 3P1 , a contradiction. Similarly, if z ∈ V3 is adjacent to x, but anti-complete to B1j , then z is complete to B2j , so G[x, y, z] is a rainbow K3 , a contradiction. Therefore x must have the same neighbourhood in V3 as the vertices of B1j . By Claim 4, this means that Property (ii) of the chain property is preserved if we apply the Update Procedure with the vertex x. Now suppose that y ′′ ∈ B2k for some k 6= j. Then there must be a vertex z ∈ V3 that differentiates B j and B k . If k < j then by Claim 2 the vertex z is complete to B2k ∪ B1j and anti-complete to B1k ∪ B2j , so x must be non-adjacent to y ′′ , otherwise G[x, y ′′ , z] would be a rainbow K3 . If k > j then by Claim 2 the vertex z is anti-complete to B2k ∪ B1j and complete to B1k ∪ B2j , so x must be adjacent to y ′′ , otherwise G[x, y ′′ , z] would be a rainbow 3P1 . We conclude that Property (i) of the chain property is also 12 preserved if we apply the Update Procedure with the vertex x. By symmetry and induction this completes the proof of Claim 6. By Claim 6 we may therefore apply the Update Procedure exhaustively, after which the chain property will continue to hold. Once this procedure is complete, every remaining vertex of R1 will be either complete or anti-complete to each set B2j . In fact, by Claim 5, we know that for every vertex x ∈ R1 , there is an i ∈ {0, . . . , p} such that x has a neighbour in all B2j with j > i (if such a j exists) and x has a non-neighbour in all B2j with j ≤ i (if any such j exists). Since x is complete or anti-complete to each set B2j , we obtain the following conclusion: – for every vertex x ∈ R1 , there is an i ∈ {0, . . . , p} such that x is complete to all B2j with j > i (if such a j exists) and x is anti-complete to all B2j with j ≤ i (if any such j exists). We denote the corresponding subset of R1 by Y1i . By symmetry, we also obtain the following: – for every vertex x ∈ R2 , there is an i ∈ {0, . . . , p} such that x is complete to all B1j with j ≤ i (if such a j exists) and x is anti-complete to all B1j with j > i (if any such j exists). We denote the corresponding subset of R2 by Y2i . We also partition the vertices of V3 into p + 1 subsets V30 , . . . , V3p such that the vertices of V3j are complete to B2i and anti-complete to B1i for i ≤ j and complete to B1i and anti-complete to B2i for i > j. (So V30 is complete to Bi1 for all i and V3p is complete to Bi2 for all i). Claim 7. For each i, if j < i then V3i is anti-complete to Y1j and complete to Y2j , and if j > i then V3i is complete to Y1j and anti-complete to Y2j . Suppose that z ∈ V3i and x ∈ Y1j and y ∈ Y2j (note that such vertices x and y do not exist if Y1j or Y2j , respectively, is empty). First suppose that j < i and choose arbitrary vertices x′ ∈ B1i , y ′ ∈ B2i . Note that x and z are both complete to B2i and y and z are both anti-complete to B1i . Then z cannot be adjacent to x otherwise G[x, y ′ , z] would be a rainbow K3 and z must be adjacent to y, otherwise G[x′ , y, z] would be a rainbow 3P1 . Now suppose i < j and choose arbitrary vertices x′ ∈ B1i+1 , y ′ ∈ B2i+1 . Note that x and z are both anti-complete to B2i+1 and y and z are both complete to B1i+1 . Then z must be adjacent to x otherwise G[x, y ′ , z] would be a rainbow 3P1 and z must be non-adjacent to y, otherwise G[x′ , y, z] would be a rainbow K3 . This completes the proof of Claim 7. Let Gi denote the subgraph of G induced by Y1i ∩ Y2i ∩ V3i . By Claims 4, 6 and 7 the graph G can be partitioned into slices: G0 , G[B 1 ], G1 , G[B 2 ], . . . , G[B p ], Gp . Recall that the graph G is of type t and G[V1 ∪ V2 ] contains an induced 2P2 . Since G[Y1i ∪ Y2i ] is 2P2 -free (by construction, since the original sequence H 1 , H 2 , . . . , H q of 2P2 s was maximal), it follows that each Gi is of type at most t−1. Furthermore, since each G[Bi ] is bipartite, it forms a curious graph in which the set V3 is empty, so it has type at most 1. This completes the proof. ⊓ ⊔ Curious Graphs, Clique-width and Well-quasi-orderability. We are now ready to state the main result of this section. Theorem 4. Let X be a hereditary class of graphs. If the set of bipartite graphs in X is well-quasi-ordered by the labelled induced subgraph relation or has bounded cliquewidth, then this property also holds for the set of curious graphs in X. 13 Proof. Suppose that the class of bipartite graphs in X is well-quasi-ordered by the labelled induced subgraph relation or has bounded clique-width. By Lemmas 10, 11 and 13, the curious graphs of type at most 1 also have this property. Applying Lemmas 10, 11 and 14 once, we obtain the same conclusion for curious graphs of type at most 2. Applying Lemmas 10, 11 and 14 again, we obtain the same conclusion for curious graphs of type at most 3, that is, all curious graphs. This completes the proof. ⊓ ⊔ 4 Applications of Our Technique In this section we show that the class of (K3 , P1 + P5 )-free graphs and the class of (K3 , P2 + P4 )-free graphs have bounded clique-width and are well-quasi-ordered by the labelled induced subgraph relation. To do this, we first prove two structural lemmas. These lemmas consider the case where a graph in one of these classes contains an induced subgraph isomorphic to C5 and show how to use a bounded number of vertex deletions and bipartite complementations to transform the graph into a disjoint union of curious graphs and 3-uniform graphs in the respective graph class. We then use these lemmas to prove Theorem 5, which is our main result. The first of the two lemmas is implicit in the proofs of [8, Lemma 9 and Theorem 3], but without an explicit upper bound on the number of operations used and the number of obtained curious graphs. For completeness, we give a direct proof and provide such explicit bounds. Note that the bounds on the number of vertex deletions, bipartite complementations and curious graphs in both lemmas are not tight, but any upper bound on these numbers will be sufficient for our purposes. Lemma 15. Given any connected (K3 , P1 + P5 )-free graph G that contains an induced C5 , we can apply at most 5 vertex deletions and at most 31 bipartite complementation operations to obtain a graph H that is the disjoint union of 11 (K3 , P1 + P5 )-free curious graphs. Proof. Let G be a connected (K3 , P1 + P5 )-free graph that contains an induced cycle C on the vertices v1 , . . . , v5 , listed in order along the cycle. To aid notation, for the remainder of the proof subscripts on vertices and on sets should be interpreted modulo 5. We will show how to use vertex deletions and bipartite complementations to partition the graph into a disjoint union of curious graphs. At the end of the proof, we will verify the number of operations used. Since G is K3 -free, every vertex not on the cycle C has at most two neighbours on C and if it does have two neighbours on C, then these neighbours must be nonconsecutive vertices of the cycle. We may therefore partition the vertices in V (G)\V (C) into eleven sets as follows: – U is the set of vertices anti-complete to C, – for i ∈ {1, . . . , 5}, Wi is the set of vertices whose unique neighbour on C is vi and – for i ∈ {1, . . . , 5}, Vi is the set of vertices adjacent to vi−1 and vi+1 and nonadjacent to the rest of C. We prove a series of claims. Claim 1. We may assume that U = ∅. Suppose, for contradiction, that there are two vertices u, u′ ∈ U that do not have the same neighbourhood in some set Vi or Wi . Say v ∈ Vi ∪ Wi+1 is adjacent to u, but not u′ for some i ∈ {1, . . . , 5}. Note that v is adjacent to vi+1 , but non-adjacent to vi , vi+2 and vi+3 . Then G[vi+3 , u′ , u, v, vi+1 , vi ] is a P1 + P5 if u and u′ are adjacent and G[u′ , u, v, vi+1 , vi+2 , vi+3 ] is a P1 + P5 if they are not. This contradiction means 14 that every vertex in U has the same neighbourhood in every set Vi and every set Wi . Since G is connected, there must be a vertex v in some Vi or Wi that is adjacent to every vertex of U . Since G is K3 -free, U must therefore be an independent set. Applying a bipartite complementation between U and the vertices adjacent to the vertices of U disconnects G[U ] from the rest of the graph. Since U is independent, G[U ] is a curious graph (with two of the three partition classes empty). This completes the proof of Claim 1. Claim 2. For i ∈ {1, . . . , 5}, Vi−1 ∪ Wi ∪ Vi+1 is an independent set. Indeed, if x, y ∈ Vi−1 ∪ Wi ∪ Vi+1 are adjacent then G[x, y, vi ] is a K3 , a contradiction. This completes the proof of Claim 2. Claim 3. For i ∈ {1, . . . , 5}, Wi is complete to Wi−1 ∪ Wi+1 . Indeed, if x ∈ Wi−1 is non-adjacent to y ∈ Wi then G[x, y, vi , vi+1 , vi+2 , vi+3 ] is a P1 + P5 , a contradiction. Claim 3 follows by symmetry. Claim 4. For i ∈ {1, . . . , 5}, Wi is complete or anti-complete to Wi+2 . Suppose, for contradiction, that x ∈ Wi+2 has a neighbour y ∈ Wi and a non-neighbour y ′ ∈ Wi . By Claim 2, y is non-adjacent to y ′ . Then G[y ′ , y, x, vi+2 , vi+3 , vi+4 ] is a P1 + P5 , a contradiction. Claim 4 follows by symmetry. Claim 5. For i ∈ {1, . . . , 5}, Vi is either complete or anti-complete to Wi . Suppose, for contradiction, that x ∈ Vi has a neighbour y ∈ Wi and a non-neighbour y ′ ∈ Wi . By Claim 2, y is non-adjacent to y ′ . Then G[y ′ , y, x, vi+1 , vi+2 , vi+3 ] is a P1 + P5 , a contradiction. Therefore every vertex in Vi is complete or anti-complete to Wi . Now suppose, for contradiction, that y ∈ Wi has a neighbour x ∈ Vi and a nonneighbour x′ ∈ Vi . By Claim 2, x is non-adjacent to x′ . Then G[vi+3 , vi , y, x, vi+1 , x′ ] is a P1 + P5 , a contradiction. Therefore every vertex in Wi is complete or anti-complete to Vi . This completes the proof of Claim 5. Claim 6. For i ∈ {1, . . . , 5}, every vertex of Vi is complete to either Vi−1 or Vi+1 . Suppose, for contradiction, that x ∈ Vi is non-adjacent to y ∈ Vi−1 and z ∈ Vi+1 . By Claim 2, y is non-adjacent to z. Then G[y, vi−1 , x, vi+1 , vi+2 , z] is a P1 + P5 , a contradiction. This completes the proof of Claim 6. By Claim 6, we can partition each set Vi into three (possibly empty) subsets as follows: – Vi0 the set of vertices in Vi that dominate both Vi−1 and Vi+1 , – Vi− the set of vertices in Vi \ Vi0 that dominate Vi−1 (and so have non-neighbours in Vi+1 ), – Vi+ the set of vertices in Vi \ Vi0 that dominate Vi+1 (and so have non-neighbours in Vi−1 ). By definition of this partition, if x ∈ Vi is non-adjacent to y ∈ Vi+1 , then x ∈ Vi− and + + y ∈ Vi+1 . Moreover, every vertex of Vi− has a non-neighbour in Vi+1 and vice versa. Thus, the vertices of V1 ∪ · · · ∪ V5 are partitioned into 15 subsets (some or all of which + − 0 and Vi+2 , Vi+2 may be empty). Note that for i ∈ {1, . . . , 5} the sets Vi0 , Vi− , Vi+ , Vi+2 0 are pairwise anti-complete by Claim 2. Furthermore, for i ∈ {1, . . . , 5}, Vi and Vi+ − + − 0 0 . Therefore and Vi+1 , and Vi− is complete to Vi+1 and Vi+1 , Vi+1 are complete to Vi+1 nearly every pair of these subsets is either complete or anti-complete to each other. + The only possible exceptions are the five disjoint pairs of the form {Vi− , Vi+1 }. Next, for each i ∈ {1, . . . , 5} we analyse the edges between Wi and the subsets of Vi−2 and Vi+2 . 15 − + Claim 7. For i ∈ {1, . . . , 5}, Wi is anti-complete to Vi−2 ∪ Vi+2 . + + Suppose, for contradiction, that x ∈ Wi has a neighbour y ∈ Vi+2 . By definition of Vi+2 , y must have a non-neighbour z ∈ Vi+1 . By Claim 2, z is non-adjacent to x. Then G[vi−1 , x, y, vi+1 , vi+2 , z] is a P1 + P5 , a contradiction. Claim 7 follows by symmetry. Claim 8. For i ∈ {1, . . . , 5}, if x ∈ Wi , y ∈ Vi+2 and z ∈ Vi−2 then G[x, y, z] is not a 3P1 . Indeed, if x ∈ Wi , y ∈ Vi+2 and z ∈ Vi−2 and G[x, y, z] is a 3P1 then G[z, x, vi , vi+1 , y, vi−2 ] is a P1 + P5 , a contradiction. This completes the proof of Claim 8. Claim 9. For i ∈ {1, . . . , 5}: 0 (i) If x ∈ Wi has a neighbour in Vi+2 , then x is anti-complete to Vi+3 and complete − to Vi+2 . 0 (ii) If x ∈ Wi has a neighbour in Vi+3 , then x is anti-complete to Vi+2 and complete + to Vi+3 . 0 Suppose x ∈ Wi has a neighbour y ∈ Vi+2 . If z ∈ Vi+3 then y is adjacent to z, so x must be non-adjacent to z, otherwise G[x, y, z] would be a K3 . Therefore x is anti− complete to Vi+3 . If y ′ ∈ Vi+2 then y ′ has a non-neighbour z ′ ∈ Vi+3 . Note that z ′ is non-adjacent to x. Now x must be adjacent to y ′ , otherwise G[x, y ′ , z ′ ] would be − a 3P1 , contradicting Claim 8. It follows that x is complete to Vi+2 . Claim 9 follows by symmetry. − + Recall that Wi is anti-complete to Vi−2 ∪ Vi+2 by Claim 7. By Claim 9 we can partition Wi into three (possibly empty) subsets as follows: – Wi2 the set of vertices in Wi that anti-complete to Vi+3 and complete – Wi3 the set of vertices in Wi that anti-complete to Vi+2 and complete – Wi0 the set of vertices in Wi \ (Wi2 0 0 Vi+2 ∪ Vi+3 ). 0 (and are therefore have neighbours in Vi+2 − to Vi+2 ), 0 have neighbours in Vi+3 (and are therefore + to Vi+3 ) and ∪ Wi3 ) (which are therefore anti-complete to + − Claim 10. For i ∈ {1, . . . , 5}, we may assume that Wi0 ∪ Vi−2 ∪ Vi+2 = ∅. + − 0 We first show how to remove all edges from vertices in G[Wi ∪ Vi−2 ∪ Vi+2 ] to the rest of G by using three bipartite complementations. By Claim 2, Wi0 is anti-complete to Wi2 , Wi3 , Vi−1 and Vi+1 . By Claim 7, Wi0 is − + 0 0 . anti-complete to Vi+3 and Vi+2 . By definition, Wi0 is anti-complete to Vi+2 and Vi+3 0 0 By Claim 3, Wi is complete to Wi−1 and Wi+1 . By Claim 5, Wi is either complete or anti-complete to Vi . By Claim 4, Wi0 is either complete or anti-complete to Wi+2 and either complete or anti-complete to Wi+3 . By definition of Wi , vi is complete to Wi and C \ {vi } is anti-complete to Wi . Therefore, by applying at most one bipartite complementation, we can remove all edges with one end-vertex in Wi0 and the other + − end-vertex outside Wi0 ∪ Vi−2 ∪ Vi+2 . − + 0 , Wi+1 and Wi+3 . By By Claim 2, Vi+2 is anti-complete to Vi , Vi−1 , Vi+2 , Vi+2 − − Claim 5, Vi+2 is either complete or anti-complete to Wi+2 . By Claim 7, Vi+2 is anti− 0 complete to Wi−1 . By definition, Vi+2 is complete to Vi+1 . By definition of Vi+3 − − − − 0 and Vi+3 , Vi+2 is complete to Vi+3 and Vi+3 . By Claim 9, Vi+2 is complete to Wi2 − and anti-complete to Wi3 . By definition of Vi+2 , {vi+1 , vi+3 } is complete to Vi+2 and − C \ {vi+1 , vi+3 } is anti-complete to Vi+2 . Therefore, by applying at most one bipartite − and the other complementation, we can remove all edges with one end-vertex in Vi+2 − + 0 end-vertex outside Wi ∪ Vi−2 ∪ Vi+2 . Symmetrically, by applying at most one bipartite 16 + complementation, we can remove all edges with one end-vertex in Vi−2 and the other + − 0 end-vertex outside Wi ∪ Vi−2 ∪ Vi+2 . + Thus we can apply three bipartite complementations to disconnect G[Wi0 ∪ Vi−2 ∪ − + − 0 Vi+2 ] from the rest of the graph. By Claim 2, Wi , Vi−2 and Vi+2 are independent sets. + − Therefore, by Claim 8, G[Wi0 ∪ Vi−2 ∪ Vi+2 ] is a curious graph. This completes the proof of Claim 10. By the Claim 10, the only sets that remain non-empty are ones of form Wi3 , Wi2 or Vi0 . We prove the following claim. 2 0 Claim 11. For i ∈ {1, . . . , 5}, we may assume that Wi3 ∪ Wi+1 ∪ Vi−2 = ∅. 3 2 0 We first show how to remove all edges from vertices in G[Wi ∪ Wi+1 ∪ Vi−2 ] to the rest of the graph by using finitely many bipartite complementations. 0 0 By Claim 2, Wi3 is anti-complete to Wi2 , Vi−1 and Vi+1 . By Claim 3, Wi3 is complete 3 3 to Wi−1 and Wi+1 . By Claim 4, Wi is either complete or anti-complete to Wi+2 and either complete or anti-complete to Wi−2 . By Claim 5, Wi3 is either complete or anti0 complete to Vi0 . By Claim 9, Wi3 is anti-complete to Vi+2 . By definition of Wi , vi is 3 3 complete to Wi and C \ {vi } is anti-complete to Wi . Therefore, by applying at most one bipartite complementation, we can remove all edges with one end-vertex in Wi3 2 0 and the other end-vertex outside Wi3 ∪ Wi+1 ∪ Vi−2 . Symmetrically, by applying at most one bipartite complementation, we can remove all edges with one end-vertex 2 2 0 in Wi+1 and the other end-vertex outside Wi3 ∪ Wi+1 ∪ Vi−2 . 0 0 is either By Claim 2, Vi−2 anti-complete to Vi , Wi−1 , Wi+2 , Vi+1 . By Claim 5, Vi−2 0 0 0 complete or anti-complete to Wi−2 . By definition, Vi−2 is complete to Vi−1 and Vi−3 . 0 2 3 By Claim 9, Vi−2 is anti-complete to Wi and Wi+1 . By definition of Vi−2 , {vi−1 , vi−3 } 0 0 . Therefore, by applying and C\{vi−1 , vi−3 } is anti-complete to Vi−2 is complete to Vi−2 at most one bipartite complementation, we can remove all edges with one end-vertex 0 2 0 in Vi−2 and the other end-vertex outside Wi3 ∪ Wi+1 ∪ Vi−2 . 2 Thus we can apply three bipartite complementations to disconnect G[Wi3 ∪ Wi+1 ∪ 0 3 2 0 Vi−2 ] from the rest of the graph. By Claim 2, Wi , Wi+1 and Vi−2 are independent 2 2 0 sets. By Claim 3, Wi3 is complete to Wi+1 , so G[Wi3 ∪ Wi+1 ∪ Vi−2 ] is a curious graph. This completes the proof of Claim 11. By Claim 11, we may assume that G only contains the five vertices in the cycle C. We delete these vertices. To complete the proof, it remains to verify the number of operations applied and the number of obtained curious graphs. In Claim 1, we apply one bipartite complementation and obtain one curious graph. In Claim 10, for each i ∈ {1, . . . , 5}, we apply three bipartite complementations and obtain one curious graph. In Claim 11, for each i ∈ {1, . . . , 5}, we apply three bipartite complementations and obtain one curious graph. Finally, we apply five vertex deletions to delete the original cycle C from the graph. This leads to a total of five vertex deletions, 1 + (5 × 3) + (5 × 3) = 31 bipartite complementations and 1 + 5 + 5 = 11 obtained curious graphs. ⊓ ⊔ We now prove our second structural lemma. Lemma 16. Given any prime (K3 , P2 +P4 )-free graph G that contains an induced C5 , we can apply at most 2570 vertex deletions and at most 459 bipartite complementation operations to obtain a graph H that is the disjoint union of at most 19 (K3 , P2 +P4 )-free curious graphs and at most one 3-uniform graph. Proof. Let G be a prime (K3 , P2 + P4 )-free graph that contains an induced cycle C on the vertices v1 , . . . , v5 , listed in order along the cycle. To aid notation, for the remainder 17 of the proof subscripts on vertices and on sets should be interpreted modulo 5. We will show how to use vertex deletions and bipartite complementations to partition the graph into a disjoint union of curious graphs and 3-uniform graphs. At the end of the proof, we will verify the number of operations used. Since G is K3 -free, every vertex not on the cycle C has at most two neighbours on C and if it does have two neighbours on C, then these neighbours must be nonconsecutive vertices of the cycle. We may therefore partition the vertices in V (G)\V (C) into eleven sets as follows: – U is the set of vertices anti-complete to C, – for i ∈ {1, . . . , 5}, Wi is the set of vertices whose unique neighbour on C is vi and – for i ∈ {1, . . . , 5}, Vi is the set of vertices adjacent to vi−1 and vi+1 and nonadjacent to the rest of C. We start by showing how to use a bounded number of vertex deletions and bipartite complementations to disconnect a 3-uniform or bipartite induced subgraph containing U from the rest of the graph. This will enable us to assume that U = ∅. In aid of this, we prove a series of claims. Claim 1. For i ∈ {1, . . . , 5}, U ∪ Wi is an independent set. Indeed, if x, y ∈ U ∪ Wi are adjacent then G[x, y, vi+1 , vi+2 , vi+3 , vi+4 ] is a P2 + P4 , a contradiction. This completes the proof of Claim 1. Claim 2. For i ∈ {1, . . . , 5}, Vi−1 ∪ Wi ∪ Vi+1 is an independent set. Indeed, if x, y ∈ Vi−1 ∪ Wi ∪ Vi+1 are adjacent then G[x, y, vi ] is a K3 , a contradiction. This completes the proof of Claim 2. Claim 3. For i ∈ {1, . . . , 5}, G[U ∪ Vi ] is P4 -free. Indeed, if x1 , x2 , x3 , x4 ∈ U ∪ Vi induce a P4 then G[vi+2 , vi+3 , x1 , x2 , x3 , x4 ] would be a P2 + P4 , a contradiction. This completes the proof of Claim 3. Claim 4. For i ∈ {1, . . . , 5}, every vertex in Vi is either complete or anti-complete to Wi . Indeed, suppose for contradiction that x ∈ Vi has a neighbour y ∈ Wi and a non-neighbour y ′ ∈ Wi . By Claim 1, y is non-adjacent to y ′ . It follows that G[vi+2 , vi+3 , x, y, vi , y ′ ] is a P2 + P4 , a contradiction. This completes the proof of Claim 4. For i ∈ {1, . . . , 5}, let Vi∗ denoteSthe set of vertices in Vi that have neighbours in U and let Vi0 = Vi \ Vi∗ . Let V ∗ = Vi∗ . We will show how to use five bipartite complementations to separate G[U ∪ V ∗ ] from the rest of the graph. Note that by definition and by Claim 1, no vertex of U has a neighbour outside V ∗ . It is therefore sufficient to show how to disconnect V ∗ from the vertices outside U ∪ V ∗ . In fact, for vertices in Vi∗ we can prove a stronger version of Claim 4. Claim 5. For i ∈ {1, . . . , 5}, Vi∗ is anti-complete to Wi . Indeed, suppose for contradiction that x ∈ Vi∗ is adjacent to y ∈ Wi and let z ∈ U be a neighbour of x. By Claim 1, y is non-adjacent to z. If follows that G[vi+2 , vi+3 , vi , y, x, z] is a P2 + P4 , a contradiction. This completes the proof of Claim 5. Claim 6. For i ∈ {1, . . . , 5}, if x ∈ Vi∗ is adjacent to y ∈ U then every vertex z ∈ Vi−1 ∪ Vi+1 has exactly one neighbour in {x, y}. Indeed, suppose x ∈ Vi∗ , y ∈ U and z ∈ Vi−1 with x adjacent to y. If z is adjacent to both x and y then G[x, y, z] is a K3 , a contradiction. If z is non-adjacent to both x and y then G[x, y, vi , z, vi+3 , vi+2 ] is a P2 + P4 , a contradiction. Claim 6 follows by symmetry. 18 0 0 Claim 7. For i ∈ {1, . . . , 5}, Vi∗ is complete to Vi−1 ∪ Vi+1 . ∗ 0 0 This follows from Claim 6 by definition of Vi and Vi−1 ∪ Vi+1 . This completes the proof of Claim 7. Claim 8. For i ∈ {1, . . . , 5}, Vi∗ is complete to Wi−2 ∪ Wi+2 . Suppose, for contradiction, that x ∈ Vi∗ is non-adjacent to a vertex y ∈ Wi+2 and let z ∈ U be a neighbour of x. By Claim 1, y is non-adjacent to z. Therefore G[y, vi+2 , vi , vi−1 , x, z] is a P2 + P4 , a contradiction. Claim 8 follows by symmetry. 0 0 Claim 9. For i ∈ {1, . . . , 5}, Vi∗ is complete to Vi−1 ∪ Vi+1 ∪ Wi−2 ∪ Wi+2 ∪ {vi−1 , vi+1 } ∗ 0 0 and anti-complete to every vertex of G \ (V ∪ U ) that is not in Vi−1 ∪ Vi+1 ∪ Wi−2 ∪ Wi+2 ∪ {vi−1 , vi+1 }. Furthermore, no vertex in U has a neighbour in G \ (V ∗ ∪ U ). By definition of Vi∗ , every vertex in Vi∗ is complete to {vi−1 , vi+1 } and anti-complete 0 0 to C \ {vi−1 , vi+1 }. By Claim 2, Vi∗ is anti-complete to Wi−1 ∪ Wi+1 ∪ Vi−2 ∪ Vi+2 ∪ Vi0 . ∗ 0 0 ∗ By Claim 7, Vi is complete to Vi−1 ∪ Vi+1 . By Claim 5, Vi is anti-complete to Wi . By Claim 8, Vi∗ is complete to Wi−2 ∪ Wi+2 . By definition of U , every vertex in U is anti-complete to C. By Claim 1, U is anti-complete to Wj for all j ∈ {1, . . . , 5} and by definition of Vj0 , U is non-adjacent to Vj0 for all j ∈ {1, . . . , 5}. This completes the proof of Claim 9. Recall that at the start of the proof we assumed that the graph G is prime. By Claim 9 if for each i ∈ {1, . . . , 5} we apply a bipartite complementation between Vi∗ 0 0 and Vi−1 ∪ Vi+1 ∪ Wi−2 ∪ Wi+2 ∪ {vi−1 , vi+1 } then this would remove all edges between ∗ V ∪ U and V (G) \ (V ∗ ∪ U ) and leave all other edges unchanged. However, after doing this, the result might be a graph that is not prime. As such, we will not use Claim 9 to disconnect G[V ∗ ∪U ] from the rest of the graph at this stage, but wait until later in the proof, when we no longer require the property that G is prime. Next, we analyse the structure of G[V ∗ ∪ U ]. Note that V1 , . . . , V5 and U are independent sets by Claims 2 and 1. By Claim 3, this implies that every component of G[U ∪ Vi ] is a complete bipartite graph. Fix i ∈ {1, . . . , 5} and consider a component C ′ of G[U ∪Vi∗ ] containing at least one vertex of Vi∗ . Let T = V (C ′ )∩Vi∗ and S = V (C ′ )∩U . Note that since every vertex of Vi∗ contains at least one neighbour in U if follows that |S| ≥ 1. We prove a series of claims. Claim 10. |T | = 1. We first show that T is a module in G. Since T ⊆ Vi∗ , if a vertex v in G can distinguish two vertices in T then v ∈ V ∗ ∪ U by Claim 9. Since U and Vi∗ are independent sets by Claims 1 and 2, respectively and every component of G[U ∪ Vi∗ ] is a complete bipartite graph by Claim 3, no vertex of (U ∪ Vi∗ ) \ T can distinguish two vertices in T . By ∗ ∗ Claim 2, no vertex of Vi−2 ∪ Vi+2 can distinguish two vertices in T . Because G[S ∪ T ] ∗ ∗ is a complete bipartite graph, Claim 6 implies that every vertex of Vi−1 ∪ Vi+1 is either complete to S and anti-complete to T or anti-complete to S and complete to T , so no ∗ ∗ can distinguish two vertices in T . It follows that T is a module vertex of Vi−1 ∪ Vi+1 in G. Since G is prime, we conclude that |T | = 1. This completes the proof of Claim 10. Claim 11. If |Vi∗ | > 1, then |S| = 1. We show that if |Vi∗ | > 1 then S is a module in G. Suppose, for contradiction, that S is not a module in G. Since S ⊆ U , if a vertex v in G can distinguish two vertices in S then v ∈ V ∗ ∪ U by Claim 9. Since U and Vi∗ are independent sets by Claims 1 and 2, respectively and every component of G[U ∪ Vi∗ ] is a complete bipartite graph by Claim 3, no vertex of (U ∪ Vi∗ ) \ S can distinguish two vertices in S. Because G[S ∪ T ] ∗ ∗ is either ∪ Vi+1 is a complete bipartite graph, Claim 6 implies that every vertex of Vi−1 complete to S and anti-complete to T or anti-complete to S and complete to T , so ∗ ∗ no vertex of Vi−1 ∪ Vi+1 can distinguish two vertices in S. Therefore, there must be a vertex in Vi−2 ∪ Vi+2 that distinguishes two vertices of S. Without loss of generality, 19 assume that there is a vertex x ∈ Vi+2 that is adjacent to y ∈ S and non-adjacent to y ′ ∈ S. Let z be a vertex of T , i.e. a vertex of Vi∗ that is adjacent to both y and y ′ . Note that |Vi∗ | > 1 and any two vertices of Vi∗ belong to different connected components of G[Vi∗ ∪ U ] by Claim 10. This means that there must be a vertex z ′ ∈ Vi∗ \ {z} and it must have a neighbour y ′′ ∈ U \ S. Note that x is non-adjacent to z and z ′ by Claim 2. It follows that G[y ′ , z, vi+2 , vi+3 , x, y ′′ ] or G[y ′′ , z ′ , x, y, z, y ′ ] is a P2 + P4 if x is adjacent or non-adjacent to y ′′ , respectively. This contradiction implies that S is indeed a module. Since G is prime, we conclude that |S| = 1. This completes the proof of Claim 11. ∗ ∗ Claim 12. If |Vi∗ | > 1, then |Vi−2 | ≤ 1 and |Vi+2 | ≤ 1. ∗ ∗ Suppose, for contradiction, that Vi and Vi+2 each contain at least two vertices. Then by Claims 10 and 11, every connected component of G[Vi∗ ∪ U ] containing a vertex of Vi∗ consists of a single edge and since Vi∗ contains at least two vertices, there must be at least two such components. Similarly, there must be two such components in ∗ G[Vi+2 ∪ U ]. Therefore we can find x ∈ Vi∗ adjacent to y ∈ U and y ′ ∈ U \ {y} adjacent ∗ to z ∈ Vi+2 . By Claim 2, x is non-adjacent to z, so G[x, y, y ′ , z, vi+3 , vi+2 ] is a P2 + P4 , a contradiction. Claim 12 follows by symmetry. Claim 13. There is a set V ∗∗ ⊆ V ∗ with |V ∗∗ | ≤ 5 such that G[(V ∗ \ V ∗∗ ) ∪ U ] is either bipartite or 3-uniform. Let V ∗∗ be the union of all sets Vi∗ with i ∈ {1, . . . , 5} such that |Vi∗ | = 1. Then |V ∗∗ | ≤ 5. Consider the graph H = G[(V ∗ \ V ∗∗ ) ∪ U ]. For every i ∈ {1, . . . , 5} the set Vi∗ either contains zero or at least two vertices in H. If at most one set Vi∗ contains two vertices in H then by Claims 1 and 2, H is a bipartite graph and we are done. It remains to consider the case when two sets Vi∗ and Vj∗ contain two vertices in H. In this case, by Claim 12, vi and vj must be consecutive vertices of the cycle C and all other ∗ sets Vk∗ contain no vertices of H, so we may assume j = i+1 and H = G[Vi∗ ∪Vi+1 ∪U ]. We will show that this graph is 3-uniform. ∗ and U are independent sets. By Claims 10 and 11, By Claims 1 and 2, Vi∗ , Vi+1 ∗ ∗ every vertex of Vi ∪ Vi+1 has exactly one neighbour in U and every vertex of U has ∗ at most one neighbour in Vi∗ and at most one neighbour in Vi+1 . ∗ ∗ If x ∈ Vi and y ∈ Vi+1 have a common neighbour z ∈ U then x must be non∗ adjacent to y by Claim 6. If x ∈ Vi∗ is non-adjacent to y ∈ Vi+1 and z is the neighbour of x in U then y must adjacent to z by Claim 6. Therefore a vertex x ∈ Vi∗ is non∗ adjacent to a vertex y ∈ Vi+1 if and only if they have the same unique neighbour z ∈ U. ∗ , we obtain a graph Now applying a bipartite complementation between Vi∗ and Vi+1 every component of which is an induced subgraph of K3 , with at most one vertex of ∗ each component in each of Vi∗ , Vi+1 and U . Therefore H is a 3-uniform graph. (In terms of the definition of 3-uniform graphs, we have k = 3, Fk = K3 and K is the 3 × 3 matrix which has K1,2 = K2,1 = 1 and is zero everywhere else.) This completes the proof of Claim 13. Claims 9 and 13 would allow us to remove G[V ∗ ∪ U ] from the graph. As discussed earlier, we do not actually do so at this stage, so that we can preserve the property that G is prime. Informally, we may think of the vertices in V ∗ ∪ U as having been “dealt with” and we now concern ourselves with the remainder of the graph i.e. the vertices in C ∪ V10 ∪ · · · ∪ V50 ∪ W1 ∪ · · · ∪ W5 . First, we look at the sets Wi and the edges between these sets. 20 Claim 14. For i ∈ {1, . . . , 5}, Wi is either complete or anti-complete to Wi+1 . Suppose, for contradiction, that x ∈ Wi is adjacent to y ∈ Wi+1 and non-adjacent to y ′ ∈ Wi+1 . By Claim 1, y is non-adjacent to y ′ . Then G[vi−1 , vi−2 , x, y, vi+1 , y ′ ] is a P2 + P4 , a contradiction. By symmetry, this completes the proof of Claim 14. In fact, we can strengthen Claim 14 as follows. Claim 15. For i ∈ {1, . . . , 5}, Wi is either complete or anti-complete to Wi−1 ∪ Wi+1 . If Wi−1 or Wi+1 is empty then the claim follows by Claim 14. Now suppose, for contradiction, that x ∈ Wi has a neighbour y ∈ Wi−1 and a non-neighbour z ∈ Wi+1 . Then G[vi+2 , vi+3 , vi , x, y, z] or G[x, y, z, vi+1 , vi+2 , vi+3 ] is a P2 + P4 if y is adjacent or non-adjacent to z, respectively. This contradiction completes the proof of Claim 15. Claim 16. For i ∈ {1, . . . , 5}, G[Wi ∪ Wi+2 ] is P4 -free. If G[Wi ∪ Wi+2 ] contains a P4 , say on vertices w, x, y, z then G[vi+3 , vi+4 , w, x, y, z] is a P2 + P4 , a contradiction. This completes the proof of Claim 16. Since Wi and Wi+2 are independent sets by Claim 1, it follows from Claim 16 that every component of G[Wi ∪ Wi+2 ] is a complete bipartite graph. Suppose X and Y are independent sets such that every component of G[X ∪ Y ] is a complete bipartite graph. We say that a pair {X, Y } is non-simple if the number of non-trivial components (i.e. those containing at least one edge) in G[X ∪ Y ] is at least two. Otherwise, we will say that the pair {X, Y } is simple. Note that if {X, Y } is simple then all the edges in G[X ∪ Y ] can be removed by using at most one bipartite complementation. Claim 17. For i ∈ {1, . . . , 5}, if Wi , Wi+2 and Wi−2 are all non-empty and Wi+2 is anti-complete to Wi−2 , then Wi is complete to Wi+2 ∪ Wi−2 . Furthermore, in this case for all j ∈ {1, . . . , 5}, Wj is anti-complete to Wj+1 and complete to Wj+2 . Suppose x ∈ Wi , y ∈ Wi+2 and z ∈ Wi−2 and that Wi+2 is anti-complete to Wi−2 . Suppose, for contradiction, that x is non-adjacent to y. Then G[y, vi+2 , vi−1 , vi , x, z] or G[x, vi , y, vi+2 , vi−2 , z] is a P2 + P4 if x is adjacent or non-adjacent to z, respectively. This contradiction implies that x is adjacent to y. We conclude that Wi is complete to Wi+2 . By symmetry, Wi is also complete to Wi−2 . Therefore the first part of Claim 17 holds. Now suppose that there is a vertex w ∈ Wi+1 . Since Wi−2 is anti-complete to Wi+2 , Claim 15 implies that Wi+2 is anti-complete to Wi+1 and so Wi+1 is anti-complete to Wi . Applying the first part of Claim 17, we find that Wi+1 is complete to Wi−2 and if Wi−1 is non-empty then Wi+1 is complete to Wi−1 . Claim 17 now follows by symmetry. Claim 18. For i ∈ {1, . . . , 5}, if {Wi , Wi+2 } and {Wi−2 , Wi } are both non-simple, then Wi−2 is complete to Wi+2 and Wi−1 = Wi+1 = ∅. Suppose Wi , Wi+2 and Wi−2 are all non-empty and {Wi , Wi+2 } is non-simple. By Claim 17, Wi−2 is not anti-complete to Wi+2 , so by Claim 14, Wi−2 is complete to Wi+2 . Now suppose, for contradiction, that Wi+1 contains a vertex x. By Claim 15, since Wi−2 is complete to Wi+2 , it follows that Wi+2 is complete to Wi+1 and therefore Wi+1 is complete to Wi . Since {Wi , Wi+2 } is not simple, there must be adjacent vertices y ∈ Wi and z ∈ Wi+2 . Now G[x, y, z] is a K3 , a contradiction. Claim 18 follows by symmetry. Claim 19. G contains at most two non-simple pairs, and if it contains two, they must be as described in Claim 18. Suppose, for contradiction, that the claim is false. Then for some i ∈ {1, . . . , 5} both {Wi , Wi+2 } and {Wi−1 , Wi+1 } must be non-simple pairs. Then, by Claim 17, Wi cannot be anti-complete to Wi−1 , so by Claim 14, Wi is complete to Wi−1 . Then, by Claim 15, it follows that Wi is complete to Wi+1 . Since {Wi−1 , Wi+1 } is non-simple, 21 there must be adjacent vertices x ∈ Wi−1 and z ∈ Wi+1 . Choosing an arbitrary y ∈ Wi , we find that G[x, y, z] is a K3 , a contradiction. This completes the proof of Claim 19. If {Wi , Wi+2 } is a non-simple pair then let Wi+ be the set of vertices in Wi that have − neighbours in Wi+2 and let Wi+2 be the set of vertices in Wi+2 that have neighbours S − in Wi . If {Wi , Wi+2 } is a simple pair then set Wi+ = Wi+2 = ∅. Let W ∗ = Wi+ ∪ S − − Wi . Next, we look at the edges from the sets Wi+ and Wi+2 to the remainder of ∗ G \ (V ∪ U ) and show how we could apply bipartite complementations to remove these sets from the graph. Claim 20. For i ∈ {1, . . . , 5}, Wi+ ∩ Wi− = ∅. Indeed, suppose for contradiction that there is a vertex x ∈ Wi+ ∩ Wi− . Then {Wi , Wi+2 } and {Wi−2 , Wi } must be non-simple pairs and we can choose y ∈ Wi−2 and z ∈ Wi+2 that are adjacent to x. By Claim 18, Wi−2 is complete to Wi+2 . Then G[x, y, z] is a K3 , a contradiction. Claim 20 follows. Claim 21. For i ∈ {1, . . . , 5}, suppose {Wi , Wi+2 } is a non-simple pair. Then Vi+2 is complete to Wi+2 and anti-complete to Wi+ . Similarly, Vi is complete to Wi and − anti-complete to Wi+2 . Suppose, for contradiction, that x ∈ Vi+2 has a non-neighbour z ∈ Wi+2 . Since {Wi , Wi+2 } is non-simple, there is a vertex y ∈ Wi that is non-adjacent to z. Now G[vi+2 , z, x, y, vi , vi−1 ] or G[vi , y, z, vi+2 , vi+3 , x] is a P2 + P4 is x is adjacent or nonadjacent to y, respectively. This contradiction implies that Vi+2 is complete to Wi+2 . Now suppose, for contradiction, that x ∈ Vi+2 has a neighbour y ∈ Wi+ . Since y ∈ Wi+ it must have a neighbour z ∈ Wi+2 and by the previous paragraph, x must be adjacent to z. Now G[x, y, z] is a K3 , a contradiction. Therefore Vi+2 is anti-complete to Wi+ . Claim 21 follows by symmetry. Claim 22. For i ∈ {1, . . . , 5}, suppose {Wi , Wi+2 } is a non-simple pair. Then Vi+3 is anti-complete to Wi+2 and every vertex of Vi+3 is either anti-complete to Wi or complete to Wi+ . Similarly, Vi+4 is anti-complete to Wi and every vertex of Vi+4 is − either anti-complete to Wi+2 or complete to Wi+2 . By Claim 2, Wi+2 is anti-complete to Vi+3 . Suppose, for contradiction, that the claim does not hold for some vertex x ∈ Vi+3 . Then x must have a neighbour y ∈ Wi and a non-neighbour y ′ ∈ Wi+ and since {Wi , Wi+2 } is non-simple, we may assume that y and y ′ are in different components of G[Wi ∪ Wi+2 ]. Indeed, if y and y ′ are in the same component, then there must be a vertex y ′′ ∈ Wi+ in a different component of G[Wi ∪Wi+2 ] to y and y ′ ; in this case we replace y or y ′ by y ′′ if x is adjacent or nonadjacent to y ′′ , respectively. Since y ′ ∈ Wi+ it must have a neighbour z ′ ∈ Wi+2 and then z ′ is non-adjacent to y. Now G[y ′ , z ′ , y, x, vi+4 , vi+3 ] is a P2 + P4 , a contradiction. Claim 22 follows by symmetry. − Claim 23. For i ∈ {1, . . . , 5}, every vertex of V (G) \ (V ∗ ∪ U ∪ Wi+ ∪ Wi+2 ) is either + − complete or anti-complete to Wi and either complete or anti-complete to Wi+2 . + − We may assume that {Wi , Wi+2 } is non-simple, otherwise Wi and Wi+2 are empty and the claim holds trivially. By symmetry it is enough to show that every vertex − of V (G) \ (V ∗ ∪ U ∪ Wi+ ∪ Wi+2 ) is either complete or anti-complete to Wi+ . First + note that vi is complete to Wi and V (C) \ {vi } is anti-complete to Wi+ by definition 0 of Wi . By Claim 2, every vertex of Vi+1 is anti-complete to Wi+ . By Claim 21, every 0 is anti-complete to Wi+ . By vertex of Vi0 is complete to Wi+ and every vertex of Vi+2 0 0 Claim 22, every vertex of Vi+3 and Vi+4 is either complete or anti-complete to Wi+ . By Claim 1, every vertex of Wi \ Wi+ is anti-complete to Wi+ . By Claim 14, every vertex of Wi−1 and Wi+1 is either complete or anti-complete to Wi+ . By definition of Wi+ , 22 − every vertex of Wi+2 \ Wi+2 is anti-complete to Wi+ . Suppose, for contradiction, that a vertex x ∈ Wi−2 has a neighbour y ∈ Wi+ . Since {Wi , Wi+2 } is non-simple, Claim 17 implies that Wi−2 is not anti-complete to Wi+2 , so by Claim 14, Wi−2 is complete to Wi+2 . Since y ∈ Wi+ there must be a vertex z ∈ Vi+2 that is adjacent to y. Now G[x, y, z] is a K3 , a contradiction. Therefore Wi−2 is anti-complete to Wi+ . Claim 23 follows by symmetry. Claim 24. Every module M in G \ (U ∪ V ∗ ∪ W ∗ ) that is an independent set contains at most 512 vertices. Recall that G is prime, so it contains no non-trivial modules. Let H = G\(V ∗ ∪U ∪W ∗ ) and suppose, for contradiction, that H contains a module M on at least 513 vertices such that M is an independent set. By Claim 19 all but at most two sets of the form Wi+ are empty and all but at most two sets of the form Wi− are empty in G. By Claim 23, for all i ∈ {1, . . . , 5}, every vertex of M is either complete or anti-complete to Wi+ and Wi− in G. By Claim 9, for all i ∈ {1, . . . , 5}, every vertex of M is either complete or anti-complete to Vi∗ in G and every vertex of M is anti-complete to U in G. Therefore in G every vertex of M has one of at most 2(4+5) = 512 neighbourhoods in U ∪ V ∗ ∪ W ∗ . Choose two vertices x, y ∈ M that have the same neighbourhood in U ∪ V ∗ ∪ W ∗ . Since M is a module in H, x and y are not distinguished by any vertex of V (H) \ M . Since M is an independent set, x and y are not distinguished by any vertex of M \ {x, y}. Therefore {x, y} is a non-trivial module in G. This contradiction completes the proof of Claim 24. Claim 25. We may assume that U ∪ V ∗ ∪ W ∗ = ∅. By Claim 9, we may apply at most five bipartite complementations to separate G[U ∪ V ∗ ] from the rest of the graph. Now, by Claim 13, we can delete at most five vertices from G[U ∪ V ∗ ] to obtain a graph that is either bipartite (in which case it is curious) or 3-uniform. Suppose that G contains a non-simple pair {Wi , Wi+2 } and − let H = G \ (V ∗ ∪ U ∪ Wi+ ∪ Wi+2 ). Then Claim 23 shows that we can remove all + − edges between Wi ∪ Wi+2 and the vertices of H by applying at most two bipartite − complementations. Furthermore, G[Wi+ ∪ Wi+2 ] is a bipartite graph by Claim 1, so it is a curious (K3 , P2 + P4 )-free graph with one part of the 3-partition empty. By Claim 19, G contains at most two non-simple pairs and if it contains two then by Claim 20, Wi+ ∩ Wi− = ∅ for all i. Hence, Claim 23 implies that by applying at most four bipartite complementations, we can separate G[W ∗ ] from the rest of G \ (V ∗ ∪ U ). − We do this by separating the curious graph G[Wi+ ∪ Wi+2 ] for each non-simple pair {Wi , Wi+2 } in turn. We may therefore assume that U ∪ V ∗ ∪ W ∗ = ∅. This completes the proof of Claim 25. From now on, we assume that U = ∅ and {Wi , Wi+2 } is simple for all i ∈ {1, . . . , 5}. Note that in the proof of Claim 25 we edit the graph G in such a way that it may stop being prime. However, by Claim 24, G will still not contain any modules M that are independent sets on more than 512 vertices, and this property will suffice for the remainder of the proof. Claim 26. For i ∈ {1, . . . , 5}, in every set of 513 vertices in Vi , there are two that together dominate either Vi+1 or Vi−1 . Let X ⊆ Vi with |X| ≥ 513 and note that X is an independent set by Claim 2. By Claim 24, X cannot be a module, so there must be two vertices x, y ∈ X that are distinguished by a vertex z outside X. Without loss of generality assume that z is adjacent to x, but non-adjacent to y. By definition of Vi , vertices in the cycle C cannot distinguish two vertices in the same set Vi , so z ∈ / C. We will show that {x, y} dominates either Vi+1 or Vi−1 . Suppose, for contradiction, that x and y are both nonadjacent to a ∈ Vi−1 and both non-adjacent to b ∈ Vi+1 . By Claim 2 vertices in 23 Vi−2 ∪ Vi+2 ∪ Wi−1 ∪ Wi+1 ∪ (Vi \ {x, y}) are anti-complete to {x, y}. By symmetry, we may therefore assume that z ∈ Vi+1 ∪ Wi ∪ Wi+2 . In this case z is non-adjacent to vi+1 , vi−1 and vi−2 . Now z must be adjacent to a, otherwise G[a, vi−2 , z, x, vi+1 , y] would be a P2 + P4 . Now z cannot belong to Vi+1 ∪ Wi , otherwise G[a, vi , z] would be a K3 . Therefore z ∈ Wi+2 . Now z cannot be adjacent to b otherwise G[v, vi+2 , z] would be a K3 and by Claim 2, a is non-adjacent to b. It follows that G[y, vi−1 , a, z, vi+2 , b] is a P2 + P4 . This contradiction completes the proof of Claim 26. Claim 27. By deleting at most 512 vertices from each set Vi we may assume that each vertex of Vi dominates either Vi−1 or Vi+1 . Note that Vi−1 is anti-complete to Vi+1 by Claim 2. For each x ∈ Vi−1 and y ∈ Vi+1 , let Ax,y denote the set of vertices in Vi that are non-adjacent to both x and y. Consider an x ∈ Vi−1 and a y ∈ Vi+1 such that Ax,y is non-empty, say a ∈ Ax,y . (Note that if Ax,y is empty for all x and y then we are done.) If a vertex b ∈ Vi is adjacent to exactly one of x and y, say b is adjacent to x, then G[vi+2 , y, a, vi−1 , b, x] is a P2 + P4 , a contradiction. This contradiction shows that if Ax,y is non-empty then N (x) ∩ Vi = N (y) ∩ Vi = Vi \ Ax,y . Now choose x and y such that |Ax,y | is maximum. Suppose, for contradiction, that there is a vertex b ∈ Vi \ Ax,y with a non-neighbour x′ ∈ Vi−1 and a non-neighbour ′ ′ y ′ ∈ Vi+1 . Note that b must be adjacent to both x and y and b ∈ Ax ,y . Furthermore, ′ ′ since |Ax,y | is maximum, there must be a vertex a ∈ Ax,y \ Ax ,y , so a is adjacent to both x′ and y ′ . Now G[a, x′ , x, b, y, vi+2 ] is a P2 + P4 , a contradiction. It follows that every vertex in Vi \ Ax,y dominates either Vi−1 or Vi+1 . By Claim 26, |Ax,y | ≤ 512, so we delete the vertices of Ax,y . This completes the proof of Claim 27. By Claim 27, we may assume that every vertex of Vi dominates either Vi−1 or Vi+1 . Therefore, we can partition each set Vi into three (possibly empty) subsets as follows: – Vi0 the set of vertices in Vi that dominate both Vi−1 and Vi+1 , – Vi− the set of vertices in Vi \ Vi0 that dominate Vi−1 (and so have non-neighbours in Vi+1 ), – Vi+ the set of vertices in Vi \ Vi0 that dominate Vi+1 (and so have non-neighbours in Vi−1 ). By definition of this partition, if x ∈ Vi is non-adjacent to y ∈ Vi+1 , then x ∈ Vi− and + + y ∈ Vi+1 . Moreover, every vertex of Vi− has a non-neighbour in Vi+1 and vice versa. Thus, the vertices of V1 ∪ · · · ∪ V5 are partitioned into 15 subsets (some or all of which − + 0 may be empty). Note that for i ∈ {1, . . . , 5} the sets Vi0 , Vi− , Vi+ , Vi+2 , Vi+2 and Vi+2 0 are pairwise anti-complete by Claim 2. Furthermore, for i ∈ {1, . . . , 5}, Vi and Vi+ − + − 0 are complete to Vi+1 , Vi+1 and Vi+1 , and Vi+1 is complete to Vi0 and Vi− by definition. Therefore nearly every pair of these subsets is either complete or anti-complete to each + other. The only possible exceptions are the five disjoint pairs of the form {Vi− , Vi+1 }. Recall that for two independent sets of vertices X and Y such that G[X ∪ Y ] is P4 -free, the components of G[X ∪ Y ] are complete bipartite graphs and if G[X ∪ Y ] contains at most one non-trivial component, we say that the pair {X, Y } is simple and otherwise it is non-simple. Recall that if {X, Y } is simple then we can remove all edges between X and Y by applying at most one bipartite complementation. By Claim 25 every pair {Wi , Wj } is simple and for the fifteen sets considered in the previous paragraph, the only pairs of them that can be non-simple are the ones of the + form {Vi− , Vi+1 }. Next, we will analyse the edges between sets of the form Wi and sets of the form Vj (and their subsets Vj0 , Vj− and Vj+ ) for i, j ∈ {1, . . . , 5}. We will then use bipartite complementations to partition the graph into induced subgraphs that are curious. First, 24 recall that Wi is anti-complete to Vi−1 and Vi+1 by Claim 2. Also, by Claim 4, {Wi , Vi } is simple. Therefore, the only sets Vj to which Wi can have a non-simple connection are Vi+2 and Vi+3 . Claim 28. For i ∈ {1, . . . , 5}, if x ∈ Wi , y ∈ Vi+2 and z ∈ Vi+3 then G[x, y, z] is not a 3P1 . Indeed, if x ∈ Wi , y ∈ Vi+2 and z ∈ Vi+3 and G[x, y, z] is a 3P1 then G[x, vi , y, vi+3 , vi+2 , z] is a P2 + P4 , a contradiction. This completes the proof of Claim 28. Claim 29. For i ∈ {1, . . . , 5}: + 0 (i) If x ∈ Wi has a neighbour in Vi+2 ∪ Vi+2 , then x is anti-complete to Vi+3 and − complete to Vi+2 . − 0 (ii) If x ∈ Wi has a neighbour in Vi+3 ∪ Vi+3 , then x is anti-complete to Vi+2 and + complete to Vi+3 . + 0 Suppose x ∈ Wi has a neighbour y ∈ Vi+2 ∪ Vi+2 . If z ∈ Vi+3 then y is adjacent to z, so x must be non-adjacent to z, otherwise G[x, y, z] would be a K3 . Therefore x is − anti-complete to Vi+3 . If y ′ ∈ Vi+2 then y ′ has a non-neighbour z ′ ∈ Vi+3 . Note that z ′ is non-adjacent to x. Now x must be adjacent to y ′ , otherwise G[x, y ′ , z ′ ] would be − a 3P1 , contradicting Claim 28. It follows that x is complete to Vi+2 . Claim 29 follows by symmetry. By Claim 29 we can partition Wi into three (possibly empty) subsets as follows: + 0 ∪ Vi+2 (and are therefore – Wi2 the set of vertices in Wi that have neighbours in Vi+2 − anti-complete to Vi+3 and complete to Vi+2 ), − 0 – Wi3 the set of vertices in Wi that have neighbours in Vi+3 ∪ Vi+3 (and are therefore + anti-complete to Vi+2 and complete to Vi+3 ) and – Wi0 the set of vertices in Wi \ (Wi2 ∪ Wi3 ) (which are therefore anti-complete to + − 0 0 Vi+2 ∪ Vi+2 ∪ Vi+3 ∪ Vi+3 ). Recall that the only sets Vj to which Wi can have a non-simple connection are Vi+2 and Vi+3 . Therefore, by Claim 29, for i, j ∈ {1, . . . , 5} if a set in {Wi2 , Wi3 , Wi0 } is nonsimple to a set in {Vj− , Vj+ , Vj0 } then it must be one of the following pairs: – – – – – – 0 {Wi2 , Vi+2 }, + 2 {Wi , Vi+2 }, 0 {Wi3 , Vi+3 }, − 3 {Wi , Vi+3 }, − {Wi0 , Vi+2 } or + {Wi0 , Vi+3 }. Recall among pairs of sets of the form Vj− , Vj+ , Vj0 , Wj2 , Wj3 , Wj0 the only possible + other non-simple pairs are the ones of the form {Vi− , Vi+1 } (see also Fig. 4). 2 3 Notice that Wi and Wi are disjoint by Claim 29. This partition allows us to distinguish two kinds of induced subgraphs of G. 2 1. If for some i ∈ {1, . . . , 5} Wi3 and Wi+1 are both non-empty then we form a 1 3 2 0 2 subgraph of the first kind Hi = G[Wi ∪ Wi+1 ∪ Vi+3 ]. (If Wi3 or Wi+1 is empty, 1 then we let Hi be the empty graph (∅, ∅).) 25 V4+ V3− W53 W22 W10 W13 W12 V40 V30 V3+ V4− W50 W20 V5+ V2− W43 W32 V20 V50 W23 W52 W30 W40 V5− V2+ V10 V1+ V1− W42 W33 Fig. 4. The connections between pairs of sets of the form Vj− , Vj+ , Vj0 , Wj2 , Wj3 and Wj0 . An edge is shown between two such sets if it is possible for this pair of sets to be non-simple. If an edge is not shown between two sets, then these sets form a simple pair and therefore all edges between them can be removed by using at most one bipartite complementation. 26 − + 2. For i ∈ {1, . . . , 5} we let Hi2 be the graph induced on G by Wi0 ∪ Vi+2 ∪ Vi+3 . 1 3 2 If Hi−1 is empty, but Wi−1 is non-empty then Wi = ∅. In this case we also add 3 0 2 Wi−1 ∪ Vi+2 to Hi2 . Similarly, if Hi1 is empty, but Wi+1 is non-empty then Wi3 = ∅. 2 0 2 In this case we also add Wi+1 ∪ Vi+3 to Hi . We say that Hi2 is a graph of the second kind. In the next two claims, we show how to disconnect both kinds of graph Hij from the rest of the graph. Claim 30. For i ∈ {1, . . . , 5} the graph Hi1 can be separated from the rest of the graph using finitely many bipartite complementations. We will show that for every set Vj− , Vj+ , Vj0 , Wj2 , Wj3 , Wj0 that is not in {Wi3 , 2 0 2 0 Wi+1 , Vi+3 }, this set is simple to each of the three sets in {Wi3 , Wi+1 , Vi+3 }, in which 1 case we can separate Hi by applying at most one bipartite complementation between every pair of such sets. Taking into account Claim 29, recall that Wi3 is simple to every − + 0 2 0 0 set except Vi+3 and Vi+3 , Wi+1 is simple to every set except Vi+3 and Vi+3 and Vi+3 is 3 2 3 simple to every set except Wi and Wi+1 . Thus, it suffices to show that Wi is simple − + 2 2 to Vi+3 and Wi+1 is simple to Vi+3 . By symmetry, we need only show that Wi+1 is + + 2 simple to Vi+3 . If Wi+1 is anti-complete to Vi+3 then we are done. Otherwise, choose + 2 that has a neighbour y ∈ Vi+3 . Note that Wi3 is non-empty, by a vertex x ∈ Wi+1 + 1 assumption (otherwise Hi is empty and we are done). By Claim 29, Vi+3 is complete 3 3 to Wi . Therefore x must be anti-complete to Wi , otherwise for z ∈ Wi3 , G[x, y, z] + would be a K3 , a contradiction. We will show that x is complete to Vi+3 . Suppose, for + + − ′ contradiction, that x has a non-neighbour y ∈ Vi+3 . By definition of Vi+3 and Vi+2 , − ′ ′ 3 y must have a non-neighbour z ∈ Vi+2 . Let u ∈ Wi and note that u is non-adjacent to z ′ and adjacent to y ′ by Claim 29. Then G[u, y ′ , x, vi+1 , z ′ , vi+3 ] is a P2 + P4 . This + 2 contradiction shows that if x ∈ Wi+1 has a neighbour in Vi+3 then x is complete + + − 2 3 to Vi+3 . Therefore, {Wi+1 , Vi+3 } is simple. Similarly, {Wi , Vi+3 } is simple. Applying 2 0 bipartite complementations between Wi3 &{vi }, Wi+1 &{vi+1 } and Vi+3 &{vi+2 , vi+4 } 1 removes all edges between the vertices of Hi and the vertices of the cycle C. Every set 2 0 Vj− , Vj+ , Vj0 , Wj2 , Wj3 , Wj0 for j ∈ {1, . . . , 5} that is not in {Wi3 , Wi+1 , Vi+3 } is simple 0 2 3 to every set in {Wi , Wi+1 , Vi+3 }, so applying at most one bipartite complementation between each such pair of sets, we can remove all remaining edges from Hi1 to the rest of the graph. This completes the proof of Claim 30. Claim 31. For i ∈ {1, . . . , 5} the graph Hi2 can be separated from the rest of the graph using finitely many bipartite complementations. − + The graph Hi2 contains Wi0 ∪Vi+2 ∪Vi+3 . Taking into account Claim 29, recall that the − + − 0 set Wi can only be non-simple to Vi+2 or Vi+3 , the set Vi+2 can only be non-simple + + − 0 3 2 to Vi+3 , Wi and Wi−1 , and the set Vi+3 can only be non-simple to Vi+2 , Wi0 and Wi+1 . − 3 Thus we only need to concern ourselves with the case where the pair {Vi+2 , Wi−1 } or + 2 the pair {Vi+3 , Wi+1 } is not simple. By symmetry, it is enough to consider the second 2 of these cases. If Wi+1 is in the graph Hi1 then we are done by Claim 30. Therefore we 2 may assume that Wi+1 is non-empty, but not contained in the graph Hi1 , so Wi3 = ∅. + 0 2 0 2 , and Vi+3 can only be non-simple to Vi+3 to Hi2 . Now Wi+1 ∪ Vi+3 Thus we add Wi+1 2 0 2 both of which are in Hi and Vi+3 can only be non-simple to Wi+1 , which is in Hi2 and Wi3 , which is empty. By symmetry, it follows that we can use a bounded number of bipartite complementations to disconnect Hi2 from all sets of the form Vj− , Vj+ , Vj0 , Wj2 , Wj3 , Wj0 outside Hi2 . Finally, applying a bipartite complementation between each of the sets in Hi2 and their neighbourhood in the cycle C disconnects Hi2 from the remainder of the graph. This completes the proof of Claim 31. 27 In the next two claims, we show graphs of the first kind are curious and graphs of the second kind can be partitioned into two curious induced subgraphs by applying at most two bipartite complementations. Claim 32. For i ∈ {1, . . . , 5}, the graph Hi1 is bipartite and therefore curious. 2 0 The sets Wi3 , Wi+1 and Vi+3 are independent by Claim 2. By Claim 14, Wi3 is complete 2 2 2 0 or anti-complete to Wi+1 . If Wi3 is anti-complete to Wi+1 , then Wi3 ∪ Wi+1 and Vi+3 1 3 2 are independent sets, so Hi is bipartite. If Wi is complete to Wi+1 , then every vertex 0 2 of Vi+3 has a neighbour in at most one of Wi3 and Wi+1 (since G is K3 -free), and 1 hence Hi is again bipartite. Since bipartite graphs are curious graphs where one of the partition classes is empty, this completes the proof of Claim 32. Claim 33. For i ∈ {1, . . . , 5}, we can apply at most two bipartite complementation operations to Hi2 to obtain the disjoint union of at most two curious induced subgraphs of Hi2 . − + The sets Wi0 , Vi+2 and Vi+3 are independent by Claim 2. If Hi2 only contains the − + 0 vertices in Wi ∪ Vi+2 ∪ Vi+3 then it is curious by Claim 28. We may therefore assume + 3 2 3 0 that Wi−1 and/or Wi+1 belong to Hi2 . Note that X = (Wi−1 ∪ Vi+3 ∪ Vi+3 ) ∩ V (Hi2 ) − 2 0 2 and Y = (Wi+1 ∪ Vi+2 ∪ Vi+2 ) ∩ V (Hi ) are independent sets by Claim 2. Therefore if Wi0 = ∅ then Hi2 is bipartite, so it is a curious graph, where one part of the 3partition is empty. If Wi0 is not empty, then it is either complete or anti-complete to 3 2 Wi−1 ∪ Wi+1 by Claim 15. 2 3 0 then taking X and Y as above, and setting ∪ Wi+1 If Wi is complete to Wi−1 0 2 Z = Wi , we find that Hi is a curious graph, with partition X, Y, Z. Indeed, suppose for contradiction that there are vertices x ∈ X, y ∈ Y and z ∈ Z with G[x, y, z] 2 3 . Therefore we and y ∈ / Wi+1 / Wi−1 forming a 3P1 . Since z ∈ Wi0 , it follows that x ∈ have x ∈ Vi+2 , y ∈ Vi+3 and z ∈ Wi such that G[x, y, z] is a 3P1 , which contradicts 3 2 Claim 28. This contradiction shows that if Wi0 is complete to Wi−1 ∪ Wi+1 then Hi2 is indeed a curious graph. 3 2 Finally, suppose that Wi0 is anti-complete to Wi−1 ∪ Wi+1 . By Claim 25, we may 3 2 3 2 assume that Wi−1 is simple to Wi+1 , so G[Wi−1 ∪Wi+1 ] contains at most one non-trivial component, and if such a component exists, it must be a complete bipartite graph by 3∗ 2∗ 3 2 Claim 16. Let Wi−1 (resp. Wi+1 ) be the set of vertices in Wi−1 (resp. Wi+1 ) that have 2∗ 3∗ 3 2 neighbours in Wi+1 (resp. Wi−1 ). Since G[Wi−1 ∪ Wi+1 ] is a complete bipartite graph, 3∗ 2∗ it follows that Wi−1 is complete to Wi+1 . 3∗ 2∗ We will show that if Wi−1 and Wi+1 are both in Hi2 , then we can disconnect 2 2∗ 3∗ 2 Hi [Wi−1 ∪ Wi+1 ] from the rest of Hi by applying at most two bipartite complemen3∗ 2∗ tations. Indeed, suppose x ∈ Wi−1 has a neighbour y ∈ Wi+1 and let u ∈ Wi0 . By − 3 0 ∪ Vi+2 that is adjacent to x. Then y must there is a vertex z ∈ Vi+2 definition of Wi−1 be non-adjacent to z by Claim 2. If z is non-adjacent to u then G[vi , u, y, x, z, vi−2 ] is a P2 + P4 , a contradiction. Therefore z is adjacent to u. By definition of Wi0 , it follows − 0 3∗ 0 that z ∈ / Vi+2 and so z ∈ Vi+2 . We conclude that Wi−1 is anti-complete to Vi+2 , and by − 2∗ 0 symmetry, Wi+1 is anti-complete to Vi+3 . Now suppose that there is a vertex z ′ ∈ Vi+2 ′ ′ ′ such that x is non-adjacent to z . If z is adjacent to u then G[x, vi−1 , u, z , vi+1 , vi+2 ] is a P2 + P4 . Therefore z ′ must be non-adjacent to u. We conclude that every ver− is adjacent to x if and only if it is adjacent to u. Since x was chosen tex in Vi+2 − 3∗ is either complete or antifrom Wi−1 arbitrarily, this means that every vertex in Vi+2 3∗ complete to Wi−1 . Therefore, applying at most one bipartite complementation, we − 3∗ 0 3∗ . is anti-complete to Wi−1 Recall that Vi+2 can remove all edges from Vi+2 to Wi−1 3∗ 0 2∗ By assumption, Wi−1 is anti-complete to Wi , complete to Wi+1 and anti-complete 2 2∗ 3∗ to Wi+1 \ Wi+1 . By Claim 2, Wi−1 is anti-complete to Vi+3 . Therefore, applying at 3∗ most one bipartite complementation, we can remove all edges between vertices in Wi−1 28 3∗ 2∗ and vertices in V (Hi2 ) \ (Wi−1 ∪ Wi+1 ). By symmetry, applying at most one bipartite 2∗ complementation, we can remove all edges between vertices in Wi+1 and vertices in 2 3∗ 2∗ 3∗ 2∗ V (Hi ) \ (Wi−1 ∪ Wi+1 ). This disconnects G[Wi−1 ∪ Wi+1 ] from the rest of Hi2 . Since 3∗ 2∗ 3 G[Wi−1 ∪ Wi+1 ] is a bipartite graph, it is curious. We may therefore assume that Wi−1 2 is anti-complete to Wi+1 . + − 0 0 ∪ Vi+3 ) ∩ V (Hi2 ), Y ′ = (Vi+2 ∪ Vi+2 ) ∩ V (Hi2 ) and Z ′ = We set X ′ = (Vi+3 0 3 2 2 ′ ′ ′ (Wi ∪ Wi−1 ∪ Wi+1 ) ∩ V (Hi ) and note that X , Y and Z are independent sets. Now suppose, for contradiction, that Hi2 is not curious with respect to the partition (X ′ , Y ′ , Z ′ ). Then there must be vertices x ∈ X ′ , y ∈ Y ′ and z ∈ Z ′ such that G[x, y, z] + − is a 3P1 . Since x and y are non-adjacent, it follows that x ∈ Vi+3 and y ∈ Vi+2 . By 0 3 Claim 28, z ∈ / Wi . By symmetry, we may assume z ∈ Wi−1 . Let w be an arbitrary vertex of Wi0 . Then w must be non-adjacent to y, otherwise G[vi−1 , z, w, y, vi+1 , vi+2 ] is a P2 +P4 . By Claim 28, w must therefore be adjacent to x. Then G[vi+1 , y, w, x, vi−1 , z] is a P2 + P4 , a contradiction. It follows that Hi2 is indeed a curious graph with respect to the partition (X ′ , Y ′ , Z ′ ). This completes the proof of Claim 33. Applying Claims 30, 31, 32 and 33, we remove all vertices of Vi and Wi except maybe 0 0 for some sets Vi0 . By definition, each set Vi0 is complete to Vi−1 ∪ Vi+1 and by Claim 2 0 0 it is anti-complete to Vi−2 ∪ Vi+2 . We delete the five vertices of the original cycle C and then apply a bipartite complementation between any pair of non-empty sets Vi0 0 and Vi+1 . This will yield an independent set, which is a curious (K3 , P2 +P4 )-free graph where two parts of the partition are empty. It remains only to count the number of operations applied and the number of obtained curious and 3-uniform graphs. As explained in the proof of Claim 25, by Claim 9, we apply at most five bipartite complementations to separate G[U ∪ V ∗ ] from the rest of the graph. We then delete at most five vertices from G[U ∪ V ∗ ] to obtain a graph that is either curious or 3-uniform. Next, as also explained in the proof of Claim 25, we can separate G[W ∗ ] from the rest of G \ (V ∗ ∪ U ) by applying 2 × 2 = 4 bipartite complementations and obtain at most two curious graphs. Next, in Claim 27, for each i ∈ {1, . . . , 5}, we delete at most 512 vertices. Deleting the five vertices of the original cycle C yields five more vertex deletions. Recall that for i ∈ {1, . . . , 5}, we partitioned Wi into Wi0 , Wi2 and Wi3 and partitioned Vi into Vi0 , Vi− and Vi+ , yielding 30 subsets of vertices altogether. In Claims 30 and 31, we apply bipartite complementations between certain pairs of these subsets to separate the graphs of both kinds. Thus, in these claims we apply at  most 30 = 435 bipartite complementations. For each i ∈ {1, . . . , 5}, Claim 32 says 2 that Hi1 is a curious graph. In Claim 33, for each i ∈ {1, . . . , 5} we apply at most two bipartite complementations and obtain at most two curious graphs. Finally, we 0 apply at most five bipartite complementations between non-empty sets Vi0 and Vi+1 , yielding at most one curious graph. This gives a total of 5 + 4 + 435 + (5 × 2) + 5 = 459 bipartite complementations, 5 + (5 × 512) + 5 = 2570 vertex deletions yielding at most 1 + 2 + (5 × 1) + (5 × 2) + 1 = 19 curious graphs and at most one 3-uniform graph. This completes the proof. ⊓ ⊔ We can now prove our main result. Recall that it was already known [8] that the class of (K3 , P1 + P5 )-free graphs has bounded clique-width, but that it was not known that this class is well-quasi-ordered. Theorem 5. For H ∈ {P2 + P4 , P1 + P5 } the class of (K3 , H)-free graphs is wellquasi-ordered by the labelled induced subgraph relation and has bounded clique-width. Proof. Let H ∈ {P2 + P4 , P1 + P5 }. By Lemmas 2 and 5, we need only consider prime graphs in this class. Recall that a prime graph on at least three vertices cannot contain two vertices that are false twins, otherwise these two vertices would form a non-trivial 29 module. Therefore, by Lemma 1, and since H ⊆i S1,2,3 , the classes of prime (K3 , H)free graphs containing an induced C7 is precisely the graph C7 . We may therefore restrict ourselves to C7 -free graphs. Since the graphs in the class are H-free, it follows they contain no induced cycles on eight or more vertices. We may therefore restrict ourselves to prime (K3 , C7 , H)free graphs that either contain an induced C5 or are bipartite. By Lemmas 15 or 16, given any prime (K3 , C7 , H)-free that contains an induced C5 , we can apply at most a constant number of vertex deletions and bipartite complementation operations to obtain a graph that is a disjoint union of (K3 , H)-free curious graphs and (in the H = P2 + P4 case) 3-uniform graphs. By Lemmas 4, 8 and 9, Facts 1 and 3, and Theorem 4, it is sufficient to only consider bipartite (K3 , C7 , H)-free graphs. These graphs are H-free bipartite graphs. Furthermore, they form a subclass of the class of (P7 , S1,2,3 )-free bipartite graphs, since H ⊆i P7 , S1,2,3 . The class of (P7 , S1,2,3 )-free bipartite graphs is well-quasi-ordered by the labelled induced subgraph relation by Lemma 6 and has bounded clique-width by Theorem 3. This completes the proof. ⊓ ⊔ 5 State-of-the-Art Summaries for Bigenic Graph Classes The class of (P1 + P4 , P2 + P3 )-free graphs is the only bigenic graph class left for which Conjecture 1 still needs to be verified; see [10] for details of this claim (which can also be deduced from Theorems 6 and 7 below). Open Problem 1 Is Conjecture 1 true for the class of (H1 , H2 )-free graphs when H1 = P1 + P4 and H2 = P2 + P3 ? The class of (P1 + P4 , P2 +P3 )-free graphs is (up to an equivalence relation3 ) one of the six remaining bigenic graph classes for which well-quasi-orderability is still open and one of the six bigenic graph classes for which boundedness of clique-width is still open. We refer to [10] for details of the first claim and to [3] for details of the second claim. To make our paper self-contained we recall two theorems from these papers, which sum up our current knowledge on bigenic graph classes (including the new results of this paper). We also include the lists of corresponding open cases below. Here is the state-of-the-art summary for well-quasi-orderability for bigenic graph classes. Theorem 6. Let G be a class of graphs defined by two forbidden induced subgraphs. Then: 1. G is well-quasi-ordered by the labelled induced subgraph relation if it is equivalent to a class of (H1 , H2 )-free graphs such that one of the following holds: (i) H1 or H2 ⊆i P4 ; (ii) H1 = sP1 and H2 = Kt for some s, t ≥ 1; (iii) H1 ⊆i P1 + P3 and H2 ⊆i P1 + P5 , P2 + P4 or P6 ; (iv) H1 ⊆i 2P1 + P2 and H2 ⊆i P2 + P3 or P5 . 3 Given four graphs H1 , H2 , H3 , H4 , the classes of (H1 , H2 )-free graphs and (H3 , H4 )-free graphs are said to be equivalent if the unordered pair H3 , H4 can be obtained from the unordered pair H1 , H2 by some combination of the operations (i) complementing both graphs in the pair and (ii) if one of the graphs in the pair is 3P1 , replacing it with P1 + P3 or vice versa. If two classes are equivalent, then one of them is well-quasi-ordered by the induced subgraph relation if and only if the other one is [21]. Similarly, if two classes are equivalent, then one of them has bounded clique-width if and only if the other one does [12]. 30 2. G is not well-quasi-ordered by the induced subgraph relation if it is equivalent to a class of (H1 , H2 )-free graphs such that one of the following holds: (i) neither H1 nor H2 is a linear forest; (ii) H1 ⊇i 3P1 and H2 ⊇i 3P1 + P2 , 3P2 or 2P3 ; (iii) H1 ⊇i 2P2 and H2 ⊇i 4P1 or 2P2 ; (iv) H1 ⊇i 2P1 + P2 and H2 ⊇i 4P1 , P2 + P4 or P6 ; (v) H1 ⊇i P1 + P4 and H2 ⊇i P1 + 2P2 . Theorem 6 does not cover six cases, which are all still open. Open Problem 2 Is the class of (H1 , H2 )-free graphs well-quasi-ordered by the induced subgraph relation when: (i) H1 = 2P1 + P2 and H2 ∈ {P1 + 2P2 , P1 + P4 }; (ii) H1 = P1 + P4 and H2 ∈ {P1 + P4 , 2P2 , P2 + P3 , P5 }. Here is the state-of-the-art summary of the boundedness of clique-width for bigenic graph classes. Theorem 7. Let G be a class of graphs defined by two forbidden induced subgraphs. Then: 1. G has bounded clique-width if it is equivalent to a class of (H1 , H2 )-free graphs such that one of the following holds: (i) H1 or H2 ⊆i P4 ; (ii) H1 = sP1 and H2 = Kt for some s, t ≥ 1; (iii) H1 ⊆i P1 + P3 and H2 ⊆i K1,3 + 3P1 , K1,3 + P2 , P1 + P2 + P3 , P1 + P5 , P1 + S1,1,2 , P2 + P4 , P6 , S1,1,3 or S1,2,2 ; (iv) H1 ⊆i 2P1 + P2 and H2 ⊆i P1 + 2P2 , 3P1 + P2 or P2 + P3 ; (v) H1 ⊆i P1 + P4 and H2 ⊆i P1 + P4 or P5 ; (vi) H1 , H2 ⊆i K1,3 ; (vii) H1 , H2 ⊆i 2P1 + P3 . 2. G has unbounded clique-width if it is equivalent to a class of (H1 , H2 )-free graphs such that one of the following holds: (i) H1 6∈ S and H2 6∈ S; (ii) H1 ∈ / S and H2 6∈ S; (iii) H1 ⊇i K1,3 or 2P2 and H2 ⊇i 4P1 or 2P2 ; (iv) H1 ⊇i 2P1 + P2 and H2 ⊇i K1,3 , 5P1 , P2 + P4 or P6 ; (v) H1 ⊇i 3P1 and H2 ⊇i 2P1 + 2P2 , 2P1 + P4 , 4P1 + P2 , 3P2 or 2P3 ; (vi) H1 ⊇i 4P1 and H2 ⊇i P1 + P4 or 3P1 + P2 . Theorem 7 does not cover six cases, which are all still open. Open Problem 3 Does the class of (H1 , H2 )-free graphs have bounded or unbounded clique-width when: (i) H1 = 3P1 and H2 ∈ {P1 + S1,1,3 , S1,2,3 }; (ii) H1 = 2P1 + P2 and H2 ∈ {P1 + P2 + P3 , P1 + P5 }; (iii) H1 = P1 + P4 and H2 ∈ {P1 + 2P2 , P2 + P3 }. 31 References 1. P. Allen, V. V. Lozin, and M. Rao. Clique-width and the speed of hereditary properties. The Electronic Journal of Combinatorics, 16(1):Research Paper 35, pp. 11, 2009. 2. A. Atminas and V. V. Lozin. Labelled induced subgraphs and well-quasi-ordering. Order, 32(3):313–328, 2015. 3. A. Blanché, K. K. Dabrowski, M. Johnson, V. V. Lozin, D. Paulusma, and V. Zamaraev. Clique-width for graph classes closed under complementation. Proc. MFCS 2017, LIPIcs, 83:73:1–73:14, 2017. 4. R. Brignall, M. Engen, and V. Vatter. A counterexample regarding labelled well-quasiordering. arXiv, abs/1709.10042, 2017. 5. B. Courcelle. Clique-width and edge contraction. Information Processing Letters, 114(1– 2):42–44, 2014. 6. B. Courcelle, J. A. Makowsky, and U. Rotics. Linear time solvable optimization problems on graphs of bounded clique-width. Theory of Computing Systems, 33(2):125–150, 2000. 7. B. Courcelle and S. Olariu. Upper bounds to the clique width of graphs. Discrete Applied Mathematics, 101(1–3):77–114, 2000. 8. K. K. Dabrowski, F. Dross, and D. Paulusma. Colouring diamond-free graphs. Journal of Computer and System Sciences, 89:410–431, 2017. 9. K. K. Dabrowski, V. V. Lozin, and D. Paulusma. Clique-width and well-quasi ordering of triangle-free graph classes. Proc. WG 2017, LNCS, 10520:220–233, 2017. 10. K. K. Dabrowski, V. V. Lozin, and D. Paulusma. Well-quasi-ordering versus clique-width: New results on bigenic classes. Order, (in press), DOI:10.1007/s11083-017-9430-7. 11. K. K. Dabrowski and D. Paulusma. Classifying the clique-width of H-free bipartite graphs. Discrete Applied Mathematics, 200:43–51, 2016. 12. K. K. Dabrowski and D. Paulusma. Clique-width of graph classes defined by two forbidden induced subgraphs. The Computer Journal, 59(5):650–666, 2016. 13. J. Daligault, M. Rao, and S. Thomassé. Well-quasi-order of relabel functions. Order, 27(3):301–315, 2010. 14. P. Damaschke. Induced subgraphs and well-quasi-ordering. Journal of Graph Theory, 14(4):427–435, 1990. 15. G. Ding. Subgraphs and well-quasi-ordering. Journal of Graph Theory, 16(5):489–502, 1992. 16. W. Espelage, F. Gurski, and E. Wanke. How to solve NP-hard graph problems on cliquewidth bounded graphs in polynomial time. Proc. WG 2001, LNCS, 2204:117–128, 2001. 17. G. Higman. Ordering by divisibility in abstract algebras. Proceedings of the London Mathematical Society, s3–2(1):326–336, 1952. 18. M. Kamiński, V. V. Lozin, and M. Milanič. Recent developments on graphs of bounded clique-width. Discrete Applied Mathematics, 157(12):2747–2761, 2009. 19. D. Kobler and U. Rotics. Edge dominating set and colorings on graphs with fixed cliquewidth. Discrete Applied Mathematics, 126(2–3):197–221, 2003. 20. N. Korpelainen and V. V. Lozin. Bipartite induced subgraphs and well-quasi-ordering. Journal of Graph Theory, 67(3):235–249, 2011. 21. N. Korpelainen and V. V. Lozin. Two forbidden induced subgraphs and well-quasiordering. Discrete Mathematics, 311(16):1813–1822, 2011. 22. N. Korpelainen, V. V. Lozin, and I. Razgon. Boundary properties of well-quasi-ordered sets of graphs. Order, 30(3):723–735, 2013. 23. V. V. Lozin and D. Rautenbach. On the band-, tree-, and clique-width of graphs with bounded vertex degree. SIAM Journal on Discrete Mathematics, 18(1):195–206, 2004. 24. V. V. Lozin, I. Razgon, and V. Zamaraev. Well-quasi-ordering versus clique-width. Journal of Combinatorial Theory, Series B, (in press), DOI:10.1016/j.jctb.2017.09.012. 25. S.-I. Oum and P. D. Seymour. Approximating clique-width and branch-width. Journal of Combinatorial Theory, Series B, 96(4):514–528, 2006. 26. F. P. Ramsey. On a problem of formal logic. Proceedings of the London Mathematical Society, s2-30(1):264–286, 1930. 27. M. Rao. MSOL partitioning problems on graphs of bounded treewidth and clique-width. Theoretical Computer Science, 377(1–3):260–267, 2007. 32
8cs.DS
NUMERICAL IMPLICITIZATION FOR MACAULAY2 arXiv:1610.03034v1 [math.AG] 10 Oct 2016 JUSTIN CHEN AND JOE KILEEL Abstract. We present the Macaulay2 package NumericalImplicitization, which allows for user-friendly computation of the basic invariants of the image of a polynomial map, such as dimension, degree, and Hilbert function values. This package relies on methods of numerical algebraic geometry, such as homotopy continuation and monodromy. Introduction. Many varieties of interest in algebraic geometry and its applications are usefully described as images of polynomial maps, i.e. via a parametrization. Implicitization is the process of converting a parametric description of a variety into an intrinsic – or implicit – description. Classically, implicitization refers to the procedure of computing the defining equations of a parametrized variety, and in theory this is accomplished by finding the kernel of a ring homomorphism, via Gröbner bases. In practice however, symbolic Gröbner basis computations are often time-consuming, even for medium-scale problems, and do not scale well with respect to the size of the input. Despite this, one would often like to know basic information about a parametrized variety, even when symbolic methods are prohibitively expensive (in terms of computation time). The best examples of such information are discrete invariants such as the dimension, or degree and Hilbert function values if the variety is projective. Other examples include Boolean tests, e.g. whether or not a particular point lies on a parametrized variety. The goal of this Macaulay2 [6] package is to provide such information – in other words, to numerically implicitize a parametrized variety – by using the methods of numerical algebraic geometry. NumericalImplicitization 1 builds on top of existing numerical algebraic geometry software, e.g. NAG4M2 [11], Bertini [3, 2] and PHCpack [17, 7]. Each of these can be used for path tracking and point sampling; by default, the native engine NAG4M2 is used. Notation. The following notation will be used throughout the remainder of this article: • X ⊆ An is a source variety, defined by an ideal I = hg1 , . . . , gr i in the polynomial ring C[x1 , . . . , xn ] • F = {f1 , . . . , fm }, where fi ∈ C[x1 , . . . , xn ], is a list of polynomials specifying a map An → Am • Y is the Zariski closure of the image F (X) = F (V (I)) ⊆ Am , the target variety under consideration • Ye ⊆ Pm is the projective closure of Y , with respect to the standard embedding Am ⊆ Pm . Currently, NumericalImplicitization is implemented for integral (i.e. reduced and irreducible) varieties X. Equivalently, the ideal I is prime. Since numerical methods are used, we always work over the complex numbers with floating-point arithmetic. Moreover, Ye is internally represented by its affine cone. This is because it is easier for computers to work with points in affine space; at the same time, this suffices to find the invariants of Ye . Sampling. All the methods in this package rely crucially on the ability to sample general points on X. To this end, two methods are provided in this package, numericalSourceSample and numericalImageSample, which allow the user to sample as many general points on X and Y as desired. numericalSourceSample will compute a witness set of X, unless X = An , by taking a numerical irreducible decomposition of X. This time-consuming step cannot be avoided. Once a witness set is known, points on X can be sampled in negligible time. numericalImageSample works by sampling points in X via numericalSourceSample, and then applying the map F . One way to view the difference in computation time between symbolic and numerical methods is that the upfront cost of computing a Gröbner basis is replaced with the upfront cost of computing a numerical irreducible decomposition, which is used to sample general points. However, if X = An , then sampling is done by generating random tuples, and is essentially immediate. Thus, in this unrestricted parametrization case, the upfront cost of numerical methods becomes zero. 2010 Mathematics Subject Classification. 14-04, 14Q99, 65H10, 65H20. Key words and phrases. implicitization, homotopy continuation, monodromy, interpolation. 1 For up-to-date code and documentation, see https://github.com/Joe-Kileel/Numerical-Implicitization 1 2 JUSTIN CHEN AND JOE KILEEL Dimension. The most basic invariant of an algebraic variety is its dimension. To compute the dimension of the image of a variety numerically, we use the following theorem: Theorem 1. Let F : X → Y be a dominant morphism of irreducible varieties over C. Then there is a Zariski open subset U ⊆ X such that for all x ∈ U , the induced map on tangent spaces dFx : Tx X → TF (x) Y is surjective. Proof. This is an immediate corollary of generic smoothness [8, III.10.5] and the preceding [8, III.10.4].  In the setting above, since the singular locus Sing Y is a proper closed subset of Y , for general y = F (x) ∈ Y we have that dim Y = dim Ty Y = dim dFx (Tx X) = dim Tx X − dim ker dFx . Now Tx X is the kernel of the Jacobian matrix of I, given by Jac(I) = (∂gi /∂xj )1≤j≤n, 1≤i≤r where I = hg1 , . . . , gr i, and ker dFx is the kernel of the Jacobian of F evaluated at x, intersected with Tx X. Explicitly, ker dFx is the kernel of the (r + m) × n matrix:  ∂g1 (x)   ∂x1  .  .  .    ∂gr   ∂x1 (x)   ∂F  1  (x)  ∂x1   .  .  .   ∂Fm (x) ∂x1 ... .. . ... ... .. . ...  ∂g1 (x)  ∂xn   .  .  .   ∂gr  (x)   ∂xn   ∂F1  (x)   ∂xn   .  .  .   ∂Fm (x) ∂xn We compute these kernel dimensions numerically, as explained prior to Example 4 below, to get dim Y . Example 2. Let Y ⊆ Sym4 (C5 ) ∼ = A70 be the variety of 5 × 5 × 5 × 5 symmetric tensors of border rank ≤ 14. Equivalently, Y is the affine cone over σ14 (ν4 (P4 )), the 14th secant variety of the fourth Veronese embedding of P4 . Naively, one expects dim(Y ) = 14 · 4 + 13 + 1 = 70. In fact, dim(Y ) = 69 as verified by the following code: Macaulay2, version 1.9.2 i1 : needsPackage "NumericalImplicitization" i2 : R = CC[s_(1,1)..s_(14,5)]; i3 : F = sum(1..14, i -> flatten entries basis(4, R, Variables => toList(s_(i,1)..s_(i,5)))); i4 : time numericalImageDim(F, ideal 0_R) -- used 0.106554 seconds o4 = 69 This example is the largest exceptional case from the celebrated work [1]. Note the timing printed above. Hilbert function. We now turn to the problem of determining the Hilbert function of Ye . Recall that if Ye ⊆ Pm is a projective variety, given by a homogeneous ideal J ⊆ C[y0 , . . . , ym ], then the Hilbert function of Ye at an argument d ∈ N is by definition the vector space dimension of the dth graded part of J, i.e. HYe (d) = dim Jd . This counts the maximum number of linearly independent degree d hypersurfaces in Pm containing Ye . To compute the Hilbert function of Ye numerically, we use multivariate polynomial interpolation. For  a fixed  m+d e argument d, let P = {p1 , . . . , pN } be a set of N general points on Y . For 1 ≤ i ≤ N , consider an i × d interpolation matrix A(i) with rows indexed by points {p1 , . . . , pi } and columns indexed by degree d monomials in C[y0 , . . . , ym ], whose entries are the values of the monomials at the points. A vector in the kernel of A(i) corresponds to a choice of coefficients for a homogeneous degree d polynomial that vanishes on p1 , . . . , pi . If i is large, then one expects such a form to vanish on the entire variety Ye . The following theorem makes this precise: Theorem 3. Let {p1 , . . . , ps+1 } be a set of general points on Ye , and let A(i) be the interpolation matrix above. If dim ker A(s) = dim ker A(s+1) , then dim ker A(s) = dim Jd . NUMERICAL IMPLICITIZATION FOR MACAULAY2 3 Proof. Identifying a vector v ∈ ker A(i) with the form in C[y0 , . . . , ym ] of degree d having v as its coefficients, it suffices to show that ker A(s) = Jd . If h ∈ Jd , then h vanishes on all of Ye , in particular on {p1 , . . . , ps }, so h ∈ ker A(s) . For the converse ker A(s) ⊆ Jd , we consider the universal interpolation matrices over C[y0,1 , y1,1 , . . . , ym,i ]  d  d−1 d y0,1 y0,1 y1,1 . . . ym,1  d d−1 d  y0,2 y0,2  y1,2 . . . ym,2   A(i) :=  . .. ..  ..  .. . . .    d−1 d d y0,i y1,i . . . ym,i y0,i Set ri := min {j ∈ Z≥0 | every (j + 1) × (j + 1) minor of A(i) lies in the ideal of Ye ×i ⊆ (Pm )×i }. Then any specialization of A(i) to i points in Ye is a matrix over C of rank ≤ ri ; moreover if the points are general, then the specialization has rank exactly ri , since Ye is irreducible. In particular rank(As ) = rs and rank(As+1 ) = rs+1 , so dim ker A(s) = dim ker A(s+1) implies that rs = rs+1 . It follows that specializing A(s+1) to p1 , p2 , . . . , ps , q for any q ∈ Ye gives a rank rs matrix. Hence, every degree d form in ker A(s) evaluates to 0 at every q ∈ Ye . Since Ye is reduced, we deduce that ker A(s) ⊆ Jd .  It follows from Theorem 3 that the integers dim ker A(1) , dim ker A(2) , . . . decrease by exactly 1, until the first instance where they fail to decrease, at which point they stabilize: dim ker A(i) = dim ker A(s) for i ≥ s. This stable (s) (N ) value is the  valueof the Hilbert function, dim ker A = HYe (d). In particular, it suffices to compute dim ker A m+d for N = , i.e. one may assume the interpolation matrix is square. Although this may seem wasteful d (as stabilization may have occurred with fewer rows), this is indeed what numericalHilbertFunction does, due to the algorithm used to compute kernel dimension numerically. To be precise, kernel dimension is found via a singular value decomposition (SVD) – namely, if a gap (= ratio of consecutive singular values) greater than the option SVDGapThreshold (with default value 200) is observed in the list of all singular values, then this is taken as an indication that all singular values past the greatest gap are numerically zero. On example problems, it was observed that taking only one more additional row than was needed often did not reveal a satisfactory gap in singular values. In addition, numerical stability is improved via preconditioning on the interpolation matrices – namely, each row is normalized in the Euclidean norm before computing the SVD. Example 4. Let X be a random canonical curve of genus 4 in P3 , so X is the complete intersection of a random quadric and cubic. Let F : P3 99K P2 be a projection by 3 random cubics. Then Ye is a plane curve of degree e 3dim(Y ) · deg(X) = 3 · 2 · 3 = 18, so the ideal of Ye contains a single form of degree 18. We verify this as follows: i5 : R = CC[x_0..x_3]; i6 : I = ideal(random(2,R), random(3,R)); i7 : F = toList(1..3)/(i -> random(3,R)); i8 : T = numericalHilbertFunction(F, I, 18) Sampling image points ... -- used 4.76401 seconds Creating interpolation matrix ... -- used 0.313925 seconds Performing normalization preconditioning ... -- used 0.214475 seconds Computing numerical kernel ... -- used 0.135864 seconds Hilbert function value: 1 o8 = NumericalInterpolationTable The output is a NumericalInterpolationTable, which is a HashTable storing the results of the interpolation computation described above. From this, one can obtain a floating-point approximation to a basis of Jd . This is done via the command extractImageEquations: 4 JUSTIN CHEN AND JOE KILEEL i9 : extractImageEquations T o9 : | -.0000712719y_1^18+(.000317507-.000100639i)y_1^17y_2-(.0000906039-.000616564i)y_1^16y_2^2 ------------------------------------------------------------------------------------------(.00197404+.00177936i)y_1^15y_2^3+(.0046344+.00196825i)y_1^14y_2^4-(.00475536-.00157142i) -----------------------------------------------------------------------------------------y_1^13y_2^5+(.00550602-.0100492i)y_1^12y_2^6-(.012252-.0188461i)y_1^11y_2^7+ ... | An experimental feature to find equations over Z may be called with the option attemptExact => true. Degree. After dimension, degree is the most basic invariant of a projective variety Ye ⊆ Pm . Set k := dim(Ye ). For a general linear space L ∈ Gr(Pm−k , Pm ) of complementary dimension to Ye , the intersection L ∩ Ye is a finite set of reduced points. The degree of Ye is by definition the cardinality of L ∩ Ye , which is independent of the general linear space L. Thus one approach to find deg(Ye ) is to fix a random L0 and compute the set of points L0 ∩ Ye . NumericalImplicitization takes this tack, but the method used to find L0 ∩ Ye is not the most obvious. First and foremost, we do not know the equations of Ye , so all solving must be done in X. Secondly, we do not compute F −1 (L0 ) ∩ X from the equations of X and the equations of L0 pulled back under F , because that has degree deg(F ) · deg(Ye ) – potentially much bigger than deg(Ye ). Instead, monodromy is employed to find L0 ∩ Ye . To state the technique, we consider the map: ρ1 Φ := {(L, y) ∈ Gr(Pm−k , Pm ) × Ye | y ∈ L} ⊆ Gr(Pm−k , Pm ) × Ye −−−−−→ Gr(Pm−k , Pm ) where ρ1 is projection onto the first factor. There is a nonempty Zariski open subset U ⊂ Gr(Pm−k , Pm ) such e that the restriction ρ−1 1 (U ) → U is a deg(Y )-to-1 covering map, namely U equals the complement of the Hurwitz divisor from [16]. Now fix a generic basepoint L0 ∈ U . Then the fundamental group π1 (U, L0 ) acts on the fiber e ρ−1 1 (L0 ) = L0 ∩ Y . This action is known as monodromy. It is a key fact that the induced group homomorphism π1 (U, L0 ) −→ Sym(L0 ∩ Ye ) ∼ = Symdeg(Ye ) is surjective, by irreducibility of Ye . More explicitly: Theorem 5. Let Ye , U, L0 be as above, and write L0 = V (ℓ0 ) where ℓ0 ∈ (C[y0 , . . . , ym ]1 )k is a height k column vector of linear forms. Fix another generic point L1 = V (ℓ1 ) ∈ U , where ℓ1 ∈ (C[y0 , . . . , ym ]1 )k . For any γ0 , γ1 ∈ C, consider the following loop of linear subspaces of Pm :    1  V (1 − 2t) · ℓ0 + γ1 2t · ℓ1 if 0 ≤ t ≤ 2   t 7→ 1  V (2 − 2t) · ℓ1 + γ0 (2t − 1) · ℓ0 if ≤ t ≤ 1. 2 2 For a nonempty Zariski open subset of (γ0 , γ1 ) ∈ C , this loop is contained in U . Moreover, the classes of these loops in π1 (U, L0 ) generate the full symmetric group Sym(L0 ∩ Ye ). Proof. Let L be the pencil of linear subspaces of Pm generated by ℓ0 and ℓ1 . Via monodromy, π1 (L ∩ U, L0 ) maps surjectively onto Sym(L0 ∩ Ye ), by [14, Corollary 3.5]. Here the topological space L ∩ U is homeomorphic to the Riemann sphere CP1 minus a finite set of points, so π1 (L ∩ U, L0 ) is isomorphic to a free group on finitely many letters. The explicit loops in the theorem statement miss the finite set L \ (L ∩ U ) for general γ0 , γ1 ; moreover γ0 , γ1 may be chosen so that the loop above encloses exactly one point in L \ (L ∩ U ). Therefore, the classes of these loops generate π1 (L ∩ U, L0 ). To visualize these loops, the reader may consult the proof of [15, Lemma 7.1.3].  numericalImageDegree works by first sampling a general point x ∈ X, and manufacturing a general linear slice L0 such that F (x) ∈ L0 ∩ Ye . Then, L0 is moved around in a loop of the form described in Theorem 5. This loop pulls back to a homotopy in X, where we use the equations of X to track x. The endpoint of the track is a point x′ ∈ X such that F (x′ ) ∈ L0 ∩ Ye . If F (x) and F (x′ ) are numerically distinct, then the loop has learned a new point in L0 ∩ Ye ; otherwise x′ is discarded. We then repeat this process of tracking points in X over each known point in L0 ∩ Ye , according to loops in Theorem 5. Note that for random γ0 , γ1 ∈ C, each loop has a positive probability – bounded away from 0 – of learning new points in L0 ∩ Ye , up until all of L0 ∩ Ye is known. Thus by carrying out many loops from Theorem 5, the probability of finding all points in L0 ∩ Ye approaches 1. In practice, if several NUMERICAL IMPLICITIZATION FOR MACAULAY2 5 consecutive loops2 do not learn new points in L0 ∩ Ye , then we suspect that all of L0 ∩ Ye has been calculated. To verify this, we pass to the trace test (see [14, Corollary 2.2], [9, §5] or [12, §1]), which provides a characterization for when a subset of L0 ∩ Ye equals L0 ∩ Ye . If the trace test is failed, then L0 is replaced by a new random L′0 and preimages in X of known points of L0 ∩ Ye are tracked to those preimages of points of L′0 ∩ Ye . Afterwards, monodromy for L′0 ∩ Ye begins anew. If the trace test is failed maxTraceTests (= 10 by default) times in total, then numericalImageDegree exits with only a lower bound on deg(Ye ). Example 6. Let Ye = σ2 (P1 × P1 × P1 × P1 × P1 ) ⊆ P31 . We find that deg(Ye ) = 3256, using the commands below: i10 : R = CC[a_1..a_5, b_1..b_5, t_0, t_1]; i11 : F1 = terms product(apply(toList(1..5), i -> 1 + a_i)); i12 : F2 = terms product(apply(toList(1..5), i -> 1 + b_i)); i13 : F = apply(toList(0..<2^5), i -> t_0*F1#i + t_1*F2#i); i14 : time numericalImageDegree(F, ideal 0_R, maxRepetitiveMonodromies => 2) Sampling point in source ... Tracking monodromy loops ... Points found: 2 Points found: 4 Points found: 8 Points found: 16 Points found: 32 Points found: 62 Points found: 123 Points found: 239 Points found: 466 Points found: 860 Points found: 1492 Points found: 2314 Points found: 3007 Points found: 3229 Points found: 3256 Points found: 3256 Points found: 3256 Running trace test ... Degree of image: 3256 -- used 388.989 seconds o14 = PseudoWitnessSet In [13, Theorem 4.1], it is proven via representation theory and combinatorics that the prime ideal J of Ye is generated by the 3 × 3 minors of all flattenings of 2×5 tensors, so we can confirm that deg(J) = 3256. However, the naive attempt to compute the degree of Ye symbolically by taking the kernel of a ring map – from a polynomial ring in 32 variables – has no hope of finishing in any reasonable amount of time. The output o14 above is a PseudoWitnessSet, which is a Macaulay2 HashTable that stores the computation of L0 ∩ Ye . This numerical representation of parameterized varieties was introduced in [10]. Membership. Classically, given a variety Y ⊆ Am and a point y ∈ Am , we determine whether or not y ∈ Y by finding set-theoretic equations of Y (which generate the ideal of Y up to radical), and then testing if y satisfies these equations. If a PseudoWitnessSet for Y is available, then point membership in Y can instead be verified by parameter homotopy. More precisely, isOnImage determines if y lies in the constructible set F (X) ⊆ Y , as follows. We fix a general affine linear subspace Ly ⊆ Am of complementary dimension m − k passing through y. Then y ∈ F (X) if and only if y ∈ Ly ∩ F (X), so it suffices to compute the set Ly ∩ F (X). Now, a PseudoWitnessSet for 2This is specified by the option maxRepetitiveMonodromies (with default value 4). 6 JUSTIN CHEN AND JOE KILEEL Y provides a general section L ∩ F (X), and preimages in X. We move L to Ly as in [15, Theorem 7.1.6]. This pulls back to a homotopy in X, where we use the equations of X to track those preimages. Applying F to the endpoints of the track gives all isolated points in Ly ∩ F (X) by [15, Theorem 7.1.6]. Since Ly was general, the proof of [4, Corollary 10.5] shows Ly ∩ F (X) is zero-dimensional, so this procedure computes the entire set Ly ∩ F (X). Example 7. Let Y ⊆ A18 be defined by the resultant of three quadratic equations in three unknowns. In other words, Y consists of all coefficients (c1 , . . . , c6 , d1 , . . . , d6 , e1 , . . . , e6 ) ∈ A18 such that the system 0 = c1 x2 + c2 xy + c3 xz + c4 y 2 + c5 yz + c6 z 2 0 = d1 x2 + d2 xy + d3 xz + d4 y 2 + d5 yz + d6 z 2 0 = e1 x2 + e2 xy + e3 xz + e4 y 2 + e5 yz + e6 z 2 admits a solution (x : y : z) ∈ P2 . Here Y is a hypersurface, and a matrix formula for its defining equation was derived in [5], using exterior algebra methods. We rapidly determine point membership in Y numerically as follows. i15 : R = CC[c_1..c_6, d_1..d_6, e_1..e_6, x, y, z]; i16 : I = ideal(c_1*x^2+c_2*x*y+c_3*x*z+c_4*y^2+c_5*y*z+c_6*z^2, d_1*x^2+d_2*x*y+d_3*x*z+d_4*y^2+d_5*y*z+d_6*z^2, e_1*x^2+e_2*x*y+e_3*x*z+e_4*y^2+e_5*y*z+e_6*z^2); i17 : F = toList(c_1..c_6 | d_1..d_6 | e_1..e_6); i18 : W = numericalImageDegree(F, I, verboseOutput => false); -- Y has degree 12 i19 : p1 = numericalImageSample(F, I); p2 = point random(CC^1, CC^#F); i21 : time (isOnImage(W, p1), isOnImage(W, p2)) -- used 0.186637 seconds o21 = (true, false) Acknowledgements. We are grateful to Anton Leykin for his encouragement, and to Luke Oeding for testing NumericalImplicitization. We also thank David Eisenbud and Bernd Sturmfels for helpful discussions and comments. This work has been supported by the US National Science Foundation (DMS-1001867). References [1] J. Alexander and A. Hirschowitz, Polynomial interpolation in several variables, J. Alg. Geom. 4 (1995), no. 2, 201–222. [2] D.J. Bates, E. Gross, A Leykin and J.I. Rodriguez, Bertini for Macaulay2, arXiv:1310.3297v1. [3] D.J. Bates, J.D. Hauenstein, A.J. Sommese and C.W. Wampler, Bertini: Software for numerical algebraic geometry. Available at https://bertini.nd.edu. [4] D. Eisenbud, Commutative algebra: With a view toward algebraic geometry, Graduate Texts in Mathematics 150, Springer-Verlag, New York, 1995. [5] D. Eisenbud and F. Schreyer, Resultants and Chow forms via exterior syzygies, J. Amer. Math. Soc. 16 (2003), no. 3, 537–579. [6] D.R. Grayson and M.E. Stillman, Macaulay2, a software system for research in algebraic geometry. Available at http://www.math.uiuc.edu/Macaulay2/ . [7] E. Gross, S. Petrović and J. Verschelde, Interfacing with PHCpack, J. Softw. Algebra Geom. 5 (2013), 20–25. [8] R. Hartshorne, Algebraic Geometry, Graduate Texts in Mathematics 52, Springer-Verlag, New York, 1977. [9] J.D. Hauenstein and J.I. Rodriguez, Numerical Irreducible Decomposition of Multiprojective Varieties, arXiv:1507.07069v2. [10] J.D. Hauenstein and A.J. Sommese, Witness sets of projections, Appl. Math. Comput. 217 (2010), no. 7, 3349–3354. [11] A. Leykin, Numerical Algebraic Geometry, J. Softw. Algebra Geom. 3 (2011), 5–10. [12] A. Leykin and F. Sottile, Trace test, arXiv:1608.00540v1. [13] C. Raicu, Secant varieties of Segre-Veronese varieties, Algebra Number Theory 6 (2012), no. 8, 1817–1868. [14] A.J. Sommese, J. Verschelde and C.W. Wampler, Symmetric functions applied to decomposing solution sets of polynomial sets, SIAM J. Numer. Anal. 40 (2002), no. 6, 2026–2046. [15] A.J. Sommese and C.W. Wampler, The numerical solution of systems of polynomials, The Publishing Co. Pte. Ltd., Hackensack, NJ, 2005. [16] B. Sturmfels, The Hurwitz Form of a Projective Variety, J. Symb. Comput. 79 (2017) 186–196. [17] J. Verschelde, Algorithm 795: PHCPACK: A general-purpose solver for polynomial systems by homotopy continuation, ACM Trans. Math. Software 25 (1999), no. 2, 251–276. Available at https://www.math.uic.edu/~ jan/download.html. Department of Mathematics, University of California, Berkeley, California, 94720 U.S.A E-mail address: {jchen,jkileel}@math.berkeley.edu
0math.AC
ON THE COHEN-MACAULAYNESS OF TANGENT CONES OF MONOMIAL CURVES IN A4 (K) arXiv:1512.04204v4 [math.AC] 3 Feb 2017 FEZA ARSLAN, ANARGYROS KATSABEKIS, AND MELISSA NALBANDIYAN Abstract. In this paper we give necessary and sufficient conditions for the Cohen-Macaulayness of the tangent cone of a monomial curve in the 4-dimensional affine space. We study particularly the case where C is a Gorenstein noncomplete intersection monomial curve. 1. Introduction Cohen-Macaulayness of tangent cones of monomial curves has been studied by many authors, see for instance [1], [2], [7], [10], [11], [12], [15], [16], [18], [19], [21], [22], [23]. It constitutes an important problem, since for example CohenMacaulayness of the tangent cone guarantees that the Hilbert function of the local ring associated to the monomial curve is non-decreasing and therefore reduces its computation to the computation of the Hilbert function of an Artin local ring. In this article, we first deal with the above problem in the case of any monomial curve in the 4-dimensional affine space A4 (K), where K is a field. In section 2, by using the classification in terms of critical binomials given by Katsabekis and Ojeda [13], we study in detail the problem for Case 1 in this classification and give sufficient conditions for the Cohen-Macaulayness of the tangent cone. We consider the remaining cases in the Appendix, where we give in all these cases necessary and sufficient conditions for the Cohen-Macaulayness of the tangent cone. In section 3 we consider the problem for non-complete intersection Gorenstein monomial curves. In this case, Bresinsky has not only shown that there is a minimal generating set for the defining ideal of the monomial curve consisting of five generators, but also given the explicit form of these generators [4]. Actually there are 6 permutations of the above generator set. It is worth to note that Theorem 2.10 in [2] provides a sufficient condition for the Cohen-Macaulayness of the tangent cone in four of the aforementioned cases. In this paper, we generalize their result and provide a necessary and sufficient condition for the Cohen-Macaulayness of the tangent cone in all 6 six permutations. Finally, we use these results to give some families of Gorenstein monomial curves in A4 (K) with corresponding local rings having non-decreasing Hilbert function, thus giving a partial answer to Rossi’s problem [20]. This problem asks whether the Hilbert function of a Gorenstein local ring of dimension one is non-decreasing. Recently, it has been shown that there are many families of monomial curves giving negative answer to this problem [17], but one should note that Rossi’s problem is still open for Gorenstein local rings associated to monomial curves in A4 (K). Let {n1 , . . . , nd } be a set of all-different positive integers with gcd(n1 , . . . , nd ) = 1. Let K[x1 , . . . , xd ] be the polynomial ring in d variables. We shall denote by xu Date: February 6, 2017. 1991 Mathematics Subject Classification. Primary 13H10, 14H20; Secondary 20M14. Key words and phrases. Cohen-Macaulay, tangent cone, monomial curve. The second author has been supported by TUBITAK 2221 Visiting Scientists and Scientists on Sabbatical Leave Fellowship Program. 1 2 F. ARSLAN, A. KATSABEKIS, AND M. NALBANDIYAN the monomial xu1 1 · · · xud d of K[x1 , . . . , xd ], with u = (u1 , . . . , ud ) ∈ Nd , where N stands for the set of non-negative integers. Consider the affine monomial curve in the d-space Ad (K) defined parametrically by x1 = tn1 , . . . , xd = tnd . The toric ideal of C, denoted by I(C), is the kernel of the K-algebra homomorphism φ : K[x1 , . . . , xd ] → K[t] given by φ(xi ) = tni for all 1 ≤ i ≤ d. We grade K[x1 , . . . , xd ] by the semigroup S := {g1 n1 + · · · + gd nd |gi ∈ N} setting degS (xi ) = ni for i = 1, . . . , d. The S-degree of a monomial xu = xu1 1 · · · xud d is defined by degS (xu ) = u1 n1 + · · · + ud nd ∈ S. The ideal I(C) is generated by all the binomials xu − xv such that degS (xu ) = degS (xv ) see for example, [24, Lemma 4.1]. Let n1 < n2 < · · · < nd and n1 + S = {n1 + m|m ∈ S}. Theorem 1.1. ([10]) The monomial curve C has Cohen-Macaulay tangent cone at the origin if and only if for all integers v2 ≥ 0, v3 ≥ 0, . . . , vd ≥ 0 such that Pd Pd vi ni ∈ n1 + S, there exist w1 > 0, w2 ≥ 0, . . . , wd ≥ 0 such that i=2 vi ni = i=2 Pd Pd Pd i=1 wi ni and i=2 vi ≤ i=1 wi . ni gcd(n ,n ) n1 gcd(n ,n ) ni n1 1 i Note that x1 1 i −xi > gcd(n , for every ∈ I(C) and also gcd(n 1 ,ni ) 1 ,ni ) 2 ≤ i ≤ d. Thus, to decide the Cohen-Macaulayness of the tangent cone of C it n1 . suffices to consider only such vi with the extra condition that vi < gcd(n 1 ,ni ) The computations of this paper are performed by using CoCoA ([6]). 2. The general case Let A = {n1 , . . . , n4 } be a set of relatively prime positive integers. Q u Definition 2.1. A binomial xai i − j6=i xj ij ∈ I(C) is called critical with respect P to xi if ai is the least positive integer such that ai ni ∈ j6=i Nnj . The critical ideal of A, denoted by CA , is the ideal of K[x1 , . . . , x4 ] generated by all the critical binomials of I(C). The support supp(xu ) of a monomial xu is the set supp(xu ) = {i ∈ {1, . . . , 4}|xi divides xu }. The support of a binomial B = xu − xv is the set supp(xu ) ∪ supp(xv ). If the support of B equals the set {1, . . . , 4}, then we say that B has full support. Let µ(CA ) be the minimal number of generators of the ideal CA . Theorem 2.2. ([13]) After permuting the variables, if necessary, there exists a minimal system of binomial generators S of the critical ideal CA of the following form: CASE 1: If ai ni 6= aj nj , for every i 6= j, then S = {xai i − xui , i = 1, . . . , 4} CASE 2: If a1 n1 = a2 n2 and a3 n3 = a4 n4 , then either a2 n2 6= a3 n3 and (a) S = {xa1 1 − xa2 2 , xa3 3 − xa4 4 , xa4 4 − xu4 } when µ(CA ) = 3 (b) S = {xa1 1 − xa2 2 , xa3 3 − xa4 4 } when µ(CA ) = 2 or a2 n2 = a3 n3 and (c) S = {xa1 1 − xa2 2 , xa2 2 − xa3 3 , xa3 3 − xa4 4 } CASE 3: If a1 n1 = a2 n2 = a3 n3 6= a4 n4 , then S = {xa1 1 − xa2 2 , xa2 2 − xa3 3 , xa4 4 − xu4 } CASE 4: If a1 n1 = a2 n2 and ai ni 6= aj nj for all {i, j} 6= {1, 2}, then (a) S = {xa1 1 − xa2 2 , xai i − xui | i = 2, 3, 4} when µ(CA ) = 4 COHEN-MACAULAYNESS OF TANGENT CONES OF MONOMIAL CURVES IN A4 (K) 3 (b) S = {xa1 1 − xa2 2 , xai i − xui | i = 3, 4} when µ(CA ) = 3 where, in each case, xui denotes an appropriate monomial whose support has cardinality greater than or equal to two. u u u u Theorem 2.3. ([13]) The union of S, the set I of all binomials xi1i1 xi2i2 −xi3i3 xi4i4 ∈ u u I(C) with 0 < uij < aj , j = 1, 2, ui3 > 0, ui4 > 0 and xi3i3 xi4i4 indispensable, and u1 u2 u3 u4 the set R of all binomials x1 x2 − x3 x4 ∈ I(C) \ I with full support such that • u1 ≤ a1 and xu3 3 xu4 4 is indispensable, in the CASES 2(a) and 4(b). • u1 ≤ a1 and/or u3 ≤ a3 and there is no xv11 xv22 − xv33 xv44 ∈ I(C) with full support such that xv11 xv22 properly divides xu1 1 +αc1 xu2 2 −αc2 or xv33 xv44 properly divides xu3 3 +αc3 xu4 4 −αu4 for some α ∈ N, in the CASE 2(b). is a minimal system of generators of I(C) (up to permutation of indices). A binomial B ∈ I(C) is called indispensable of I(C) if every system of binomial generators of I(C) contains B or −B. By Corollary 2.16 in [13] every f ∈ I is an indispensable binomial of I(C). P Notation 2.4. Given a monomial xu we will write deg(xu ) := 4i=1 ui . For the rest of this section we will assume that n1 < n2 < n3 < n4 . To prove our results we will make repeated use of Theorem 1.1. Proposition 2.5. Suppose that I(C) is given as in case 1. Let S = {xa1 1 −xu , xa2 2 − xv , xa3 3 − xw , xa4 4 − xz } be a generating set of CA and let 1 ∈ supp(xv ). In the following cases C has Cohen-Macaulay tangent cone at the origin. (i) 1 ∈ supp(xw ), 1 ∈ supp(xz ) and (1) a2 ≤ deg(xv ), (2) a3 ≤ deg(xw ) and (3) for every binomial f = M − N ∈ I with 1 ∈ supp(M ) we have that deg(N ) ≤ deg(M ). (ii) 1 ∈ supp(xw ), 1 ∈ / supp(xz ) and (1) a2 ≤ deg(xv ), (2) a3 ≤ deg(xw ) and (3) for every monomial M = xd22 xd33 xd44 , where d2 < a2 and d3 < a3 , with d2 n2 + d3 n3 + d4 n4 ∈ n1 + S there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). (iii) 1 ∈ / supp(xw ), 1 ∈ supp(xz ) and (1) a2 ≤ deg(xv ), (2) for every monomial M = xd22 xd33 xd44 , where d2 < a2 and d4 < a4 , with d2 n2 + d3 n3 + d4 n4 ∈ n1 + S there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). (iv) 1 ∈ / supp(xw ), 1 ∈ / supp(xz ) and (1) a2 ≤ deg(xv ), (2) for every monomial M = xd22 xd33 xd44 , where d2 < a2 , with d2 n2 + d3 n3 + d4 n4 ∈ n1 + S there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). Proof. (i) Let M = xd22 xd33 xd44 , where d2 ≥ 0, d3 ≥ 0 and d4 ≥ 0, with d2 n2 + d3 n3 + d4 n4 ∈ n1 + S. Thus there exists a monomial P such that 1 ∈ supp(P ) and M − P ∈ I(C). Let d2 ≥ a2 , then we consider the monomial P = xd22 −a2 xd33 xd44 xv . We have that M − P ∈ I(C) and also deg(M ) = d2 + d3 + d4 ≤ d2 + d3 + d4 + (deg(xv ) − a2 ) = deg(P ). 4 F. ARSLAN, A. KATSABEKIS, AND M. NALBANDIYAN Let d3 ≥ a3 , then we consider the monomial P = xd22 xd33 −a3 xd44 xw . We have that M − P ∈ I(C) and also deg(M ) = d2 + d3 + d4 ≤ d2 + d3 + d4 + (deg(xw ) − a3 ) = deg(P ). Let d4 ≥ a4 , then we consider the monomial P = xd22 xd33 x4d4 −a4 xz . We have that M − P ∈ I(C) and also deg(M ) = d2 + d3 + d4 < d2 + d3 + d4 + (deg(xz ) − a4 ) = deg(P ). Suppose that d2 < a2 , d3 < a3 and d4 < a4 . There are 2 cases: (1) there exists a binomial f = G − H ∈ I with 1 ∈ supp(G) such that H divides M , so M = HH ′ . Note that deg(H) ≤ deg(G) from condition (3). Then GH ′ − HH ′ ∈ I(C) and also deg(M ) = deg(HH ′ ) ≤ deg(G) + deg(H ′ ). (2) there exists no binomial f = G − H in I such that H divides M . Recall that M − P ∈ I(C), S ∪ I generates I(C) and also 1 ∈ supp(xv ), 1 ∈ supp(xw ) and 1 ∈ supp(xz ). Then necessarily xu divides M , so M = xu M ′ . Let P = M ′ xa1 1 , then M − P ∈ I(C) and also deg(M ) = deg(xu ) + deg(M ′ ) < deg(xa1 1 ) + deg(M ′ ) = deg(P ). (ii) Let M = xd22 xd33 xd44 , where d2 ≥ 0, d3 ≥ 0 and d4 ≥ 0, with d2 n2 +d3 n3 +d4 n4 ∈ n1 + S. Let d2 ≥ a2 , then we consider the monomial P = x2d2 −a2 xd33 xd44 xv . We have that M − P ∈ I(C) and also deg(M ) = d2 + d3 + d4 ≤ d2 + d3 + d4 + (deg(xv ) − a2 ) = deg(P ). Let d3 ≥ a3 , then we consider the monomial P = xd22 xd33 −a3 xd44 xw . We have that M − P ∈ I(C) and also deg(M ) = d2 + d3 + d4 ≤ d2 + d3 + d4 + (deg(xw ) − a3 ) = deg(P ). Suppose that d2 < a2 and d3 < a3 , then from condition (3) we are done. (iii) Let M = xd22 xd33 xd44 , where d2 ≥ 0, d3 ≥ 0 and d4 ≥ 0, with d2 n2 +d3 n3 +d4 n4 ∈ n1 + S. Let d2 ≥ a2 , then we consider the monomial P = x2d2 −a2 xd33 xd44 xv . We have that M − P ∈ I(C) and also deg(M ) = d2 + d3 + d4 ≤ d2 + d3 + d4 + (deg(xv ) − a2 ) = deg(P ). Let d4 ≥ a4 , then we consider the monomial P = xd22 xd33 x4d4 −a4 xz . We have that M − P ∈ I(C) and also deg(M ) = d2 + d3 + d4 < d2 + d3 + d4 + deg(xz ) − a4 = deg(P ). Suppose that d2 < a2 and d4 < a4 , then from condition (2) we are done. (iv) Let M = xd22 xd33 xd44 , where d2 ≥ 0, d3 ≥ 0 and d4 ≥ 0, with d2 n2 +d3 n3 +d4 n4 ∈ n1 + S. Let d2 ≥ a2 , then we consider the monomial P = x2d2 −a2 xd33 xd44 xv . We have that M − P ∈ I(C) and also deg(M ) = d2 + d3 + d4 ≤ d2 + d3 + d4 + (deg(xv ) − a2 ) = deg(P ). Suppose that d2 < a2 , then from condition (2) we are done. Proposition 2.6. Suppose that I(C) is given as in case 1. Let S = {xa1 1 −xu , xa2 2 − / supp(xv ). In the folxv , xa3 3 − xw , xa4 4 − xz } be a generating set of CA and let 1 ∈ lowing cases C has Cohen-Macaulay tangent cone at the origin. (i) 1 ∈ supp(xw ), 1 ∈ supp(xz ) and (1) a3 ≤ deg(xw ), (2) for every binomial f = M − N ∈ I with 1 ∈ supp(M ) we have that deg(N ) ≤ deg(M ) and COHEN-MACAULAYNESS OF TANGENT CONES OF MONOMIAL CURVES IN A4 (K) 5 (3) for every monomial M = xd22 xd33 xd44 , where d2 ≥ a2 , d3 < a3 and d4 < a4 , with d2 n2 + d3 n3 + d4 n4 ∈ n1 + S there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). (ii) 1 ∈ supp(xw ), 1 ∈ / supp(xz ) and (1) a3 ≤ deg(xw ) and (2) for every monomial M = xd22 xd33 xd44 , where d3 < a3 , with d2 n2 + d3 n3 + d4 n4 ∈ n1 + S there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). (iii) 1 ∈ / supp(xw ), 1 ∈ supp(xz ) and for every monomial M = xd22 xd33 xd44 , where d4 < a4 , with d2 n2 + d3 n3 + d4 n4 ∈ n1 + S there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). Proof. (i) Let M = xd22 xd33 xd44 , where d2 ≥ 0, d3 ≥ 0 and d4 ≥ 0, with d2 n2 + d3 n3 + d4 n4 ∈ n1 + S. Thus there exists a monomial P such that 1 ∈ supp(P ) and M − P ∈ I(C). Let d3 ≥ a3 , then we consider the monomial P = xd22 x3d3 −a3 xd44 xw . We have that M − P ∈ I(C) and also deg(M ) = d2 + d3 + d4 ≤ d2 + d3 + d4 + (deg(xw ) − a3 ) = deg(P ). Let d4 ≥ a4 , then we consider the monomial P = xd22 xd33 x4d4 −a4 xz . We have that M − P ∈ I(C) and also deg(M ) = d2 + d3 + d4 < d2 + d3 + d4 + (deg(xz ) − a4 ) = deg(P ). Suppose that d3 < a3 and d4 < a4 . If d2 ≥ a2 , then from (3) we are done. Assume that d2 < a2 . There are 2 cases: (1) there exists a binomial f = G − H ∈ I with 1 ∈ supp(G) such that H divides M , so M = HH ′ . Note that deg(H) ≥ deg(G) from condition (2). Then GH ′ − M ∈ I(C) and also deg(M ) ≤ deg(G) + deg(H ′ ). (2) there exists no binomial f = G − H in I such that H divides M . Recall that M − P ∈ I(C), S ∪ I generates I(C) and also 1 ∈ supp(xw ) and 1 ∈ supp(xz ). Then necessarily xu or/and xv divides M . Let us suppose that xu divides M , so M = xu M ′ . Let P = M ′ xa1 1 , then M − P ∈ I(C) and also deg(M ) = deg(xu ) + deg(M ′ ) < deg(xa1 1 ) + deg(M ′ ) = deg(P ). Suppose now that xv divides M , so M = xv M ′ . Then the binomial xa2 2 M ′ − M belongs to I(C) and also degS (xa2 2 M ′ ) ∈ n1 + S. Thus there exists a monomial N such that 1 ∈ supp(N ), degS (N ) = degS (xa2 2 M ′ ) and also deg(xa2 2 M ′ ) ≤ deg(N ). Consequently deg(M ) = deg(xv M ′ ) < deg(xa2 2 M ′ ) ≤ deg(N ). (ii) Let M = xd22 xd33 xd44 , where d2 ≥ 0, d3 ≥ 0 and d4 ≥ 0, with d2 n2 + d3 n3 + d4 n4 ∈ n1 + S. Let d3 ≥ a3 , then we consider the monomial P = xd22 x3d3 −a3 xd44 xw . We have that M − P ∈ I(C) and also deg(M ) = d2 + d3 + d4 ≤ d2 + d3 + d4 + (deg(xw ) − a3 ) = deg(P ). Let d3 < a3 , then from condition (2) we are done. (iii) Let M = xd22 xd33 xd44 , where d2 ≥ 0, d3 ≥ 0 and d4 ≥ 0, with d2 n2 +d3 n3 +d4 n4 ∈ n1 + S. Let d4 ≥ a4 , then we consider the monomial P = xd22 xd33 xd44 −a4 xz . We have that M − P ∈ I(C) and also deg(M ) = d2 + d3 + d4 < d2 + d3 + d4 + (deg(xz ) − a4 ) = deg(P ). Suppose that d4 < a4 , then from the assumption we are done. 6 F. ARSLAN, A. KATSABEKIS, AND M. NALBANDIYAN 3. The Gorenstein case In this section we will study the case that C is a non-complete intersection Gorenstein monomial curve, i.e. the semigroup S = {g1 n1 + · · · + g4 n4 |gi ∈ N} is symmetric. Theorem 3.1. ([4]) Let C be a monomial curve having the parametrization x1 = tn1 , x2 = tn2 , x3 = tn3 , x4 = tn4 . The semigroup S is symmetric and C is a non-complete intersection curve if and only if I(C) is minimally generated by the set G = {f1 = xa1 1 − xa3 13 xa4 14 , f2 = xa2 2 − xa1 21 xa4 24 , f3 = xa3 3 − xa1 31 xa2 32 , f4 = xa4 4 − xa2 42 xa3 43 , f5 = xa3 43 xa1 21 − xa2 32 xa4 14 } where the polynomials fi are unique up to isomorphism and 0 < aij < aj . Remark 3.2. Bresinsky [4] showed that S is symmetric and I(C) is as in the previous theorem if and only if n1 = a2 a3 a14 + a32 a13 a24 , n2 = a3 a4 a21 + a31 a43 a24 , n3 = a1 a4 a32 + a14 a42 a31 , n4 = a1 a2 a43 + a42 a21 a13 with gcd(n1 , n2 , n3 , n4 ) = 1, ai > 1, 0 < aij < aj for 1 ≤ i ≤ 4 and a1 = a21 + a31 , a2 = a32 + a42 , a3 = a13 + a43 , a4 = a14 + a24 . Remark 3.3. ([2]) The above theorem implies that for any non-complete intersection Gorenstein monomial curve with embedding dimension four, the variables can be renamed to obtain generators exactly of the given form, and this means that there are six isomorphic possible permutations which can be considered within three cases: (1) f1 = (1, (3, 4)) (a) f2 = (2, (1, 4)), (b) f2 = (2, (1, 3)), (2) f1 = (1, (2, 3)) (a) f2 = (2, (3, 4)), (b) f2 = (2, (1, 4)), (3) f1 = (1, (2, 4)) (a) f2 = (2, (1, 3)), (b) f2 = (2, (3, 4)), f3 = (3, (1, 2)), f4 = (4, (2, 3)), f5 = ((1, 3), (2, 4)) f3 = (3, (2, 4)), f4 = (4, (1, 2)), f5 = ((1, 4), (2, 3)) f3 = (3, (1, 4)), f4 = (4, (1, 2)), f5 = ((2, 4), (1, 3)) f3 = (3, (2, 4)), f4 = (4, (1, 3)), f5 = ((1, 2), (4, 3)) f3 = (3, (1, 4)), f4 = (4, (2, 3)), f5 = ((1, 2), (3, 4)) f3 = (3, (1, 2)), f4 = (4, (1, 3)), f5 = ((2, 3), (1, 4)) Here, the notation fi = (i, (j, k)) and f5 = ((i, j), (k, l)) denote the generators a a a fi = xai i −xj ij xakik and f5 = xai ki xj lj −xkjk xal il . Thus, given a Gorenstein monomial curve C, if we have the extra condition n1 < n2 < n3 < n4 , then the generator set of I(C) is exactly given by one of these six permutations. Remark 3.4. By [13, Corollary 3.13] the toric ideal I(C) of any non-complete intersection Gorenstein monomial curve C is generated by its indispensable binomials. Let lex − inf be the total order on the monomials of K[x1 , . . . , x4 ] which is defined as follows: xu >lex−inf xv ⇔ xu <lex xv where lex order is the lexicographic order such that x1 is the largest variable in K[x1 , . . . , x4 ] with respect to <lex . Proposition 3.5. The set G = {f1 , f2 , f3 , f4 , f5 } is the reduced Gröbner basis of I(C) with respect to an appropriate lex − inf order. COHEN-MACAULAYNESS OF TANGENT CONES OF MONOMIAL CURVES IN A4 (K) 7 Proof. Suppose that I(C) is given as in case 1(a). Then f1 = xa1 1 − xa3 13 x4a14 , f2 = xa2 2 − xa1 21 xa4 24 , f3 = xa3 3 − xa1 31 xa2 32 , f4 = xa4 4 − xa2 42 xa3 43 , f5 = xa1 21 xa3 43 − xa2 32 xa4 14 . With respect to lex − inf such that x1 >lex x2 >lex x3 >lex x4 we have that lm(f1 ) = xa3 13 xa4 14 , lm(f2 ) = xa2 2 , lm(f3 ) = xa3 3 , lm(f4 ) = xa4 4 and lm(f5 ) = G xa2 32 xa4 14 . We will prove that S(fi , fj ) −→ 0 for any pair {fi , fj }. Since lm(f1 ) and G G lm(f2 ) are relatively prime, we get that S(f1 , f2 ) −→ 0. Similarly S(f2 , f3 ) −→ 0, G G G S(f2 , f4 ) −→ 0, S(f3 , f4 ) −→ 0 and S(f3 , f5 ) −→ 0. We have that f5 S(f1 , f3 ) = xa1 31 xa2 32 xa4 14 − xa1 1 xa3 43 −→ xa1 1 xa3 43 − xa1 1 xa3 43 = 0 f3 f2 S(f1 , f4 ) = xa2 42 xa3 3 − xa1 1 xa4 24 −→ xa1 31 xa2 2 − xa1 1 xa4 24 −→ xa1 1 xa4 24 − xa1 1 xa4 24 = 0 f3 S(f1 , f5 ) = xa1 21 xa3 3 − xa1 1 xa2 32 −→ xa1 1 xa2 32 − xa1 1 xa2 32 = 0 f4 S(f2 , f5 ) = xa1 21 xa2 42 xa3 43 − xa1 21 xa4 4 −→ xa1 21 xa2 42 xa3 43 − xa1 21 xa2 42 xa3 43 = 0 f2 S(f4 , f5 ) = xa1 21 xa3 43 xa4 24 − xa2 2 xa3 43 −→ xa1 21 xa3 43 xa4 24 − xa1 21 xa3 43 xa4 24 = 0. Thus G is a Gröbner basis for I(C) with respect to lex − inf such that x1 >lex x2 >lex x3 >lex x4 . It is not hard to show that G is a Gröbner basis for I(C) with respect to lex − inf such that (1) x1 >lex x2 >lex x3 >lex x4 in case 1(b). (2) x1 >lex x3 >lex x2 >lex x4 in case 2(a). (3) x1 >lex x2 >lex x3 >lex x4 in case 2(b). (4) x1 >lex x2 >lex x3 >lex x4 in case 3(a). (5) x1 >lex x3 >lex x2 >lex x4 in case 3(b). The Apery set Q of the semigroup S relative to {n1 } is defined by Q = {q ∈ S|q − n1 ∈ / S}. Using Lemma 1.2 in [5] we get the following. Corollary 3.6. Let B be the set of monomials xu2 2 xu3 3 xu4 4 in the polynomial ring K[x2 , x3 , x4 ] which are not divisible by any of the monomials of the set (1) {xa3 13 xa4 14 , xa2 2 , xa3 3 , xa4 4 , xa2 32 xa4 14 } in case 1(a). (2) {xa3 13 xa4 14 , xa2 2 , xa3 3 , xa4 4 , xa2 42 xa3 13 } in case 1(b). (3) {xa2 12 xa3 13 , xa2 2 , xa3 3 , xa4 4 , xa2 12 xa4 34 } in case 2(a). (4) {xa2 12 xa3 13 , xa2 2 , xa3 3 , xa4 4 , xa3 13 xa4 24 } in case 2(b). (5) {xa2 12 xa4 14 , xa2 2 , xa3 3 , xa4 4 , xa3 23 xa4 14 } in case 3(a). (6) {xa2 12 xa4 14 , xa2 2 , xa3 3 , xa4 4 , xa2 12 xa3 43 } in case 3(b). Then 4 X ui ni where xu2 2 xu3 3 xu4 4 ∈ B}. Q = {m ∈ S|m = i=2 Theorem 3.7. Suppose that I(C) is given as in case 1(a). Then C has CohenMacaulay tangent cone at the origin if and only if a2 ≤ a21 + a24 . Proof. In this case I(C) is minimally generated by the set G = {f1 = xa1 1 − xa3 13 xa4 14 , f2 = xa2 2 − xa1 21 xa4 24 , f3 = xa3 3 − xa1 31 xa2 32 , f4 = xa4 4 − xa2 42 xa3 43 , f5 = xa1 21 xa3 43 − xa2 32 xa4 14 }. If a2 ≤ a21 + a24 , then we have, from Theorem 2.8 in [2], that the curve C has Cohen-Macaulay tangent cone at the origin. Conversely suppose that C has CohenMacaulay tangent cone at the origin. Since I(C) is generated by the indispensable binomials, every binomial fi , 1 ≤ i ≤ 5, is indispensable of I(C). In particular the 8 F. ARSLAN, A. KATSABEKIS, AND M. NALBANDIYAN binomial f2 is indispensable of I(C). If there exists a monomial N 6= xa1 21 xa4 24 such that g = xa2 2 − N belongs to I(C), then we can replace f2 in G by the binomials g and N − xa1 21 xa4 24 ∈ I(C), a contradiction to the fact that f2 is indispensable. Thus N = xa1 21 xa4 24 . But a2 n2 ∈ n1 + S and therefore we have, from Theorem 1.1, that a2 ≤ a21 + a24 . Remark 3.8. Suppose that I(C) is given as in case 1(b). (1) It holds that a1 > a13 + a14 and a4 < a41 + a42 . 34 (2) If a42 ≤ a32 , then xa3 3 +a13 − xa1 21 x2a32 −a42 x2a ∈ I(C). 4 a3 +a13 a1 a32 a34 −a14 (3) If a14 ≤ a34 , then the binomial x3 − x1 x2 x4 belongs to I(C). Proposition 3.9. Suppose that I(C) is given as in case 1(b). Then C has CohenMacaulay tangent cone at the origin if and only if (1) a2 ≤ a21 + a23 , (2) a42 + a13 ≤ a21 + a34 and u (3) for every monomial M = xu2 2 x3 3 xu4 4 , where u2 < a42 , u3 ≥ a3 and u4 < a14 , with u2 n2 + u3 n3 + u4 n4 ∈ n1 + S there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). Proof. In this case I(C) is minimally generated by the set G = {f1 = xa1 1 − xa3 13 xa4 14 , f2 = xa2 2 − xa1 21 xa3 23 , f3 = xa3 3 − xa2 32 xa4 34 , f4 = xa4 4 − xa1 41 xa2 42 , f5 = xa1 21 xa4 34 − xa2 42 xa3 13 }. Suppose that C has Cohen-Macaulay tangent cone at the origin. Since I(C) is generated by the indispensable binomials, every binomial fi , 1 ≤ i ≤ 5, is indispensable of I(C). In particular the binomials f2 and f5 are indispensable of I(C). Therefore both inequalities a2 ≤ a21 + a23 and a42 + a13 ≤ a21 + a34 hold. By Theorem 1.1 condition (3) is also true. Conversely, from Proposition 2.5 (iii), it is enough to consider a monomial M = xu2 2 xu3 3 xu4 4 , where u2 < a2 , u3 ≥ 0 and u4 < a4 , with the property: there exists at least one monomial P such that 1 ∈ supp(P ) and also M − P is in I(C). Suppose that u3 ≥ a3 . If u4 ≥ a14 , then we let P = xa1 1 xu2 2 xu3 3 −a13 xu4 4 −a14 . So we have that M −P ∈ I(C) and also deg(M ) < deg(P ) since a13 +a14 < a1 . Similarly if u2 ≥ a42 , then we let P = xa1 21 x2u2 −a42 xu3 3 −a13 x4u4 +a34 . So we have that M − P ∈ I(C) and also deg(M ) ≤ deg(P ). If both inequalities u4 < a14 and u2 < a42 hold, then condition (3) implies that there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). Suppose now that u3 < a3 . Recall that M − P ∈ I(C) and G generates I(C). Then M is divided by at least one of the monomials xa2 42 xa3 13 , xa3 13 xa4 14 and xa2 32 xa4 34 . If M is divided by xa2 42 xa3 13 , then M = x2a42 +p x3a13 +q xu4 4 , for some non-negative integers p and q, so M − xa1 21 xp2 xq3 xa4 34 +u4 ∈ I(C) and also deg(M ) ≤ deg(xa1 21 xp2 xq3 xa4 34 +u4 ). If M is divided by xa3 13 xa4 14 , then M = xu2 2 x3a13 +p x4a14 +q , for some non-negative integers p and q, and therefore the binomial M − xa1 1 xu2 2 xp3 xq4 ∈ I(C) and also deg(M ) < deg(xa1 1 xu2 2 xp3 xq4 ). Assume that neither xa2 32 xa4 34 nor xa3 13 xa4 14 divides M . Then necessarily xa2 42 xa3 13 divides M . But M is not divided by any leading monomial of G with respect to lex − inf such that x1 >lex x2 >lex x3 >lex x4 . Thus m = u2 n2 + u3 n3 + u4 n4 is in Q, a contradiction to the fact that m − n1 ∈ S. Therefore, from Proposition 2.5, C has Cohen-Macaulay tangent cone at the origin. Proposition 3.10. Suppose that I(C) is given as in case 1(b). Assume that C has Cohen-Macaulay tangent cone at the origin and also a42 ≤ a32 . (1) If a34 < a14 , then a3 + a13 ≤ a21 + a32 − a42 + 2a34 . (2) If a14 ≤ a34 , then a3 + a13 ≤ a1 + a32 + a34 − a14 . COHEN-MACAULAYNESS OF TANGENT CONES OF MONOMIAL CURVES IN A4 (K) 9 Proof. First of all we note that a21 + a32 − a42 + 2a34 < a1 + a32 + a34 − a14 , since a14 + a34 < a41 + a42 = a1 − a21 + a42 , so a34 < a1 − a21 + a42 − a14 and therefore a21 + a32 − a42 + 2a34 = a34 + (a21 + a32 − a42 + a34 ) < a1 + a32 + a34 − a14 . Since C has Cohen-Macaulay tangent cone at the origin, there is a monomial M with 1 ∈ supp(M ) such that xa3 3 +a13 − M ∈ I(C) and also a3 + a13 ≤ deg(M ). Now P5 xa3 3 +a13 − M ∈ I(C), so xa3 3 +a13 − M = i=1 Hi fi for some Hi ∈ K[x1 , . . . , x4 ]. P5 Then xa3 3 +a13 arise as a term in the sum i=1 Hi fi , so Q = −xa2 32 xa3 13 xa4 34 is a P5 term in the sum i=1 Hi fi , therefore Q should be canceled with another term of the above sum. We distinguish the following cases: 34 (1) a34 < a14 . Suppose that M 6= xa1 21 xa2 32 −a42 x2a . Note that xa2 32 xa3 13 xa4 34 is di4 a42 a13 a32 a34 34 vided only by x2 x3 and x2 x4 . Thus the term T = −xa1 21 x2a32 −a42 x2a arise 4 P5 in the sum i=1 Hi fi and it should be canceled with another term of the sum. Consequently the monomial xa1 41 xa2 42 must divide −T , so a41 ≤ a21 and a42 ≤ a32 − a42 . P5 Therefore the term R = −x1a21 −a41 x2a32 −2a42 xa4 4 +2a34 arise in the sum i=1 Hi fi . Note that deg(−R) < a21 + a32 − a42 + 2a34 . If M = −R, then we are done. Otherwise R should be canceled with another term of the above sum. Thus xa1 41 xa2 42 must divide −R, so a41 ≤ a21 − a41 and a42 ≤ a32 −P 2a42 . Consequently the term 5 4 +2a34 arise in the sum V = −x1a21 −2a41 x2a32 −3a42 x2a 4 i=1 Hi fi . If M = −V , then we are done. Otherwise V should be canceled with another term of the above sum. 34 Continuing this way we finally reach a contradiction. Thus M = xa1 21 xa2 32 −a42 x2a . 4 a21 a32 −a42 2a34 a1 a32 a34 −a14 (2) a14 ≤ a34 . Suppose that M 6= x1 x2 x4 and also M 6= x1 x2 x4 . Note that xa2 32 xa3 13 xa4 34 is divided only by xa2 32 xa4 34 , xa3 13 xa4 14 and xa2 42 xa3 13 . If the P5 term T = −xa1 1 xa2 32 x4a34 −a14 arise in the sum i=1 Hi fi , then it should be canceled with another term of the above sum. Note that xa1 1 xa2 32 x4a34 −a14 is divided 34 by xa1 41 xa2 42 , so the term T = −xa1 21 xa2 32 −a42 x4a4 +a34 −a14 = −xa1 21 x2a32 −a42 x2a 4 P5 arise in the sum i=1 Hi fi . Since M 6= −T , T should be canceled with another term of the above sum. Then a41 ≤ a21 and a42P≤ a32 − a42 . Thus the 5 term R = −x1a21 −a41 x2a32 −2a42 xa4 4 +2a34 arise in the sum i=1 Hi fi . If M = −R, then we are done. Otherwise R should be canceled with another term of the above sum. Continuing this way we finally reach a contradiction. Thus either 34 M = xa1 21 xa2 32 −a42 x2a or M = xa1 1 xa2 32 x4a34 −a14 . 4 Theorem 3.11. Suppose that I(C) is given as in case 1(b) and also that a42 ≤ a32 . Then C has Cohen-Macaulay tangent cone at the origin if and only if (1) a2 ≤ a21 + a23 , (2) a42 + a13 ≤ a21 + a34 and (3) either a34 < a14 and a3 + a13 ≤ a21 + a32 − a42 + 2a34 or a14 ≤ a34 and a3 + a13 ≤ a1 + a32 + a34 − a14 . Proof. (=⇒) From Proposition 3.9 we have that conditions (1) and (2) are true. From Proposition 3.10 the condition (3) is also true. (⇐=) From Proposition 3.9 it is enough to consider a monomial N = xu2 2 xu3 3 xu4 4 , where u2 < a42 , u3 ≥ a3 and u4 < a14 , with the property: there exists at least one monomial P such that 1 ∈ supp(P ) and also N − P is in I(C). Suppose that u3 ≥ 34 a3 + a13 and let M denote either the monomial xa1 21 x2a32 −a42 x2a when a34 < a14 4 a1 a32 a34 −a14 u2 u3 −a3 −a13 u4 or the monomial x1 x2 x4 when a14 ≤ a34 . Let P = x2 x3 x4 M . We have that N − P ∈ I(C) and deg(N ) = u2 + u3 + u4 ≤ u2 + u3 + u4 + deg(M ) − a3 − a13 = deg(P ). It suffices to consider the case that u3 − a3 < a13 . Recall that G = {f1 , . . . , f5 } P5 generates I(C). The binomial N − P belongs to I(C), so N − P = i=1 Hi fi for some polynomials Hi ∈ K[x1 , . . . , x4 ] and therefore N is a term in the sum 10 F. ARSLAN, A. KATSABEKIS, AND M. NALBANDIYAN P5 a13 a14 a2 i=1 Hi fi . Note that N is not divided by any of the monomials x3 x4 , x2 , a32 a34 a4 a42 a13 a3 x2 x4 , x4 and x2 x3 . Now the monomial N is divided by the monomial x3 , P5 so Q = −x2u2 +a32 xu3 3 −a3 x4u4 +a34 is a term in the sum i=1 Hi fi and should be canceled with another term of the above sum. Remark that u2 + a32 < a2 and u4 + a34 < a4 . Thus xa2 42 xa3 13 divides −Q, so u3 − a3 ≥ a13 a contradiction. Proposition 3.12. Suppose that I(C) is given as in case 1(b) and also that a32 < a42 . If C has Cohen-Macaulay tangent cone at the origin, then (1) a2 ≤ a21 + a23 , (2) a42 + a13 ≤ a21 + a34 and (3) a3 + a13 ≤ a1 + a32 + a34 − a14 . Proof. From Proposition 3.9 we have that conditions (1) and (2) are true. Suppose first that a14 ≤ a34 . Again from Proposition 3.9, for u2 = u4 = 0 and u3 = a3 + a13 , we deduce that there exists a monomial M with 1 ∈ supp(M ) such that xa3 3 +a13 − M ∈ I(C) and a3 + a13 ≤ deg(M ). Since the binomial x3a3 +a13 − M P5 belongs to I(C), we have that xa3 3 +a13 − M = some polynomials i=1 Hi fi forP 5 Hi ∈ K[x1 , . . . , x4 ]. Then xa3 3 +a13 arise as a term in the sum i=1 Hi fi , so Q = P5 a32 a13 a34 −x2 x3 x4 is a term in the sum i=1 Hi fi , therefore Q should be canceled with another term of the above sum. Thus T = −xa1 1 xa2 32 x4a34 −a14 is a term in the sum P5 a1 a32 a34 −a14 . Then T should be canceled with i=1 Hi fi . Suppose that M 6= x1 x2 x4 another term of the above sum, a contradiction. Thus M = xa1 1 xa2 32 x4a34 −a14 and also a3 + a13 ≤ a1 + a32 + a34 − a14 . Suppose now that a14 > a34 . Note that xa1 1 xa2 32 − xa3 3 +a13 x4a14 −a34 ∈ I(C). Thus a1 + a32 > a3 + a13 + a14 − a34 . Theorem 3.13. Suppose that I(C) is given as in case 1(b) and also that a32 < a42 . Assume that a14 ≤ a34 . Then C has Cohen-Macaulay tangent cone at the origin if and only if (1) a2 ≤ a21 + a23 , (2) a42 + a13 ≤ a21 + a34 and (3) a3 + a13 ≤ a1 + a32 + a34 − a14 . Proof. (=⇒) From Proposition 3.12 we have that conditions (1), (2) and (3) are true. (⇐=) From Proposition 3.9 it is enough to consider a monomial N = xu2 2 xu3 3 xu4 4 , where u2 < a42 , u3 ≥ a3 and u4 < a14 , with the property: there exists at least one monomial P such that 1 ∈ supp(P ) and also N − P is in I(C). Suppose that u3 ≥ a3 + a13 . Let P = xa1 1 x2u2 +a32 x3u3 −a3 −a13 x4u4 +a34 −a14 . We have that N − P ∈ I(C) and deg(N ) = u2 + u3 + u4 ≤ u2 + u3 + u4 + a1 + a32 + a34 − a14 − a3 − a13 = deg(P ). It suffices to assume that u3 − a3 < a13 . Since the binomial N − P belongs to I(C), P5 we have that N − P = i=1 Hi fi for some polynomials Hi ∈ K[x1 , . . . , x4 ]. So P5 N is a term in the sum i=1 Hi fi . Then T = −x2u2 +a32 xu3 3 −a3 x4u4 +a34 is a term P5 in the sum i=1 Hi fi and it should be canceled with another term of the above sum. Remark that u2 + a32 < a2 and u4 + a34 < a4 . Thus xa2 42 xa3 13 divides −T , so u3 − a3 ≥ a13 a contradiction. Example 3.14. Consider n1 = 1199, n2 = 2051, n3 = 2352 and n4 = 3032. The toric ideal I(C) is minimally generated by the set 3 4 19 7 13 16 8 7 11 9 11 7 7 11 3 G = {x16 1 − x3 x4 , x2 − x1 x3 , x3 − x2 x4 , x4 − x1 x2 , x1 x4 − x2 x3 }. Here a1 = 16, a32 = 8, a42 = 11, a14 = 4, a34 = 7, a13 = 3 and a3 = 16. Note that a2 = 19 < 20 = a21 + a23 and a42 + a13 = 14 = a21 + a34 . We have that COHEN-MACAULAYNESS OF TANGENT CONES OF MONOMIAL CURVES IN A4 (K) 11 a3 + a13 = 19 < 27 = a1 + a32 + a34 − a14 . Thus C has Cohen-Macaulay tangent cone at the origin. Remark 3.15. Suppose that I(C) is given as in case 2(a). (1) It holds that a1 > a12 + a13 , a2 > a23 + a24 and a4 < a41 + a42 . 23 a24 −a34 (2) If a34 ≤ a24 , then xa2 2 +a12 − xa1 41 x2a x4 ∈ I(C). 3 a2 +a12 (3) If a13 ≤ a23 , then the binomial x2 − xa1 1 x3a23 −a13 xa4 24 belongs to I(C). Proposition 3.16. Suppose that I(C) is given as in case 2(a). Then C has CohenMacaulay tangent cone at the origin if and only if (1) a3 ≤ a31 + a34 , (2) a12 + a34 ≤ a41 + a23 and u (3) for every monomial M = xu2 2 x3 3 xu4 4 , where u2 ≥ a2 , u3 < a13 and u4 < a34 , with u2 n2 + u3 n3 + u4 n4 ∈ n1 + S there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). Proof. In this case I(C) is minimally generated by the set G = {f1 = xa1 1 − xa2 12 xa3 13 , f2 = xa2 2 − xa3 23 xa4 24 , f3 = xa3 3 − xa1 31 xa4 34 , f4 = xa4 4 − xa1 41 xa2 42 , f5 = xa1 41 xa3 23 − xa2 12 xa4 34 }. Suppose that C has Cohen-Macaulay tangent cone at the origin. Since I(C) is generated by the indispensable binomials, every binomial fi , 1 ≤ i ≤ 5, is indispensable of I(C). In particular the binomials f3 and f5 are indispensable of I(C). Therefore the inequalities a3 ≤ a31 + a34 and a12 + a34 ≤ a41 + a23 hold. By Theorem 1.1 condition (3) is also true. To prove the converse statement, from Proposition 2.6 (i), it is enough to consider a monomial M = xu2 2 xu3 3 xu4 4 , where u2 ≥ a2 , u3 < a3 and u4 < a4 , with the property: there exists at least one monomial P such that 1 ∈ supp(P ) and also M − P is in I(C). If u3 ≥ a13 , then we let P = xa1 1 xu2 2 −a12 xu3 3 −a13 xu4 4 . So we have that M − P ∈ I(C) and also deg(M ) < deg(P ). Similarly if u4 ≥ a34 , then we let P = xa1 41 xu2 2 −a12 x3u3 +a23 xu4 4 −a34 . So we have that M − P ∈ I(C) and also deg(M ) ≤ deg(P ). If both conditions u3 < a13 and u4 < a34 hold, then condition (3) implies that there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). Therefore, from Proposition 2.6, C has Cohen-Macaulay tangent cone at the origin. The proof of the next proposition is similar to that of Proposition 3.10 and therefore it is omitted. Proposition 3.17. Suppose that I(C) is given as in case 2(a). Assume that C has Cohen-Macaulay tangent cone at the origin and also a34 ≤ a24 . (1) If a23 < a13 , then a2 + a12 ≤ a41 + 2a23 + a24 − a34 . (2) If a13 ≤ a23 , then a2 + a12 ≤ a1 + a23 − a13 + a24 . Theorem 3.18. Suppose that I(C) is given as in case 2(a) and also that a34 ≤ a24 . Then C has Cohen-Macaulay tangent cone at the origin if and only if (1) a3 ≤ a31 + a34 , (2) a12 + a34 ≤ a41 + a23 and (3) either a23 < a13 and a2 + a12 ≤ a41 + 2a23 + a24 − a34 or a13 ≤ a23 and a2 + a12 ≤ a1 + a23 − a13 + a24 . Proof. (=⇒) From Proposition 3.16 we have that conditions (1) and (2) are true. From Proposition 3.17 the condition (3) is also true. (⇐=) From Proposition 3.16 it is enough to consider a monomial N = xu2 2 xu3 3 xu4 4 , where u2 ≥ a2 , u3 < a13 and u4 < a34 , with the property: there exists at least one monomial P such that 1 ∈ supp(P ) and also N − P is in I(C). Suppose that u2 ≥ 12 F. ARSLAN, A. KATSABEKIS, AND M. NALBANDIYAN 23 a24 −a34 a2 + a12 and let M denote either the monomial xa1 41 x2a x4 when a23 < a13 3 a1 a23 −a13 a24 or the monomial x1 x3 x4 when a13 ≤ a23 . Let P = xu2 2 −a2 −a12 xu3 3 xu4 4 M . We have that N − P ∈ I(C) and deg(N ) = u2 + u3 + u4 ≤ u2 + u3 + u4 + deg(M ) − a2 − a12 = deg(P ). It suffices to consider the case that u2 − P a2 < a12 . Since the binomial N − P 5 belongs to I(C), we have that N − P = i=1 Hi fi for some polynomials Hi ∈ K[x1 , . . . , x4 ]. Now the monomial N is divided by the monomial xa2 2 , so Q = P5 −xu2 2 −a2 x3u3 +a23 x4u4 +a24 is a term in the sum i=1 Hi fi and should be canceled with another term of the above sum. Remark that u3 + a23 < a3 and u4 + a24 < a4 . Thus xa2 12 xa4 34 divides −Q, so u2 − a2 ≥ a12 a contradiction. Proposition 3.19. Suppose that I(C) is given as in case 2(a) and also that a24 < a34 . If C has Cohen-Macaulay tangent cone at the origin then (1) a3 ≤ a31 + a34 , (2) a12 + a34 ≤ a41 + a23 and (3) a2 + a12 ≤ a1 + a23 − a13 + a24 . Proof. From Proposition 3.16 we have that conditions (1) and (2) are true. Suppose first that a13 ≤ a23 . Again from Proposition 3.16, for u2 = a2 + a12 and u3 = u4 = 0, we deduce that there exists a monomial M with 1 ∈ supp(M ) such that xa2 2 +a12 − M ∈ I(C) and a2 + a12 ≤ deg(M ). Since the binomial xa2 2 +a12 − M P5 polynomibelongs to I(C), we have that xa2 2 +a12 − M = i=1 Hi fi for some P5 a2 +a12 als Hi ∈ K[x1 , . . . , x4 ]. Then x2 arise as a term in the sum i=1 Hi fi , so P5 Q = −xa2 12 xa3 23 xa4 24 is a term in the sum i=1 Hi fi , therefore Q should be canceled with another term of the above sum. Thus T = −xa1 1 x3a23 −a13 xa4 24 is a term in the P5 sum i=1 Hi fi . Suppose that M 6= xa1 1 x3a23 −a13 xa4 24 . Then T should be canceled with another term of the above sum, a contradiction. Thus M = xa1 1 x3a23 −a13 xa4 24 and also a2 + a12 ≤ a1 + a23 − a13 + a24 . Suppose now that a13 > a23 . Note that xa1 1 xa4 24 − xa2 2 +a12 xa3 13 −a23 ∈ I(C). Thus there is a monomial N with 1 ∈ supp(N ) such that xa2 2 +a12 x3a13 −a23 −N ∈ I(C) and P5 a2 + a12 + a13 − a23 ≤ deg(N ). We have that xa2 2 +a12 x3a13 −a23 − N = i=1 Hi fi for some polynomials Hi ∈ K[x1 , . . . , x4 ]. Then xa2 2 +a12 x3a13 −a23 arise as a term in the P5 P5 sum i=1 Hi fi , so Q = −xa2 12 xa3 13 xa4 24 is a term in the sum i=1 Hi fi , therefore Q should be canceled with another term of the above sum. Thus T = −xa1 1 xa4 24 is a P term in the sum 5i=1 Hi fi . Let us suppose that N 6= xa1 1 xa4 24 . But then T should be canceled with another term of the above sum a contradiction. Thus N = xa1 1 xa4 24 and also a2 + a12 + a13 − a23 ≤ a1 + a24 . Theorem 3.20. Suppose that I(C) is given as in case 2(a) and also that a24 < a34 . Assume that a13 ≤ a23 . Then C has Cohen-Macaulay tangent cone at the origin if and only if (1) a3 ≤ a31 + a34 , (2) a12 + a34 ≤ a41 + a23 and (3) a2 + a12 ≤ a1 + a23 − a13 + a24 . Proof. (=⇒) From Proposition 3.19 we have that conditions (1), (2) and (3) are true. (⇐=) From Proposition 3.16 it is enough to consider a monomial N = xu2 2 xu3 3 xu4 4 , where u2 ≥ a2 , u3 < a13 and u4 < a34 , with the property: there exists at least one monomial P such that 1 ∈ supp(P ) and also N − P is in I(C). Suppose that u2 ≥ a2 + a12 . Let P = xa1 1 x2u2 −a2 −a12 x3u3 +a23 −a13 x4u4 +a24 . We have that N − P ∈ I(C) and deg(N ) = u2 + u3 + u4 ≤ u2 + u3 + u4 + a1 + a23 − a13 + a24 − a2 − a12 = deg(P ). COHEN-MACAULAYNESS OF TANGENT CONES OF MONOMIAL CURVES IN A4 (K) 13 It suffices to assume that u2 P − a2 < a12 . Since the binomial N − P belongs to I(C), we have that N − P = 5i=1 Hi fi for some polynomials Hi ∈ K[x1 , . . . , x4 ]. P5 Then T = −x2u2 −a2 x3u3 +a23 x4u4 +a24 is a term in the sum i=1 Hi fi and it should be canceled with another term of the above sum. Thus xa2 12 xa4 34 divides −T , so u2 − a2 ≥ a12 a contradiction. Example 3.21. Consider n1 = 627, n2 = 1546, n3 = 1662 and n4 = 3377. The toric ideal I(C) is minimally generated by the set 3 4 25 7 8 11 13 3 11 5 22 5 7 3 3 G = {x18 1 − x2 x3 , x2 − x3 x4 , x3 − x1 x4 , x4 − x1 x2 , x1 x3 − x2 x4 }. Here a24 = 8, a34 = 3, a12 = 3, a1 = 18, a2 = 25 and a13 = 4 < 7 = a23 . Note that a3 = 11 < 14 = a31 + a34 and a12 + a34 = 6 < 12 = a41 + a23 . We have that a2 + a12 = 28 < 29 = a1 + a23 − a13 + a24 . Thus C has Cohen5 14 5 Macaulay tangent cone at the origin. Remark that x28 2 − x1 x3 x4 ∈ I(C), but 28 5 14 5 deg(x2 ) = 28 > 24 = deg(x1 x3 x4 ). Remark 3.22. Suppose that I(C) is given as in case 2(b). (1) It holds that a1 > a12 + a13 , a4 < a41 + a43 and a24 + a13 < a41 + a32 . 32 a34 −a24 (2) If a24 ≤ a34 , then xa3 3 +a13 − xa1 41 x2a x4 ∈ I(C). 2 a3 +a13 a1 a32 −a12 a34 (3) If a12 ≤ a32 , then the binomial x3 − x1 x2 x4 belongs to I(C). Proposition 3.23. Suppose that I(C) is given as in case 2(b). Then C has CohenMacaulay tangent cone at the origin if and only if (1) a2 ≤ a21 + a24 and u (2) for every monomial xu2 2 x3 3 xu4 4 , where u2 < a12 , u3 ≥ a3 and u4 < a24 , with u2 n2 + u3 n3 + u4 n4 ∈ n1 + S there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). Proof. In this case I(C) is minimally generated by the set G = {f1 = xa1 1 − xa2 12 xa3 13 , f2 = xa2 2 − xa1 21 xa4 24 , f3 = xa3 3 − xa2 32 xa4 34 , f4 = xa4 4 − xa1 41 xa3 43 , f5 = xa1 41 xa2 32 − xa3 13 xa4 24 }. Suppose that C has Cohen-Macaulay tangent cone at the origin. Since I(C) is generated by the indispensable binomials, every binomial fi , 1 ≤ i ≤ 5, is indispensable of I(C). In particular the binomial f2 is indispensable of I(C). Therefore the inequality a2 ≤ a21 + a24 holds. By Theorem 1.1 condition (2) is also true. Conversely, from Proposition 2.5 (iii), it is enough to consider a monomial M = xu2 2 xu3 3 xu4 4 , where u2 < a2 , u3 ≥ 0 and u4 < a4 , with the property: there exists at least one monomial P such that 1 ∈ supp(P ) and also degS (M ) = degS (P ). Suppose that u3 ≥ a3 . If u2 ≥ a12 , then we let P = xa1 1 xu2 2 −a12 xu3 3 −a13 xu4 4 . So we have that M − P ∈ I(C) and also deg(M ) < deg(P ). Similarly if u4 ≥ a24 , then we let P = xa1 41 x2u2 +a32 xu3 3 −a13 xu4 4 −a24 . So we have that M − P ∈ I(C) and also deg(M ) < deg(P ). If both conditions u2 < a12 and u4 < a24 hold, then condition (2) implies that there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). Suppose now that u3 < a3 . Then M is divided by at least one of the monomials xa2 12 xa3 13 , xa3 13 xa4 24 and xa2 32 xa4 34 . If M is divided by xa2 12 xa3 13 , then M = x2a12 +p x3a13 +q xu4 4 , for some non-negative integers p and q, so M − xa1 1 xp2 xq3 xu4 4 ∈ I(C) and also deg(M ) < deg(xa1 1 xp2 xq3 xu4 4 ). If M is divided by xa3 13 xa4 24 , then M = xu2 2 x3a13 +p x4a24 +q , for some non-negative integers p and q, and therefore the binomial M − xa1 41 x2u2 +a32 xp3 xq4 ∈ I(C) and also deg(M ) ≤ deg(x1a41 x2u2 +a32 xp3 xq4 ). Assume that neither xa2 12 xa3 13 nor xa3 13 xa4 24 divides M . Then necessarily xa2 32 xa4 34 divides M . But M is not divided by any leading monomial of G with respect to lex − inf such that x1 >lex x2 >lex x3 >lex 14 F. ARSLAN, A. KATSABEKIS, AND M. NALBANDIYAN x4 . Thus m = u2 n2 +u3 n3 +u4 n4 is in Q, a contradiction to the fact that m−n1 ∈ S. Therefore, from Proposition 2.5, C has Cohen-Macaulay tangent cone at the origin. The proof of the following proposition is similar to that of Proposition 3.10 and therefore it is omitted. Proposition 3.24. Suppose that I(C) is given as in case 2(b). Assume that C has Cohen-Macaulay tangent cone at the origin and also a24 ≤ a34 . (1) If a32 < a12 , then a3 + a13 ≤ a41 + 2a32 + a34 − a24 . (2) If a12 ≤ a32 , then a3 + a13 ≤ a1 + a32 − a12 + a34 . Theorem 3.25. Suppose that I(C) is given as in case 2(b) and also that a24 ≤ a34 . Then C has Cohen-Macaulay tangent cone at the origin if and only if (1) a2 ≤ a21 + a24 and (2) either a32 < a12 and a3 + a13 ≤ a41 + 2a32 + a34 − a24 or a12 ≤ a32 and a3 + a13 ≤ a1 + a32 − a12 + a34 . Proof. (=⇒) From Proposition 3.23 we have that condition (1) is true. From Proposition 3.24 the condition (3) is also true. (⇐=) From Proposition 3.23 it is enough to consider a monomial N = xu2 2 xu3 3 xu4 4 , where u2 < a12 , u3 ≥ a3 and u4 < a24 , with the property: there exists at least one monomial P such that 1 ∈ supp(P ) and also N − P is in I(C). Suppose that u3 ≥ 32 a34 −a24 a3 + a13 and let M denote either the monomial xa1 41 x2a x4 when a32 < a12 2 a1 a32 −a12 a34 or the monomial x1 x2 x4 when a12 ≤ a32 . Let P = xu2 2 x3u3 −a3 −a13 xu4 4 M . We have that N − P ∈ I(C) and deg(N ) = u2 + u3 + u4 ≤ u2 + u3 + u4 + deg(M ) − a3 − a13 = deg(P ). It suffices to consider the case that u3 − P a3 < a13 . Since the binomial N − P 5 belongs to I(C), we have that N − P = i=1 Hi fi for some polynomials Hi ∈ K[x1 , . . . , x4 ]. Now the monomial N is divided by the monomial xa3 3 , so Q = P5 −x2u2 +a32 xu3 3 −a3 x4u4 +a34 is a term in the sum i=1 Hi fi and it should be canceled with another term of the above sum. Remark that u2 + a32 < a2 and u4 + a34 < a4 . Thus xa3 13 xa4 24 divides −Q, so u3 − a3 ≥ a13 a contradiction. Proposition 3.26. Suppose that I(C) is given as in case 2(b) and also that a34 < a24 . If C has Cohen-Macaulay tangent cone then (1) a2 ≤ a21 + a24 and (2) a3 + a13 ≤ a1 + a32 − a12 + a34 . Theorem 3.27. Suppose that I(C) is given as in case 2(b) and also that a34 < a24 . Assume that a12 ≤ a32 . Then C has Cohen-Macaulay tangent cone at the origin if and only if (1) a2 ≤ a21 + a24 and (2) a3 + a13 ≤ a1 + a32 − a12 + a34 . Example 3.28. Consider n1 = 813, n2 = 1032, n3 = 1240 and n4 = 1835. The toric ideal I(C) is minimally generated by the set 9 3 14 11 3 16 5 8 11 5 13 5 5 3 3 G = {x16 1 − x2 x3 , x2 − x1 x4 , x3 − x2 x4 , x4 − x1 x3 , x1 x2 − x3 x4 }. Here a13 = a24 = 3, a34 = 8, a41 = 5, a3 = 16 and a32 = 5 < 9 = a12 . Note that a2 = 14 = a21 + a24 . We have that a3 + a13 = 19 < 20 = a41 + 2a32 + a34 − a24 . Consequently C has Cohen-Macaulay tangent cone at the origin. Theorem 3.29. Suppose that I(C) is given as in case 3(a). Then C has CohenMacaulay tangent cone at the origin if and only if a2 ≤ a21 +a23 and a3 ≤ a31 +a34 . COHEN-MACAULAYNESS OF TANGENT CONES OF MONOMIAL CURVES IN A4 (K) 15 Proof. In this case I(C) is minimally generated by the set G = {f1 = xa1 1 − xa2 12 xa4 14 , f2 = xa2 2 − xa1 21 xa3 23 , f3 = xa3 3 − xa1 31 xa4 34 , f4 = xa4 4 − xa2 42 xa3 43 , f5 = xa1 31 xa2 42 − xa3 23 xa4 14 }. If a2 ≤ a21 + a23 and a3 ≤ a31 + a34 , then we have, from Theorem 2.10 in [2], that the curve C has Cohen-Macaulay tangent cone at the origin. Conversely suppose that C has Cohen-Macaulay tangent cone at the origin. Since I(C) is generated by the indispensable binomials, every binomial fi , 1 ≤ i ≤ 5, is indispensable of I(C). In particular the binomials f2 and f3 are indispensable of I(C). If there exists a monomial N 6= xa1 31 xa4 34 such that g = xa3 3 − N belongs to I(C), then we can replace f3 in S by the binomials g and N − xa1 31 xa4 34 ∈ I(C), a contradiction to the fact that f3 is indispensable. Thus N = xa1 31 xa4 34 and therefore, from Theorem 1.1, we have that a3 ≤ a31 + a34 . Similarly we get that a2 ≤ a21 + a23 . Remark 3.30. Suppose that I(C) is given as in case 3(b). (1) It holds that a1 > a12 + a14 , a2 > a23 + a24 , a3 < a31 + a32 and a4 < a41 + a43 . 24 (2) If a43 ≤ a23 , then xa2 2 +a12 − xa1 31 x3a23 −a43 x2a ∈ I(C). 4 a2 +a12 a1 a23 a24 −a14 (3) If a14 ≤ a24 , then the binomial x2 − x1 x3 x4 belongs to I(C). Proposition 3.31. Suppose that I(C) is given as in case 3(b). Then C has CohenMacaulay tangent cone at the origin if and only if (1) a12 + a43 ≤ a31 + a24 and u (2) for every monomial M = xu2 2 x3 3 xu4 4 , where u2 ≥ a2 , u3 < a43 and u4 < a14 , with u2 n2 + u3 n3 + u4 n4 ∈ n1 + S there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). Proof. In this case I(C) is minimally generated by the set G = {f1 = xa1 1 − xa2 12 xa4 14 , f2 = xa2 2 − xa3 23 xa4 24 , f3 = xa3 3 − xa1 31 xa2 32 , f4 = xa4 4 − xa1 41 xa3 43 , f5 = xa1 31 xa4 24 − xa2 12 xa3 43 }. Suppose that C has Cohen-Macaulay tangent cone at the origin. Since I(C) is generated by the indispensable binomials, every binomial fi , 1 ≤ i ≤ 5, is indispensable of I(C). In particular the binomial f5 is indispensable of I(C). Therefore the inequality a12 + a43 ≤ a31 + a24 holds. By Theorem 1.1 condition (2) is also true. Conversely, from Proposition 2.6 (i), it is enough to consider a monomial M = xu2 2 xu3 3 xu4 4 , where u2 ≥ a2 , u3 < a3 and u4 < a4 , with the property: there exists at least one monomial P such that 1 ∈ supp(P ) and also M −P is in I(C). If u3 ≥ a43 , then we let P = xa1 31 xu2 2 −a12 xu3 3 −a43 x4u4 +a24 . So we have that M −P ∈ I(C) and also deg(M ) ≤ deg(P ). Similarly if u4 ≥ a14 , then we let P = xa1 1 xu2 2 −a12 xu3 3 xu4 4 −a14 . So we have that M −P ∈ I(C) and also deg(M ) < deg(P ). If both conditions u3 < a43 and u4 < a14 hold, then condition (2) implies that there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). Therefore, from Proposition 2.6, C has Cohen-Macaulay tangent cone at the origin. The proof of the next proposition is similar to that of Proposition 3.10 and therefore it is omitted. Proposition 3.32. Suppose that I(C) is given as in case 3(b). Assume that C has Cohen-Macaulay tangent cone at the origin and also a43 ≤ a23 . (1) If a24 < a14 , then a2 + a12 ≤ a31 + 2a24 + a23 − a43 . (2) If a14 ≤ a24 , then a2 + a12 ≤ a1 + a23 + a24 − a14 . Theorem 3.33. Suppose that I(C) is given as in case 3(b) and a43 ≤ a23 . Then C has Cohen-Macaulay tangent cone at the origin if and only if (1) a12 + a43 ≤ a31 + a24 and 16 F. ARSLAN, A. KATSABEKIS, AND M. NALBANDIYAN (2) either a24 < a14 and a2 + a12 ≤ a31 + 2a24 + a23 − a43 or a14 ≤ a24 and a2 + a12 ≤ a1 + a23 + a24 − a14 . Proof. (=⇒) From Proposition 3.31 we have that conditions (1) and (2) are true. From Proposition 3.32 the condition (3) is also true. (⇐=) From Proposition 3.31 it is enough to consider a monomial N = xu2 2 xu3 3 xu4 4 , where u2 ≥ a2 , u3 < a43 and u4 < a14 , with the property: there exists at least one monomial P such that 1 ∈ supp(P ) and also N − P is in I(C). Suppose that u2 ≥ 24 a2 + a12 and let M denote either the monomial xa1 31 x3a23 −a43 x2a when a24 < a14 4 a31 a23 a24 −a14 u2 −a2 −a12 u3 u4 or the monomial x1 x3 x4 when a14 ≤ a24 . Let P = x2 x3 x4 M . We have that N − P ∈ I(C) and deg(N ) = u2 + u3 + u4 ≤ u2 + u3 + u4 + deg(M ) − a2 − a12 = deg(P ). It suffices to consider the case that u2 − P a2 < a12 . Since the binomial N − P belongs to I(C), we have that N − P = 5i=1 Hi fi for some polynomials Hi ∈ K[x1 , . . . , x4 ]. Now the monomial N is divided by the monomial xa2 2 , so Q = P5 −xu2 2 −a2 x3u3 +a23 x4u4 +a24 is a term in the sum i=1 Hi fi and it should be canceled with another term of the above sum. Remark that u3 + a23 < a3 and u4 + a24 < a4 . Thus xa2 12 xa3 43 divides −Q, so u2 − a2 ≥ a12 a contradiction. Proposition 3.34. Suppose that I(C) is given as in case 3(b) and also that a23 < a43 . If C has Cohen-Macaulay tangent cone at the origin then (1) a12 + a43 ≤ a31 + a24 and (2) a2 + a12 ≤ a1 + a23 + a24 − a14 . Theorem 3.35. Suppose that I(C) is given as in case 3(b) and also that a23 < a43 . Assume that a14 ≤ a24 . Then C has Cohen-Macaulay tangent cone at the origin if and only if (1) a12 + a43 ≤ a31 + a24 and (2) a2 + a12 ≤ a1 + a23 + a24 − a14 . 4. Families of monomial curves supporting Rossi’s problem In this section, we give some examples showing how the criteria given in the previous one can be used to give families of monomial curves supporting Rossi’s problem in A4 (K). Example 4.1. Consider the family n1 = m3 + m2 − m, n2 = m3 + 2m2 + m − 1, n3 = m3 + 3m2 + 2m − 2 and n4 = m3 + 4m2 + 3m − 2 for m ≥ 2 given in [2]. Let Cm be the corresponding monomial curve. The toric ideal I(Cm ) is generated by the set m m 2 m−1 Sm = {xm+3 − x3 xm−1 , xm+2 − xm+2 x4 , xm , 3 − x1 x2 , x4 − x2 x3 1 4 2 1 m−1 xm+2 xm−1 − xm }. 2 x4 1 3 Thus we are in case 1(a) of Remark 3.3 and it is sufficient to consider the binomial xm+2 − xm+2 x4 , which guarantees that Cm has Cohen-Macaulay tangent cone. For 2 1 each fixed m, by using the technique given in [8], we can construct a new family of monomial curves having Cohen-Macaulay tangent cone. For m = 2, we have the symmetric semigroup generated by n1 = 10, n2 = 17, n3 = 22 and n4 = 28. The corresponding monomial curve is C2 and I(C2 ) is minimally generated by the set S2 = {x51 − x3 x4 , x42 − x41 x4 , x23 − x1 x22 , x24 − x22 x3 , x41 x3 − x22 x4 }. By the method given in [8], the semigroup generated by m1 = 10 + 6t, m2 = 17 + 9t, m3 = 22 + 6t and m4 = 28 + 12t (for t a non-negative integer) is symmetric, COHEN-MACAULAYNESS OF TANGENT CONES OF MONOMIAL CURVES IN A4 (K) 17 whenever gcd(10 + 6t, 17 + 9t, 22 + 6t, 28 + 12t) = 1. Moreover, the toric ideal of the corresponding monomial curve is minimally generated by the set t+2 4 4 2 2 2 4 2 {xt+5 − xt+1 − xt+1 1 3 x4 , x2 − x1 x4 , x3 1 x2 , x4 − x2 x3 , x1 x3 − x2 x4 } by the construction in [8]. Here, if t = 1, then m1 < m2 < m3 < m4 , and we are in case 1(a) again. From the binomial x42 − x41 x4 , we deduce that the corresponding monomial curve has Cohen-Macaulay tangent cone. If t ≥ 1, then m2 > m3 . In this case, we interchange them to get the semigroup generated by m′1 = 10 + 6t, m′2 = 22 + 6t, m′3 = 17 + 9t and m′4 = 28 + 12t with m′1 < m′2 < m′3 < m′4 . Thus the toric ideal of the corresponding monomial curve is generated by the set t+2 2 4 4 2 2 4 2 {xt+5 − xt+1 − xt+1 1 2 x4 , x2 1 x3 , x3 − x1 x4 , x4 − x2 x3 , x1 x2 − x3 x4 }. t+1 2 Now we are in case 3(a) of Remark 3.3 and the binomials x43 −x41 x4 and xt+2 2 −x1 x3 guarantee that the corresponding monomial curve has Cohen-Macaulay tangent cone. In this way, we can construct infinitely many families of Gorenstein monomial curves having Cohen-Macaulay tangent cones. In other words, the corresponding local rings have non-decreasing Hilbert functions supporting Rossi’s problem. In the literature, there are no examples of non-complete intersection Gorenstein monomial curve families supporting Rossi’s problem, although their tangent cones are not Cohen-Macaulay. The next example gives a family of monomial curves with the above property. To prove it we will use the following proposition. Proposition 4.2. [3, Proposition 2.2] Let I ⊂ K[x1 , x2 , . . . , xd ] be a monomial ideal and I = hJ, xu i for a monomial ideal J and a monomial xu . Let p(I) denote the numerator g(t) of the Hilbert Series for K[x1 , x2 , . . . , xd ]/I, and let |u| denote the total degree of the monomial xu . Then p(I) = p(J) − t|u| p(J : xu ). Example 4.3. Consider the family n1 = 2m + 1, n2 = 2m + 3, n3 = 2m2 + m − 2 and n4 = 2m2 + m − 1, where m ≥ 4 is an integer. Let Cm be the corresponding monomial curve. The toric ideal I(Cm ) is minimally generated by the binomials m−1 2 m m−1 xm+1 − x2 x3 , xm x4 , x24 − xm − x3 x4 . 2 − x1 x4 , x3 − x2 1 x3 , x1 x2 1 Thus we are in Case 2(b) of Remark 3.3. Consider the binomial xm 2 − x1 x4 . Since m ≥ 4, we have, from Theorem 3.23, that the tangent cone of Cm is not CohenMacaulay. It is enough to show that the Hilbert function of K[x1 , x2 , x3 , x4 ]/I(Cm )∗ is non-decreasing. Where I(Cm )∗ is the ideal generated by the polynomials f∗ for f in I(Cm ) and f∗ is the homogeneous summand of f of least degree. By a standard basis computation, I(Cm )∗ is generated by the set m+2 {x2 x3 , x23 , x1 x4 , x3 x4 , x24 , xm x3 , x2m+1 }. 2 x4 , x1 2 Let m+2 J0 = I(Cm )∗ , J1 = hx23 , x1 x4 , x3 x4 , x24 , xm x3 , x2m+1 i, 2 x4 , x1 2 m+2 m+2 J2 = hx23 , x3 x4 , x24 , xm i, J3 = hx23 , x24 , xm x3 , x2m+1 i. x3 , x2m+1 2 x4 , x1 2 x4 , x1 2 2 Note that Ji = hJi+1 , qi i, where q0 = x2 x3 , q1 = x1 x4 and q2 = x3 x4 . We apply Proposition 4.2 to the ideal Ji for 0 ≤ i ≤ 2, so p(Ji ) = p(Ji+1 ) − t2 p(Ji+1 : qi ). (1) m In this case, we have J1 : (x2 x3 ) = hx3 , x4 , xm+2 , x2m 2 i, J2 : (x1 x4 ) = hx3 , x4 , x2 i 1 m+2 and J3 : (x3 x4 ) = hx3 , x4 , x1 , xm 2 i. Since 2m+1 K[x1 , x2 , x3 , x4 ]/hx23 , xm+2 x3 , x24 , xm i 2 x4 , x2 1 is isomorphic to 2m+1 K[x1 , x3 ]/hx23 , xm+2 x3 i ⊗ K[x2 , x4 ]/hx24 , xm i, 2 x4 , x2 1 18 F. ARSLAN, A. KATSABEKIS, AND M. NALBANDIYAN we obtain p(J3 ) = (1 − t)3 (1 + t − tm+3 )(1 + 2t + · · · + 2tm + tm+1 + · · · + t2m ). Substituting all these recursively in Equation (1), we obtain that the Hilbert series of K[x1 , x2 , x3 , x4 ]/J0 is 1 + 3t + t2 + t3 + · · · + tm + tm+2 + tm+4 + tm+5 + · · · + t2m . 1−t Since the numerator does not have any negative coefficients, the Hilbert function is non-decreasing. In this way, we have shown that the Hilbert function of the local ring corresponding to the non-complete intersection Gorenstein monomial curve Cm is non-decreasing for m ≥ 4. 5. Appendix In the appendix we provide results concerning all the cases of Theorem 2.2, except from Case 1. The proofs are similar to those in section 2 and therefore omitted. Let n1 < n2 < n3 < n4 be positive integers with gcd(n1 , . . . , n4 ) = 1. a Theorem 5.1. Suppose that I(C) is given as in case 2(a). Let {xa1 1 − xai i , xj j − u xakk , xa1 1 − xj j xuk k } be a generating set of CA and assume that nk > nj . Then C has Cohen-Macaulay tangent cone at the origin if and only if (1) for every binomial f = M − N ∈ I with 1 ∈ supp(M ) we have that deg(N ) ≤ deg(M ), (2) for every binomial f = M − N ∈ R with 1 ∈ supp(M ) there is a monomial P with 1 ∈ supp(P ) such that degS (N ) = degS (P ) and deg(N ) ≤ deg(P ) and v (3) for every monomial M = xvi i xj j xvkk , where vi < ai , vj ≥ aj and vk < ak , with vi ni +vj nj +vk nk ∈ n1 +S there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). a Theorem 5.2. Suppose that I(C) is given as in case 2(a). Let {xa1 1 − xai i , xj j − a xakk , xj j − xu1 1 xui i } be a generating set of CA and assume that nk > nj . Then C has Cohen-Macaulay tangent cone at the origin if and only if (1) for every binomial f = M − N ∈ I with 1 ∈ supp(M ) we have that deg(N ) ≤ deg(M ), (2) for every f = M − N ∈ R with 1 ∈ supp(M ) there is a monomial P with 1 ∈ supp(P ) such that degS (N ) = degS (P ) and deg(N ) ≤ deg(P ) and v (3) for every monomial M = xvi i xj j xvkk , where vi < ai , vj ≥ aj and vk < ak , there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). a Corollary 5.3. Suppose that I(C) is given as in case 2(a). Let {xa1 1 − xai i , xj j − a xakk , xj j − xu1 1 xui i } be a generating set of CA and assume that nk > nj . If (1) for every binomial f = M − N ∈ I with 1 ∈ supp(M ) we have that deg(N ) ≤ deg(M ), (2) for every f = M − N ∈ R with 1 ∈ supp(M ) there is a monomial P with 1 ∈ supp(P ) such that degS (N ) = degS (P ) and deg(N ) ≤ deg(P ) and (3) aj ≤ u1 + ui , then C has Cohen-Macaulay tangent cone at the origin. Example 5.4. Consider n1 = 30, n2 = 34, n3 = 42 and n4 = 51. The toric ideal I(C) is minimally generated by the binomials f1 = x71 − x53 , f2 = x32 − x24 and f3 = x32 − x21 x3 . Note that there is no binomial g ∈ I and also no binomial h ∈ R. Then C has Cohen-Macaulay tangent cone by Corollary 5.3. COHEN-MACAULAYNESS OF TANGENT CONES OF MONOMIAL CURVES IN A4 (K) 19 a Theorem 5.5. Suppose that I(C) is given as in case 2(b). Let {xa1 1 −xai i , xj j −xakk } be a generating set of CA and assume that nk > nj . Then C has Cohen-Macaulay tangent cone at the origin if and only if (1) for every binomial f = M − N ∈ I with 1 ∈ supp(M ) we have that deg(N ) ≤ deg(M ), (2) for every f = M − N ∈ R with 1 ∈ supp(M ) there is a monomial P with 1 ∈ supp(P ) such that degS (N ) = degS (P ) and deg(N ) ≤ deg(P ) and u (3) for every monomial M = xui i xj j xuk k , where ui < ai , uj ≥ aj and uk < ak , with ui ni + uj nj + uk nk ∈ n1 + S there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). Example 5.6. Consider n1 = 49, n2 = 63, n3 = 65 and n4 = 78. The toric ideal I(C) is minimally generated by the binomials f1 = x91 − x72 , f2 = x63 − x54 , f3 = x21 x24 −x32 x3 , f4 = x31 x22 −x33 x4 , f5 = x51 x4 −x2 x43 , f6 = x1 x52 −x23 x34 , f7 = x51 x23 −x2 x44 , f8 = x81 x2 − x3 x54 , f9 = x21 x53 − x32 x34 , f10 = x71 x3 − x42 x24 and f11 = x41 x43 − x62 x4 . Here a1 = 9, a2 = 7, a3 = 6 and a4 = 5. Also I = {f3 , f4 , f5 , f6 , f7 , f9 , f10 , f11 } and R = {f8 }. Let M = xu2 2 xu3 3 xu4 4 , where 0 ≤ u2 < 7, u3 ≥ 6 and 0 ≤ u4 < 5, with u2 n2 + u3 n3 + u4 n4 ∈ n1 + S. Note that x73 − x81 x2 ∈ I(C), so for u3 ≥ 7 we have that xu2 2 xu3 3 xu4 4 − x81 xu2 2 +1 x3u3 −7 xu4 4 ∈ I(C) and also u2 + u3 + u4 < u2 + u3 + u4 + 2. Furthermore x2 x63 −x51 x23 x4 ∈ I(C) and x63 x4 −x31 x22 x33 ∈ I(C). Thus for 0 ≤ u2 < 7, u3 ≥ 6, 0 ≤ u4 < 5 there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). From Theorem 5.5 the monomial curve C has Cohen-Macaulay tangent cone at the origin. Remark 5.7. In the case 2(c) we have that I(C) is generated by the set {xa1 1 − a a xai i , xai i − xj j , xj j − xakk }, so I(C) is complete intersection and also C has CohenMacaulay tangent cone at the origin. a a Theorem 5.8. Suppose that I(C) is given as in case 3. Let {xai i − xj j , xj j − u xakk , xa1 1 − xui i xj j } be a generating set of CA and ni < min{nj , nk }. Then C has Cohen-Macaulay tangent cone at the origin if and only if (1) for every binomial f = M − N ∈ I with 1 ∈ supp(M ) we have that deg(N ) ≤ deg(M ) and v (2) for every monomial M = xvi i xj j xvkk , where vi ≥ ai , with vi ni +vj nj +vk nk ∈ n1 +S there exists a monomial N with 1 ∈ supp(N ) such that M −N ∈ I(C) and also deg(M ) ≤ deg(N ). Remark 5.9. Suppose that I(C) is given as in case 3. Assume that a generating a u a set of CA is either {xa2 2 − xai i , xai i − xj j , xa1 1 − xui i xj j } or {xa2 2 − xai i , xai i − xj j , xa1 1 − u xu2 2 xui i xj j } where u2 , ui and uj are positive integers. Then C has Cohen-Macaulay tangent cone at the origin if and only if (1) for every binomial f = M − N ∈ I with 1 ∈ supp(M ) we have that deg(N ) ≤ deg(M ) and (2) for every monomial xv22 x3v3 xv44 , where v2 ≥ a2 , with v2 n2 + v3 n3 + v4 n4 ∈ n1 +S there exists a monomial N with 1 ∈ supp(N ) such that M −N ∈ I(C) and also deg(M ) ≤ deg(N ). Theorem 5.10. Suppose that I(C) is given as in case 3. Let {xa1 1 − xai i , xai i − a xj j , xakk − xu } be a generating set of CA and let ni < nj . Then C has CohenMacaulay tangent cone at the origin if and only if for every monomial M = v xvi i xj j xvkk , where vi < ai and vj < aj , with vi ni +vj nj +vk nk ∈ n1 +S there exists a monomial N with 1 ∈ supp(N ) such that M −N ∈ I(C) and also deg(M ) ≤ deg(N ). 20 F. ARSLAN, A. KATSABEKIS, AND M. NALBANDIYAN Proposition 5.11. Suppose that I(C) is given as in case 3. Let {xa1 1 − xai i , xai i − a xj j , xakk − xu } be a generating set of CA and let ni < nj . Assume that deg(xu ) ≤ ak or/and 1 belongs to the support of xu . If (1) for every binomial f = M − N ∈ I with 1 ∈ supp(M ) we have that deg(N ) ≤ deg(M ) and v (2) for every monomial xvi i xj j xvkk , where vi < ai , vj < aj and vk ≥ ak , with vi ni + vj nj + vk nk ∈ n1 + S there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ), then C has Cohen-Macaulay tangent cone at the origin. Corollary 5.12. Suppose that I(C) is given as in case 3. Let {xa1 1 − xai i , xai i − a xj j , xakk − xu } be a generating set of CA and let ni < nj . Assume that 1 belongs to the support of xu . If (1) for every binomial f = M − N ∈ I with 1 ∈ supp(M ) we have that deg(N ) ≤ deg(M ) and (2) ak ≤ deg(xu ), then C has Cohen-Macaulay tangent cone at the origin. Theorem 5.13. Suppose that I(C) is given as in case 4(a). Let {xa1 1 − xai i , xai i − a xu , xj j − xv , xakk − xw } be a generating set of CA . Then C has Cohen-Macaulay z tangent cone at the origin if and only if for every monomial M = xzi i xj j xzkk , where zi < ai , with zi ni +zj nj +zk nk ∈ n1 +S there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). Proposition 5.14. Suppose that I(C) is given as in case 4(a). Let {xa1 1 −xa2 2 , xa2 2 − xu3 3 xu4 4 , xa3 3 − xv , xa4 4 − xw } be a generating set of CA . Assume that 1 ∈ supp(xv ) and 1 ∈ supp(xw ). If (1) a3 ≤ deg(xv ), (2) a4 ≤ deg(xw ) and (3) for every binomial f = M − N ∈ I with 1 ∈ supp(M ) we have that deg(N ) ≤ deg(M ), then C has Cohen-Macaulay tangent cone at the origin. a Theorem 5.15. Suppose that I(C) is given as in case 4(b). Let {xa1 1 − xai i , xj j − xu , xakk − xv } be a generating set of CA . Then C has Cohen-Macaulay tangent z cone at the origin if and only if for every monomial xzi i xj j xzkk , where zi < ai , with zi ni + zj nj + zk nk ∈ n1 + S there exists a monomial N with 1 ∈ supp(N ) such that M − N ∈ I(C) and also deg(M ) ≤ deg(N ). a Proposition 5.16. Suppose that I(C) is given as in case 4(b). Let {xa1 1 −xai i , xj j − xu , xakk − xv } be a generating set of CA . Assume that 1 ∈ supp(xu ) and 1 ∈ supp(xv ). If (1) aj ≤ deg(xu ), (2) ak ≤ deg(xv ), (3) for every binomial f = M − N ∈ I with 1 ∈ supp(M ) we have that deg(N ) ≤ deg(M ) and (4) for every binomial f = M − N ∈ R with 1 ∈ supp(M ) there is a monomial P with 1 ∈ supp(P ) such that degS (N ) = degS (P ) and deg(N ) ≤ deg(P ), then C has Cohen-Macaulay tangent cone at the origin. References [1] F. Arslan, Cohen-Macaulayness of tangent cones, Proc. Amer. Math. Soc. 128 (2000) 22432251 COHEN-MACAULAYNESS OF TANGENT CONES OF MONOMIAL CURVES IN A4 (K) 21 [2] F. Arslan, P. Mete, Hilbert functions of Gorenstein monomial curves, Proc. Amer. Math. Soc. 135 (2007) 1993-2002. [3] D. Bayer, M. Stillman, Computation of Hilbert functions, J. Symbolic Comput. 14 (1992) 31-50. [4] H. Bresinsky, Symmetric semigroups of integers generated by 4 elements, Manuscripta Math. 17 (1975), no. 3, 205-219. [5] P. Pisón Casares, The short resolution of a lattice ideal, Proc. Amer. Math. Soc. 131 (2003) 1081-1091. [6] CoCoATeam, CoCoA: A system for doing computations in commutative algebra, available at http://cocoa.dima.unige.it. [7] A. Garcia, Cohen-Macaulayness of the associated graded of a semigroup rings, Comm. Algebra 10 (1982) 393-415. [8] P. Gimenez, H. Srinivasan, A note on Gorenstein monomial curves, Bull. Braz. Math. Soc. (N.S.) 4 (2014) 671-678. [9] J. Herzog, Generators and relations of abelian semigroups and semigroup rings, Manuscripta Math. 3 (1970) 175-193. [10] J. Herzog, When is a regular sequence super regular? Nagoya Math. J. 83 (1981) 183-195. [11] J. Herzog, D. I. Stamate, On the defining equations of the tangent cone of a numerical semigroup ring, J. Algebra 418 (2014) 8-28. [12] R. Jafari, S. Zarzuela, On monomial curves obtained by gluing, Semigroup Forum 2 (2014) 397-416. [13] A. Katsabekis, I. Ojeda, An indispensable classification of monomial curves in A4 (K), Pac. J. Math. 268 (2014) 95-116. [14] E. Kunz, The value semigroup of one dimensional Gorenstein ring, Proc. Amer. Math. Soc. 25 (1970) 748-751. [15] S. Molinelli, D.P. Patil, G. Tamone, On the Cohen-Macaulayness of the associated graded rings of monomial curves, Beiträge Algebra Geom. 39 (1998) 433-446. [16] S. Molinelli, G. Tamone, On the Hilbert function of certain rings of monomial curves, J. Pure Appl. Algebra 101 (1995) 191-206. [17] A. Oneto, F. Strazzanti, G. Tamone, One-dimensional Gorenstein local rings with decreasing Hilbert function, arXiv: 1602.00334. [18] D.P. Patil, G. Tamone, CM defect and Hilbert functions of monomial curves, Journal of Pure and Applied Algebra 215 7 (2011) 1539-1551. [19] L. Robbiano, G. Valla, On the equations defining tangent cones, Math. Proc. Cambridge Philos. Soc. 88 (1980) 281-297. [20] M. Rossi, Hilbert functions of Cohen-Macaulay local rings, Commutative Algebra and its Connections to Geometry, Contemporary Math 555 (2011), AMS, 173-200. [21] V. A. Sapko, Associated graded rings of numerical semigroup rings, Comm. Algebra 10 (2001) 4759-4773. [22] L. Sharifan, R. Zaare-Nahandi, Minimal free resolution of the associated graded ring of monomial curves of generalized arithmetic sequences, J. Pure Appl. Algebra 213 (2009) 360-369. [23] Y. H. Shen, Tangent cone of numerical semigroup rings of embedding dimension three, Comm. Algebra 39 (2011) 1922-1940. [24] B. Sturmfels, Gröbner bases and convex polytopes, volume 8 of University Lecture Series. American Mathematical Society, Providence, RI, 1996. Department of Mathematics, Mimar Sinan Fine Arts University, Istanbul, 34427, Turkey E-mail address: [email protected] Department of Mathematics, Mimar Sinan Fine Arts University, Istanbul, 34427, Turkey E-mail address: [email protected] Department of Mathematics, Mimar Sinan Fine Arts University, Istanbul, 34427, Turkey E-mail address: [email protected]
0math.AC
Question Asking as Program Generation Anselm Rothe1 [email protected] arXiv:1711.06351v1 [cs.CL] 16 Nov 2017 1 Brenden M. Lake1,2 [email protected] Todd M. Gureckis1 [email protected] 2 Department of Psychology Center for Data Science New York University Abstract A hallmark of human intelligence is the ability to ask rich, creative, and revealing questions. Here we introduce a cognitive model capable of constructing humanlike questions. Our approach treats questions as formal programs that, when executed on the state of the world, output an answer. The model specifies a probability distribution over a complex, compositional space of programs, favoring concise programs that help the agent learn in the current context. We evaluate our approach by modeling the types of open-ended questions generated by humans who were attempting to learn about an ambiguous situation in a game. We find that our model predicts what questions people will ask, and can creatively produce novel questions that were not present in the training set. In addition, we compare a number of model variants, finding that both question informativeness and complexity are important for producing human-like questions. 1 Introduction In active machine learning, a learner is able to query an oracle in order to obtain information that is expected to improve performance. Theoretical and empirical results show that active learning can speed acquisition for a variety of learning tasks [see 21, for a review]. Although impressive, most work on active machine learning has focused on relatively simple types of information requests (most often a request for a supervised label). In contrast, humans often learn by asking far richer questions which more directly target the critical parameters in a learning task. A human child might ask “Do all dogs have long tails?” or “What is the difference between cats and dogs?” [2]. A long term goal of artificial intelligence (AI) is to develop algorithms with a similar capacity to learn by asking rich questions. Our premise is that we can make progress toward this goal by better understanding human question asking abilities in computational terms [cf. 8]. To that end, in this paper, we propose a new computational framework that explains how people construct rich and interesting queries within in a particular domain. A key insight is to model questions as programs that, when executed on the state of a possible world, output an answer. For example, a program corresponding to “Does John prefer coffee to tea?” would return True for all possible world states where this is the correct answer and False for all others. Other questions may return different types of answers. For example “How many sugars does John take in his coffee?” would return a number 0, 1, 2, etc. depending on the world state. Thinking of questions as syntactically well-formed programs recasts the problem of question asking as one of program synthesis. We show that this powerful formalism offers a new approach to modeling question asking in humans and may eventually enable more human-like question asking in machines. We evaluate our model using a data set containing natural language questions asked by human participants in an information-search game [19]. Given an ambiguous situation or context, our model can predict what questions human learners will ask by capturing constraints in how humans construct semantically meaningful questions. The method successfully predicts the frequencies of 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. human questions given a game context, and can also synthesize novel human-like questions that were not present in the training set. 2 Related work Contemporary active learning algorithms can query for labels or causal interventions [21], but they lack the representational capacity to consider a richer range of queries, including those expressed in natural language. AI dialog systems are designed to ask questions, yet these systems are still far from achieving human-like question asking. Goal-directed dialog systems [25, 1], applied to tasks such as booking a table at a restaurant, typically choose between a relatively small set of canned questions (e.g., “How can I help you?”, “What type of food are you looking for?”), with little genuine flexibility or creativity. Deep learning systems have also been developed for visual “20 questions” style tasks [22]; although these models can produce new questions, the questions typically take a stereotyped form (“Is it a person?”, “Is it a glove?” etc.). More open-ended question asking can be achieved by non-goal-driven systems trained on large amounts of natural language dialog, such as the recent progress demonstrated in [20]. However, these approaches cannot capture intentional, goal-directed forms of human question asking. Recent work has probed other aspects of question asking. The Visual Question Generation (VQG) data set [16] contains images paired with interesting, human-generated questions. For instance, an image of a car wreck might be paired with the question, “What caused the accident?” Deep neural networks, similar to those used for image captioning, are capable of producing these types of questions after extensive training [16, 23, 11]. However, they require large datasets of images paired with questions, whereas people can ask intelligent questions in a novel scenario with no (or very limited) practice, as shown in our task below. Moreover, human question asking is robust to changes in task and goals, while state-of-the-art neural networks do not generalize flexibly in these ways. 3 The question data set Our goal was to develop a model of context-sensitive, goal-directed question asking in humans, which falls outside the capabilities of the systems described above. We focused our analysis on a data set we collected in [19], which consists of 605 natural language questions asked by 40 human players to resolve an ambiguous game situation (similar to “Battleship”).1 Players were individually presented with a game board consisting of a 6×6 grid of tiles. The tiles were initially turned over but each could be flipped to reveal an underlying color. The player’s goal was to identify as quickly as possible the size, orientation, and position of “ships” (i.e., objects composed of multiple adjacent tiles of the same color) [7]. Every board had exactly three ships which were placed in nonoverlapping but otherwise random locations. The ships were identified by their color S = {Blue, Red, Purple}. All ships had a width of 1, a length of N = {2, 3, 4} and orientation O = {Horizontal, Vertical}. Any tile that did not overlap with a ship displayed a null “water” color (light gray) when flipped. After extensive instructions about the rules and purpose of the game and a number of practice rounds [see 19], on each of 18 target contexts players were presented with a partly revealed game board (similar to Figure 1B and 1C) that provided ambiguous information about the actual shape and location of the ships. They were then given the chance to ask a natural-language question about the configuration. The player’s goal was to use this question asking opportunity to gain as much information as possible about the hidden game board configuration. The only rules given to players about questions was that they must be answerable using one word (e.g., true/false, a number, a color, a coordinate like A1 or a row or column number) and no combination of questions was allowed. The questions were recorded via an HTML text box in which people typed what they wanted to ask. A good question for the context in Figure 1B is “Do the purple and the red ship touch?”, while “What is the color of tile A1?” is not helpful because it can be inferred from the revealed game board and the rules of the game (ship sizes, etc.) that the answer is “Water” (see Figure 3 for additional example questions). Each player completed 18 contexts where each presented a different underlying game board and partially revealed pattern. Since the usefulness of asking a question depends on the context, the data 1 https://github.com/anselmrothe/question_dataset 2 !"#$%&! a) 1 2 3 4 5 6 ABCDEF Hidden gameboard b) 1 2 3 4 5 6 ABCDEF c) 1 2 3 4 5 6 ABCDEF Partially revealed gameboard Figure 1: The Battleship game used to obtain the question data set by Rothe et al. [19]. (A) The hidden positions of three ships S = {Blue, Red, Purple} on a game board that players sought to identify. (B) After observing the partly revealed board, players were allowed to ask a natural language question. (C) The partly revealed board in context 4. set consists of 605 question-context pairs hq, ci, with 26 to 39 questions per context.2 The basic challenge for our active learning method is to predict which question q a human will ask from the given context c and the overall rules of the game. This is a particularly challenging data set to model because of the the subtle differences between contexts that determine if a question is potentially useful along with the open-ended nature of human question asking. 4 A probabilistic model of question generation Here we describe the components of our probabilistic model of question generation. Section 4.1 describes two key elements of our approach, compositionality and computability, as reflected in the choice to model questions as programs. Section 4.2 describes a grammar that defines the space of allowable questions/programs. Section 4.3 specifies a probabilistic generative model for sampling context-sensitive, relevant programs from this space. The remaining sections cover optimization, the program features, and alternative models (Sections 4.4-4.6). 4.1 Compositionality and computability The analysis of the data set [19] revealed that many of the questions in the data set share similar concepts organized in different ways. For example, the concept of ship size appeared in various ways across questions: • • • • • • “How long is the blue ship?” “Does the blue ship have 3 tiles?” “Are there any ships with 4 tiles?” “Is the blue ship less then 4 blocks?” “Are all 3 ships the same size?” “Does the red ship have more blocks than the blue ship?” As a result, the first key element of modeling question generation was to recognize the compositionality of these questions. In other words, there are conceptual building blocks (predicates like size(x) and plus(x,y)) that can be put together to create the meaning of other questions (plus(size(Red), size(Purple))). Combining meaningful parts to give meaning to larger expressions is a prominent approach in linguistics [10], and compositionality more generally has been an influential idea in cognitive science [4, 15, 14]. The second key element is the computability of questions. We propose that human questions are like programs that when executed on the state of a world output an answer. For example, a program that when executed looks up the number of blue tiles on a hypothesized or imagined Battleship game board and returns said number corresponds to the question “How long is the blue ship?”. In this way, programs can be used to evaluate the potential for useful information from a question by executing the program over a set of possible or likely worlds and preferring questions that are informative for identifying the true world state. This approach to modeling questions is closely 2 Although each of the 40 players asked a question for each context, a small number of questions were excluded from the data set for being ambiguous or extremely difficult to address computationally [see 19]. 3 related to formalizing question meaning as a partition over possible worlds [6], a notion used in previous studies in linguistics [18] and psychology [9]. Machine systems for question answering have also fruitfully modeled questions as programs [24, 12], and computational work in cognitive science has modeled various kinds of concepts as programs [17, 5, 13]. An important contribution of our work here is that it tackles question asking and provides a method for generating meaningful questions/programs from scratch. 4.2 A grammar for producing questions To capture both compositionality and computability, we represent questions in a simple programming language, based on lambda calculus and LISP. Every unit of computation in that language is surrounded by parentheses, with the first element being a function and all following elements being arguments to that function (i.e., using prefix notation). For instance, the question “How long is the blue ship?” would be represented by the small program (size Blue). More examples will be discussed below. With this step we abstracted the question representation from the exact choice of words while maintaining its meaning. As such the questions can be thought of as being represented in a “language of thought” [3]. Programs in this language can be combined as in the example (> (size Red) (size Blue)), asking whether the red ship is larger than the blue ship. To compute an answer, first the inner parentheses are evaluated, each returning a number corresponding to the number of red or blue tiles on the game board, respectively. Then these numbers are used as arguments to the > function, which returns either True or False. A final property of interest is the generativity of questions, that is, the ability to construct novel expressions that are useful in a given context. To have a system that can generate expressions in this language we designed a grammar that is context-free with a few exceptions, inspired by [17]. The grammar consists of a set of rewrite rules, which are recursively applied to grow expressions. An expression that cannot be further grown (because no rewrite rules are applicable) is guaranteed to be an interpretable program in our language. To create a question, our grammar begins with an expression that contains the start symbol A and then rewrites the symbols in the expression by applying appropriate grammatical rules until no symbol can be rewritten. For example, by applying the rules A → N, N → (size S), and S → Red, we arrive at the expression (size Red). Table SI-1 (supplementary materials) shows the core rewrite rules of the grammar. This set of rules is sufficient to represent all 605 questions in the human data set. To enrich the expressiveness and conciseness of our language we added lambda expressions, mapping, and set operators (Table SI-2, supplementary material). Their use can be seen in the question “Are all ships the same size?”, which can be conveniently represented by (= (map (λ x (size x)) (set Blue Red Purple))). During evaluation, map sequentially assigns each element from the set to x in the λ-part and ultimately returns a vector of the three ship sizes. The three ship sizes are then compared by the = function. Of course, the same question could also be represented as (= (= (size Blue) (size Red)) (size Purple)). 4.3 Probabilistic generative model An artificial agent using our grammar is able to express a wide range of questions. To decide which question to ask, the agent needs a measure of question usefulness. This is because not all syntactically well-formed programs are informative or useful. For instance, the program (> (size Blue) (size Blue)) representing the question “Is the blue ship larger than itself?” is syntactically coherent. However, it is not a useful question to ask (and is unlikely to be asked by a human) because the answer will always be False (“no”), no matter the true size of the blue ship. We propose a probabilistic generative model that aims to predict which questions people will ask and which not. Parameters of the model can be fit to predict the frequency that humans ask particular questions in particular context in the data set by [19]. Formally, fitting the generative model is a problem of density estimation in the space of question-like programs, where the space is defined by the grammar. We define the probability of question x (i.e., the probability that question x is asked) 4 with a log-linear model. First, the energy of question x is the weighted sum of question features E(x) = θ1 f1 (x) + θ2 f2 (x) + ... + θK fK (x), (1) where θk is the weight of feature fk of question x. We will describe all features below. Model variants will differ in the features they use. Second, the energy is related to the probability by p(x; θ) = P exp(−E(x)) exp(−E(x)) = , exp(−E(x)) Z x∈X (2) where θ is the vector of feature weights, highlighting the fact that the probability is dependent on a parameterization of these weights, Z is the normalizing constant, and X is the set of all possible questions that can be generated by the grammar in Tables SI-1 and SI-2 (up to a limit on question length).3 The normalizing constant needs to be approximated since X is too large to enumerate. 4.4 Optimization The objective is to find feature weights that maximize the likelihood of asking the human-produced questions. Thus, we want to optimize arg max θ N X log p(d(i) ; θ), (3) i=1 where D = {d(1) , ..., d(N ) } are the questions (translated into programs) in the human data set. To optimize via gradient ascent, we need the gradient of the log-likelihood with respect to each θk , which is given by ∂log p(D; θ) = N Ex∼D [fk (x)] − N Ex∼Pθ [fk (x)]. (4) ∂θk PN The term Ex∼D [fk (x)] = N1 i=1 fk (d(i) ) is the expected P (average) feature values given the empirical set of human questions. The term Ex∼Pθ [fk (x)] = x∈X fk (x)p(x; θ) is the expected feature values given the model. Thus, when the gradient is zero, the model has perfectly matched the data in terms of the average values of the features. Computing the exact expected feature values from the model is intractable, since there is a very large number of possible questions (as with the normalizing constant in Equation 2). We use importance sampling to approximate this expectation. To create a proposal distribution, denoted as q(x), we use the question grammar as a probabilistic context free grammar with uniform distributions for choosing the re-write rules. The details of optimization are as follows. First, a large set of 150,000 questions is sampled in order to approximate the gradient at each step via importance sampling.4 Second, to run the procedure for a given model and training set, we ran 100,000 iterations of gradient ascent at a learning rate of 0.1. Last, for the purpose of evaluating the model (computing log-likelihood), the importance sampler is also used to approximate the normalizing constant in Eq. 2 via the estimator Z ≈ Ex∼q [ p(x;θ) q(x) ]. 4.5 Question features We now turn to describe the question features we considered (cf. Equation 1), namely two features for informativeness, one for length, and four for the answer type. Informativeness. Perhaps the most important feature is a question’s informativeness, which we model through a combination of Bayesian belief updating and Expected Information Gain (EIG). To compute informativeness, our agent needs to represent several components: A belief about the current world state, a way to update its belief once it receives an answer, and a sense of all possible 3 We define X to be the set of questions with 100 or fewer functions. We had to remove the rule L → (draw C) from the grammar and the corresponding 14 questions from the data set that asked for a demonstration of a colored tile. Although it is straightforward to represent those questions with this rule, the probabilistic nature of draw led to exponentially complex computations of the set of possible-world answers. 4 5 Empirical question frequency context: 3 15 context: 4 ρ = 0.51 ρ = 0.58 context: 5 context: 6 ρ = 0.85 context: 7 ρ = 0.85 10 context: 8 ρ = 0.62 0 ● ● ●● ● ●● ● ●● ●● ● ●● ● ● context: 11 15 context: 12 ρ = 0.56 ρ = 0.37 10 ● 5 ● ● 0 −40 ● ● ● ● ● ●●● ● ●● ●● ●● ρ = 0.6 ● ●● ● ● ●● ● ●● ● context: 13 context: 14 ρ = 0.47 ρ = 0.69 ●● ● ● ●● ● ● ●● ● ● ●● ● ●● context: 15 −40 ● ●● ● ●●● ●● ●● ●● ● ●● −20 ● ● −40 ● ●● ● ● ●● ● ●● ●● ● −20 ● ● ● ● ●● ●● ● ● ● −40 −20 ●● −40 ●● ●●● ●●● ● −20 −20 context: 18 ρ = 0.45 −40 −20 ● ● ● ●●● ● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●● −40 ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ●●●● ρ = 0.8 ● ● ● ● ● ● ●● ● context: 17 ρ = 0.82 ● ● ● ●● ● ●● ● ●● ● ● ●● ●● ●● ●●● ● context: 16 ρ = 0.8 ● ● ● ●● ●●●●● −20 ● ● ● ●● ●● ● ●● ●● context: 10 ρ = 0.47 ● ● 5 context: 9 ρ = 0.75 ● −40 ● ●● ●●●● ● −20 Negative energy Figure 2: Out-of-sample model predictions regarding the frequency of asking a particular question. The y-axis shows the empirical question frequency, and x-axis shows the model’s energy for the question (Eq. 1, based on the full model). The rank correlation ρ is shown for each context. answers to the question.5 In the Battleship game, an agent must identify a single hypothesis h (i.e., a hidden game board configuration) in the space of possible configurations H (i.e., possible board games). The agent can ask a question x and receive the answer d, updating its hypothesis space by applying Bayes’ rule, p(h|d; x) ∝ p(d|h; x)p(h). The prior p(h) is specified first by a uniform choice over the ship sizes, and second by a uniform choice over all possible configurations given those sizes. The likelihood p(d|h; x) ∝ 1 if d is a valid output of the question program x when executed on h, and zero otherwise. The Expected Information Gain (EIG) value of a question x is the expected reduction in uncertainty about the true hypothesis h, averaged across all possible answers Ax of the question h i X EIG(x) = p(d; x) I[p(h)] − I[p(h|d; x)] , (5) d∈Ax where I[·] is the Shannon entropy. Complete details about the Bayesian ideal observer follow the approach we used in [19]. Figure 3 shows the EIG scores for the top two human questions for selected contexts. In addition to feature fEIG (x) = EIG(x), we added a second feature fEIG=0 (x), which is 1 if EIG is zero and 0 otherwise, to provide an offset to the linear EIG feature. Note that the EIG value of a question always depends on the game context. The remaining features described below are independent of the context. Complexity. Purely maximizing EIG often favors long and complicated programs (e.g., polynomial questions such as size(Red)+10*size(Blue)+100*size(Purple)+...). Although a machine would not have a problem with answering such questions, it poses a problem for a human answerer. Generally speaking, people prefer concise questions and the rather short questions in the data set reflect this. The probabilistic context free grammar provides a measure of complexity that favors shorter programs, and we use the log probability under the grammar fcomp (x) = − log q(x) as the complexity feature. Answer type. We added four features for the answer types Boolean, Number, Color, and Location. Each question program belongs to exactly one of these answer types (see Table SI-1). The type Orientation was subsumed in Boolean, with Horizontal as True and Vertical as False. This allows the model to capture differences in the base rates of question types (e.g., if people prefer true/false questions over other types). Relevance. Finally, we added one auxiliary feature to deal with the fact that the grammar can produce syntactically coherent programs that have no reference to the game board at all (thus are not really questions about the game; e.g., (+ 1 1)). The “filter” feature f∅ (x) marks questions 5 We assume here that the agent’s goal is to accurately identify the current world state. In a more general setting, the agent would require a cost function that defines the helpfulness of an answer as a reduced distance to the goal. 6 that refer to the Battleship game board with a value of 1 (see the otherwise.6 4.6 b marker in Table SI-1) and 0 Alternative models To evaluate which features are important for human-like question generation, we tested the full model that uses all features, as well as variants in which we respectively lesioned one key property. The information-agnostic model did not use fEIG (x) and fEIG=0 (x) and thus ignored the informativeness of questions. The complexity-agnostic model ignored the complexity feature. The type-agnostic model ignored the answer type features. 5 Results and Discussion The probabilistic model of question generation was eval- Table 1: Log likelihoods of model variants uated in two main ways. First, it was tasked with predict- averaged across held out contexts. ing the distribution of questions people asked in novel scenarios, which we evaluate quantitatively. Second, it Model LL was tasked with generating genuinely novel questions that were not present in the data set, which we evaluate Full -1400.06 qualitatively. To make predictions, the different candiInformation-agnostic -1464.65 date models were fit to 15 contexts and asked to predict Complexity-agnostic -22993.38 the remaining one (i.e., leave one out cross-validation).7 Type-agnostic -1419.26 This results in 64 different model fits (i.e., 4 models × 16 fits). First, we verify that compositionality is an essential ingredient in an account of human question asking. For any given context, about 15% of the human questions did not appear in any of the other contexts. Any model that attempts to simply reuse/reweight past questions will be unable to account for this productivity (effectively achieving a log-likelihood of −∞), at least not without a much larger training set of questions. The grammar over programs provides one account of the productivity of the human behavior. Second, we compared different models on their ability to quantitatively predict the distribution of human questions. Table 1 summarizes the model predictions based on the log-likelihood of the questions asked in the held-out contexts. The full model – with learned features for informativeness, complexity, answer type, and relevance – provides the best account of the data. In each case, lesioning its key components resulted in lower quality predictions. The complexity-agnostic model performed far worse than the others, highlighting the important role of complexity (as opposed to pure informativeness) in understanding which questions people choose to ask. The full model also outperformed the information-agnostic and type-agnostic models, suggesting that people also optimize for information gain and prefer certain question types (e.g., true/false questions are very common). Because the log-likelihood values are approximate, we bootstrapped the estimate of the normalizing constant Z and compared the full model and each alternative. The full model’s loglikelihood advantage over the complexity-agnostic model held in 100% of the bootstrap samples, over the information-agnostic model in 81% of samples, and over type-agnostic model in 88%. Third, we considered the overall match between the best-fit model and the human question frequencies. Figure 2 shows the correlations between the energy values according to the held-out predictions of the full model (Eq. 1) and the frequencies of human questions (e.g., how often participants asked “What is the size of the red ship?” in a particular context). The results show very strong agreement for some contexts along with more modest alignment for others, with an average Spearman’s rank correlation coefficient of 0.64. In comparison, the information-agnostic model achieved 0.65, the complexity-agnostic model achieved -0.36, and the type-agnostic model achieved 0.55. One limitation is that the human data is sparse (many questions were only asked once), and thus correlations 6 The features f∅ (x) and fEIG=0 (x) are not identical. Questions like (size Blue) do refer to the board but will have zero EIG if the size of the blue ship is already known. 7 For computational reasons we had to drop contexts 1 and 2, which had especially large hypothesis spaces. However, we made sure that the grammar was designed based on the full set of contexts (i.e., it could express all questions in the human question data set). 7 are limited as a measure of fit. However, there is, surprisingly, no correlation at all between question generation frequency and EIG alone [19], again suggesting a key role of question complexity and the other features. Last, the model was tasked with generating novel, “human-like” questions that were not part of the human data set. Figure 3 shows five novel questions that were sampled from the model, across four different game contexts. Questions were produced by taking five weighted samples from the set of programs produced in Section 4.4 for approximate inference, with weights determined by their energy (Eq. 2). To ensure novelty, samples were rejected if they were equivalent to any human question in the training data set or to an already sampled question. Equivalence between any two questions was determined by the mutual information of their answer distributions (i.e., their partitions over possible hypotheses), and or if the programs differed only through their arguments (e.g. (size Blue) is equivalent to (size Red)). The generated questions in Figure 3 demonstrate that the model is capable of asking novel (and clever) human-like questions that are useful in their respective contexts. Interesting new questions that were not observed in the human data include “Are all the ships horizontal?” (Context 7), “What is the top left of all the ship tiles?” (Context 9), “Are blue and purple ships touching and red and purple not touching (or vice versa)?” (Context 9), and “What is the column of the top left of the tiles that have the color of the bottom right corner of the board?” (Context 15). The four contexts were selected to illustrate the creative range of the model, and the complete set of contexts is shown in the supplementary materials. 6 Conclusions People use question asking as a cognitive tool to gain information about the world. Although people ask rich and interesting questions, most active learning algorithms make only focused requests for supervised labels. Here were formalize computational aspects of the rich and productive way that people inquire about the world. Our central hypothesis is that active machine learning concepts can be generalized to operate over a complex, compositional space of programs that are evaluated over possible worlds. To that end, this project represents a step toward more capable active learning machines. There are also a number of limitations of our current approach. First, our system operates on semantic representations rather than on natural language text directly, although it is possible that such a system can interface with recent tools in computational linguistics to bridge this gap [e.g., 24]. Second, some aspects of our grammar are specific to the Battleship domain. It is often said that some knowledge is needed to ask a good question, but critics of our approach will point out that the model begins with substantial domain knowledge and special purpose structures. On the other hand, many aspects of our grammar are domain general rather than domain specific, including very general functions and programming constructs such as logical connectives, set operations, arithmetic, and mapping. To extend this approach to new domains, it is unclear exactly how much new knowledge engineering will be needed, and how much can be preserved from the current architecture. Future work will bring additional clarity as we extend our approach to different domains. From the perspective of computational cognitive science, our results show how people balance informativeness and complexity when producing semantically coherent questions. By formulating question asking as program generation, we provide the first predictive model to date of open-ended human question asking. Acknowledgments We thank Chris Barker, Sam Bowman, Noah Goodman, and Doug Markant for feedback and advice. This research was supported by NSF grant BCS-1255538, the John Templeton Foundation Varieties of Understanding project, a John S. McDonnell Foundation Scholar Award to TMG, and the MooreSloan Data Science Environment at NYU. 8 Figure 3: Novel questions generated by the probabilistic model. Across four contexts, five model questions are displayed, next to the two most informative human questions for comparison. Model questions were sampled such that they are not equivalent to any in the training set. The natural language translations of the question programs are provided for interpretation. Questions with lower energy are more likely according to the model. 9 References [1] A. Bordes and J. Weston. Learning End-to-End Goal-Oriented Dialog. arXiv preprint, 2016. [2] M. M. Chouinard. Children’s Questions: A Mechanism for Cognitive Development. Monographs of the Society of Research in Cognitive Development, 72(1):1–129, 2007. [3] J. A. Fodor. The Language of Thought. Harvard University Press, 1975. [4] J. A. Fodor and Z. W. Pylyshyn. Connectionism and cognitive architecture: A critical analysis. Cognition, 28:3–71, 1988. [5] N. D. Goodman, J. B. Tenenbaum, and T. Gerstenberg. Concepts in a probabilistic language of thought. In E. Margolis and S. Laurence, editors, Concepts: New Directions. MIT Press, Cambridge, MA, 2015. [6] J. Groenendijk and M. Stokhof. On the Semantics of Questions and the Pragmantics of Answers. PhD thesis, University of Amsterdam, 1984. [7] T. M. Gureckis and D. B. Markant. Active Learning Strategies in a Spatial Concept Learning Game. In Proceedings of the 31st Annual Conference of the Cognitive Science Society, 2009. [8] T. M. Gureckis and D. B. Markant. Self-Directed Learning: A Cognitive and Computational Perspective. Perspectives on Psychological Science, 7(5):464–481, 2012. [9] R. X. D. Hawkins, A. Stuhlmuller, J. Degen, and N. D. Goodman. Why do you ask? Good questions provoke informative answer. In Proceedings of the 37th Annual Conference of the Cognitive Science Society, 2015. [10] P. Jacobson. Compositional Semantics. Oxford University Press, 2014. [11] U. Jain, Z. Zhang, and A. Schwing. Creativity: Generating Diverse Questions using Variational Autoencoders. arXiv preprint, 2017. [12] J. Johnson, B. Hariharan, L. van der Maaten, J. Hoffman, L. Fei-fei, C. L. Zitnick, and R. Girshick. Inferring and Executing Programs for Visual Reasoning. In International Conference on Computer Vision, 2017. [13] B. M. Lake, R. Salakhutdinov, and J. B. Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015. [14] B. M. Lake, T. D. Ullman, J. B. Tenenbaum, and S. J. Gershman. Building machines that learn and think like people. Behavioral and Brain Sciences, 2017. [15] G. F. Marcus. The Algebraic Mind: Integrating Connectionism and Cognitive Science. MIT Press, Cambridge, MA, 2003. [16] N. Mostafazadeh, I. Misra, J. Devlin, M. Mitchell, X. He, and L. Vanderwende. Generating Natural Questions About an Image. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, pages 1802–1813, 2016. [17] S. T. Piantadosi, J. B. Tenenbaum, and N. D. Goodman. Bootstrapping in a language of thought: A formal model of numerical concept learning. Cognition, 123(2):199–217, 2012. [18] C. Roberts. Information structure in discourse: Towards an integrated formal theory of pragmatics. Working Papers in Linguistics-Ohio State University Department of Linguistics, pages 91–136, 1996. [19] A. Rothe, B. M. Lake, and T. M. Gureckis. Asking and evaluating natural language questions. In A. Papafragou, D. Grodner, D. Mirman, and J. Trueswell, editors, Proceedings of the 38th Annual Conference of the Cognitive Science Society, Austin, TX, 2016. [20] I. V. Serban, A. Sordoni, Y. Bengio, A. Courville, and J. Pineau. Building End-To-End Dialogue Systems Using Generative Hierarchical Neural Network Models. In Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, 2016. [21] B. Settles. Active Learning. Morgan & Claypool Publishers, 2012. [22] F. Strub, d. V. Harm, J. Mary, B. Piot, A. Courville, and O. Pietquin. End-to-end optimization of goal-driven and visually grounded dialogue systems. In International Joint Conference on Artificial Intelligence (IJCAI), 2017. [23] A. K. Vijayakumar, M. Cogswell, R. R. Selvaraju, Q. Sun, S. Lee, D. Crandall, and D. Batra. Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence Models. arXiv preprint, 2016. [24] Y. Wang, J. Berant, and P. Liang. Building a Semantic Parser Overnight. Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 1332–1342, 2015. [25] S. Young, M. Gašić, B. Thomson, and J. D. Williams. POMDP-based statistical spoken dialog systems: A review. Proceedings of the IEEE, 101(5):1160–1179, 2013. 10 7 Supplementary material The supplementary material contains the following: the game boards that served as contexts in the human question data set (Figure SI-1), the full set of grammatical rules used in the simulations (Table SI-1 & SI-2), and five novel questions for each context produced by the computational model (Table SI-3 & SI-4). Trial 2 Trial 1 1 2 3 4 5 6 1 2 3 4 5 6 ABCDEF 1 2 3 4 5 6 1 2 3 4 5 6 Trial 3 Trial 4 Trial 5 Trial 6 ABCDEF ABCDEF ABCDEF ABCDEF Trial 7 Trial 8 Trial 9 ABCDEF ABCDEF ABCDEF 1 2 3 4 5 6 Trial 13 1 2 3 4 5 6 ABCDEF ABCDEF 1 2 3 4 5 6 Trial 14 1 2 3 4 5 6 ABCDEF 1 2 3 4 5 6 Trial 10 1 2 3 4 5 6 Trial 15 1 2 3 4 5 6 1 2 3 4 5 6 ABCDEF Trial 11 1 2 3 4 5 6 Trial 16 ABCDEF 1 2 3 4 5 6 ABCDEF 1 2 3 4 5 6 ABCDEF Trial 12 1 2 3 4 5 6 Trial 18 Trial 17 1 2 3 4 5 6 ABCDEF ABCDEF 1 2 3 4 5 6 ABCDEF Figure SI-1: Partly revealed game boards, serving as contexts in which participants generated questions from scratch in Rothe et al. (2016). 11 Table SI-1: Part 1 of the grammatical rules for defining the set of possible questions. Based on these rewrite rules we can represent all questions in the human question data set. See text for details. Rules marked with b have a reference to the Battleship game board (e.g., during evaluation the function orient looks up the orientation of a ship on the game board) while all other rules are domain-general (i.e., can be evaluated without access to a game board). Answer types A→B A→N A→C A→O A→L Yes/no B → True B → False B → (not B) B → (and B B) B → (or B B) B → (= B B) B → (= N N) B → (= O O) B → (= C C) B → (= setN) B → (any setB) B → (all setB) B → (> N N) B → (< N N) B → (touch S S) b B → (isSubset setL setL) Numbers N→0 ... N → 10 N → (+ N N) N → (+ B B) N → (+ setN) N → (+ setB) N → (– N N) N → (size S) b N → (row L) N → (col L) N → (setSize setL) Colors C→S C → Water C → (color L) b S → Blue S → Red S → Purple S→x Orientation O→H O→V O → (orient S) b Locations L → 1A ... L → 6F L→y L → (topleft setL) L → (bottomright setL) L → (draw C) Boolean Number Color Orientation Location True if all elements in set of numbers are equal True if any element in set of booleans is True True if all elements in set of booleans are True True if the two ships are touching (diagonal does not count) True if the first set of locations is subset of the second set of locations Number of True elements in set of booleans Size of the ship Row number of location L Column number of location L Number of elements in set of locations Ship color Color at location L Lambda variable for ships Horizontal Vertical Orientation of the ship S Row 1, column A Lambda variable for locations The most left of the most top location in the set of locations The most right of the most bottom location in the set of locations Sample a location of color C 12 Table SI-2: Part 2 of the grammatical rules. See text for details. Mapping setB → (map fyB setL) setB → (map fxB setS) setN → (map fxN setS) setL → (map fxL setS) Map a boolean expression onto location set Map a boolean expression onto ship set Map a numerical expression onto ship set Map a location expression onto ship set Lambda expressions fyB → (λ y B) fxB → (λ x B) fxN → (λ x N) fxL → (λ x L) Boolean expression with location variable Boolean expression with ship variable Numeric expression with ship variable Location expression with ship variable Sets setS → (set Blue Red Purple) setL → (set 1A ... 6F) setL → (coloredTiles C) b setL → (setDifference setL setL) setL → (union setL setL) setL → (intersection setL setL) setL → (unique setL) All ships All locations All locations with color C Remove second set from first set Combine both sets Elements that exist in both sets Unique elements in set Table SI-3: Part 1: Novel question programs generated by the probabilistic model. Model questions were sampled and filtered for novelty, meaning they never appeared in the training set. Please see main text for details of sampling process. The context ID refers to the contexts in Figure SI-1. The energy scores reflect the human-like “quality” assigned by the model. Context Program Energy 3 3 3 3 3 (colL (topleft (coloredTiles Water))) (colL (bottomright (coloredTiles Red))) (rowL (topleft (coloredTiles Red))) (bottomright (coloredTiles (color 3A))) (== Purple (color 2A)) 6.90 7.19 7.23 10.14 10.20 4 4 4 4 4 (rowL (bottomright (coloredTiles Purple))) (setSize (coloredTiles (color 1E))) (== Purple (color 2D)) (topleft (coloredTiles (color 2A))) (color (topleft (map (lambda x 1C) (set Blue Red Purple)))) 7.18 8.65 10.16 10.70 11.53 5 5 5 5 5 (setSize (coloredTiles (color (bottomright (set 1A ... 6F))))) (setSize (coloredTiles (color 3A))) (bottomright (coloredTiles (color 1B))) (colL (bottomright (unique (coloredTiles Water)))) (colL (bottomright (coloredTiles (color 3B)))) 7.55 8.76 9.90 10.23 11.09 6 6 6 6 6 (colL (topleft (coloredTiles Water))) (rowL (bottomright (coloredTiles Red))) (setSize (coloredTiles (color 5A))) (++ (map (lambda y (touch Blue Red)) (coloredTiles Water))) (rowL (bottomright (coloredTiles (color 2A)))) 6.52 7.33 8.74 10.21 11.30 7 7 7 7 7 (colL (bottomright (coloredTiles Water))) (rowL (topleft (coloredTiles Purple))) (all (map (lambda x (== H (orient x))) (set Blue Red Purple))) (colL (bottomright (coloredTiles (color 3E)))) (any (map (lambda x (> (size x) 2)) (set Blue Red Purple))) 6.53 7.88 8.90 10.51 12.89 8 8 8 8 8 (rowL (bottomright (coloredTiles Red))) (colL (bottomright (coloredTiles Red))) (setSize (coloredTiles (color 2F))) (++ (map (lambda y TRUE) (coloredTiles (color (topleft (set 1A ... 6F)))))) (colL (topleft (coloredTiles (color (topleft (coloredTiles Blue)))))) 7.66 7.79 9.09 10.63 10.79 13 Table SI-4: Part 2 of the novel question programs. Context Program Energy 9 9 9 9 9 (colL (bottomright (coloredTiles Blue))) (setSize (coloredTiles (color 4A))) (topleft (setDifference (set 1A ... 6F) (coloredTiles Water))) (color (topleft (coloredTiles (color 5C)))) (== (touch Blue Purple) (not (touch Red Purple))) 7.48 8.74 9.94 10.98 16.34 10 10 10 10 10 (rowL (bottomright (coloredTiles Blue))) (colL (topleft (coloredTiles Purple))) (rowL (topleft (coloredTiles Purple))) (setSize (coloredTiles (color 4A))) (bottomright (coloredTiles (color 4E))) 7.10 7.15 7.24 8.69 10.27 11 11 11 11 11 (colL (topleft (coloredTiles Red))) (colL (bottomright (coloredTiles Red))) (topleft (unique (coloredTiles Water))) (topleft (coloredTiles (color 5F))) (color (bottomright (coloredTiles (color 3E)))) 7.21 7.26 9.18 9.62 10.64 12 12 12 12 12 (colL (bottomright (coloredTiles Water))) (colL (topleft (coloredTiles Water))) (rowL (bottomright (coloredTiles Water))) (setSize (coloredTiles (color 1A))) (topleft (coloredTiles (color 1F))) 13 13 13 13 13 (colL (topleft (coloredTiles Water))) (setSize (coloredTiles (color (bottomright (set 1A ... 6F))))) (rowL (bottomright (coloredTiles Blue))) (topleft (coloredTiles (color 4C))) (colL (bottomright (coloredTiles (color 4E)))) 6.76 7.40 7.71 9.99 11.09 14 14 14 14 14 (colL (bottomright (coloredTiles Red))) (setSize (coloredTiles (color 2A))) (bottomright (coloredTiles (color (topleft (coloredTiles Water))))) (topleft (coloredTiles (color 6F))) (colL (bottomright (coloredTiles (color 5F)))) 7.59 8.80 9.72 10.34 11.51 15 15 15 15 15 (rowL (bottomright (coloredTiles Red))) (rowL (topleft (coloredTiles Red))) (setSize (coloredTiles (color 2F))) (colL (topleft (coloredTiles (color (bottomright (set 1A ... 6F)))))) (isSubset (coloredTiles Water) (coloredTiles (color 5F))) 7.23 7.36 9.02 9.88 11.45 16 16 16 16 16 (setSize (coloredTiles (color (topleft (set 1A ... 6F))))) (colL (topleft (coloredTiles Red))) (setSize (coloredTiles (color 2A))) (topleft (coloredTiles (color 1D))) (color (bottomright (setDifference (set 1A ... 6F) (coloredTiles Water)))) 7.83 7.85 8.85 10.19 11.42 17 17 17 17 17 (colL (bottomright (coloredTiles Water))) (colL (topleft (coloredTiles Water))) (setSize (coloredTiles (color (bottomright (set 1A ... 6F))))) (bottomright (coloredTiles (color (topleft (set 1A ... 6F))))) (all (map (lambda x (== H (orient x))) (set Blue Red Purple))) 18 18 18 18 18 (setSize (coloredTiles (color (topleft (set 1A ... 6F))))) (bottomright (coloredTiles (color (topleft (set 1A ... 6F))))) (setSize (coloredTiles (color 2D))) (rowL (bottomright (coloredTiles (color 2A)))) (colL (bottomright (coloredTiles (color 2D)))) 14 6.65 6.66 7.35 8.57 9.91 6.53 6.97 7.46 8.58 9.08 7.41 8.79 9.04 10.76 11.18
2cs.AI
Non-Asymptotic Bounds and a General Formula for the Rate-Distortion Region of the Successive Refinement Problem ∗ Tetsunao Matsuta† arXiv:1802.07458v1 [cs.IT] 21 Feb 2018 source symbol X encoder 1 ✲ f1 encoder 2 ✲ f2 decoder 1 ✲ ϕ1 reprod. symbol 1 decoder 2 reprod. symbol 2 ✲ϕ ✲ 2 Tomohiko Uyematsu‡ rate-distortion region. Since a codeword is used in both decoders, we cannot always optimize rates like the case where each codeword is used for each reconstruction separately. However, there are some cases where we can achieve the optimum rates. Necessary and sufficient conditions for such cases were independently given by Koshelev [3], [4] and Equitz and Cover [5]. The complete characterization of the rate-distortion region for discrete stationary memoryless sources was given by Rimoldi [6]. Yamamoto [7] also gave the rate-distortion region as a special case of a more general coding problem. Later, Effros [8] characterized the rate-distortion region for discrete stationary ergodic and non-ergodic sources. Recently, the asymptotic analysis of the second-order rates to the blocklength becomes an active target of the study. Especially, for the successive refinement problem, No et al. [9] and Zhou et al. [10] gave a lot of results to the set of second-order rates for discrete and Gaussian stationary memoryless sources. No et al. [9] considered separate excess-distortion criteria such that a probability that a distortion exceeds a given distortion level is less than a given probability level separately for each reconstruction. On the other hand, Zhou et al. [10] considered the joint excess-distortion criterion such that a probability that either of distortions exceeds a given distortion level is less than a given probability level. Although they also gave several nonasymptotic bounds on the set of pairs of rates, they mainly focus on the asymptotic behavior of the set. On the other hand, in this paper, we consider non-asymptotic bounds on pairs of rates in finite blocklengths. Especially, since a rate is easily calculated by a number of codewords, we focus on pairs of two numbers of codewords. Although we adopt separate excess-distortion criteria, our result can be easily applied to the joint excess-distortion criterion. We give inner and outer bounds on pairs of numbers of codewords. These bounds are characterized by using the smooth max Rényi divergence introduced by Warsi [11]. For the point-to-point lossy source coding problem, we also used the smooth max Rényi divergence to characterize the rate-distortion function which is the minimum rate when the blocklength is unlimited [12]. Proof techniques are similar to that of [12], but we employ several extended results for the successive refinement problem. The inner bound is derived by using an extended version of the previous lemma [12, Lemma 2]. We give this lemma as a special case of an extended version of the previous generalized covering lemma [13, Lemma 1]. The outer bound is derived by using an extended version of the previous converse bound [12, Lemma 4]. In this paper, we also consider the rate-distortion region for ✲ Y ✲ Z Figure 1: Successive refinement problem SUMMARY In the successive refinement problem, a fixed-length sequence emitted from an information source is encoded into two codewords by two encoders in order to give two reconstructions of the sequence. One of two reconstructions is obtained by one of two codewords, and the other reconstruction is obtained by all two codewords. For this coding problem, we give non-asymptotic inner and outer bounds on pairs of numbers of codewords of two encoders such that each probability that a distortion exceeds a given distortion level is less than a given probability level. We also give a general formula for the rate-distortion region for general sources, where the rate-distortion region is the set of rate pairs of two encoders such that each maximum value of possible distortions is less than a given distortion level. Key words: general source, information spectrum, non-asymptotic bound, rate-distortion region, successive refinement 1 Introduction The successive refinement problem is a fixed-length lossy source coding problem with many terminals (see Fig. 1). In this coding problem, a fixed-length sequence emitted from an information source is encoded into two codewords by two encoders in order to give two reconstructions of the sequence. One of two reconstructions is obtained by one of two codewords by using a decoder, and the other reconstruction is obtained by all two codewords by using the other decoder. An important parameter of the successive refinement problem is a pair of rates of two encoders such that each distortion between the source sequence and a reconstruction is less than a given distortion level. The set of these pairs when the length (blocklength) of the source sequence is unlimited is called the ∗ Portions of this paper were presented at the 38th Symposium on Information Theory and Its Applications [1], and at the 2016 IEICE Society Conference [2]. † [email protected][email protected] The authors are with Dept. of Information and Communications Engineering, Tokyo Institute of Technology, Tokyo, 152-8552 Japan. 1 general sources. In this case, we adopt the maximum-distortion criterion such that the maximum value of possible distortion is less than a given distortion level for each reconstruction. By using the spectral sup-mutual information rate (cf. [14]) and the non-asymptotic inner and outer bounds, we give a general formula for the rate-distortion region. We show that our ratedistortion region coincides with the region obtained by Rimoldi [6] when a source is discrete stationary memoryless. Furthermore, we consider a mixed source which is a mixture of two sources and show that the rate-distortion region is the intersection of those of two sources. The rest of this paper is organized as follows. In Section 2, we provide some notations and the formal definition of the successive refinement problem. In Section 3, we give several lemmas for an inner bound on pairs of numbers of codewords and the rate-distortion region. These lemmas are extended versions of our previous results [12, Lemma 2] and [13, Lemma 1]. In Section 4, we give outer and inner bounds using the smooth max Rényi divergence on pairs of numbers of codewords. In Section 5, we give a general formula for the rate-distortion region. In this section, we consider the rate-distortion region for discrete stationary memoryless sources and mixed sources. In Section 6, we conclude the paper. note numbers of codewords. Two decoders decoder 1 and decoder 2 are represented as functions ϕ1 : [1 : M1 ] → Y and ϕ2 : [1 : M1 ] × [1 : M2 ] → Z, respectively. We refer to a tuple of encoders and decoders ( f1, f2, ϕ1, ϕ2 ) as a code. In order to measure distortions between the source symbol and reconstruction symbols, we introduce distortion measures defined by functions d1 : X × Y → [0, +∞) and d2 : X × Z → [0, +∞). We define two events of exceeding given distortion levels D1 ≥ 0 and D2 ≥ 0 as follows: E1 (D1 ) , {d1 (X, ϕ1 ( f1 (X))) > D1 }, E2 (D2 ) , {d2 (X, ϕ2 ( f1 (X), f2 (X))) > D2 }. Then, we define the achievability under the excess-distortion criterion. Definition 1. For positive integers M1, M2 , real numbers D1, D2 ≥ 0, and ǫ1, ǫ2 ∈ [0, 1], let M = (M1, M2 ), D = (D1, D2 ), and ǫ = (ǫ1, ǫ2 ). Then, for a source X, we say (M, D) is ǫachievable if and only if there exists a code ( f1, f2, ϕ1, ϕ2 ) such that numbers of codewords of encoder 1 and encoder 2 are M1 and M2 , respectively, and Pr{Ei (Di )} ≤ ǫi, ∀i ∈ {1, 2}. In what follows, for constants M1, M2, D1, D2, ǫ1, and ǫ2 , we often use the above simple notations: M = (M1, M2 ), D = (D1, D2 ), and ǫ = (ǫ1, ǫ2 ). In this setting, we consider the set of all pairs (M1, M2 ) of numbers of codewords under the excessdistortion criterion. According to the ǫ-achievability, this set is defined as follows: 2 Preliminaries Let N, R, and R ≥0 be sets of positive integers, real numbers, and non-negative real numbers, respectively. Unless otherwise stated, we use the following notations. For a pair of integers i ≤ j, the set of integers {i, i + 1, · · · , j} is denoted by [i : j]. For finite or countably infinite sets X and Y, the set of all probability distributions over X and X × Y are denoted by PX and PX Y , respectively. The set of all conditional probability distributions over X given Y is denoted by PX |Y . The probability distribution of a random variable (RV) X is denoted by the subscript notation PX , and the conditional probability distribution for X given an RV Y is denoted by PX |Y . The n-fold Cartesian product of a set X is denoted by X n while an n-length sequence of symbols (a1, a2, · · · , an ) is denoted by ∞ is denoted by the bold-face an . The sequence of RVs {X n }n=1 ∞ and letter X. Sequences of probability distributions {PX n }n=1 ∞ conditional probability distributions {PX n |Y n }n=1 are denoted by bold-face letters PX and PX |Y , respectively. For the successive refinement problem (Fig. 1), let X, Y, and Z be finite or countably infinite sets, where X represents the source alphabet, and Y and Z represent two reconstruction alphabets. Let X over X be an RV which represents a single source symbol. Since the source can be characterized by X, we also refer to it as the source. When we consider X as an n-fold Cartesian product of a certain finite or countably infinite set, we can regard the source symbol X as an n-length source sequence. Thus, for the sake of brevity, we deal with the single source symbol unless otherwise stated. Two encoders encoder 1 and encoder 2 are represented as functions f1 : X → [1 : M1 ] and f2 : X → [1 : M2 ], respectively, where M1 and M2 are positive integers which de- Definition 2. For a source X, real numbers D1, D2 ≥ 0, and ǫ1, ǫ2 ∈ [0, 1], we define M(D, ǫ |X) , {(M1, M2 ) ∈ N2 : (M, D) is ǫ-achievable}. Basically, this paper deals with a coding for a single source symbol. However, in Section 5, we deal with the coding for an n-length source sequence. Hence in that section, by abuse of notation, we regard the above sets X, Y, and Z as n-fold Cartesian products X n , Y n , and Z n , respectively. We also regard source symbol X on X as an n-length source sequence ∞ X n on X n . Then we call the sequence X = {X n }n=1 of source sequences the general source that is not required to satisfy the consistency condition. We use the superscript (n) for a code, distortion measures, (n) (n) (n) (n) and numbers of codewords (e.g., ( f1 , f2 , ϕ1 , ϕ2 )) to make clear that we are dealing with source sequences of length n. For a code, we define rates R1(n) and R2(n) as 1 log Mi(n), ∀i ∈ {1, 2}. n Hereafter, log means the natural logarithm. We introduce maximum distortions for a sequence of codes. To this end, we define the limit superior in probability [14]. Ri(n) , Definition 3 (Limit superior in probability). For an arbitrary ∞ of real-valued RVs, we define the limit sequence S = {S n }n=1 superior in probability by n o p-lim sup Sn , inf α : lim Pr {Sn > α} = 0 . n→∞ 2 n→∞  h    M2 i M1 = E E E 1{(A, B̃, C̃) < F } A, B̃ A , Now we introduce the maximum distortions: p-lim sup d1(n) (X n, ϕ1(n) ( f1(n) (X n ))), n→∞ (n) p-lim sup d2 (X n, ϕ2(n) ( f1(n) (X n ), f2(n) (X n ))). n→∞ where 1{·} denotes the indicator function. Proof. We have Then, we define the achievability under the maximum distortion criterion. Pr Definition 4. For real numbers R1, R2 ≥ 0, let R = (R1, R2 ). Then, for a general source X, and real numbers D1, D2 ≥ 0, we say a pair (R, D) is fm-achievable if and only if there exists a sequence {( f1(n), f2(n), ϕ1(n), ϕ2(n) )} of codes satisfying p-lim sup d1(n) (X n, ϕ1(n) ( f1(n) (X n ))) n→∞ (n) p-lim sup d2 (X n, ϕ2(n) ( f1(n) (X n ), f2(n) (X n ))) n→∞ = ≤ D1, ≤ D2, = ∀i ∈ {1, 2}. M1 Ö PB̃ (b̃i ) M2 Ö Õ PC̃ | B̃ (c̃i, j | b̃i ) j=1 × 1{(a, b̃i, c̃i, j ) < F } = Õ P A (a) a ∈A M1 Õ Ö PB̃ (b̃i ) i=1 b̃i ∈B × 1{(a, b̃i, c̃i, j ) < F } Remark 1. We can show that the rate-distortion region R(D|X) is a closed set by the definition and using the diagonal line argument (cf. [14]). = Õ a ∈A P A (a) M1 Õ Ö i=1 b̃ ∈B PB̃ (b̃) M2 Õ Ö PC̃ | B̃ (c̃i, j | b̃i ) j=1 c̃i, j ∈C M2 Ö j=1 Õ PC̃ | B̃ (c̃| b̃) c̃ ∈C: (a, b̃, c̃)<F ª © Õ ©Õ ® ­ ­ PC̃ | B̃ (c̃| b̃)® PB̃ (b̃) ­ = P A (a) ­ ­ ­ ® c̃ ∈C: a ∈A b̃ ∈B ¬ «(a, b̃, c̃)<F « Õ We note that when we regard X as n-length sequence in the definition of M(D, ǫ |X), it gives a non-asymptotic region of pairs of rates for a given finite blocklength. 3 Covering Lemma M2 M1 ª ® ® ® ¬ . By recalling that ( B̃, C̃) is independent of A, this coincides with the right side of (1).  In this section, we introduce some useful lemmas and corollaries for an inner bound on the set M(D, ǫ |X) and R(D|X). The next lemma is the most basic and important result in the sense that all subsequent results in this section are given by this lemma. This lemma implies an exact analysis of the error probability of covering a set A in terms of a given condition F by codewords { B̃i } and {C̃i, j } of random coding. Hence, this lemma can be regarded as an extended version of [15, Theorem 9]. Although the above lemma gives an exact analysis, it is difficult to use it for characterizing an inner bound on pairs of numbers of codewords and the rate-distortion region. Instead of it, we will use the next convenient lemma. Lemma 1. Let A ∈ A be an arbitrary RV, and B̃ ∈ B and C̃ ∈ C be RVs such that the pair ( B̃, C̃) is independent of A. For an integer M1 ≥ 1, let B̃1, B̃2, · · · , B̃ M1 be RVs which are independent of each other and of A, and each distributed according to PB̃ . For an integer i ∈ [1 : M1 ] and M2 ≥ 1, let C̃i,1, C̃i,2, · · · , C̃i, M2 be RVs which are independent of each other and of A, and each distributed according to PC̃ | B̃ (·| B̃i ). Then, for any set F ⊆ A × B × C, we have j=1   M2 i=1 R(D|X) , {(R1, R2 ) ∈ R2≥0 : (R, D) is fm-achievable}.   i=1 Õ Ö Ö © ª × ­P A(a) PC̃ | B̃ (c̃i, j | b̃i )® PB̃ (b̃i ) j=1 i=1 « ¬ M M 2 1 ©Ö Ö ª ×­ 1{(a, b̃i, c̃i, j ) < F }® « i=1 j=1Õ ¬ Õ Õ × P A(a) Definition 5 (Rate-distortion region). For a general source X and real numbers D1, D2 ≥ 0, we define {(A, B̃i, C̃i, j ) < F } j=1    a ∈A (b̃1 ··· , b̃ M )∈B M1 (c̃1,1, ··· , c̃1, M ,c2,1 ··· , c̃ M , M )∈C M1 M2 2 1 2 1 In what follows, for constants R1 and R2 , we often use the above simple notation: R = (R1, R2 ). In this setting, we consider the set of all rate pairs under the maximum distortion criterion. According to the fm-achievability, this set, usually called the rate-distortion region, is defined as follows: M2 M1 Ù  Ù    i=1 Õ {(A, B̃i, C̃i, j ) < F } M1 n→∞ Pr M2 M1 Ù   Ù a ∈A (b̃1 ··· , b̃ M )∈B M1 (c̃1,1, ··· , c̃1, M ,c2,1 ··· , c̃ M , M )∈C M1 M2 2 1 2 1 and lim sup Ri(n) ≤ Ri, (1) Lemma 2. Let A ∈ A, B ∈ B, and C ∈ C be arbitrary RVs, and B̃ ∈ B and C̃ ∈ C be RVs such that the pair ( B̃, C̃) is independent of A. Let ψ1 : A × B → [0, 1] be a function and α1 ∈ [0, 1] be a constant such that      P A(a)PB̃ (b) ≥ α1 ψ1 (a, b)P AB (a, b), ∀(a, b) ∈ A × B. 3 (2) Furthermore, let ψ2 : A × B × C → [0, 1] be a function and α2 ∈ [0, 1] be a constant such that × PBC | A (b, c|a) − e−α2 M2 −log α1 (3) Then, we have  h    M2 i M1 E E E 1{(A, B̃, C̃) < F } A, B̃ A © ­ ­ P A(a) ­­1 − α1 ≤ ­ a ∈A: ­ P A (a)>0 « Õ ≤ 1 − E[ψ1 (A, B)ψ2 (A, B, C)] + Pr {(A, B, C) < F } + e−α2 M2 −log α1 + e−α1 M1 . (4) Proof. We have   h  M i M1  E E E 1{(A, B̃, C̃) < F } A, B̃ 2 A = Õ P A(a) a ∈A: P A (a)>0 Õ a ∈A: P A (a)>0 © ­ ­ P A(a) ­­1 − ≤ ­ a ∈A: ­ P A (a)>0 « (a) b ∈B b ∈B M2 M1 ª ® ® ® ¬ (c) ≤ Õ ψ1 (a, b)ψ2 (a, b, c) (b,c)∈B×C: (a,b,c)∈F, PB| A (b |a)>0 + e−α2 M2 −log α1 + e−α1 M1 M2 M1 Õ (b) ª ® ® ® ® ® ® ¬ ≤ 1 − E[ψ1 (A, B)ψ2 (A, B, C)] + Pr {(A, B, C) < F } + e−α2 M2 −log α1 + e−α1 M1 , where |x| + = max{0, x}, (a) follows since (1 − x y) M ≤ 1 − y + e−x M for 0 ≤ x, y ≤ 1 and M > 0, and (b) comes from the fact that ψ1 (a, b)ψ2 (a, b, c) ≤ 1.  The importance of this lemma is to be able to change RVs from (A, B̃, C̃) to arbitrary correlated RVs (A, B, C). This makes it possible to characterize an inner bound on pairs of numbers of codewords and the rate-distortion region. Lemma 2 can be regarded as an extended version of our previous lemma [13, Lemma 1] to multiple correlated RVs. Hence, like the previous lemma, by changing functions and constants, it gives many types of bounds such as the following two corollaries. © Õ ­ α1 ψ1 (a, b)PB | A(b|a) P A(a) ­1 − ­ a ∈A: b ∈B: PB| A (b |a)>0 P A (a)>0 « Õ ª ® ψ2 (a, b, c)PC | AB (c|a, b) + e−α2 M2 ® × ® c ∈C: (a,b,c)∈F ¬ Õ  + M1 (a,b,c)∈A×B×C: (a,b,c)∈F, P AB (a,b)>0 © ª ­ ® Õ ­ ® ­ ψ2 (a, b, c)PC | AB (c|a, b)®® × ­1 − α2 ­ ® c ∈C: ­ ® (a,b,c)∈F, PB| A (b |a)>0 « ¬ Õ ψ1 (a, b)ψ2 (a, b, c) (b,c)∈B×C: (a,b,c)∈F, PB| A (b |a)>0  + ×PBC | A (b, c|a) − e−α2 M2 −log α1 + e−α1 M1 Õ ψ1 (a, b)ψ2 (a, b, c)P ABC (a, b, c) ≤ 1− © © ­Õ ­ Õ ­ ­ P A(a) ­­ ≤ PB̃ (b) ­­1 − ψ2 (a, b, c) ­b ∈B ­ a ∈A: c ∈C: ­ ­ P A (a)>0 (a,b,c)∈F, PB| A (b |a)>0 « «  M1 ×PC | AB (c|a, b) + e−α2 M2 (b) Õ × PBC | A (b, c|a) − e−α2 M2 −log α1 PB̃ (b) ª © Õ ® ­ PC̃ | B̃ (c|b)® × ­1 − ­ ® c ∈C: (a,b,c)∈F « ¬ Õ (a) Õ ≤ P A(a) PB̃ (b) , where (a) comes from (3), (b) follows since (1 − x y) M ≤ 1 − y + e−x M for 0 ≤ x, y ≤ 1 and M > 0 (cf. [16, Lemma 10.5.3]), and (c) comes from (2). Since the probability is not grater than 1, we have   h   M2 i M1 E E E 1{(A, B̃, C̃) < F } A, B̃ A P AB (a, b)PC̃ | B̃ (c|b) ≥ α2 ψ2 (a, b, c)P ABC (a, b, c), ∀(a, b, c) ∈ A × B × C.   M1 Corollary 1. For any real numbers γ1, γ2 ∈ R, and any integers M1, M2 ≥ 1 such that M1 ≥ exp(γ1 ) and M2 ≥ exp(γ2 ), we have  h    M2 i M1 E E E 1{(A, B̃, C̃) < F } A, B̃ A  PB | A (B| A) ≤ Pr log > log M1 − γ1 PB̃ (B) ) PC | AB (C| A, B) or log > log M2 − γ2 PC̃ | B̃ (C|B) M1 © © ­ ­ Õ ­ ­ P A(a) ­­1 − α1 ­­ = ψ1 (a, b)ψ2 (a, b, c) ­ ­ (b,c)∈B×C: a ∈A: ­ ­ (a,b,c)∈F, P A (a)>0 « « PB| A (b |a)>0 Õ + Pr {(A, B, C) < F } + e− exp(γ2 )−γ1 +log M1 + e− exp(γ1 ) . 4 Proof. Let α1 = exp(γ1 ) M1 , α2 = exp(γ2 ) M2 , On the other hand, let α1 and α2 be constants such that   δ1 α1 = exp − D̄∞ (P AB kP A × PB̃ |ψ1 ) ,   δ2 α2 = exp − D̄∞ (P ABC kP AB × PC̃ | B̃ |ψ2 ) .   PB | A (b|a) ≤ log M1 − γ1 , ψ1 (a, b) = 1 log PB̃ (b) ( ) PC | AB (c|a, b) ψ2 (a, b, c) = 1 log ≤ log M2 − γ2 . PC̃ | B̃ (c|b) Then, for any (a, b, c) ∈ A × B × C, we have α1 ψ1 (a, b)P AB (a, b)   P A(a)PB̃ (b) ≤ inf ψ1 (a, b)P AB (a, b) (a,b)∈A×B ψ1 (a, b)P AB (a, b) Then, we can easily check that these constants and functions satisfy (2) and (3). Plugging these functions and constants into (4), we have the desired bound.  ≤ P A(a)PB̃ (b), This corollary can be regarded as a bound in terms of the information spectrum (cf. [14]). To the best of our knowledge, this type of bound has not been reported so far (although, there are some converse bounds [10, Lemma 15] and [17, Theorem 3]). On the other hand, the next corollary gives a bound in terms δ of the smooth max Rényi divergence D∞ (PkQ) defined as δ D∞ (PkQ) where |x| + , Í inf ψ:A→[0,1]: a∈A ψ(a)P(a)≥1−δ and α2 ψ2 (a, b, c)P ABC (a, b, c)   P AB (a, b)PC̃ | B̃ (c|b) ≤ inf (a,b,c)∈A×B×C ψ2 (a, b, c)P ABC (a, b, c) × ψ2 (a, b, c)P ABC (a, b, c) ≤ P AB (a, b)PC̃ | B̃ (c|b). ψ(a)P(a) + , log sup Q(a) a ∈A Thus, ψ1 , ψ2 , α1 , and α2 satisfy (2) and (3). Plugging these functions and constants into (4), we have  h    M i M1 E E E 1{(A, B̃, C̃) < F } A, B̃ 2 A = max{0, x}. Corollary 2. For any real numbers δ1, δ2 ≥ 0, and any integers M1, M2 ≥ 1, we have  h    M i M1 E E E 1{(A, B̃, C̃) < F } A, B̃ 2 A ≤ δ1 + δ2 + Pr {(A, B, C) < F } δ2 + e− exp(−D∞ δ1 × e D∞ ≤ δ1 + δ2 + Pr {(A, B, C) < F } δ2 + e− exp(−D∞ +e δ − exp(−D∞1 (P AB k P A ×PB̃ ))M1 + e− exp(−D∞ . (5) a∈A where δ D̄∞ (PkQ|ψ) = log sup a ∈A ψ(a)P(a) Q(a) + . δ D∞ (PkQ)− can be simply defined as δ D∞ (PkQ)− , Then, we have E[ψ1 (A, B)ψ2 (A, B, C)] Í log sup inf ψ:A→[0,1]: ψ(a)P(a)≥1−δ a ∈A ψ(a)P(a) . Q(a) a∈A In this definition, it may be a negative value depending on δ. δ (PkQ). Since this case is meaningless in this study, we adopt D∞ Here we also note that (a) ≥ E[ψ1 (A, B)] + E[ψ2 (A, B, C)] − 1 ≥ 1 − δ1 − δ2, ψ(a)P(a)≥1−δ Since for non-negative real valued functions f (b) and g(b), it holds that (cf. e.g. [16, Lemma 16.7.1]) Í f (b) f (b) Íb ∈B , ≤ sup g(b) g(b) b ∈B b ∈B (6) ǫ, , Remark 2. The original definition of the smooth max Rényi divergence (cf. [12]) is as follows: Í ψ(b)P(b) δ . log sup bÍ∈B D∞ (PkQ)− , inf B⊆A b ∈B Q(b) Í ψ:A→[0,1]: and δ2 D̄∞ (P ABC kP AB × PC̃ | B̃ |ψ2 ) δ2 ≤ D∞ (P ABC kP AB × PC̃ | B̃ ) + (P AB k P A ×PB̃ )−ǫ )M1 where we use inequalities (5), (6), and (7). Since ǫ > 0 is arbitrary, this completes the proof.  Proof. For an arbitrarily fixed ǫ > 0, let ψ1 and ψ2 be functions such that E[ψ1 (A, B)] ≥ 1 − δ1 , E[ψ2 (A, B, C)] ≥ 1 − δ2 , δ1 δ1 (P AB kP A × PB̃ ) + ǫ, (P AB kP A × PB̃ |ψ1 ) ≤ D∞ D̄∞ (P AB k P A ×PB̃ )+ǫ δ1 δ (P ABC k P AB ×PC̃ | B̃ ))M2 +D∞1 (P AB k P A ×PB̃ ) (P ABC k P AB ×PC̃ | B̃ )−ǫ )M2 (7) + δ δ D∞ (PkQ) = D∞ (PkQ)− . where (a) follows since x y ≥ x + y − 1 for x, y ∈ [0, 1]. 5 (8) 4 Inner and Outer Bounds on the Set of Pairs of Numbers of Codewords Remark 3. This proof is valid even without the RV Ũ. This auxiliary RV is introduced merely for consistency with the outer bound. In this section, we give outer and inner bounds on M(D, ǫ |X) by using the smooth max Rényi divergence. First of all, we show a bound on the probability of the two events E1 (D1 ) and E2 (D2 ) for the successive refinement problem. In what follows, let U be an arbitrary set. We use the next notation for the sake of simplicity. Definition 6. For RVs (A, B, C), we define δ δ I∞ (A; B) , D∞ (P AB kP A × PB ), δ δ (A; B|C) , D∞ (P ABC kP AC × PB |C ). I∞ Theorem 1. For a source X, let (Ũ, Ỹ, Z̃) ∈ U × Y × Z be RVs such that (Ũ, Ỹ, Z̃) is independent of X. Then, for any real numbers D1 , D2 ≥ 0, there exists a code ( f1, f2, ϕ1, ϕ2 ) such that numbers of codewords of encoder 1 and encoder 2 are M1 and M2 , respectively, and We also define the following set of probability distributions for a given source X and constants D and ǫ. P(D, ǫ |X) , {PUY Z |X ∈ PU Y Z |X : Pr{d1 (X, Y ) > D1 } ≤ ǫ1, Pr{d2 (X, Z) > D2 } ≤ ǫ2 } Pr{E1 (D1 ) ∪ E2 (D2 )}  h    M2 i M1 ≤ E E E 1{(X, Ũ, Ỹ, Z̃) < D} X, Ũ, Ỹ X , Now, by using the above theorem, we give an inner bound on M(D, ǫ |X). where Theorem 2 (Inner bound). For a source X, real numbers D1 , D2 ≥ 0, and ǫ1, ǫ2 > 0, we have Ø Ø M(D, ǫ |X) ⊇ MI (δ, β, PUY Z |X ), D = {(x, u, y, z) ∈ X × U × Y × Z : d1 (x, y) ≤ D1, d2 (x, z) ≤ D2 } . Proof. We generate (ũ1, ỹ1 ), (ũ2, ỹ2 ), · · · , (ũ M1, ỹ M1 ) ∈ U × Y independently subject to the probability distribution PŨỸ , and define the set C1 , {(ũ1, ỹ1 ), (ũ2, ỹ2 ), · · · , (ũ M1, ỹ M1 )}. For any i ∈ [1 : M1 ], we generate z̃i,1, z̃i,2, · · · , z̃i, M2 ∈ Z independently subject to the probability distribution PZ̃ |Ũ Ỹ (·|ui, yi ), and define the set C2,i , { z̃i,1, z̃i,2, · · · , z̃i, M2 }. We denote {C2,1, C2,2, · · · , C2, M1 } as C2 . For a given set C1 , C2 and a given symbol x ∈ X, we choose i ∈ [1 : M1 ] and j ∈ [1 : M2 ] such that (δ,β,γ)∈S(ǫ ) PUY Z | X ∈P(D,γ |X) where δ = (δ1, δ2 ), β = (β1, β2 ), γ = (γ1, γ2 ),  S(ǫ) , (δ, β, γ) ∈ (0, 1]6 : δ1 + δ2 + γ1 + γ2 +β1 + β2 ≤ min{ǫ1, ǫ2 }} ,  MI (δ, β, PUY Z |X ) , (M1, M2 ) ∈ N2 : 1 δ1 log M1 ≥ I∞ (X; U, Y ) + log log , β1 d1 (x, ỹi ) ≤ D1 and d2 (x, z̃i, j ) ≤ D2 . δ2 (X; Z |U, Y ) log M2 ≥ I∞   1 δ1 (X; U, Y ) + log + log I∞ , β2 If there not exists such pair, we set (i, j) = (1, 1). For this pair, we define encoders f1 and f2 as f1 (x) = i and f2 (x) = j. (9) (10) and (X, U, Y, Z) is a tuple of RVs with the probability distribution PX × PUY Z |X . On the other hand, we define decoders ϕ1 and ϕ2 as Proof. We only have to show that (M, D) is ǫ-achievable for (δ, β, γ) ∈ S(ǫ), PUY Z |X ∈ P(D, γ|X), and M1, M2 ≥ 1 such that     1 δ1 M1 = exp I∞ (X; U, Y ) log , (11) β1     1 δ2 δ1 . M2 = exp I∞ (X; Z |U, Y) I∞ (X; U, Y) + log β2 (12) ϕ1 (i) = ỹi and ϕ2 (i, j) = z̃i, j . By taking the average over the random selection of C1 and C2 , the average probability of Pr{E1 (D1 ) ∪ E2 (D2 )} is as follows: E[Pr{E1 (D1 ) ∪ E2 (D2 )}] M2 M1 Ù     Ù  {d1 (X, Ỹi ) > D1 or d2 (X, Z̃i, j ) > D2 } = Pr     i=1 j=1 M M   2 1 Ù Ù     {(X, Ũi, Ỹi, Z̃i, j ) < D} , = Pr     i=1 j=1 To this end, let (Ũ, Ỹ, Z̃) ∈ U × Y × Z be RVs that is independent of X and has the same marginal distribution as (U, Y, Z), i.e., PŨỸ Z̃ = PUY Z . Then, according to Theorem 1, there exists a code ( f1, f2, ϕ1, ϕ2 ) such that numbers of codewords of encoder 1 and encoder 2 are M1 and M2 , respectively, and where {(Ũi, Ỹi, Z̃i, j )} denote randomly selected sequences in C1 and C2 . Now, by noting that Z̃i, j is generated for a given (Ũi, Ỹi ), the theorem follows from Lemma 1 by setting that A = X, B̃ = (Ũ, Ỹ ), and C̃ = Z̃.  max{Pr{E1 (D1 )}, Pr{E2 (D2 )}} 6  h    M2 i M1 ≤ E E E 1{(X, Ũ, Ỹ, Z̃) < D} X, Ũ, Ỹ X . (13) Lemma 4. For a function g : A → B × C and c ∈ C, let kgkc denote the size of the image of g when one output is fixed to c, i.e., On the other hand, according to Corollary 2, we have  h i M1   M E E E 1{(X, Ũ, Ỹ, Z̃) < D} X, Ũ, Ỹ 2 X kgkc = |{b ∈ B : g(a) = (b, c), ∃a ∈ A}|. Then, for any δ ∈ (0, 1], any RV A ∈ A, and (B, C) = g(A), we have ≤ δ1 + δ2 + Pr {(X, U, Y, Z) < D} δ2 + e− exp(−I∞ δ log sup kgkc ≥ I∞ (A; B|C) + log δ. δ (X;Z |U,Y))M2 +I∞1 (X;U,Y) c ∈C δ +e − exp(−I∞1 (X;U,Y))M1 Proof. Let M = supc ∈C kgkc . Define a subset Dδ ⊆ B × C and the function ψo : A × B × C → [0, 1] as   δ , (16) Dδ , (b, c) ∈ B × C : PB |C (b|c) ≥ M (a) ≤ δ1 + δ2 + γ1 + γ2 + β1 + β2 (b) ≤ min{ǫ1, ǫ2 }, (14) ψo (a, b, c) , 1{(a, b, c) ∈ A × Dδ }. (17) Í Since PBC (b, c) = a ∈A P A(a)1{(b, c) = g(a)}, PB |C (b|c) > 0 for c ∈ C such that PC (c) > 0 if and only if there exists a ∈ A such that (b, c) = g(a) and P A (a) > 0. Thus, for c ∈ C such that PC (c) > 0, we have where (a) follows from (11), (12) and the fact that PUY Z |X ∈ P(D, γ|X), and (b) comes from (9). This implies that (M, D) is ǫ-achievable.  Remark 4. The proof is also valid if we do not restrict (Ũ, Ỹ, Z̃) to be the same distribution as (U, Y, Z). However, for the sake of simplicity, we consider the restricted case. |{b ∈ B : PB |C (b|c) > 0} = |{b ∈ B : (b, c) = g(a), ∃a ∈ A s.t. P A (a) > 0} An outer bound on M(D, ǫ |X) is given in the next theorem. ≤ kgkc ≤ M. Theorem 3 (Outer bound). For a source X, real numbers D1 , D2 ≥ 0 and ǫ1, ǫ2 > 0, and any set U such that |U| ≥ |X|, we have Ø Ù M(D, ǫ |X) ⊆ MO (δ, PUY Z |X ), Then, by using Lemma 3, it is easy to see that Õ ψo (a, b, c)P ABC (a, b, c) PUY Z | X ∈P(D,ǫ |X) δ ∈(0,1]2   δ = Pr PB |C (B|C) ≥ M (a,b,c)∈A×B×C where  MO (δ, PUY Z |X ) = (M1, M2 ) ∈ N2 : log M1 ≥ δ1 I∞ (X; U, Y) log M2 ≥ δ2 I∞ (X; Z |U, Y ) + log δ1, > 1 − δ. o Thus, we have + log δ2 . δ I∞ (A; B|C) Before proving the theorem, we show some necessary lemmas. ≤ log Lemma 3. Suppose that a pair of RVs (A, B) on A × B satisfies = log sup (a,b,c)∈A×D δ |{a ∈ A : P A|B (a|b) > 0}| ≤ M, ∀b ∈ B s.t. PB (b) > 0, sup (a,b,c)∈A×B×C (a) (15) ≤ log sup (a,b,c)∈A×D δ for some M > 0. Then, for any ǫ ∈ (0, 1], we have ψo (a, b, c)P ABC (a, b, c) P AC (a, c)PB |C (b|c) PB | AC (b|a, c) PB |C (b|c) + PB | AC (b|a, c) δ/M + + ≤ log M − log δ, ǫ o > 1 − ǫ. Pr P A|B (A|B) ≥ M n where (a) comes from the definition (16). This completes the proof.  Proof. Since the lemma can be proved in a similar manner as [14, Lemma 2.6.2], we omit the proof.  Now, we give the proof of Theorem 3. Proof of Theorem 3. Let k f1 k be the size of the image of an encoder f1 . Since k f1 k ≤ |X| and |X| ≤ |U| by the assumption, there exists an injective function id : [1 : k f1 k] → U. For this The next lemma is an extended version of [12, Lemma 4], which gives a bound on the size of the image of a function. 7 function, let Uid ⊆ U be the image of id and id−1 : Uid → [1 : k f1 k] be the inverse function of id on Uid . Suppose that (M, D) is ǫ-achievable. Then, there exists a code ( f1, f2, ϕ1, ϕ2 ) such that Since δ1 ∈ (0, 1] and δ2 ∈ (0, 1] are arbitrary, (22) and (25) imply that Ù (M1, M2 ) ∈ MO (δ, PUY Z |X ). δ ∈(0,1]2 Pr {d1 (X, ϕ1 ( f1 (X))) > D1 } ≤ ǫ1, Pr {d2 (X, ϕ2 ( f1 (X), f2 (X))) > D2 } ≤ ǫ2 . Now, by recalling that (X, U, Y, Z) satisfy (18) and (19), for any ǫ-achievable pair (M, D), we have Ø Ù (M1, M2 ) ∈ MO (δ, PUY Z |X ). Thus, by setting U = id( f1 (X)), Y = ϕ1 ( f1 (X)), and Z = ϕ2 ( f1 (X), f2 (X)), we have Pr {d1 (X, Y) > D1 } ≤ ǫ1, Pr {d2 (X, Z) > D2 } ≤ ǫ2 . PUY Z | X ∈P(D,ǫ |X) δ ∈(0,1]2 (18) (19) Remark 5. If we do not employ the RV U which has a role in fixing the RV f1 (X) to a certain codeword, we cannot bound kg2 k(u, y) by M2 in (24). Thus in this proof, introducing U is quite important. For a constant value c, let g1 (x) = (id( f1 (x)), ϕ1 ( f1 (x)), c), A = X, B = (U, Y), and C = c. According to Lemma 4, for any δ1 ∈ (0, 1], we have δ1 log kg1 kc ≥ I∞ (X; U, Y |C) + log δ1 δ1 = I∞ (X; U, Y) + log δ1 . Remark 6. In [1], we gave inner and outer bounds on M(D,ǫ |X) by using the α-mutual information of order infinity [18], where the α-mutual information is a generalized version of the mutual information. In this paper, however, we use the smooth max Rényi divergence. This is because it is compatible with the information spectrum quantity which is well studied and useful to analyze rates of a code. (20) On the other hand, we have kg1 kc = |{(u, y) ∈ Uid × Y : g1 (x) = (u, y, c), ∃x ∈ X}| Õ Õ = 1{g1 (x) = (u, y, c), ∃x ∈ X} Õ u ∈Uid y ∈Y = 1{g1 (x) = (u, ϕ1 (id−1 (u)), c), ∃x ∈ X} 5 General Formula Distortion Region u ∈Uid ≤ M1, (21) where the last inequality follows since the size of Uid is at most k f1 k and k f1 k ≤ M1 . Combining (20) and (21), we have δ1 log M1 ≥ I∞ (X; U, Y) + log δ1 . δ2 kg2 k(u, y) ≥ I∞ (X; Z |U, Y) + log δ2 . sup (22) (23) Rate- PY n |X n (Y n |X n ) 1 log , PY n (Y n ) n→∞ n PY n |X n Z n (Y n |X n, Z n ) 1 . I(X; Y|Z) , p-lim sup log PY n |Z n (Y n |Z n ) n→∞ n I(X; Y) , p-lim sup On the other hand, for any (u, y) ∈ Uid × Y, we have Õ kg2 k(u, y) = 1{z = ϕ2 (id−1 (u), f2 (x)), z ∈Z −1 The smooth max Rényi divergence is related to the spectral sup-mutual information rate as shown in the corollary of the next lemma. id (u) = f1 (x), y = ϕ1 (id−1 (u)), ∃x ∈ X} Õ ≤ 1{∃x ∈ X, z = ϕ2 (id−1 (u), f2 (x))} Õ z ∈Z Lemma 5. Consider two sequences X and Y of RVs over the same set. Then, we have 1{∃ j ∈ [1 : M2 ], z = ϕ2 (id−1 (u), j)} Õ z ∈Z ≤ the ∞ of Definition 7. For a sequence (X, Y, Z) = {(X n, Y n, Z n )}n=1 RVs, we define (u, y)∈U×Y ≤ for In this section, we deal with the coding for an n-length source sequence and give a general formula for the rate-distortion region. First of all, we introduce the spectral (conditional) sup-mutual information rate [14]. Let g2 (x) = (ϕ2 ( f1 (x), f2 (x)), id( f1 (x)), ϕ1 ( f1 (x))), A = X, B = Z, and C = (U, Y). Then, according to Lemma 4, for any δ2 ∈ (0, 1], we have log  This completes the proof. Õ 1 δ 1 PX n (X n ) lim lim sup D∞ (PX n kPY n ) = p-lim sup log . δ↓0 n→∞ n PY n (X n ) n→∞ n 1{z = ϕ2 (id−1 (u), j)} j ∈[1:M2 ] z ∈Z = M2 . ∞ of real numbers, it holds that Proof. For a sequence {an }n=1 + lim supn→∞ |an | = | lim supn→∞ an | + . Thus, according to (8), we have (24) We note that for any (u, y) ∈ {U \ Uid } × Y, it holds that kg2 k(u, y) = 0. Combining (23) and (24), we have δ2 log M2 ≥ I∞ (X; Z |U, Y ) + log δ2 . 1 δ (PX n kPY n ) lim lim sup D∞ δ↓0 n→∞ n (25) 8 + 1 δ = lim lim sup D∞ (PX n kPY n )− . δ↓0 n→∞ n 5.1 Direct Part (26) In this section, we show Ø R(D|X) ⊇ According to [11, Lemma 3], it holds that 1 δ (PX n kPY n )− lim lim sup D∞ δ↓0 n→∞ n PX n (X n ) 1 . = p-lim sup log PY n (X n ) n→∞ n R G (PUYZ|X |X). Let PUYZ|X ∈ PG (D|X) and suppose that I(X; U, Y) < ∞ and I(X; Z|U, Y) < ∞. Then, for any ǫ, ǫ1, ǫ2 > 0 such that ǫ1 = ǫ2 = ǫ, any (δ, β, γ) ∈ S(ǫ) in (9), and every sufficiently large n, we have (27) Furthermore, according to [14, Lemma 3.2.1], the right side of (27) is non-negative. Thus, by combining (26) and (27), we have the lemma.  Pr{d1(n) (X n, Y n ) > D1 + ǫ } ≤ γ1, (n) Pr{d2 (X n, Z n ) > D2 + ǫ } ≤ γ2 . Corollary 3. For a sequence (X, Y, Z) of RVs, we have 1 δ n n lim lim sup I∞ (X ; Y ) = I(X; Y), δ↓0 n→∞ n 1 δ n n n (X ; Y |Z ) = I(X; Y|Z). lim lim sup I∞ δ↓0 n→∞ n Hence, according to Theorem 2, there exists a sequence of codes {( f1(n), f2(n), ϕ1(n), ϕ2(n) )} such that for sufficiently large n, Pr{d1(n) (X n, Ŷ n ) > D1 + ǫ } ≤ ǫ, Pr{d2(n) (X n, Ẑ n ) > D2 + ǫ } ≤ ǫ, Proof. Since this corollary immediately follows from Lemma 5 and Definition 7, we omit the proof.  and Let PUYZ|X be a sequence of conditional probability distributions PU n Y n Z n |X n ∈ PU n Y n Z n |X n . We define PG (D|X) , {PUYZ|X : D1 (X, Y) ≤ D1, D2 (X, Z) ≤ D2 }, (n) D1 (X, Y) , p-lim sup d1 (X n, Y n ), n→∞ D2 (X, Z) , p-lim sup d2(n) (X n, Z n ),     1 1 1 (n) δ1 n n n log M1 = log exp I∞ (X ; U , Y ) log , n n β1 l   1 1 δ2 log M2(n) = log exp I∞ (X n ; Z n |U n, Y n ) n n   1 δ1 n n n . × I∞ (X ; U , Y ) + log β2 Thus, we have n→∞ 1 δ1 n n n lim sup R1(n) ≤ lim sup I∞ (X ; U , Y ) n→∞ n→∞ n R G (PUYZ|X |X) , {(R1, R2 ) ∈ R2 : R1 ≥ I(X; U, Y), R2 ≥ I(X; Z|U, Y)}, where (X, U, Y, Z) is a sequence of RVs (X n, U n, Y n, (a) ≤ I(X; U, Y), Z n ) induced by PUYZ|X and a general source X. The main result of this section is the next theorem which gives a general formula for the rate-distortion region. and lim sup R2(n)    1 δ2 (X n ; Z n |U n, Y n ) ≤ lim sup log exp I∞ n→∞ n   1 δ1 +1 × I∞ (X n ; U n, Y n ) + log β2    1 δ2 ≤ lim sup log exp I∞ (X n ; Z n |U n, Y n ) n→∞ n   1 δ1 n n n (X ; U , Y ) + δ2 × n lim sup I∞ n→∞ n    (a) 1 δ2 ≤ lim sup log exp I∞ (X n ; Z n |U n, Y n ) n→∞ n   × n I(X; U, Y) + δ2 n→∞ Theorem 4. For a general source X, real numbers D1, D2 ≥ 0, and any set U such that |U| ≥ |X|, we have Ø R(D|X) = R G (PUYZ|X |X). (28) PUYZ|X ∈PG (D |X) Remark 7. We can show that the right side of (28) is a closed set by using the diagonal line argument (cf. [14, Remark 5.7.5]). Remark 8. We are not sure whether a sequence U of auxiliary RVs is really necessary or not. It may be possible to characterize the region without it. The proof of this theorem is presented in the subsequent two sections. In these sections, for a code, we denote Ŷ n = Ẑ n = (29) PUYZ|X ∈PG (D |X) 1 δ2 n n n n (X ; Z |U , Y ) = lim sup I∞ n→∞ n (b) (n) (n) ϕ1 ( f1 (X n )), ϕ2(n) ( f1(n) (X n ), f2(n) (X n )). (a) ≤ I(X; Z|U, Y), 9 This means that (M (n), D + γn ) is γn -achievable. According to ∞ Theorem 3, there exists a sequence PUYZ|X = {PU nY n Z n |X n }n=1 of conditional probability distributions such that PU n Y n Z n |X n ∈ P(D + γn, γn |X n ) and for any δ ∈ (0, 1]2 , δ is a nonwhere (a) comes from Corollary 3 and the fact that I∞ increasing function of δ, and (b) follows since I(X; U, Y) < ∞. Now, by using the usual diagonal line argument, we can construct a sequence of codes {( f1(n), f2(n), ϕ1(n), ϕ2(n) )} such that 1 1 δ n n n log M1(n) ≥ lim sup I∞ (X ; U , Y ), n→∞ n n→∞ n 1 1 δ n n n n lim sup log M2(n) ≥ lim sup I∞ (X ; Z |U , Y ). n n n→∞ n→∞ (n) lim sup R1 ≤ I(X; U, Y), lim sup n→∞ lim sup R2(n) ≤ I(X; Z|U, Y). n→∞ and for any ǫ > 0, Since this holds for any δ ∈ (0, 1]2 , we have lim Pr{d1(n) (X n, Ŷ n ) > D1 + ǫ } = 0, lim sup n→∞ n→∞ lim Pr{d2(n) (X n, Ẑ n ) > D2 + ǫ } = 0. 1 δ n n n 1 log M1(n) ≥ lim lim sup I∞ (X ; U , Y ) n δ↓0 n→∞ n (a) n→∞ = I(X; U, Y), This implies that lim sup n→∞ p-lim sup d1(n) (X n, Ŷ n ) ≤ D1, 1 δ n n n n 1 (n) log M2 ≥ lim lim sup I∞ (X ; Z |U , Y ) n δ↓0 n→∞ n (a) n→∞ p-lim sup d2(n) (X n, n→∞ (32) = I(X; Z|U, Y). n (33) Ẑ ) ≤ D2 . where (a) are comes from Corollary 3. On the other hand, since PU nY n Z n |X n ∈ P(D + γn, γn |X n ), PUYZ|X must satisfy D1 (X; Y) ≤ D1 and D2 (X; Z) ≤ D1 , i.e., PUYZ|X ∈ PG (D|X). By combining (31), (32), and (33), we can conclude that for any fm-achievable pair (R, D), Ø (R1, R2 ) ∈ R G (PUYZ|X |X). Thus, for any PUYZ|X ∈ PG (D|X) such that I(X; U, Y) ∈ R and I(X; Z|U, Y) ∈ R, we have (I(X; U, Y), I(X; Z|U, Y)) ∈ R(D|X). This implies (29). PUYZ|X ∈PG (D |X) 5.2 Converse Part This implies (30). In this section, we show that Ø R(D|X) ⊆ R G (PUYZ|X |X). 5.3 Discrete Stationary Memoryless Sources (30) In this section, we show that the rate-distortion region given in Theorem 4 coincides with the region by Rimoldi [6] when a source X is a discrete stationary memoryless source. ∞ is a Let X, Y, and Z be finite sets. Since X = {X n }n=1 discrete stationary memoryless source, we assume that X n = (X1, X2, · · · , Xn ) is a sequence of independent copies of an RV X on X. We also assume that distortion measures d1(n) and d2(n) are additive, i.e., for two functions d1 : X × Y → [0, +∞) and d2 : X × Z → [0, +∞), distortion measures are represented as PUYZ|X ∈PG (D |X) Suppose that (R, D) is fm-achievable. Then, there exists a sequence of codes satisfying p-lim sup d1(n) (X n, Ŷ n ) ≤ D1, n→∞ p-lim sup d2(n) (X n, Ẑ n ) ≤ D2, n→∞ and 1Õ d1 (xi, yi ), n i=1 n 1 lim sup log Mi(n) ≤ Ri, n→∞ n ∀i ∈ {1, 2}. d1(n) (x n, y n ) = (31) Thus, we have for any γ > 0 (n) lim Pr{d1 (X n, Ŷ n ) > D1 + γ} = 0, We define n→∞ lim Pr{d2(n) (X n, Ẑ n ) > D2 + γ} = 0. PM (D|X) , {PY Z |X ∈ PY Z |X : E[d1 (X, Y)] ≤ D1, n→∞ E[d2 (X, Z)] ≤ D2 }, ∞ This implies that there exists a sequence {γn }n=1 such that limn→∞ γn = 0 and Pr{d1(n) (X n, Ŷ n ) Pr{d2(n) (X n, Ẑ n ) 1Õ d2 (xi, zi ). n i=1 n d2(n) (x n, z n ) = and for PY Z |X ∈ PY Z |X , > D1 + γ n } ≤ γ n , R M (PY Z |X |X) , {(R1, R2 ) ∈ R2≥0 : R1 ≥ I(X; Y ), R1 + R2 ≥ I(X; Y, Z)}, > D2 + γ n } ≤ γ n . 10 (X, Ȳ, Z̄) = {(X n, Ȳ n, Z̄ n )} be a sequence of RVs such that (X1, Ȳ1, Z̄1 ), (X2, Ȳ2, Z̄2 ), · · · , (Xn, Ȳn, Z̄n ) are independent and where (X, Y, Z) is the tuple of RVs induced by a conditional probability distribution PY Z |X ∈ PY Z |X and a given RV X. Then, we have the next theorem. Theorem 5. For a discrete stationary memoryless source X, additive distortion measures, and any set U such that |U| ≥ |Z| + 1, we have Ø R G (PUYZ|X |X) Ø PXi Ȳi Z̄i (x, y, z) = PXi Yi Zi (x, y, z), where PXi Yi Zi (x, y, z) is the i-th marginal distribution of (X n, Y n, Z n ). Then, according to [14, Lemma 5.8.1 and 5.8.2], we have D1 (X, Y) ≥ D1 (X, Ȳ), D2 (X, Z) ≥ D2 (X, Z̄), I(X; Y) ≥ I(X; Ȳ), and I(X; Y, Z) ≥ I(X; Ȳ, Z̄). Thus, by introducing the set I of probability distributions for independent RVs as ( n Ö PYi Zi |Xi , I , PYZ|X = {PY n Z n |X n } : PY n Z n |X n = PUYZ|X ∈PG (D |X) = R M (PY Z |X |X). (34) PY Z | X ∈PM (D |X) Remark 9. The right side of (34) can be written as i=1 {(R1, R2 ) ∈ R2≥0 : R1 ≥ R1 (D1 ), R1 + R2 ≥ Rb (R1, D1, D2 )}, ∃PYi Zi |Xi ∈ PYZ |X, i ∈ [1 : n] , (35) we have where R1 (D1 ) is the rate-distortion function and Rb (R1, D1, D2 ) gives the boundary for a given R1 , which are defined as (see, e.g., [19, Corollary 1], [10, (22)]) R1 (D1 ) , min PY | X ∈PY |X :E[d1 (X,Y )]≤D1 Rb (R1, D1, D2 ) , min R1 + R2 ≥ I(X; Y, Z)} Ø ⊆ {(R1, R2 ) : R1 ≥ I(X; Y), I(X; Y, Z). PYZ|X ∈I: D 1 (X,Y)≤D1,D 2 (X,Z)≤D2 R1 + R2 ≥ I(X; Y, Z)}. We note that R1 (D1 ) and Rb (R1, D1, D2 ) are convex and continuous functions of a triple (R1, D1, D2 ) (see, e.g., [14, Remark 5.2.1] and [20, Lemma 4]). I(X; Y) ≥ I(X; Y ) − δ, Proof: The left side of (34) ⊆ The right side of (34). We have Ø R G (PUYZ|X |X) I(X; Y, Z) ≥ I(X; Y, Z) − δ, and PUYZ|X ∈PG (D |X) ⊆ {(R1, R2 ) : R1 ≥ I(X; U, Y), D1 ≥ E[d1 (X, Y )] − γ, PUYZ|X ∈PG (D |X) D2 ≥ E[d2 (X, Z)] − γ. R1 + R2 ≥ I(X; U, Y) + I(X; Z|U, Y)} Ø (a) ⊆ {(R1, R2 ) : R1 ≥ I(X; U, Y), Thus, we have PUYZ|X ∈PG (D |X) Ø {(R1, R2 ) : R1 ≥ I(X; Y), PYZ|X ∈I: D 1 (X,Y)≤D1,D 2 (X,Z)≤D2 R1 + R2 ≥ I(X; U, Y, Z)} Ø (b) ⊆ {(R1, R2 ) : R1 ≥ I(X; Y), PYZ|X : D 1 (X,Y)≤D1,D 2 (X,Z)≤D2 R1 + R2 ≥ I(X; Y, Z)}, (37) On the other hand, in the same way as [14, p.372], for any δ > 0, γ > 0, and any PYZ|X ∈ I such that D1 (X, Y) ≤ D1 and D2 (X, Z) ≤ D2 , there exists PY Z |X ∈ PY Z |X such that We will prove the theorem by two parts separately. Ø {(R1, R2 ) : R1 ≥ I(X; Y), PYZ|X : D 1 (X,Y)≤D1,D 2 (X,Z)≤D2 I(X; Y ), PY Z | X ∈PYZ|X : E[d1 (X,Y)]≤D1,E[d2 (X, Z)]≤D2, I (X;Y )≤R1 Ø ⊆ R1 + R2 ≥ I(X; Y, Z)} ÙÙ Ø {(R1, R2 ) : γ>0 δ>0 PY Z | X ∈PM (D+γ |X) (36) R1 ≥ I(X; Y ) − δ, R1 + R2 ≥ I(X; Y, Z) − δ} ÙÙ = {(R1, R2 ) : R1 + δ ≥ R1 (D1 + γ), where (a) and (b) respectively come from the fact that γ>0 δ>0 I(X; U, Y) + I(X; Z|U, Y) ≥ I(X; U, Y, Z), R1 + R2 + δ ≥ Rb (R1 + δ, D1 + γ, D2 + γ)}, (38) I(X; U, Y) ≥ I(X; Y). For a sequence (X, Y, Z) = {(X n, Y n, Z n )} RVs induced by PYZ|X and a given source X, where the last equality comes from (35). Since R1 (D1 ) and Rb (R1, D1, D2 ) are convex and continuous functions of a triple (R1, D1, D2 ) (see Remark 9), it holds that of let 11 we have for any ǫ > 0, there exist sufficiently small γǫ > 0 and δǫ > 0 such that ÙÙ {(R1, R2 ) : R1 + δ ≥ R1 (D1 + γ), I(X; Z |U, Y ) = H(X |U, Y) − H(X |U, Y, Z) = αH(X |Y, Z) + (1 − α)H(X |Y) − H(X |Y, Z) δ>0 γ>0 = (1 − α)I(X; Z |Y ). R1 + R2 + δ ≥ Rb (R1 + δ, D1 + γ, D2 + γ)} Ù Ù ⊆ {(R1, R2 ) : R1 ≥ R1 (D1 ) − δ − ǫ, Now by defining PUYZ|X as PU n Y n Z n |X n (un, y n, z n |x n ) = δǫ >δ>0 γǫ >γ>0 R1 + R2 ≥ Rb (R1, D1, D2 ) − δ − ǫ } Ù = {(R1, R2 ) : R1 ≥ R1 (D1 ) − δ − ǫ, (X, U, Y, Z) becomes a sequence of independent copies of RVs (X, U, Y, Z). Thus, we have (39) I(X; U, Y) = I(X; U, Y) = αI(X; Z, Y) + (1 − α)I(X; Y), I(X; Z|U, Y) = I(X; Z |U, Y ) = (1 − α)I(X; Z |Y ), By combining (36), (37), (38), and (39), we have Ø R G (PUYZ|X |X) Ù Ù D1 (X, Y) = E[d1 (X, Y)] ≤ D1, D2 (X, Z) = E[d2 (X, Z)] ≤ D2, PUYZ|X ∈PG (D |X) ⊆ ∞ , where we use the fact that for i.i.d. RVs {Ai }i=1 Í n Ai = E[A1 ]. Hence, by noting that PUYZ|X ∈ p-lim sup n1 i=1 {(R1, R2 ) : R1 ≥ R1 (D1 ) − δ − ǫ, ǫ >0 δǫ >δ>0 n→∞ R1 + R2 ≥ Rb (R1, D1, D2 ) − δ − ǫ } PG (D|X), we have for any α ∈ [0, 1], = {(R1, R2 ) : R1 ≥ R1 (D1 ), R1 + R2 ≥ Rb (R1, D1, D2 )}. According to Remark 9, this completes the proof. (αI(X; Z, Y) + (1 − α)I(X; Y), (1 − α)I(X; Z |Y )) Ø ∈ R G (PUYZ|X |X).  (40) PUYZ|X ∈PG (D |X) Proof: The left side of (34) ⊇ The right side of (34). Since |U| ≥ |Z| + 1, there exists an injective function id : Z → U. For this function, let Uid ⊆ U be the image of id and id−1 : Uid → Z be the inverse function of id on Uid . Let u∗ ∈ U be a symbol such that u∗ < Uid . For any PY Z |X ∈ PM (D|X) and any α ∈ [0, 1], we define PUY Z |X ∈ PU Y Z |X as   αP (y, z|x)   Y Z |X  PUY Z |X (u, y, z|x) , (1 − α)PY Z |X (y, z|x)   0  PUY Z |X (ui, yi, zi |xi ), i=1 δǫ >δ>0 R1 + R2 ≥ Rb (R1, D1, D2 ) − δ − ǫ }. n Ö This implies that for any (R1, R2 ) ∈ R M (PY Z |X |X), it holds that Ð (R1, R2 ) ∈ PUYZ|X ∈PG (D |X) R G (PUYZ|X |X). This is because for any (R1, R2 ) ∈ R M (PY Z |X |X) such that I(X; Y, Z) ≥ R1 , there exists α ∈ [0, 1] such that R1 = αI(X; Z |Y ) + I(X; Y ) = αI(X; Y, Z) + (1 − α)I(X; Y ). if u = id(z), if u = u∗, otherwise. Then, we have R2 ≥ I(X; Y, Z) − R1 = I(X; Y, Z) − αI(X; Y, Z) − (1 − α)I(X; Y ) Since = (1 − α)I(X; Z |Y ). (41)   αP (x, y, id−1 (u)) if u ∈ Uid,   XY Z  PXUY (x, u, y) = (1 − α)PXY (x, y) if u = u∗,   0 otherwise,    P (x| y, id−1 (u)) if u ∈ Uid,   X |Y Z  PX |UY (x|u, y) = PX |Y (x| y) if u = u∗,   0 otherwise,  According to (40), such pair (R1, R2 ) is included in the reÐ gion PUYZ|X ∈PG (D |X) R G (PUYZ|X |X). On the other hand, for any (R1, R2 ) ∈ R M (PY Z |X |X) such that R1 > I(X; Y, Z), we have R2 ≥ 0. Since it holds that (I(X; Y, Z), 0) ∈ Ð PUYZ|X ∈PG (D |X) R G (PUYZ|X |X) Ð due to (40), such pair (R1, R2 ) is also included in the region PUYZ|X ∈PG (D |X) R G (PUYZ|X |X). Therefore, we have Ø R G (PUYZ|X |X) ⊇ R M (PY Z |X |X). I(X; U, Y ) = H(X) − αH(X |Y, Z) − (1 − α)H(X |Y ) = αI(X; Y, Z) + (1 − α)I(X; Y). Since this holds for any PY Z |X ∈ PM (D|X), this completes the proof.  we have PUYZ|X ∈PG (D |X) Remark 10. Unlike the rate-distortion region by Rimoldi, our region includes a sequence U of auxiliary RVs. This comes from the fact that the time-sharing argument as in (41) cannot be employed because it holds that in general, Furthermore, since   P (x| y, z)   X |Y Z  PX |UY Z (x|u, y, z) = PX |Y Z (x| y, z)   0  if u = id(z), if u = u∗, otherwise, I(X; Y, Z) , I(X; Y) + I(X; Z|Y). 12 5.4 Mixed Sources R G (PŨỸZ̃|X |X) PU1 Y1 Z1 |X1 ,PU2 Y2 Z2 |X2 : In this section, we give the rate-distortion region for mixed sources. ∞ and X = The mixed source X is defined by X1 = {X1n }n=1 2 n ∞ {X2 }n=1 as Ø D 1 (X, Ỹ)≤D1,D 2 (X, Z̃)≤D2 (a) = {(R1, R2 ) : PU1 Y1 Z1 |X1 ,PU2 Y2 Z2 |X2 : max{D 1 (X1,Y1 ),D 1 (X2,Y2 )} ≤D1, max{D 2 (X1,Z1 ),D 2 (X2,Z2 )} ≤D2 PX n (x n ) = α1 PX1n (x n ) + α2 PX2n (x n ), R1 ≥ max{I(X1 ; U1, Y1 ), I(X; U2, Y2 )} where α1, α2 ∈ [0, 1] and α1 + α2 = 1. The next lemma shows a fundamental property of the information spectrum of mixed sources. = R2 ≥ max{I(X; Z1 |U1, Y1 ), I(X; Z2 |U2, Y2 )}} Ø Ø PU1 Y1 Z1 |X1 ∈PG (D |X1 ) PU2 Y2 Z2 |X2 ∈PG (D |X2 ) Lemma 6. For sequences of RVs (X1, Y1, Z1 ) and (X2, Y2, Z2 ), let (X, Y, Z) be defined by R G (PU1 Y1 Z1 |X1 |X1 ) ∩ R G (PU2 Y2 Z2 |X2 |X2 ) = R(D|X1 ) ∩ R(D|X2 ). PX n Y n Z n (x n, y n, z n ) = α1 PX1n Y1n Z1n (x n, y n, z n ) where (a) comes from [14, Lemma 1.4.2], Lemma 6 and the fact that + α2 PX2n Y2n Z2n (x n, y n, z n ). Then, we have PX n Ũ n Ỹ n Z̃ n (x n, un, y n, z n ) I(X; Y) = max{I(X1 ; Y1 ), I(X2 ; Y2 )}, = α1 PX1n U1n Y1n Z1n (x n, un, y n, z n ) + α2 PX2n U2n Y2n Z2n (x n, un, y n, z n ). I(X; Y|Z) = max{I(X1 ; Y1 |Z1 ), I(X2 ; Y2 |Z2 )}. Proof. Since this lemma can be proved in the same way as [14, Lemma 7.9.1] by using [14, Lemma 1.4.2], we omit the details.  This completes the proof.  6 Conclusion The next theorem shows that the rate-distortion region for a mixed source is the intersection of those of two sources. In this paper, we have dealt with the successive refinement problem. We gave inner and outer bounds using the smooth max Rényi divergence on the set of pairs of numbers of codewords. These bounds are obtained by extended versions of our previous covering lemma and converse bound. By using these bounds, we also gave a general formula using the spectral sup-mutual information rate for the rate-distortion region. Further, we showed some special cases of our rate-distortion region for discrete stationary memoryless sources and mixed sources. Theorem 6. For a mixed source X defined by X1 and X2 , and any real numbers D1, D2 ≥ 0, we have R(D|X) = R(D|X1 ) ∩ R(D|X2 ). Proof. For PU1 Y1 Z1 |X1 and PU2 Y2 Z2 |X2 , we define PŨỸZ̃|X by PŨ n Ỹ n Z̃ n |X n (un, y n, z n |x n ) = Ø = α1 PX1n (x n )PU1nY1n Z1n |X1n (un, y n, z n |x n ) α2 P + X2n PX n (x n ) n (x )PU2n Y2n Z2n |X2n (un, Acknowledgment y n, z n |x n ) PX n (x n ) . This work was supported in part by JSPS KAKENHI Grant Number 15K15935. When PU1 Y1 Z1 |X1 = PU2 Y2 Z2 |X2 = PUYZ|X , we have PŨỸZ̃ |X = PUYZ|X by the definition. This implies that for any PUYZ|X , there exist PU1 Y1 Z1 |X1 and PU2 Y2 Z2 |X2 such that PUYZ|X = PŨỸZ̃ |X . On the other hand, for any PU1 Y1 Z1 |X1 and PU2 Y2 Z2 |X2 , there trivially exists PUYZ|X such that PUYZ|X = PŨỸZ̃|X . Thus, we have Ø R G (PUYZ|X |X) Ø References [1] T. Matsuta and T. Uyematsu, “Non-asymptotic bounds on numbers of codewords for the successive refinement problem,” Proc. 38th Symp. on Inf. Theory and its Apps. (SITA2015), pp.43–48, Nov. 2015. PUYZ|X ∈PG (D |X) = [2] T. Matsuta and T. Uyematsu, “A general formula of the achievable rate region for the successive refinement problem,” Proc. IEICE Society Conference, p.37, Sep. 2016. R G (PŨỸZ̃|X |X). PU1 Y1 Z1 |X1 ,PU2 Y2 Z2 |X2 : D 1 (X, Ỹ)≤D1,D 2 (X, Z̃)≤D2 [3] V. N. Koshelev, “Estimation of mean error for a discrete successive-approximation scheme,” Problemy Peredachi Informatsii, vol.17, no.3, pp.20–33, 1981. Thus, according to Theorem 4, we have R(D|X) 13 [20] V. Kostina and E. Tuncel, “Successive refinement of abstract sources,” arXiv preprint arXiv:1707.09567, July 2017. [4] V. N. Koshelev, “Hierarchical coding of discrete sources,” Problemy Peredachi Informatsii, vol.16, no.3, pp.31–49, 1980. [5] W. Equitz and T. Cover, “Successive refinement of information,” IEEE Trans. Inf. Theory, vol.37, no.2, pp.269–275, Mar. 1991. [6] B. Rimoldi, “Successive refinement of information: characterization of the achievable rates,” IEEE Trans. Inf. Theory, vol.40, no.1, pp.253–259, Jan. 1994. [7] H. Yamamoto, “Source coding theory for a triangular communication system,” IEEE Trans. Inf. Theory, vol.42, no.3, pp.848–853, May 1996. [8] M. Effros, “Distortion-rate bounds for fixed- and variablerate multiresolution source codes,” IEEE Trans. Inf. Theory, vol.45, no.6, pp.1887–1910, Sep. 1999. [9] A. No, A. Ingber, and T. Weissman, “Strong successive refinability and rate-distortion-complexity tradeoff,” IEEE Trans. Inf. Theory, vol.62, no.6, pp.3618–3635, June 2016. [10] L. Zhou, V.Y.F. Tan, and M. Motani, “Second-order and moderate deviations asymptotics for successive refinement,” IEEE Trans. Inf. Theory, vol.63, no.5, pp.2896– 2921, May 2017. [11] N.A. Warsi, “One-shot bounds for various information theoretic problems using smooth min and max Rényi divergences,” Proc. 2013 IEEE Inf. Theory Workshop, pp.1–5, Sep. 2013. [12] T. Uyematsu and T. Matsuta, “Revisiting the rate-distortion theory using smooth max Rényi divergence,” Proc. 2014 IEEE Inf. Theory Workshop, pp.202–206, Nov. 2014. [13] T. Matsuta and T. Uyematsu, “New non-asymptotic bounds on numbers of codewords for the fixed-length lossy compression,” IEICE Trans. Fundamentals, vol.E99-A, no.12, pp.2116–2129, Dec. 2016. [14] T. S. Han, Information-Spectrum Methods in Information Theory, Springer, 2003. [15] V. Kostina and S. Verdú, “Fixed-length lossy compression in the finite blocklength regime,” IEEE Trans. Inf. Theory, vol.58, no.6, pp.3309–3338, June 2012. [16] T. M. Cover and J. A. Thomas, Elements of Information Theory, 2nd ed., Wiley, New York, 2006. [17] V. Kostina and E. Tuncel, “The rate-distortion function for successive refinement of abstract sources,” Proc. IEEE Int. Symp. on Inf. Theory, pp.1923–1927, June 2017. [18] S. Verdú, “α-mutual information,” 2015 Inf. Theory and Apps. Workshop, pp.1–6, Feb. 2015. [19] A. Kanlis and P. Narayan, “Error exponents for successive refinement by partitioning,” IEEE Trans. Inf. Theory, vol.42, no.1, pp.275–282, Jan. 1996. 14
7cs.IT
1 Training and Testing Object Detectors with Virtual Images arXiv:1712.08470v1 [cs.CV] 22 Dec 2017 Yonglin Tian, Xuan Li, Kunfeng Wang, Member, IEEE, and Fei-Yue Wang, Fellow, IEEE Abstract—In the area of computer vision, deep learning has produced a variety of state-of-the-art models that rely on massive labeled data. However, collecting and annotating images from the real world has a great demand for labor and money investments and is usually too passive to build datasets with specific characteristics, such as small area of objects and high occlusion level. Under the framework of Parallel Vision, this paper presents a purposeful way to design artificial scenes and automatically generate virtual images with precise annotations. A virtual dataset named ParallelEye is built, which can be used for several computer vision tasks. Then, by training the DPM (Deformable Parts Model) and Faster R-CNN detectors, we prove that the performance of models can be significantly improved by combining ParallelEye with publicly available real-world datasets during the training phase. In addition, we investigate the potential of testing the trained models from a specific aspect using intentionally designed virtual datasets, in order to discover the flaws of trained models. From the experimental results, we conclude that our virtual dataset is viable to train and test the object detectors. Index Terms—Parallel Vision, virtual dataset, object detection, deep learning. I. I NTRODUCTION D ATASETS play an important role in the training and testing of computer vision algorithms [1][2]. However, real-world datasets are usually not satisfactory due to the insufficient diversity. And the labeling of images in real world is time-consuming and labor-intensive, especially in largescale complex traffic systems [3][4]. Moreover, it is a highly subjective work to annotate images manually. For example, different people may have different annotation results for the same image. As a result, the labeling result will deviate to some extent from the ground truth and even seriously affect the performance of computer vision algorithms. This work was supported by National Natural Science Foundation of China (61533019, 71232006). Yonglin Tian is with the Department of Automation, University of Science and Technology of China, Hefei 230027, China, and also with The State Key Laboratory of Management and Control for Complex Systems, Institute of Automation, Chinese Academy of Sciences, Beijing 100190, China (e-mail: [email protected]). Xuan Li is with the School of Automation, Beijing Institute of Technology, Beijing 100081, China (e-mail: [email protected]). Kunfeng Wang (Corresponding author) is with The State Key Laboratory of Management and Control for Complex Systems, Institute of Automation, Chinese Academy of Sciences, Beijing 100190, China, and also with Qingdao Academy of Intelligent Industries, Qingdao 266000, China (e-mail: [email protected]). Fei-Yue Wang is with The State Key Laboratory of Management and Control for Complex Systems, Institute of Automation, Chinese Academy of Sciences, Beijing 100190, China, and also with the Research Center for Computational Experiments and Parallel Systems Technology, National University of Defense Technology, Changsha 410073, China (e-mail: [email protected]). Most existing datasets originate from the real world, such as KITTI, PASCAL VOC, MS COCO, and ImageNet. Each of these datasets has many advantages, but they also have shortcomings. The KITTI [5] dataset is the world’s largest computer vision dataset for automatic driving scenarios, including more than one hundred thousand labeled cars. However, KITTI lacks some common types of objects (e.g., bus), and the number of trucks is small. The PASCAL VOC [6] dataset serves as a benchmark for classification, recognition, and detection of visual objects. PASCAL VOC contains 20 categories, but there are small-scale images per category, with an average of less than one thousand. The ImageNet dataset [7] is the world’s largest database of image recognition, including more than 1,000 categories. However, there is no semantic segmentation labeling information in it. There are 328,000 pictures of 91 classes of objects in the MS COCO [8] dataset. But the task of annotating this dataset is onerous. For example, it takes more than 20,000 hours to determine which object categories are present in the images of MS COCO. Generally speaking, real datasets are confronted with many problems, such as small scale and tedious annotation. Setting up a dataset with precise annotations from the real world means great labor and financial investments, let alone building a dataset with specific features like diverse areas of objects and occlusion levels. However, the latter occupies a significant position in addressing the problems of visual perception and understanding [9][10][11]. In work [9][10], Wang et al. proposed the theoretical framework of Parallel Vision by extending the ACP approach [12][13][14] and elaborated the significance of virtual data. The ACP methodology establishes the foundation for parallel intelligence [15][16][17], which provides a new insight to tackle issues in complex systems [18]. Under the framework of Parallel Vision depicted in Fig. 1, it is obvious to see the great advantage of virtual world to produce diverse labeled datasets with different environmental conditions and texture change which are usually regarded as important image features for object detection [19]. In our work, we take the specifically designed virtual datasets as resources to train object detectors and also as a tool to produce feedback of the performance of trained models during the testing phase. We choose DPM (Deformable Parts Model) [20] and Faster R-CNN [21] as the object detectors in our work. DPM was one of the most effective object detectors based on HOG (Histogram of Oriented Gradient) before the resurgence of deep learning. Faster R-CNN is currently a state of the art approach and widely used in object detection. Based on Fast R-CNN [22], Ren et al. [21] introduced the Region Proposal 2 Fig. 2. The appearance of artificial scene. Left: Map information exported from OSM. Right: Final artificial scene. Fig. 1. Basic framework and architecture for Parallel Vision. Network (RPN) that can share convolutional features of the whole image with the detection network. This work greatly reduced the time cost to generate region proposals and improved their qualities as well. Faster R-CNN lays the foundation for many 1st-place detection models in recent years. In this paper, we present an efficient way to construct virtual image datasets with advanced computer graphics techniques. It proves a flexible and feasible method to build training datasets that can greatly satisfy our needs such as diversity, scale, and specific occlusion level. On this basis, we study the effectiveness of our virtual dataset to train and test the object detectors. II. R ELATED W ORK There have been many attempts that use virtual world to carry out scientific researches. Bainbridge et al. [23] investigated the feasibility of utilizing Second life and World of Warcraft as sites for research in the social, behavioral, and economic sciences, as well as computer science. With a virtual living lab, Prendinger et al. [24] conducted several controlled driving and travel studies. In the area of computer vision, early works involved training pedestrian detectors based on HOG and linear SVM [25] and part-based pedestrian detector [26] with virtual datasets generated by the video game Half-Life 2. Besides training models, virtual-world data was also used to explore the invariance of deep features of DCNNs to missing low-level cues [27] and domain adaptation issues [28]. For semantic segmentation research, Richter et al. [29] presented a way to build virtual datasets via modern video game and got the corresponding annotations using an outside graphics hardware without access to the source code of the game. Most of the above approaches rely on video games rather than setting up the virtual world from the scratch, resulting in bad flexibility in the research process. Recently, Ros et al. [30] set up a virtual world on their own and collected images with semantic annotations by virtual cameras under different weather conditions and observing angles. They generated a virtual dataset named SYNTHIA in a flexible way which was used for training DCNNs for semantic segmentations in driving scenes. However, SYNTHIA lacks the annotations for other computer vision tasks such as object detection, tracking, and so on. In a similar way, Gaidon et al. [31] proposed a real-to-virtual world cloning method and released the video dataset called “Virtual KITTI” for multiobject tracking analysis. Basically the dataset is a clone of the real KITTI [5], so the overall framework and layout are constricted by the real KITTI dataset. Nowdays, Generative Adversarial Networks (GANs) [32] are widely used to produce photorealistic synthetic images [33], however, those images lack the corresponding annotations. In our work, a flexible approach to building artificial scenes from the scratch is proposed. We intend to set up virtual datasets with specific features and diverse annotations to train and test the object detectors. III. T HE V IRTUAL DATASET PARALLEL E YE A. Construction of Artificial Scene To imitate the layout of urban scene in real world, we exported the map information of the area of interest, Zhongguancun Area, Beijing, from the platform OpenStreetMap (OSM). Then, based on the raw map, we generated buildings, roads, trees, vegetation, fences, chairs, traffic lights, traffic signs and other “static” entities using the CGA (Computer Generated Architecture) rules of CityEngine. Finally, we imported the scene into the game engine Unity3D where cars, buses and trucks were added. Using the C# scripts, we controlled the vehicles to move according to certain traffic rules in the virtual world. Also, with the help of the Shaders in Unity3D, the weather and lighting condition were adjusted as needed. The artificial scene is shown in Fig. 2. B. Annotations of Virtual Images To build a dataset, we need to get the annotations of the corresponding images. Data labeling has always been a headache of the machine learning researchers. However, it is very simple and efficient to get the ground truths of the virtual images from our artificial scene via the components in Unity3D like MeshFilter, Shader, and so on. We achieved simultaneous ground truth generation including depth, optical flow, bounding box and pixel-level semantic segmentation while the scene was running. Fig. 4 shows the ground-truth annotations for different vision tasks. C. Setting Up Virtual Dataset In order to increase the diversity of the virtual dataset, we configured different weather (cloudy, sunny, rainy and foggy) and illumination (from sunrise to sunset) conditions for the artificial scene as shown in Fig. 5. These changes are deemed to have a significant effect on the performance of object detectors in real world [34][35][36]. We placed a virtual camera on a moving car that was used for capturing images in the scene. To produce obvious change in object’s appearance, 3 Fig. 5. Diversity of illuminations and weather conditions. Top: Virtual images took at 6:00 am (left) and 12:00 pm (right). Bottom: Virtual images with weather of foggy (left) and rainy (right). Fig. 3. Framework of constructing the virtual dataset. 1 : In CityEngine, set up a static city including buildings and roads using the CGA rules based on the map information from OSM. 2 3 : In Unity3D, import the models of interesting objects such as cars, people, animals and trees into the static city thus forming several static scenes. 4 : In Unity3D, activate the static scenes by controlling virtual objects to move using C# scripts. 5 : Control the virtual camera to move and capture images using C# scripts. 6 : Compute the annotations such as bounding box and semantic segmentation using C# scripts and Shaders in Unity3D. Fig. 6. Virtual camera in the artificial scene. Fig. 4. Annotations for different vision tasks. Top: Depth (left) and optical flow (right). Bottom: Bounding box (left) and semantic segmentation (right). we set different parameters for the camera including height, orientation and the field of view. The virtual camera is illustrated in Fig. 6. The sight distance of the camera can be adjusted and it is much longer in practice. We placed several cars, buses and trucks on the lanes which can move following the instruction of the scripts. More vehicles were put near the roads in different manners, sparse or dense, to create diverse occlusion levels. For the purpose of testing and improving the performance of object detectors on objects with distinct colors and poses, we achieved real-time color and pose change of the interesting objects in artificial scene while the virtual camera was collecting images. Based on the above techniques, we built the virtual dataset named ParallelEye [37], which is composed of three sub datasets. ParallelEye 01 is the first part of the virtual dataset which was set up with an on-board camera looking at five directions (i.e., 0, ±15, ±30 degree with respect to the moving direction). Therefore, the camera had a long sight distance to capture small and far objects. In ParallelEye 02, the orientation of the camera was adjusted to 90 degree with respect to the moving direction and we set the vehicles to rotate around their axes. Occlusion was not intentionally introduced to get a better understanding of the effect of pose change on the trained models. ParallelEye 03 was designed to investigate the influence of color and occluded condition on the performance of the object detector. We placed the vehicles crowdedly and changed their colors in every frame. The camera was set to look forward. Sample images from these three parts of the 4 Fig. 7. Sample images of three virtual sub datasets. First row: ParallelEye 01. Second row: ParallelEye 02. Third and fourth rows: ParallelEye 03. annotations on our workstation. It is efficient compared with manual labor, for example, it usually takes dozens of minutes to finish the labeling work on a single image containing various categories used for segmentation task. This virtual dataset was mainly built for researches on intelligent vehicles. For now, we included three common types of objects. Other objects such as person and motorbikes have not yet be contained due to their less appearance from the view of the virtual camera shown in Fig. 6. In the future, we will add more objects in our virtual scene under the framework shown in Fig. 3 to build a dataset containing more categories. Specifically, add the models such as person, motorbikes and animals in the virtual scene during step 3 and take them into account in the C# scripts during steps 4 5 6 . Then, we are able to capture images containing these objects with diverse annotations. It is also worth mentioning the ways to reduce computational complexity when we generalize the virtual scene to a bigger city or other large-scale environments by importing the corresponding maps during step 1 and more models at step 3 in Fig. 3. Great computational capacity is demanded as the scale of the virtual world increases if no action is taken. In practice, there are two widely-used methods to handle this problem. One is that we can only take into account the objects which are visible to the virtual camera instead of all the objects in the scene via some tricks like occlusion culling. Besides, it is also an effective way to replace the intricate textures and structures with rougher ones for the objects that are far from the camera. These measures help to decrease the workload of CPU and GPU of the platform, e.g., the number of vertex to compute, thus leading to an acceptable frame rate even when a large-scale scene is running. virtual dataset are shown in Fig. 7. D. Dataset Properties ParallelEye includes 15,931 images and annotations of three classes of objects (car, bus and truck) in VOC format. The numbers of images and objects in three sub datasets are recorded in Table I. The bar graphs in Fig. 8 depict the object occurrence and object geometry statistics as well as the occlusion level of three sub datasets. The objects are labelled as “Small” whose areas are smaller than 32×32 pixels and “Large” for those whose areas are larger than 96×96 pixels. The rest are labelled as “Medium”. For occlusion level, the objects are labelled as “Slightly occluded” whose occlusion rates are less than 0.1 and “Largely occluded” for those whose occlusion rates are more than 0.35 and “Partly occluded” for the rest. It is clear to see that ParallelEye 01 and ParallelEye 03 are more crowded than ParallelEye 02, which means there are less objects in one image in ParallelEye 02 compared with the other sub datasets. More importantly, ParallelEye 01 has more small objects and ParallelEye 03 has a higher occlusion level. E. Discussion In the experiments, our platform can work at 8-12 fps (frames per second) to produce virtual images with different TABLE I N UMBERS OF IMAGES AND OBJECTS IN THREE VIRTUAL SUB DATASETS Sub dataset Number of images Number of cars Number of buses Number of trucks ParallelEye 01 ParallelEye 02 ParallelEye 03 5,313 5,781 4,837 13,653 7,892 31,369 8,593 6,881 16,863 11,132 3,281 4,697 IV. E XPERIMENTS In our experiments, all the images and annotations were stored in the form of PASCAL VOC. For Faster R-CNN, the weights were initialized with ImageNet pre-trained weights. For the experiments of DPM, we used a three-component model for each category and the ratio of positive and negative examples was set as 1:3. A. Training Experiments on VOC+COCO and ParallelEye To obtain a real dataset containing three common traffic objects, i.e., car, bus and truck, we selected 1,997 images including car and bus from PASCAL VOC [6] and 1,000 images containing truck from MS COCO [8] that were transformed to VOC style. MS COCO includes more images containing truck. But we only chose 1,000 images and excluded images 5 Fig. 8. Object occurrence, object geometry and occlusion level of our virtual datasets. This figure shows (from left to right): Distribution of the number of instances within an image, object area distribution and occlusion level. where truck shares a fairly small proportion. These images and corresponding annotations from VOC and COCO were combined together and randomly divided into training set and testing set with the proportion of 3:1. Firstly, we trained the Faster R-CNN model with the real training set. Initial learning rate was set to 0.001 and decreased by the factor of 10 after 50,000 iterations. We chose one image as the batch size and momentum factor of 0.9 with the weight decay factor of 0.0005. Then, we randomly picked 2,000 images out from the virtual dataset ParallelEye and combined them with the real training data as a mixed training set to train another model with the same setting. We used VGG-16 and ResNet-50 for Faster R-CNN respectively in our experiments. Finally, we carried out experiments for DPM using the same datasets. These models were evaluated on the real testing set generated from PASCAL VOC and MS COCO. We followed the steps of the standard evaluation procedure of PASCAL VOC to calculate the Average Precision (AP) of each category. The intersection over union (IoU) was set to 0.7 for Faster RCNN and 0.5 for DPM. The results are shown in Table II. The examples of detection results for Faster R-CNN based on VGG-16 architecture are shown in Fig. 9. We noticed that the AP on bus for DPM is higher than Faster R-CNN. This may be caused by the fact that the shape of bus is not as flexible as car and truck, so it is easier to learn. Also, the number of bus is less than the other two types of objects [6] which is adverse for Faster R-CNN. Because deep learning models usually require more data to learn than the traditional ones. We also noticed that after we introducing the truck category from MS COCO, the AP of car and bus is decreased compared with models trained purely on the PASCAL VOC dataset for Faster R-CNN [21], which may be interpreted by the fact that MS COCO dataset is more challenging for object detection and contains more difficult images of objects that are partially occluded, amid clutter, etc [8]. TABLE II P ERFORMANCE OF MODELS EVALUATED ON VOC+COCO Model Training dataset Car Bus Truck DPM Real Mixed 0.482 0.496 0.715 0.721 0.482 0.499 Faster R-CNN (VGG-16) Real Mixed 0.736 0.750 0.639 0.644 0.642 0.657 Faster R-CNN (ResNet-50) Real Mixed 0.730 0.754 0.616 0.631 0.663 0.679 B. Training Experiment on KITTI and ParallelEye 6,684 images with annotations containing the car object were picked out from the KITTI dataset and divided into real training set and testing set at the ratio of one to one. First, we trained the Faster R-CNN detector purely with the real training set. Next, 4,000 images with annotations containing the car object were randomly selected from ParallelEye dataset that were used for pre-training the Faster R-CNN model. Then, we fine-tuned the pre-trained model using the real training set. And we performed experiments on DPM with real and mixed data. These experiments were executed with the same setting as experiments on VOC+COCO. These trained models were tested on the real KITTI testing set and the Average Precision is recorded in Table III. Fig. 9 depicts the examples of the detection results for Faster R-CNN based on VGG-16 architecture. TABLE III P ERFORMANCE OF MODELS EVALUATED ON KITTI Model Training dataset Test on KITTI KITTI Mixed 0.516 0.527 Faster R-CNN (VGG-16) KITTI ParallelEye → KITTI 0.741 0.757 Faster R-CNN (ResNet-50) KITTI ParallelEye → KITTI 0.785 0.798 DPM C. Testing Experiments on KITTI and ParallelEye In this section, we investigate the potential of using our virtual dataset to test the object detector trained on real dataset. KITTI was chosen as the real dataset to train Faster RCNN models due to its diversity of object area and occlusion condition [5]. 6,684 images with annotations containing the car object were picked out from the KITTI dataset and divided into training set and testing set at the ratio of one to one. We named the full training set Train Full to avoid confuse. The Train Full set possessed 3,342 images with 28,742 cars. First, we trained a Faster R-CNN detector with Train Full. This detector was used as the reference for the detectors below. To evaluate the impact of small objects on model’s performance, we deleted these objects in Train Full whose areas were smaller than 3,600 pixels according to the annotations. By this standard, we got 2,419 images containing 14,346 cars. We called the devised training set Train Large which was used to 6 Fig. 9. Examples of object detection results (VGG-16). The upper one of every couple: Objects detected by the model trained purely with the real training set. The lower one of every couple: Objects detected by the model trained with real and virtual datasets. 7 train the second Faster R-CNN detector. The third detector was trained with so-called Train Visible which only kept objects labeled as ”fully visible” in Train Full and had 3,113 images with 13,457 cars. All the experiments were carried out with the same setting as those in VOC+COCO. TABLE IV E VALUATION WITH PURPOSEFULLY DESIGNED VIRTUAL DATASETS Training dataset Test on ParallelEye 01 Test on ParallelEye 02 Test on ParallelEye 03 Train Full Train Large Train Visible 0.485 0.256 0.348 0.570 0.508 0.433 0.585 0.467 0.396 These three detectors were tested on ParallelEye 01 characterized by small area of objects on average and ParallelEye 03 marked by high level of occlusion as well as ParallelEye 02 with larger objects and lower occlusion level. We calculated the Average Precision in the manner of PASCAL VOC. The results are recorded in Table IV. For the purpose of making the results more explicit, we also calculated the rate of descent of AP after we removed small objects and occluded objects respectively from the training set. The AP of model trained with Train Full set was regarded as the reference and the results are shown in Table V. TABLE V R ATE OF DESCENT ON VIRTUAL DATASETS Training dataset Rate of descent on ParallelEye 01 Rate of descent on ParallelEye 02 Rate of descent on ParallelEye 03 Train Large Train Visible 47.2% 28.2% 10.9% 24.0% 20.2% 32.3% D. Discussion On the one hand, the results above show that our virtual datasets are viable to improve the performance of object detector when used for training it together with the real dataset. On the other hand, we can conclude that our purposefully designed virtual datasets are potential tools to assess the performances of trained models from a specific aspect. The results in Table IV and Table V show that with small objects removed from the training set, performance of the model became worse on all sub datasets while a bigger rate of descent of AP occurred on ParallelEye 01 in the testing phase, which may result from the smaller average area of object of ParallelEye 01. And ParallelEye 03 witnessed a huger drop of the rate of AP after we deleted occluded objects from the training set because ParallelEye 03 has a higher occlusion rate. V. C ONCLUSION This paper presents a pipeline to build artificial scenes and virtual datasets possessing some specific characteristics we desire like the occlusion level, area of objects and so on under the framework of Parallel Vision. We prove that mixing the virtual dataset and several real datasets to train the object detector helps to improve the performance. Also, we investigate the potential of testing the trained models on a specific aspect using intentionally designed virtual datasets. This work may help deep learning researchers to get a better understanding of their models especially in the areas of autonomous driving. R EFERENCES [1] B. Kaneva, A. Torralba, and W. T. Freeman, “Evaluation of image features using a photorealistic virtual world,” in IEEE International Conference on Computer Vision. IEEE, 2011, pp. 2282–2289. [2] Y. Liu, K. Wang, and D. Shen, “Visual tracking based on dynamic coupled conditional random field model,” IEEE Transactions on Intelligent Transportation Systems, vol. 17, no. 3, pp. 822–833, 2016. [3] C. Gou, K. Wang, Y. Yao, and Z. Li, “Vehicle license plate recognition based on extremal regions and restricted Boltzmann machines,” IEEE Transactions on Intelligent Transportation Systems, vol. 17, no. 4, pp. 1096–1107, 2016. [4] Y. Liu, K. Wang, and F.-Y. Wang, “Tracklet association-based visual object tracking: The state of the art and beyond,” Acta Automatica Sinica, vol. 43, no. 11, pp. 1869–1885, 2017. [5] A. Geiger, P. Lenz, and R. Urtasun, “Are we ready for autonomous driving? the KITTI vision benchmark suite,” in IEEE Conference on Computer Vision and Pattern Recognition. IEEE, 2012, pp. 3354–3361. [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] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and F.-F. Li, “ImageNet: A large-scale hierarchical image database,” in IEEE Conference on Computer Vision and Pattern Recognition. IEEE, 2009, pp. 248–255. [8] 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 European Conference on Computer Vision. Springer, 2014, pp. 740–755. [9] K. Wang, C. Gou, N. Zheng, J. M. Rehg, and F.-Y. Wang, “Parallel vision for perception and understanding of complex scenes: methods, framework, and perspectives,” Artificial Intelligence Review, vol. 48, no. 3, pp. 299–329, 2017. [10] K. Wang, C. Gou, and F.-Y. Wang, “Parallel Vision: an ACP-based approach to intelligent vision computing,” Acta Automatica Sinica, vol. 42, no. 10, pp. 1490–1500, 2016. [11] K. Wang, Y. Lu, Y. Wang, Z. Xiong, and F.-Y. Wang, “Parallel Imaging: A new theoretical framework for image generation,” Pattern Recognition and Artificial Intelligence, vol. 30, no. 7, pp. 577–587, 2017. [12] F.-Y. Wang, “Parallel system methods for management and control of complex systems,” Control and Decision, vol. 19, pp. 485–489, 2004. [13] ——, “Parallel control and management for intelligent transportation systems: Concepts, architectures, and applications,” IEEE Transactions on Intelligent Transportation Systems, vol. 11, no. 3, pp. 630–638, 2010. [14] ——, “Parallel Control: a method for data-driven and computational control,” Acta Automatica Sinica, vol. 39, no. 4, pp. 293–302, 2013. [15] F.-Y. Wang, J. J. Zhang, X. Zheng, X. Wang, Y. Yuan, X. Dai, J. Zhang, and L. Yang, “Where does AlphaGo go: from Church-Turing thesis to AlphaGo thesis and beyond,” IEEE/CAA Journal of Automatica Sinica, vol. 3, no. 2, pp. 113–120, 2016. [16] F.-Y. Wang, J. Zhang, Q. Wei, X. Zheng, and L. Li, “PDP: Parallel Dynamic Programming,” IEEE/CAA Journal of Automatica Sinica, vol. 4, no. 1, pp. 1–5, 2017. [17] F.-Y. Wang, X. Wang, L. Li, and L. Li, “Steps toward parallel intelligence,” IEEE/CAA Journal of Automatica Sinica, vol. 3, no. 4, pp. 345–348, 2016. [18] L. Li, Y. Lin, N. Zheng, and F.-Y. Wang, “Parallel Learning: a perspective and a framework,” IEEE/CAA Journal of Automatica Sinica, vol. 4, no. 3, pp. 389–395, 2017. [19] K. Wang and Y. Yao, “Video-based vehicle detection approach with datadriven adaptive neuro-fuzzy networks,” International Journal of Pattern Recognition and Artificial Intelligence, vol. 29, no. 07, p. 1555015, 2015. [20] P. F. Felzenszwalb, R. B. Girshick, D. McAllester, and D. Ramanan, “Object detection with discriminatively trained part-based models,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 32, no. 9, pp. 1627–1645, 2010. [21] S. Ren, K. He, R. Girshick, and J. Sun, “Faster R-CNN: Towards realtime object detection with region proposal networks,” in Advances in Neural Information Processing Systems, 2015, pp. 91–99. 8 [22] R. Girshick, “Fast R-CNN,” in Proceedings of the IEEE international conference on computer vision, 2015, pp. 1440–1448. [23] W. S. Bainbridge, “The scientific research potential of virtual worlds,” Science, vol. 317, no. 5837, pp. 472–476, 2007. [24] H. Prendinger, K. Gajananan, A. B. Zaki, A. Fares, R. Molenaar, D. Urbano, H. van Lint, and W. Gomaa, “Tokyo virtual living lab: Designing smart cities based on the 3D internet,” IEEE Internet Computing, vol. 17, no. 6, pp. 30–38, 2013. [25] J. Marin, D. Vázquez, D. Gerónimo, and A. M. López, “Learning appearance in virtual scenarios for pedestrian detection,” in IEEE Conference on Computer Vision and Pattern Recognition. IEEE, 2010, pp. 137–144. [26] J. Xu, D. Vázquez, A. M. López, J. Marı́n, and D. Ponsa, “Learning a part-based pedestrian detector in a virtual world,” IEEE Transactions on Intelligent Transportation Systems, vol. 15, no. 5, pp. 2121–2131, 2014. [27] X. Peng, B. Sun, K. Ali, and K. Saenko, “Learning deep object detectors from 3D models,” in Proceedings of the IEEE International Conference on Computer Vision, 2015, pp. 1278–1286. [28] B. Sun and K. Saenko, “From virtual to reality: Fast adaptation of virtual object detectors to real domains,” in Proceedings of the British Machine Vision Conference, vol. 1, no. 2, 2014, p. 3. [29] S. R. Richter, V. Vineet, S. Roth, and V. Koltun, “Playing for data: Ground truth from computer games,” in European Conference on Computer Vision. Springer, 2016, pp. 102–118. [30] G. Ros, L. Sellart, J. Materzynska, D. Vazquez, and A. M. Lopez, “The SYNTHIA dataset: A large collection of synthetic images for semantic segmentation of urban scenes,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016, pp. 3234–3243. [31] A. Gaidon, Q. Wang, Y. Cabon, and E. Vig, “Virtual worlds as proxy for multi-object tracking analysis,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016, pp. 4340–4349. [32] I. J. Goodfellow, J. Pougetabadie, M. Mirza, B. Xu, D. Wardefarley, S. Ozair, A. Courville, and Y. Bengio, “Generative Adversarial Networks,” Advances in Neural Information Processing Systems, vol. 3, pp. 2672–2680, 2014. [33] K. Wang, C. Gou, Y. Duan, Y. Lin, X. Zheng, and F.-Y. Wang, “Generative adversarial networks: introduction and outlook,” IEEE/CAA Journal of Automatica Sinica, vol. 4, no. 4, pp. 588–598, 2017. [34] K. Wang, W. Huang, B. Tian, and D. Wen, “Measuring driving behaviors from live video,” IEEE Intelligent Systems, vol. 27, no. 5, pp. 75–80, 2012. [35] K. Wang, Y. Liu, C. Gou, and F.-Y. Wang, “A multi-view learning approach to foreground detection for traffic surveillance applications,” IEEE Transactions on Vehicular Technology, vol. 65, no. 6, pp. 4144– 4158, 2016. [36] H. Zhang, K. Wang, and F.-Y. Wang, “Advances and perspectives on applications of deep learning in visual object detection,” Acta Automatica Sinica, vol. 43, no. 8, pp. 1289–1305, 2017. [37] X. Li, K. Wang, Y. Tian, L. Yan, and F.-Y. Wang, “The ParallelEye dataset: Constructing large-scale artificial scenes for traffic vision research,” in IEEE 20th International Conference on Intelligent Transportation Systems, 2017, to be published. Yonglin Tian received his bachelor degree from the University of Science and Technology of China in 2017. He is currently a Master student at the Department of Automation, University of Science and Technology of China as well as the State Key Laboratory of Management and Control for Complex Systems, Institute of Automation, Chinese Academy of Sciences. His research interests include computer vision and pattern recognition. Xuan Li received the M.S. degree from the Changsha University of Science and Technology, Changsha, China, in 2013. He is currently working toward the Ph.D. degree in control theory and control engineering with the Key Laboratory of Intelligent Control and Decision of Complex Systems, Beijing Institute of Technology, Beijing, China. His research interests include computer vision, pattern recognition, intelligent transportation systems, and 3D printing. Kunfeng Wang (M’17) received his Ph.D. in Control Theory and Control Engineering from the Graduate University of Chinese Academy of Sciences, Beijing, China, in 2008. He joined the Institute of Automation, Chinese Academy of Sciences and became an Associate Professor at the State Key Laboratory of Management and Control for Complex Systems. From December 2015 to January 2017, he was a Visiting Scholar at the School of Interactive Computing, Georgia Institute of Technology, Atlanta, GA, USA. His research interests include intelligent transportation systems, intelligent vision computing, and machine learning. He is a Member of IEEE. Fei-Yue Wang (S’87-M’89-SM’94-F’03) received his Ph.D. in Computer and Systems Engineering from Rensselaer Polytechnic Institute, Troy, New York in 1990. He joined the University of Arizona in 1990 and became a Professor and Director of the Robotics and Automation Lab (RAL) and Program in Advanced Research for Complex Systems (PARCS). In 1999, he founded the Intelligent Control and Systems Engineering Center at the Institute of Automation, Chinese Academy of Sciences (CAS), Beijing, China, under the support of the Outstanding Oversea Chinese Talents Program from the State Planning Council and “100 Talent Program” from CAS, and in 2002, was appointed as the Director of the Key Lab of Complex Systems and Intelligence Science, CAS. In 2011, he became the State Specially Appointed Expert and the Director of The State Key Laboratory of Management and Control for Complex Systems. Dr. Wang’s current research focuses on methods and applications for parallel systems, social computing, and knowledge automation. He was the Founding Editor-in-Chief of the International Journal of Intelligent Control and Systems (1995-2000), Founding EiC of IEEE ITS Magazine (2006-2007), EiC of IEEE Intelligent Systems (2009-2012), and EiC of IEEE Transactions on ITS (20092016). Currently he is EiC of China’s Journal of Command and Control. Since 1997, he has served as General or Program Chair of more than 20 IEEE, INFORMS, ACM, ASME conferences. He was the President of IEEE ITS Society (2005-2007), Chinese Association for Science and Technology (CAST, USA) in 2005, the American Zhu Kezhen Education Foundation (2007-2008), and the Vice President of the ACM China Council (20102011). Since 2008, he is the Vice President and Secretary General of Chinese Association of Automation. Dr. Wang is elected Fellow of IEEE, INCOSE, IFAC, ASME, and AAAS. In 2007, he received the 2nd Class National Prize in Natural Sciences of China and awarded the Outstanding Scientist by ACM for his work in intelligent control and social computing. He received IEEE ITS Outstanding Application and Research Awards in 2009 and 2011, and IEEE SMC Norbert Wiener Award in 2014.
1cs.CV
arXiv:1712.05513v1 [cs.LO] 15 Dec 2017 A Decidable Fragment of Second Order Logic With Applications to Synthesis P. Madhusudan, Umang Mathur, Shambwaditya Saha, and Mahesh Viswanathan University of Illinois, Urbana Champaign, USA Abstract. We propose a fragment of many-sorted second order logic ESMT and show that checking satisfiability of sentences in this fragment is decidable. This logic has an ∃∗ ∀∗ quantifier prefix that is conducive to modeling synthesis problems. Moreover, it allows reasoning using a combination of background theories provided that they have a decidable satisfiability problem for the ∃∗ ∀∗ FO-fragment (e.g., linear arithmetic). Our decision procedure reduces the satisfiability of ESMT formulae to satisfiability queries of the background theories, allowing us to use existing efficient SMT solvers for these theories; hence our procedure can be seen as effectively SMT (ESMT) reasoning. Keywords: second order logic, synthesis, decidable fragment 1 Introduction The goal of program synthesis is to automatically construct a program that satisfies a given specification. The problem has received a lot of attention from the research community in recent years [3]. Several different approaches have been proposed to address this challenge (see [3] for some of these). One approach to program synthesis is to reduce the problem to the satisfiability problem in a decidable logic by constructing a sentence whose existentially quantified variables identify the program to be synthesized, and the formula expresses the requirements that the program needs to meet. This paper furthers this research program by identifying a decidable secondorder logic that is suitable for encoding problems in program synthesis. To get useful results, one needs to constrain the semantics of functions and relations used in encoding the synthesis problem. Therefore our logic has a set of background theories, where each of the background theories is assumed to be independently axiomatized and equipped with a solver. Finally, to leverage the advances made by logic solvers, our aim is to develop an algorithm for satisfiability for our logic that makes black-box calls to the decision procedures for the background theories. With the above goal in mind, let us describe our logic. It is a multisorted logic that can be roughly described as an uninterpreted combination of theories (UCT) [9]. A UCT has a many-sorted universe where there is a special sort σ0 that is declared to be a foreground sort, while the other sorts (σ1 , . . . σn ) are declared background sorts. We assume that there is some fixed signature of functions, relations, and constants over each individual background sort that is purely over that sort. Furthermore, we assume that each background sort σi (i > 0) comes with an associated background theory Ti ; Ti can be arbitrary, even infinite, but is constrained to formulas involving functions, relations and constants that only involve the background sort σi . Our main result is a decidability result for the satisfiability problem modulo these background theories for boolean combinations of sentences of the form where (∃x)(∃R)(∃F)(∀y)(∀P)(∀G)ψ – x is a set of existentially quantified first order variables. These variables can take on values in any of the sorts (background or foreground); – R is a set of existentially quantified relation variables, whose arguments are restricted to be over the foreground sort σ0 ; – F is a set of existentially quantified function variables, which take as arguments elements from the foreground sort σ0 , and return a value in any of the background sorts σi ; – y is a set of universally quantified first order variables over any of the sorts; – P is a set of universally quantified relation variables, whose arguments could be of any of the sorts; and – G is a set of universally quantified function variables, whose arguments can be from any sort and could return values of any sort. Thus our logic has sentences with prefix ∃∗ ∀∗ , allowing for quantification over both first order variables and second-order variables (relational and functional). To obtain decidability, we carefully restrict the types of second-order variables that are existentially and universally quantified, as described above. Our decidability result proceeds as follows. By crucially exploting the disjointness of the universes of background theories and through a series of simple observations and transformations like Ackermanization, decision procedures similar to the EPR logic (or the Bernays-Schönfinkel-Ramsey class) that exploit the finite model property, we reduce the satisfiability problem for our logic to the satisfiability of pure ∃∗ ∀∗ first-order logic formulas over the individual background theories T1 , . . . Tn . Consequently, if the background theories admitted (individually) a decidable satisfiability problem for the ∃∗ ∀∗ fragment, then satisfiability for our logic is decidable. Examples of such background theories include Presburger arithmetic, the theory of real-closed fields, and the theory of linear arithmetic over rationals. Our algorithm for satisfiability, therefore, makes finitely many black-box calls to the engines for the individual background theories. Salient aspects of our logic and our decidability result Expressing Synthesis Problems: The primary design principle of our logic is to express synthesis problems. Synthesis problems typically can be expressed in ∃∗ ∀∗ fragments, where we ask whether there exists an object that we wish to synthesize (using the block of existential quantifiers) such that the object satisfies certain properties (expressed by a universally quantified formula). For instance, if we are synthesizing a program snippet that is required to satisfy a pre/post condition, we can encode this by asking whether there is a program snippet such that for all values of variables (modeling the input to the snippet), the verification condition corresponding to the Hoare triple holds. In this context, the existentially quantified variables (first order and second order) can be used to model program snippets. Furthermore, allowing second-order universal quantification over functions allows us to model aspects of the program state that require uninterpreted functions, and in particular pointer fields to model the heap. Design for decidability: Our logic is also defined to carefully avoid the undecidability that looms in any logic of such power. First, note that while quantifierfree decidable logics can be combined to get decidable logics using Nelson-Oppen combinations [15], combining quantified logics is notoriously hard. Our design choice forces communication between theories using the foreground sort, and further keeping the universes of the different sorts disjoint allows a decidable combination of ∃∗ ∀∗ theories. Illustrative Examples for Synthesis: We illustrate the applicability of our logic for two classes of synthesis problems. The first class involves synthesizing recursive programs that work over inductive data-structures. Given the precise pre/post condition for the program to be synthesized, we show how to model recursive program synthesis by synthesizing only a straight-line program (by having the output of recursive calls provided as inputs to the straightline program). We then show how the correctness condition of the recursive program can be modeled using a (universally quantified) verification condition that can be validated using first-order logic over a theory that combines uninterpreted functions and (Presburger) arithmetic using a technique in the literature called natural proofs [9,20,17]. We then show that synthesis of bounded-sized programs (with possibly integers in the program that are unbounded) can be modeled in our logic. In this modeling, the universal quantification over functions plays a crucial role in modeling the pointers in heaps, and modeling uninterpreted predicates that capture inductive data-structure predicates (such as list, lseg, etc.). We illustrate the above class of examples by showing a modeling of synthesis of a recursive program that searches for a key in a singly linked list. The second class of synthesis involves taking a recursive definition of a function, and synthesizing a non-recursive (and iteration free) function equivalent to it. In our modeling, the existential quantification over the foreground sort as well as the background sort of integers is utilized, as the synthesized function involves integers. We show that we can synthesize a closed-form non-recursive function equivalent to generalizations of the recursively defined McCarthy’s 91 function. The crux of our contribution, therefore, is providing a decidable logic that can express synthesis problems succinctly. We believe such a logic is very useful for researchers working on practical applications of program/expression synthesis. Implementing the decision procedure effectively can be then engineered efficiently by researchers working on logic engines. 2 Motivating ESMT for synthesis applications Program synthesis problems can be conveniently encode in ESMT, which we define formally in Section 3. ESMT allows existential and universal quantification over variables, relations and functions over many-sorted signatures (with some restrictions on the types of existentially quantified relations and functions, in order to ensure decidability). Sentences in ESMT have an initial block of existential quantifiers (∃-Block), followed by universal quantifiers (∀-Block): φ = (∃x)(∃R)(∃F) (∀y)(∀P)(∀G) ψ | {z } | {z } ∃-Block (1) ∀-Block In Section 4, we show that if the constituent background theories admit decision procedures for satisfiability of their respective ∃∗ ∀∗ fragments, then so does the fragment ESMT. Examples of such background theories include Presburger arithmetic, linear arithmetic of rationals, and the theory of real closed fields. In program synthesis, the goal is to search for programs of bounded size, which satisfy a given specification. The ∃-Block in Equation 1 can be used to express the search for such programs, in terms of existential quantification. If the specification of a candidate program can be expressed as a universally quantified formula, then, we can encode it in the ∀-Block in Equation 1. One of the salient features of the fragment ESMT is the ability to quantify over functions and relations. Often, specifications for programs, such as those that manipulate heaps, involve a universal quantification over uninterpreted functions. ESMT aptly provides this functionality, while still remaining within the boundaries of decidability. Let us now throw some light on the many-sorted aspect of ESMT. This aspect is particularly useful in synthesis of programs that manipulate objects with a wide variety of types (such as integers, arrays, lists, strings, sets, heaps, etc.,). Our logic ESMT allows existential quantification over variables of many different sorts, thus allowing for synthesis of a richer class of programs. We believe this and other unique aspects of ESMT will be useful in modeling synthesis of more general models of computation such as reactive and hybrid systems. We now proceed to give a concrete example of a synthesis problem which will demonstrate the usability of ESMT. Below is the specification of a function Mthree , which is a slight variant of the classical McCarthy’s 91 function[14]. Mthree (n) = ( n − 30 Mthree (Mthree (Mthree (n + 61))) if n > 13 otherwise We are interested in synthesizing a straight line program that implements Mthree , and can be expressed as a term over the grammar in Fig 1. op0 term := c | (x + c) | ite(pred, term, term) pred := (x < c) | (x = c) | (x > c) Fig. 1: Grammar for Mthree . c and x represent, respectively, constants and variables of sort N. ite(·, ·, ·) stands for if-then-else. op000 op00 .. . op001 op002 .. . Fig. 2: Program skeleton Expressions over the above grammar are trees. Let us fix the maximum height of the tree we are looking for, say to be 2. Also, any node in this tree can have at most 3 children (because the maximum arity of any function in the grammar is 3, corresponding to ite). A skeleton of such a expression tree is show in Fig 2. Every node in the tree is labeled according to its path from the root node. The synthesis problem can then be encoded as formula in ESMT φMthree =(∃c1 , c2 , c3 : N) (∃ADD, ITE, LT, EQ, GT, INPUT, CONST1 , CONST2 , CONST3 ) ∃op0 , op00 , op01 , . . . op022 (ϕdistinct ∧ ϕop ∧ ϕspec ) The symbols ADD (addition), ITE (if−then−else), LT (<), EQ (=), GT (>), INPUT (input()) and CONSTi (constanti(), with i ∈ {1, 2, 3} ), represent the allowed operations in our programs. By existentially quantifying over variables c1 , c2 , c3 of sort N, we allow our program to have numeric constants, The variables opρ represent the choice of operator at node labeled ρ. The formula ϕdistinct constrains the interpretations for ADD, ITE, . . . , ID to be pairwise different: ϕdistinct = ¬(ADD = ITE) ∧ ¬(ADD = LT) ∧ · · · ∧ ¬(CONST3 = CONST2 ) and ϕop imposes the constraint that all the operators on internal nodes are one of ADD, ITE, . . . , CONST3 , and those on leaf nodes are one of the 0-arity symbols: ^ ϕop = (opρ =ADD ∨ opρ =ITE ∨ · · · ∨ opρ =CONST3 ) ρ The constraint ϕspec encodes the specification of the program, which in this case is the definition of the function Mthree . ϕspec universally quantifies over the values returned by the operators opρ , and the value v0 at op0 will be required to satisfy v0 = Mthree (n). For the purpose of evaluating the effectiveness of our logic, we encoded the above ESMT formula in the z3 SMT solver, which synthesized the following expression. f(n) = ite(n > 13, n − 30, −16) Indeed the above function satisfies the specification of the function Mthree , thus implying the effectiveness of our approach. In Section 6, we show that we can synthesize a large class of such programs amongst others. 3 Many-sorted Second Order Logic and the ESMT Fragment We briefly recall the syntax and semantics of general many-sorted second order logic, and then present the ESMT fragment of second order logic. Many-sorted second-order logic A many-sorted signature is a tuple Σ = (S, F , R, V, V fun , V rel ) where, S is a nonempty finite set of sorts, F , R, V, V fun , V rel are, respectively, sets of function symbols, relation symbols, first order variables, function variables and relation variables. Each variables x ∈ V is associated with a type, which is one of the sorts σ ∈ S, represented as x : σ. Each function symbol or function variable also has an associated type (w, σ) ∈ S ∗ × S, and each relation symbol and relation variable has a type w ∈ S + . We assume that the set of symbols in F and R are either finite or countably infinite, and that V, V fun , and V rel are all countably infinite. Constants are modeled using 0-ary functions. We say that Σ is unsorted if S is a singleton sort. Terms over a many-sorted signature Σ have an associated sort and are inductively defined by the grammar t :: σ := x : σ | f (t1 : σ1 , t2 : σ2 , . . . , tm : σm ) | F (t1 : σ1 , t2 : σ2 , . . . , tn : σn ) where f : (σ1 σ2 · · · σm , σ) ∈ F , and F : (σ1 σ2 · · · σn , σ) ∈ V fun . Formulae over Σ are inductively defined as φ ::= ⊥ | φ ⇒ φ | t : σ = t′ : σ | R(t1 : σ1 , t2 : σ2 , . . . , tm : σm ) | R(t1 : σ1 , t2 : σ2 , . . . , tn : σn )| (∃x : σ) φ | (∃F : w, σ) φ | (∃R′ : w) φ where R : (σ1 σ2 · · · σm ) ∈ R, R, R′ are relation variables, F is a function variable, of appropriate types. Note that equality is allowed only for terms of same sort. A formula is said to be first-order if it does not use any function or relation variables. The semantics of many sorted logics are described using many-sorted structures. A Σ-structure is a tuple M = (U, I) where U = {Mσ }σ∈S is a collection of pairwise disjoint S indexed universes, and I is an interpretation function that maps each each variable x : σ to an element in the universe Mσ , each function symbol and each function variable to a function of the appropriate type on the underlying universe. Similarly, relation symbols and relation variables are also assigned relations of the appropriate type on the underlying universe. For an interpretation I, as is standard, we use I[cx /x] to denote the interpretation that maps x to cx , and is otherwise identical to I. For function variable F and relation variable R, I[f F /F ] and I[RR /R] are defined analogously. Interpretation of terms in a model is the usual one obtained by interpreting variables, functions, and function variables using their underlying interpretation in the model; we skip the details. The satisfaction relation M |= φ is also defined in the usual sense, and we will skip the details A first-order theory is a tuple T = (ΣT , AT ), where AT is a set of (possibly infinite) first-order sentences. Theory T is complete if every sentence α or its negation is entailed by AT , i.e., either every model satisfying AT satisfies α, or every model satisfying AT satisfies ¬α. A theory AT is consistent if it is not the case that there is a sentence α such that both α and ¬α are entailed. The logic ESMT We now describe ESMT, the fragment of many-sorted second order logic that we prove decidable in this paper and that we show can model synthesis problems. Let Σ = (S, F , R, V, V fun , V rel ) be a many sorted signature. Σ is a pure signature if (a) the type of every function symbol and every relation symbol is over a single sort (however, function variables and relation variables are allowed to mix sorts), (b) there is a special sort σ0 (which we call the foreground sort, while other sorts σ1 , . . . , σk are called background sorts) and there are no function or relation symbols involving σ0 . The fragment ESMT is the set of sentences defined over a pure signature Σ, with foreground sort σ0 and background sorts σ1 , . . . σk , by the following grammar φ := ∃(x : σ)φ | (∃R : w)φ | (∃F : w, σi )φ | ϕ where, σ ∈ S, w ∈ σ0+ , 1 ≤ i ≤ k, and ϕ is defined by the grammar ϕ := ∀(y : σ)ϕ | (∀R : w′ )ϕ | (∀F : w′ , σ)ϕ | ψ where, σ ∈ S, w′ ∈ S + , and ψ is quantifier free over Σ. The formulas above consist of an existential quantification block followed by a universal quantification block. The existential block can have first-order variables of any sort, relation variables that are over the foreground sort only, and function variables that map tuples of the foreground sort to a background sort. The inner universal block allows all forms of quantification — first-order variables, function variables, and relation variables of all possible types. The inner formula is quantifier-free. We will retrict our attention to sentences in this logic, i.e., we will assume that all variables (first-order/function/relation) are quantified. We will denote by xi (resp. yi ), the set of existentially (resp. universally) quantified first order variables of sort σi , for every 0 ≤ i ≤ k. The problem The problem we consider is that of deciding satisfiability of ESMT with background theories for the background sorts. First we introduce some concepts. An uninterpreted combination of theories (UCT) over a pure signature with sorts {σ0 , σ1 , . . . , σk } is the union of theories {Tσi }1≤i≤k , where each Tσi is a k S Tσi -satisfiable if there is a multitheory over signature σi . A sentence φ is i=1 sorted structure M that satisfies φ and all the sentences in k S i=1 Tσi . The satisfiability problem for ESMT with background theories is the following. Given a UCT {Tσi }1≤i≤k and a sentence φ ∈ logic, determine if φ is ∪ki=1 Tσi -satisfiable. We show that this is a decidable problem, and furthermore, there is a decision procedure that uses a finite number of black-box calls to satisfiability solvers of the underlying theories to check satisfiability of ESMT sentences. For the rest of this paper, for technical convenience, we will assume that the boolean theory Tbool is one of the background theories. This means bool ∈ S and the constants ⊤ : bool, ⊥ : bool ∈ F . The set of sentences in Tbool is Abool = {⊤ 6= ⊥, ∀(y : bool) · (y = ⊤ ∨ y = ⊥)}. Note that checking satisfiability of a ∃∗ ∀∗ sentence over Tbool is decidable. 4 The Decision Procedure for ESMT In this section we present our decidability result for sentences over ESMT in presence of background theories. Let us first state the main result of this paper. Theorem 1. Let Σ be a pure signature with foreground sort σ0 and background sorts σ1 , . . . , σk . Let {Tσi }1≤i≤k be a UCT such that, for each i, checking Tσi satisfiability of ∃∗ ∀∗ first-order sentences is decidable. Then the problem of checkk S ⊓ ⊔ Tσi -satisfiability of ESMT sentences is decidable. ing i=1 We will prove the above theorem by showing that any given ESMT sentence φ over a UCT signature Σ can be transformed, using a sequence of three steps of satisfiability preserving transformations, and finally to the satisfiability of ∃∀ first-order formulae over the individual theories. We give a brief overview of the sequence of transformations (Steps 1 through 4). In Step 1, we replace the occurrence of every relation variable R (quantified universally or existentially) of sort w by a function variable F of sort w, bool. Note that doing this for the outer existentially quantified relation variables keeps us within the syntactic fragment. In Step 2, we eliminate function variables that are existentially quantified. This crucially relies on the small model property for the foreground universe, similar to EPR. This process however adds both existential first-order variables and universally quantified function variables. In Step 3, we eliminate the universally quantified function variables using a standard Ackermann reduction [19], which adds more universally quantified first-order variables. The above steps result in a first-order ∃∗ ∀∗ sentence over the combined background theories, and the empty theory for the foreground sort. In Step 4, we show that the satisfiability of such a formula can be reduced to a finite number of satisfiability queries of ∃∗ ∀∗ sentences over individual theories. Since Step 1 : Eliminating relation variables The idea is here to introduce, for every relational variable R, a function variable f R that corresponds to the characteristic function of R. Let φ be ESMT formula over Σ. We will transform φ to a ESMT formula φStep-1 over the same signature Σ. Every occurrence of an atom of the form R(t1 : σi1 , . . . , tk : σik ) in φ, is replaced by f R (t1 : σi1 , . . . , tk : σik ) = ⊤ in φStep-1 . Further, every quantification Q(R : w) is replaced by Q(f R : w, bool), where Q ∈ {∀, ∃}. The correctness of the above transformation is captured by the following lemma. k k S S Tσi -satisfiable. Tσi -satisfiable iff φStep-1 is Lemma 1. φ is i=1 i=1 Step 2: Eliminating existentially quantified function variables We first note a small-model property with respect to the foreground sort for ESMT sentences. This property crucially relies on the fact that existentially quantified function variables do not have their ranges over the foreground sort. Lemma 2 (Small-model property for σ0 ). Let φ be a ESMT sentence with foreground sort σ0 and background sorts σ1 , . . . σk . Let n be the number of existentially quantified variables of sort σ0 in φ. Then, φ is ∪ki=1 Tσi -satisfiable iff there is a structure M, with at most n elements in Mσ0 , such that M |= ∪ki=1 Tσi and M |= φ. In fact, the proof sketch shows that if there is a model, then there is a model where the foreground universe contains only elements that are interpretations of the first-order variables x0 over the foreground sort (and hence bounded). Consequently, instead of existentially quantifying over a function F (of arity r) from the foreground sort σ0 to some background sort σi , we can instead quantify over first-order variables xF of sort σi that capture the image of these functions for each r-ary combination of x0 . Let φStep-1 be the ESMT sentence over Σ, with no occurrence of relation variables . Let ψ Step-1 be the quantifier free part (or matrix) of φStep-1 . Now, define ^ _  ψe = ψrestrict ∧ ψ Step-1 , where, ψrestrict = y=x . y∈y0 x∈x0 e Let φe the sentence obtained by replacing the matrix ψ Step-1 in φStep-1 , by ψ. Then, the correctness of this transformation is noted below. k k S S Tσi -satisfiable. Tσi -satisfiable iff φe is Lemma 3. φStep-1 is i=1 i=1 e one We now eliminate the existentially quantified function variables in φ, ∗ ∗ e m e by one. Let φ = (∃F : σ0 , σ)∃ ∀ ψ, where σ is a background sort. For every F m-tuple t over the set x0 , we introduce the variable xF be t of sort σ. Let x m the set of all such n variables, where n = |x0 | is the number of existential first e Next, we introduce a fresh function variable GF order variables of sort σ0 in φ. m of sort σ0 , σ, and quantify it universally. GF will be used to emulate the F . Now we define ^  ψ Step-2 = ψemulate =⇒ ψ̄, where, ψemulate = GF (t[1], . . . t[m]) = xF t t∈xm 0 and ψ̄ is obtained by replacing all occurrences of F in ψe by GF . Now define φStep-2 to be the sentence φStep-2 = (∃xF : σ)∃∗ ∀∗ (∀GF : σ0m , σ) ψ Step-2 . The following lemma states the correctness guaranteek of this transformation. k S S Tσi -satisfiable. Tσi -satisfiable iff φStep-1 is Lemma 4. φStep-2 is i=1 i=1 Step 3 : Eliminating universal function variables The recipe here is to perform Ackermann reduction [2]. For every universally quantified function variable F of arity m, we will introduce a fresh variable of its range sort for every occurrence of term F (t1 , t2 , . . . tm ) in φStep-2 . We will then augment the quantifier free part with a formula that ensures consistency of this transformation. Let φStep-2 = ∃∗ ∀∗ (∀F : w, σ) ψ Step-2 , where ψ Step-2 is the quantifier free part of φStep-2 , and let |w| = m. For every term t of the form F (t1 , . . . , tm ) in ψ Step-2 , we introduce a fresh F first order variable y(t of sort σ, and replace every occurrence of the 1 ,t2 ,...,tm ) Step-2 F b Let yF be the collection of all these term t in ψ with y(t1 ,t2 ,...,tm ) , to get ψ. newly introduced variables. b where Let us now define ψ Step-3 = ψack =⇒ ψ, m ^ ^ t[j] = t′ [j]) =⇒ (ytF = ytF′ ) ( ψack = ytF ,ytF′ ∈yF j=1 Then, the transformed formula φStep-3 = ∃∗ ∀∗ (∀yF : σ) ψ Step-3 is correct in the following sense. Lemma 5. φStep-2 is k S i=1 Tσi -satisfiable iff φStep-3 is k S Tσi -satisfiable. i=1 Step-4: Decomposition and black box calls to ∃∗ ∀∗ Theory solvers The ESMT sentence φStep-3 obtained after the sequence of steps 1 through 3 is a first order ∃∗ ∀∗ sentence over Σ. This sentence, however, may possibly contain occurrences of variables of the foreground sort σ0 . The objective of this step is, roughly, to decompose φStep-3 into ∃∗ ∀∗ sentences over a single sort alone, and then use decision procedures for the respective theories to decide satisfiability of the decomposed (single sorted) sentences. Since such a decomposition can result into ∃∗ ∀∗ sentences over the foreground sort, we must ensure that there is indeed a decision procedure to achieve this. For this purpose, let us define Tσ0 be the empty theory (that is Aσ = ∅). Checking satisfiability of ∃∗ ∀∗ sentences over Tσ0 is decidable. Also, satisfiability is preserved in the presence of Tσ0 in the following sense. k k S S Tσi -satisfiable. Tσi -satisfiable iff φStep-3 is Lemma 6. φStep-3 is i=1 i=0 We first transform the quantifier free part ψ Step-3 of φStep-3 into an equivalent CNF formula ψCNF , let φCNF be obtained by replacing ψ Step-3 by ψCNF . Let ψCNF be a conjunction of r clauses ψj , 1 ≤ j ≤ r. That is, r ^ ψi φCNF = ∃∗ ∀∗ ψCNF , where, ψCNF = j=1 where ψi is a disjunction of atoms. Since φCNF is a first order formula over a pure signature, all atoms are either of the form R(· · · ) or t = t′ (with a possibly leading negation). Now, equality atoms are restricted to terms of the same sort. Also since Σ is pure, the argument terms of all relation applications have the same sort. This means, for every atom α, there is a unique associated sort σ ∈ S, which we will denote by sort(α). For a clause ψi in ψCNF , let atoms(ψi ) be the set ofWatoms in ψi . Let atomsσ (ψi ) = α. Then, we have the {α ∈ atoms(ψi ) | sort(α) = σ}, and let ψiσ = α∈atomsσ (ψi ) identity ψCNF = r V W j=1 σ∈Ŝ Lemma 7. φCNF is k S ψjσ . We now state our decomposition lemma. Tσi -satisfiable iff there is a mapping L : {1, . . . , r} → i=0 S suchVthat for each σi (0 ≤ i ≤ k) , the formula φL i = (∃xi : σi )(∀yi : ψjσi is Tσi -satisfiable. σi ) j∈L−1 (σ) The contract L above identifies for each clause the atomic constraint that makes the clause true. Thus, in order to decide satisfiability of φCNF , a straightforward decision procedure involves enumerating all contracts, L ∈ [{1, . . . , r} → S]. For such contract L and for each sort σi , we construct the sentence φL i , and make a black-box call to the ∃∗ ∀∗ theory solver for Tσi . If there is a contract L for which each of these calls return ‘SATISFIABLE’, then φCNF (and thus, the original formula φ) is satisfiable. Otherwise, φ is unsatisfiable. 5 Undecidability Results The logic that we have defined was carefully chosen to avoid undecidability of the satisfiability problem. We now show that natural generalizations or removal of restrictions in our logic renders the satisfiability problem undecidable. We believe our results are hence not simple to generalize any further. One restriction that we have is that the functions that are existentially quantified cannot have σ0 as their range sort. A related restriction is that the universal quantification block quantify all uninterpreted function symbols, as otherwise they must be existentially quantified on the outside block. Let us now consider the fragment of logic where formulas are of the form (∃x0 ) (∃F)(∀y0 ) ψ where in fact we do not even have any background theory. Since the formula is over a single sort, we have droped the sort annotations on the variables. It is not hard to see that this logic is undecidable. Theorem 2. Consider signature with a single sort σ0 (and no background sorts). The satisfiability problem for sentences of the following form is undecidable. (∃x0 ) (∃F)(∀y0 ) ψ The theorem above has a simple proof, but the theorem is not new; in fact, even more restrictive logics are known to be undecidable (see [6]). Another important restriction that we have is that the foreground sort and the various background sorts are pariwise disjoint. This requirement is also not negotiable if decidability is desired, as it is easy to show the following Theorem 3. Consider a signature with a single sort σ1 and let Tσ1 be the theory of Presburger arithmetic. The satisfiability problem for sentences of the form is undecidable 1 . (∃x1 ) (∃R) (∀y1 ) ψ Stepping further back, there are very few subclasses of first-order logic with equality that have a decidable satisfiability problem, and the only standard class that admits ∃∗ ∀∗ prefixes is the Bernays-Schönfinkel-Ramsey class (see [4]). Our results can be seen as an extension of this class with background theories, where the background theories admit locally a decidable satisfiability problem for the ∃∗ ∀∗ fragment. 6 Applications to Synthesis Synthesis: Validity or Satisfiability? Though we argued in Section 2 that synthesis problems can be modeled using satisfiability of ESMT sentences, there is one subtlety that we would like to highlight. In synthesis problems, we are asked to find an expression such that the expression satisfies a specification expressed in logic. Assuming the specification is modeled as a universally quantified formula over background theories, we would like to know if ∀yϕ(e, y) holds for the synthesized expression e. However, in a logical setting, we have to qualify what “holds” means; the most natural way of phrasing this is that ∀yϕ(e, y) is valid over the underlying background theories, i.e., holds in all models that satisfy the background theories. However, the existential block that models the existence of an expression is clearly best seen as a satisfiability problem, as it asks whether there is some foreground model that captures an expression. Requiring that it holds in all foreground models (including those that might have only one element) would be unreasonable. To summarize, the synthesis problem is most naturally modeled as a logical problem where we ask whether there is some foreground model such that for all background models that satisfy their respective background theories, the inner formula expressing that the synthesized expression captured by the foreground model satisfies the specification. This is, strictly speaking, neither a satisfiability problem nor a validity problem! We resolve this by considering only complete and consistent background theories. Hence validity of a formula under a background theory T is equivalent to T -satisfiability. Consequently, synthesis problems using such theories can be seen as asking whether there is a foreground universe modeling the expression to be synthesized and some background models where the specification holds for the expression. We can hence model synthesis as purely a satisfiability problem of ESMT, as described in Section 2. Many of the background theories used in verification/synthesis and SMT solvers are complete theories (like Presburger arithmetic, FOL over reals, etc.). One incomplete theory often used in verification is the theory of uninterpreted 1 Once again we have dropped sort annotations, since we only have single sort. functions. However, in this case, notice that since the functions over this sort are uninterpreted, validity of formulas can be modeled using a universal quantification over functions, which our logic supports! The only other adjustment is to ensure that this background theory has only infinite models (we can choose this background theory to be the theory of (N, =), which has a decidable satisfiability problem). In various scenarios such as modeling pointers in heaps, arrays, etc., the formulation of them using uninterpreted functions can be done over this domain naturally. The second issue in modeling synthesis problems as satisfiability problems for ESMT is that in synthesis, we need to construct the expression, rather than just know one exists. It is easy to see that if the individual background theory solvers support finding concrete values for the existentially quantified variables, then we can pull back these values back across our reductions to give the values of the existentially quantified first-order variables (over all sorts), the existentially quantified function variables as well as the existentially quantified relation variables, from which the expression to be synthesized can be constructed. Expressing synthesis problems in ESMT We illustrate the applicability of our result for solving synthesis problems. Modeling synthesis of recursive heap-manipulating problems. We want to model the problem of synthesizing recursive programs manipulating datastructures, given their pre/post contract C. We seek a program that will meet the contract C only assuming that recursive calls on smaller data-structures satisfy the same contract C. Though the programs we seek are recursive, we can model certain classes of programs using simply straight-line programs. Let us take the example of synthesizing a program that finds a particular key in a linked list. We can instead ask whether there is a straight-line program which takes an additional input which models the return value of a possible recursive call made on the tail of the list. The straight-line program must then work on the head of the list and this additional input (which is assumed to satisfy the contract C) to produce an output that meets the same contract C. For this problem, we modeled the program to be synthesized using existential quantification (over a grammar that generates bounded length programs) as described in Section 2. The pointer next and recursive data structures list, lseg in the verification condition were modeled using universal quantification over function variables and relation variables, respectively. Moreover, in order to have a tractable verification condition, we used the technique of natural proofs [9,17,20] that soundly formulates the condition in a decidable theory. , Though we do not have an implementation of our decision procedure, we did several of our steps manually, and finally encoded the problem in the SyGuS format [3] and used an off-the-shelf enumerative counter-example guided synthesis (CEGIS) solver. This tool solved the problem within a second and reported a solution which manually verified to be correct. We are convinced that recursive program synthesis (of bounded size) against separation logics specifications expressed using natural proofs (as in [17]) can be all handled using our logic. Modeling synthesis of straight-line programs equivalent to given recursive programs. In the second class of examples, we turn to synthesizing straight-line programs given a recursive function as their specification. For example, consider Knuth’s generalization of the recursive McCarthy 91 function:  n−b if n > a M (n) = M c (n + d)) otherwise for every integer n, and where (c − 1)b < d. The usual McCarthy function has a = 100, b = 10, c = 2, and d = 11. Consider the problem of synthesizing an equivalent recursion-free expression. The programs we consider may have if-then-else statements of nesting depth 2, with conditionals over linear expressions having unbounded constants. Existential quantification over the background arithmetic sort allowed us to model synthesizing these unbounded constants. Our specification demanded that the value of the expression for n satisfy the recursive equations given above. Though we do not have an implementation of our logic engine, we modeled the foreground model inside arithmetic, and converted our synthesis problem to a first-order ∃∗ ∀∗ sentence over Presburger arithmetic and Booleans. We experimented with several values for a, b, c, d (with (c − 1)b < d), and interestingly, solutions were synthesized only when (d − (c − 1)b) = 1. Given Knuth’s result that a closed form expression involves taking remainder modulo this expression (and since we did not have taking remainder in our syntax), it turns out that simple expressions do not exist otherwise. Also, whenever the solution was found, it matched the recursion-free expression given by Knuth (see Theorem 1 in [12]). For instance, when a = 13, b = 82, c = 83, d = 2, we found the solution ite(x > 13, x − 82, −68) in about 25s. We also verified for the following values of (a, b, c, d): (13, 82, 2, 83), (15, 30, 3, 61), (3, 20, 4, 62), (9, 11, 5, 45), and (99, 10, 6, 51), which took 2s, 4s, 27s, 49s, and 224s, respectively, to solve. All the solutions agreed with Knuth’s closed form solution. We also modeled the Tak function (by Takeuchi) given by the specification  y if x ≤ y t(x, y, z) = t(t(x − 1, y, z), t(y − 1, z, x), t(z − 1, x, y)) otherwise We again modeled asking for a recursion-free expression for this function using a grammar generating finitely many programs, and we got the solution t(x, y, z) = ite(x ≤ y, y, ite(y ≤ z, z, x)) in 100s. 7 Related Work There are several logics known in the literature that can express synthesis problems and are decidable. The foremost example is the monadic second-order theory over trees, which can express Church’s synthesis problem [7] and other reactive synthesis problems over finite data domains, and its decidability (Rabin’s theorem [21])is one of the most celebrated theorems in logic that is applicable to computer science. Reactive synthesis has been well studied and applied in computer science (see, for example, [5]) The work reported in [13] is a tad closer to program synthesis as done today, as it synthesizes syntactically restricted programs with recursion that work on finite domains. Caulfield et al [8] have considered the decidability of syntax-guided synthesis (SyGuS) problems, where the synthesized expressions are constrained to belong to a grammar (with operators that have the usual semantics axiomatized by a standard theory such as arithmetic) that satisfy a universally quantified constraint. They show that the problem is undecidable in many cases, but identify a class that asks for expressions satisfying a regular grammar with uninterpreted function theory constraints to be decidable. The ∃∗ ∀∗ fragment of pure predicate logic (without function symbols) was shown to be decidable by Bernays and Schönfinkel (without equality) and by Ramsey (with equality) [4], and is often called Effectively Propositional Reasoning (EPR) class. It is one of the few fragments of first-order logic known to be decidable. The EPR class has been used in program verification [11,16], and efficient SMT solvers supporting EPR have been developed [18]. The work by [1] extends EPR to stratified typed logics, which has some similarity with our restriction that the universes of the foreground and background be disjoint. However, the logic therein does not allow background SMT theories unlike ours. In [10], EPR with simple liner arithmetic (without addition) is shown to be decidable. A recent paper [9] develops sound and complete reasoning for a so-called safe FO fragment of an uninterpreted combination of theories. However, the logic is undecidable, in general, and also does not support second-order quantification. The SyGuS format has recently been proposed as a language to express syntax guided synthesis problems, and there have been several synthesis engines developed for various tracks of SyGuS [3]. However, the syntax typically allows unbounded programs, and hence the synthesis problem is not decidable. Furthermore, unlike our logic, the grammar does not allow arbitrarily large constants (like integers) to be synthesized as part of the program. 8 Conclusions and Future Work The logic ESMTdefined herein is meant to be a decidable logic for communication between researchers modeling program synthesis problems and researchers developing efficient logic solvers. Such liaisons have been extremely fruitful in verification, where SMT solvers have served this purpose. We have shown the logic to be decidable and its efficacy in modeling synthesis problems. However, the decision procedure has several costs that should not be paid up front in any practical synthesis tool. Ways to curb such costs are known in the literature of building efficient synthesis tools. In particular, searching for foreground models is similar to EPR where efficient engines have been developed [18], and the search can also be guided by counter-example as in the CEGIS approaches [3]. And the exponential blow-up caused by guessing contracts between solvers (in Step 4 of our procedure) is similar to arrangements agreed upon by theories combined using the Nelson-Oppen method, again for which efficient solvers have been developed. Our hope is that researchers working on logic engines will engineer an efficient decision procedure for ESMTthat can solve synthesis problems. References 1. Abadi, A., Rabinovich, A., Sagiv, M.: Decidable fragments of many-sorted logic. J. Symb. Comput. (2010) 2. Ackermann, W., Ackermann, F.W.: Solvable cases of the decision problem (1954) 3. ALUR, R., BODIK, R., DALLAL, E., FISMAN, D., GARG, P., JUNIWAL, G., KRESS-GAZIT, H., MADHUSUDAN, P., MARTIN, M.M., RAGHOTHAMAN, M., et al.: Syntax-guided synthesis 4. Bernays, P., Schönfinkel, M.: Zum entscheidungsproblem der mathematischen logik. Mathematische Annalen (1928) 5. Bloem, R., Galler, S., Jobstmann, B., Piterman, N., Pnueli, A., Weiglhofer, M.: Interactive presentation: Automatic hardware synthesis from specifications: A case study. In: Proceedings of the Conference on Design, Automation and Test in Europe. DATE ’07 (2007) 6. Börger, E., Grädel, E., Gurevich, Y.: The classical decision problem. Springer Science & Business Media (2001) 7. Buchi, J.R., Landweber, L.H.: Solving sequential conditions by finite-state strategies. Transactions of the American Mathematical Society (1969) 8. Caulfield, B., Rabe, M.N., Seshia, S.A., Tripakis, S.: What’s decidable about syntax-guided synthesis? (2015) 9. Christof Loding, P. Madhusudan, L.P.: Foundations for Natural Proofs and Quantifier Instantiation. Tech. rep. (2017), http://madhu.cs.illinois.edu/FoundationsForNaturalProofs.pdf 10. Horbach, M., Voigt, M., Weidenbach, C.: On the Combination of the Bernays– Schönfinkel–Ramsey Fragment with Simple Linear Integer Arithmetic (2017) 11. Itzhaky, S., Banerjee, A., Immerman, N., Nanevski, A., Sagiv, M.: Effectivelypropositional reasoning about reachability in linked data structures. In: International Conference on Computer Aided Verification (2013) 12. Knuth, D.E.: Textbook examples of recursion. Artificial Intelligence and Mathematical Theory of Computation: Papers in Honor of John McCarthy (1991) 13. Madhusudan, P.: Synthesizing Reactive Programs. In: Computer Science Logic (CSL’11) - 25th International Workshop/20th Annual Conference of the EACSL (2011) 14. Manna, Z., McCarthy, J.: Properties of programs and partial function logic. Tech. rep., STANFORD UNIV CALIF DEPT OF COMPUTER SCIENCE (1969) 15. Nelson, G., Oppen, D.C.: Simplification by cooperating decision procedures. ACM Transactions on Programming Languages and Systems (TOPLAS) 1(2), 245–257 (1979) 16. Padon, O., McMillan, K.L., Panda, A., Sagiv, M., Shoham, S.: Ivy: safety verification by interactive generalization. ACM SIGPLAN Notices (2016) 17. Pek, E., Qiu, X., Madhusudan, P.: Natural proofs for data structure manipulation in c using separation logic. In: ACM SIGPLAN Notices (2014) 18. Piskac, R., de Moura, L., Bjørner, N.: Deciding effectively propositional logic with equality. Tech. rep., Technical Report MSR-TR-2008-181, Microsoft Research (2008) 19. Pnueli, A., Rodeh, Y., Strichman, O., Siegel, M.: The small model property: How small can it be? Information and computation (2002) 20. Qiu, X., Garg, P., Ştefănescu, A., Madhusudan, P.: Natural proofs for structure, data, and separation. ACM SIGPLAN Notices (2013) 21. Rabin, M.O.: Decidability of second-order theories and automata on infinite trees. Transactions of the american Mathematical Society (1969) A A.1 Proofs from Section 4 Proof of Lemma 2 Proof (Sketch). We present the more interesting direction here. Consider a model k S Tσi and M |= φ. M = (U, I) such that M |= i=1 Let I∃ be the interpretation function that extends I so that (U, I∃ ) |= ϕ, where ϕ is the inner universally quantified subformula of φ. Let U = {I∃ (x) ∈ Mσ0 | x ∈ x0 }. be the restriction of the foreground universe to the interpretations of the variables x0 . Clearly, |U | ≤ |x0 |. Let us first show that (U|U , I∃ |U ) |= ϕ. For this, first see that for every extension I∃∀ of I∃ , we must have have (U, I∃∀ ) |= ψ. (2) Here ψ is the quantifier free part of ϕ (and thus also of φ). U Now, clearly Equation 2 must also hold for those extensions I∃∀ which map all universal variables in y0 to the set U and maps all universally quantified function variables of range sort σ0 to function interpretations whose ranges are limited to the set U . Thus, it must also be the case that when we restrict the universe Mσ0 to the set U , we have that (U|U , I∃ |U ) |= ∀ ∗ ψ. This is because every universal U extension I ′ of I∃ |U is also a projection of one of these I∃∀ interpretations. A.2 Proof of Lemma 7 Proof (Sketch). Let us consider the equi-satisfiable Skolem norm form φSkolem = ∀∗ ψSkolem , where ψSkolem is obtained from ψCNF by replacing all existential variables x0 , x1 . . . , xk by Skolem constants. The propositional (or boolean) structure of ψCNF , ψSkolem , and we will use the same notation ψi for the ith clause of k S Tσi and M |= φSkolem . ψSkolem . Then, consider a structure M such that M |= i=0 Now, suppose, on the contrary, that there is a clause ψj such that for every sort σi , we have M 6|= ∀(yi : σi )ψj . This means, for every sort σi , there is a interpretation Ii (that extends I with valuations of yi ), such that either Ii leads to falsity of Tσi or the clause ψj . Let cσ1 i , cσ2 i , . . . cσ|yii | be the values assigned to the universal variables yi in Ii . Then, construct an interpretation I ′ extending I with the variables yi interpreted with cσi ’s . This interpretation I ′ can be shown to either violate one of the theory axioms or the formula ψj . In any case, we have a contradiction. B B.1 Proofs from Section 5 Proof of Lemma 2 Proof (Sketch). We can show this as a mild modification of standard proofs of the undecidability of first-order logic. We can existentially quantify over a variable Zero and a function succ, demand that for any element y, succ(y) is not Zero, and for every y, y ′ , if succ(y) = succ(y ′ ), then y = y ′ . This establishes an infinite model with distinct elements succn (Zero), for every n ≥ 0. We can then proceed to encode the problem of non-halting of a 2-counter machine using a relation R(t, q, c1 , c2 ), which stands for the 2CM is in state q at time t with counters c1 and c2 , respectively. It is easy to see that all this can be done using only universal quantification (the relation R can be modeled as a function easily). B.2 Proof of Lemma 3 Proof (Sketch). We can use a similar proof as the theorem above, except now that we use the successor function available in Presburger arithmetic. We can again reduce non-halting of Turing machines (or 2-counter machines) to satisfiability of such formulas.
6cs.PL
arXiv:1712.02475v1 [math.GR] 7 Dec 2017 SANDWICH STRUCTURES FROM ARBITRARY FUNCTIONS IN GROUP THEORY IAN HAWTHORN Abstract. Functions between groups with the property that all function conjugates are inverse preserving are called sandwich morphisms. These maps preserve a structure within the group known as the sandwich structure. Sandwich structures are left distributive idempotent left involutary magmas. These provide a generalisation of groups which we call a sandwich. This paper explores sandwiches and their relationship to groups. 1. Introduction Group homomorphisms are maps between groups that preserve group structure. In earlier papers ([1],[3]) the author has looked at arbitrary functions between groups which are not in general homomorphisms, but which in some sense can be said to partially preserve group structure. The study of such functions is closely related to the study of generalisations of groups. Given a generalisation of groups, the functions between groups which are morphisms for that generalisation will give an interesting collection of notquite-homomorphisms. Conversely given a collection of not-quite-homomorphisms it is natural to look at which properties of groups they preserve. A generalisation of groups may then be obtained by considering algebraic structures with those properties. Not all interesting sets of arbitrary functions will give a group generalisation in this fashion. But when this can be done it may lead us to generalisations of groups that we might not otherwise have considered. In this paper we take a fairly interesting class of functions between groups, namely those for which all function conjugates are inverse preserving, and we use this set of functions to obtain a generalisation of groups. 2. Function Conjugation and Inverse Preserving Functions A notion of function conjugation was introduced in [1]. If f : G → H is an arbitrary function between finite groups and a ∈ G, then we define a new function f a (x) = f (a)−1 f (ax) which we call conjugate of f by a. Clearly f is a group homomorphism if and only if f a = f for all a ∈ G. Consider for example the inverse function (−1) : g 7→ g −1 . Then (−1)a (x) = ax−1 a−1 = [(−1)(x)]a , hence function conjugation generalises the usual conjugate. Note that f a (1) = 1, hence conjugation maps the set of all functions onto the set of identity preserving ones. Furthermore function conjugation defines a group 2010 Mathematics Subject Classification. Primary: 20N99. Thanks to Dr. Tim Stokes for advice and for introducing me to prover9. 1 2 IAN HAWTHORN action of G on the set of identity preserving functions mapping from G to H since f 1 = f and (f a )b = f ab . Homomorphisms are precisely the functions invariant under this action. This function action was defined from the left. A similar action can be defined from the right. We introduce temporary notation f |x> (g) = f x (g) for the action from the left and define action from the right by f <x| (g) = f (gx−1 )f (x−1 )−1 . Then f <1| = f and (f <a| )<b| = f <ab| so this is indeed an action. We might expect that the actions from the left and right are related. In fact they are equivalent. An intertwining map is given by f (−1) (x) = f (x−1 )−1 . Note (−1) that (f (−1) ) = f hence f 7→ f (−1) is of order two and in particular is a bijection. One can easily check that (f <x| )(−1) = (f (−1) )|x> (f |x> )(−1) = (f (−1) )<x| so this defines an equivalence between the left and right actions. As the two actions are equivalent it is reasonable to look at left actions via our initial less cumbersome notation and use ((f (−1) )x )(−1) to refer to the right action should this be necessary. The left and right actions will be identical if for all x ∈ G we have (f (−1) )x = x (−1) (f ) , in other words if and only if function conjugation commutes with the inverse map. A function with the property that f (−1) = f is called inverse preserving as it preserves the relationship of being inverse. Inverse preserving functions are easy to construct. Furthermore any odd collection of functions which is closed under the map f 7→ f (−1) must contain an inverse preserving function. Note that if f is inverse preserving then in general f a need not be inverse preserving. However it is the case that (−1)a is inverse preserving for all a ∈ G. If all function conjugates of f are inverse preserving then we say that f is strongly inverse preserving. Strongly inverse preserving functions were first introduced in [3] although little is done with them in that paper. The property of being strongly inverse preserving is an interesting and surprisingly strong constraint on f as we shall show in the next section. If f is strongly inverse preserving then f 1 will be inverse preserving, however f itself need not be inverse preserving. The left multiplication function x 7→ ax where a 6= 1 is a strongly inverse preserving function which is not inverse preserving. It is usual to consider only identity preserving functions when working with function actions in which case f 1 = f and hence strongly identity preserving implies identity preserving in this case. If f is identity preserving and strongly inverse preserving then the left and right conjugation actions on f are the same. Conversely an inverse preserving function for which left and right actions are the same will be strongly inverse preserving. 3. Sandwich Morphisms and Structures We call a function f : G → H between groups a sandwich morphism if f (ab−1 a) = f (a)f (b)−1 f (a) for all a, b ∈ G. Initial examples are homomorphisms and the inverse function. SANDWICH STRUCTURES FROM ARBITRARY FUNCTIONS IN GROUP THEORY 3 Proposition 3.1. A function f : G → H between finite groups is strongly inverse preserving if and only if it is a sandwich morphism. −1 Proof. If f is strongly inverse preserving then f a (x−1 ) = (f a (x)) and hence −1 f (a)−1 f (ax−1 ) = f (a)−1 f (ax) for all a, x ∈ G. Rearranging we obtain (1) f (ax)f (a)−1 f (ax−1 ) = f (a)f (ax−1 )−1 f (a) and substituting x = b−1 a then gives the sandwich morphism property. Conversely if f is a sandwich morphism then f a (b−1 ) = f (a)−1 f (ab−1 ) = f (a)−1 f (a(ab)−1 a) = f (ab)−1 f (a) −1 = (f a (b))−1 = f (a)−1 f (ab) and we can conclude that f is strongly inverse preserving as claimed.  Sandwich morphisms are those functions which preserve the structure in the group specified by the binary operation (a, b) 7→ a.b−1 .a. We call this binary operation the sandwich product and the structure that it imposes on a group will be called the sandwich structure. We wish to study the sandwich product as a binary operation and to facilitate this we will denote it as simply ab; using a.b to denote the usual group operation. Hence ab = a.b−1 .a. Proposition 3.2. The sandwich product in a finite group G has the following properties Left Distributivity (LD): (ab)(ac) = a(bc) for all a, b, c ∈ G. Idempotency (II): aa = a for all a ∈ G. Left Involutary (LI): a(ab) = b for all a, b ∈ G. Left Symmetry (LS): If ab = b then ba = a. Proof. All these properties can be directly checked by expanding out in terms of the group product.  Note that there is no mention of identities or inverses. Clearly in a group we have identities and inverses, but we cannot distinguish them from other elements using only the sandwich product. The sandwich product does relate them however. If we know the identity element 1 then we can recover the inverses from the sandwich product by defining x−1 = 1x. The obvious next step is to throw away the group. This leads us to make the following definition. Definition 3.3. A sandwich is a set G with a binary operation denoted ab ∈ G which satisfies the properties in proposition 3.2. A subsandwich T ≤ S of a sandwich S is a subset which is itself a sandwich. This will be the case if and only if T is closed under the sandwich operation. In more technical terms a sandwich is a left involutary left distributive left symmetric idempotent magma. The properties as stated are independent in the sense that none can be proved from the others. Counterexamples of small order which demonstrate this were generated using the program Mace4 by W.McCune [4]. These 4 IAN HAWTHORN  1 1 0 0  (a) Not II  0 1  2 1 0 1  2 0  2 (b) Not LS  0  3   1 2 2 1 3 0 3 0 2 1  1 2   0  3 (c) Not LI       0 0 0 1 3 1 1 3 0 1 2 3 2 4 2 3 2 1 3 0 4 4 4 2 4       (d) Not LD Figure 1. Cayley tables for counterexamples. Each has all of the sandwich properties except the indicated one. are described by matrices which specify Cayley tables for the binary operation in which elements are labelled 0, 1 , 2 etc and are listed in figure 1. Proposition 3.4. The following identities hold for all a, b, c in a sandwich S. (1) ab = ac ⇒ b = c. (2) (ab)c = a(b(ac)) for all a, b, c ∈ S. (3) (ab)c = bc ⇔ (ba)c = ac for all a, b, c ∈ S. Proof. These follow directly from the definition of a sandwich. (1) ab = ac ⇒ a(ab) = a(ac) ⇒ b = c (2) (ab)c = (ab)(a(ac)) = a(b(ac)) (3) (ab)c = bc ⇔ a(b(ac)) = bc ⇔ b(ac)) = a(bc) ⇔ ac = b(a(bc)) ⇔ ac = (ba)c  The first identity is the left cancellative (LC) property which we proved from the left involutary property ( LI ⇒ LC ). This raises the question of whether the converse is also true for magmas satisfying the other sandwich properties. This is not the case as is demonstrated by the non LI example in figure 1 which is LC. Since sandwiches are left cancellative multiplication from the left is transitive in a sandwich, which can be useful. Sandwiches are not usually right cancellative however. In particular sandwiches can contain right zero elements. Indeed a sandwich can consist only of right zero elements as we now show. A right zero semigroup is a set with the multiplication ab = b. These are sandwiches as one can directly check. We will call them right zero sandwiches. There is a unique right zero sandwich of every order. A right zero sandwich with at least 2 elements is not right cancellative since ab = bb = b. The left distributive property tells us that multiplication from the left is a sandwich automorphism since a(xy) = (ax)(ay). Moreover it is an involution since a(ax) = x. The automorphisms of a sandwich form a group just like the automorphisms of any algebraic object. Hence we have a natural map from a sandwich to its automorphism group defined by mapping the element a ∈ S to the left multiplication function La : x 7→ ax. What are the properties of this natural map? We have L(ab)(x) = (ab)x = (ab)(a(ax)) = a(b(ax)) = L(a)L(b)L(a)(x). Furthermore since L(b) = L(b)−1 we can write (2) L(ab) = L(a)L(b)−1 L(a) Hence this natural map is a sandwich homomorphism to the sandwich structure of the automorphism group. We will call a sandwich a group sandwich if it is SANDWICH STRUCTURES FROM ARBITRARY FUNCTIONS IN GROUP THEORY 5 the sandwich structure of a group. And we will call a sandwich a group subsandwich if it is a subsandwich of a group sandwich. Hence left multiplication defines a sandwich homomorphism which maps an arbitrary sandwich onto a group subsandwich. The congruences of this map on a sandwich S are equivalence classes under the relation a ∼ b iff L(a) = L(b) which means ax = bx for all x ∈ S. In particular this is true for x = b which gives ab = b. Hence a congruence class is a subsandwich T ⊆ S where ab = b for all a, b ∈ T . Thus the congruences for this map are right zero sandwiches. We have proved Theorem 3.5. Every sandwich is a group subsandwich of right zero sandwiches. As a consequence of this theorem any sandwich which has no non-trivial right zero subsandwiches must be a group subsandwich. Hence any condition on a sandwich that prevents it from having non-trivial right zero subsandwiches will result in it being a group subsandwich. Corollary 3.6. A right cancellative sandwich is a group subsandwich. What does this natural map look like if we apply it to a group? Let G be a group with sandwich product ab = a.b−1 .a and consider the congruence on G defined by the natural map into the sandwich automorphism group. If a ∼ b then L(a) = L(b) and a.x−1 .a = b.x−1 .b for all x ∈ G. Setting x = a or x = b gives a.b−1 = b.a−1 and also b−1 .a = a−1 .b . Let a.b−1 = e and a−1 .b = f so that e2 = 1 and f 2 = 1. Then for all x ∈ G we must have x−1 .e = f.x−1 . Setting x = 1 gives e = f and hence ex = xe for all x ∈ G. It follows that e ∈ Z(G). Thus if a and b are equivalent then b = e.a for some element e ∈ Z(G) with e2 = 1. Conversely if e is an element with these properties then a is equivalent to e.a for all a ∈ G. This proves the following. Proposition 3.7. The congruences of the natural map from the sandwich structure of a group into the sandwich structure of its sandwich automorphism group are cosets of the subgroup consisting of all central elements of order 1 or 2. Corollary 3.8. If G has no central elements of order 2 then the natural map into its sandwich automorphism group is 1-1. If the natural map is 1-1 then it gives a sandwich isomorphism onto its image. The image of this natural map consists of all elements of the form L(a) in the sandwich automorphism group. However all these elements have order 2 since L(a)L(a)(x) = a(ax) = x. This is very interesting. Effectively we have a sandwich isomorphism onto a subsandwich of a group, and all the elements of this subsandwich are group elements of order 1 or 2. Of course the subset of all elements of order 1 or 2 in a group need not constitute a subgroup. However it is a subsandwich. Proposition 3.9. Let G be a group and let 2(G) = {x ∈ G : x2 = 1}. Then 2(G) is a subsandwich of G. Proof. It is enough to show that 2(G) is closed under the sandwich product. But if a2 = 1 and b2 = 1 then (a.b−1 .a)2 = 1 so this is true.  6 IAN HAWTHORN The natural map takes a sandwich into this subsandwich of its sandwich automorphism group. We next consider the question of whether all sandwiches must arise from the sandwich structures of groups. Proposition 3.10. All right zero sandwiches are group subsandwiches. Proof. Consider the right zero sandwich of order n. This is a set of n elements with the product ab = b. There is only one such algebraic structure up to isomorphism. Let G be an elementary abelian 2-group of order 2k with 2k ≥ n. Then the sandwich product in G is ab = a.b−1 .a = a2 .b−1 = 1.b = b and thus the sandwich structure of G is a right zero sandwich of order 2k . Every subset of a right zero sandwich is a right zero subsandwich. Since 2k ≥ n then G has a subset (and hence a right zero subsandwich) of order n. IT follows that the right zero sandwich of order n is a group subsandwich as claimed.  Proposition 3.11. A right zero sandwich is a group sandwich if and only if it has order 2k for some k. Proof. The sandwich structure of an elementary abelian 2-group is the right zero sandwich of order 2k . So this is a group sandwich. Conversely let S be a group of order n with sandwich product ab = b for all a, b ∈ S. Then a1 = a.1−1 .a = 1 and so all elements of the group S have order 2. It follows that S is an elementary abelian 2-group and must therefore have order n = 2k for some k.  Corollary 3.12. Not all sandwiches are group sandwiches. Proof. A right zero semigroup of order three provides a counterexample.  The question of whether all sandwiches are group subsandwiches remains open. Theorem 3.5 and proposition 3.10 suggest that if this is not true then it may not be easy to construct counterexamples. References [1] Ian Hawthorn and Yue Guo, Arbitrary Functions in Group Theory, New Zealand Journal of Mathematics, Vol 45 (2015),1-9 [2] Derek J. S. Robinson, A course in the theory of groups, 2nd edition, Springer 1996 [3] Ian Hawthorn, Nil series from Arbitrary Functions in Group Theory, accepted for publication in CMUC [4] W.McCune, ”Prover9 and Mace4”, http://www.cs.unm.edu/∼mccune/Prover9, 2005-2010.
4math.GR
ON IDEALS GENERATED BY TWO GENERIC QUADRATIC FORMS IN THE EXTERIOR ALGEBRA arXiv:1803.08918v1 [math.AC] 23 Mar 2018 VERONICA CRISPIN QUIÑONEZ, SAMUEL LUNDQVIST, AND GLEB NENASHEV Abstract. Based on the structure theory of pairs of skew-symmetric matrices, we give a conjecture for the Hilbert series of the exterior algebra modulo the ideal generated by two generic quadratic forms. We show that the conjectured series is an upper bound in the coefficient-wise sense, and we determine a majority of the coefficients. We also conjecture that the series is equal to the series of the squarefree polynomial ring modulo the ideal generated by the squares of two generic linear forms. 1. Introduction Let Sn = C[x1 , . . . , xn ] and let I = (f1 , . . . , fr ) be a homogeneous ideal in Sn . There is a longstanding conjecture due to Fröberg [2] about the minimal Hilbert series of Sn /I, namely that it equals Q  (1 − tdr ) , (1 − t)n where dr denotes the degree of the form fr , and where [1 + a1 t + a2 t2 + · · · ] means truncate before the first non-positive term. It is clear that the minimal series is attained when the fi ’s are generic forms, that is, forms with mutually algebraically independent coefficients over Q. The conjecture is proved only in some special cases, including n = 2 by Fröberg [2], n = 3 by Anick [1] and r ≤ n + 1 by Stanley [11]. Let En denote the exterior algebra on n generators over C. It is natural to believe that the Hilbert series of En/(f1 , . . . ,Q fr ), with the fi′ s being generic forms n of even degree, should be equal to (1 + t) (1 − tdr ) . Moreno-Socı́as and Snellman [10] showed that this is true when I is a principal ideal generated by an even element. However, Fröberg and Löfwall [4, Theorem 10.1] showed that for two generic quadratic forms in E5 , the Hilbert series equals 1 + 5t + 8t2 + t3 , while [(1 + t)5 (1 − t2 )2 ] = 1 + 5t + 8t2 . Starting in 2016, a group connected to the Stockholm problem solving seminar has been working on the problem of determining the minimal Hilbert series for quotients of exterior algebras. In this paper, the case of two quadratic forms is considered. The results on principal ideals generated by an element of odd degree is presented in a separate paper [9]. The outline is as follows. In Section 2, we will use the structure theory of skewsymmetric matrices in order to reduce the problem of finding the minimal series among all forms f and g to certain pairs (f¯, ḡ) of canonical forms. 2010 Mathematics Subject Classification. Primary: 13A02; Secondary: 05A15, 13D40, 15A22, 15A75. Key words and phrases. Hilbert series, exterior algebra, generic forms. 1 2 V. CRISPIN, S. LUNDQVIST, AND G. NENASHEV In Section 3 we combine the results from the previous section with combinatorial methods and we show that the result by Fröberg and Löfwall is just the tip of the iceberg. We are able to determinine the first ⌊n/3⌋ + 1 coefficients, and the last non-zero coefficient of the generic series, and we have a conjecture for the series as a whole. Conjecture 1. Let f and g be generic quadratic forms in the exterior algebra En . Then the Hilbert series of En /(f, g) is equal to 1 + a(n, 1)t + a(n, 2)t2 + · · · + n · · · + a(n, ⌈ n2 ⌉)t⌈ 2 ⌉ , where a(n, s) is the number of lattice paths inside the rectangle (n + 2 − 2s) × (n + 2) from the bottom left corner to the top right corner with moves of two types: (x, y) → (x + 1, y + 1) or (x − 1, y + 1). We show in Theorem 5 that the conjectured series is an upper bound for En /(f, g). This gives us a situation that is opposite to the Fröberg conjecture in the commutative setting, in which case a lower bound for the generic series is known. In Section 4, we turn to the Hilbert series of Sn /(x21 , . . . , x2n , ℓ21 , ℓ22 ), ℓ1 and ℓ2 being generic linear forms in Sn . It is known that the Hilbert series of Sn /(x21 , . . . , x2n , ℓ21 ) is equal to [(1 + t)n (1 − t2 )] (see [11]). (In fact, this is a special case of the result in loc. cit. that every artinian monomial complete intersection has the Strong Lefschetz property.) But the Hilbert series of Sn /(x21 , . . . , x2n , ℓ21 , ℓ22 ) is not equal to [(1 + t)n (1 − t2 )2 ]. The first published counterexamples were given in [3]. In the last part of the paper, we present a surprising connection between the Hilbert series of Sn /(x21 , . . . , x2n , ℓ21 , ℓ22 ) and En /(f, g), where f and g are generic quadratic forms. Conjecture 2. Let ℓ1 and ℓ2 be generic linear forms in Sn . Then the Hilbert series of Sn /(x21 , . . . , x2n , ℓ21 , ℓ22 ) is equal to 1 + a(n, 1)t + a(n, 2)t2 + · · · , where a(n, s) is as in Conjecture 1. Although the conjectures give the same Hilbert series for different and non-isomorphic algebras, Conjecture 2 is weaker than Conjecture 1. Theorem 1. The following are equivalent • Conjecture 1 holds for any even n; • Conjecture 2 holds for any n. We prove Theorem 1 in Section 4.2. 2. Canonical forms in the exterior algebra Here we recall the structure theory for pairs of skew-symmetric matrices over the complex field and apply it on quadratic forms in the exterior algebra En . Let A, B ∈ Cn×n be a pair of quadratic matrices. A matrix pencil is the sum A+λB with a parameter λ ∈ C. Two matrix pencils A + λB and à + λB̃ are said to be strictly C-congruent if there is a nonsingular P ∈ Cn×n such that P t (A + λB)P = à + λB̃ for all λ. A block diagonal matrix with the diagonal blocks M1 , . . . , Mr will be called a direct sum of Mi ’s and denoted by M1 ⊕ . . . ⊕ Mr . ON IDEALS GEN. BY TWO GENERIC QUADRATIC FORMS IN THE EXTERIOR ALG. 3 2.1. Canonical forms of complex matrix pencils. In [12] the author presents canonical matrices of complex skew-symmetric matrix pencils under congruence transformation. The description is based on a result for matrices over an algebraically closed field of characteristic 6= 2. Below we present the three canonical forms derived from section 5 in [12], in a slightly different setting and with another notation, obtained from section 5 in [8], provided with comments about rank. Theorem 2. Let A and B be complex skew-symmetric quadratic matrices. Then the matrix pencil A + λB is strictly C-congruent to a direct sum of possibly a zero matrix followed by diagonal blocks of three canonical types, where each type may occur some finite number of times (possibly zero) and may be of different sizes. MI,2k+1 = AI + λBI =  0 ... 1  .. . . ..  Ok . . .   1 . . . 0   0 . . . −1   . ..  .. . . . . Ok   −1 . . . 0 0 ... 0 0 ... 0   0 0 0  .. .. ..   Ok . . .     0 1 0     0 ... 0 0 0 0  + λ    0 . . . −1 0 ..    .   . .. ..   .. . . . 0 . . 0 −1 . . . 0 0 A diagonal block of type I is a sum of rank 2k matrices.  ... 1 . ..  .. .   ... 0   ... 0       Ok MII,2l = AII + λBII =           Ol 0 .. . 1 0 .. . −1 . . . −1 .. . .. . ... 0    ... 1    . . .   .. .    ... 0   + λ         Ol   Ol 0 0 .. . 0 0 .. . 0 −1 0 0 0 0 .. .. . . 0 1 ... 0 . . . −1 .. . .. . ... 0 This type is a sum of a rank 2l respectively rank 2l − 2 matrix. MIII,2m = AIII + λBIII =  0 0 ..   0 .   .. . .  Om . .   α 1   0 0 . . . −α   .. .  0 −1 . ..   .. . . . .. . .  .. . −α −1 . . . 0  ... α   . .. 1    . ..   .. .  Om    ... 0  +λ    0 . . . −1     . ..   .. . . . .   −1 . . . 0  Om  ... 0 ... 1   . ..  .. .   ... 0         Ol  ... 1 . ..  .. .   1 ... 0       Om 0 .. . [Here α is a finite root (not necessarily non-zero) of an elementary divisor pair (α + λ)m , (α + λ)m of A + λB.] 4 V. CRISPIN, S. LUNDQVIST, AND G. NENASHEV A diagonal block of type III is a sum of a matrix of rank 2m for nonzero α (2m − 2 for α = 0) and a matrix of rank 2m. ˜ 2.2. P Quadratic forms over the complex numbers. tAny quadratic formn f = a x x ∈ E can be written as the product x Ãx, where x = (x ) n i i=1 ∈ 1≤i<j≤n ij i j aij n n×n C is a (vertical) vector and à = ( 2 ) ∈ C is a skew-symmetric matrix, that is, aji = −aij . If P t ÃP = A for some nonsingular matrix P ∈ Cn×n , then by change of variables x = P y, we have xt Ãx = yt Ay. Theorem 3. Let f˜, g̃ ∈ En be two generic quadratic forms. Then, after a proper change of variables, we can write them as: Pk Pk (1) f = i=1 xi xk+1+i and g = i=1 xi xk+i , if n = 2k + 1; P P (2) f = ki=1 αi x2i−1 x2i and g = ki=1 x2i−1 x2i with nonzero αi such that αi 6= αj f or i 6= j, if n = 2k. Proof. Let à and B̃ be the matrices that correspond to f˜ and g̃. By Theorem 2 and the discussion above we can write hf˜, g̃i = (yt Ay, yt By), where A + λB = P t (Ã+λB̃)P is a direct sum of canonical diagonal blocks. The ranks of à and A are the same, as well as the ranks of B̃ and B. We know that a matrix corresponding to a generic quadratic form has maximal rank. Hence, we will examine which diagonal sums of canonical pairs A, B have the same property, with the additional condition to maximaze the rank of A + λB as well. The odd and even case differ due to the fact that the rank of a skew-symmetric matrix is always even, so that for odd n the matrix pencil A+λB is always singular. If n is even, the case to consider is when the matrix pencil is strictly regular, that is, when both A and B are nonsingular. (i). Let n = 2k + 1. We see that for all λ the matrix pencil MI,2k+1 has maximal rank 2k as well as each of the included terms AI and BI . Hence, the skew-symmetric matrices Ã, B̃, corresponding to generic quadratic forms, having maximal rank are strictly C-congruent to AI and BI in MI,2k+1 . Thus, f = 2(y1 y2k + √ · · · + yk yk+1 ) and g = 2(y1 y2k+1 + √ · · · + yk yk+2 ). The result follows from yi = xi / 2 for 1 ≤ i ≤ k and yi = x3k+2−i / 2 for k + 1 ≤ i ≤ 2k + 1. (ii). Let n = 2k. Pr For full rank à + λB̃ must be strictly C-congruent to ⊕ri=1 MIII,2mi with i=1 2mi = 2k, where every αi 6= 0 is a finite root of an elementary divisor pair (αi + λ)2mi of det(MIII,2mi ). Moreover, two regular pencils are strictly congruent if and only if they have the same elementary divisors (e.g. see ch. II, § 2 in [5]). The determinant of a skew-symmetric matrix is the square of its Pfaffian, so every elementary divisor of det(A + λB) has even multiplicity. We will show that every root of the Pfaffian Pf(à + λB̃), and therefore also of Pf(A + λB), is simple. αi αi Let MIII,2 have αi as its finite root and consider M = ⊕ki=1 MIII,2 with all different nonzero αi ’s. Then Pf(M ) has only simple roots, a generic matrix pencil then also must have only simple roots Since every root of Pf(à + λB̃) is simple, the elementary divisors of det(à + λB̃) = det(A + λB) have multiplicity exactly two. By Theorem 2 the matrix pencil is strictly congruent to a diagonal sum of k matrices of type MIII,2 with distinct αi ’s. ON IDEALS GEN. BY TWO GENERIC QUADRATIC FORMS IN THE EXTERIOR ALG. 5 αi We notice that the rank of M = ⊕ki=1 MIII,2 is 2k unless λ is equal to some αi , in which case the rank is 2k − 2. Pk Pk Thus, f √ = 2( i=1 αi y2i−1 y2i ) and g = 2( i=1 y2i−1 y2i ). The result follows from yi = xi / 2.  3. The Hilbert series of the ideal generated by two generic quadratic forms in En Let n = 2k + 1. By Theorem 3, if follows that the question about the minimal Hilbert series for quadratic generic forms in En is now equivalent to determining the Hilbert series of En /(f, g), where f = x1 xk+1 + x2 xk+2 + . . . + xk x2k and g = x1 xk+2 + x2 xk+3 + . . . + xk x2k+1 . We get an immediate result. Proposition 4. Conjecture 1 is correct for odd n ≤ 19. Proof. See the coefficients in Table 1, obtained by calculations in Macaulay2 [7].  At first sight, one might suspect that it is possible to determine a Gröbner basis for the ideal (f, g) with respect to a suitable monomial ordering, and then determine the Hilbert series. However, we have not had any success with this approach yet. Instead, we turn to the combinatorial methods, mentioned in the introduction, in order to bound the Hilbert series. Remark 1. In the case when n is even, one of the two canonical forms contains generic coefficients, so we cannot draw similar conclusions as in the odd case. However, due to results that we derive in Proposition 6 and Proposition 7, we can determine almost all of the coefficients for small odd n. See Table 2. We should mention that although that it is only in the case when n is odd that we have an explicit description of the generators, the conclusions that we are about to draw will be as strong in the even case as in the odd case. 3.1. Bounds on the Hilbert series. 3.1.1. An upper bound. This part consists of the proof of the following result. Theorem 5. Let En be the exterior algebra and f, g be two generic quadratic forms. The dimension of the s-th graded component of En /(f, g) is at most a(n, s). For the proof of the upper bound, we need a couple of lemmas. We will work with a certain kind of lattice paths from (0, 0) to (n + 2 − 2s, n + 2) and a bijection between these paths and monomials of degree s. A generally admissible path of size (n, s) consists of n + 2 steps, numbered from 0, with the j-th step going from (i, j) to either (i + 1, j + 1) (right move) or to (i − 1, j + 1) (left move). Moreover, the 0-th and the last step goes always to the right, so there will be exactly s left steps. Given such a path p we define the monomial mp := xj1 xj2 · · · xjs , where j1 , . . . , js are the indices of the left steps (see Figure 1). Clearly there is a one-to-one correspondence between the set of all the paths of size (n, s) and the monomials of degree s in En , which we denote by Bn,s . 6 V. CRISPIN, S. LUNDQVIST, AND G. NENASHEV n\s 3 5 7 9 11 13 15 17 19 n\s 4 6 8 10 12 14 16 18 20 0 1 2 3 4 5 6 7 8 9 1 3 1 0 0 0 0 0 0 0 1 5 8 1 0 0 0 0 0 0 1 7 19 21 1 0 0 0 0 0 1 9 34 66 55 1 0 0 0 0 1 11 53 143 221 144 1 0 0 0 1 13 76 260 560 728 377 1 0 0 1 15 103 425 1156 2108 2380 987 1 0 1 17 134 646 2109 4845 7752 7753 2584 1 1 19 169 931 3535 9709 19551 28101 25213 6765 Table 1. The coefficients a(n, s) for odd n ≤ 19 agree with the values of the Hilbert function of En modulo the ideal generated by two generic quadratic forms, see Proposition 4. 10 0 0 0 0 0 0 0 0 1 0 1 2 3 4 5 6 7 8 9 1 4 4 0 0 0 0 0 0 0 1 6 13 8 0 0 0 0 0 0 1 8 26 40 16 0 0 0 0 0 1 10 43 100 121 32 0 0 0 0 1 12 64 196 364 364 64 0 0 0 1 14 89 336 820 1288 1093 128 0 0 1 16 118 528 1581 3264 4488 3280 256 0 1 18 151 780 2755 6954 12597 15504 9841 512 1 20 188 1100 4466 13244 29260 47652 53296 29524 Table 2. The coefficients a(n, s) for even n ≤ 20. The bold numbers means that we have equality with the Hilbert function for two generic quadratic forms in En , according to Proposition 6 and Proposition 7. Non bold numbers are upper bounds for the Hilbert function. 10 0 0 0 0 0 0 0 0 1024 Let the subset Ln,s ⊂ Bn,s (respectively Rn,s ⊂ Bn,s ) consist of monomials of degree s, whose corresponding paths always cross the line x = 0 (respectively x = n + 2 − 2s). Note that some paths in Ln,s cross the line x = n + 2 − 2s as well, which is inevitable if, for example, n + 2 ≤ 2s. Lemma 1. The cardinalities of |Ln,s | and of   0,  n |Ln,s | = |Rn,s | = s−2 ,   n s , |Rn,s | are given by if s = 1 or 0 if 2 ≤ 2s ≤ n + 2 if 2s ≥ n + 2. Proof. There is a natural bijection between the paths in Ln,s and Rn,s , as one , n+2 can see by considering the central symmetry at the point ( n+2−2s 2 2 ). Hence, |Ln,s | = |Rn,s |. In the rest of the proof we will only work with Ln,s . The simple cases are s = 0, where there are no left moves, and s = 1 with exactly one left move, where the path cannot cross any vertical line. The case n + 2 ≤ 2s follows easily, as any path must cross both x = 0 and x = n + 2 − 2s, so there are no restrictions on how the left moves may occur. We use induction on s in the remaining second case, after first fixing n. The cases  n s = 1 and 2s = n + 2 (if n is even) are already handled above, where −1 = 0 and   n = n+2n−2 respectively. Let 2 < 2s < n + 2 and consider the last two steps. n+2 2 2 ON IDEALS GEN. BY TWO GENERIC QUADRATIC FORMS IN THE EXTERIOR ALG. 7 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 -2 -1 0 1 2 3 4 5 6 7 8 Figure 1. (n, s) = (12, 4). The red path corresponds to the monomial x2 x4 x5 x6 ∈ L12,4 and the blue one to the monomial x1 x5 x6 x11 ∈ B12,4 \{L12,4 ∪ R12,4 }. There are only two possibilities: either . . . → (n − 2s, n) → (n + 1 − 2s, n + 1) → (n + 2 − 2s, n + 2) or . . . → (n + 2 − 2s, n) → (n + 1 − 2s, n + 1) → (n + 2 − 2s, n + 2). It is clear that the number of paths of the first type is |Ln−1,s |. To calculate the number of paths of the second type, we replace the n-th step that goes to the left with a step to the right, that is, (n + 2 − 2s, n) → (n + 1 − 2(s − 1), n + 1). It follows then that the number of paths of the second type is |Ln−1,s−1 |. Hence, we obtain the formula |Ln,s | = |Ln−1,s | + |Ln−1,s−1 |. From 2 < 2s < n + 2 we know 2 ≤ 2(s − 1) < 2s ≤ (n − 1)+ 2. By the induction n−1 assumption, we get |Ln−1,s | = n−1 s−2 and |Ln−1,s−1 | = s−3 , and finally       n−1 n−1 n |Ln,s | = + = , s−2 s−3 s−2 where the the last equality is the well known recursive formula for binomial coefficients.  Lemma 2. Let f be a quadratic form such that, for any s′ and n′ ≤ n, !  ′   ′  n n dim (f )s′ = min , ′ . ′ s s −2 xn′ +1 =...=xn =0 8 V. CRISPIN, S. LUNDQVIST, AND G. NENASHEV Let ≻ be the graded reverse lexicographical ordering (degrevlex) induced by x1 ≻ x2 ≻ . . . ≻ xn . Then Ln,s is the set of leading monomials of the s-th graded component of (f ). Remark 2. A generic quadratic form and any canonical form c1 x1 x2 + c2 x3 x4 + . . . + c⌊ n2 ⌋ x2⌊ n2 ⌋−1 x2⌊ n2 ⌋ , where 0 6= ci ∈ C satisfies the condition of Lemma 2, see [10]. Proof. First we want to prove that for any monomial mp ∈ Ln,s , where p is the corresponding path, there is a form r of degree s − 2, such that mp = ℓm(f r). Let n′ be such an index that the path p contains the step (−1, n′ + 1) → (0, n′ + 2). There is at least one such n′ , because p crosses x = 0. Define the part of p from ′ (0, 0) to (0, n′ + 2) as the path p′ . Note that n′ is even and s′ := n 2+2 is the degree of mp′ . Now we set to zero all the variables with index n′ + 1 and larger: xn′ +1 = xn′ +2 = . . . = xn = 0. By assumption on f , we have dim (f ) s′ xn′ +1 =...=xn =0 n′ s′ ′ !  ′   ′  n n = min , ′ . s′ s −2 n′ s′ −2  = , this means (f ) contains everything in degree s′ . Hence, there Since ′ is an r of degree s − 2 such that !  ℓm f r′ = mp′ . xn′ +1 =...=xn =0 Hence, with respect to degrevlex we obtain ℓm(f r′ ) = mp′ . Then we define r := m r′ m p′ , so that ℓm(f r) = mp . p We have proved that Ln,s is a subset of the leading monomials. The equality follows from     ( n if s ≥ n+2 n n 2 s , dim ((f )s ) = min , = n n+2 s s−2 , if s ≤ s−2 2 , as dim ((f )s ) = |Ln,s | by Lemma 1. We conclude that Ln,s is the set of the leading monomials of (f )s .  In a similar way we get the following result. Lemma 3. Let g be a quadratic form such that, for any s′ and n′ ≤ n, !  ′   ′  n n ′ dim (g)s = min , ′ . ′ s s −2 x1 =...=x ′ =0 n−n Let ≻ be the degrevlex ordering induced by xn ≻ xn−1 ≻ . . . ≻ x1 . Then Rn,s is the set of leading monomials of the s-th graded component of (g). Remark 3. A generic quadratic form and any canonical form d1 xn xn−1 + d2 xn−2 xn−3 + . . . + d⌊ n2 ⌋ xn+2−2⌊ n2 ⌋ xn+1−2⌊ n2 ⌋ , where 0 6= di ∈ C satisfies the condition of Lemma 2. Proof. Apply Lemma 2 after change of variables xi → xn+1−i and g → f . We are now ready to prove the main statement.  ON IDEALS GEN. BY TWO GENERIC QUADRATIC FORMS IN THE EXTERIOR ALG. 9 Proof of Theorem 5. The key idea of the proof is to consider two different monomial orderings on Bn,s , so that the leading monomials of (f )s in the first ordering and the leading monomials of (g)s in the second ordering correspond to the monomials whose paths intersect x = 0 and x = n + 2 − 2s respectively. P Let f = 1≤i≤j≤n ci,j xi xj be a quadratic form satisfying the condition of Lemma 2. (f ) (f ) We choose a subset As ⊆ Bn,s−2 , such that |As | = |Ln,s | and  ) dim span{f α | α ∈ A(f s } = |Ln,s | = dim((f )s ).  Hence, ℓm span{f α}α∈A(f ) = Ln,s with respect to degrevlex in Lemma 2. s To a vector t = (t1 , . . . , tn ) ∈ Cn we assign the form X f (t) = ti tj ci,j xi xj , 1≤i≤j≤n and to a monomial γ = xi1 xi2 · · · xil the number tγ = ti1 ti2 · · · til . (f ) Now consider the product f (t) α for each α ∈ As , and define a matrix Mf (t) of (f ) size |As | × |Bn,s |, where the rows consist of the coefficients of β ∈ Bn,s in f (t) α. We define the matrix Mf similarly for the products f α. Given β ∈ Bn,s , we see the t (α, β)-entry of Mf (t) is equal to tαβ multiplied with the (α, β)-entry of Mf . Hence, we have an equation between the main minors of Mf (t) and Mf . Namely, for a subset L′ ⊆ Bn,s with |L′ | = |Ls,n |, we have Q β∈L′ tβ . det(Mf (t) ,L′ ) = det(Mf,L′ ) Q (f ) tα α∈A s In order to proceed we first define a sufficiently large constant C, that uses a constant C1 ∈ N defined in the end of this proof. Let    C := n2n + max ′ L ⊂Bn,s : |L′ |=|Ln,s | | det(Mf,L′ )|   C1 . | det(Mf,Ln,s )| 2 n Now consider a vector q = (C −2C , C −2C , . . . , C −2C ). For monomials β1 , β2 ∈ Bn,s , we know that β1 ≺ β2 implies C 2 qβ1 ≤ qβ2 . Since Ls,n = ℓm(f Bn,s−2 ), then for any subset Ln,s 6= L′ ⊂ Bn,s , such that |L′ | = |Ln,s |, we have either Q tβ β∈L Q n,s ≥ C 2. | det(Mf,L′ )| = 0 or t ′ β β∈L The above together with | det(Mf,L′ )| < C| det(Mf,Ln,s )| yields the inequality (1) | det(Mf (t) ,Ln,s )| > C| det(Mf (t) ,L′ )|. Let g be a quadratic form satisfying the condition of Lemma 3. Similarly as above, (g) there is a subset As ⊂ Bn,s−2 , so that, with respect to degrevlex in Lemma 3, (g) Lm(span{gα | α ∈ As }) = Rn,s . The matrix Mg is defined by g in the corresponding way as Mf by f . (g) We know that the main minor det(Mg,Rn,s ) is non-zero. Thus there is subset Ās ⊆ (g) (g) As of size |Rn,s \ Ln,s | such that the determinant of the minor Ās × (Rn,s \ Ln,s ) (g) does not vanish. Further, let Mg′ be a submatrix of Mg , corresponding to Ās ×Bn,s . 10 V. CRISPIN, S. LUNDQVIST, AND G. NENASHEV (f ) (g) (f ) We construct a big matrix M of size (|As | + |Ās |) × |Bn,s |, where the first |As | (g) (f ) (g) rows come from Mf (q) and the last |Ās | rows are from Mg′ . Since |As | + |Ās | = |Ln,s ∪ Rn,s |, it is enough to show that the main minor det(MLn,s ∪Rn,s ) does not vanish. We can rewrite the minor as X ± det(Mf (q) ,L′ ) · det(Mg,{Ln,s ∪Rn,s }\L′ ). det(MLn,s ∪Rn,s ) = L′ ⊂Ln,s ∪Rn,s : |L′ |=|Ln,s | Due to Equation (1), it is possible to choose a sufficiently large C1 , such that (2) | det(Mf (q) ,Ln,s )| · | det(Mg,Rn,s \Ln,s )| >    X | det(Mf (q) ,Ln,s )|    C ′ Ln,s 6=L ⊂Ln,s ∪Rn,s : |L′ |=|Ln,s | X Ln,s 6=L′ ⊂Ln,s ∪Rn,s : |L′ |=|Ln,s |    | det(Mg,{Ln,s ∪Rn,s }\L′ )| >  | det(Mf (q) L′ )| · | det(Mg,{Ln,s ∪Rn,s }\L′ )|. Altogether, for a large C1 the main minor of MLn,s∪Rn,s will not vanish, which means that the dimension of the s-graded component of the ideal generated by (f (t) , g) is at least |Ln,s ∪ Rn,s |. Thus, the dimension of the quotient algebra is at most a(n, s). This concludes the proof.  3.1.2. A lower bound. We recall the following result, which is the exterior version of the lower bound used by Fröberg in the commutative setting. Lemma 4. Let f and g be generic quadratic forms in En . Then   HS(En /(f, g), t) ≥ (1 + t)n (1 − t2 )2 . Proof. From [10], we know that HS(En /(f ), t) = [(1+t)n (1−t2 )]. The multiplication map ·g from (En /(f ))i to (En /(f ))i+2 has rank at most  min dim(En /(f ))i , dim(En /(f ))i+2 . Thus, that is,  dim (En /(f, g))i+2 ≥ max 0, dim(En /(f ))i+2 − dim(En /(f ))i ,   HS(En /(f, g), t) ≥ (1 + t)n (1 − t2 )2 .  3.2. Coefficients in the Hilbert series. Using the bounds that we have derived in the previous section, we can determine a majority of the coefficients in the Hilbert series. Proposition 6. Let f and g be two generic quadratic forms in En . • If n is odd and equal to 2k + 1, then dim((E2k+1 /(f, g))k+1 ) = a(2k + 1, k + 1) = 1, and dim((E2k+1 /(f, g))k+2 ) = a(2k + 1, k + 2) = 0. ON IDEALS GEN. BY TWO GENERIC QUADRATIC FORMS IN THE EXTERIOR ALG. 11 • If n is even and equal to 2k, then dim((E2k /(f, g))k ) = a(2k, k) = 2k , and dim((E2k /(f, g))k+1 ) = a(2k, k + 1) = 0. Proof. From the definition of the numbers a(n, s), it follows immediately that a(2k+ 1, k + 2) = a(2k, k + 1) = 0, proving the second statement in each case. We now concentrate on the first statements. We begin with the odd case. By Theorem 3, we can assume that f = x1 x2k + x2 x2k−1 + · · · + xk xk+1 and g = x1 x2k+1 + x2 x2k + · · · + xk xk+2 . Now it is easy to see that xk+1 · · · x2k+1 ∈ / (f, g), so dim((E2k+1 /(f, g))k+1 ) ≥ 1. On the other hand, we know by Theorem 5 that dim((E2k+1 /(f, g))k+1 ) ≤ a(2k + 1, k + 1). But there is only one path inside the rectangle 1 × (2k + 3), and a(2k + 1, k + 1) = 1. We proceed in the same manner in the even case. By Theorem 3 we can assume that f = x1 xk+1 + x2 xk+2 + · · · + xk x2k and g = α1 x1 xk+1 + α2 x2 xk+2 + · · · + αk xk x2k . Now we observe that the monomial y1 y2 · · · yk with yi ∈ {x2i−1 , x2i } lies outside (f, g), so dim((E2k /(f, g))k ) ≥ 2k . By Theorem 5 it is enough to show that a(2k, k) = 2k . The possible paths inside the rectangle 2 × (2k + 2) are (0, 0) → (1, 1) → (0/2, 2) → (1, 3) → (0/2, 4) → · · · → (0/2, 2k) → (1, 2k + 1) → (2, 2k + 2), hence, the requested number is indeed 2k .  Proposition 7. Let f, g be generic quadratic forms in En . Let s and n be integers such that s ≤ ⌊ n3 ⌋+1. Then the dimension    of the s-th graded component of En /(f, g) n n is equal to a(n, s) = ns − 2 s−2 + s−4 . Proof. Since [(1 + t)n (1 − t2 )2 ] = (1 + t)n (1 − 2t2 + t4 )] is a lower bound,  and a(n, s) n n is an upper bound, it is enough to show that a(n, s) = ns − 2 s−2 + s−4 when s ≤ ⌊ n3 ⌋ + 1. By Lemma1 the number of paths crossing the y-axis or the line x = n+2−2s is the  n n same, s−2 . Hence, the inclusion-exclusion principle yields a(n, s) = ns − s−2 −  n + r, where r is the number of paths that cross both x = 0 and x = n + 2 − 2s s−2 before ending at (n + 2 − 2s, n + 2). If a path p from (1, 1) to (n + 1 − 2s, n + 1) crosses the line x = n + 2 − 2s before the line x = 0, then the length of p is at least (n+2−2s)+(n+2−2s+2)+(n+2−2s) = 3n + 8 − 6s. Hence, 3n + 8 − 6s ≤ length(p) = n but we have that s ≤ n 3 2n + 2 + 6 ≤ 6s n+1 + 1 ≤ s, 3 + 1, so there is no such path. We get that all paths (that cross both x = 0 and x = n + 2 − 2s) should cross the line x = 0 before the line x = n + 2 − 2s. For any such path p from (1, 1) to (n + 1 − 2s, n+1), we chose the first point (−1, ap ) ∈ p and the first point (n+3−2s, bp) ∈ p. Reflect this path from the step ap until the step bp , i.e., change the dirrection of all steps ap ≤ i < bp (i.e., we change steps of type (∗, ∗) → (∗ + 1, ∗ + 1) to steps (∗, ∗) → (∗ − 1, ∗ + 1) and the converse). We get the new path p′ , which is from the point (1, 1) to the point (n + 1 − 2s − 2(n + 4 − 2s), n + 1) = (2(s − 4) − n + 1, n + 1). It is possible to reverse this procedure, than the number of such p is exactly the 12 V. CRISPIN, S. LUNDQVIST, AND G. NENASHEV number of p′ (without restrictions). Then in the case s ≤ ⌊ n3 ⌋ + 1, the number of  n paths r is equal to s−4 .  4. Squares of generic linear forms in the square free algebra We will now turn to commutative setting. Recall that there is a conjecture by Iarrobino [6] stating that C[x1 , . . . , xn ]/(l1d , . . . , lrd ) and C[x1 , . . . , xn ]/(f1 , . . . , fr ) have the same Hilbert series, where l1 , . . . , lr are generic linear forms and the fi are generic forms of degree d, except for the cases r = n + 2, r = n + 3, (n, r) = (3, 7), (3, 8), (4, 9), (5, 14). We will now focus on the Hilbert series for the simplest exceptional case; r = n + 2 and d = 2. After a linear change of variables, it is enough to consider Sn /(x21 , . . . , x2n , ℓ21 , ℓ22 ), where l1 and l2 are generic linear forms. 4.1. Bounds on the Hilbert series. Theorem 8. Let Sn be the polynomial ring in n variables and let ℓ1 , ℓ2 be two generic linear forms. Then the dimension of the s-th graded component of the quotient Sn /(x21 , . . . , x2n , ℓ21 , ℓ22 ) is at most a(n, s). Proof. We can use the same proof as in Theorem 5. Indeed, the references to Lemma 2 and Lemma 3 are valid, since for a generic linear ℓ, the Hilbert series of  Sn /(x21 , . . . , x2n , ℓ2 ) is equal to [(1 + t)n (1 − t2 )] (see [11]). 4.2. Proof of Theorem 1. Let ae (n, s) and ac (n, s) be the dimensions of the sgraded components of En /(f, g) and of Sn /(x21 , . . . , x2n , ℓ21 , ℓ22 ) resp., where f, g ∈ En are generic quadratic forms and ℓ1 , ℓ2 ∈ Sn are generic linear forms. Remark 4. In fact, the algebra Sn /(x21 , . . . , x2n , ℓ21 , ℓ22 ) is isomorphic to the algebra and Sn+2 /(x21 , . . . , x2n+1 , x2n+2 , ℓ∗1 , ℓ∗2 ), where ℓ∗1 = ℓ1 − xn+1 and ℓ∗2 = ℓ2 − xn+2 . Thus, we can define the coefficients ac (n, s) for n ≥ −2 and s ≥ 0. Lemma 5. Let k and s be positive integers. Then     X s−r r k . ae (2k, s) = ac k − r − 2, 2 2 r r∈N: 2|(s−r) Proof. By Theorem 3, we can assume that f = b1 x1 x2 + b2 x3 x4 + . . . + bk x2k−1 x2k , and g = c1 x1 x2 + c2 x3 x4 + . . . + ck x2k−1 x2k . For a subset I ⊂ [k] := {1, 2, . . . , k}, let fI = X bi x2i−1 x2i X ci x2i−1 x2i . i∈[k]\I and gI = i∈[k]\I ON IDEALS GEN. BY TWO GENERIC QUADRATIC FORMS IN THE EXTERIOR ALG. 13 Denote by EI the subalgebra of En generated by {x2i−1 x2i }, i ∈ [k] \ I]. Notice that fI , gI ⊆ EI , so we can form RI := EI /(fI , gI ). For a subset J ⊆ I we define the monomial Y Y x2i ∈ En . m(I, J) = x2j−1 j∈J i∈I\J Since x2i−1 · x2i−1 x2i = x2i · x2i−1 x2i = 0 in En , if follows that {m(I, J) · e, J ⊆ I ⊆ [k] and e a basis element of RI } is a basis for En mod (f, g), where we in the product m(I, J) · e regard e as an element in En . Now ae (2k, s) = dim(E2k /(f, g))s ) = X 2|I| dim(RI )s−|I| , I⊆[k] 2|s−|I| since we have 2|I| possibilities to choose J. But RI is a commutative algebra isomorphic to X X ci yi ), bi yi , C[yi , i ∈ [k] \ I]/( i∈[k]\I i∈[k]\I each yi of degree two, so X X s − |I| 2|I| ac (k − |I| − 2, 2|I| dim(RI )s−|I| = ) 2 I⊆[k] 2|s−|I| I⊆[k] 2|s−|I| = X r∈N 2|s−r   s−r k ac (k − r − 2, 2 ). r 2 r  Lemma 6. Let k and s be positive integers. Then     X s−r r k a(2k, s) = a k − r − 2, 2 . r 2 r∈N: 2|(s−r) Proof. For a path p we consider a pair of steps such that (2x + 1, y) → (2x + 1 ± 1, y + 1) → (2x + 1, y + 2), i.e., one step to right or left and another to the opposite. Note that if p is inside rectangle (2k + 2 − 2s) × (2k + 2), then after deleting these two steps the new path p′ is inside (2k + 2 − 2s) × 2k. Furthermore, for any path q inside (2k + 2 − 2s) × 2k, if we insert such two steps in any odd place then the new paths q ′ (left-right) and q ′′ (right-left) are both inside (2k + 2 − 2s) × (2k + 2). For any path p inside the rectangle (2k + 2 − 2s) × (2k + 2), we collect the ycoordinate for the left-right steps in a set I1 ⊆ [k] and the y-coordinate for the right-left steps in a set I2 ⊆ [k]. After deleting all such pairs we get a path inside (2k + 2 − 2s) × (2k + 2 − 2|I1 | − 2|I2 |). We obtain X b(2k + 2 − 2s, 2k + 2 − 2|I1 | − 2|I2 |), a(2k, s) = I1 ⊔I2 ⊆[k] 14 V. CRISPIN, S. LUNDQVIST, AND G. NENASHEV where b(2k+2−2s, 2k+2−2r) is the number of paths inside (2k+2−2s)×(2k+2−2r) such that the first step is to the left, the last to right, and all other steps go by pairs; both to the right or both to the left. Note that if (s − r) is odd, then b(2k + 2 − 2s, 2k + 2 − 2r) = 0. Indeed, let u be the number of “left” pairs, then 2k + 2 − 2s = 2k + 2 − 2r − 4u ⇐⇒ r − s = 2u. It follows that   X X r k b(2k +2−2s, 2k +2−2|I1|−2|I2 |) = b(2k +2−2s, 2k +2−2r). 2 r r∈N: 2|(s−r) I1 ⊔I2 ⊆[k] Now b(2k + 2 − 2s, 2k + 2 − 2r) is equal to the number of paths inside (2k − 2s) × (2k −2r) where all steps are doubled, i.e., from (x, y) to (x−2, y +2) or (x+2, y +2). Hence, b(2k+2−2s, 2k+2−2r) is equal to the number of paths inside (k−s)×(k−r), i.e., s−r b(2k + 2 − 2s, 2k + 2 − 2r) = a(k − s − 2, ), 2 concluding the proof.  Proof of Theorem 1. If Conjecture 2 holds for any number of variables, then from Lemma 5 and Lemma 6 it follows that Conjecture 1 should hold for any even number of variables. Assume that Conjecture 1 holds for any even number of variables. Then     X s−r s k a(2k, s) = a k − r − 2, 2 2 r r∈N: 2|(s−r) by Lemma 5. On the other hand, by Lemma 6, it holds that     X s−r s k ae (2k, s) = ac k − r − 2, 2 , r 2 r∈N: 2|(s−r) so the assumption a(2k, s) = ae (2k, s) gives us         X X s−r k s−r k = . ac k − r − 2, 2s a k − r − 2, 2s 2 2 r r r∈N: 2|(s−r) r∈N: 2|(s−r) By Theorem 8 we know that a(n, m) ≥ ac (n, m), so we get the equality     s−r s−r a k − r − 2, = ac k − r − 2, , 2 2 for any r ≤ s such that 2|(s − r). Hence, for any pair m ≤ n we have a(n, m) = ac (n, m).  It is natural to ask if there might be other connections between the series of quotients of En and quotients of Sn . We end up by giving a question in this direction, whose formulation is based upon computer experiments. ON IDEALS GEN. BY TWO GENERIC QUADRATIC FORMS IN THE EXTERIOR ALG. 15 Question 1. Let ℓ1 , ℓ2 ∈ Sn be two generic linear forms, and let f, g ∈ En be two generic quadratic forms. Do the two algebras 2d2 1 Sn /(x21 , . . . , x2n , ℓ2d 1 , ℓ2 ) and En /(f d1 , g d2 ) have the same Hilbert series? Remark 5. In the case d1 = d2 = 1, Question 1 is a weaker version of Conjecture 2. Acknowledgements. The authors want to thank the participants of the Stockholm problem solving seminar for many fruitful discussions during the progress of this work. References [1] D. J. Anick, Thin algebras of embedding dimension three, Journal of Algebra 100 (1986), 235–259. [2] R. Fröberg, An inequality for Hilbert series of graded algebras. Math. Scand., 56 (2): 117– 144, 1985. [3] R. Fröberg, J. Hollman, Hilbert series for ideals generated by generic forms. Journal of Symbolic Computation 17.2 (1994), 149–157. [4] R. Fröberg, C. Löfwall, Koszul homology and Lie algebras with application to generic forms and points. Homology, Homotopy and applications, 4.2 (2002), 227–258. [5] F. R. Gantmacher, The theory of matrices, Vol II., Chelsea, New York, 1959. [6] Inverse system of a symbolic power III. Thin algebras and fat points. Compositio Math. 108 (1997), 319–356. [7] D. Grayson, M. Stillman, Macaulay2, a software system for research in algebraic geometry, available at www.math.uiuc.edu/Macaulay2. [8] P. Lancaster, L. Rodman, Canonical forms for symmetric/skew-symmetric real matrix pairs under strict equivalence and congrunce, Linear Algebra Appl. 406 (2005), 1–76. [9] S. Lundqvist, L. Nicklasson, On generic principal ideals in the exterior algebra. arXiv: 1803.03563 (2018). [10] G. Moreno-Socias, J. Snellman, Some conjectures about the Hilbert series of generic ideals in the exterior algebra. Homology, homotopy and applications 4.2 (2002), 409–426. [11] R. Stanley, Weyl groups, the hard Lefschetz theorem, and the Sperner property, SIAM J. Algebraic Discrete Methods, 1 (1980), 168–184. [12] R. C. Thompson, Pencils of Complex and Real Symemtric and Skew Matrices. Linear Algebra Appl. 147 (1991), 323–371. (V. Crispin) Department of Mathematics, Uppsala University, S-751 06, Uppsala, Sweden E-mail address: [email protected] (S. Lundqvist, G. Nenashev) Department of Mathematics, Stockholm University, S-106 91, Stockholm, Sweden E-mail address: [email protected], [email protected]
0math.AC
The Annals of Probability 2016, Vol. 44, No. 4, 2858–2888 DOI: 10.1214/15-AOP1036 c Institute of Mathematical Statistics, 2016 arXiv:1409.3905v2 [math.PR] 2 Sep 2016 HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES By Mark Rudelson∗,1, Alex Samorodnitsky†,2 and Ofer Zeitouni‡,§,3 University of Michigan∗ , Hebrew University of Jerusalem† , Weizmann Institute‡ and New York University§ We analyze the behavior of the Barvinok estimator of the hafnian of even dimension, symmetric matrices with nonnegative entries. We introduce a condition under which the Barvinok estimator achieves subexponential errors, and show that this condition is almost optimal. Using that hafnians count the number of perfect matchings in graphs, we conclude that Barvinok’s estimator gives a polynomialtime algorithm for the approximate (up to subexponential errors) evaluation of the number of perfect matchings. 1. Introduction. The number of perfect matchings in a bipartite graph is given by the permanent of the bipartite adjacency matrix of the graph. Since computing the permanent is generally computationally hard [19], various algorithms have been proposed to compute it approximately. We mention in particular the MCMC algorithm of Jerrum–Sinclair–Vigoda [12], the Linial– Samorodnitsky–Wigderson rescaling algorithm [14] (denoted LSW in the sequel), and the Barvinok–Godsil–Gutman algorithm [2, 9]; the analysis of the latter algorithm was the subject of the previous work [18]. A more general (and hence hard) combinatorial problem is that of computing the number of perfect matchings in a graph with an even number of vertices. Let A denote the adjacency matrix of such a graph with n = 2m vertices. The relevant combinatorial notion here is the hafnian [15], defined Received September 2014; revised June 2015. Supported in part by NSF Grant DMS-11-61372 and USAF Grant FA9550-14-1-0009. 2 Supported in part by grants from the US–Israel Binational Science Foundation and from the Israel Science Foundation. 3 Supported in part by a grant from the Israel Science Foundation and by the Herman P. Taubman professorial chair of Mathematics at WIS. AMS 2000 subject classifications. Primary 60B20, 15B52; secondary 05C70. Key words and phrases. Hafnian, perfect matching, random Gaussian matrices. 1 This is an electronic reprint of the original article published by the Institute of Mathematical Statistics in The Annals of Probability, 2016, Vol. 44, No. 4, 2858–2888. This reprint differs from the original in pagination and typographic detail. 1 2 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI as m 1 X Y Aσ(2j−1),σ(2j) , haf(A) = m!2m σ∈Sn j=1 where Sn denotes the symmetric group on [n]. It is immediate to check (see, e.g., [2]) that (1.1) #perfect matchings in A = haf(A). Thus, the interest in an efficient computation of haf(A). As for the permanent, the exact computation of haf(A) is computationally expensive. This problem of estimating the hafnian seems to be harder to attack than the corresponding problem for the permanent since many algorithms known for permanent approximation break down when extended to hafnians. In particular, the LSW rescaling algorithm [14] transforms the adjacency matrix of a graph to an almost doubly stochastic one. Yet, a nontrivial lower estimate of the hafnian of a doubly stochastic matrix is impossible; see [4]. Also, in contrast with the computation of the permanent, [12] points out that the proof of convergence of the MCMC algorithm breaks down for the approximate computation of the hafnian (unless the minimal degree is at least n/2, see [11]). We consider in this paper the computation of haf(A) for symmetric matrices with nonnegative entries. Note that the diagonal entries play no role in the computation of haf(A) and, therefore, in the rest of this paper we always assume that Aii = 0 for all i. In his seminal paper [2] discussing the Godsil–Gutman estimator for the permanent, Barvinok also introduces a probabilistic estimator of haf(A) for a symmetric matrix A possessing nonnegative entries. Let W be a real skew symmetric matrix with independent centered normal entries Wij above the diagonal satisfying EWij2 = Aij . In other words, let Gskew denote a skew symmetric matrix with independent N (0, 1) entries above the main diagonal. Let W = W (A) denote the skew symmetric matrix with p Wij = Gij Aij , (1.2) i<j and write W = Ap ⊙ Gskew , where A denotes the element-wise square-root of A, that is, Aij = Aij . Then (1.3) haf(A) = E det(W ). Thus, det(W ), which is an easily computable quantity, is a consistent estimator for haf(A), and Barvinok [2] proceeds to prove that for any matrix A, e−γn haf(A) ≤ det(W ) ≤ C · haf(A) with high probability, where γ is Euler’s constant. Other approaches to computing the hafnian include [4] (which however does not apply to adjacency matrices of nontrivial graphs), HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES 3 [5], where a deterministic algorithm of subexponential complexity is constructed and analyzed, and [3], where a random algorithm is analyzed but the precision of the algorithm depends in a complicated way on the number of perfect matchings. Our goal in this paper is to analyze the performance of the Barvinok estimator for the hafnian. As in [18], establishing the concentration of a random determinant hinges on bounding the singular values of the Gaussian matrix W . This crucial step, however, essentially differs from [18] as W is skew-symmetric, and thus has less independence than the unrestricted matrix in [18]. Handling these dependences required different arguments for the smallest and the intermediate singular values. In the first case, we employ a conditioning argument tailored to take into account the structure of the graph (Lemmas 2.5, 2.6). The fact that the entries of W are real, and thus the (n − 1) × (n − 1) main minors of it are degenerate plays a central role here. On the other hand, instead of developing a estimate for intermediate singular values as in [18] (a difficult task here due to the skew-symmetry), we use the fact that the imaginary-valued matrix iW is Hermitian, which allows us to use estimates from recent work [7] on the local semi-circle law. To formulate our results, we introduce a notion of strong expansion for graphs. This notion strengthens the standard notion of vertex expansion assuming that sets having many connected components expand faster. For a set J ⊂ [n] of vertices, denote by Con(J) the set of the connected components of J , and by ∂(J) the boundary of J , that is, ∂(J) = {i ∈ [n] \ J : ∃j ∈ J, (i, j) is an edge}. Definition 1.1. Let κ ∈ (0, 1), and let 1 < m < n. We say that the graph Γ is strongly expanding with parameter κ up to level m if for any set J ⊂ [n] of vertices with |J| ≤ m, |∂(J)| − |Con(J)| ≥ κ · |J|. In this definition and below, we use the following notational convention. Important parameters which appear in definitions and theorems are denoted by Greek letters. Unimportant constants whose value may change from line to line are denoted c, c′ , C, etc. The simplest form of our results is in case A is the adjacency matrix of a d-regular graph. Theorem 1.2. Fix α, κ > 0. Let A be the adjacency matrix of a d-regular graph Γ with d ≥ αn + 2. Assume that (1.4) Γ is κ strongly expanding up to level n(1 − α)/(1 + κ/4). (1) Then for any ǫ < 1/5 and D > 4, (1.5) P(|log haf(A) − log det(W )| > Cn1−ǫ ) ≤ n−D , 4 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI where C = C(α, κ, D, ǫ) > 0. (2) Fix δ > 0. If, in addition to the above assumptions, the matrix A/d possesses a spectral gap δ, then for any D > 4, (1.6) P(|log haf(A) − log det(W )| > Cn1/2 log1/2 n) ≤ n−D , where C = C(α, κ, D, δ) > 0. [The assumption in (2) means that the modulus of the eigenvalues of A/d is either 1 or smaller than 1 − δ.] Theorem 1.2 is an immediate consequence of our more general Theorem 1.10 below. We discuss the definition of strongly expanding graphs in Remark 1.6 below. The extension of Theorem 1.2 to irregular graphs requires the notion of doubly stochastic scaling of matrices. We also need the notion of spectral gap for stochastic matrices. Definition 1.3. A matrix A with nonnegative entries is said to possess a doubly stochastic scaling if there exist two diagonal matrices D1 , D2 with positive P entries Psuch that the matrix B = D1 AD2 is doubly stochastic, that is, B = j ij k Bkℓ = 1 for all i, ℓ. We call such B a doubly stochastic scaling of A. Definition 1.4. A symmetric stochastic matrix A is said to possess a spectral gap δ if there do not exist eigenvalues of A in (−1, −1 + δ) ∪ (1 − δ, 1). We will show below (see Corollary 3.3) that the adjacency matrix of a strongly expanding graph with appropriate lower bound on its minimal degree possesses a unique doubly stochastic scaling, with D1 = D2 . We use this fact in the following theorem, where the required lower bound on the minimal degree is satisfied. Theorem 1.5. Fix α, κ, ϑ > 0. Let A be the adjacency matrix of a graph Γ whose minimal degree satisfies d ≥ αn + 2. Assume that (1.7) Γ is κ strongly expanding up to level n(1 − α)/(1 + κ/4), and (1.8) the doubly stochastic scaling B of A satisfies maxi,j Bij ≤ n−ϑ . (1) Then for any ǫ < 1/5 and D > 4, (1.9) P(|log haf(A) − log det(W )| > Cn1−ǫϑ ) ≤ n−D with C = C(α, κ, D, ǫ) > 0. HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES 5 (2) Fix δ > 0. If, in addition to the above assumptions, B possesses a spectral gap δ, then for any D > 4, (1.10) P(|log haf(A) − log det(W )| > Cn1−ϑ/2 log1/2 n) ≤ n−D , where C = C(α, κ, D, δ, ϑ) > 0. Condition (1.8) can be readily checked in polynomial time by applying the LSW scaling algorithm, stopped when its error is bounded above by n−1 . Indeed, at such time, the LSW algorithm output is a matrix C = C(A) which is almost doubly stochastic in the sense that, with B = B(A) denoting the doubly stochastic scaling of A, one has maxij |B(A) − C(A)| < n−1 . Because the maximal entry of B is at least n−1 , this implies that the maximal entries of B and of C are of the same order. Note also that the spectral gap condition in point (2) of Theorem 1.5, which depends only on the eigenvalues of B, can also be checked in polynomial time. We note that for a given 0 < ϑ < 1, there exist stronger expansion conditions on the graph Γ which ensure that the maximal element in the doubly stochastic scaling of its adjacency matrix is of size at most n−ϑ . That is, if Γ satisfies these stronger properties, condition (1.8) is automatically satisfied. We refer to Section 6, Proposition 6.2, for details. Conditions (1.7) and (1.8) play different roles in the proof. The first one is needed to establish the lower bound on the smallest singular value of W , and the second one guarantees that most of the singular values are greater than n−ǫ . Remark 1.6. The definition of strongly expanding graphs (Definition 1.1 above) reminds one of that of a vertex expander. Yet, it is stronger in two senses. First, the strong expansion property takes into account the geometry of the set, requiring more rapid expansion for more “spread out” sets. Second, we want this expansion property to hold for all sets of size relatively close to n, while for the classical expanders, the corresponding property is required only for sets with at most n/2 vertices. This may look unnatural at first glance. However, one may construct an example of a graph that can have the strong expansion property up to a level arbitrary close to 1, and yet the matrix corresponding to it may be degenerate with probability 1. Further, in Proposition 1.7 below, we construct a graph whose adjacency matrix barely misses the condition in Definition 1.1 and yet det(W )/ haf(A) ≤ e−cn with high probability for an appropriate c > 0. Proposition 1.7. Let δ > 0. For any N ∈ N, there exists a graph Γ with M > N vertices such that (1.11) ∀J ⊂ [M ] |J| ≤ M/2 ⇒ |∂(J)| − (1 − δ)|Con(J)| ≥ κ|J| 6 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI and  det(W ) ≤ e−cM P E det(W )  ′ ≥ 1 − e−c M . Here, c, c′ , κ are constants depending on δ. Our theorems on adjacency matrices are based on a general result pertaining to doubly stochastic symmetric matrices B with nonnegative entries. We will consider matrices which have many relatively large entries. To formulate this requirement precisely, we introduce the notion of large entries graph. Definition 1.8. Let A be a symmetric matrix with nonnegative entries. For a parameter θ > 0, define the large entries graph ΓA (θ) by connecting the vertices i, j ∈ [n] whenever Aij > θ. If A is the matrix of variances of entries of a skew symmetric matrix W , we will also refer to ΓA (θ) as the large variances graph of W . We will now formulate two theorems on the concentration of the hafnian of a skew symmetric matrix whose large variances graph satisfies a strong expansion condition. Theorem 1.9. Fix β, α, ϑ, κ > 0. Let B be a symmetric stochastic matrix of even size n with nonnegative entries, let W = W (B) be as (1.2) (with B replacing A) and let Γ = ΓB (n−β ) denote its large variances graph. Assume that: (1) The minimal degree of a vertex of Γ is at least αn + 2. (2) Γ is κ strongly-expanding up to level n(1 − α)/(1 + κ/4). (3) max Bij ≤ n−ϑ . Then, for any ǫ < 1/5 and D > 4 there exists C = C(β, α, κ, ϑ, ǫ, D) > 0 so that (1.12) P(|log haf(B) − log det(W )| > Cn1−ǫϑ ) ≤ n−D . Somewhat tighter bounds are available if the matrix B possesses a spectral gap. Theorem 1.10. Assume the conditions of Theorem 1.9 and in addition assume that the matrix B has a spectral gap δ. Then, for any D > 4, (1.13) P(|log haf(B) − log det(W )| > Cn1−ϑ/2 log1/2 n) ≤ n−D . The constant C here depends on all relevant parameters β, α, κ, ϑ, δ and D. HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES 7 The structure of the paper is as follows. In Section 2, we consider unit vectors that are close to vectors with small support and derive uniform small ball probability estimates for their images under the action of W . These estimates are used in Section 3 to obtain a lower bound for the smallest singular values of W . In Section 4, we provide local estimates for the empirical measure of eigenvalues of W . Section 5 is devoted to the proof of Theorems 1.9 and 1.10. Section 6 is devoted to the proof of a combinatorial lemma concerning the doubly stochastic scaling of adjacency matrices of strongly expanding graphs, which then is used in the proof of Theorem 1.5; in the section we also present sufficient conditions that ensure that (1.8) holds. Finally, in Section 7 we present the construction of the graph discussed in Proposition 1.7, and provide the proof of the latter. 2. Compressible vectors. To establish the concentration for the determinant of the matrix W , we have to bound its smallest singular value. As is usual in this context, we view the smallest singular value of a matrix as the minimum of the norms of the images of unit vectors: sn (W ) = min kW xk2 . x∈S n−1 Before bounding the minimal norm over the whole sphere, let us consider the behavior of kW xk2 for a fixed x ∈ S n−1 . We begin with a small ball probability estimate, which is valid for any unit vector. Lemma 2.1. Let W be a skew-symmetric n × n matrix with independent, up to the symmetry restriction, normal entries. Assume that for any j ∈ [n], there exist at least d numbers i ∈ n such that Var(wij ) ≥ n−c . Then for any x ∈ S m−1 , and for any t > 0 ′ P(kW xk2 ≤ tn−c ) ≤ (Ct)−d , where C, c′ depend on c only. Proof. Let x ∈ S n−1 . Choose a coordinate j ∈ [n] such that |xj | ≥ n−1/2 and set I = {i ∈ [n]| Var(wij ) ≥ n−c }. Condition on all entries of the matrix W , except those in the jth row and column. After this conditioning, for any i ∈ I the ith coordinate of the vector W x is a normal random variable with variance Var(wi,j )x2j ≥ n−2c−1 . Since the coordinates of this vector are conditionally independent, an elementary estimate of the Gaussian density yields for any t > 0 P(kW xk2 < tn−c−1/2 |wab , a, b ∈ [n] \ {j}) ≤ (Ct)|I| . By the assumption of the lemma, |I| ≥ d. Integration with respect to the other variables completes the proof.  The next lemma is a rough estimate of the norm of a random matrix. 8 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI Lemma 2.2. Let W be a be a skew-symmetric n × n matrix with independent, up to the symmetry restriction, normal entries. Assume that for any i, j ∈ [n], Var(wij ) ≤ 1. Then P(kW k ≥ n) ≤ e−n . P Lemma 2.2 follows from the estimate kW k2 ≤ kW k2HS = nij=1 Wij2 , where the right-hand side is the sum of squares of independent centered normal variables whose variances are uniformly bounded. Of course, the estimate in Lemma 2.2 is very rough, but we can disregard a constant power of n in this argument. Lemma 2.2 allows us to extend the lower bound on the small ball probability from a single vector to a neighborhood of a small-dimensional subspace. To formulate it precisely, recall the definition of compressible and incompressible vectors from [16, 17]. Definition 2.3. For m < n and v < 1, denote Sparse(m) = {x ∈ S n−1 : |supp(x)| ≤ m} and Comp(m, v) = {x ∈ S n−1 : ∃y ∈ Sparse(m), kx − yk2 ≤ v}; Incomp(m, v) = S n−1 \ Comp(m, v). The next lemma uses a standard net argument to derive the uniform estimate for highly compressible vectors. Lemma 2.4. Let A be an n × n matrix satisfying the conditions of Lemmas 2.1 and 2.2. Then P(∃x ∈ Comp(d/2, n−c ) : kW xk2 ≤ n−c̄ and kW k ≤ n) ≤ e−d/2 , where c̄ depends on c only. Proof. Let t > 0 be a number to be chosen later, and set ′ ε = tn−c −2 , where c′ is the constant from Lemma 2.1. Then there exists an ε-net N ⊂ Sparse(d/2) of cardinality d/2    Cn n d/2 . |N | ≤ · (3/ε) ≤ ′ d/2 tn−c −2 By Lemma 2.1 and the union bound, P(∃y ∈ N : kW yk2 ≤ tn −c′ )≤  Cn tn−c′ −2 d/2 · (Ct)d ≤ e−d/2 , HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES 9 ′′ provided that t = n−c for an appropriately chosen c′′ > 0. ′ Assume that for any y ∈ N , kW yk2 ≥ tn−c . Let x ∈ Comp(δ/2, ε) = Comp(δ/2, n−c ), and choose y ∈ N be such that kx − yk2 < 2ε. If kW k ≤ n, then ′ ′ kW xk2 ≥ kW yk2 − kW k · kx − yk2 ≥ tn−c − n · 2tn−c −2 ≥ n−c̄ .  Our next goal is to show that the small ball probability estimate propagates from strongly compressible vectors to moderately compressible ones. At this step, the assumption that the large variances graph is strongly expanding plays a crucial role. The strong expansion condition guarantees that the matrix W has enough independent entries to derive the small ball estimate for a single vector, despite the dependencies introduced by the skewsymmetric structure. The next simple lemma is instrumental in exploiting the independence that is still present. Lemma 2.5. Let T = (V, E) be a finite tree with the root r ∈ V . Assume that to any e ∈ E there corresponds a random variable Xe , and these variables are independent. Assume also that to any v ∈ V there corresponds an event Ωv , which depends only on those Xe for which v ∈ e. Suppose that for any v ∈ V and any e0 connected to v, P(Ωv |{Xe }e6=e0 ) ≤ pv for some numbers pv ≤ 1. Then  \ P v∈V \{r} Ωv  ≤ Y pv . v∈V \{r} Proof. We prove this lemma by induction on the depth of the tree. Assume first that the tree has depth 2. Then the statement of the lemma follows from the fact that the events Ωv , v ∈ V \ {r} are independent. Assume now that the statement holds for all trees of depths smaller than k > 2 and let T be a tree of depth k. Let Vr and Er be the sets of all vertices and edges connected to the root of the tree. Then the events Ωv , v ∈ V \ {r} conditioned on xe , e ∈ / Er are independent. Therefore,    Y  \   \ \ Ω p · P Ωv = EP Ωv {Xe }e∈E ≤ P v . v / r v∈V \{r} v∈V \{r} v∈Vr v∈V \(Vr ∪{r}) Note that T the vertices v ∈ V \ {r} form a forest with roots v ∈ Vr . Since the events v∈Tl Ωv are independent for different trees Tl in the forest, the statement of the lemma follows by applying the induction hypothesis to each tree.  10 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI Using Lemma 2.5 and the strong expansion property of the large variances graph, we establish the small ball probability bound for the image of an incompressible vector. Lemma 2.6. Let c > 0. Let W be an n × n skew-symmetric centered Gaussian matrix. Assume that its large variances graph ΓW (n−c ) satisfies the strong expansion condition with parameter κ > 0 up to level m < n. Let t > 0, k ≤ m, and v > 0. Then for any x ∈ Incomp(k, v), P(kW xk2 ≤ n−C v · t) ≤ t(1+κ)k , where C depends on c only. Proof. For i ∈ [n], define the event Ωi by Ωi = {W : |(W x)i | ≤ tn−(c+1)/2 vt}. Let J(x) = {j : |xj | ≥ n−1/2 v}. Since x ∈ Incomp(k, v), |J(x)| ≥ k. Indeed, let y ∈ Rn be the vector containing k largest in absolute value coordinates of x. If |J(x)| ≤ k, then  X 1/2 2 xj ≤ v. dist(x, Sparse(k)) ≤ kx − yk2 ≤ j ∈J(x) / Choose a subset J ⊂ J(x) with |J| = k. For i ∈ [n] set pi = t whenever i ∼ j for some j ∈ J ; otherwise set pi = 1. Then for any j0 ∈ J and for any i0 ∼ j0 , P(Ωi0 |Wij , (i, j) 6= (i0 , j0 )) ≤ t. Indeed, (W x)i is a normal random variable with variance at least Var(wi0 j0 ) · x2j0 ≥ n−c · n−1 v 2 , so the previous inequality follows from the bound on the maximal density. To prove Lemma 2.6, we will use Lemma 2.5. To this end, we will construct a forest consisting of L = | Con(J)| trees with |J| + |∂(J)| T vertices. Assume that such a forest is already constructed. The events i∈Tl Ωi are independent for different trees Tl , l = 1, . . . , L in the forest. Hence, P(kW xk2 ≤ tn−(c+1)/2 vt) ≤ P(|(W x)i | ≤ tn−(c+1)/2 vt for all i ∈ [n]) \  Y L L Y Ωi ≤ ≤ t|Tl |−1 = t|J|+|∂(J)|−L , P l=1 i∈Tl l=1 where we used Lemma 2.5 in the last inequality. Since by the strong expansion condition, |J| + |∂(J)| − L ≥ (1 + κ)|J|, the last quantity is less than or equal to t(1+κ)k as required. HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES 11 We proceed with the construction of the forest. At the first step, we construct a spanning tree Tel for each connected PL e component of the set J . These trees are, obviously, disjoint, and l=1 |Tl | = |J|. Now, we have to add the vertices from ∂(J) as leaves to these trees. We do this by induction on j ∈ J . (1) Let j ∈ J be the smallest number. Add all vertices i ∈ ∂(J) connected to j to the tree containing j as the descendants of j. (2) Let j ∈ J be the smallest number, which has not been used in this process. Add all vertices i ∈ ∂(J) connected to j, which have not been already added, to the tree containing j as its descendants. Since any vertex in ∂(J) is connected to some vertex in J , the whole set ∂(J) will be added at the end of this process. Denote the trees obtained in this way by T1 , . . . , TL . The construction guarantees that these trees are disjoint. This finishes the construction of the forest and the proof of the lemma.  Similarly to Lemma 2.4, we extend the small ball probability result of Lemma 2.6 to a uniform bound using a net argument. Lemma 2.7. Let W be an n × n skew-symmetric Gaussian matrix. Assume that its large variances graph ΓW (n−c ) satisfies the strong expansion condition with parameter κ ∈ (0, 1) up to level m < n. Then there exists a constant C ′ > 0 depending only on c and κ such that for any t > 0, k ≤ m and v ∈ (0, 1), ′ P(∃x ∈ Incomp(k, v) ∩ Comp((1 + κ/2)k, (n−C v)8/κ ) : ′ kW xk2 ≤ n · (n−C v)8/κ and kW k ≤ n) ≤ e−k . Proof. The proof repeats that of Lemma 2.4, so we only sketch it. For t > 0, set ε = n−C−2 vt, where C is the constant from Lemma 2.6. Choose an ε-net N in Sparse((1 + κ/2)k) ∩ Incomp(k, v) of cardinality    (1+κ/2)k  c̄ (1+κ/2)k n 3 n |N | ≤ ≤ , · (1 + κ/2)k ε vt where c̄ depends only on c and κ. By the union bound,  c̄ (1+κ/2)k n −C · t(1+κ)k P(∃x ∈ N : kW xk2 ≤ n vt and kW k ≤ n) ≤ vt ≤ t(κ/4)k ≤ e−k , 12 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI provided that t=  v enc̄ 4/κ . Using an appropriately defined C ′ > 0 depending only on c and κ, and approximation by the points of the ε-net, we derive from the previous inequality that P(∃x ∈ Incomp(k, v) ∩ Sparse((1 + κ/2)k) : ′ kW xk2 ≤ 2n · (n−C v)8/κ and kW k ≤ n) ≤ e−k . To complete the proof, notice that for any vector y ∈ Incomp(k, v)∩Comp((1+ ′ κ/2)k, (n−C v)8/κ ), there is a vector x ∈ Incomp(k, v) ∩ Sparse((1 + κ/2)k) ′ such that kx − yk2 < (n−C v)8/κ . The lemma now follows by again using approximation.  Lemmas 2.4 and 2.7 can be combined to treat all compressible vectors. In the statement, d0 is a fixed, large enough universal positive integer. Proposition 2.8. Let W be an n × n skew-symmetric Gaussian matrix. Assume that its large variances graph ΓW (n−c ) has minimal degree d ≥ d0 and satisfies the strong expansion condition with parameter κ > 0 up to the level m < n. Then there exists a constant φ(κ) depending on κ only so that, with ρ = (n/d)φ(κ) , one has P(∃x ∈ Comp((1 + κ/2)m, n−ρ ) : kW xk2 ≤ n−ρ+1 ) ≤ e−d/2 . Remark 2.9. The proof below shows that it is enough to take   c C φ(κ) = log . κ κ ′ Proof of Proposition 2.8. Set v0 = n−c , where c′ = max(c, C ′ ), and c, C ′ are the constants from Lemmas 2.4 and 2.7. Let L be the smallest natural number such that (d/2)(1 + κ/2)L ≥ m. The definition of L implies L≤ c n log(m/d) ≤ log . log(1 + κ/2) κ d HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES 13 ′ For l = 1, . . . , L − 1, define by induction vl+1 = (n−C vl )8/κ , where C ′ is the ′ constant from Lemma 2.7. The definition of v0 implies that vl ≤ n−C , so 16/κ vl+1 ≥ vl , and thus, (16/κ)L−1 vL ≥ v0 ≥n −ρ′  (c/κ)·log(C/κ) n where ρ = . d ′ We have Comp(m, vL ) ⊂ Comp((d/2)(1 + κ/2)L , vL ) ⊂ Comp(d/2, v0 ) ∪ L [ l=1 Comp((d/2)(1 + κ/2)l , vl ) \ Comp((d/2)(1 + κ/2)l−1 , vl−1 ). Lemmas 2.4 and 2.7 combined with the union bound imply ′ ′ P(∃x ∈ Comp(m, n−ρ ) : kW xk2 ≤ n−ρ +1 and kW k ≤ n) ≤ e−d/2 . Applying Lemma 2.7 once more, we derive the estimate P(∃x ∈ Comp((1 + κ/2)m, n−ρ ) : kW xk2 ≤ n−ρ+1 and kW k ≤ n) ≤ e−d/2 with ρ = (ρ′ )16/κ . The proposition follows from the previous inequality and Lemma 2.2.  3. The smallest singular value. The main result of this section is the following lower bound for the smallest singular value of a Gaussian skewsymmetric matrix with a strongly expanding large variances graph. Theorem 3.1. Let n ∈ N be an even number. Let V be an n × n skewsymmetric matrix, and denote by Γ its large variances graph ΓV (n−c ). Assume that: (1) Var(vi,j ) ≤ 1 for all i, j ∈ [n]; (2) the minimal degree of a vertex of Γ is at least d ≥ 2 log n; (3) Γ is κ-strongly expanding up to level n−d+2 1+κ/4 . Then P(sn (V ) ≤ tn−τ ) ≤ nt + e−cd , where τ = (n/d)ψ(κ) for some positive ψ(κ). 14 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI Remark 3.2. Tracing the proof of Theorem 3.1 and using Remark 2.9, one can show that it is enough to take   C C′ log . ψ(κ) = κ κ Proof of Theorem 3.1. To prove the theorem, we use the negative second moment identity. Let A be an n × n matrix with columns A1 , . . . , An . For j ∈ [n], let hj ∈ S n−1 be a vector orthogonal to all columns of A, except the jth one. Then kA−1 k2HS = n X (hTj Aj )−2 . j=1 Hence, sn (A) = 1 1 ≥ ≥ n−1/2 · min |hTj Aj |. −1 −1 kA k kA kHS j∈[n] Let ρ be as in Proposition 2.8. The argument above shows that if we use the matrix V in place of A and define the unit vectors hj , j ∈ [n] as before, then the theorem would follow if the inequalities P(|hTj Vj | ≤ tn−ρ+c ) ≤ t + e−cd (3.1) hold for all j ∈ [n]. Indeed, the theorem follows from (3.1) and the assumption on d by the union bound. We will establish inequality (3.1) for j = 1. The other cases are proved in the same way. Let W be the (n − 1) × (n − 1) block of V consisting of rows and columns from 2 to n. The matrix W is skew-symmetric, and its large variances graph is the subgraph of Γ containing vertices 2, . . . , n. Therefore, Γ has properties (1), (2), (3) with slightly relaxed parameters. Indeed, property (1) remains unchanged. Property (2) is valid with d replaced by d − 1. Property (3) is satisfied with parameter κ/2 in place of κ since for any J ⊂ Γ \ {1}, the boundary of J in Γ and in Γ \ {1} differs by at most one vertex. Recall that W is a skew-symmetric matrix of an odd size. This matrix is degenerate, so there exists u ∈ S n−2 such that W u = 0. This allows us to define the vector h ∈ S n−1 orthogonal to the columns V2 , . . . , Vn of the matrix V by   0 h= . u Define the event Ω by Ω = {W : ∃u ∈ Comp(n − d + 1, n−ρ ), W u = 0}. HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES The graph ΓW (n−c ) \ {1} is (κ/4) strongly expanding up to level n−d+1 1+κ/4 . 15 By Ω∁ . e−d/2 . Proposition 2.8, P(Ω) ≤ Condition on the matrix W ∈ After the −ρ conditioning, we may assume that u ∈ Incomp(n − d + 1, n ), and so the set J = {j : |uj | ≥ n−ρ−1/2 } has at least n − d + 1 elements. Since the degree of the vertex {1} in the large variances graph of V is at least d, this means that there exists a j ∈ J for which Var(vj1 ) ≥ n−c . Therefore, conditionally P on W , hT V1 = nj=2 uj vj is a normal random variable with variance Var(hT V1 ) = n X j=2 u2j · Var(vj ) ≥ n−2ρ−1 · n−c . The bound on the density of a normal random variable implies P(|hT V1 | ≤ Cn−ρ−c/2−1/2 t|W ∈ Ω∁ ) ≤ t. Finally, P(|hT V1 | ≤ Cn−ρ−c/2−1/2 t) ≤ P(|hT V1 | ≤ Cn−ρ−c/2−1/2 t|W ∈ Ω∁ ) + P(W ∈ Ω) ≤ t + e−d/2 . This completes the proof of (3.1) for j = 1. Since the proof for the other values of j is the same, it proves Theorem 3.1.  An immediate corollary of Theorem 3.1 is the following. Corollary 3.3. satisfies: Let A be the adjacency matrix of a graph Γ which (1) the minimal degree of a vertex of Γ is at least d > 2 log n; (2) Γ is κ-strongly expanding up to level n−d+2 1+κ/4 . Then A possesses a unique doubly stochastic scaling B = DAD and the graph Γ possesses a perfect matching. Proof. Proof We begin by showing that a perfect matching in Γ exists. Assume otherwise. Then sn (A ⊙ G) = 0 since E det(A ⊙ G) = haf(A) = 0. The latter equality contradicts Theorem 3.1. To show that A possesses a doubly stochastic scaling, choose an edge e = (u, v) in Γ and create a graph Γ′ by erasing u, v, and all edges attached to them from Γ. The graph Γ′ satisfies assumptions (1) and (2) in the statement, with slightly smaller constants κ, d. Thus, Γ′ possesses a perfect matching. This implies that for any edge in Γ there exists a perfect matching containing that edge. By Bregman’s theorem ([6], Theorem 1), this implies 16 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI that A possesses a unique doubly stochastic scaling B = D1 AD2 . The fact that D1 = D2 follows from the strict convexity of relative entropy and the characterization of the doubly stochastic scaling as its minimizer; see [6], equation (7).  4. Local bound on eigenvalues density. In this section, we prove a general bound on the crowding of eigenvalues at 0 for a class of Hermitian matrices whose variance matrix is doubly-stochastic. The results are somewhat more general than our needs in the rest of the paper and may be of independent interest and, therefore, we introduce new notation. ∗ = X ), Let X denote an n × n matrix, Hermitian (in the sense that Xij ji with entries {Xij }i≤j that are independent zero mean random variables. (In our application, the Xij variables are all Gaussian.) Following [7], we set √ sij = E|Xij |2 and ζij = Xij / sij (with ζij = 0 if sij = 0). We assume that the variables ζij possess uniformly bounded p moments for all p > 0. Finally, we denote the eigenvalues of the matrix X by λ1 (n) ≥ λ2 (n) ≥ · · · ≥ λn (n), Pn and use Ln = n−1 P δ for the empirical measure of eigenvalues. λ (n) i=1 i We assume that s = 1, and, to avoid trivialities, that the matrix j ij S = {sij } is irreducible (otherwise, the matrix X can be decomposed in blocks due to the symmetry). Let M = (maxij sij )−1 . We assume the following. Assumption 4.1. For some ϑ ∈ (0, 1], one has that M ≥ nϑ . With Assumption 4.1, we have the following proposition. Proposition 4.2. With notation and assumptions as in the setup above, fix ǫ < 1/5. If Assumption 4.1 holds then for every D > 0 there exists n0 = n0 (ǫ, D) such that for any n > n0 , and with N (η) = |{i : λi (n) ∈ (−η, η)}|, one has (4.1) P(∃η ≥ M −ǫ : N (η) > Cn · η) ≤ n−D . Proof. We will use [7], Theorem 2.3, a simplified form of which we quote below after introducing some notation. Following the notation in [7], we let √ m(z) denote the Stieltjes transform of the semicircle law, m(z) = (−z + z 2 − 4)/2, and set Γ(z) = k(1 − m(z)2 S)−1 kℓ∞ →ℓ∞ . HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES 17 Note that with z = iη one has by equation (A.1) of [7], that for some universal constant C, C log n (4.2) . Γ(iη) ≤ η Introduce now, similarly to equation (2.14) of [7] for a parameter γ > 0,    M −γ M −2γ 1 ≤ min , η̃ = min u > 0 : , Mu Γ(iη ′ )3 Γ(iη ′ )4 · ℑ(m(iη ′ ))  ′ for all η ∈ [u, 10] . e N (z) as in [7] since we only need the relation (Note that we do not use Γ p e Γ ≥ ΓN .) Note that ℑ(m(iη ′ )) = ( 4 + η ′2 − η ′ )/2 is bounded above and below by a universal constant for η ′ ∈ [0, 10]. Hence, using (4.2), we get that (4.3) η̃ ≤ C(M 2γ−1 (log n)4 )1/5 := η̄, for some universal constant C. For given ε < 1/5, we will chose γ ∈ (0, 1/2) and n0 = n0 (ε, D) so that P η̄ ≤ M −ε whenever n > n0 . n 1 −1 Denote by mn (z) = n i=1 λi −z the Stieltjes transform of the empirical measure of eigenvalues of X. We have the following. Theorem 4.3 ([7], Theorem 2.3). For any γ ∈ (0, 1/2), any ǫ′ > 0 and any D > 0 there exists an n0 = n0 (D, γ, ǫ′ ) so that, uniformly in η ∈ [η̃, 10], and for all n > n0 ,  ′  nǫ (4.4) ≤ n−D . P |mn (iη) − m(iη)| > Mη Fix η ≥ η̄. Let A denote the complement of the event in (4.4). Assume that A occurs. Using the uniform boundedness of m(iη) and inequality (4.3), we obtain ′ ′ nǫ nǫ ℑmn (iη) ≤ C + ≤C +C . Mη M · (M 2γ−1 (log n)4 )1/5 Choosing γ and ǫ′ small enough, we can guarantee that the right-hand side in the last display is uniformly bounded in n. With such choice, Z η Z 1 1 η dL (λ) ≥ dLn (λ) = Ln ([−η, η]) C≥ n 2 2 λ +η 2η −η 2η provided that A occurs. This means that P(N (η) > Cn · η) ≤ n−D . To derive (4.1) from the previous inequality, one can use the union bound over η = 1/k with k ∈ N, M ε ≥ k ≥ 1.  18 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI A better estimate can be obtained if one assumes a spectral gap. First, we have the following. Lemma 4.4. value at −1. S has exactly one eigenvalue at +1 and at most one eigen- Proof. The claim concerning the eigenvalue at 1 is the Perron–Frobenius theorem. To check the claim on the eigenvalues at −1, consider S 2 . It may be reducible, but at most to 2 blocks. Indeed, suppose there are 3 disjoint blocks A1 , A2 , A3 , that is, disjoint subsets Ai of [N ], i = 1, 2, 3, so that for all 2 = 0. By the irreducibility of S, there a ∈ Ai , b ∈ Aj with i 6= j one has Sa,b is a path of odd length connecting A1 and A2 , and similarly there is a path of odd length connecting A2 and A3 . Hence, there is a path of even length connecting A1 and A3 , in contradiction with the block disjointness of S 2 . The claim now follows by applying the Perron–Frobenius theorem to each of the blocks of S 2 .  By Lemma 4.4, if S has a spectral gap then the eigenvalues at 1 and −1 (if the later exists) are unique and isolated. Proposition 4.5. With notation and assumptions as in the setup above, fix ǫ < 1. If Assumption 4.1 holds and S possesses a spectral gap δ then for every D > 0 there exists n0 = n0 (ǫ, D, δ) such that for any n > n0 , with N (η) = |{i : λi (n) ∈ (−η, η)}|, one has (4.5) P(∃η ≥ M −ǫ : N (η) > n · η) ≤ n−D . The proof is identical to that of Proposition 4.2, using [1], Theorem 1.1, instead of [7], Theorem 1.2. We omit the details. 5. Concentration of the hafnian of a random matrix. In this section, we prove Theorems 1.9 and 1.10. Both results follow from the concentration of the Gaussian measure for Lipschitz functions. To this end, we consider a Gaussian vector G = (Gij )1≤i<j≤n ∈ Rn(n−1)/2 and use it to form the skewsymmetric matrix Gskew . However, the function F (G) = log det(B ⊙ Gskew ) √ (where Bij = B ij ) is not Lipschitz. To overcome this obstacle, we write skew log det(B ⊙ G )= n X j=1 log sj (B ⊙ Gskew ) and use Theorem 3.1 and Proposition 4.2 to obtain lower bounds on the singular values which are valid with probability close to 1. On this event, we HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES 19 replace the function log by its truncated version, which makes it Lipschitz with a controlled Lipschitz constant. Then an application of the Gaussian concentration inequality yields the concentration of the new truncated function about its expectation. This expectation is close to E log det(B ⊙ Gskew ). Recall that instead of the concentration about this value, we want to establish the concentration about log haf(B) = log E det(B ⊙ Gskew ). In other words, we have to swap the expectation and the logarithm and estimate the error incurred in this process. This will be achieved due to the fast decay of the tail in the concentration inequality. Proof of Theorem 1.9. The proof proceeds as in [18], Section 7. (The argument can be traced back to [8].) Without loss of generality, we may assume that n > n0 , where n0 = n0 (ε, D) appears in Proposition 4.2. Indeed, if n ≤ n0 , we can choose the constant C in the formulation of the theorem appropriately large, so that Cn01−εϑ ≥ n0 . In this case, Theorem 1.9 follows from Barvinok’s theorem. Fix ǫ < 1/5, D > 4 as in the statement of the theorem, and t = n−(D+1) . With τ = τ (κ, α) as in Theorem 3.1 (with X replaced by W ) and N (η) = N (η)(W ) as in Proposition 4.2, introduce the events W1 = {sn (W ) ≤ tn−τ }, W2 = {N (n−εϑ ) ≥ n1−ǫϑ }, W = W1 ∪ W2 . By Theorem 3.1 and Proposition 4.2, we have that for all n > n0 , P(W) ≤ 3n−D . (5.1) Q f Let det(W ) = i (|λi (W )| ∨ n−ǫϑ ). Note that on W ∁ we have that f |log det(W ) − log det(W )| ≤ C(D)n1−ǫϑ log n. (5.2) f f Set U = log det(W ) − E log det(W ). We next derive concentration results N f for U . The map (λi (W ))i=1 → log det(W ) is Lipschitz with constant n1/2+ǫϑ . Therefore, by standard concentration for the Gaussian distribution (see [10, 13]), using that the variance of the entries of W is bounded above by n−ϑ , we have for some universal constant C and any u > 0, f f P(|U | > u) = P(|log det(W ) − E log det(W )| > u)   Cu2 ≤ exp − 1+(2ǫ−1)ϑ . n (5.3) Therefore, (5.4) |U | E(e )≤1+ Z 0 ∞  exp u − Cu2 n1+(2ǫ−1)ϑ  du ≤ exp(n1+(2ǫ−1)ϑ ). 20 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI In particular, we obtain that (5.5) f ≤ log EdetW f ≤ E log detW f + n1+(2ǫ−1)ϑ . E log detW The first inequality above follows from Jensen’s inequality, and the second one from (5.4). We can now complete the proof of the theorem. We have by Markov’s inequality that (5.6) P(log det(W ) − log E det(W ) > n1−ǫϑ log n) ≤ e−n 1−ǫϑ log n . f On the other hand, note that E det(W ) ≤ Edet(W ). Therefore, with C(D) as in (5.2), P(log det(W ) − log E det(W ) ≤ −(C(D) + 2)n1−ǫϑ log n) f ≤ P(log det(W ) − log Edet(W ) ≤ −(C(D) + 2)n1−ǫϑ log n) f f ≤ P(log det(W ) − log Edet(W ) ≤ −2n1−ǫϑ log n) + P (W ∁ ), where (5.2) was used in the last display. Using now (5.1) and the upper bound in (5.5), we get P(log det(W ) − log E det(W ) ≤ −(C(D) + 2)n1−ǫϑ log n) f f ≤ 3n−D + P(log det(W ) − E log det(W ) ≤ −2n1−ǫϑ log n + n1+(2ǫ−1)ϑ ). Using that ǫ < 1/5 and applying (5.3), we conclude that P(log det(W ) − log E det(W ) ≤ −(C(D) + 2)n1−ǫϑ log n) ≤ 4n−D . Together with (5.6), it yields P(|log det(W ) − log E det(W )| ≤ (C(D) + 2)n1−ǫϑ log n) ≤ 5n−D . To obtain the statement of the theorem, we prove the previous inequality with ε′ ∈ (ε, 1/5) instead of ε, and then choose C ′ > 0 such that (C(D) + ′ 2)n1−εϑ log n ≤ C ′ n1−ε ϑ .  The proof of Theorem 1.10 is similar to that of Theorem 1.9. However, to exploit the tighter bounds on the intermediate singular values provided by Proposition 4.5, we use a different truncation, redefining the function f log det(·) and estimate its Lipschitz constant more accurately. Proof of Theorem 1.10. Fix ε ∈ (1/2, 1). As in the proof of Theorem 1.9, we may assume that n > n0 (ε, D, δ), where n0 (ε, D, δ) was introduced in Proposition 4.5. The inequality (4.5) can be rewritten as   k 1−εϑ (5.7) ≤ n−D . P ∃k ≥ n : sn−k (W ) ≤ c n HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES 21 This inequality can be used to bound the Lipschitz constant of the truncated logarithm. Let m0 ≥ n1−εϑ (5.8) be a number to be chosen later. Define (5.9) where c log det(W )= n X φk (sn−k (W )) = n X k=1 k=1  m 0  , c n εk =  ck , n log(sn−k (W ) ∨ εk ), for k < m0 , for k ≥ m0 . Denote for a moment N = n(n − 1)/2. For a vector Y ∈ RN consider the n × n skew symmetric matrix Y skew whose entries above the main diagonal equal to the corresponding entries of Y . Let B be the n × n matrix whose entries are square roots of the corresponding entries of B. Note that the function F : RN → R defined by c ⊙ Gskew ) F (G) = log det(B is the composition of three functions: F = F3 ◦ F2 ◦ F1 , where: 2 (1) F1 : RN → Rn , F1 (G) = B ⊙ Gskew , whose Lipschitz constant does not exceed n−ϑ/2 ; 2 (2) F : Rn → Rn+ defined by F (W ) = (s1 (W ), . . . , sn (W )), which is 1Lipschitz; P (3) F3 : Rn+ → R, F3 (x1 , . . . , xn ) = nk=1 φk (xn−k ), where φk is defined in (5.9). By the Cauchy–Schwarz inequality, !1/2   n X  n 2 1/2 X n 2 2 · m0 + kF3 kLip ≤ ≤ kφk kLip cm0 ck k>m0 k=1 n ≤C√ . m0 Therefore, n1−ϑ/2 kF kLip ≤ C √ . m0 22 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI Applying the standard Gaussian concentration for Lipschitz functions, we obtain   u2 c c P(|log det(W ) − E log det(W )| ≥ u) ≤ 2 exp − 2kF k2Lip (5.10) ≤ 2 exp(−cm0 nϑ−2 u2 ) which replaces formula (5.8) in the proof of Theorem 1.9. Arguing as in the proof of that theorem, we obtain (5.11) c c c E log det(W ) ≤ log Edet(W ) ≤ E log det(W ) + C0 n2−ϑ m0 from the inequality above. Let C ′ = D + τ (κ, α), where τ (κ, α) is as in Theorem 3.1. Set   k −C ′ 1−εϑ W1 = {sn (W ) ≤ n }, W2 = ∃k ≥ n , sn−k (W ) ≤ c , n and let W = W1 ∪ W2 . Then Theorem 3.1 and (5.7) imply P(W) ≤ n−D . On W ∁ we have c (5.12) |log det(W ) − log det(W )| ≤ Cm0 log n, which plays the role of (5.7). Arguing as in the proof of Theorem 1.9, we show that    n2−ϑ P log det(W ) − log E det(W ) ≤ − Cm0 log n + 2C0 m0   n2−ϑ c c ≤ P log det(W ) − log Edet(W ) ≤ −2C0 + P(W) m0   n2−ϑ c c + P(W) ≤ P log det(W ) − E log det(W ) ≤ −C0 m0   2−ϑ ′n ≤ exp −C + n−D ≤ 2n−D . m0 c Here, the first inequality follows from (5.12) and log E det(W ) ≤ log Edet(W ), the second one from the upper bound in (5.11), and the third one from (5.10). We select the optimal m0 = Cn1−ϑ/2 log−1/2 n in the inequality above. Since ε > 1/2, condition (5.8) holds for sufficiently large n. P(log det(W ) − log E det(W ) ≤ −Cn1−ϑ/2 log1/2 n) ≤ 2n−D . Combining this with the bound P(log det(W ) − log E det(W ) ≥ Cn1−ϑ/2 log1/2 n) ≤ n−D following from Markov’s inequality, we complete the proof.  HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES 23 6. Doubly stochastic scaling and proof of Theorem 1.5. To prove Theorem 1.5, we have to scale the adjacency matrix of the graph in order to apply Theorems 1.9 and 1.10. The existence of such scaling has been already established in Corollary 3.3. We will show now that the smallest nonzero entry of the scaled adjacency matrix is at least polynomial in n. This crucial step in the proof of Theorem 1.5 allows us to conclude that the large entries graph of the scaled matrix coincides with the original graph. Proposition 6.1. Fix α, κ > 0. Let A be the adjacency matrix of a graph Γ whose minimal degree satisfies d ≥ αn + 2. Assume that (6.1) Γ is κ strongly expanding up to level n(1 − α)/(1 + κ/4). Then there exists a constant ν so that A possesses a doubly stochastic scaling B = DAD with min Dii ≥ n−ν . i In particular, under the assumptions of Proposition 6.1, we have that (6.2) Bij ≥ n−2ν whenever Bij > 0. Before describing the proof of Proposition 6.1, let us state a complementary claim, which says that under stronger expansion conditions on Γ we can guarantee that the entries in its scaled adjacency matrix are polynomially small. This ensures that under this stronger expansion property, condition (1.8) in Theorem 1.5 is automatically satisfied. In what follows, if X is a set of vertices in a graph then E(X, X) denotes those edges in the graph connecting vertices in X. Proposition 6.2. Fix α, κ, ε > 0. There exists a constant θ depending only on α and κ such that the following holds. Let A be the adjacency matrix of a graph Γ whose minimal degree satisfies d ≥ αn + 2. Assume that for any subset X of vertices satisfying |X| ≥ d4 and |E(X, X)| ≤ θ · n1+ε , it holds that |∂s X| ≥ (1 + κ) · |X|, where ∂s X denotes the set of external neighbors of X such that any y ∈ ∂s X has at least d|X| 10n neighbors in X. Then A possesses a doubly stochastic scaling B = DAD with max Dii ≤ n−ε/2 . i 24 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI In particular, under the assumptions of Proposition 6.2, we have that (6.3) Bij ≤ n−ε whenever Bij > 0. To prove Proposition 6.1, we argue by contradiction. Assume that one of the diagonal entries, say D11 , is smaller than n−ν , where ν = ν(α, κ) will be chosen at the end of the proof. The double stochasticity of the scaled matrix implies that there exists a neighbor i ∼ 1 for which the corresponding entry of the scaling matrix D is large. In fact, we can prove this for more than one entry. In Lemma 6.5, we construct a set X = X0 of vertices of cardinality at least d/2 such that the corresponding entries of the scaling matrix are greater than (1/2)nν−2 . We use this as a base of induction. In Lemma 6.6, we show that there exists a set X1 of vertices of cardinality |X1 | ≥ (1 + β)|X0 | containing X1 such that all entries of the scaling matrix corresponding to X1 are still polynomially large. Proceeding by induction, we construct an increasing sequence of sets X0 ⊂ X1 ⊂ · · · ⊂ Xl such that |Xl | ≥ (1 + β)l |X0 |, and all diagonal entries corresponding to the vertices of Xl are greater than 1. The number of induction steps l which we are able to perform will depend on ν. If ν is chosen large enough, then we will get (1 + β)l |X0 | > n, reaching the desired contradiction. The proof of Proposition 6.2 is very similar. Assume, toward contradiction, that, say, Dnn is larger than n−ε/2 . By the double stochasticity of the scaled matrix, there exists a set A of neighbors i ∼ n, for which the corresponding entries of the scaling matrix D are small. Using again the double stochasticity of the scaled matrix produces a set X = X0 of vertices of cardinality at least d/4 such that the corresponding entries of the scaling matrix are greater than (α/8)n−ε/2 . We use this as induction base. In Lemma 6.7, we show that there exists a set X1 of vertices of cardinality |X1 | ≥ (1+ γ)|X0 | containing X1 such that all entries of the scaling matrix corresponding to X1 are still large. Proceeding by induction, we construct an increasing sequence of sets X0 ⊂ X1 ⊂ · · · ⊂ Xl such that |Xl | ≥ (1 + γ)l |X0 |, and all diagonal entries corresponding to the vertices of Xl are greater than Ω(n−ε/2 ). The number of induction steps l which we are able to perform will depend on θ. If θ = θ(α, κ) is chosen large enough, then we will get (1 + γ)l |X0 | > n, reaching contradiction. Proof of Proposition 6.1. Without loss of generality, we assume throughout that the constants α and κ are small enough so that (6.4) (1 − α)/(1 − κ/4) > 1/2. By Corollary 3.3, A possesses a doubly stochastic scaling B = DAD, where D = Diag(r1 , . . . , rn ). Without loss of generality, we assume that r1 ≤ HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES 25 r2 ≤ · · · ≤ rn . Note that since B is doubly stochastic, X −1 rj (6.5) . ri = j∼i We will need a few simple lemmas. P Lemma 6.3. Let s1 , . . . , sn ∈ [0, 1] and assume that ni=1 si ≥ S. Then, for any 0 < γ < 1, there exists a subset I ⊆ [n] of cardinality at least (1 − γ) · S, si ≥ γ · S/n for each i ∈ I. Proof. Assume otherwise. Then there are at least n − (1 − γ)S elements si < γ · (S/n). Therefore, n X i=1 si ≤ (1 − γ)S + (n − (1 − γ)S) · γ S < S. n  The next lemma quantifies the following intuition: given a large set A of indices corresponding to small entries of the scaling matrix, we can find a large set of indices (neighbors of A) corresponding to large entries of the scaling matrix. Lemma 6.4. Let A ⊆ [n] such that ri ≤ µ for all i ∈ A. Then, for any 0 < γ < 1, there exists a subset X ⊆ [n], of cardinality at least (1 − γ) · |A|, such that for all j ∈ X, γ rj ≥ . µn Proof. Denote by B = (bij ) the doubly stochastic scaling of A. P PFor 1 ≤ i ≤ n, let si = j∈A bij . By the double-stochasticity of B, we have ni=1 si = P Pn i=1 bij = |A|. j∈A By Lemma 6.3, there is a set X of indices with |X| ≥ (1 − γ) · |A| with si ≥ γ · |A| n for each i ∈ X. Let i ∈ X. We have ri = P si j∈A,j∼i rj ≥γ· γ |A|/n = . |A| · µ µn  The next lemma is the base of our inductive construction. Lemma 6.5. Let Q = 1/r1 . Then there exists a subset X of [n] of cardinality at least d/2 such that for each i ∈ X, ri ≥ Q . 2n2 26 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI P Proof. By (6.5), i∼1 ri = 1/r1 = Q. Therefore, there is at least one index i0 ∼ 1 for which ri0 ≥ Q/n. Let A be the set of neighbors of i0 . Then |A| ≥ d and for all j ∈ A, rj ≤ n/Q. The proof is completed by an application of Lemma 6.4 with γ = 1/2.  Lemma 6.6 below will be used for the inductive step. Lemma 6.6. Let m ≥ n. Let X be a subset of indices such that ri ≥ m for each i ∈ X. Then: (1) |∂X| ≥ (1 + κ) · |X|; (2) there exists a subset Z of indices, disjoint from X, of cardinality at least (κ · |X| − 1)/2 such that each j ∈ Z satisfies rj ≥ κ|X| − 1 · m. 2n2 Proof. Clearly, no two vertices in X are connected in Γ (otherwise, we would have an entry of size at least m2 > 1 after scaling). Therefore, X is a set of disconnected vertices, and, since Γ contains a perfect matching, we have |X| ≤ n/2. Since X is disconnected, (6.1) and (6.4) imply that |∂X| ≥ (1 + κ) · |X|, proving the first claim of the lemma. Let Y := ∂X. We note that ri ≤ 1/m for any i ∈ Y . To show the second claim of the lemma, we will find a subset Z of indices, disjoint with X ∪ Y , such that ri ≥ κ|X|−1 · m for all i ∈ Z. 2n2 ∁ Let C = (X ∪ Y ) . Recall that B is the doubly stochastic scaling of A. Since X X XX bij = bij = |Y |, i∈C∪X∪Y j∈Y we have X i∈C,j∈Y bij = |Y | − i j∈Y X i∈X,j∈Y ≥ (|Y | − |X|) − ≥ (|Y | − |X|) − ≥ κ · |X| − 1, bij − i∈Y,j∈Y X i∈Y,j∈Y n2 m2 X bij bij HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES 27 where in the second inequality we used P Pthat ri ≤ 1/m for i ∈ Y . For i ∈ C, set si = j∈Y bij . Then i∈C si ≥ κ · |X| − 1. By Lemma 6.3, there is a set of at least (κ · |X| − 1)/2 indices i, for which si ≥ κ|X| − 1 κ|X| − 1 ≥ . 2|Y | 2n Call this set Z. For each i ∈ Z, we have ri = P si j∈Y,j∼i rj ≥ (κ|X| − 1)/(2n) κ|X| − 1 ≥ · m, |Y |/m 2n2 completing the proof of the lemma.  We are now ready to perform the inductive procedure proving Proposition 6.1. Let  c/(κ log(1/α)) 4 R= , ·n κα for a sufficiently large c. We will assume that r1 < 1/R, and reach a contradiction. We use Lemma 6.5 to construct a set X of cardinality at least d/2 such that ri ≥ R/(2n2 ). for all i ∈ X. Assuming m := R/(2n2 ) ≥ n, which we may, we can now apply Lemma 6.6 to construct a set Z disjoint from X, of cardinality at least (κ · |X| − 1)/2 such that rj ≥ κ|X| − 1 κα ·m≥ ·m 2 2n 4n for all j ∈ Z. We now define X0 := X, m0 := m, Z0 := Z; and set X1 = X0 ∪ Z0 , m1 = · m0 , and apply Lemma 6.6 to X1 (assuming m1 is not too small). We continue this process to obtain an increasing sequence of sets X0 , X2 , . . . , Xt . Since α n ≥ |Xt | ≥ (1 + κ/2) · |Xt−1 | ≥ · · · ≥ (1 + κ/2)t · X0 ≥ (1 + κ/2)t · · n, 2 κα 4n the number of steps t is upper bounded by c1 · κ log 1/α, for some absolute constant c1 . On the other hand, if c in the definition of R is large enough, the number of steps will be larger than that, reaching a contradiction.  Proof of Proposition 6.2. Assume, for contradiction’s sake, that P −ε/2 rn ≥ n . Since i∼n ri = 1/rn ≤ nε/2 , for at least half of neighbors of n holds ri ≤ 2 · nε/2−1 . Let A be the set of these neighbors. By our assumption on the minimal degree in Γ, we have |A| ≥ d2 . 28 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI Applying Lemma 6.4 to A with γ = 1/2 and µ = 2 · nε/2−1 gives a subset X0 of [n] of cardinality at least d4 such that for all i ∈ X0 holds ri ≥ α/8 · n−ε/2 . This is our induction base. An inductive step is provided by the following lemma. √ Lemma 6.7. Fix a constant b ≥ 1/ θ. Let X ⊆ [n] be such that |X| ≥ α −ε/2 . Then there exists a subset X ′ of [n] 4 · n and for any i ∈ X, ri ≥ b · n of cardinality at least (1 + 2 rj ≥ α80κb · n−ε/2 . Proof. Since n ≥ P κ(1−κ) ) · |X| 2 i,j∈X such that for all j ∈ X ′ it holds that dij ≥ |E(X, X)| · b2 n−ε , we have |E(X, X)| ≤ b−2 · n1+ε ≤ θ · n1+ε . Hence, by our assumptions on the graph Γ, we have |∂s X| ≥ (1 + κ) · |X|. For each j ∈ ∂s X holds 1 1 40 ≤ rj ≤ P ≤ 2 · nε/2−1 . −ε/2 bα (α/10) · |X| · bn i∈X,i∼j ri 40 ε/2−1 to A = ∂ X, Applying Lemma 6.4 with γ = κ/2 and µ = bα 2 · n s produces a set X ′ satisfying the requirements of the lemma.  We now ready to perform the inductive procedure proving Proposition 6.2. Let   c/(α2 κ) 1 4 R= · log , κ α for a sufficiently large c. We will assume that θ > 1/R, and reach a contradiction. We start constructing the sequence {Xi }, starting from the set X0 constructed above, and applying Lemma 6.7 iteratively. Clearly, we should stop after at most S = log1+(κ(1−κ)/2) ( α4 ) steps. However, if c in the definition of R is large enough, we would be able to make more steps than that, reaching a contradiction.  We now combine the bound (6.4) on the scaled matrix with Theorems 1.9 and 1.10 to derive Theorem 1.5. Proof of Theorem 1.5. Recall that B = DAD denotes the doubly stochastic scaling of A and Gskew denotes a skew symmetric matrix with independent N (0, 1) entries above the main diagonal. Note that det(A ⊙ Gskew ) = 1 det(B1/2 ⊙ Gskew ), det(D) HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES 29 where B1/2 denotes the matrix whose entries are the square roots of the entries of B. Therefore, it is enough to consider the concentration for det(B1/2 ⊙ Gskew ). The proof of Theorem 1.5 now follows by applying Theorems 1.9 and 1.10.  7. The strong expansion condition. As noted in the Introduction, the strong expansion condition is stronger than the classical vertex expansion condition ∀J ⊂ [M ] |J| ≤ M/2 ⇒ |∂(J)| ≥ κ|J|. It might have been desirable to replace the strong expansion property by a weaker and more natural classical vertex expansion condition. Proposition 1.7 from the Introduction shows that not only the latter condition is insufficient to guarantee a subexponential error in Barvinok’s estimator, but in fact there is an example of a graph G with associated random matrix W that barely misses the strong expansion property, for which Barvinok’s estimator yields an exponential error with high probability. We provide here the proof of Proposition 1.7. Proof of Proposition 1.7. Without loss of generality, assume that δ < 1/6. Let n ∈ N. Set m = ⌊ δn 2 ⌋. Define a graph Γ with M = 2(m + n) vertices as follows. • The vertices in [n] form a clique, which will be called the center. • Any of the vertices in [n + 1 : 2(n + m)], called peripheral, is connected to all vertices of the center. • In addition, for k > n, the vertices 2k − 1 and 2k are connected to each other. (See Figure 1.) The adjacency matrix of Γ has the block shape  Qn×n 1n×n 1n×2m  1n×n 0 0n×2m n×n   ∆  ..  12m×n . 02m×n  ∆   .   Here, Qn×n is the adjacency matrix of the n-clique, that is, the matrix with 0 on the main diagonal and 1 everywhere else; 1k×l is the k × l matrix whose entries are equal to 1, and ∆ is a 2 × 2 matrix   0 1 ∆= . 1 0 The right lower block of Γ contains m such matrices ∆ on the main diagonal. 30 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI Fig. 1. Graph Γ. The matrix WΓ has the similar form  e n×n Q Gn×n  −Gn×n 0n×n   WΓ =    −G′ 2m×n 02m×n f1 ∆  G′ n×2m 0n×2m .. . em ∆    ,   e n×n is the n × n skew-symmetric Gaussian matrix; Gn×n , G′ n×2m where Q are independent Gaussian matrices, and   0 gk e ∆k = −gk 0 with independent N (0, 1) random variables g1 , . . . , gm . Recall that E det WΓ = # Matchings(Γ) the number of perfect matchings of the graph Γ. Any vertex from [n + 1 : 2n] has to be matched to a vertex from the center, which can be done in n! ways. Hence, for k > n, any vertex 2k − 1 has to be matched to its peripheral neighbor 2k, which can be done in the unique way. Thus, # Matchings(Γ) = n! > 0. HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES 31 Consider det WΓ . Let c > 0 be a constant to be chosen later. A simple pigeonhole argument shows that ′ det WΓ = F (Gn×n , G n×2m ) · m Y gj2 , j=1 where F (Gn×n , G′ n×2m ) is a homogeneous polynomial of degree 2n of entries of Gn×n and G′ n×2m . Hence, for α = 4δ + 1, we have     det(WΓ ) det(WΓ ) −cM ≥e ≥ exp(−cαm) P =P E det(WΓ ) E det(WΓ )   F (Gn×n , G′ n×2m ) ≤P ≥ exp(cαm) EF (Gn×n , G′ n×2m )   Qm 2 j=1 gj Q +P 2 ≥ exp(−2cαm) . E m j=1 gj The first term above is smaller than exp(−cαm) by the Chebyshev inequality. The second term also does not exceed exp(−c′ m) if the constant c is chosen small enough. This proves the part of the proposition related to the error of the Barvinok estimator. It remains to check that condition (1.11) is satisfied. Let J ⊂ [M ] be a set of cardinality |J| ≤ M/2. If J contains a vertex from the center, then | Con(J)| = 1 and ∂(J) = [M ] \ J , so condition (1.11) holds. Assume that J ∩ [n] = ∅. Then | Con(J)| ≤ m + n = M/2. Also, ∂(J) ⊃ [n], so |∂(J)| ≥ n ≥ M 1 · . 1 + δ/2 2 Therefore, since δ < 1/6, |∂(J)| − (1 − δ)|Con(J)| ≥   M δ M 1 − (1 − δ) · ≥ · ≥ κ · |J| 1 + δ/2 2 8 2 if we choose κ = δ/8. This completes the proof of the proposition.  Acknowledgment. We thank Alexander Barvinok for many helpful discussions. REFERENCES [1] Ajanki, O., Erdős, L. and Krüger, T. (2014). Local semicircle law with imprimitive variance matrix. Electron. Commun. Probab. 19 no. 33, 9. MR3216567 32 M. RUDELSON, A. SAMORODNITSKY AND O. ZEITOUNI [2] Barvinok, A. (1999). Polynomial time algorithms to approximate permanents and mixed discriminants within a simply exponential factor. Random Structures Algorithms 14 29–61. MR1662270 [3] Barvinok, A. and Samorodnitsky, A. (2007). Random weighting, asymptotic counting, and inverse isoperimetry. Israel J. Math. 158 159–191. MR2342462 [4] Barvinok, A. and Samorodnitsky, A. (2011). Computing the partition function for perfect matchings in a hypergraph. Combin. Probab. Comput. 20 815–835. MR2847269 [5] Bayati, M., Gamarnik, D., Katz, D., Nair, C. and Tetali, P. (2007). Simple deterministic approximation algorithms for counting matchings. In STOC’07— Proceedings of the 39th Annual ACM Symposium on Theory of Computing 122– 127. ACM, New York. MR2402435 [6] Brègman, L. M. (1973). Some properties of nonnegative matrices and their permanents. Soviet Math. Dokl. 211 945–949. MR0327788 [7] Erdős, L., Knowles, A., Yau, H.-T. and Yin, J. (2013). The local semicircle law for a general class of random matrices. Electron. J. Probab. 18 no. 59, 58. MR3068390 [8] Friedland, S., Rider, B. and Zeitouni, O. (2004). Concentration of permanent estimators for certain large matrices. Ann. Appl. Probab. 14 1559–1576. MR2071434 [9] Godsil, C. D. and Gutman, I. (1981). On the matching polynomial of a graph. In Algebraic Methods in Graph Theory, Vol. I, II (Szeged, 1978). (L. Lóvasz and V. T. Sós, eds.) 241–249. North-Holland, Amsterdam. MR0642044 [10] Guionnet, A. and Zeitouni, O. (2000). Concentration of the spectral measure for large matrices. Electron. Commun. Probab. 5 119–136. MR1781846 [11] Jerrum, M. and Sinclair, A. (1989). Approximating the permanent. SIAM J. Comput. 18 1149–1178. MR1025467 [12] Jerrum, M., Sinclair, A. and Vigoda, E. (2004). A polynomial-time approximation algorithm for the permanent of a matrix with nonnegative entries. J. ACM 51 671–697. MR2147852 [13] Ledoux, M. (2001). The Concentration of Measure Phenomenon. Mathematical Surveys and Monographs 89. Amer. Math. Soc., Providence, RI. MR1849347 [14] Linial, N., Samorodnitsky, A. and Wigderson, A. (2000). A deterministic strongly polynomial algorithm for matrix scaling and approximate permanents. Combinatorica 20 545–568. MR1804826 [15] Minc, H. (1978). Permanents. Encyclopedia of Mathematics and Its Applications 6. Addison-Wesley, Reading, MA. MR0504978 [16] Rudelson, M. and Vershynin, R. (2008). The Littlewood–Offord problem and invertibility of random matrices. Adv. Math. 218 600–633. MR2407948 [17] Rudelson, M. and Vershynin, R. (2009). Smallest singular value of a random rectangular matrix. Comm. Pure Appl. Math. 62 1707–1739. MR2569075 [18] Rudelson, M. and Zeitouni, O. (2014). Singular values of Gaussian matrices and permanent estimators. Random Structures Algorithms. To appear. Available at arXiv:1301.6268. [19] Valiant, L. G. (1979). The complexity of computing the permanent. Theoret. Comput. Sci. 8 189–201. MR0526203 HAFNIANS, PERFECT MATCHINGS AND GAUSSIAN MATRICES M. Rudelson Department of Mathematics University of Michigan 530 Church Street Ann Arbor, Michigan 48104 USA E-mail: [email protected] 33 A. Samorodnitsky School of Engineering and Computer Science Hebrew University of Jerusalem Givat Ram, Jerusalem 9190401 Israel E-mail: [email protected] O. Zeitouni Faculty of Mathematics Weizmann Institute POB 26, Rehovot 76100 Israel and Courant Institute New York Universirty 251 Mercer Street New York, New York 10012 USA E-mail: [email protected]
8cs.DS
Jammali et al. RESEARCH Aligning coding sequences with frameshift extension penalties arXiv:1610.08809v2 [cs.DS] 13 Apr 2017 Safa Jammali1* , Esaie Kuitche1 , Ayoub Rachati1 , François Bélanger1 , Michelle Scott2 and Aı̈da Ouangraoua1 * Correspondence: [email protected] 1 Département d’informatique, Faculté des Sciences, Université de Sherbrooke, Sherbrooke, J1K2R1 QC, Canada Full list of author information is available at the end of the article Abstract Background: Frameshift translation is an important phenomenon that contributes to the appearance of novel Coding DNA Sequences (CDS) and functions in gene evolution, by allowing alternative amino acid translations of gene coding regions. Frameshift translations can be identified by aligning two CDS, from a same gene or from homologous genes, while accounting for their codon structure. Two main classes of algorithms have been proposed to solve the problem of aligning CDS, either by amino acid sequence alignment back-translation, or by simultaneously accounting for the nucleotide and amino acid levels. The former does not allow to account for frameshift translations and up to now, the latter exclusively accounts for frameshift translation initiation, not considering the length of the translation disruption caused by a frameshift. Results: We introduce a new scoring scheme with an algorithm for the pairwise alignment of CDS accounting for frameshift translation initiation and length, while simultaneously considering nucleotide and amino acid sequences. The main specificity of the scoring scheme is the introduction of a penalty cost accounting for frameshift extension length to compute an adequate similarity score for a CDS alignment. The second specificity of the model is that the search space of the problem solved is the set of all feasible alignments between two CDS. Previous approaches have considered restricted search space or additional constraints on the decomposition of an alignment into length-3 sub-alignments. The algorithm described in this paper has the same asymptotic time complexity as the classical Needleman-Wunsch algorithm. Conclusions: We compare the method to other CDS alignment methods based on an application to the comparison of pairs of CDS from homologous human, mouse and cow genes of ten mammalian gene families from the Ensembl-Compara database. The results show that our method is particularly robust to parameter changes as compared to existing methods. It also appears to be a good compromise, performing well both in the presence and absence of frameshift translations. An implementation of the method is available at https://github.com/UdeS-CoBIUS/FsePSA. Keywords: Coding DNA sequences; Pairwise alignment; Frameshifts; Dynamic programming. Background Biological sequence alignment is a cornerstone of bioinformatics and is widely used in such fields as phylogenetic reconstruction, gene finding, genome assembly. The accuracy of the sequence alignments and similarity measures are directly re- Jammali et al. Page 2 of 24 lated to the accuracy of subsequent analysis. CDS alignment methods have many important applications for gene tree and protein tree reconstruction. In fact, they are useful to cluster homologous CDS into groups of orthologous splicing isoforms [1, 2] and combine partial trees on orthology groups into a complete protein tree for a gene family [3, 4]. Aligning and measuring the similarity between homologous CDS requires to account for Frameshift (FS) translations that cannot be detected at the amino acid (AA) level, but lead to a high similarity at the nucleotide level between functionnaly different sub-sequences. FS translation consists in alternative AA translations of a coding region of DNA using different translation frames [5]. It is an important phenomenon resulting from different scenarios such as, insertion or deletion of a nucleotide sequence whose length is not a multiple of 3 in a CDS through alternative splicing [6, 7] or evolutionary genomic indels [8, 9], programmed ribosomal frameshifting [10], or sequencing errors [11]. Recent studies have reported the role of FS translations in the appearance of novel CDS and functions in gene evolution [6, 12]. FS translation has also been found to be linked to several diseases such as the Crohn’s Disease [13]. The computational detection of FS translations requires the alignment of CDS while accounting for their codon structure. A classical approach for aligning two CDS used in most alignment tools [14, 15] consists in a three-step method, where the CDS are first translated into AA sequences using their actual coding frame, then AA sequences are aligned, and finally the AA alignment is back-translated to a CDS alignment. This approach does not account for alternative AA translations between two CDS and it leads to incorrect alignment of the coding regions subject to FS translation. The opposite problem of aligning protein sequences while recovering their hypothetical nucleotide CDS sequences and accounting for FS translation was also studied in several papers [16, 17]. Here, we consider the problem of aligning two CDS while accounting for FS translation, by simultaneously accounting for their nucleotide and AA sequences. The problem has recently regained attention due to the increasing evidence for alternative protein production through FS translation by eukaryotic gene families [18, 19]. The problem was first addressed by Hein et al. [20, 21] who proposed a DNA/Protein model such that the score of an alignment between two CDS of length n and m is a combination of its score at the nucleotide level and its score at the AA level. They described a O(n2 m2 ) algorithm in [20], later improved to a O(nm) algorithm in [21] for computing an optimal score alignment, under the constraint that the search space of the problem is restricted. Arvestad [22] later proposed a CDS alignment scoring model with a O(nm) alignment algorithm accounting for codon structures and FS translations based on the concept of generalized substitutions introduced in [23]. In this model, the score of a CDS alignment depends on its decomposition into a concatenation of codon fragment alignments, such that a codon fragment of a CDS is defined as a substring of length w, 0 ≤ w ≤ 5. This decomposition into codon fragment alignments allows to define a score of the CDS alignment at the AA level. More recently, Ranwez et al. [18] proposed a simplification of the model of Arvestad limiting the maximum length of a codon fragment to 3. Under this model, a O(nm) CDS alignment algorithm was described Jammali et al. Page 3 of 24 and extended in the context of multiple sequence alignment [18]. In the models of Arvestad [22] and Ranwez et al. [18], several scores may be computed for the same alignment based on different decompositions into codon fragment alignments. The corresponding algorithms for aligning two CDS then consist in computing an optimal score decomposition of an alignment between the two CDS. This optimal score exclusively accounts for FS translation initiations, i.e a FS translation in an alignment is penalized by adding a constant FS cost, which only penalizes the initiation of the FS, not accounting for the length of this FS translation. However, taking account of FS translation lengths is important in order to increase the precision of CDS alignment scores, as these lengths induce more or less disruptions between the protein sequences. In this paper, we propose the first alignment algorithm that accounts for both the initiation and the length of FS translations in order to compute the similarity scores of CDS alignments. The remaining of the paper is organized as follows. In the ”Motivation” section, we illustrate the importance of accounting for FS translation length when aligning CDS. In the ”Preliminaries” section, we give some preliminary definitions and we introduce a new CDS alignment scoring model with a self-contained definition of the score of an alignment penalizing both the initiation and the extension of FS translations. In the ”Method” section, a dynamic programming algorithm for computing an optimal score alignment between two CDS is described. Finally, in the ”Results” section,we present and discuss the results of a comparison of our method with other CDS alignment methods for a pairwise comparison of CDS from homologous genes of ten mammalian gene families. Motivation: Importance of accounting for FS translation length The two main goals of aligning biological sequences are to evaluate the similarity and to identify similar regions between the sequences, used thereafter to realize molecular analyses such as evolutionary, functional and structural predictions. In practice, CDS alignment can be used to exhaustively identify the conserved features of a set of proteins. Thus, the definition of CDS similarity must account for sequence conservation and disruptions at both the nucleotide and the protein levels. Figure 1 illustrates the importance of accounting for AA translations and FS translation length in order to compute an adequate similarity score for a CDS alignment. It describes an example of three CDS Seq1, Seq2 and Seq3. Seq1 has a length of 45. The CDS Seq2 has length 60 and is obtained from Seq1 by deleting the nucleotide ’G’ at position 30 and adding 16 nucleotides at the end. The CDS Seq3 has length 60 and is obtained from Seq1 by deleting the nucleotide ’G’ at position 15 and adding 16 nucleotides at the end. When looking at the AA translations of Seq1, Seq2 and Seq3, we observe that the similarity between Seq2 and Seq1 is higher than the similarity between Seq3 and Seq1 at the protein level, because Seq1 and Seq2 share a longer AA prefix "M T E S K Q P W H" (amino acids in black characters in the alignments). However, the pairwise CDS alignment algorithms that do not account for the length of FS translations would return the same score for the two following optimal alignments of Seq1 with Seq2 and Seq1 with Seq3, penalizing only the initiation of one illustrates the importance of accounting for AA translations and FS translation length in order to compute an adequate similarity score for a CDS alignment. It describes an example of three CDS Seq1, Seq2 and Seq3 such that Seq1 has a length of 45. The CDS Seq2 has length 60 and is obtained from Seq1 by deleting the nucleotide ’G’ at position 30 and adding 16 nucleotides at the end. The CDS Seq3 has length 60 and is obtained from Seq1 by deleting the nucleotide ’G’ at position 15 and adding 16 nucleotides at the end. Jammali Jammalietetal.al. Jammali et al. Jammali et al. Seq1: ATGACCGAATCCAAGCAGCCCTGGCATAAGTGGGGGAACGATTGA M T E S K Q P W H K W G N D * Seq2: ATGACCGAATCCAAGCAGCCCTGGCATAATGGGGGAACGATTGAAGTAGGAACGATTTAA M T E S K Q P W H N G G T I E V G T I * Seq3: ATGACCGAATCCAACAGCCCTGGCATAAGTGGGGGAACGATTGAAGTAGGAACGATTTAA M T E S N S P G I S G G T I E V G T I * Page Page 19 4ofof 2124 Page 4 of 21 Page 4 of 21 Optimal alignment between Seq1 and Seq2: Optimal alignment between Seq1 and Seq2: MWhen T looking E S at K the Q AA P translations W H K Wof Seq1, G N Seq2 D and * Seq3, we observe that M similarity T E Sbetween K Q Seq2 P WandHSeq1 K isW higher G Nthan D the * similarity between Seq3 the ATGACCGAATCCAAGCAGCCCTGGCATAAGTGGGGGAACGATTGA---------------ATGACCGAATCCAAGCAGCCCTGGCATAAGTGGGGGAACGATTGA---------------and Seq1 at the protein level, because Seq1 and Seq2 share a longer AA prefix ATGACCGAATCCAAGCAGCCCTGGCATAA-TGGGGGAACGATTGAAGTAGGAACGATTTAA ATGACCGAATCCAAGCAGCCCTGGCATAA-TGGGGGAACGATTGAAGTAGGAACGATTTAA "M T M TE SE K SQ P KW H" Q (amino P W acids H !in black G Gcharacters T I Ein the V alignments). G T I *HowS KCDS Q alignment P W H algorithms ! G GthatTdo Inot Eaccount V GforTtheIlength * of ever, 6M Tthe Epairwise Jammali et al. FS translations would return the same the two following optimal alignOptimal alignment Seq1score andfor Seq3: 0 Pbetween Optimal alignment between Seq1 and Seq3: saa (B [k penalizing 2 .. k],A0 [k 2 .. k]) ments of ESeq1 Seq2 andW Seq1 with Seq3, of one 0 S with M T K Q P H K W G N D * only the initiation score(B ) = k2IMB!A + M translation T E S in KbothQP P (positions W H K marked W s G (B N0 [kaD2”!” * FS cases with symbol 2 .. k],A0 [kin the 2 .. alignments), k]) aa ATGACCGAATCCAAGCAGCCCTGGCATAAGTGGGGGAACGATTGA---------------( at the protein2 level. + fs extension k2FSext ATGACCGAATCCAAGCAGCCCTGGCATAAGTGGGGGAACGATTGA---------------and not penalizing the sequence disruptions B!A cost)+ ATGACCGAATCCAA-CAGCCCTGGCATAAGTGGGGGAACGATTGAAGTAGGAACGATTTAA |InDelB!A | ⇤ gap cost+ ATGACCGAATCCAA-CAGCCCTGGCATAAGTGGGGGAACGATTGAAGTAGGAACGATTTAA M T E S ! S|B|P G I S G G T I E V G T I * M T E S ! (S 3 P G|IMIB!A S | G |FSext G T B!A I E | V |InDel G T B!A I *|) ⇤ fs open cost+ Therefore, a good scoring evaluating the similarity between two CDS in P model forsan (B 0 [k],A0 [k]) Therefore, a good scoring model for evaluating the similarity between two CDS in Figure 1 the Top.presence An example of three CDS Seq1, Seq2 and Middle. optimal alignment k2 MFSSeq1, 2 Seq3. of FS translations should only An the initiation of FS but B!A Figure 1 Top. An example of athree CDS Seq2 penalize and Seq3.not Middle. AnAn optimal alignment between the Seq1presence and Seq2ofwith FS translationshould region penalize of length not 15. Bottom. optimal alignment FS translations only the initiation of FS but between Seq1 and Seq2 with a FS translation region of length 15. Bottom. An optimal alignment also the length of FS translations extension (amino acids in gray characters in the between Seq1 and Seq3 with a FS translation region of length 30. 0 with 0 of FS 0 0 also the length translations extension (amino acids in gray characters in the between Seq1 and Seq3 a FS translation region of length 30. score(A , B )= score(A + score(B alignments). The alignment of )Seq1 with Seq2)would then have a higher similarity alignments). The alignment of Seq1 with Seq2 would then have a higher similarity score than the alignment of Seq1 with Seq3. An alignment (A’,B’) of length 48 between A and B: score than the alignment of Seq1 with Seq3. pos 000000000111111111122222222223333333333444444444 Preliminaries: Score of CDS alignment 123456789012345678901234567890123456789012345678 FS translation in both cases (positions marked with a ”!” symbol in the alignments), Preliminaries: Score of CDS alignment In this section, we formally describe a new definition of the score of a CDS alignment M T E S K Q P W Pthe protein D the level. Q ofGa CDS * alignment and not penalizing thewe sequence disruptions In this section, formally describe a new at definition of score that penalizes both the initiation and the extension of FS translations. A’ ATGACCGAATCCAAG--CAGC CCTGGCC A G ---A T ---CAAG G -T TGA penalizes both the initiation and the extension FS translations. From anthat evolutionary point of view,¯ a good for the ¯scoring ¯¯ ¯of¯model ¯¯ evaluating ¯ B’ ATG---GAGTCGAATATCAGC--TGG-CAGGCCATTGGCAATGACTGA Definition 1 (Coding DNA sequence (CDS)) ¯ ¯¯ ¯should ¯ ¯then penalize similarity between two CDS in the presence of FS translations M DNA Esequence S DNA N (CDS) Isequence Sis a DNA W sequence Q A on I the G alphabet N D of*nucleotides Definition 1 (Coding (CDS)) A coding not only the initiation of FS but also the length of FS translations extension (amino A coding DNA sequence (CDS) is a DNA sequence on the alphabet of nucleotides ⌃N = {A, C, G, T0 } whose length n is a multiple of 3. A coding sequence is composed 0 Figure 2 ⌃An alignment (AT ,}Bwhose )definitions ofalignments). length between two CDS AA (13 codons) and B Seq2 (14 acids in gray characters in the The alignment of Seq1 with would {A, C, G, length48nand is a notations multiple of 3. coding sequence is composed Following the for frameshifts used in ending [13], the set of N = a concatenation of nn3 codons that areofthe of length 3 in thecolumns. sequence codons). of The number arrays indicate the positions thewords consecutive alignment Codons of a concatenation codons that are the words of length 3 in the sequence ending FSinit codons of A (resp. B) can be divided into two sets. The set of FSinit n then have a positions higher similarity score than the alignment Seq3. of A andat B are colored the set to which they belong: of IM Seq1 codonswith in blue color, FSext 3i,according 1  i 3to 3 . The AA translation of a CDS is a protein sequence of n positions 3i, 1codons by i deletions . The AA translation of a CDS is a protein sequence of codons (FS ) contains the codons that are grouped in codons inat red color, InDel in green color and FSinit codons in black color. MFS n caused length n3 on the alphabet 3⌃A of AA such that each codon of the CDS is translated nucleotides contained in FSinit codons are underlined. length on the alphabet ⌃ of AA such that each codon of the CDS is translated the alignment and are aligned with only one or two nucleotides in the other CDS A into an3AA symbolof in the protein sequence. Preliminaries: Score CDS alignment into AA in symbols. the proteinThe sequence. and an two orsymbol one gap set of FSinit codons caused by insertions In this section, + we formally describe a new definition of the score of a CDS align(FS ) contains all the codons that are not in the alignment. Note that, in practice an entire CDS begins withgrouped a start codon "ATG" and ends Note that, both inlines practice an5 entire CDSthe begins with a start codon "ATG" and ends ment thatfile penalizes the initiation and extension of FS translations. Additional 3 – Additional for Tables and 6 with a stop codon "TAA", "TAG" or "TGA". PDF file containing lines "TAA", for Tables"TAG" 5 (for needleprot) with a additional stop codon or "TGA". and 6 (for needlenuc) of the Results section. 4 Algorithm Definition 2 DNA (Alignment between DNA sequences) Definition 1 (Coding sequence (CDS)) Additional file 4 – Pairwise 2 alignments for thebetween 3-CDS benchmark Definition (Alignment DNA sequences) 0 0 0 An alignment between two DNA sequences Afor and Band is aspace pair (A , Bbenchmark ) where A and InDNA this section, we describe O(n.m) time complexity algorithm that Zip coding file containing the pairwise alignment files at fasta format the manually-built 3-CDS 0 A sequence (CDS) is the a asequences DNA sequence alphabet An between two DNA A and Bon is athe pair (A , B 0 ) of where A0 and 0 alignment 0 nucleotides 0 are two sequences of same length L derived by inserting gap symbols in A and considered inB the Results section, for each of the five methods and each parameter configuration. solves the problem of finding a maximum score alignment between two CDS A 0 0 0 B C, areG,two of same length L gap symbols is in A and Σ N = { A, T }sequences whose a6=multiple of coding composed 0 derived 0 0 by3.inserting 0 B, such that 8i, 1 length i L, nm. A0is [i]Similarly or B [i] 6= A0 sequence . Each sequence position i, 1  i  L, and B of lengths n and to other alignment algorithms [8], 0 0 0 0 0 0 B, such that 1  i that L, A 6= words or Bof[i]length 6= .3 Each position i, 1 ending  i  L,at of a concatenation of n38i,codons are[i]the in the sequence in is programming called a column of the alignment. wethe usealignment dynamic tables that are indexed by the pairs of prefixes of in the alignment is called a column of the alignment. n positions 3i, ≤i≤ translation of the a CDS is a protein sequence ofalignments length n3 onbetween the1 two CDS. TheAA table D stores maximum scores of the 3 . The Given an alignment (A0 , B 0 ) of length L between two CDS A and B, let S be the the alphabet Σ A of AA into anletAA symbol prefixes of Asuch andthat B. 0each The table of DFthe isCDS usedistotranslated account forB, potential cases of FS Given , B 0 ) codon of L between and the sequencean A0alignment or B 0 . We(A denote bylength S[k .. l], 1  k  two l  CDS L, theAsubstring ofSS be going 0 0 extensions that are counted subsequently. in the protein sequence. sequence A orkBto. We denote .. l], 1  k the l L, the of substring of S[k S going from position position l. by |S[kS[k .. l]| denotes number letters in .. l] from position k4 to position l. |S[k .. l]|0 denotes the number of letters in codon S[k .. of l]A and B 0 Definition (Dynamic programming tables). Given CDS that are di↵erent from the gap symbol . For example, |AC--G| = 3.two A 0 0 that are di↵erent from the gap symbol |AC--G| = 3. A codon of 0 0 . For example, as input, the algorithm uses two dynamic programming tables D and D A orinBpractice is groupedan in entire the alignment (A , B )with if its athree appearand in three Note that, CDS begins startnucleotides codon "ATG" endsF of size 0 0 A or B is grouped in the alignment (A , B ) if its three nucleotides appear in three n + 1 ⇥ m + 1. The cell D(i, j) contains the maximum score of an consecutive columns of theoralignment. example, a codon ACC that appears inalignment with a stop codon "TAA", "TAG" "TGA". For consecutive columns of the alignment. For codon ACC is that between the prefixes A[1 .. i] and B[1 .. j].grouped Thea table D filled onlyinfor values the alignment as ACC is grouped, while it is example, not if it appears as appears A-CC. F the as ACC is grouped, while it is not grouped if it appears as A-CC. 0 0 ofInialignment and j such that i(mod 3) = 0 or j(mod 3) = 0. If i(mod 6= 0 (resp. the following, we give our definition of the score of an alignment (A , B 3) ) be0 0 In the following, we give our definition of the score of an alignment (A , B ) beDefinition 2 (Alignment between DNA sequences) j(modtwo3)CDS 6= A 0),andthe DF (i,onj)a contains alignment tween B. cell It is based partition ofthe the score codons of of Aan (resp. B) into between 0 and 0 tween twodepending CDStwo A and is based partition the A(3 (resp. B) intoB3) An alignment between DNA sequences Aofaand is(see aofpair (codons A10 ,↵for B 0= )ofan where A the sets prefixes A[1 .. ithe +It ↵] and on B[1 .. B j+ ↵] where i)(mod (resp. four onB. alignment codons Figure illustration): four theThe alignment of codons (seeas Figure 1 0for 0an illustration): ↵ =sets (3 depending j)(mod on 3)). table D is filled follows: are two sequences of same length L derived by inserting gap symbols − in A and B, such F – If i(mod 3) = 0 and j(mod 3) = 0, DF (i, j) = D(i, j). – If i(mod 3) = 0 and j(mod 3) = 2, or i(mod 3) = 2 and j(mod 3) = 0, DF (i, j) contains the maximum score of an alignment between A[1 .. i + 1] and B[1 .. j + 1] such that A[i + 1] and B[j + 1] are aligned together and half Jammali et al. Page 5 of 24 that ∀i, 1 ≤ i ≤ L, A0 [i ] 6= 0 −0 or B0 [i ] 6= alignment is called a column of the alignment. 0 −0 . Each position i, 1 ≤ i ≤ L, in the Given an alignment ( A0 , B0 ) of length L between two CDS A and B, let S be the sequence A0 or B0 . We denote by S[k .. l ], 1 ≤ k ≤ l ≤ L, the substring of S going from position k to position l. |S[k .. l ]| denotes the number of letters in S[k .. l ] that are different from the gap symbol 0 −0 . For example, if A0 = ACCAT--GTAG and B0 = AC--TACGTAG, | A0 [4 .. 8]| = |AT--G| = 3. A codon of A or B is grouped in the alignment ( A0 , B0 ) if its three nucleotides appear in three consecutive columns of the alignment. For example, the first codon ACC of A is grouped, while the first codon ACT of B is not grouped. In the following, we give our definition of the score of an alignment ( A0 , B0 ) between two CDS A and B. It is based on a partition of the codons of A (resp. B) into four sets depending on the alignment of codons (see Figure 2 for an illustration): 1 The set of In-frame Matching codons (IM) contains the codons that are grouped in the alignment and aligned with a codon of the other CDS. 2 The6 set of Frameshift extension codons (FSext) contains the codons that Jammali et al. are grouped in the alignment and aligned with a concatenation of three nuP saa (B 0 [k 2 .. k],A0 [k 2 .. k]) cleotides that0 )overlaps codons of the other CDS. score(B = two + k2IMB!A 2 P saa (B 0 [k 2 contains .. k],A0 [k the 2 .. codons k]) 3 The set of Deleted/Inserted codons (InDel) are + fsthat extension cost)+ k2FSextB!A ( 2 grouped in the alignment and aligned a concatenation of 3 gap symbols. |InDel | ⇤ gapwith cost+ B!A 4 All other codons constitutes Frameshift initiation codons ( |B| |IMB!A | |FSext |InDel |) ⇤ fs open cost+ B!A | B!A(FSinit). P3 san (B 0 [k],A0 [k]) The set of Matching nucleotides in FSinit codons (MFS) contains all the k2MFSB!A 2 nucleotides belonging to FSinit codons and aligned with a nucleotide of the 0 0 0 0 score(A other CDS. , B ) = score(A ) + score(B ) An alignment (A’,B’) of length 48 between A and B: pos 000000000111111111122222222223333333333444444444 123456789012345678901234567890123456789012345678 M T E S K Q P W P D Q G * A’ ATGACCGAATCCAAG--CAGCCCTGGCCAG---AT---CAAGG-TTGA ¯ ¯¯¯ ¯¯ ¯¯ ¯ B’ ATG---GAGTCGAATATCAGC--TGG-CAGGCCATTGGCAATGACTGA ¯ ¯¯ ¯ ¯ ¯ M E S N I S W Q A I G N D * 0 , B0 ) of length 48 between two CDS, A (13 codons) and B (14 codons). Figure 2 An alignment ( Athe Following definitions and notations for frameshifts used in [13], the set of The number arrays indicate the positions of the consecutive alignment columns. Codons of A and FSinit codons of Ato(resp. B) can beIMdivided setinof FSinit B are colored according to the set which they belong: codons ininto blue two color,sets. FSextThe codons caused by color deletions ) in contains theMFS codons that are grouped in red color,codons InDel codons in green and FSinit(FS codons black color. nucleotides containedthe in FSinit codonsand are underlined. alignment are aligned with only one or two nucleotides in the other CDS and two or one gap symbols. The set of FSinit codons caused by insertions (FS+ ) contains theconventions codons thatare areused not in grouped in the The following notationsall and Definition 3 toalignment. denote the different sets of codons and nucleotides in A and B. The set of IM codons in A (resp. 4 Algorithm B) is denoted by IM A→ B (resp. IMB→ A ). The set of FSext codons in A (resp. B) is denoted In by this FSext FSextB→ ). The set of and InDel codons in A (resp. B) A→ B (resp. section, we describe a AO(n.m) time space complexity algorithm that is denoted by InDel InDelB→aAmaximum ). The set of MFS alignment nucleotidesbetween in A (resp. A→ B (resp. solves the problem of finding score two CDS A B) is denoted sets, sequence the codons of A and algorithms B are and BbyofMFS lengths n andMFS m.BSimilarly to other alignment [8], A→ B (resp. → A ). In these we use dynamic programming tables that are indexed by thealignment. pairs of prefixes of simply identified by the position (column) of their last nucleotide in the the two CDS. The table DBstores maximum scores of the alignments In this case, we always have IM A→ = IMBthe as in the example below. The MFS between →A prefixes of A and B. The table D is used to account for potential cases of FS F nucleotides are also identified by their positions in the alignment. extensions that are counted subsequently. Definition 4 (Dynamic programming tables). Given two CDS A and B as input, the algorithm uses two dynamic programming tables D and DF of size n + 1 ⇥ m + 1. The cell D(i, j) contains the maximum score of an alignment Jammali et al. Page 6 of 24 For example, for the alignment depicted in Figure 2, the composition of the different sets are: IM A→ B = IMB→ A = {3, 9, 12, 15, 26, 48}; FSext A→ B = {20, 41}; InDel A→ B = {6}; MFS A→ B = {21, 28, 29, 30, 34, 35, 42, 43, 45}; FSextB→ A = {21, 30, 42}; InDelB→ A = {33}; and MFSB→ A = {18, 34, 35, 39, 43, 45}. In the alignment scoring model described in Definition 3, the substitutions of IM and FSext codons are scored using an AA scoring function s aa such that aligned codons with silent nucleotide mutations get the same score as identity. A fixed FS extension cost denoted by fs extend cost is added for each FSext codon. The insertions/deletions of InDel codons are scored by adding a fixed gap cost denoted by gap cost for each InDel codon. The alignment of MFS nucleotides are scored independently from each other, using a nucleotide scoring function s an . The insertions or deletions of nucleotides in FSinit codons are responsible for the initiation of FS translations. They are then scored by adding a fixed FS opening cost denoted by fs open cost for each FSinit codon. Note that, by convention, the values of all penalty costs for gap and FS (gap cost, fs open cost, fs extend cost) are negative. Note also that the scoring scheme assumes that the AA and the nucleotide scoring functions, s aa and s an , are symmetric. Definition 3 (Score of an alignment) Let ( A0 , B0 ) be an alignment of length L between two CDS A and B. The score of the alignment ( A0 , B0 ) is defined by: score( A0 , B0 ) = ∑k∈IM A→B s aa ( A0 [k − 2 .. k], B0 [k − 2 .. k]) + s ( A0 [k −2 .. k ],B0 [k −2 .. k ]) + fs extend cost) + ∑k∈FSext A→B ( aa 2 |InDel A→ B | ∗ gap cost + ( | A3 | − |IM A→ B | − |FSext A→ B | − |InDel A→ B |) ∗ fs open cost + s ( A0 [k ],B0 [k ]) + ∑k∈MFS A→B an 2 s aa ( B0 [k −2 .. k],A0 [k −2 .. k ]) + fs extend cost) + ∑k∈FSextB→ A ( 2 |InDelB→ A | ∗ gap cost + ( | B3 | − |IMB→ A | − |FSextB→ A | − |InDelB→ A |) ∗ fs open cost + ∑k∈MFSB→ A s an ( B0 [k ],A0 [k ]) 2 Method In this section, we describe a O(nm) time and space complexity algorithm that solves the problem of finding a maximum score alignment between two CDS A and B of lengths n and m. Similarly to other classical sequence alignment algorithms [24], we use dynamic programming tables that are indexed by the pairs of prefixes of the two CDS. The table D stores the maximum scores of the alignments between prefixes of A and B. The table DF is used to account for potential cases of FS extensions that are counted subsequently. Definition 4 (Dynamic programming tables) Given two CDS A and B as input, the algorithm uses two dynamic programming tables D and DF of size (n + 1) × (m + 1). The cell D (i, j) contains the maximum score of an alignment between the prefixes A[1 .. i ] and B[1 .. j]. The table DF is filled only for values Jammali et al. Page 7 of 24 of i and j such that i (mod 3) = 0 or j(mod 3) = 0. If i (mod 3) 6= 0 (resp. j(mod 3) 6= 0), the cell DF (i, j) contains the score of an alignment between the prefixes A[1 .. i + α] and B[1 .. j + α] where α = (3 − i )(mod 3) (resp. α = (3 − j)(mod 3)). The table DF is filled as follows: • If i (mod 3) = 0 and j(mod 3) = 0, DF (i, j) = D (i, j). • If i (mod 3) = 0 and j(mod 3) = 2, or i (mod 3) = 2 and j(mod 3) = 0, DF (i, j) contains the maximum score of an alignment between A[1 .. i + 1] and B[1 .. j + 1] such that A[i + 1] and B[ j + 1] are aligned together and half of the score for aligning A[i + 1] with B[ j + 1] is subtracted. • If i (mod 3) = 0 and j(mod 3) = 1, or i (mod 3) = 1 and j(mod 3) = 0, DF (i, j) contains the maximum score of an alignment between A[1 .. i + 2] and B[1 .. j + 2] such that A[i + 1],B[ j + 1] and A[i + 2],B[ j + 2] are aligned together and half of the scores of aligning A[i + 2] with B[ j + 2] and A[i + 1] with B[ j + 1] is subtracted. Lemma 1 (Filling up table D) 1 If i (mod 3) = 0 and j(mod 3) = 0 D (i, j) = max 2                               1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. s aa ( A[i − 2 .. i ], B[ j − 2 .. j]) + D (i − 3, j − 3) s an ( A[i ], B[ j]) + s an ( A[i − 1], B[ j − 1]) + D (i − 3, j − 2) + 2 ∗ fs open s an ( A[i ], B[ j]) + s an ( A[i − 2], B[ j − 1]) + D (i − 3, j − 2) + 2 ∗ fs open s an ( A[i ], B[ j]) + D (i − 3, j − 1) + 2 ∗ fs open cost s an ( A[i ], B[ j]) + s an ( A[i − 1], B[ j − 1]) + D (i − 2, j − 3) + 2 ∗ fs open s an ( A[i ], B[ j]) + s an ( A[i − 1], B[ j − 2]) + D (i − 2, j − 3) + 2 ∗ fs open s an ( A[i ], B[ j]) + D (i − 1, j − 3) + 2 ∗ fs open cost s an ( A[i ], B[ j]) + D (i − 1, j − 1) + 2 ∗ fs open cost s an ( A[i −1],B[ j]) + san ( A[i−22],B[ j−1]) + DF (i − 3, j − 2) + fs open cost 2 s an ( A[i − 1], B[ j]) + D (i − 3, j − 1) + 2 ∗ fs open cost s an ( A[i −2],B[ j]) + DF (i − 3, j − 1) + fs open cost 2 gap cost + D (i − 3, j) D (i − 1, j) + fs open cost s an ( A[i ],B[ j−1]) + san ( A[i−21],B[ j−2]) + DF (i − 2, j − 3) + fs open cost 2 s an ( A[i ], B[ j − 1]) + D (i − 1, j − 3) + 2 ∗ fs open cost s an ( A[i ],B[ j−2]) + DF (i − 1, j − 3) + fs open cost 2 gap cost + D (i, j − 3) D (i, j − 1) + fs open cost cost cost cost cost If i (mod 3) = 0 and j(mod 3) 6= 0 D (i, j) = max 3 4                                                                                   1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. s aa ( A[i −2 .. i ],B[ j−2 .. j]) + DF (i − 3, j − 3) + fs extend cost 2 + san ( A2[i],B[ j]) (+ san ( A[i−21],B[ j−1]) i f j − 1(mod 3) 6= 0) s an ( A[i ], B[ j]) + s an ( A[i − 1], B[ j − 1]) + D (i − 3, j − 2) + fs open cost (+fs open cost i f j − 1(mod 3) = 0) s an ( A[i ], B[ j]) + s an ( A[i − 2], B[ j − 1]) + DF (i − 3, j − 2) + fs open cost (− san ( A[i−22],B[ j−1]) i f j − 1(mod 3) = 0) s an ( A[i ], B[ j]) + D (i − 3, j − 1) + fs open cost s an ( A[i ], B[ j]) + D (i − 1, j − 1) + fs open cost s an ( A[i − 1], B[ j]) + s an ( A[i − 2], B[ j − 1]) + DF (i − 3, j − 2) + fs open cost (− san ( A[i−22],B[ j−1]) i f j − 1(mod 3) = 0) s an ( A[i − 1], B[ j]) + D (i − 3, j − 1) + fs open cost s an ( A[i − 2], B[ j]) + D (i − 3, j − 1) + fs open cost gap cost + D (i − 3, j) D (i − 1, j) + fs open cost D (i, j − 1) If i (mod 3) 6= 0 and j(mod 3) = 0, the equation is symmetric to the previous case. If i (mod 3) 6= 0 and j(mod 3) 6= 0 D (i, j) = max  1. 2.  3. s an ( A[i ], B[ j]) + D (i − 1, j − 1) D (i − 1, j) D (i, j − 1) Jammali et al. Page 27 of 28 Jammali et al. Page 8 of 24 The proof of Lemma 1 is given in the Additional file 1. Figure 3 illustrates the configurations of alignment considered in Lemma 1 for computing D (i, j) for Cases 1 and 2. Case 1. i(mod 3) = 0 and j(mod 3) = 0 1.! x"x"x" x"x"x" 2.! x"x"x" −"x"x" 3.! 5.! −"x"x" x"x"x" 6.! 8.! x" x" 9.! x"x"x" (b) i. B.! x"x"−" 13.! x" −" 14.! x"x"−" x"x"x" 18.! −" x" (a) i.! (a) ii. A.! (a) iii.! (a) iv.! (b) i. A.! (b) ii.! (c) ! x"x"x" x"−"x" 4.! (a) ii. B.! 7.! x"−"x" x"x"x" x"x"x" −"−"x" −"−"x" x"x"x" 10.! x"x"x" −"x"−" 11.! x"x"x" (b) i. C.! x"−"−" 15.! −"x"−" x"x"x" 16.! x"−"−" x"x"x" 12.! x"x"x" −"−"−" 17.! −"−"−" x"x"x" 4.! x"x"x" −"−"x" 9.! x"x"x" −"−"−" Case 2. i(mod 3) = 0 and j(mod 3) 6= 0 1.! x"x"x" (a) i. B.! x"x"x" 5.! x" x" 6.! x"x"x" (b) i. B.! x"x"−" 10.! x" −" 11.! −" x" (a) i. A.! (a) ii.! (b) i. A.! (b) ii.! (c) ! 2.! x"x"x" −"x"x" 3.! x"x"x" (a) i. C.! x"−"x" 7.! x"x"x" −"x"−" 8.! x"x"x" (b) i. C.! x"−"−" Figure 3 Illustration of the configurations of alignment considered in Lemma 1 for computing Figure of 2. theThe configurations of alignment considered 1 for D (i, j)2 inIllustration Cases 1 and right-most nucleotides of the sequencesinALemma [1 .. i ] and B[1computing .. j] are represented using the 2. character x. The nucleotides areofcolored accordingA[1 to the the ..codon D(i, j) in Cases 1 and The right-most nucleotides the sequences .. i]type andofB[1 j] are to which they belong : IM codons in blue color, FSext codons in red color, InDel codons in green represented using the character x. The are colored according to color the type of the codon color and FSinit codons in black color.nucleotides The nucleotides that appear in gray are those to belong codons :whose type has not yet been decided. In such case, the table F is usediningreen to belonging which they IM codons in blue color, FSext codons in red color, InDelDcodons order to decide of the type of these codons subsequently and adjust the score accordingly. color and FSinit codons in black color. The nucleotides that appear in gray color are those belonging to codons whose type has not yet been decided. In such case, the table DF is used in order to decide of the type of these codons subsequently and adjust the score accordingly. Lemma 2 (Filling up table DF ) 1 If i (mod 3) = 0 and j(mod 3) = 0 DF (i, j) = D (i, j) Jammali et al. Page 9 of 24 2 If i (mod 3) = 2 and j(mod 3) = 0  1.       2. DF (i, j) = max 3.    4.    5. s aa ( A[i −1 .. i +1],B[ j−1 .. j+1]) + DF (i − 2, j − 2) + fs extend cost 2 s an ( A[i +1],B[ j+1]) + s an ( A[i ], B[ j]) + D (i − 2, j − 1) + 2 ∗ fs open cost 2 s an ( A[i +1],B[ j+1]) 1],B[ j]) + san ( A[i− + DF (i − 2, j − 1) + fs open cost 2 2 s an ( A[i +1],B[ j+1]) + D ( i − 2, j) + fs open cost 2 s an ( A[i +1],B[ j+1]) + D (i, j) + fs open cost 2 3 If i (mod 3) = 0 and j(mod 3) = 2, the equation is symmetric to the previous case. 4 If i (mod 3) = 1 and j(mod 3) = 0 5    1. DF (i, j) = max 2.   3. s aa ( A[i .. i +2],B[ j .. j+2]) + DF (i − 1, j − 1) + fs extend cost 2 s an ( A[i +2],B[ j+2]) + san ( A[i+21],B[ j+1]) + D (i − 1, j) + fs open cost 2 s an ( A[i +2],B[ j+2]) + san ( A[i+21],B[ j+1]) + D (i, j) + fs open cost 2 If i (mod 3) = 0 and j(mod 3) = 1, the equation is symmetric to the previous case. Proof of Lemma 2. The proof follows from Lemma 1. 1 If i (mod 3) = 0 and j(mod 3) = 0, this case is trivial. 2 If i (mod 3) = 2 and j(mod 3) = 0, then i + 1(mod 3) = 0 and j + 1(mod 3) = 1 6= 0. The five cases follow from the application of Lemma 1, Case 2 for computing D (i + 1, j + 1), and by keeping only the cases where A[i + 1] and B[ j + 1] are aligned together (cases 1, 2, 3, 4, 5 among the 11 cases). However, in each of the cases, we must subtract half of the score of aligns ( A[i +1],B[ j+1]) ing B[i + 1] with A[ j + 1] ( an ), because this score will be added 2 subsequently. 3 If i (mod 3) = 0 and j(mod 3) = 2, the proof is symmetric to the previous case. 4 If i (mod 3) = 1 and j(mod 3) = 0, then i + 2(mod 3) = 0 and j + 2(mod 3) = 2 6= 0. Here again, the three cases follow from the application of Lemma 1, Case 2 for computing D (i + 2, j + 2) and by keeping only the cases where A[i + 1], B[i + 1] and A[i + 2], B[i + 2] can be aligned together (cases 1, 2, 5 among the 11 cases). However, in each of the cases, we must subtract half of the scores of aligning B[i + 2] with A[ j + 2] and aligning B[i + 1] with A[ j + 1] s ( A[i +2],B[ j+2]) s an ( A[i +1],B[ j+1]) ( an , ), because theses scores will be added subse2 2 quently. 5 If i (mod 3) = 0 and j(mod 3) = 1, the proof is symmetric to the previous case. The alignment algorithm using Lemma 1 and 2 is described in the next theorem. Theorem 1 (Computing a maximum score alignment) Given two CDS A and B of lengths n and m, a maximum score alignment between A and B can be computed in time and space O(nm), using the following algorithm. Algorithm Align(A,B) for i = 0 to n do D (i, 0) = f loor ( 3i ) ∗ gap cost ( DF (i, 0) = D (i, 0) + s an ( A[i +1],B[1]) 2 s an ( A[i +1],B[1]) 2 for j = 0 to m do j D (0, j) = f loor ( 3 ) ∗ gap cost + san ( A[i+2 2],B[2]) + fs open cost, + fs open cost, if if i (mod 3) = 1 i (mod 3) = 2 Jammali et al. Page 10 of 24 DF (0, j) = D (0, j) + ( s an ( A[1],B[ j+1]) 2 s an ( A[1],B[ j+1]) 2 + san ( A[22],B[ j+2]) + fs open cost, + fs open cost, for j = 0 to m do compute D(i,j) using Lemma 1 compute DF (i,j) using Lemma 2, if i (mod 3) = 0 or if if j (mod 3) = 1 j (mod 3) = 2 for i = 0 to n do j (mod 3) = 0 Proof of Theorem 1 The proof relies on two points: (1) The algorithm computes the maximum score of an alignment between A and B and (2) the algorithm runs with an O(nm) time and space complexity. (1) The validity of the algorithm, i.e. the fact that it fills the cells of the tables D and DF according to Definition 4, follows from five points. • The initialization of the tables is a direct consequence of Definition 4. • Lemmas 1 and 2. • The couples (i, j) of prefixes of A and B that need to be considered in the algorithm are all the possible couples for D (i, j) and only the couples such that i (mod 3) = 0 or j(mod 3) = 0 for DF (i, j) (see all the cases in which the table DF is used in Lemmas 1 (7 cases) and 2 (3 cases)). • The couples (i, j) of prefixes of A and B are considered in increasing order of length and D [i, j] is computed before DF [i, j] in the cases where i (mod 3) = 0 or j(mod 3) = 0. • A backtracking of the algorithm allows to find a maximum score alignment between A and B. (2) The time and space complexity of the algorithm is a direct consequence of the number of cells of the tables D and DF , 2 × (n + 1) × (m + 1). Each cell is filled in constant time. The exact formula for the computational complexity of the algorithm is computed below. 18 × nm for nm 9 9 calls of the Case 1 of Lemma 1 nm + 11 × 2 × 3 for 2 × nm 3 calls of the Cases 2 or 3 of Lemma 1 4nm 4nm + 3 × for calls of the Case 4 of Lemma 1 9 9 nm nm + 1 × for 9 calls of the Case 1 of Lemma 2 9 + 5 × 2 × nm for 2 × nm 9 9 calls of the Cases 2 and 3 of Lemma 2 nm nm + 3 × 2× 9 for 2 × 9 calls of the Cases 4 and 5 of Lemma 2 Total = 12.55nm Results and discussion We implemented the present CDS alignment algorithm with an affine gap penalty scheme [25] such that the penalty for a concatenation of k inserted (resp. deleted) codons is gap open cost + k ∗ gap cost, such that gap open cost is a negative penalty cost for gap initiations. This was done by adding two dynamic programming tables G A and GB such that the cell G A (i, j) (resp. GB (i, j)) contains the maximum score of an alignment between the prefixes A[1 .. i ] and B[1 .. j] where the codon A[i − 2 .. i ] (resp. B[ j − 2 .. i ]) is an InDel codon. Data We evaluated the algorithm through applications on a mammalian dataset containing CDS sequences from ten gene families obtained from the database Ensembl- Jammali et al. Page 11 of 24 Compara version 83 [26]. The first gene family named ”FAM86” is such that three CDS from three of its paralogous human genes were shown in [6] to share a common FS region translated in three different frames in the three CDS (see Figure 4 for an illustration of the multiple alignment of these three CDS). The nine other families are the nine smallest (in term of the overall length of CDS) of fifteen gene families listed in [12] where they were shown to display one FS translation region between some pairs of CDS. For each gene family, the CDS of all human, mouse and cow genes belonging to the family and satisfying Definition 1 were downloaded. The overall number of distinct pairs of CDS within the ten gene families is 4011. Table 1 gives the details about the content and size of the ten gene families (The CDS of the ten gene families are provided in the Additional file 2). Table 1 Detailed description of the ten gene families of the mammalian dataset. N ∗( N −1) Gene family Human gene # of genes # of CDS Length 2 I (FAM86) ENSG00000118894 6 14 10335 91 II (HBG017385) ENSG00000143867 6 10 8988 45 III (HBG020791) ENSG00000179526 6 10 11070 45 IV (HBG004532) ENSG00000173020 17 33 52356 528 V (HBG016641) ENSG00000147041 13 33 64950 528 VI (HBG014779) ENSG00000233803 28 44 45813 946 VII (HBG012748) ENSG00000134545 24 44 28050 946 VIII (HBG015928) ENSG00000178287 5 19 5496 171 IX (HBG004374) ENSG00000140519 13 30 36405 435 X (HBG000122) ENSG00000105717 11 24 27081 276 Total number of pairs of CDS 4011 For each gene family, the family identifier used in [6] or [12], the Ensembl identifier of a human gene member of the family, the number of human, mouse and cow genes in the family, the total number of CDS of these genes, the total sum of lengths of these CDS and the number of distinct pairs of CDS are given. Evaluation strategies We compared the accuracy of five pairwise global alignment methods, including the present method, for computing CDS alignments in the presence or absence of FS translation between the compared CDS. The five methods vary according to the alignment algorithm used, either the present CDS alignment algorithm called FsePSA allowing to penalize both FS translation initiation and extension, or the CDS alignment algorithm called MACSE [18] penalizing FS translation initiation, or the Needleman-Wunsch (NW) sequence alignment algorithm [24] penalizing neither. Table 2 summarizes the alignment algorithm and the values of parameters used for each of the five methods. The present CDS alignment algorithm is used in two of the five methods, namely fse and fse0. These two methods differ according to the value given to the parameter fs extend cost, either fs extend cost < 0 (−1, −0.5 or −0.2) for the method fse penalizing FS translation extension, or fs extend cost = 0 for the method fse0 not penalizing FS translation extension. The pairwise version of MACSE [18] is used in the method called macse p. The NW alignment algorithm is used in the last two methods, the method called needlenuc computing scores and alignments at the nucleotide level and the method called needleprot at the AA level. For all methods using both the amino acid and nucleotide scoring functions s aa and s an , s an was fixed to +1/-1 for match/mismatch, so that the overall score of 3 consecutive nucleotide identities in an alignment scores less than the smallest identity Jammali et al. Page 12 of 24 FAM86C1.002$ FAM86B1.001$ FAM86B2.202$ 14$ 159$ 101$ 46$ 35$ 133$ 89$ 149$ Alignment: /Users/ouaa2003/Projets/3_GeneProteinTree/lncs/code/needleman_wunsch/fse_250116/examples/FAM86.aln.fasta Seaview [blocks=10 fontsize=10 A4] on Wed May 18 13:53:27 2016 FAM86C1-002 FAM86B1-001 FAM86B2-202 1 ATGGCGCCCG AGGAGAACGC GGGGAGCGAA CTCTTGCTGC AGAGTTTCAA GCGCCGCTTC CTGGCAGCGC ATGGCGCCCG AGGAGAACGC GGGGACCGAA CTCTTGCTGC AGGGTTTTGA GCGCCGCTTC CTGGCGGTGC ---------- ---------- ---------- ---------- ---------- ---------- ---------- FAM86C1-002 FAM86B1-001 FAM86B2-202 71 GCGCCCTGCG CTCCTTCCGC TGGCAGAGCT TAGAAGCAAA GTTAAGAGAC TCATCAGATT CTGAGCTGCT GCACACTGCG CTCCTTCCCC TGGCAGAGCT TAGAGGCAAA GTTAAGAGAC TCATCAGATT CTGAGCTGCT ---------- ---------- ---------- ---------- ---------- ---------- ---------141 GCGGGATATT TTGCAGAAG- ---------- ---------- ---------- ---------- ---------GCGGGATATT TTGCAGAAGA CTGTGAGGCA TCCTGTGTGT GTGAAGCACC CGCCGTCAGT CAAGTATGCC ---------- ---------- ---------- ---------- ---------- ---------- -----ATGCC FAM86C1-002 FAM86B1-001 FAM86B2-202 211 ---------- ---------- ---------- CACGAGGCTG TCCACACAGA GCCTTTGGAT GAGCTGTACG TGGTGCTTTC TCTCAGAACT CATCAAAAAG ---------- ---------- ---------- ---------TGGTGCTTTC TCTCAGAACT CATCAAAAAG ---------- ---------- ---------- ---------- FAM86C1-002 FAM86B1-001 FAM86B2-202 281 AGGTGCTGGT GGAGACCCTG ATGGCCAAGG AGTCCACCCA GGGCCACCGG AGCTATTTGC T------------------ ---------- ---------- ---------- ---------- ---------- TCCTCAGGAG ---------- ---------- ---------- ---------- ---------- ---------- TCCTCAGGAG FAM86C1-002 FAM86B1-001 FAM86B2-202 351 ---------- ---------- ---------- ---------- ---------- ---------- ---------GCTCAGTCAC ACTCTCCAAG AGCACAGCCA TCATCTCCCA CGGTACCACA GGCCTGGTCA CATGGGATGC GCTCAGTCAC ACTCTCCAAG AGCACAGCCA TCATCTCCCA CGGTACCACA GGCCTGGTCA CATGGGATGC FAM86C1-002 FAM86B1-001 FAM86B2-202 421 ---------- ---------- ---------- ---------- ---------- ---GACGTGC TGTATTGCCC CGCCCTCTAC CTTGCAGAAT GGGCCATCGA GAACCCGGCA GCCTTCATTA ACAGACGTGC TGTATTGCCC CGCCCTCTAC CTTGCAGAAT GGGCCATCGA GAACCCGGCA GCCTTCATTA ACAGACGTGC TGTATTGCCC FAM86C1-002 FAM86B1-001 FAM86B2-202 491 AGAAGCCATC GTGTCGCTGG TCGGGGTCCT GCGGAGGCTG GCTGCCTGCC GGGAGCACCA GCGGGCTCCT AGAAGCCATC GTGTCGCTGG TCGGGGTCCT GCAGAGGCTG GCTGCCTGCC GGGAGCACAA GCGGGCTCCT AGAAGCCATC GTGTCGCTGG TCGGGGTCCT GCAGAGGCTG GCTGCCTGCC GGGAGCACAA GCGGGCTCCT FAM86C1-002 FAM86B1-001 FAM86B2-202 561 CAATTCTACA TGGCCCTTAC CGTCTGCAAC CCAGAGATGT GCCAGCTGTT CACCACCGAG CTATGCTGGA GA-------- ---------- ---------- ---------- ---------- ---------- ---------GAGGTCTACG TGGCCTTTAC CGTCCGCAAC CCAGAGACAT GCCAGCTGTT CACCACCGAG CTAGGCCGGG FAM86C1-002 FAM86B1-001 FAM86B2-202 631 CTGGGATCAG ATGGGAAGCG GAAGCTCATC ATGACCAGAA ACTGTTTCCC TACAGAGAGC ACTTGGAGAT ---------- ---------- ---------- ---------- ---------- ---------- ---------ATGGGATCAG ATGGGAAGCG GAAGCTCATC ATGACCAGAA ACTGTTTCCC TATGGAGAGC ACTTGGAGAT FAM86C1-002 FAM86B1-001 FAM86B2-202 701 GGCAAAGCTG A--------- -------------- ---------- ----GGCAATGCTG AACCTCACAC TGTAG FAM86C1-002 FAM86B1-001 FAM86B2-202 Figure3 4Top. Top.Rough Roughrepresentation representationofofthe thereal realalignment alignment of of CDS CDS FAM86C1-002, FAM86C1-002, FAM86B1-001 Figure FAM86B1-001 and FAM86B2-202. Rectangular colored portions represent concatenations of nucleotides in the and FAM86B2-202. Rectangular colored portions represent concatenations of nucleotides alignment while blank portions represent concatenations of gap symbols. The lengths of thein the alignmentwhile portions areportions given atrepresent the bottom. The colors ofofthe indicate alignment blank concatenations gapnucleotide symbols. regions The lengths of the coding frame in which they are translated, taking the frame of CDS FAM86C1-002 as reference. alignment portions are given at the bottom. The colors of the nucleotide regions indicate the For example, there is a nucleotide region of length 89 shared by the three CDS and translated in 3 coding frame in which there are translated, takingofthe frame CDS FAM86C1-002 different coding frames. Bottom. Real alignment three CDSof(Figure obtained using as thereference. visualization software [27]). Nucleotides to the structure ofin 3 For example, there is a seaview nucleotide region of lengthare 89colored shared according by the three CDScodon and translated the first CDS FAM86C1-002. di↵erent coding frames. Bottom. Real alignment of three CDS (Figure obtained using the visualization software seaview). score in s aa . All other parameters shared by several methods were given the same value for all methods. In particular, for the three methods fse, fse0 and macse p penalizing FS translation initiation, the parameter fs open cost was given the values −10, −20 or −30. All other parameters were fixed to the default values for the NW algorithm implementation of NCBI Blast at the nucleotide and AA levels [28]. We used the five methods to compute pairwise alignments between the pairs of CDS within each of the ten gene families of our dataset, yielding 4011 alignments in total for each of five methods. In the absence of available benchmarks for the direct evaluation of the accuracy of CDS alignments, we base our evaluation on four indirect strategies. Jammali et al. Page 13 of 24 Table 2 Description of the five methods considered in the experiment. Method fse fse0 macse p needleprot Alignment approach & specific parameters Present approach fs extend cost = −1; −0.5; −0.2 Present approach fs extend cost = 0 Ranwez et al. [18] stop cost = −100 NW [24] at AA level FS initiation cost fs open cost = -10; -20; -30 Other parameters AA gap open cost = −11 AA gap cost = −1 s aa = BLOSUM62 matrix s an = +1/-1 match/mismatch not applicable NT gap open cost = −5 NT gap cost = −2 needlenuc NW [24] at NT level not applicable s an = +2/-3 match/mismatch For each method, the alignment approach and the values of specific and common parameters are given. In the first strategy, we consider the CDS multiple alignment of each gene family obtained using MACSE [18] as a benchmark. This strategy exploits the fact that multiple alignments are usually more accurate than pairwise alignments. It then assumes that the MACSE multiple alignments are closer to the reality than the pairwise alignments obtained using the five methods. Note that all the pairwise alignment methods included in the comparison can be extended to multiple sequence alignment methods using classical strategies. Thus, the more accurate pairwise alignment methods should lead to more accurate multiple alignment methods. Here, we focus on the comparison of the pairwise versions of the methods. In the second strategy, we consider six composition criteria for a CDS pairwise alignment called Identity NT, Identity AA, Gap init, Gap length, FS init, FS length. The definitions of these criteria are given below, and used to compare the five methods. In the third strategy, we manually build and use as a benchmark, the real multiple alignment of three CDS from three paralogous human genes of the gene family I (FAM86). In the fourth strategy, we generate and use a set of three CDS splicing orthology groups, each group containing seven existing or putative CDS from seven genes of gene family I (FAM86). Based on the results of the large-scale experiments discussed in the following, the best compromise for default values of FsePSA parameters are −30 for fs open cost and −1 for fs extend cost. Discussion First strategy: Using MACSE multiple alignments as benchmark MACSE [18] was used with its default parameters (fs open cost = −30, stop cost = −100, s aa = BLOSUM62 matrix, gap open cost = −7, gap cost = −1) to compute the CDS multiple alignment of each of the ten gene families. For each MACSE mulN ( N −1) tiple alignment of N CDS, we consider the induced pairwise alignments 2 as a benchmark. In total, we then obtained a benchmark composed of 4011 pairwise alignments. In order to compare an alignment ( A0 , B0 ) obtained with one of the five methods to the corresponding alignment ( A”, B”) in the benchmark, we computed the number of nucleotides aligned in ( A0 , B0 ) with the same partner as in the benchmark alignment ( A”, B”). Table 3 shows the overall percentage of nucleotides aligned with the same partners as in the benchmark for each of the compared methods, for varying Jammali et al. Page 14 of 24 fs open cost (−10, −20 and −30) and fs extend cost (−1, −0.5 and −0.2). It shows that the different versions of the fse method and the fse0 method have the best scores greater than 79.4%, followed by the needleprot method with a score of 78.82%. On the opposite, the needlenuc and macse p method with f s open cost= −30 return the worst scores, respectively 50.95% and 47.35%. These results also show that the fse method is more robust to the fs open cost parameter changes as compared to the macse p method, whose scores show a large variation between 47.35% and 78.29%. Note that the needlenuc and needleprot do not account for the fs open cost parameter. fse0 Method Identity NT Identity AA Gap init Gap length FS init FS length fse0 3281 (1158) 5376 (1222) -495 (1606) -2718 (1521) 0 (1672) 0 (1672) fse -10 (1672) macse p 8120 (955) 27942 (676) 3701 (711) 9618 (1102) 0 (1672) 0 (1672) needlenuc 170239 (156) -82002(442) 104811 (218) 21422(427) 44488 (256) 263365 (256) needleprot 1090957 2047608 10230 530688 0 0 fse0 1409 (2612) -8622 (2672) -3564 (3169) -9984 (3057) 0 (3441) 0 (3441) fse -20 (3441) macse p 24909 (1437) 95844 (1011) 13778 (1076) 30884 (1791) 0 (3441) 0 (3441) needleenuc 547203 (176) -177285(680) 317256 (219) 52510 (552) 138204 (257) 844401 (257) needleprot 2000228 3494760 31793 1313658 0 0 fse0 1368 (2834) -10788 (2912) -4047 (3448) -11316 (3321) 0 (3740) 0 (3740) fse -30 (3740) macse p 27840 (1547) 106512 (1078) 15561 (1117) 34726 (1846) 0 (3740) 0 (3740) needlenuc 610305 (177) -192231 (709) 351748 (219) 47356 (573) 154255 (257) 948418 (257) needleprot 2143630 3715632 35296 1439784 0 0 For varying values of the parameter fs open cost, the number of CDS pairs in the dataset is given. The values of the criteria for the reference method “needleprot” are indicated in bold characters. For each of the other methods (fse, fse0, macse p, needlenuc), the variations of the criteria values as compared to the reference values are given. For each criteria and each method, the number of CDS pairs that have the closest value to the reference needleprot value is given in parentheses. fs open cost (# CDS pairs) Table 4 Values of the six criteria for the noFS dataset (variations as compared to needleprot). fs open cost fse fse fse macse p needlenuc needleprot (-1) (-0.5) (-0.2) -10 79.58 (1404) 79.40 (1364) 79.52 (1415) 79.58 (1433) 77.17 (1076) -20 79.68 (1550) 79.68 (1526) 79.65 (1558) 79.67 (1552) 78.29 (1389) 50.95 (255) 78.82 (972) -30 79.75 (1558) 79.47 (1529) 79.60 (1546) 79.63 (1547) 47.35 (742) Percentage of nucleotides aligned with the same partner as in the benchmark alignments induced by the MACSE multiple alignments, for each method for varying fs open cost (−10, −20 and −30) and fs extend cost (−1, −0.5 and −0.2). In each case, the number of CDS pairs with an alignment that presents the highest similarity with the corresponding benchmark alignment as compared to the other methods is given in parenthesis. The best results are indicated in bold. Table 3 Comparison with MACSE multiple alignments benchmark. Jammali et al. Page 15 of 24 Jammali et al. Page 16 of 24 Second strategy: Using six composition criteria for CDS pairwise alignment Six criteria were defined and used to compare the five pairwise alignment methods. Given a pairwise CDS alignment, the first criterion Identity NT counts the number of gap-free columns in the alignment containing a nucleotide match. The second criterion Identity AA counts the number of IM and FSext codons c in the alignment that are aligned with a triplet of nucleotides yielding the same amino acid as c. The third criterion Gap init is the number of gap-containing columns in the alignment, either insertion or deletion columns that are preceded by a different type of column. The fourth criterion Gap length is the overall number of gap-containing columns in the alignment. The fifth criterion FS init is the number of FS translation segments found in the alignment. The last criterion FS length is the overall number of columns in the alignment intersecting a FSext codon. Note that the definitions of the six criteria exploit the definitions of codon sets used in Definition 3 but they are independent of any alignment scoring scheme. For example, for the alignment depicted in Figure 2, Identity NT = 28, counting all gap-free columns except the five columns at the positions {9, 12, 15, 42, 45} containing a nucleotide mismatch. Identity AA = 14, counting all IM and FSext codons except the two IM codons AAG and AAT ending at position 15 yielding two different amino acids K and N, and the FSext codon AAT ending at position 42 yielding the amino acid N different from the amino acid K yielded by the triplet AAG. Gap init = 7, counting the positions {4, 16, 22, 27, 31, 36, 44}. FS init = 3, counting the positions {18, 28, 39}. The two last criteria have the values Gap length = 15 and FS length = 11. For each of the nine cases obtained by combining the values of the parameters fs open cost (−10, −20 or −30) and fs extend cost (−1, −0.5 or −0.2), we considered the 4011 pairs of CDS from the ten gene families dataset, and partitioned them into three sets. For each case, the first set called the noFS dataset is composed of the pairs of CDS for which the pairwise alignments obtained using the fse0, fse and macse p methods all have the criteria FS init = 0. The second set called the FS dataset is composed of the pairs of CDS for which the alignments obtained using the fse0, fse and macse p methods all have the criteria FS init > 0. The third set called the ambiguFS dataset is composed of the remaining pairs of CDS. Note that, in all nine cases, the set of CDS pairs for which FS init = 0 with the macse p method was strictly included in the set of CDS pairs for which FS init = 0 with the fse method. For each of the nine cases, we computed the overall value of the six criteria for each method (fse0, fse, macse p, needlenuc and needleprot) and each dataset (noFS, FS and ambiguFS). Tables 4, 5 and 6 present the results. Results for the noFS datasets. For the noFS datasets, we assume that the real alignments should not contain FS translations. So, the needleprot method most likely computes the more accurate alignments since it does not allow any FS translation in the alignments. Indeed, it computes a maximum score NW alignment at the AA level and back-translates this alignment at the nucleotide level. We then take the needleprot result as a reference for the noFS dataset, in all cases. By construction of the noFS dataset, for a fixed value of the parameter fs open cost, the fse0 and fse methods necessarily return two alignments with the same similarity Jammali et al. Page 17 of 24 score for each pair of CDS of the dataset. Indeed, we observed that, for each value of fs open cost (−10, −20 or −30), the alignments obtained using the methods fse0 or fse with varying values of the parameter fs extend cost are unchanged. Table 4 summarizes the results for fs open cost = −10, −20 and −30, presenting the results of the varying versions of fse and fse0 in a single line in the 3 cases. It shows that the results of the fse and fse0 methods are the closest to the reference for all the six criteria in all cases. However, they slightly overestimate or underestimate the criteria. The tendency of overestimating the Identity AA and all other criteria is particularly accentuated for the macse p method as compared to the fse and fse0 methods, in all cases. On the opposite, the needlenuc method always largely underestimates the Identity AA, while overestimating all other criterion. Results for the FS datasets. For the FS datasets, we assume that the real alignments must contain FS translations. So, the needleprot method can no longer produce the most accurate results. On the contrary, it is most likely that it underestimates the Identity AA criterion. Indeed, it correctly aligns AA in CDS regions that are free of FS translation, but in FS translation regions, it either leads to several AA mismatches in the case of high mismatches scores, or to an overestimation of the Gap init criterion. As expected, we observed that the value of Identity AA for the needleprot method was always the lowest (data shown in the Additional file 3). We focus on the four other methods. Table 5 summarizes the results for the nine cases considered. For the Identity NT and Identity AA criteria, the differences between the values for the four methods are negligible. The main differences between the results reside in the values of the Gap init and FS init criteria. In particular, the FS init criterion is useful to compare the accuracy of the methods for correctly identifying real FS translation regions. In [6] (for family I) and [12] (for families II to X), at most one FS translation region was detected and manually validated for each pair of CDS of the ten gene families. So, the expected number of FS translation regions per alignment in the FS data is 1. In Table 5, we observe that, in all cases, the fse and fse0 methods are the only methods for which the average numbers of FS init are close to 1 with +/- standard error values smaller than 1. The macse method and especially the needlenuc method overestimate the number of FS translation regions per alignment with large standard error values in all cases. Results for the ambiguFS datasets. For the ambiguFS datasets, all methods do not agree for the presence or absence of FS translation regions between the pairs of CDS. Note that the needlenuc method reports FS translations for all pairs of CDS, with the highest average number of FS translation regions per alignment in all cases (data shown in the Additional file 3). As needlenuc is already shown to perform poorly in both the absence and the presence of FS translation regions, we focus on the four other methods. Table 6 summarizes the results. We observe that, for all criteria, macse p has higher values than fse0, fse and needleprot that have similar values. The most significant difference between the results resides in the values for the FS init and FS length criteria. The fse method always reports a null or a very small number of FS regions with an average FS init equals to 1 as expected. In all cases, the fse0 and macse methods overestimate the number of FS translation regions per alignment. Table 5 Values of the six criteria for the FS dataset. fs open fs extend cost Identity Identity Gap Gap FS init FS Method cost NT AA init length length (# CDS pairs) (avg) fse0 166002 325212 895 60662 226 (1.06 ±0.25) 20219 -1 fse 165720 325026 901 60624 216 (1.01 ±0.14) 18705 macse p 166167 324999 1445 61562 432 (2.03 ±3.06 ) 22742 (212) needlenuc 172959 321348 5053 60038 2103 (9.91 ±26.73) 29616 fse0 252590 464712 2400 114859 482 (1.24 ±0.47) 31777 -0.5 fse 251647 463407 2387 115269 401 (1.03 ±0.19) 26982 -10 (386) macse p 253715 465594 4161 117165 1306 (3.38 ±4.53) 41742 needlenuc 279682 452673 19408 113195 8032 (20.80 ±31.02) 68226 fse0 371062 641748 5334 204370 805 (1.30 ±0.52) 43381 -0.2 fse 370260 640377 5270 204806 688 (1.11 ±0.33) 37376 (619) macse p 374729 646893 9308 208344 2893 (4.67 ±5.34) 72030 needlenuc 442564 618270 48799 209420 19751 (31.90 ±34.48) 141217 fse0 123814 244350 461 40315 168 (1.04 ±0.20) 17770 -1 fse 123610 244149 468 40195 164 (1.01 ±0.14) 16924 (161) macse p 123541 243591 709 40585 223 (1.38 ±1.03) 18119 needlenuc 125452 242742 1493 39031 650 (4.03 ±5.85) 19405 fse0 147476 291147 549 49485 197 (1.04 ±0.20) 19599 -0.5 fse 147401 291048 557 49363 194 (1.02 ±0.16) 19279 -20 (189) macse p 147143 290271 838 49841 260 (1.37 ±0.98) 19976 needlenuc 149551 289086 1872 47515 808 (4.27 ±6.17) 21440 fse0 161906 318117 723 55383 225 (1.04 ±0.20) 21300 -0.2 fse 161865 318099 732 55393 223 ( 1.03 ±0.18) 21115 (216) macse p 161622 317205 1061 55715 306 (1.41 ±0.99) 21997 needlenuc 165260 315531 2851 53613 1186 (5.49 ±6.82) 24403 fse0 47071 91266 230 26303 76 (1.07 ±0.26) 12845 -1 fse 46872 91032 233 26183 72 (1.01 ±0.12) 12302 macse p 46936 90876 372 26325 118 (1.66 ±1.25) 13142 (71) needlenuc 48290 91017 866 26135 391 (5.50 ±5.67) 13829 fse0 120558 237768 445 37975 159 (1.03 ±0.18) 17554 -0.5 fse 120504 237678 452 37851 157 (1.01 ±0.14) 17319 -30 (154) macse p 120338 237084 691 38047 212 (1.37 ±1.00) 17926 needlenuc 122084 236904 1321 37531 575 (3.73 ±5.14) 18877 fse0 137451 271041 525 46049 184 (1.03 ±0.18) 18995 -0.2 fse 137440 271008 531 45917 183 (1.02 ±0.17) 18872 (178) macse p 137175 270258 803 46187 244 ( 1.37 ±0.97) 19395 needlenuc 139489 269139 1803 44303 779 (4.38 ±6.27) 20859 For varying values of the parameters fs open cost and fs extend cost, the number of CDS pairs in the dataset is given. The values of the criteria for the fse, fse0, macse p, needlenuc methods are indicated. For each method, the average number of FS init per alignment, with corresponding standard error values are also indicated. Jammali et al. Page 18 of 24 fs extend cost (# CDS pairs) Method Identity Identity Gap Gap FS init FS NT AA init length (avg) length fse0 (862) 1095102 1737105 24489 908218 1111 (1.28 ±0.54) 42730 fse 1086546 1719774 23483 906540 0 0 -1 (2127) macse p (2076) 1124316 1790199 45335 936002 12436 (5.99 ±4.96) 216772 needleprot 1085007 1723950 25288 916518 0 0 fse0 (688) 1008514 1597605 22984 854021 855 (1.24 ±0.53 ) 31172 fse (2) 1003293 1587258 22102 853793 2 (1.0 ±0 ) 80 -10 -0.5 (1953) macse p (1902) 1036768 1649604 42619 880399 11562 (6.07 ±4.91) 197772 needleprot 1001957 1591134 23790 863199 0 0 fse0 (455) 890042 1420569 20050 764510 532 (1.16 ±0.48) 19568 fse (3) 887372 1415403 19465 764162 3 (1.0 ±0) 92 -0.2 (1720) macse p (1669) 915754 1468305 37472 789220 9975 (5.97 ±4.75) 167484 needleprot 886178 1418748 20955 772272 0 0 fse0 (100) 219277 358554 3633 153487 120 (1.2 ±0.40) 6937 fse 216936 353586 3619 152391 0 0 -1 (409) macse p (403) 225976 374391 6509 158165 1348 (3.34 ±3.00) 36179 needleprot 216842 355656 4172 153957 0 0 fse0 (72) 195615 311757 3545 144317 91 (1.26 ±0.44) 5108 fse 194048 308448 3505 144045 0 0 -20 -0.5 (381) macse p (375) 202374 327711 6380 148909 1311 (3.49 ±3.05) 34322 needleprot 193980 310632 4051 145563 0 0 fse0 (45) 181185 284787 3371 138419 63 (1.4 ±0.49) 3407 fse (1) 180151 282693 3344 138217 1 (1.0 ±0) 40 -0.2 (354) macse p (348) 187895 300777 6157 143035 1265 (3.63 ±3.11) 32301 needleprot 180116 284946 3883 139731 0 0 fse0 (119) 151090 289617 805 42437 120 (1.01 ±0.09) 6818 fse 147590 282018 852 40221 0 0 -1 (200) macse p (200) 152626 292254 1309 43043 378 (1.89 ±2.16) 14515 needleprot 147228 281472 933 40455 0 0 fse0 (36) 77603 143115 590 30765 37 (1.02 ±0.16) 2109 fse 76678 141108 626 29913 0 0 -0.5 (117) macse p (117) 79224 146046 990 31321 284 (2.42 ±2.65) 9731 -30 needleprot 76561 141036 703 30099 0 0 fse0 (12) 60710 109842 510 22691 12 (1.0 ±0) 668 fse 60407 109170 518 22491 0 0 -0.2 (93) macse p (93) 62387 112872 878 23181 252 (2.70 ±2.89) 8262 needleprot 60270 109122 581 22677 0 0 For varying values of the parameters fs open cost and fs extend cost, and for each method, the number of CDS pairs displaying a FS translation is given. The values of the criteria for each method are indicated. For each method, the average number of FS init per alignment, with corresponding standard error values are also indicated. fs open cost Table 6 Values of the six criteria for the ambiguFS dataset. Jammali et al. Page 19 of 24 Jammali et al. Page 20 of 24 Third strategy: Using a 3-CDS manually-built benchmark We manually built the real pairwise alignments of three CDS from three paralogous human genes of gene family I, the CDS FAM86C1-002 coding for protein ENSP00000352182.4, FAM86B1-001 coding for protein ENSP00000431362.1 and FAM86B2-202 coding for protein ENSP00000311330.6. The real multiple alignment of the three CDS is roughly depicted and detailed in Figure 4. From Figure 4, we observe that FAM86C1-002 shares with FAM86B1-001 a nucleotide region of length 159 translated in the same frame and a nucleotide region of length 89 with FS translation, while it only shares with FAM86B2-202 a nucleotide region of length 238 (89 + 149) entirely under FS translation. It is then clear that CDS FAM86C1-002 and FAM86B1-001 are the most similar. Figure 4 also shows that each pair of CDS shares a single FS translation region. Table 7 shows the normalized pairwise similarity scores and the number of FS translation regions computed by the five alignment methods (the pairwise alignments computed by the five methods with varying fs open cost and fs extend cost are given in the Additional file 4). It shows that needleprot and fse (in all cases where fs extend cost= -1) are the only two methods that allow to infer that FAM86C1-002 and FAM86B1-001 are the most similar. Table 7 also illustrates the fact that needlenuc and macse p strongly overestimate the number of FS translation regions per alignment in all cases. The fse method with the parameters fs open cost= -10 and fs extend cost= -1 is the only method that allows to infer that FAM86C1-002 and FAM86B1-001 are the most similar and to detect a single FS translation region for each alignment. Table 7 Pairwise similarity scores and number of FS translation regions computed by the methods. Method C1-002 vs B1-001 C1-002 vs B2-202 B1-001 vs B2-202 fse0 0.42 (1) 0.58 (2) 0.45 (1) fse (-1) 0.33 (1) 0.27 (1) 0.18 (1) -10 fse (-0.5) 0.37 (1) 0.43 (1) 0.31 (1) fse (-0.2) 0.40 (1) 0.52 (1) 0.39 (1) macse p 0.40 (4) 0.54(6) 0.44 (1) fse0 0.39 (1) 0.54 (1) 0.41 (1) fse (-1) 0.36 (0) 0.24 (1) 0.14 (1) -20 fse (-0.5) 0.34 (1) 0.39 (1) 0.28 (1) fse (-0.2) 0.37 (1) 0.48 (1) 0.36 (1) macse p 0.33 (4) 0.47 (6) 0.35 (1) fse0 0.35 (1) 0.50 (1) 0.38 (1) fse (-1) 0.36 (0) 0.20 (1) 0.11 (1) -30 fse (-0.5) 0.36 (0) 0.35 (1) 0.25 (1) fse (-0.2) 0.33 (1) 0.44 (1) 0.33 (1) macse p 0.27 (4) 0.39 (6) 0.29 (1) needlenuc 0.16 (23) 0.35 (15) -0.36 (1) needleprot 0.38 (0) -0.12 (0) -0.13 (0) Normalized pairwise similarity scores and number of FS translation regions computed by the five methods for the 3-CDS manually-built benchmark composed of CDS FAM86C1-002, FAM86B1-001 and FAM86B2-202 (Similarity scores are normalized by dividing them by the lengths of alignments). fs open cost Fourth strategy: Inferring CDS splicing orthology groups and protein phylogenies Based on the three CDS used in the previous strategy, CDS FAM86C1-002 from human gene ENSG00000158483, FAM86B1-001 from human gene ENSG00000186523 and FAM86B2-202 from human gene ENSG00000145002, we generated a dataset Jammali et al. Page 21 of 24 of three CDS splicing orthology groups composed of 21 homologous CDS. Each group contains one of the three initial CDS and its six splicing orthologs in the following set of seven genes from gene family I : human genes ENSG00000158483 denoted H1, ENSG00000186523 denoted H2 and ENSG00000145002 denoted H3, each containing one of the initial CDS, chimpanzee gene ENSPTRG00000007738 denoted Ch, mouse gene ENSMUSG00000022544 denoted M, rat gene ENSRNOG00000002876 denoted R and cow gene ENSBTAG00000008222 denoted Co. The CDS splicing orthologs were predicted based on the spliced alignment tool Splign [29] as follows: for each initial CDS A1 of a gene A and each gene B different from A, A1 was aligned to B and a putative or existing CDS of B ortholog to A1 with the same splicing structure was inferred. The 21 resulting CDS are given in Additional file 5. We computed the normalized pairwise similarity scores between the CDS, using the five alignment methods (the pairwise alignments computed by the five methods with varying fs open cost and fs extend cost are given in the Additional file 5). For each method, we constructed a phylogeny using an UPGMA and a Neighbor-Joining (NJ) algorithm, based on the computed CDS similarity matrix. The UPGMA algorithm was used to classify the CDS into three groups and infer the similarity relationships between the groups independently of any rate of evolution. The NJ algorithm was used to reconstruct the phylogeny inside each group. Table 8 summarizes the results. The three splicing orthology groups are denoted G1 (containing CDS C1-002), G2 (containing CDS B1-001) and G3 (containing CDS B2-202). All methods allow to correctly classify the CDS into the three initial splicing orthology groups G1, G2, and G3. However, the needleprot and fse methods are the only methods that allow to infer the correct similarity relationships ((G1,G2),G3) between the groups, confirming the results of the third evaluation strategy. For all methods, the CDS phylogeny reconstructed inside the group G2 is (Co,((M,R),((H1,Ch),(H2,H3)))) inducing an evolution of the seven genes with a speciation event at the root of the gene tree. The phylogeny reconstructed for the groups G1 and G3 is ((M,R),(Co,((H1,Ch),(H2,H3)))), inducing an evolution of the genes with a duplication event at the root of the phylogeny. Comparing of the running times Table 9 shows the running times for each of the five methods on the three first gene families of our dataset on a 24 × 2.1GHz processor with 10GB of RAM. The needleprot method is the fastest, followed by macse p and then needlenuc, while fse and fse0 are the slowest methods. Note that for fse, fse0, needlenuc and needleprot, the used implementations are in Python, while we used a JAVA implementation for macse p provided by its authors. This explains the fact that macse p is unexpectedly faster here than fse, fse0, and even needlenuc. Indeed, the five methods share the same asymptotic time complexity, but the exact complexity of each of them is dependent on the number of calls of the main recurrence formulas in an execution, and the number of cases considered in each recurrence formula. The exact computational complexity of the five methods in terms of the lengths n and m of two compared CDS are Jammali et al. Page 22 of 24 Table 8 Similarity relationships between the groups G1, G2 and G3 for the five methods. Method ((G1,G3),G2) ((G1,G2),G3) fse (-1) X fse (-0.5) X -10 fse (-0.2) X fse0 X macse p X fse (-1) X fse (-0.5) X -20 fse (-0.2) X fse0 X macse p X fse (-1) X fse (-0.5) X -30 fse (-0.2) X fse0 X macse p X needlenuc X needleprot X Similarity relationships between the splicing orthology groups G1, G2 and G3 computed using the similarity matrices of the five methods for the 21-CDS dataset. fs open cost 12.55 × nm for fse and fse0 (as shown in the proof of Theorem 1), 15 × nm for macse p, 3 × nm for needlenuc and 0.33 × nm for needleprot. Table 9 Running time in seconds for each method. Gene family fse0 fse macse p needlenuc needleprot I 299 291 53 97 22 II 270 260 45 93 20 III 377 389 54 62 20 For each method and gene families I, II, and III, the running time was calculated on the same computer (24 processors of 2.1GHz each and 10GB of RAM) with the parameters fs open cost=−20 and fs extend cost=−0.2. Conclusions In this paper, we introduce a new scoring model for the alignment of CDS accounting for frameshift translation length. The motivation for this new scoring scheme is the increasing evidence for protein divergence through frameshift translation in eukaryotic coding gene families, calling for automatic methods able to compare, align and classify CDS while accounting for their codon structure. The aim of this paper is to validate the necessity of accounting for frameshift translation length when comparing CDS and show that computing a maximum score pairwise alignment under the new scoring scheme is possible in quadratic time complexity. The results of comparing five CDS alignment methods for the pairwise alignment of CDS from ten eukaryotic gene families show that our method is the best compromise for sets of CDS in which some pairs of CDS display FS translations while some do not. Future work will make use of benchmarks of CDS alignments generated manually and by simulation in order to confirm these experimental results. We also defer to a future work the extended study of our model’s robustness to parameter changes and the calibration of its parameters using real data benchmarks. The perspectives of this work also include the design of a heuristic algorithm using local alignment that will achieve scalability for large datasets while keeping high accuracy, and the extension of the method toward multiple alignment. Finally, we plan to apply the algorithms for the discovery of non-annotated frameshifts, and the evaluation of the extent of frameshifts in eukaryotic gene families. Jammali et al. Page 23 of 24 Availability of supporting data An implementation of the pairwise alignment method in Python is available at https://github.com/UdeS-CoBIUS/FsePSA. The dataset used in section Results is available in the Additional files. List of abbreviations CDS: Coding DNA Sequence; FS: Frameshift; NT: nucleotide; AA: amino acid; NW: Needleman-Wunsch. Declarations Author’s contributions SJ, EK, FB and AO wrote the program and its documentation. SJ and AO conceived the study and its design. SJ, EK and AR ran the experiments. SJ, EK and AO analyzed and interpreted the data. SJ and AO wrote the manuscript. SJ, EK, MS and AO critically revised the manuscript. All authors read and approved the final manuscript. Acknowledgements EK has a scholarship from the Faculty of Science of Université de Sherbrooke. AO is funded by the Canada Research Chair in Computational and Biological Complexity and the Université de Sherbrooke. Competing interests The authors declare that they have no competing interests. Ethics approval and consent to participate Not applicable. Consent for publication Not applicable. Funding Research funded by the Canada Research Chairs (CRC) (CRC Tier2 Grant 950-230577) and Université de Sherbrooke.. Author details 1 Département d’informatique, Faculté des Sciences, Université de Sherbrooke, Sherbrooke, J1K2R1 QC, Canada. 2 Département de biochimie, Faculté de médecine et des sciences de la santé, Université de Sherbrooke, Sherbrooke, J1E4K8 QC, Canada. References 1. Zambelli, F., Pavesi, G., Gissi, C., Horner, D.S., Pesole, G.: Assessment of orthologous splicing isoforms in human and mouse orthologous genes. BMC genomics 11(1), 1 (2010) 2. Barbosa-Morais, N.L., Irimia, M., Pan, Q., Xiong, H.Y., Gueroussov, S., Lee, L.J., Slobodeniuc, V., Kutter, C., Watt, S., Çolak, R., et al.: The evolutionary landscape of alternative splicing in vertebrate species. Science 338(6114), 1587–1593 (2012) 3. Christinat, Y., Moret, B.M.: A transcript perspective on evolution. IEEE/ACM Transactions on Computational Biology and Bioinformatics (TCBB) 10(6), 1403–1411 (2013) 4. Kuitche, E., Lafond, M., Ouangraoua, A.: Reconstructing protein and gene phylogenies by extending the framework of reconciliation. To appear in Proceedings of International Conference on Bioinformatics and Computational Biology (BICOB) (2017). arXiv preprint arXiv:1610.09732 5. Pruitt, K.D., Harrow, J., Harte, R.A., et al.: The consensus coding sequence (CCDS) project: Identifying a common protein-coding gene set for the human and mouse genomes. Genome Research 19(7), 1316–1323 (2009) 6. Okamura, K., Feuk, L., Marquès-Bonet, T., Navarro, A., Scherer, S.W.: Frequent appearance of novel protein-coding sequences by frameshift translation. Genomics 88(6), 690–697 (2006) 7. Barmak, M., Christopher, L.: A genomic view of alternative splicing. nature genetics 30, 13–19 (2003) 8. Stoffers, D., Zinkin, N., Stanojevic, V., Clarke, W., Habener, J.: Pancreatic agenesis attributable to a single nucleotide deletion in the human ipf1 gene coding sequence. nature genetics 15(1), 106–110 (1997) 9. IKUO, Y., YUICHI, M., HISAO, S., YOSHIFUMI, H., SHUJI, I., YOSHITAKA, M., NOBUO, M., YUTAKA, O.: Nucleotide deletion resulting in frameshift as a possible cause of complete thyroxine-binding globulin deficiency in six japanese families. nature genetics 73(2), 262–267 (1991) 10. Robin, K.: On programmed ribosomal frameshifting: the alternative proteomes. Front Genet 3(242), 1–10 (2012) 11. Wei, S., Valerie, B., Jonathan, S., Mary, K., Frank, M., John, M., Claudia, S., Natalia, V., Alexander, L., Robert, S., John, C.: Analysis of 454 sequencing error rate, error sources, and artifact recombination for detection of low-frequency drug resistance mutations in hiv-1 dna. Retrovirology 10(18), 1–16 (2013) 12. Raes, J., Van de Peer, Y.: Functional divergence of proteins through frameshift mutations. Trends in Genetics 21(8), 428–431 (2005) 13. Ogura, Y., Bonen, D., Inohara, N., Nicolae, D., Chen, F., Ramos, R., Britton, H., Moran, T., Karaliuskas, R., Duerr, R., Achkar, J., Brant, S., Bayless, T., Kirschner, B., Hanauer, S., Nunez, G., Cho, J.: A frameshift mutation in NOD2 associated with susceptibility to Crohn’s disease. Nature 411, 601 (2001) 14. Abascal, F., Zardoya, R., Telford, M.J.: TranslatorX: multiple alignment of nucleotide sequences guided by amino acid translations. Nucleic Acids Research, 291 (2010) 15. Morgenstern, B.: DIALIGN: multiple DNA and protein sequence alignment at BiBiServ. Nucleic Acids Research 32(suppl 2), 33–36 (2004) Jammali et al. Page 24 of 24 16. Gı̂rdea, M., Noé, L., Kucherov, G.: Back-translation for discovering distant protein homologies in the presence of frameshift mutations. Algorithms for Molecular Biology 5(1), 1 (2010) 17. Moreira, A., Maass, A.: TIP: protein backtranslation aided by genetic algorithms. Bioinformatics 20(13), 2148–2149 (2004) 18. Ranwez, V., Harispe, S., Delsuc, F., Douzery, E.J.: MACSE: Multiple Alignment of Coding SEquences accounting for frameshifts and stop codons. PLoS One 6(9), 22594 (2011) 19. Danny, B., Catherine, L., Cyntia, B., Guillaume, T., Julie, M., Xavier, R.: An out-of-frame overlapping reading frame in the ataxin-1 coding sequence encodes a novel ataxin-1 interacting protein. THE JOURNAL OF BIOLOGICAL CHEMISTRY 288(30), 21824–21835 (2013) 20. Hein, J.: An algorithm combining DNA and protein alignment. Journal of Theoretical Biology 167(2), 169–174 (1994) 21. Pedersen, C.N., Lyngsø, R., Hein, J.: Comparison of coding DNA. In: Combinatorial Pattern Matching, pp. 153–173 (1998). Springer 22. Arvestad, L.: Aligning coding DNA in the presence of frame-shift errors. In: Combinatorial Pattern Matching, pp. 180–190 (1997). Springer 23. Sankoff, D., Kruskal, J.B.: Time warps, string edits, and macromolecules: the theory and practice of sequence comparison. Reading: Addison-Wesley Publication, 1983, edited by Sankoff, David; Kruskal, Joseph B. 1 (1983) 24. Needleman, S.B., Wunsch, C.D.: A general method applicable to the search for similarities in the amino acid sequence of two proteins. Journal of Molecular Biology 48(3), 443–453 (1970) 25. Altschul, S.F., Erickson, B.W.: Optimal sequence alignment using affine gap costs. Bulletin of mathematical biology 48(5-6), 603–616 (1986) 26. Cunningham, F., Amode, M.R., Barrell, D., et al.: Ensembl 2015. Nucleic Acids Research 43(D1), 662–669 (2015) 27. Gouy, M., Guindon, S., Gascuel, O.: Seaview version 4: a multiplatform graphical user interface for sequence alignment and phylogenetic tree building. Molecular biology and evolution 27(2), 221–224 (2010) 28. Johnson, M., Zaretskaya, I., Raytselis, Y., Merezhuk, Y., McGinnis, S., Madden, T.L.: NCBI BLAST: a better web interface. Nucleic Acids Research 36(suppl 2), 5–9 (2008) 29. Kapustin, Y., Souvorov, A., Tatusova, T., Lipman, D.: Splign: algorithms for computing spliced alignments with identification of paralogs. Biology direct 3(1), 20 (2008) Additional Files Additional file 1 – Proof of Lemma 1 PDF file containg the detailed proof of Lemma 1. Additional file 2 – CDS of the ten gene families Zip file containing the CDS files at the fasta format for each of the ten gene families considered in the Results section. Additional file 3 – Additional lines for Tables 5 and 6 PDF file containing additional lines for Tables 5 (for needleprot) and 6 (for needlenuc) of the Results section. Additional file 4 – Pairwise alignments for the 3-CDS benchmark Zip file containing the sequence file and the pairwise alignment files at the fasta format for the manually-built 3-CDS benchmark considered in the Results section, for each of the five methods and each parameter configuration. Additional file 5 – Pairwise alignments for the 21-CDS dataset Zip file containing the sequence file and the pairwise alignment files at the fasta format for the 21-CDS benchmark considered in the Results section, for each of the five methods and each parameter configuration.
8cs.DS
Cautious NMPC with Gaussian Process Dynamics for Miniature Race Cars arXiv:1711.06586v1 [cs.SY] 17 Nov 2017 Lukas Hewing1 , Alexander Liniger2 and Melanie N. Zeilinger1 Abstract— This paper presents an adaptive high performance control method for autonomous miniature race cars. Racing dynamics are notoriously hard to model from first principles, which is addressed by means of a cautious nonlinear model predictive control (NMPC) approach that learns to improve its dynamics model from data and safely increases racing performance. The approach makes use of a Gaussian Process (GP) and takes residual model uncertainty into account through a chance constrained formulation. We present a sparse GP approximation with dynamically adjusting inducing inputs, enabling a real-time implementable controller. The formulation is demonstrated in simulations, which show significant improvement with respect to both lap time and constraint satisfaction compared to an NMPC without model learning. I. I NTRODUCTION Control of autonomous cars is a challenging task and has attracted considerable attention in recent years [1]. One particular case of autonomous driving is autonomous racing, where the goal is to drive around a track as fast as possible, potentially to race against competitors and to avoid collisions [2]. In order to achieve high performance at these extreme conditions, racing teams today spend a significant amount of time and effort on modeling, which is challenging especially near the limits of tire adhesion [3]. Learning-based control methods have been proposed to address this challenge and show great potential towards improving racing performance [4]. They do, however, often suffer from poor model accuracy and performance during transient learning phases. This can lead to violation of critical constraints [5] related to keeping the car on track and avoiding collisions, compromising not only performance, but the success of the entire race. In addition, iteratively learning the racing task on a lap-by-lap basis, as considered e.g. in [6], suffers from poor generalization and does typically not allow for maintaining high performance for dynamic racing tasks, such as obstacle avoidance or overtaking. This paper addresses these challenges by learning the dynamics model from data and considering model uncertainty to ensure constraint satisfaction in a nonlinear model predictive control (NMPC) approach, offering a flexible framework for racing control. Recently, a number of autonomous racing control methods were presented that rely on NMPC formulations. An NMPC racing approach for miniature race cars was proposed in [7], *This work was supported by the Swiss National Science Foundation under grant no. PP00P2 157601 / 1. 1 Institute for Dynamic Systems and Control, ETH Zurich, Zurich, Switzerland [email protected], [email protected] 2 Institute for Automatic Control, ETH Zurich, Zurich, Switzerland [email protected] which uses a contouring control formulation to maximize track progress over a finite horizon and enables obstacle avoidance. It was extended to a stochastic setting in order to take model uncertainty into account in [8] and [9]. Using model learning in an MPC framework allows for generalizing from collected data and for improving performance in varying racing tasks. This was, for instance, demonstrated in [10] by using the mean estimate of a Gaussian Process (GP) as a dynamics model for an NMPC method based on [7]. Furthermore, the MPC approach recently proposed in [11] was applied to the problem of autonomous racing, where the model is improved with an iterative parameter estimation technique [12]. The method presented in this paper makes use of GP regression to improve the dynamics model from measurement data, since GPs inherently provide a measure for residual model uncertainty, which is integrated in a cautious NMPC controller. To this end we extend the approach presented in [7] with a learning module and reformulate the controller in a stochastic setting. A key element differentiating the approach from available results is the stochastic treatment of a GP model in an NMPC controller to improve both performance and constraint satisfaction properties. We derive a tractable formulation of the problem that exploits both the improved dynamics model and the uncertainty and show how chance constraints on the states can be approximated in deterministic form. The framework thereby allows for specifying a minimum probability of satisfying critical constraints, such as track boundaries, offering an intuitive and systematic way of defining a desired trade-off between aggressive driving and safety in terms of collision avoidance. While the use of GPs in MPC offers many benefits, it poses computational challenges for use with fast sampled and larger scale systems, such as the race car problem, since the evaluation complexity of GPs is generally high and directly scales with the number of data points considered. Various approaches to address this limitation have been presented in the literature. One class of methods relies on an approximation by a finite number of basis functions, such as the sparse spectrum approximation [13], which is also used in the GP-based NMPC in [10]. We present an approach for predictive control based on a sparse GP approximation using inducing inputs [14], which are selected according to an approximate trajectory in state-action space. This enables a high-fidelity local approximation currently relevant for control at a given measured state, and facilitates real-time implementability of the presented controller. We finally evaluate the proposed cautious NMPC con- troller in simulations of a race. The results demonstrate that it provides safe and high performance control at sampling times of 30 ms, which is computationally on par with NMPC schemes without model learning [7], while improving racing performance and constraint satisfaction. We furthermore demonstrate robustness towards process noise, indicating fitness for hardware implementation. II. P RELIMINARIES In the following we specify the notation used in the paper and briefly introduce GP regression and sparse approximations based on inducing inputs as relevant to the presented control approach. A. Notation For two matrices or vectors we use [A; B] := [AT B T ]T for vertical matrix/vector concatenation. We use [y]i to refer to the i-th element of the vector y, and similarly [A]·,i for the i-th column of matrix A. A normal distribution with mean µ and variance Σ is denoted with N (µ, Σ). We use kxk for the 2-norm of vector x and diag(x) to express a diagonal matrix with elements given by the vector x. The gradient of a vector-valued function f : Rnz → Rnf with respect to vector x ∈ Rnx is denoted ∇x f : Rnz → Rnf ×nx . B. Gaussian Process Regression Consider M input locations collected in the matrix T z = [z1T ; . . . ; zM ] ∈ RM ×nz and corresponding measureT T ments y = [y1 ; . . . ; yM ] ∈ RM ×nd arising from an unknown n function g(z) : R z → Rnd under the following statistical model yj = g(zj ) + ωj , (1) where ωj is i.i.d. Gaussian noise with zero mean and diagonal variance Σw = diag([σ12 ; . . . ; σn2 d ]. Assuming a GP prior on g in each output dimension a ∈ {1, . . . , nd }, the measurement data is normally distributed with a [y]·,a ∼ N (0, Kzz + σa2 ) , a where Kzz is the Gram matrix of the data points using the kernel function k a (·, ·) on the input locations z, i.e. a [Kzz ]ij = k a (zi , zj ). The choice of kernel functions k a and its parameterization is the determining factor for the inferred distribution of g and is typically specified using prior process knowledge and optimization based on observed data [15]. Throughout this paper we consider the squared exponential kernel function   1 T −1 2 k(z, z̃) = σf exp − (z − z̃) L (z − z̃) , 2 in which L ∈ Rnz ×nz is a positive diagonal length scale matrix. It is, however, straightforward to use any other (differentiable) kernel function. The joint distribution of the training data and an arbitrary test point z in output dimension a is given by  a ! a Kzz Kzz p([y]a , [y]·,a ) ∼ N 0, , (2) a a Kzz Kzz a a a T where [Kzz ]j = k a (zj , z), Kzz = (Kzz ) and similarly a a Kzz = k (z, z). The resulting conditional distribution is Gaussian with p([y]a | [y]·,a ) ∼ N (µda (z), Σda (z)) and a a µda (z) = Kzz (Kzz + Iσa2 )−1 [y]·,a , Σda (z) = a Kzz − a a Kzz (Kzz + (3a) a Iσa2 )−1 Kzz . (3b) We call the resulting GP approximation of the unknown function g(z) d(z) ∼ N (µd (z), Σd (z)) (4) with µd = [µd1 ; . . . ; µdnd ] and Σd = diag([Σd1 ; . . . ; Σdnd ]). Evaluating (4) has cost O(nd nz M ) and O(nd nz M 2 ) for mean and variance, respectively and thus scales with the number of data points. For many data points or fast real-time applications this limits the use of a GP model. To overcome these issues, various approximation techniques have been proposed, one class of which is sparse Gaussian processes using inducing inputs [16], briefly outlined in the following. C. Sparse Gaussian Processes Most sparse GP approximations can be understood using the concept of inducing targets yind at inputs zind and an inducing conditional distribution q to approximate the joint distribution (2) by assuming that test points and training data are conditionally independent given yind [14]: Z p([y]a , [y]·,a ) = p([y]a , [y]·,a | yind )p(yind ) dyind Z ≈ q([y]a | yind )q([y]·,a | yind )p(yind ) dyind . There are numerous options for selecting the inducing inputs, e.g. heuristically as a subset of the original data points, by treating them as hyperparameters and optimizing their location [17], or letting them coincide with test points [18]. In this paper, we make use of the state-of-the-art Fully Independent Training Conditional (FITC) approximation to approximate the GP distribution and reduce computational complexity [17]. Given a selection of inducing inputs zind and using the shorthand notation a Qaζζ̃ := Kζz (Kzaind zind )−1 Kza ζ̃ the approximate posind ind terior distribution is given by µ̃da (z) = Qazz (Qazz + Λ)−1 [y]·,a , Σ̃da (z) = a Kzz − Qazz (Qazz + Λ) −1 (5a) Qzz (5b) a with Λ = diag(Kzz − Qazz + Iσa2 ). Concatenating the output dimensions similar to (4) we arrive at the approximation ˜ ∼ N (µ̃d (z), Σ̃d (z)) . d(z) Several of the matrices used in (5) can be precomputed such that the evaluation complexity becomes independent of the number of original data points. Using M̃ inducing points, the computational complexity for evaluating the sparse GP at a test point is reduced to O(nd nz M̃ ) and O(nd nz M̃ 2 ) for the predictive mean and variance, respectively. Y Ff,y (x, u) vy ω vx Fr,y (x, u) Φ that the model uncertainty, as well as the process noise w, only affect the velocity states vx , vy and ω of the system, that is Bd = [0; I3 ]. For the use in a discrete-time MPC formulation, we finally discretize the system using the Euler forward scheme with a sampling time of Ts , resulting in the following description, δ lf Fr,x (x, u) lr x(k+1) = f (x(k), u(k))+Bd (g(x(k), u(k))+w(k)), (8) where w(k) is i.i.d. normally distributed process noise with w(k) ∼ N (0, Σw ) and Σw = diag[σv2x ; σv2y ; σω2 ], which, together with the uncertain dynamics function g, will be inferred from measurement data. X Fig. 1: Schematic of the car model. III. R ACE C AR M ODELING This section presents the race car setup and nominal modeling of the car dynamics, which will serve as a base model for the learning-based control approach. This is largely based on material presented in [7], which provides a more detailed exposition. A. Car Dynamics We consider the following model structure to describe the dynamics of the miniature race cars ẋ = fc (x, u) + Bd (gc (x, u) + w) , (6) where fc (x, u) are the nominal system dynamics of the car modeled from first principles, and gc (x, u) reflects unmodeled dynamics. The considered nominal dynamics are obtained from a bicycle model with nonlinear tire forces as shown in Figure 1, resulting in   vx cos(Φ) − vy sin(Φ)  vx sin(Φ) + vy cos(Φ)    ω     1 fc (x, u) =  m Fr,x (x, u) − Ff,y (x, u) sin δ + mvy ω  ,     1  m Fr,y (x, u) + Ff,y (x, u) cos δ − mvx ω      1 Iz Ff,y (x, u)lf cos δ − Fr,y (x, u)lr (7) where x = [X; Y ; Φ; vx ; vy ; ω] is the state of the system, with position (X, Y ), orientation Φ, longitudinal and lateral velocities vx and vy , and yaw rate ω. The inputs to the system are the motor duty cycle p and the steering angle δ, i.e., u = [p; δ]. Furthermore, m is the mass, Iz the moment of inertia and lr and lf are the distance of the center of gravity from the rear and front tire, respectively. The most difficult components to model are the tire forces Ff,y and Fr,y and the drivetrain force Fr,x . The tires are modeled by a simplified Pacejka tire model [19] and the drivetrain using a DC motor model combined with a friction model. For the exact formulations of the forces, we refer to [7]. In order to account for model mismatch due to inaccurate parameter choices and limited fidelity of this simple model, we integrate gc (x, u) capturing unmodeled dynamics, as well as additive Gaussian white noise w. Due to the structure of the nominal model, i.e. since the dynamics of the first three states are given purely by kinematic relationships, we assume B. Race Track and Constraints We consider a race track given by its centerline and a fixed track width. The centerline is described by a piecewise cubic spline polynomial, which is parametrized by the path length Θ. Given a Θ, we can evaluate the corresponding centerline position (Xc (Θ), Yc (Θ)) and orientation Φc (Θ). By letting Θ̃ correspond to the projection of (X, Y ) on the centerline, the constraint for the car to stay within the track boundaries is expressed as   #     "   X Xc (Θ̃) X (Θ̃) := x − ≤r , (9) Y   Yc (Θ̃)   where r is half the track width. Additionally, the system is subject to input constraints, (      ) 0 p 1 U= u ≤ ≤ , (10) −δmax δ δmax i.e. the steering angle is limited to a maximal angle δmax and the duty cycle has to lie between zero and one. IV. L EARNING - BASED C ONTROLLER D ESIGN In the following, we first present the model learning module that is subsequently used in a cautious NMPC controller. We briefly state the contouring control formulation [7], serving as the basis for the controller and integrate the learning-based dynamics using a stochastic GP model. Afterwards, we introduce suitable approximations to reduce computational complexity and render the control approach real-time feasible. A. Model Learning We apply Gaussian process regression [15] to infer the vector-valued function g of the discrete-time system dynamics (8) from previously collected measurement data of states and inputs. Training data is generated as the deviation to the nominal system model, i.e. for a specific data point:  yj = g(x(j), u(j)) + w(j) = Bd† x(j +1) − f (x(j), u(j)) , zj = [x(j); u(j)] , where † is the pseudoinverse. Note that this is in the form of (1) and we can directly apply (3) to derive a GP model d(xi , ui ) from the data, resulting in the stochastic model xi+1 = f (xi , ui ) + Bd (d(xi , ui ) + wi ) . (11) The state xi obtained from this model, which will be used in a predictive controller, is given in form of a stochastic distribution. B. Contouring Control The learning-based NMPC controller makes use of a contouring control formulation, which has been introduced in [20], [21] and was shown to provide good racing performance in [7]. The objective of the optimal contouring control formulation is to maximize progress along the race track. An approximation of the car position along the centerline is introduced as an optimization variable by including integrator dynamics Θi+1 = Θi + vi , where Θi is a position along the track at time step i and vi is the incremental progress. The progress along the centerline over the horizon is then maximized by means of the overall incremental progress PN v . i=0 i In order to connect the progress variable to the race car’s position, Θi is linked to the projection of the car on the centerline. This is achieved by minimizing the so-called lag error êl and contouring error êc , defined as êl (xi , Θi ) = − cos(Φ(Θi ))(Xi − Xc (Θi )) − sin(Φ(Θi ))(Yi − Yc (Θi )) , c ê (xi , Θi ) = sin(Φ(Θi ))(Xi − Xc (Θi )) − cos(Φ(Θi ))(Yi − Yc (Θi )) . For small contouring error êc , the lag error êl approximates the distance between the projection of the car’s position and (Xc (Θi ), Yc (Θi )), such that a small lag error ensures a good approximate projection. The stage cost function is then formulated as l(xi , ui , Θi , vi ) =kêc (xi , Θi )k2qc + kêl (xi , Θi )k2ql − γvi + lreg (∆ui , ∆vi ) . (12) The term −γvi encourages the progress along the track, using the relative weighting parameter γ. The parameters qc and ql are weights on contouring and lag error, respectively, and lreg (∆ui , ∆vi ) is a regularization term penalizing large changes in the control input and incremental progress lreg (∆ui , ∆vi ) = kui − ui−1 k2Ru + kvi − vi−1 k2Rv , with the corresponding weights Ru and Rv . Based on this contouring formulation, we define a stochastic MPC problem that integrates the learned GP-model (11) and minimizes the expected value of the cost function (12) over a finite horizon of length N:   N −1 X min E  l(xi , ui , Θi , vi ) (13a) U, V i=0 s.t. xi+1 = f (xi , ui ) + Bd (d(xi , ui ) + wi ), (13b) Θi+1 = Θi + vi , (13c) P (xi+1 ∈ X (Θi+1 )) > 1 − , (13d) ui ∈ U, (13e) x0 = x(k), Θ0 = Θ(k) , (13f) where i = 0, . . . , N −1 and x(k) and Θ(k) are the current system state and the corresponding position on the centerline. The state constraints are formulated w.r.t. the centerline position at Θi as an approximation of the projection of the car position, and are in the form of chance constraints which guarantee that the track constraint (9) is violated with a probability less than 1 − . Solving problem (13) is computationally demanding, especially since the distribution of the state is generally not Gaussian after the first prediction time step. In addition, fast sampling times – in the considered race car setting of about 30 ms – pose a significant challenge for realtime computation. In the following subsections, we present a sequence of approximations to reduce the computational complexity of the GP-based NMPC problem for autonomous racing in (13) and eventually provide a real-time feasible approximate controller that can still leverage the key benefits of learning. C. Approximate Uncertainty Propagation At each time step, the GP d(xi , ui ) evaluates to a stochastic distribution according to the residual model uncertainty, which is then propagated forward in time, rendering the state distributions non-Gaussian. In order to solve (13), we therefore approximate the distributions of the state at each prediction step as a Gaussian, i.e. xi ∼ N (µxi , Σxi ) [22], [23], [24]. The dynamics equations for the Gaussian distributions can be found e.g. through a sigma point transform [25] or a first order Taylor expansion detailed in Appendix I. We make use of the Taylor approximation offering a computationally cheap procedure of sufficient accuracy, resulting in the following dynamics for the mean and variance µxi+1 = f (µxi , ui ) + Bd µd (µxi , ui ) , (14a) " # Σxi ? Σxi+1 = Ãi ÃTi , (14b) ∇x µd (µxi , ui )Σxi Σd (µxi , ui )   where Ãi = ∇x f (µxi , ui ) Bd and the star denotes the corresponding element of the symmetric matrix. D. Simplified Chance Constraints The Gaussian approximation of the state distribution allows for a simplified treatment of the chance constraints (13d). They can be approximated as deterministic constraints on mean and variance of the state using the following Lemma. Lemma 1. Let the random variable x ∈ Rn ∼ N (µ, Σ) and the set B xc (r) = x | kx − xc k ≤ r . Then p kµ − xc k ≤ r − χ2n (p)λmax (Σ) ⇒ Pr(x ∈ B xc (r)) ≥ p, where χ2n (p) is the quantile function of the chi-squared distribution with n degrees of freedom and λmax (Σ) the maximum eigenvalue of Σ. Proof. Let Epx := {x | (x − µ)T Σ−1 (x − µ) ≤ χ2n (p)} be the confidence region of x at level p, such that Pr(x ∈ Epx ) ≥ p. We have Epx ⊆ Epx̃ with x̃ ∼ N (µ, λmax (Σ) I), i.e. Epx̃ is an by dynamically choosing inducing inputs in a sparse GP approximation. F. Dynamic Sparse GP Fig. 2: Planned trajectory with active chance constraints. Shown is the mean trajectory of the car with 1-σ confidence level perpendicular to the car’s mean orientation. outer approximation of the confidence region p using the direction of largest variance. Now µ ∈ B xc (r− χ2n (p)λmax (Σ)) implies Epx̃ ⊆ Bcx (r), which means Pr(x ∈ Bcx (r)) ≥ Pr(x ∈ Epx̃ ) ≥ Pr(x ∈ Epx ) = p. Using Lemma 1, we can formulate a bound on the probability of track constraint violation by enforcing " #   q µX Xc (Θi ) i ≤ r − − χ22 (p)λmax (ΣXY ), (15) i Yc (Θi ) µYi where ΣXY ∈ R2×2 is the marginal variance of the joint i distribution of Xi and Yi . This procedure is similar to constraint tightening in robust control. Here the amount of tightening is related to an approximate confidence region for the deviation from the mean system state. Constraint (15) as well as the cost (12) require the variance dynamics. The next section proposes a further simplification to reduce computational cost by considering an approximate evolution of the state variance. E. Time-Varying Approximation of Variance Dynamics The variance dynamics in (14b) require N2 (n2 + n) additional variables in the optimization problem and can increase computation time drastically. We trade off accuracy in the system description with computational complexity by evaluating the system variance around an approximate evolution of the state and input. This state-action trajectory can typically be chosen as a reference to be tracked or by shifting a solution of the MPC optimization problem at an earlier time step. Denoting a point on the approximate stateaction trajectory with (µ̄xi , ūi ), the approximate variance dynamics are given by " # Σ̄xi ? x Σ̄i+1 = Āi ĀT ∇x µd (µ̄xi , ūi )Σ̄xi Σd (µ̄xi , ūi ) i with Āi = [∇x f (µ̄xi , ūi ) Bd ]. The variance along the trajectory thus does not depend on any optimization variable and can be computed before the state measurement becomes available at each sampling time. The precomputed variance is then used to satisfy the chance constraints approximately, by replacing ΣXY with Σ̄XY in (15). The resulting set is denoted X̄ (Σ̄xi , Θi ). Figure 2 shows an example of a planned trajectory with active chance constraints according to this formulation with χ22 (p) = 1. In the following, we use similar ideas to reduce the computational complexity of the required GP evaluations Sparse approximations as outlined in Section II-C can considerably speed up evaluation of a GP, with little deterioration of prediction quality. For fast applications with highdimensional state-input spaces, the computational burden can, however, still be prohibitive. We therefore propose to select inducing inputs locally at each sampling time, which relies on the idea that in MPC the area of interest at each sampling time typically lies close to a known trajectory in the state-action space. Similar to the approximation presented in the previous subsection, inducing inputs can then be selected along the approximate trajectory, e.g. according to a solution computed at a previous time step. We illustrate the procedure using a two-dimensional example in Figure 3 showing the dynamic approximation for a simple double integrator. Shown is the contour plot of the posterior variance of a GP with two input dimensions x1 and x2 . Additionally, two trajectories generated from an MPC are shown. The solid red line corresponds to a current prediction trajectory, while the dashed line shows the previous prediction, which is used for local approximation of the GP. As the figure illustrates, full GP and sparse approximation are in close correspondence along the predicted trajectory of the system. The dynamic selection of local inducing points in a receding horizon fashion allows for an additional speed-up by computing successive approximations adding or removing single inducing points by means of rank 1 updates [26]. These are applied to a reformulation of (5), which offers better numerical properties [14] and avoids inversion of the large matrix Qazz + Λ, a µ̃ad (z) = Kzz ΣKzaind ,z Λ−1 [y]·,a , a a Σ̃ad (z) = Kzz − Qazz + Kzz ΣKzaind z , ind  −1 a with Σ = Kzaind zind + Kzaind z Λ−1 Kzz . Substitution ind of single inducing points corresponds to a single line and column changing in Σ−1 . The corresponding Cholesky factorizations can thus efficiently be updated [27]. G. Resulting Control Formulation for Autonomous Racing We integrate the approximations presented in the previous sections in the learning-based MPC problem in (13) resulting in the following approximate optimization problem   N −1 X min E  l(µxi , ui , Θi , vi ) (17a) U, V i=0 s.t. µxi+1 = f (µxi , ui ) + Bd µ̃d (µxi , ui ), (17b) Θi+1 = Θi + vi , (17c) µxi+1 (17d) ∈ X̄ (Σ̄xi+1 , Θi+1 ), ui ∈ U, (17e) µx0 = x(k), Θ0 = Θ(k) , (17f) x1 0 −2 0 0.4 full GP sparse GP 0.2 0 [d(xk , uk )]ω x2 x2 p Σd (xi ) x1 2 2 4 6 8 10 i Fig. 3: Contour plots of the posterior variance of a GP for the full GP (top left) and dynamic sparse approximation (top right). The solid red line is the trajectory planned by an MPC, the dashed red line the trajectory of the previous time step used for the approximation, with inducing points indicated by black circles. On the bottom the respective variances along the planned trajectory are given. where i = 0, ..., N−1. By reducing the learned model to the mean GP dynamics and considering approximate variance dynamics and simplified chance constraints, the problem is reduced to a deterministic nonlinear program of moderate dimension. In the presented form, the approximate optimization problem (17) still requires an optimization over a large spline polynomial corresponding to the entire track. Since evaluation of this polynomial and its derivative is computationally expensive, one can apply an additional approximation step and quadratically approximate the cost function around the shifted solution trajectory from the previous sampling time, for which the expected value is equivalent to the cost at the mean. Similarly, Θi can be fixed using the previous solution when evaluating the state constraints (17d), such that the spline can be evaluated separately from the optimization procedure, as done in [7]. V. S IMULATION We finally evaluate the proposed control approach in simulations of a race. The race car is simulated using system (6) with gc resulting from a random perturbation of all parameters of the nominal dynamics fc by up to ±15% of their original value. We compare two GP-based approaches, one using the full GP d(xi , ui ) with all available data points ˜ i , ui ), against and one a dynamic sparse approximation d(x a baseline NMPC controller, which makes use of only the nominal part of the model fc , as well as against a reference controller using the true system model, i.e. with knowledge of gc . A. Simulation Setup We generate controllers using formulation (17), both for the full GP and the dynamic sparse approximation with 10 inducing inputs along the previous solution trajectory 50 100 150 200 250 300 350 k Fig. 4: Prediction of the dynamic sparse GP with 10 inducing inputs during a race lap. Shown as black dots are the error on the yaw rate under process noise as encountered at each time step. The blue line shows the dynamics error predicted by the GP. The shaded region indicates the 2-σ confidence interval, including noise. of the MPC problem. The inducing points are placed with exponentially decaying density along the previous solution trajectory, putting additional emphasis on the current and near future states of the car. The prediction horizon is chosen as N = 30 and we formulate the chance constraints (17d) with χ22 (p) = 1. To guarantee feasibility of the optimization problem, we implement the chance constraint using a linear quadratic soft constraint formulation. Specifically, we use slack variables si ≥ 0, which incur additional costs ls (si ) = ksi k2qs + cs si . For sufficiently large cs the soft constrained formulation is exact, if feasible [28]. To reduce conservatism of the controllers, constraints are only tightened for the first 15 prediction steps and are applied to the mean for the remainder of the prediction horizon, similar to the method used in [8]. The system is simulated for one lap of a race, starting with zero initial velocity from a point on the centerline under white noise of power spectral density Qw = 1 Ts diag([0.001; 0.001; 0.1]). The resulting measurements from one lap with the baseline controller are used to generate 350 data-points for both GP-based controllers. Hyperparameters and process noise level were found through likelihood optimization, see e.g. [15]. To exemplify the learned deviations from the nominal system, Figure 4 shows the encountered dynamics error in the yaw-rate and the predicted error during a lap with the sparse GP-based controller. Overall, the learned dynamics are in good correspondence with the true model and the uncertainty predicted by the GP matches the residual model uncertainty and process noise well. Note that the apparent volatility in the plot does not correspond to overfitting, but instead is due to fast changes in the input and matches the validation data. Solvers were generated using FORCES Pro [29] with a sampling time of Ts = 30 ms and the number of maximum solver iterations were limited to 75, which is sufficient to guarantee a solution of required accuracy. All simulations were carried out on a laptop computer with a 2.6 GHz i75600 CPU and 12GB RAM. TABLE I: Simulation results 2 (a) without process noise Y [m] 1 0 Tl [s] s20 [10−3 ] kek [-] Tc [ms] Tc99.9 [ms] Reference Baseline GP-Full GP-10a 8.64 9.45 8.67 8.76 4.50 4.77 0.95 1.77 0.18 1.20 0.09 0.16 9.4 10.8 105.2 12.3 19.1 20.6 199.23 26.9 (b) with process noise −1 −2 Controller Controller Tl [s] s20 [10−3 ] kek [-] Tc [ms] Tc99.9 [ms] Reference Baselineb GP-Full GP-10a 8.76 9.55 8.80 8.90 2.88 65.11 0.68 1.20 0.33 1.20 0.23 0.28 9.7 10.1 102.0 12.1 20.8 23.9 199.4 25.6 a Requires Baseline −1.5 −1 −0.5 Reference 0 0.5 X [m] b Eight GP-10 1 1.5 2 Fig. 5: Resulting trajectories on the race track for simulations without process noise with baseline, reference and sparse GP-based controller. B. Results To quantify performance of the proposed controllers we compare the lap time Tl and the average squared slack of the realized states s20 corresponding to state-constraint violations. We furthermore state average solve times Tc of the NMPC problem and its 99.9th percentile Tc99.9 over the simulation run. To demonstrate the learning performance we also evaluate the average 2-norm error in the system dynamics kek, i.e. the difference between the mean state after one prediction step and the realized state, e(k + 1) = µx1 − x(k+1). For direct comparison, we first evaluate controller performance in simulations without process noise. As evident in Figure 5, the baseline controller performs visually suboptimally and is unable to guarantee constraint satisfaction, even in the absence of process noise. The reference controller and sparse GP-based controller (GP-10) perform similarly. Table I(a) summarizes the results of the simulations without process noise. We can see that the full GP controller (GPFull) matches the performance of the reference controller. It also displays only small constraint violations, while the reference controller exhibits some corner cutting behavior leading to constraint violations. This is due to unmodeled discretization error, also evident in the dynamics error of the reference controller. The discretization error is partly learned by the GPs, leading to lower error than even the reference controller. Overall the sparse GP controller demonstrates a performance close to that of the full GP controller, both in terms of lap time and constraint satisfaction and is able to significantly outperform the baseline controller. Table I(b) shows the averaged simulation for different process noise realizations. The values are averaged over 200 an additional ≈ 2.5 ms for sparse approximation. outliers removed. runs, except for Tc99.9 , which is the 99.9th percentile of all solve times. Qualitatively, the observations for the noisefree case carry over to the simulations in the presence of process noise. Most strikingly, the baseline NMPC controller displays severe constraint violations under noise. In eight cases this even causes the car to completely lose track. The runs were subsequently removed as outliers in Table I(b). All other formulations tolerate the process noise well and achieve similar performance as in the noise-free case. The reference controller achieves slightly faster lap times than the GP-based formulations. These, however, come at the expense of higher constraint violations. Through shaping the allowed probability of violation in the chance constraints (17d), the GP-based formulations allow for a trade-off between aggressive racing and safety. The simulations underline the real-time capabilities of the sparse GP-based controller. While the full GP formulation has excessive computational requirements relative to the sampling time of Ts = 30 ms, the dynamic sparse formulation is solved in similar time as the baseline formulation. It does, however, require the successive update of the sparse GP formulation, which in our implementation took an additional 2.5 ms on average. Note that this computation can be done directly after the previous MPC solution, whereas the MPC problem is solved after receiving a state measurement at each sample time step. The computation for the sparse approximation thus does not affect the time until an input is applied to the system, which is why we state both times separately. With 99.9% of solve times below 25.6 ms, a computed input can be applied within the sampling time of Ts = 30 ms, leaving enough time for the subsequent precomputation of the sparse approximation. The results demonstrate that the presented GP-based controller can significantly improve performance while maintaining safety, approaching the performance of the reference controller using the true model. They furthermore demonstrate that the controller is real-time implementable and able to tolerate process noise much better than the initial baseline controller. Overall, this indicates fitness for a hardware implementation. VI. C ONCLUSION In this paper we addressed the challenge of automatically controlling miniature race cars with an MPC approach under model inaccuracies, which can lead to dramatic failures, especially in a high performance racing environment. The proposed GP-based control approach is able to learn from model mismatch, adapt the dynamics model used for control and subsequently improve controller performance. By considering the residual model uncertainty, we can furthermore enhance constraint satisfaction and thereby safety of the vehicle. Using a dynamic sparse approximation of the GP we demonstrated the real-time capability of the resulting controller and finally showed in simulations that the GPbased approaches can significantly improve lap time and safety after learning from just one example lap. A PPENDIX I U NCERTAINTY PROPAGATION FOR NONLINEAR SYSTEMS Let µxi and Σxi denote the mean and variance of xi , respectively. Using the law of iterated expectation and the law of total variance we have   µxi+1 = Exi Ed|xi (xi+1 )   = Exi f (xi , ui ) + Bd µd (xi , ui )     Σxi+1 = Exi vard|xi (xi+1 ) + varxi Ed|xi (xi+1 )   = Exi Bd Σd (xi , ui )BdT   + varxi f (xi , ui ) + Bd µd (xi , ui ) With a first order expansions of f, µd and Σd around xi = µxi these can be approximated as [22] µxi+1 ≈ f (µxi , ui ) + Bd µd (µxi , ui ) , Σxi+1 ≈ Bd Σd (µxi , ui )BdT  T + ∇x f˜(µxi , ui )Σxi ∇x f˜(µxi , ui ) with f˜(µxi , ui ) = f (µxi , ui ) + Bd µd (µxi , ui ). R EFERENCES [1] M. Buehler, K. Iagnemma, and S. Singh, The DARPA urban challenge: Autonomous vehicles in city traffic. Springer, 2009, vol. 56. [2] K. Kritayakirana and C. Gerdes, “Using the centre of percussion to design a steering controller for an autonomous race car,” Vehicle System Dynamics, vol. 15, pp. 33–51, 2012. [3] M. Guiggiani, The Science of Vehicle Dynamics: Handling, Braking, and Ride of Road and Race Cars. Springer, 2014. [4] J. Z. Kolter, C. Plagemann, D. T. Jackson, A. Y. Ng, and S. Thrun, “A probabilistic approach to mixed open-loop and closed-loop control, with application to extreme autonomous driving,” in Int. Conf. Robotics and Automation, 2010, pp. 839–845. [5] A. K. Akametalu, J. F. Fisac, J. H. Gillula, S. Kaynama, M. N. Zeilinger, and C. J. Tomlin, “Reachability-based safe learning with Gaussian processes,” in 53rd Conf. Decis. Control, 2014, pp. 1424– 1431. [6] N. R. Kapania and J. C. Gerdes, “Path tracking of highly dynamic autonomous vehicle trajectories via iterative learning control,” American Control Conf., pp. 2753–2758, 2015. [7] A. Liniger, A. Domahidi, and M. Morari, “Optimization-based autonomous racing of 1:43 scale RC cars,” Optim. Control Appl. Methods, vol. 36, no. 5, pp. 628–647, 2015. [8] J. V. Carrau, A. Liniger, X. Zhang, and J. Lygeros, “Efficient implementation of randomized MPC for miniature race cars,” in European Control Conf., 2016, pp. 957–962. [9] A. Liniger, X. Zhang, P. Aeschbach, A. Georghiou, and J. Lygeros, “Racing miniature cars: Enhancing performance using stochastic MPC and disturbance feedback,” in American Control Conf., 2017, pp. 5642–5647. [10] B. V. Niekerk, A. Damianou, and B. Rosman, “Online constrained model-based reinforcement learning,” Conf. Uncertainty in Artificial Intelligence, 2017. [11] U. Rosolia and F. Borrelli, “Learning Model Predictive Control for Iterative Tasks. A Data-Driven Control Framework.” IEEE Trans. Automat. Contr., vol. PP, no. 99, p. 1, 2017. [12] U. Rosolia, A. Carvalho, and F. Borrelli, “Autonomous racing using learning model predictive control,” in American Control Conf., 2017, pp. 5115–5120. [13] M. Lázaro-Gredilla, J. Quiñonero-Candela, C. E. Rasmussen, and A. R. Figueiras-Vidal, “Sparse Spectrum Gaussian Process Regression,” J. Mach. Learning Res., vol. 11, pp. 1865–1881, 2010. [14] J. Quiñonero-Candela, C. E. Rasmussen, and R. Herbrich, “A unifying view of sparse approximate Gaussian process regression,” J. Mach. Learning Res., vol. 6, pp. 1935–1959, 2005. [15] C. E. Rasmussen and C. K. I. Williams, Gaussian processes for machine learning. The MIT Press, 2006. [16] J. Quiñonero-Candela, C. E. Rasmussen, and C. K. Williams, “Approximation methods for Gaussian process regression,” Large-Scale Kernel Machines, pp. 203–224, 2007. [17] E. Snelson and Z. Ghahramani, “Sparse Gaussian processes using pseudo-inputs,” Adv. Neural Information Process. Syst., pp. 1257– 1264, 2006. [18] V. Tresp, “A Bayesian committee machine,” Neural Computation, vol. 12, no. 11, pp. 2719–2741, 2000. [19] H. B. Pacejka and E. Bakker, “The magic formula tyre model,” Vehicle System Dynamics, vol. 21, no. sup1, pp. 1–18, 1992. [20] T. Faulwasser, B. Kern, and R. Findeisen, “Model predictive pathfollowing for constrained nonlinear systems,” in 48th Conf. Decis. Control, 2009, pp. 8642–8647. [21] D. Lam, C. Manzie, and M. Good, “Model predictive contouring control,” in 49th Conf. Decis. Control, 2010, pp. 6137–6142. [22] J. Quiñonero-Candela, A. Girard, and C. E. Rasmussen, “Prediction at an uncertain input for Gaussian processes and relevance vector machines application to multiple-step ahead time-series forecasting,” Danish Tech. Univ., Technical Report IMM-2003-18, Oct. 2003. [23] M. Deisenroth, “Efficient reinforcement learning using Gaussian processes,” Ph.D. dissertation, KIT, Karlsruhe, Nov. 2010. [24] L. Hewing and M. N. Zeilinger, “Cautious model predictive control using Gaussian process regression,” arXiv:1705.10702, 2017. [25] C. J. Ostafew, A. P. Schoellig, and T. D. Barfoot, “Robust Constrained Learning-based NMPC enabling reliable mobile robot path tracking,” Int. J. Robotics Research, vol. 35, no. 13, pp. 1547 – 1563, 2016. [26] M. Seeger, “Low rank updates for the Cholesky decomposition,” EPFL, Technical Report: EPFL-REPORT-161468, 2004. [27] D. Nguyen-Tuong, M. Seeger, and J. Peters, “Model learning with local Gaussian process regression,” Adv. Robotics, vol. 23, no. 15, pp. 2015–2034, 2009. [28] E. C. Kerrigan and J. M. Maciejowski, “Soft constraints and exact penalty functions in model predictive control,” UKACC Int. Conf. Control, 2000. [29] A. Domahidi and J. Jerez, “FORCES Professional,” embotech GmbH (http://embotech.com/FORCES-Pro), Jul. 2014.
3cs.SY
1 A Framework for Rate Efficient Control of Distributed Discrete Systems arXiv:1704.08931v1 [cs.IT] 28 Apr 2017 Jie Ren, Solmaz Torabi, John MacLaren Walsh Abstract—A key issue in the control of distributed discrete systems modeled as Markov decisions processes, is that often the state of the system is not directly observable at any single location in the system. The participants in the control scheme must share information with one another regarding the state of the system in order to collectively make informed control decisions, but this information sharing can be costly. Harnessing recent results from information theory regarding distributed function computation, in this paper we derive, for several information sharing model structures, the minimum amount of control information that must be exchanged to enable local participants to derive the same control decisions as an imaginary omniscient controller having full knowledge of the global state. Incorporating consideration for this amount of information that must be exchanged into the reward enables one to trade the competing objectives of minimizing this control information exchange and maximizing the performance of the controller. An alternating optimization framework is then provided to help find the efficient controllers and messaging schemes. A series of running examples from wireless resource allocation illustrate the ideas and design tradeoffs. I. I NTRODUCTION The framework of Markov decision processes (MDP) [1], [2] provides a principled method for the optimal design of controllers for discrete systems. By solving a Bellman’s equation, for example through either a value or policy iteration, one derives a control mapping assigning to each possible state of the system a control action to take, in a manner that maximizes a long run discounted expected reward. Of increasing interest, however, are those discrete systems which are decentralized or distributed, in the sense that no single participant in the system has full access to the global system state, but rather this global state is the concatenation of a series of local states, each of which are directly observed at different locations. For instance, a series of agents may each observe their own local state, and have a set of local actions to choose from [3], [4], [5], and the desire may be to design individual local controllers. The fact that the global system state is not available at any location either requires sufficient information to be exchanged, either through ordinary communications or through the system’s state [6], [7], to remedy the situation, or a modification of the control framework. One way to address in part this distributed knowledge of network state is to use the framework of partially observable Markov decision processes (POMDP) to synthesize controllers. In general optimal control of a POMDP requires the controller to maintain probabilistic belief-states about the current system state based on all previous control actions and all previous observations, then assigning a control action based on these belief states. Thus a key issue in the selection/design of POMDPs are problem structures which enable simple forms for this control action [8]. As they are even more complex, solving general decentralized multiagent (PO)MDPs are NEXP-complete [9], and a rich literature, e.g. [10], [11], [12], [13], [14], [15] and many others, have addressed finding approximate solutions. A key issue in the literature about decentralized and/or distributed MDPs is the role and amount of communication and coordination. Relationships between communication and control have been established in several contexts in the literature. Information theoretic limits have been incorporated into the classical case of a single observer remotely controlling a linear system through a noisy channel [16], [17], with a focus on determining the minimum rate required to achieve control objectives [17] [18], [19]. In this vein, [20] proposes the notion of anytime capacity and gives a necessary and sufficient condition on communication reliability needed over a noisy channel to stabilize an unstable scalar linear process when the observer has access to noiseless feedback of the channel output. Building on these ideas, [21], [22], [23] provide explicit construction of anytime reliable codes with efficient encoding and decoding over noisy channels. Shifting to a decentralized control context, deep connections between communications between controllers through the system state and network coding have recently been investigated [24], [6], [7]. Despite this long standing interest between relationships between communication and control, the role of information theoretic limits when state observations from a MDP are distributed has been less well developed in the literature. Here, the literature studying communication and coordination has not made use of related ideas from multiterminal information theory to compute communication cost. [25], for instance, considers a multi-agent coordination with agent decisions made in a self-interested environment, while [26] discusses the computational complexity of finding optimal decisions in a communicative multi-agent team decision problem (COMMTDP) along the dimension of communication cost. Similarly [27], [28], [29], recognize that communication incurs a cost in the global reward function, and show that whether or not to communicate is also a decision to make. However, none of these models in [25], [26], [27], [28], [29] make use of relevant information theoretic limits when computing a communication cost. Part of the reason that information theoretic limits have not been fully brought to bear in the distributed MDP is that the limits for the relevant models, for instance for distributed [30], [31] and/or interactive function computation [32], [33], have been only somewhat recently derived. Bearing this in mind, this paper aims to harness information theoretic limits and coding designs that approach them, to help synthesis efficient control schemes for a distributed MDP. 2 In particular, in Section II we consider a MDP model in which the state can be considered a vector of local states, each of which are directly observed at a different location. If the goal is to have this distributed MDP operate in the same manner as an omniscient MDP having full access to this global state, then a natural way to achieve this is through the exchange of state information between the participants. This information exchange, however, can be costly, and furthermore, in order to achieve the same performance, i.e. simulate, an omniscient controller, all that is truly necessary is that the system make the same decisions. As such, it can be desirable to determine the minimal amount of information that must be exchanged in order to enable the distributed system to learn the decisions the centralized omniscient controller would take. Lower bounds on this minimal amount of control information necessary are provided in Section III using recent results from information theory regarding quantization, both interactive and non-interactive, for decentralized function computation. Alternatively as described in Section IV, one may wish to incorporate the cost of the communication into the reward, enabling the control designer to trade the cost of the communication for the performance of the controller. In this case, the messaging scheme and controller must be designed simultaneously, and in order to provide candidate solutions to the associated optimization, we present in Section IV-A an alternating optimization based method guaranteed to yield a sequence of rewards which converges. When the the messaging scheme and control map selected by this scheme converges, we prove that it must lie at a Nash equilibrium of the total reward, which combines the reward of the controller with the cost of the communication. Several examples drawn from the design of downlink resource controllers for wireless networks throughout the manuscript demonstrate the ideas. II. O MNISCIENT C ONTROL OF A D ISTRIBUTED M ARKOV D ECISION P ROCESS Consider a distributed discrete stochastic control system modeled a Markov Decision Process (MDP) for whom the global system state at time t, St ∈ S , is itself a vector composed of a series of local states S n,t ∈ Sn each observed at one network node n ∈ N = {1, . . . , N}, so that St = [S n,t |n ∈ N ] and S = S1 × · · · × SN (1) The global network state St evolves according to a Markov Chain whose transition matrix at time t is selected by the control action At P [St+1 = j |St = i, At = a ] = pa (i, j) ∀i, j ∈ S . (2) Additionally, there is a reward function Ra (i, j) indicating the payment obtained when the global system state transitions from i to j after action a is taken. An omniscient controller having access to the series of global states St , t ∈ N would select the actions At maximizing the total discounted expected reward min c:S →A ∞ X t=0 γ t E[RAt (St , St+1 )]. (3) The argument to the solution to this optimization is a mapping c : S → A assigning to each state the optimum action to take, so that the optimal A∗t = c(St ). Bellman’s equation states that the solution to this optimization must solve the following system of equations X   pc∗ (i) (i, j) Rc∗ (i) (i, j) + γV∗ (j) V∗ (i) = ∀i ∈ S j∈S (4) c∗ (i) = arg max a∈A X pa (i, j) [Ra (i, j) + γV∗ (j)] ∀i ∈ S (5) j∈S The solution to this simultaneous system of equations, and the associated optimal control mapping, can be found by first determining the limit V∗ = limk→∞ Vk of the following value iteration X Vk+1 (i) = max pa (i, j) [Ra (i, j) + γVk (j)] ∀i ∈ S a∈A j∈S (6) then solving for the control policy via c∗ (i) = arg max a∈A X pa (i, j) [Ra (i, j) + γV∗ (j)] ∀i ∈ S . (7) j∈S Alternatively, one can utilize a policy iteration, which performs a recursion in which first X ck (i) = arg max pa (i, j) [Ra (i, j) + γVk (j)] ∀i ∈ S a∈A j∈S (8) is solved, followed by a solution of the linear system Vk+1 (i) = X   pck (i) (i, j) Rck (i) (i, j) + γVk+1 (j) ∀i ∈ S (9) j∈S for Vk+1 (·). until the control mapping can be selected to remain the same under the update, at which point the iteration ceases, see, e.g. [34][8]. Note that in many problems, for a given i, there is more than one choice for c∗ (i) achieving the maximum in (5). In this instance, one can derive a set of candidate (omniscient) control functions C which are those c∗ : S → A obeying the constraints c∗ (i) ∈ arg max a∈A X   pa (i, j) Rc∗ (i) (i, j) + γV∗ (j) , ∀i ∈ S j∈S (10) each of which achieves the maximum long run expected reward. Ex. 1 (Downlink Wireless Resource Allocation): An example of a practical problem having the structure outlined by (4) and (5) is that of distributing resources on a wireless downlink. Time is slotted. There is a basestation which has a shared buffer containing individual information that must be sent to a series of users, with the amount waiting for a user n ∈ {1, . . . , N} during time slot t ∈ N being 3 denoted by Bn,t . Collectively, these buffer sizes form the local state at the basestation S N+1,t = (B1,t , . . . , BN,t ). Each user has a channel state S n,t , indicating how much information can be reliably transmitted to this user during the present timeslot, which evolves independently of other users channel states according to a Markov chain with transition distribution p(in , jn ) = P[S n,t+1 = jn |S n,t = in ]. During each time slot t, a random amount of additional traffic Xn,t arrives destined for each user n ∈ {1, . . . , N} at the basestation’s buffer, independently of other time slots and previous arrivals. If the basestation’s buffer can not accommodate this traffic, it is dropped. During each time slot, it must be decided which of the users to give the resource to, and thus this forms the action in the MDP, A = {1, . . . , N}. Additionally, both the users and the basestation must know the outcome of this decision. After the user to transmit to is selected, an amount of their traffic that is the minimum between their capacity during the slot and the amount of traffic waiting for them in the buffer will be successfully transmitted to them and removed from the buffer, yielding the Markov chain dynamics S N+1,t+1 = D(S N+1,t − T (At , St ) + X t+1 , X t+1 ), (11) where X t = [X1,t , . . . , XN,t ] is the amount of new traffic arriving during the time slot t for each user, and the vector T (At , St−1 ) has nth element  min{S At ,t , BAt ,t } n = At Tn (At , St−1 ) = (12) 0 otherwise while the function D performs the package dropping process when the arriving traffic can not be accommodated in the buffer. Note that this assumption, that for this amount of information to be successfully transmitted and received, all the users and basestation need to know is who to schedule, is consistent with assumption that the physical layer below the scheduler uses a rateless code with feedback, which can be closely approximated with hybrid ARQ [35], [36], [37]. When making the decision of who to schedule, several important metrics can be considered, and thereby combined, into the reward. A very natural metric is the throughput, which measures how much information is transmitted, summed over all the users. This gives the reward function Ra (St , St+1 ) = min(S a,t , Ba,t ) (13) Other metrics such as the average or maximum delay a users traffic experiences are also reasonable metrics which can be incorporated into the reward function, for instance by adding them together with rates that can trade them for one another. With the selected metrics included in the reward function, the MDP framework gives a formal way of deciding who to allocate the resources to during each time slot. A series of examples throughout the rest of the paper will find this optimal controller and investigate properties, such as how much information must be exchanged in order to perform it. A. Simulating the Omniscient MDP via Information Exchange However, as the system is distributed, no single node is given access to the global network state, and control must be performed by the nodes learning which action to take through some sort of communication enabled strategy. Additionally, we will introduce the constraint that an observer not given access to any of the local states, but rather accessing only all of the control messages the nodes share with one another, must be able to infer which action was taken. In order to enable the system to be easily monitored, we further require this user observing no state to be able to learn an optimal action At selected exclusively from the information shared during the time slot t during which the omniscient control action At must be taken. For such a strategy, a key question is how much information must be shared in order to enable the optimal control action A∗t = c(St ) the omniscient controller would have taken to be selected based on the shared information. In other words, how much information must be shared in order to enable the system to simulate the omniscient controller in the sense that every node, including the one having access to no local state observations and only observing the shared control messages during time slot t, can learn the action the controller will take, thereby enabling the distributed system to obtain the same expected (discounted) long run reward as the omniscient system. The answer to this question depends, of course, on the model for the way the information is exchanged, the control map c ∈ C , and particular characteristics of the transition kernels pa (i, j). Clearly the problem of designing this communication has been transformed into one of distributed function computation, as each node observing a local state S n,t must convey a message M n,t during the time slot t such that A∗t = c(St ) can be learned from the messages M n,t , n ∈ N . Additionally, the capability to select any c ∈ C and still achieve the maximum reward enables this amount of information exchanged to be further minimized over c ∈ C . Ex. 2 (Downlink Wireless Resource Allocation, Continued): The assumptions made above, and the associated problem of minimizing overhead, have special practical significance for the downlink wireless resource allocation setup of example 1. Only the basestation has direct access to the buffer and observes the amount of information that has arrived destined for the various users, and only the users observe their downlink channel qualities, yet sufficient information must be exchanged for the system to make an informed decision regarding who to schedule on the downlink and how much information to send to them. The omniscient controller having access to all of this state distributed throughout the network could make a series of decisions by solving the associated MDP. At present, for instance in the LTE and WiMax standards, these decisions are made by the basestation, which requests 4 and receives channel quality statistics from the users, then schedules the users and how much information to send to them, transmitting its decisions on the downlink [38]. Additionally, it is desirable to minimize this amount of control information through an efficient design, as this type of control measurement and decision information, together with reference signals, has reached roughly a quarter to a third of the time frequency footprint in LTE and LTE advanced [38]. Furthermore, it is essential that the messages exchanged during time slot t are all that must be overhead in order to learn the control decision action, as nodes come and go from the network, and it is essential that nodes that have just arrived in the current slot be able to determine what the control decisions were. Finally, we note that it is evident from the problem description for example 1, that the various local states, which are the channel state at each user and the buffer state at the basestation, evolve according to independent Markov chains given the control actions. III. M INIMAL C OORDINATION C OMMUNICATION R EQUIRED FOR D ISTRIBUTED S IMULATION OF THE MDP For general models with arbitrary dependence between observations, multiterminal information theory has yet to determine the minimum sum rate required for distributed function computation, however, these limits are known for a handful of special cases, including those where the local observations are independent. In this independent case, the transition kernel and initial state distribution admit a factorization Y Y pa (i, j) = pa (in , jn ), P[S0 = i] = P[S n,0 = in ]. n∈N n∈N (14) This factorization, in turn, implies that the local states evolve independently of one another, once an action has been specified, and as such, the quantities available to be encoded into messages at the Q nodes are independent of one another, so that P[St = i] = n∈N P[S n,t = in ] ∀i ∈ S . The fundamental limits for this special case can be further subdivided based upon whether the messages M n,t must all be sent in parallel and in a non-interactive manner, or if interaction between users over multiple rounds of communication during one time slot is allowed. A. One Shot, Non-Interactive Distributed Simulation of the Omniscient MDP In the non-interactive case, under the assumptions made regarding the monitoring node, the minimum sum-rate required for distributed function computation of a given control map c ∈ C with independent sources (in this case, the independent states) is given by the sum of the graph entropies of the characteristic graphs for each user [31][30]. The characteristic graph Gn (c) for user n has as its set of nodes Vn = Sn the possible local states of user n. An edge {in , jn } ∈ En exists in the characteristic graph if there are values in0 ∈ Sn0 , n0 ∈ N \ {n} such that P[St = (i1 , . . . , in−1 , in , in+1 , . . . , iN )] > 0 and P[St = (i1 , . . . , in−1 , jn , in+1 , . . . , iN )] > 0 and c(i1 , . . . , in−1 , in , in+1 , . . . , iN ) 6= c(i1 , . . . , in−1 , jn , in+1 , . . . , iN ). Since the local states are independent, the probability distribution will be positive on a product support Sn>0 , n ∈ N , and there is no edge, i.e. {in , jn } ∈ / En , if for all possible values of other local states in0 ∈ 0 Sn>0 ∈ N \ {n}, c(i1 , . . . , in−1 , in , in+1 , . . . , S N ) = 0 ,n c(i1 , . . . , in−1 , jn , in+1 , . . . , S N ). As such, there is a transitive property in the complement of the characteristic graph: namely if there is no edge {in , jn } and no edge {jn , kn } in the characteristic graph, then there is also no edge {in , kn }, therefore the maximal independent sets of the characteristic graph do not overlap, and form a partition of the set of vertices of the graph. Owing to this transitivity property in the complement of the characteristic graphs [31][39], each of these graph entropies is in fact the chromatic entropy HGn (c) (S n,t ) = min r∈R(Gn (c)) H(r(S n,t )) (15) where R(Gn (c)) represent all colorings of the characteristic graph Gn (c). This minimum expected rate can be achieved within one bit by Huffman coding the coloring of the characteristic graph achieving the minimum entropy, which then can be achieved by assigning different colors to its different maximal independent sets. Selecting an omniscient control map c ∈ C requiring the minimum rate, then gives the minimum non-interactive rate of X R↓,ni = min min H(r(S n,t )) (16) c∈C n∈N r∈R(Gn (c)) Note further than when searching minimum entropy colorings of the graph to calculate the chromatic entropy, it suffices to consider exclusively the greedy-colorings [40] obtained by iteratively removing maximal independent sets. The following two examples describe the control rate required under this form of one-shot, non-interactive sharing of quantized local states, for two particular distributed MDPs. Ex. 3 (Minimum control information for arg max, Non-Interactive): Let’s assume in example 2 that the buffer size is infinite, and each user has infinitely many backlogged packets destined for it in the buffer. Then the control decision is made regarding only the users’ channel qualities, and the objective is to let the basestation learn the control decision of which user should occupy the resource block after observing all the messages sent from the users. Let the local states S 1 , . . . , S N be independent and identically distributed downlink channel qualities from a known distribution on a discrete support set S , if the basestation wishes to maximize the system throughput, the control decision becomes finding one of the users with the best channel quality, i.e. c(S 1 , . . . , S N ) ∈ arg max S n (17) n∈N For this problem, it is shown in [39] that the characteristic graphs G1 (c), . . . , GN (c) obey the properties that if {i, j} ∈ / En then {i, k} ∈ En , {j, k} ∈ En , ∀k ∈ S , and that if {i, j} ∈ / En then {i, j} ∈ En0 , ∀n0 ∈ N \ {n}. It is also shown in [39] 5 that the minimum information required to determine the control action can be computed as in (16), and at most 2 bits can be saved relative to the scheme in which the users simply send their un-coded channel qualities to the basestation. Ex. 4 (Rate Required for Simulating an Omniscient Wireless Resource Controller with No Interaction): Return to the case of a finite buffer size without any backlogged packets in example 2, and assume that the channel qualities where S n,t are independently uniformly distributed on the support {0, 1, 2, 3} ∀n ∈ N , t ∈ N. In addition, let the amount of additional traffic that arrives destined for each user be independent across users and time, and be distributed on the support X = {0, 1, 2} with probabilities {1/2, 1/3, 1/6}. Additionally, let the packet dropping function operate according to Algorithm 1, in a manner consistent with a total buffer size of BUmax = 3. Let the controller aim to maximize the throughput reward (13). If N = 2, which means there are 2 users and 1 basestation in the system, the optimal control decisions by solving the MDP problem of (4) and (10) with discounting factor γ = 0.9 will give a maximal total discounted reward of 9.249 if the system starts from the all 0 initial state S0 = (S 1,0 , S 2,0 , S 3,0 ) = (0, 0, (0, 0)). Meanwhile, the expected amount of system throughput per time-slot will be 1.076 and the expected amount of data dropped per timeslot will be 0.257. Calculating the characteristic graphs and determining the Huffmann codes associated with the minimum entropy colorings, we find that the associated optimal control decision can be learned via a quantization of local states (the channel states at each of the two users and the buffer size at the basestation), with a minimum non-interactive rate of 3.5175 bits. The encoder mappings with respect to the minimum rate are given as: ( 2 if S 1 = 0 q1 (S 1 ) = (18) 1 if S 1 ∈ {1, 2, 3} ( 1 if S 2 ∈ {0, 1} q2 (S 2 ) = (19) 2 if S 2 ∈ {2, 3} for the users, and   1 if S 3 ∈ {(1, 0), (2, 0), (3, 0), (1, 1), (2, 1)} q3 (S 3 ) = 2 if S 3 ∈ {(0, 1), (0, 2), (0, 3), (0, 0)}   3 if S 3 ∈ {1, 2} (20) for the basestation. A control mapping c0 : q(S ) → A can be decided deterministically with the given optimal control c and the encoders q, i.e. c0 (q1 (S 1 ) = 1, q2 (S 2 ) = 2, q3 (S 3 ) = 3) = 2 and c0 (q1 (S 1 ) = 1, q2 (S 2 ) = 1, q3 (S 3 ) = 3) = 1. B. Interactive, Collocated Network, Simulation of the Omniscient MDP In the interactive communication case, a natural lower bound on the rate can be obtained via a collocated network Result: Update next round buffer status S N+1,t+1 = (B1,t+1 , . . . , BN,t+1 ) Input: current buffer status S N+1,t = (B1,t , . . . , BN,t ), buffer size BUmax , and new arriving packages X t = (X1,t , . . . , XN,t ) S N+1,t+1 = S N+1,t PN Remaining = BUmax − n=1 Bn,t PN New = n=1 Xn,t+1 n=1 while Remaining > 0 & New > 0 do if Xn,t+1 > 0 then Bn,t+1 = Bn,t+1 + 1 Xn,t+1 = Xn,t+1 − 1 Remaining = Remaining − 1 New = New − 1 end n = (n + 1) mod N end Output S N+1,t+1 Algorithm 1: The packet dropping process when the buffer is full messaging model. In this model, communication happens over multiple rounds, in which users consecutively take turns sending a message which is overheard by all of the other users. In particular, in round r, the node with index w(r) = (r − (r) 1)mod|N |+1 sends a message M t based on its observation (r−1) (1) sent in S w(r),t and all of the messages M t , . . . , M t the previous rounds up until this time. After R rounds the communication finishes and the optimum omniscient control action A∗t = c(St ) must be completely determined from (R) (1) M t , . . . , M t . Ma and Ishwar [33] have shown that the minimum sum-rate, over all block codes, that can be obtained by such a strategy is lower bounded by the solution to following repeated convex geometric calculation. The solution is written with respect to the rate reduction functional, which maps the coordinates for the marginal probability distributions pn ∈ P(Sn ) for each of the local observations n ∈ N to a conditional entropy, Y ρr : P(Sn ) → R, ρr (p) := H(S|M (1) , . . . , M (r) ) n∈N if the marginal distribution of S is given by p. (21) The rate required if the function is to be computed after R rounds of communication is then expressed as RR↓,wi = H(St ) − ρr (pSt ). (22) i.e. by evaluating the rate reduction functional at the marginal probability distribution pSr . The rate reduction functional, in turn, is found via the following iterative convex program  H(p) ∃c ∈ C s.t. c is constant on supp(p) ρ0 (p) = −∞ otherwise (23) ρr (p1 , . . . , pw(r)−1 , ·, pw(r)+1 , . . . , pN ) = (24) concavify(ρr−1 (p1 , . . . , pw(r)−1 , ·, pw(r)+1 , . . . , pN )) 6 Here for each fixed context pn ∈ P(Sn ), n ∈ N \{w(r)}, the operator concavify is computing the upper concave envelope of the function ρr−1 (p1 , . . . , pw(r)−1 , ·, pw(r)+1 , . . . , pN ), i.e. viewing this restriction as a function from P(Sn ) → R. Ex. 5 (Minimum control information for arg max, Interactive): Consider the infinite packet buffer backlog and throughput maximization variant of the wireless resource allocation as described in Example 3, with the added ability that the users and basestation can all interact with one another while sending their messages. In particular, the users can each take turns sending messages, one at a time, over R rounds, such that all the other participants, including the basestation which sends no messages, overhear each message. The goal is to enable anyone who overhears all of these messages to learn the index of at least one user whose channel quality is the same as the maximum channel quality over all of the users. The curve labelled Fundamental limit in Fig. 1 calculates the fundamental limit (24) lower bounding the total number of bits must be exchanged in order to perform this calculation for the case of N = 3 and for channel qualities uniformly distributed over the set {1, 2, 3, 4}. As explained above, this fundamental limit is in general only achievable with vector quantization schemes, while the problem setup at hand demands that scalar quantization schemes must be used. Additionally, a second curve in Fig. 1, labelled “optimal scalar Hete. Q” gives the rate required by the best possible scalar quantization scheme, followed by Huffman coding, for this problem, and this is seen to be quite close to the vector quantization limit. This curve was found via exhaustive search over all scalar quantization schemes. In addition to presenting this problem in detail and describing these curves,[41] also considers reduced complexity restricted to smaller quantizer search spaces. Finally, the curve “Homo. scalar Q interactive” indicates the rate required if all of the users must send their messages in parallel, then, after all of these messages are received, can send another series in parallel and so on, which is the interactivity model considered in [42]. While this does count as a form of interaction, requiring the users to send their messages in parallel substantially increases the rate required. Fundamental Limit Optimal Scalar Hete. Homo. Scalar Q Interactive CEO 6 Sum rate Note that for the problem at hand, this lower bound may not be achievable, as scalar quantization and coding strategies are required by the assumptions we have made in our distributed MDP setup, while this lower bound may in general only be achieved with a limit of vector quantization schemes. In particular, only scalar quantization is available in the problem under consideration because no repeated observations are available for use in a larger block-length as we have added the constraint that the user overhearing exclusively all of the messages during time slot t must be able to learn A∗t = c(St ). Nonetheless, as we demonstrate in the following example, often the best scalar quantization based interaction schemes still yield a rate which is very close to this fundamental limit. 7 5 4 3 2 2 4 6 8 10 Number of rounds 12 Fig. 1. Rate required to select a user attaining the max with 3 users each observing an independent RV with support {1, 2, 3, 4} when users take turns sending messages one at a time [43], [41]. The fundamental limit on the rate given by (22) is compared to that obtained by the best scalar quantizer to use in the collocated network interactive scheme (Optimal Scalar. Hete. Q). This is substantially less than the rate required if all three users must send each message in parallel, then hear collectively all of the sent messages, then send each message in parallel again, etc, which is the interactive model employed in [42]. IV. I NCORPORATING C OMMUNICATION C OST INTO THE R EWARD F UNCTION The previous discussion has assumed that the reward function is completely given, but in many problems, the cost of communicating over the network may subtract from the reward of the decisions. In this manner, it may be desirable to design the MDP to consider this cost explicitly by incorporating it as a weighted term into the reward function. In particular, suppose that the total number of bits communicated by the partial state sharing scheme in the messages M n,t , n ∈ N when the state vector is St = i is denoted by |q(i)|, then we can form an augmented reward function R0a (i, j) = Ra (i, j) − λ|q(i)| (25) including the communication cost reflecting the number of bits transmitted in order to enable the system learn the action. The goal then shifts to solving the optimization problem X   max γ t E Rc(St ) (St , St+1 ) − λ|q(St )| (26) (c,q)∈F t∈N where the constraint set is defined as  F := (c, q) ∀i, i0 ∈ S such that q(i) = q(i0 ), we have also that c(i) = c(i0 ). (27) or equivalently, the set of c, q such that c can be rewritten as a function of exclusively q,  F := (c, q) q : S → B, ∃c0 : q(S ) → A , (28) c(i) = c0 (q(i)) ∀i ∈ S Observe that while the observation of the encodings q(i) form effectively an observation for a partial observed Markov decision process (POMDP) [8][44], the requirement we have made that we are able to determine the controller’s (i.e. running the full state knowledge MDP) action decisions from 7 exclusively the observation during the same time step implies a different problem structure from a POMDP as the memory of past observations or action decisions for determining the state distribution must be neglected. Select some map ` : S → {1, . . . , |S |} and, for any given controller c : S → A , define the |S | × |S | transition matrix P(c) whose `(i), `(j)th element is [P(c)]`(i),`(j) = pc(i) (i, j), and define the row vector [π]`(i) = P[S0 = i]. (29) The objective function in the optimization can then be rewritten as X   γ t E Rc(St ) (St , St+1 ) − λ|q(St )| t∈N = X = X X γt  P[St = i, St+1 = j] Rc(i) (i, j) − λ|q(i)| i,j∈S t∈N γ t∈N X t [πP(c)t ]`(i) pc(i) (i, j) Rc(i) (i, j) − λ|q(i)| i,j∈S " = X i,j∈S  size limit at the basestation be BUmax = 2, with the packet dropping process described as in Example 4. The system is started in the all 0 initial state, in which the buffer is empty and the channel qualities are all 0. Let (25) be the transition reward function where the term Ra (i, j) represents the system throughput by choosing action a at state i as in (13), and consider the one-shot, noninteractive, control information sharing model in which each node (i.e. each user and the base station) sends a quantized representation of their state to everyone else, enabling them all to learn the control action directly from these messages. Finding the optimum solution to (26) via exhaustive search over all control mappings for different λ enables the control overhead versus throughput tradeoff and the control overhead versus the packet dropping cost tradeoff plotted in Fig. 2a and 2b to be traced out. We observe from Fig. 2 that, at least 2 bits of control overheads are required to guarantee the expected system throughput achieves the limit. # π X γ t P(c)t t∈N pc(i) (i, j) Rc(i) (i, j) − λ|q(i)|  `(i) X    = π(I − γP(c))−1 `(i) pc(i) (i, j) Rc(i) (i, j) − λ|q(i)| i,j∈S (30) The presence of the constraint that (c, q) ∈ F makes the joint optimization problem (26) a substantially more difficult combinatorial optimization problem than an ordinary MDP. For small problems, the set of control maps c : S → A can be enumerated, and for each such control map, the component X  max −λ π(I − γP(c))−1 `(i) |q(i)| (31) q|(c,q)∈F i∈S of the expected reward associated with the minimum control information overhead can be calculated using the results in section III-A for a non-interactive messaging scheme, while if interactive communications are enabled, then the results in section III-B can be used. In both cases, the probability distribution for S is selected as  being multiplicatively proportional to π(I − γP(c))−1 `(i) to ensure that the reward will be maximized by the encoding. After determining inPthis manner  the expected discounted reward  maxq|(c,q)∈F t∈N γ t E Rc(St ) (St , St+1 ) − λ|q(St )| , maximized over all encoding schemes, for each control map c, the control map yielding the expected maximum reward for the particular λ can be selected. Furthermore, a tradeoff between the control overhead and the expected reward can be traced by varying λ in this optimization. Ex. 6 (Overhead Performance Tradeoff for Wireless Resource Allocation, Tiny Model): Consider again the setup of distributed wireless resource allocation described in example 1, with N = 2 mobile users each observing their local channel quality S n,t at each time instant t, where S n,t is uniformly distributed on the support {0, 1}∀n ∈ N , t ∈ {1, . . .}. Additionally, let the amount of additional traffic that arrives destined for each user Xn,t be uniformly distributed on the support X = {0, 1}, and let the buffer A. Finding Candidate Quantizations through Alternating Optimization However, in many problems, the sort of exhaustive search approach to solving the combinatorial optimization (26) just described is nowhere near computationally feasible, as the number of possible control maps to search over are |A ||S | . In this case, an alternating optimization approach yields a lower complexity search method that can be well suited to finding candidate solutions to this optimization problem. A reasonable goal for such an alternating optimization method is to alternate between optimizing the control map, then optimizing the quantizer. Let the iteration index in this algorithm be k, and the control map and local state encoders at iteration k be denoted by ck and qk respectively. At a given iteration in the algorithm, the control map minimizing the augmented value function among all control maps that can be determined from the present encoding qk could be selected by solving X   ck+1 = arg max γ t E Rc(St ) (St , St+1 ) − λ|qk (St )| c|(c,qk )∈F t∈N (32) Next, the local encodings qk+1 which achieve the minimum expected sum rate while enabling distributed computation of the new control map ck+1 are selected qk+1 = arg max X q|(ck+1 ,q)∈F t∈N   γ t E Rc(k+1) (St ) (St , St+1 ) − λ|q(St )| (33) As this admits a form of an alternating maximization, the sequence of expected values will be monotone increasing. As this sequence is bounded above via the global optimum, this sequence must converge to a limit. In general this limit may or may not be the global optimum, as all that can be guaranteed is that this limit is associated with a Nash equilibrium. In particular, the limit of this iteration has the property that in no unilateral change individually in the control map c or the 8 1 0.5 0.4 0.3 0.2 0.8 0.7 0.6 0.1 0 0 Packets dropped per time−slot 0.9 Packet drop cost Throughput[packets] Throughput 1 2 3 Communication cost[bits] 4 (a) 0.5 0 1 2 3 Communication cost[bits] 4 (b) Fig. 2. (a) The control overhead versus the expected throughput tradeoff, and (b) The control overhead versus the expected packet dropping cost tradeoff with λ ∈ [0, 0.36] in the augmented reward function in (25) quantizer q can yield a higher expected reward, although it may be possible to modify them both together and achieve a higher reward. To solve (33), if the non-interactive communications structure is used, the results in section III-A and equation (16) can be used as a fairly tight and close bound with associated close achievability scheme (within one bit), while if interactive communications are enabled, then the results in section III-B and equations (22,24) can be used as a bound. Solving (32) however, can be quite complicated, as the direct search solution to the combinatorial optimization has complexity |A ||S | . To simplify matters, the control map update (32) can itself be attacked with an alternating optimization which has an overall iteration update complexity proportional to |q(S )||A |. In its simplest form, this alternating minimization cycles through the different possible quantizations m ∈ q(S ), updating the associated c0 (m) = c(i), i ∈ q−1 (m) in an order determined by a selected bijection µ : q(S ) → {0, 1, . . . , |q(S )| − 1} according to mk,` = µ−1 (` mod |qk (S )|) ck,` = X arg max c∈F (mk,` ,ck,`−1 ,qk ) X i∈q−1 (mk,` ) j∈S k    π(I − γP(c))−1 `(i) pc(i) (i, j) Rc(i) (i, j) − λ|q(i)| ck+1 = lim ck,` , `→∞ (34) ck,0 := ck . (35) (36) wherein F (mk,` , ck,`−1 , qk ) :=   ∃c0 : q(S ) → A , c = c0 ◦ qk ,   c : S → A c0 (mk,` ) ∈ A , c0 (m) = c0k,`−1 .   (m) ∀m ∈ qk (S ) \ {mk,` }. (37) Alternatively, a more greedy form of the alternating optimization can be selected, which replaces (34) with X X mk,` = arg max max 0 m0 ∈qk (S ) c∈F (m ,ck,`−1 ,qk ) 0 j∈S i∈q−1 (38) k (m )    −1 π(I − γP(c)) `(i) pc(i) (i, j) Rc(i) (i, j) − λ|q(i)| Putting these pieces together, the overall low complexity alternating optimization algorithm to find candidate solutions to (26) consists of (34) or (38) and (35),(36),and (33). As this algorithm is an alternating optimization, with the individual dimensions in the optimization being q, and each of the c0 (m), m ∈ q(S ), the sequence of expected rewards achieved by each update is monotone increasing. As this sequence of expected rewards is bounded above by the global maximum (26), it must converge to a limit, and depending on the initialization q0 , this limit may or may not be the global maximum. When the sequence of control maps and quantizations also converges it must at least be to a Nash equilibrium as summarized in the following theorem. Thm. 1: The iterative method for solving the constrained MDP (26) that is described by (34) or (38) and (35),(36),and (33) yields a monotone increasing sequence of expected rewards which converges. Additionally, when the sequence of control maps and quantizations converges, (c∗ , q∗ ) = limk→∞ (ck , qk ), the convergent pair (c∗ , q∗ ) are a Nash equilibrium [45], in the sense that no unilaterial deviation in any of the axes q or c0 (m) for each m ∈ q(S ), can yield an increase in the expected reward. Ex. 7 (Overhead Performance Tradeoff for Wireless Resource Allocation, Larger Model): We apply the aforementioned alternating optimization algorithm to solve the following example. Consider again the wireless resource allocation setup of examples 1 and 6, but in which N(N = 2) mobile 9 greedy scheme round−robin scheme 1 0.5 0 0 1 2 3 communication coefficient λ 6 Communication cost[bits] Throughput 1.5 5 4 3 2 1 0 0 4 greedy scheme round−robin scheme 1 2 3 communication coefficient λ (a) 1 0.5 0 0 0.8 Packet−drop cost Throughput (b) greedy scheme round−robin scheme 1.5 1 4 2 3 4 Communication cost[bits] 5 (c) greedy scheme round−robin scheme 0.6 0.4 0.2 0 0 1 2 3 4 Communication cost[bits] 5 (d) Fig. 3. (a) The expected system throughput, and (b) the control overheads per time-slot with respect to the weighting coefficient λ in (25); (c) The control overheads versus the expected throughput tradeoff, and (d) The control overheads versus the expected packet dropping cost tradeoff computed by both the round-robin and the greedy alternating optimization algorithm with λ ∈ [0, 4] in the augmented reward function in (25) users observe their local channel quality S n,t at time-slot t, distributed on the support {0, 1, 2, 3, 4} with probabilities {1/8, 2/8, 3/8, 1/8, 1/8} ∀n ∈ {1, 2}, t ∈ {1, . . .}. Additionally, the amount of additional traffic arrivals destined for each user, Xn,t be distributed on the support X = {0, 1, 2} with probabilities {1/2, 1/3, 1/6}. The basestation observes the buffer state S 3 which has a buffer limit BUmax = 4, and let the packet dropping process be the same as the one described in Example 4. We refer to the algorithm consisting of (34),(35), (36), and (33) as the round-robin alternating optimization algorithm, and the algorithm consisting of (38), (35), (36), and (33) as the greedy alternating optimization algorithm. For the quantizers and information sharing strategies to learn the action, we assume that a one-shot, non-interactive scheme must be used. Furthermore, both algorithms are initialized with the trivial quantizers which simply relay the full local state. Note that, as observed by Thm. 1, while these alternating optimization methods will always yield a sequence of rewards which is monotone non-decreasing and converges, when the associated control map and quantizer converge, they will in general only be to a Nash equilibrium, and possibly not a global optimum. This local convergence was indeed observed in the experiments, as some multipliers λs lead quantization and control mappings with negative expected discounted rewards, while when not sending any control information, the expected reward will be lower bounded by 0. Hence, while the quantization and control schemes presented in the remainder of this example are guaranteed to be Nash equilibria, there is a chance that they are not globally optimal. Nonetheless, they are highly optimized, and, thus, the tradeoffs they yield, by varying λ between the expected throughput and the control overhead are quite interesting. By applying both the round-robin and the greedy algorithm, we find local optimal quantizations and control mappings for different choice of λ. The expected throughput, and the communication cost are computed as shown in Fig. 3a and 3b. Based on the local optimal solutions we found, we also plot the throughput versus control overheads tradeoff and the packet dropping cost versus 10 control overheads tradeoff in Fig. 3c and 3d. We observe from Fig. 3a that the expected system throughput is maximized when λ = 0. In such a case, the communication cost is not involved in the transition reward function, the optimal control mapping c becomes to pick the user that maximize the instant throughput, and the optimal encoders q are designed to minimize the control overheads while guarantee that the optimal control mapping can be learned by any node with only observing all of the control messages. We also observe from Fig. 3b that the control overheads become 0 when λ ≥ 3, this is because, as λ grows larger, the system realizes that the cost it pays to encode the local states weights more than the reward it could earn by sending data traffics to the destined user, hence the optimal decision is to not encode any local state and blindly schedule a user to occupy the resource block. Finally, we observe from Fig. 3a that the expected system throughput per time-slot goes to 0 when the system decision is to blindly pick a user. This is because, although the basestation may pick users and send data traffics in the first few time-slots, however, in a long run, the global state must be absorbed to one of the recurrent classes in which, the instant throughput will always remain 0, as the buffer fills with traffic destined for the other users and stays full. In fact, given a blind control mapping with no local observation as c(S) = a, for all S ∈ S , (39) those global states with the same buffer local state S N+1 = (b1 , . . . , bN ) satisfying ba = 0 (40) and X bn = BUmax (41) n∈N \a will form a recurrent class. The result that the expected system throughput becomes 0 when the system decision is to blindly pick a user indicates that a system with randomly picking users at all time-slots will perform better than the deterministic control mapping system, which matches the conclusion in [46][44]. It is important to note, however, that this would be precluded by the present model, which would require which user would be transmitted to be known deterministically to a participant just arriving in the network who in this case would not have observed anything since there is no control information being sent. Additional control rate savings and increased rewards enabled by randomization, which will require the assumption of synchronized common randomness at all participants in the scheme, are an important direction for future work. V. C ONCLUSION This paper analyzed a Markov decision process in which the state was composed of a series of local states, each observed at a different location in a network. Using recent results from multiterminal information theory regarding distributed and interactive function computation, the minimum amount of control information that would be necessary to exchange in order for the system to simulate a centralized controller having access to the global state was determined. Next, the information theoretic cost of communication was incorporated into the reward function in the MDP, and the problem of simultaneously designing the controller and the messaging scheme to maximize the associated combined reward was formulated, creating a tradeoff between communication and performance. To provide candidate solutions for the associated optimization problem, an alternating optimization method was presented that produces a sequence of rewards that always converges, and when the associated messaging scheme and controller map converges, it converges to a Nash equilibrium for the problem. A series of running examples from downlink wireless resource allocation illustrated the ideas throughout. Important directions for future investigation involve allowing time varying messaging and control schemes, the use of historical observations of messages in a POMDP like framework, and the use of rate distortion theory to aid with the derivation of tradeoffs between communication and control reward in the present decentralized MDP context. R EFERENCES [1] R. Bellman, “A markovian decision process,” DTIC Document, Tech. Rep., 1957. [2] M. L. Putterman, Markov Decision Processes: Discrete Stochastic Dynamic Programming. New York: John Wiley & Sons, Mar. 2005. [3] K. Hsu and S. I. Marcus, “Decentralized control of finite state markov processes,” IEEE Transactions on Automatic Control, vol. 27, no. 2, pp. 426–1431, April 1982. [4] Y. C. Ho and K. C. Chu, “Team decision theory and information structures in optimal control problems - part i,” IEEE Transactions on Automatic Control, vol. 17, no. 1, pp. 15–22, February 1972. [5] N. R. Sandell, P. Varaiya, M. Athans, and M. Safonov, “Survey of decentralized control methods for large scale systems,” IEEE Transactions on Automatic Control, vol. 23, no. 2, pp. 108–128, April 1978. [6] S. Y. Park and A. Sahai, “Network coding meets decentralized control: Capacity-stabilizabililty equivalence,” in Decision and Control and European Control Conference (CDC-ECC), 2011 50th IEEE Conference on. IEEE, 2011, pp. 4817–4822. [7] ——, “Network coding meets decentralized control: Network linearization and capacity-stabilizablilty equivalence,” arXiv preprint arXiv:1308.5045, 2013. [Online]. Available: http://arxiv.org/pdf/1308. 5045v1.pdf [8] V. Krishnamurthy, Partially Observed Markov Decision Processes From Filtering to Controlled Sensing. Cambridge University Press, 2016. [9] D. S. Bernstein, S. Zilberstein, and N. Immerman, “The complexity of decentralized control of markov decision processes,” in In proceedings of the sixteenth conference on Uncertainty in Artificial Intelligence(UAI2000), 2000. [10] C. Boutilier, “Planning, learning and coordination in multiagent decision processes,” in In Proceedings of the 6th Conference on Theoretical Aspects of Rationality and Knowledge, March 1996, pp. 195–210. [11] R. Nair, M. Tambe, M. Yokoo, D. Pynadath, and S. Marsella, “Taming decentralized pomdps: Towards efficient policy computation for multiagent settings,” in International Joint Conference on Artificial Intelligence, August 2003, pp. 705–711. [12] I. Chades, B. Scherrer, and F. Charpillet, “A heuristic approach for solving decentralized-pomdp: assessment on the pursuit problem,” in Proceedings of the 2002 ACM Symposium on Applied Computing, March 2002, pp. 57–62. [13] D. Szer, C. Francois, and S. Zilberstein, “Maa*: A heuristic search algorithm for solving decentralized pomdps,” in 21st Conference on Uncertainty in Artificial Intelligence-UAI, July 2005. [14] F. Olienhoek, M. T. J. Spaan, and N. A. Vlassis, “Optimal and approximate q-value functions for decentralized pomdps,” Journal of Artificial Intelligence Research(JAIR), vol. 32, pp. 289–353, May 2008. 11 [15] S. Seuken and S. Zilberstein, “Formal models and algorithms for decentralized decision making under uncertainty,” Autonomous Agents and Multi-Agent Systems, vol. 17, no. 2, pp. 190–250, October 2008. [16] S. Tatikonda, A. Sahai, and S. Mitter, “Stochastic linear control over a communication channel,” IEEE Transactions on Automatic Control, vol. 49, no. 9, pp. 1549–1561, September 2004. [17] S. Tatikonda and S. Mitter, “Control under communication constraints,” IEEE Transactions on Automatic Control, vol. 49, no. 7, pp. 1056–1068, July 2004. [18] V. Borkar and S. Mitter, “Lqg control with communication constraints,” in in Communication, Computation, Control, and Signal Processing: A Tribute to Thomas Kailath, G. Longo, Ed. Norwell: MA:Kluwer, 1997, pp. 365–373. [19] W. Wong and R. Brockett, “Systems with finite communication bandwidth contraints i: State estimation problems,” IEEE Transactions on Automatic Control, vol. 42, no. 9, pp. 1294–1299, September 1997. [20] A. Sahai and S. Mitter, “The necessity and sufficiency of anytime capacity for stabilization of a linear system over a noisy communication link part i: Scalar systems,” Information Theory, IEEE Transactions on, vol. 52, no. 8, pp. 3369–3395, 2006. [21] R. T. Sukhavasi and B. Hassibi, “Anytime reliable codes for stabilizing plants over erasure channels,” in Decision and Control and European Control Conference (CDC-ECC), 2011 50th IEEE Conference on. IEEE, 2011, pp. 5254–5259. [22] ——, “Linear error correcting codes with anytime reliability,” in Information Theory Proceedings (ISIT), 2011 IEEE International Symposium on. IEEE, 2011, pp. 1748–1752. [23] ——, “Linear time-invariant anytime codes for control over noisy channels,” IEEE Transactions on Automatic Control, vol. pp, no. 99, 2016. [24] S. Y. Park and A. Sahai, “An algebraic mincut-maxflow theorem,” in Information Theory Proceedings (ISIT), 2011 IEEE International Symposium on. IEEE, 2011, pp. 608–612. [25] P. J. Gmytrasiewicz and E. H. Durfee, “Rational coordination in multiagent environments,” Autonomous Agents and Multi-Agent Systems, vol. 3, no. 4, pp. 319–350, December 2000. [26] D. V. Pynadath and M. Tambe, “The communicative multiagent team decision problem: Analyzing teamwork theories and models,” Journal of Artificial Intelligence Research, vol. 16, pp. 389–423, June 2002. [27] P. Xuan, V. Lesser, and S. Zilberstein, “Communication in multi-agent markov decision processes,” in MultiAgent Systems, 2000. Proceedings. Fourth International Conference on. IEEE, 2000, pp. 467–468. [28] P. Xuan and V. Lesser, “Multi-agent policies: from centralized ones to decentralized ones,” in Proceedings of the first international joint conference on Autonomous agents and multiagent systems: part 3, 2002, pp. 1098–1105. [29] P. Xuan, V. Lesser, and S. Zilberstein, “Communication decisions in multi-agent cooperation: model and experiments,” in Proceedings of the fifth international conference on Autonomous agents, 2001, pp. 616–623. [30] V. Doshi, D. Shah, M. Medard, and S. Jaggi, “Functional compression through graph coloring,” IEEE Transactions on Information Theory, vol. 56, no. 8, pp. 3901–3917, Aug. 2010. [31] M. Sefidgaran and A. Tchamkerten, “Distributed function computation over a rooted directed tree,” IEEE Trans. Inform. Theory, vol. PP, no. 99, p. 1, February 2016. [32] V. Prabhakaran, D. Tse, and K. Ramchandran, “Rate region of the quadratic Gaussian CEO problem,” in Proc. Int. Symp. Inform. Theory (ISIT), Jun. 2004, p. 117. [33] N. Ma and P. Ishwar, “Interactive source coding for function computation in collocated networks,” IEEE Trans. Inform. Theory, vol. 58, no. 7, pp. 4289–4305, July 2012. [34] D. P. Bertsekas, Dynamic Programming and Optimal Control. Athena Scientific, 2005. [35] M. Luby, “Lt codes,” in Proceedings of the 43rd Symposium on Foundations of Computer Science, Nov. 2002, pp. 271–280. [36] S. Verdu and S. Shamai, “Variable-rate channel capacity,” IEEE Transactions on Information Theory, vol. 56, no. 6, pp. 2651–2667, Jun. 2010. [37] U. Erez, M. D. Trott, and G. W. Wornell, “Rateless coding for Gaussian channels,” IEEE Transactions on Information Theory, vol. 58, no. 2, pp. 530–547, Feb. 2012. [38] Gwanmo Ku and John MacLaren Walsh, “Resource Allocation and Link Adaptation in LTE & LTE Advanced: A Tutorial,” IEEE Communications Surveys and Tutorials, vol. 17, no. 3, pp. 1605– 1633, 2015. [Online]. Available: http://dx.doi.org/10.1109/COMST. 2014.2383691 [39] J. Ren, B. Boyle, G. Ku, S. Weber, and J. M. Walsh, “Overhead performance tradeoffs - a resource allocation perspective,” IEEE Trans. Inform. Theory, vol. 62, no. 6, pp. 3243–3269, February 2016. [40] J. Cardinal, S. Fiorini, and G. Joret, “Minimum entropy coloring,” Journal of Combinatorial Optimization, vol. 16, no. 4, pp. 361–377, Jan. 2008. [41] S. Torabi and J. M. Walsh, “Practical interactive scheme for extremum computation in distributed networks,” in 2016 International Symposium on Information Theory (ISIT), Jul. 2016, to appear. [Online]. Available: http://www.ece.drexel.edu/walsh/Torabi ISIT 2016.pdf [42] Bradford D. Boyle, Jie Ren, John MacLaren Walsh, and Steven Weber, “Interactive Scalar Quantization for Distributed Resource Allocation,” IEEE Transactions on Signal Processing, vol. 64, no. 5, pp. 1243–1256, Mar. 2016. [Online]. Available: http: //dx.doi.org/10.1109/TSP.2015.2483479 [43] S. Torabi and J. M. Walsh, “Interactive quantization for extremum computation in collocated networks,” in Data Compression Conference (DCC), Mar. 2016, 1 page paper & presentation. [Online]. Available: http://www.ece.drexel.edu/walsh/Torabi DCC 2016.pdf [44] K. P. Murphy, “A survey of pomdp solution techniques,” Univ. Calif., Berkeley, CA, Tech. Rep., September 2000. [Online]. Available: http://www.cs.ubc.ca/∼murphyk/Papers/pomdp.pdf [45] R. B. Myerson, Game theory. Harvard University Press, 2013. [46] S. Singh, T. Jaakkola, and M. Jordan, “Learning without state-estimation in partially observable markov decision processes,” in In proceedings of the eleventh International Conference on Machine Learning, 1994. Jie Ren (S’14) received the B.S. degree in Electrical Engineering from Tsinghua University, China, in 2009, and the M.S. degree in Telecommunication from Widener University, Chester, PA in 2011. Since September 2011 he has been pursuing a Ph.D. at Drexel University, Philadelphia, PA within the Adaptive Signal Processing and Information Theory Research Group. After interning with the Wireless Big Data Research Team, Huawei(US) in 2015, he joined Futurewei (Bridgewater, NJ) in 2016 as a software engineer in wireless access. Solmaz Torabi (S’14) received the B.Sc. degree in Electrical Engineering from Sharif University of Technology, Iran, in 2011. She has been working toward her Ph.D. degree since 2013 within the Adaptive Signal Processing and Information Theory Research Group in the department of Electrical and Computer Engineering at Drexel University, Philadelphia, PA. Her research interests include the areas of information theory and interactive communication. John MacLaren Walsh (S’01-M’07-SM’15) received the B.S. (magna cum laude), M.S. and Ph.D. degrees in electrical and computer engineering from Cornell University, Ithaca, NY in 2002, 2004, and 2006, respectively. In September 2006, he joined the Department of Electrical and Computer Engineering at Drexel University, Philadelphia PA, where he is currently a associate professor. At Drexel, he directs the Adaptive Signal Processing and Information Theory Research Group.
3cs.SY
arXiv:1612.02349v1 [math.GR] 7 Dec 2016 On the supersoluble residual of mutually permutable products V. S. Monakhov January 23, 2018 Abstract We prove that if a group G = AB is the mutually permutable product of the supersoluble subgroups A and B, then the supersoluble residual of G coincides with the nilpotent residual of the derived subgroup G′ . Keywords: finite groups, supersoluble subgroup, mutually permutable product. MSC2010: 20D20, 20E34 All groups in this paper are finite. If F is a formation and G is a group, then GF is the F-residual of G, i.e., the smallest normal subgroup of G with quotient in F. A group G = AB is called the mutually permutable product of subgroups A and B if UB = BU and AV = V A for all U ≤ A and V ≤ B. Such groups were studied in [1]–[4], see also [5]. We prove the following theorem. Theorem 1. Let G = AB be the mutually permutable product of the supersoluble  N subgroups A and B. Then GU = (G′ )N = A, B . Here N and U are respectively the formation of all nilpotent groups and the formation of   all supersoluble groups, and A, B = h[a, b] | a ∈ A, b ∈ Bi. We need the following lemmas. Lemma 1 ([6, 4.8]). Let G = AB be the product of two subgroups A and B. Then   (1) A, B ⊳ G;   (2) if A1 ⊳ A, then A1 A, B ⊳ G;   (3) G′ = A′ B ′ A, B . 1 If X and F are hereditary formations, then, according to [7, p. 337-338], the product XF = { G ∈ E | GF ∈ X} is also a hereditary formation. Lemma 2 ([7, IV.11.7]). Let F and H be formations, G be a group and K ⊳ G. Then (1) (G/K)F = GF K/K; (2) GFH = (GH )F ; (3) if H ⊆ F, then GF ⊆ GH . If H is a subgroup of a group G, then H G denotes the smallest normal subgroup of G containing H. Lemma 3 ([6, 5.31]). Let H be a subnormal subgroup of a group G. If H belongs to a Fitting class F, then H G ∈ F. In particular, (1) if H is nilpotent, then H G is also nilpotent; (2) if H is p-nilpotent, then H G is also p-nilpotent. Lemma 4. Let G = AB be the product of the supersoluble subgroups A and B. Then   G ≤ A, B . U P r o o f. By Lemma 1 (1,3) and Lemma 2 (1),  ′         G/ A, B = G′ A, B / A, B = A′ B ′ A, B / A, B =         = A′ A, B / A, B B ′ A, B / A, B .       The subgroups A′ A, B / A, B ≃ A′ / A′ ∩ A, B ,       B ′ A, B / A, B ≃ B ′ / B ′ ∩ A, B    ′ are nilpotent [8, VI.9.1] and normal in G/ A, B by Lemma 1 (3), so G/ A, B is nilpotent.     By Lemma 1 (3), A A, B and B A, B are normal in G. In view of the Baer Theorem [9],     G/ A, B is supersoluble. Hence, GU ≤ A, B . ⊠ A Fitting class which is also a formation is called a Fitting formation. The class of all abelian groups is denoted by A. Lemma 5 [7, II.2.12]. Let X be a Fitting formation, and let G = AB be the product of normal subgroups A and B. Then GX = AX B X . 2   P r o o f of Theorem 1. By Lemma 4, GU ≤ A, B . Since U ⊆ NA [8, VI.9.1], by Lemma 2 (2,3), we have G(NA) = (GA )N = (G′ )N ≤ GU . Verify the reverse inclusion. Since (G/(G′ )N )′ = G′ (G′ )N /(G′ )N = G′ /(G′ )N is nilpotent, G/(G′ )N = A(G′ )N /(G′ )N · B(G′ )N /(G′ )N is supersoluble in view of [1, Theorem 3.8] and GU ≤ (G′ )N . Thus, GU = (G′ )N . By Lemma 1 (3), G′ = A′ B ′ [A, B] = (A′ )G (B ′ )G [A, B]. The subgroups A′ and B ′ are subnormal in G by [4, Theorem 1] and nilpotent, therefore (A′ )G (B ′ )G is normal in G and nilpotent by Lemma 3 (1). In view of Lemma 5 with X = N, we get GU = (G′ )N = ((A′ )G (B ′ )G )N [A, B]N = [A, B]N . ⊠ Corollary 1.1. Let G = AB be the mutually permutable product of the supersoluble  subgroups A and B. If [A, B is nilpotent, then G is supersoluble. ⊠ The class of all p-nilpotent groups coincides with the product Ep′ Np , where Np is the class of all p-groups and Ep′ is the class of all p′ -groups. A group G is p-supersoluble if all chief factors of G having order divisible by the prime p are exactly of order p. The derived subgroup of a p-supersoluble group is p-nilpotent [8, VI.9.1 (a)]. The class of all p-supersoluble groups is denoted by pU. It’s clear that Ep′ Np ⊆ pU ⊆ Ep′ Np A. Theorem 2. Let G = AB be the mutually permutable product of the p-supersoluble  E ′ Np subgroups A and B. Then GpU = (G′ )Ep′ Np = A, B p . P r o o f. By Lemma 2, (G′ )Ep′ Np = (GA )Ep′ Np = GEp′ Np A ≤ GpU . Verify the reverse inclusion. The quotient group G/(G′ )Ep′ Np = (A(G′ )Ep′ Np /(G′ )Ep′ Np )(B(G′ )Ep′ Np /(G′ )Ep′ Np ) is the mutually permutable product of the p-supersoluble subgroups A(G′ )Ep′ Np /(G′ )Ep′ Np and B(G′ )Ep′ Np /(G′ )Ep′ Np . The derived subgroup (G/(G′ )Ep′ Np )′ = G′ (G′ )Ep′ Np /(G′ )Ep′ Np = G′ /(G′ )Ep′ Np 3 is p-nilpotent. By [4, Corollary 5], G/(G′ )Ep′ Np is p-supersoluble, consequently, GpU ≤ (G′ )Ep′ Np . Thus, GpU = (G′ )Ep′ Np . By Lemma 1 (3), G′ = A′ B ′ [A, B] = (A′ )G (B ′ )G [A, B]. The subgroups A′ and B ′ are subnormal in group G [4, Theorem 1] and p-nilpotent [8, VI.9.1 (a)], hence (A′ )G (B ′ )G normal in G and p-nilpotent by Lemma 3 (2). In view of Lemma 5 with X = Ep′ Np , we get GpU = (G′ )Ep′ Np = ((A′ )G (B ′ )G )Ep′ Np )[A, B]Ep′ Np = [A, B]Ep′ Np . ⊠ Corollary 2.1. Let G = AB be the mutually permutable product of the p-supersoluble  subgroups A and B. If [A, B is p-nilpotent, then G is p-supersoluble. References [1] M. Asaad and A. Shaalan, On the supersolubility of finite groups. Arch. Math. 53, 318– 326 (1989). [2] M. J. Alejandre, A. Ballester-Bolinches and J. Cossey, Permutable products of supersoluble groups. J. Algebra 276, 453–461 (2004). [3] A. Ballester-Bolinches, J. Cossey and M. C. Pedraza-Aguilera, On products of supersoluble groups. Rev. Mat. Iberoamericana 20, 413–425 (2004). [4] J. C. Beidleman and H. Heineken, Mutually permutable subgroups and group classes. Arch. Math. 85, 18–30 (2005). [5] A. Ballester–Bolinches, R. Esteban–Romero and M. Asaad, Berlin–New York: Walter de Gruyter, 2010. (De Gruyter expositions in mathematics; 53) [6] V. S. Monakhov. Introduction to the theory of finite groups and their classes. Minsk: Vyshejshaja shkola, 2006 (in Russian). [7] K. Doerk and T. Hawkes, Finite soluble groups. Berlin–New York: Walter de Gruyter, 1992. [8] B. Huppert. Endliche Gruppen I. Berlin – Heidelberg – New York: Springer. 1967. [9] R. Baer. Classes of finite groups and their properties. Illinois J. Math. 1, 115-187 (1957). V. S. MONAKHOV Department of mathematics, Gomel F. Scorina State University, Gomel, BELARUS E-mail address: [email protected] 4
4math.GR
JORDAN PROPERTY FOR NON-LINEAR ALGEBRAIC GROUPS AND PROJECTIVE VARIETIES arXiv:1507.02230v2 [math.AG] 19 Feb 2017 SHENG MENG, DE-QI ZHANG Abstract. A century ago, Camille Jordan proved that the complex general linear group GLn (C) has the Jordan property: there is a Jordan constant Cn such that every finite subgroup H ≤ GLn (C) has an abelian subgroup H1 of index [H : H1 ] ≤ Cn . We show that every connected algebraic group G (which is not necessarily linear) has the Jordan property with the Jordan constant depending only on dim G, and that the full automorphism group Aut(X) of every projective variety X has the Jordan property. 1. Introduction We work over an algebraically closed field k of characteristic zero unless explicitly stated otherwise. A group G is a Jordan group if there is a constant J, called a Jordan constant, such that G satisfies the following Jordan property: every finite subgroup H of G has an abelian subgroup H1 with the index r := [H : H1 ] ≤ J (cf. [16, Definition 1]). Equivalently, we may even require H1 to be normal in H, though we will not require so in this paper. Indeed, consider the action of H on H/H1 by left multiplication. This yields a homomorphism of H to the symmetric group on r letters. The kernel of this homomorphism is a normal subgroup H2 of H, of index dividing r!, and contained in H1 . Define J(G) to be the smallest Jordan constant for G; hence G is Jordan if and only if J(G) < ∞. A family G of groups is uniformly Jordan if there is a constant, denoted as J(G), serving as a Jordan constant for every group in the family G. The question below was asked by Professor V. L. Popov. Question 1.1. (cf. [16, §2, Problem A]) Let X be a projective variety of dimension n. Is the full automorphism group Aut(X) of X a Jordan group? For projective surfaces X, Question 1.1 has been affirmatively answered by V. L. Popov (except when X is birational to E × P1 with E an elliptic curve), and Y. G. Zarhin (the remaining case); see [16], [21], and the references therein. In higher dimensions, Y. Prokhorov and C. Shramov [17, Theorem 1.8] proved the Jordan property for the birational automorphism group Bir(X), assuming either X is non-uniruled, or X has 2010 Mathematics Subject Classification. 14J50, 32M05. Key words and phrases. Automorphism groups of projective varieties, Jordan property for groups. 1 2 SHENG MENG, DE-QI ZHANG vanishing irregularity and the Borisov-Alexeev-Borisov conjecture about the boundedness of terminal Fano varieties which has just been affirmatively confirmed by C. Birkar; see [1, Theorem 1.1]. Our approach towards Jordan property for the full automorphism group Aut(X) of a projective variety X in arbitrary dimension is more algebraic-group theoretical. It does not use the classification of projective varieties. If X is a projective variety, a classical result of Grothendieck says that the neutral component Aut0 (X) of Aut(X) is an algebraic group. Conversely, by M. Brion [6, Theorem 1], every connected algebraic group of dimension n is isomorphic to Aut0 (X) for some smooth projective variety X of dimension 2n. In general, let H be a connected algebraic group which is not necessarily linear. By the classical result of Chevalley, there is a (unique) maximal connected linear algebraic normal subgroup L(H) of H and an abelian variety A(H) fitting the following exact sequence 1 → L(H) → H → A(H) → 1. By the classical result of Camille Jordan, L(H) is a Jordan group. Of course, A(H) is also a Jordan group. However, the extension of two Jordan groups may not be a Jordan group (cf. [16, §1.3.2]). Nevertheless, we would like to ask: Question 1.2. Let H be an algebraic group. Is H a Jordan group? Clearly, it suffices to consider connected algebraic groups. By [6], a positive answer to Question 1.1 implies a positive answer to Question 1.2. However, not every connected algebraic group is isogenous to the product of an abelian variety and a connected linear algebraic group, diminishing the hope to give a positive answer to Question 1.2 by using the fact that the latter two groups are Jordan groups (cf. Lemmas 2.3 and 2.4, [3, Remark 2.5 (ii)]). Conversely, a positive answer to Question 1.2 implies a positive answer to Question 1.1 by virtue of Lemma 2.5. As in [17, Lemma 2.8], the Jordan property of a group G is related to the bounded rank property of finite abelian subgroups of G: there exists a constant C such that every finite abelian subgroup H of G is generated by C elements. Denote by Rkf (G) the smallest constant of such C, see Definition 2.2 for details. Similarly we may define the uniformly bounded rank property of finite abelian subgroups for a family of groups. Now we state our main results which positively answer the above questions. JORDAN PROPERTY 3 Theorem 1.3. Fix an integer n ≥ 0. Let G be the family of all connected algebraic groups of dimension n. Then G is uniformly Jordan; its finite abelian subgroups have uniformly bounded rank. (See Theorem 3.9 for upper bounds of J(G) and Rkf (G) as functions in n.) Theorem 1.4. Fix an integer n ≥ 0. Let G = {Aut0 (X) | X is a projective variety of dimension n}. Then G is uniformly Jordan; its finite abelian subgroups have uniformly bounded rank. (See Theorem 3.13 for upper bounds of J(G) and Rkf (G) as functions in n.) Remark 1.5. Theorem 1.4 does not follow from Theorem 1.3 directly because dim Aut0 (X) cannot be bounded in terms of dim X. For example, by [14, Theorem 3], if Fd is the Hirzebruch surface of degree d ≥ 1 then Gd+1 is the unipotent radical of Aut0 (Fd ) with a Ga = (k, +) the additive group, and dim Aut0 (Fd ) = d + 5 is not bounded. In order to prove Theorem 1.4, we remove the influence of such unipotent radical by key Lemma 3.7. Let G be a connected algebraic group. Denote by Gaff the largest connected affine normal subgroup. Note that Gaff = L(G) . Every anti-affine subgroup of G is connected and contained in the center of G; in particular, every such subgroup is normal in G. Denote by Gant the largest anti-affine subgroup. The main ingredient of our proof is the very old and classical decomposition theorem G = Gaff · Gant for a connected algebraic group G. This is due to M. Rosenlicht [18, Corollary 5, p. 440], see also M. Brion [3] (or 3.1 below) for more modern elaborations. We also use the effective (and optimal) upper bound in M. Brion [5, Proposition 3.2] for the dimension of the anti-affine part of Aut0 (X), see Lemma 3.12. Our last main result below is an immediate consequence of Theorem 1.3 and Lemma 2.5. Theorem 1.6. Let X be a projective variety. Then Aut(X) is a Jordan group. We remark that if A is a non-trivial abelian variety and Y is a non-trivial rational variety, then Bir(A × Y ) is not a Jordan group (cf. [20, Corollary 1.4]). Hence the Jordan constant in Theorem 1.6, in general, depends on X and is not a birational invariant of X. We refer to [11] for related results. Acknowledgement. The authors heartily thank our friends and colleagues, and especially the referees of this paper, for providing Remark 2.6, improving Lemma 3.2, clarifying Corollary 3.14, removing the inaccuracies and many suggestions to improve the paper. The second-named author is supported by an ARF of NUS. 4 SHENG MENG, DE-QI ZHANG 2. Preliminary results 2.1. In this paper, eG or just e denotes the identity element for a group G. We denote by Z(G) the centre of G. For a (not necessarily linear) algebraic group G, we use G0 to denote the neutral component of G. For a projective variety X, NS(X) denotes the Néron-Severi group, and NSQ (X) := NS(X) ⊗Z Q. Definition 2.2. Given a group G, we introduce the following constants: Bd(G) = sup{|F | : |F | < ∞, F ≤ G}, Rkf (G) = sup{Rkf (A) : |A| < ∞, A is abelian, A ≤ G}, where Rkf (A) is the minimal number of generators of a finite abelian group A. We define Rkf ({eG }) = 0. Similarly we may define these constants for a family of groups. The easy observations below are frequently used. Lemma 2.3. Consider the exact sequence of groups 1 → G1 → G → G2 → 1. (1) J(G) ≤ Bd(G2 ) · J(G1 ). (2) If G1 is finite, then J(G2 ) ≤ J(G). (3) If Bd(G1 ) = 1, then J(G) ≤ J(G2 ). (4) If G ∼ = G1 × G2 , then J(G) ≤ J(G1 ) · J(G2 ). (5) Rkf (G) ≤ Rkf (G1 ) + Rkf (G2 ). (6) J(G) ≤ J(G2 ) · Bd(G1 )Rkf (G2 )·Bd(G1 ) . Proof. (1)-(5) are clear. For (6), we refer to the proof of [17, Lemma 2.8].  Lemma 2.4. Below are some important constants. (1) (Jordan) Every general linear group GLn (k) is a Jordan group. Hence every linear algebraic group is a Jordan group. Denote Cn := J(GLn (k)). It is known that Cn < ((8n)1/2 + 1)2n 2 (cf. [7, Theorem 36.14, p. 258-262]). (2) (Minkowski) Bd(GLn (K)) < ∞ for any field K which is finitely generated over Q. The bound depends on n and [K : Q] (cf. [19, Theorem 5, and §4.3]). (3) Rkf (T ) = dim T , when T is an algebraic torus. (4) Rkf (GLn (k)) = n (see [10, §15.4 Proposition] and use (3)). (5) Rkf (A) = 2 dim A, when A is an abelian variety. JORDAN PROPERTY 5 For any projective variety X and its normalization X ′ , Aut(X) lifts to X ′ . So we may assume X is normal in Theorem 1.6. Then, the following lemma and Theorem 1.4 will imply Theorem 1.6. Lemma 2.5. Let X be a normal projective variety. Then there exists a constant ℓ (depending on X), such that for any finite subgroup G ≤ Aut(X), we have [G : G ∩ Aut0 (X)] ≤ ℓ. Proof. Take an Aut(X)- (and hence G-) equivariant projective resolution π : X ′ → X. The action of Aut(X ′ ) on X ′ induces a natural representation on NSQ (X ′ ). Consider the exact sequence 1 → K → G → G|NSQ (X ′ ) → 1, where K is the kernel of the representation. Note that G|NSQ (X ′ ) ≤ GLm (Q), where m = dimQ NSQ (X ′ ) is the Picard number of X ′ . So by Lemma 2.4(2), there is a constant ℓ1 , such that |G|NSQ (X ′ ) | ≤ ℓ1 . Thus we can find a subgroup H ≤ G such that [G : H] ≤ ℓ1 and H acts trivially on NSQ (X ′ ). In particular, H preserves an ample divisor class [H] of X ′ and hence H ≤ Aut[H] (X ′ ). By [13, Proposition 2.2], Aut[H] (X ′ )/ Aut0 (X ′ ) is finite. So there is a constant ℓ2 , such that [H : H ∩ Aut0 (X ′ )] ≤ ℓ2 . Now by [4, Proposition 2.1], π(Aut0 (X ′ )) ≤ Aut0 (X) and we can identify Aut0 (X ′ ) with its π-image. Thus H ∩ Aut0 (X ′ ) ≤ H ∩ Aut0 (X). So [H : H ∩ Aut0 (X)] ≤ [H : H ∩ Aut0 (X ′ )] ≤ ℓ2 . The lemma follows by setting ℓ = ℓ1 · ℓ2 .  Remark 2.6. Alternatively, one may show directly the following statement without taking resolution: let X be a projective variety, L an ample line bundle on X, and Aut[L] (X) the subgroup of Aut(X) that fixes the class of L in NSQ (X); then Aut[L] (X) has finitely many components. To see this, we identify Aut(X) with an open subscheme of the Hilbert scheme Hilb(X × X), by associating with each automorphism f its graph Γf (cf. [9, Theorem 5.23]). Also, p∗1 (L) ⊗ p∗2 (L) is an ample line bundle on X × X, and its pull-back to Γf (identified with X) is L ⊗ f ∗ (L), which is numerically equivalent to L2 when f ∈ Aut[L] (X). Replacing L with a positive multiple, we may thus assume that L ⊗ f ∗ (L) is algebraically equivalent to L2 . Then the Hilbert polynomial of Γf is independent of f ∈ Aut[L] (X). Let P be this polynomial. Then Aut[L] (X) is contained in HilbP (X ×X). Note that HilbP (X ×X) is a projective scheme by [12, Chapter I, Theorem 1.4] and Aut[L] (X) ∩ C is closed in C for any connected component C of Aut(X). Hence, Aut[L] (X) is a quasi-projective scheme which yields the assertion. So Lemma 2.5 works for non-normal X. We need a few more results from algebraic group theory. The proofs are easy but we give proofs here for the convenience of the reader. 6 SHENG MENG, DE-QI ZHANG Lemma 2.7. Let p : S̃ → S be an isogeny between two semisimple linear algebraic groups. Then |Z(S)| ≤ |Z(S̃)|. Lemma 2.8. Let G be a connected almost simple linear algebraic group. Then we have: |Z(G)| ≤ Rank G + 1 < dim G < 4(Rank G)2 where the rank Rank G of G equals dim T of a (and every) maximal algebraic torus T contained in G. Proof. There is an isogeny p : G̃ → G such that G̃ is simply connected and almost simple. By Lemma 2.7 and replacing G by G̃, we may assume further that G is simply connected. Up to isomorphism, there is a 1-1 correspondence between simply connected almost simple linear algebraic groups G and the Dynkin diagrams given in the following table, which also shows their centres and ranks. The lemma follows from the table. D(G) Z(G) dim G Rank G Aℓ , ℓ > 0 Zℓ+1 ℓ(ℓ + 2) ℓ Bℓ , ℓ > 1 Z2 ℓ(2ℓ + 1) ℓ Cℓ , ℓ > 2 Z2 L ℓ(2ℓ + 1) ℓ 2ℓ(4ℓ − 1) 2ℓ D2ℓ , ℓ > 1 Z2 Z2 D2ℓ+1 , ℓ > 1 Z4 (2ℓ + 1)(4ℓ + 1) 2ℓ + 1 E6 Z3 78 6 E7 Z2 133 7 E8 , F4 , G2 {eG } 248, 52, 14 8, 4, 2  Lemma 2.9. Let S be a connected semisimple linear algebraic group of dimension n. Then |Z(S)| ≤ nn . Proof. Let {Si }m i=1 be the minimal closed connected normal subgroups of positive dimension. (We set m := 0 when S is trivial.) The natural product map gives an isogeny Qm i=1 Si → S, with kernel contained in the centre of the domain of the map. By Lemmas 2.7 and 2.8, we have |Z(S)| ≤ m Y |Z(Si )| ≤ nm ≤ nn . i=1  Remark 2.10. It is well known that, up to isomorphism, there are only finitely many ndimensional semisimple linear algebraic groups. Thus there is a function N(n), such that every connected semisimple linear algebraic group of dimension ≤ n can be embedded JORDAN PROPERTY 7 into GLN(n) (k). Denote by S(n) the supremum of Jordan constants for all connected semisimple linear algebraic groups of dimension ≤ n. Clearly S(n) ≤ CN(n) . 3. Proof of Theorems In this section, we will prove Theorems 3.9 and 3.13 which are the precise versions of Theorems 1.3 and 1.4. The Jordan constant and the uniformly bounded rank in these theorems could be made more optimal at the expense of more complicated expressions, but they have not been done by us. 3.1. Here we give some notations and facts first. (1) Let G be a group. G(1) = (G, G) denotes the commutator subgroup of G. (2) Let G be a connected algebraic group. We use the conventions and facts as in [3, §1] (see also [18]). Gaff and Gant denote respectively the affine part and antiaffine part of G, both being connected and normal in G. We have the Rosenlicht decomposition: G = Gaff · Gant , Gant ≤ Z(G)0 . Further, G/Gaff ∼ = Gant /(Gant ∩ Gaff ) is an abelian variety (the albanese variety of G), and G/Gant ∼ = Gaff /(Gaff ∩ Gant ) is the largest affine quotient group of G. (3) Let G be a connected algebraic group. Denote by Ru (G) the unipotent radical of Gaff and Gr a Levi subgroup of Gaff so that we have (cf. [15]): Gaff = Ru (G) ⋊ Gr . Levi subgroups of Gaff are all Ru (G)-conjugate to each other, and Gr is one of them which we fix. (4) Let G be a connected reductive linear algebraic group. Then G = R(G) · G(1) where R(G) is the solvable radical of G (an algebraic torus now), R(G) = Z(G)0 , and G(1) is semisimple and connected, see [10, §19]. (5) Let G be a connected linear algebraic group and N ≤ G a closed normal subgroup with γ : G → G/N the quotient map. Then the γ-image of a Levi subgroup of G is a Levi subgroup of G/N. (6) Every nontrivial unipotent element of a linear algebraic group has infinite order, because our ground field k has characteristic zero. 8 SHENG MENG, DE-QI ZHANG Lemma 3.2. Let G be a connected reductive linear algebraic group. Then dim G ≤ 4(Rank G)2 . Proof. The product map gives an isogeny Z(G)0 × G(1) → G. Since G(1) is semisimple, Q (1) there is an isogeny m with Si connected and almost simple. Hence we have i=1 Si → G an isogeny π : Z(G)0 × m Y Si → G. i=1 Take a maximal torus Ti of Si and note that Z(G)0 is an algebraic torus. Then π(Z(G)0 × Pm Qm i=1 Rank Si ≤ Rank G. By Lemma i=1 Ti ) is an algebraic torus of G. So Rank Z(G)0 + 2.8, dim Si < 4(Rank Si )2 . So dim G = dim Z(G)0 + Pm ≤ Rank Z(G)0 + i=1 P m ≤ 4(Rank Z(G)0 + dim Si 2 i=1 4(Rank Si ) Pm 2 i=1 Rank Si ) ≤ 4(Rank G)2 .  Lemma 3.3. Let G be a connected reductive linear algebraic group with dim G ≤ n. Then Rkf (G) ≤ n + N(n). Proof. We refer to Lemma 2.3 (5) to give a proof by reduction. Consider the exact sequence 1 → Z(G)0 → G → G/Z(G)0 → 1. Then (∗) Rkf (G) ≤ Rkf (Z(G)0 ) + Rkf (G/Z(G)0). Since Z(G)0 is an algebraic subtorus of G, Lemma 2.4 (3) implies Rkf (Z(G)0 ) ≤ dim Z(G)0 ≤ n. Note that G/Z(G)0 ∼ = G(1) /(Z(G)0 ∩ G(1) ) is semisimple connected and of dimension ≤ dim G ≤ n. By Remark 2.10, G/Z(G)0 can be embedded into GLN(n) (k). So by Lemma 2.4 (4), Rkf (G/Z(G)0) ≤ N(n). Combining the above two inequalities about ranks, we get the lemma, via the above display (∗).  Lemma 3.4. Let G be a connected reductive linear algebraic group with dim G(1) ≤ n. Then J(G) ≤ S(n). Proof. The product map gives an isogeny Z(G)0 × G(1) → G. Thus Lemma 2.3 (2) and the commutativity of Z(G)0 imply (cf. Remark 2.10): J(G) ≤ J(Z(G)0 × G(1) ) = J(G(1) ) ≤ S(n). JORDAN PROPERTY 9  Corollary 3.5. Let G be a connected linear algebraic group with dim(Gr )(1) ≤ n. Then J(G/N) ≤ S(n) for any closed normal subgroup N of G. Proof. First consider the exact sequence 1 → Ru (G) → G → Gr → 1, where Ru (G) is the unipotent radical of G. Since Bd(Ru (G)) = 1, by Lemmas 2.3 (3) and 3.4, J(G) ≤ J(Gr ) ≤ S(n). Note that dim((G/N)r )(1) ≤ dim(Gr )(1) ≤ n, see 3.1. Hence J(G/N) ≤ S(n) also holds.  Remark 3.6. Lemma 3.4 slightly extends [16, Theorem 15]. Below is our key lemma. The proof crucially utilizes the Rosenlicht decomposition G = Gaff · Gant as in 3.1. Recall Gaff = Ru (G) ⋊ Gr . Lemma 3.7. Let G be a connected algebraic group with dim(Gr )(1) ≤ n and let H ≤ G be a finite subgroup. Then there exists a subgroup H1 ≤ H such that the index [H : H1 ] ≤ (1) (1) S(n), H1 ≤ Z(G) and |H1 | ≤ nn . Proof. Consider the natural homomorphism ϕ : G → G/Gaff × G/Gant with Ker ϕ = Gaff ∩ Gant ≤ Gant ≤ Z(G). Since G/Gaff is abelian and by Corollary 3.5, we have: J(G/Gaff × G/Gant ) = J(G/Gant ) = J(Gaff /(Gaff ∩ Gant )) ≤ S(n). So there exists a subgroup H1 ≤ H such that the index [H : H1 ] ≤ S(n) and ϕ(H1 ) is abelian. Note that Gr = Z(Gr ) · Gs , where Gs := (Gr )(1) is connected semisimple. Thus we (1) have a natural injective homomorphism i : H1 → Gs from the following commutative diagram. (1)  H1  ❳, ❳❳❳❳❳/ G(1) = (Gaff )(1) / / (Gaff )(1) /(Ru (G) ∩ (Gaff )(1) ) ❳❳❳❳❳ ❚ ❚❚ ❳❳❳❳❳ ❳❳❳❳❳ ❚❚❚❚❚❚p ∼ ❚ ❳❳❳❳❳ = ❳❳❳❳❳❚❚❚❚❚❚* i ❳❳❳❳❳ *  , (Gr )(1) = Gs where G(1) = (Gaff )(1) because G = Gaff · Gant and Gant ≤ Z(G). The surjective group homomorphism p is the restriction of the group homomorphism Gaff ։ Gr to (Gaff )(1) , 10 SHENG MENG, DE-QI ZHANG (1) and Ker p = Ru (G) ∩ (Gaff )(1) . Note that Ker i = Ker p ∩ H1 since (1) H1 = {eG } is finite (cf. 3.1 (6)). So i is injective. (1) Since ϕ(H1 ) is abelian, we have H1 imply (1) ≤ Ru (G) ∩ H1 (1) i(H1 ) ≤ Z(Gs ). Thus (1) |H1 | ≤ Ker ϕ ≤ Z(G). This and the above diagram ≤ |Z(Gs )| ≤ nn , since Gs = (Gr )(1) has dimension ≤ n, and by Lemma 2.9.  Lemma 3.8. Let G be a connected algebraic group with dim Gr ≤ n and dim Gant ≤ m. Then for any finite subgroup H with H (1) ≤ Z(G), we have Rkf (G/H (1) ) ≤ 2m+n+N(n). Proof. We refer to Lemma 2.3 (5) to give a proof by reduction. First, as in the diagram in Lemma 3.7, we have H (1) ≤ (Gaff )(1) ≤ Gaff = Ru (G) ⋊ Gr . We claim that H (1) ≤ Gr . Note that for any x, y ∈ H, we can write xyx−1 y −1 = ur, for some u ∈ Ru (G) and r ∈ Gr . Since ur ∈ Z(G), we have (ur)2 = u(ur)r = u2 r 2 , and inductively (ur)t = ut r t which equals eG for some t ∈ Z>0 . Hence ut = r −t ∈ Gr ∩ Ru (G) = {eG }, and then u = eG (cf. 3.1 (6)). Thus xyx−1 y −1 ∈ Gr . This proves the claim. Clearly H (1) is normal in G, since H (1) ≤ Z(G). Now consider the exact sequence 1 → Gaff /H (1) → G/H (1) → G/Gaff → 1, where G/Gaff is an abelian variety. By Lemma 2.3(5), we have (∗) Rkf (G/H (1) ) ≤ Rkf (Gaff /H (1) ) + Rkf (G/Gaff ). Note that G/Gaff ∼ = Gant /(Gant ∩Gaff ) (cf. 3.1). So we have Rkf (G/Gaff ) = 2 dim G/Gaff ≤ 2 dim Gant ≤ 2m by Lemma 2.4 (5). For Gaff /H (1) , the Levi decomposition Gaff ∼ = Ru (Gaff ) ⋊ Gr and H (1) ≤ Gr ∩ Z(G) imply Gaff /H (1) ∼ = Ru (G) ⋊ Gr /H (1) . Thus Rkf (Gaff /H (1) ) ≤ Rkf (Ru (G)) + Rkf (Gr /H (1) ). Since Ru (G) is a unipotent group, we have Rkf (Ru (G)) = 0 (cf. 3.1 (6)). For Gr /H (1) , this is also a connected reductive group with dim Gr /H (1) = dim Gr ≤ n. By Lemma 3.3, Rkf (Gr /H (1) ) ≤ n + N(n). Now the lemma follows from the above display (∗) and the two inequalities about ranks we just obtained.  The theorem below is the precise version of Theorem 1.3. Theorem 3.9. Let G be a connected algebraic group of dimension n. Then we have: n J(G) ≤ S(n) · (nn )(3n+N(n))·n , where S(n), N(n) are defined in Remark 2.10. Rkf (G) ≤ 3n + N(n), JORDAN PROPERTY 11 Proof. Rkf (G) ≤ 3n + N(n) is straightforward by Lemma 3.8. Let H ≤ G be a finite subgroup. By Lemma 3.7, there exists a subgroup H1 ≤ H with (1) (1) (1) [H : H1 ] ≤ S(n) such that H1 ≤ Z(G) and |H1 | ≤ nn . Note that H1 is normal closed (1) (1) in G. So H1 /H1 ≤ G/H1 is a finite abelian subgroup of a connected algebraic group (1) of dimension n. By Lemma 3.8, Rkf (H1 /H1 ) ≤ 3n + N(n). Applying Lemma 2.3 (6) to (1) (1) 1 → H1 → H1 → H1 /H1 → 1, n we can find an abelian subgroup A ≤ H1 with [H1 : A] ≤ (nn )(3n+N(n))·n . Clearly, n [H : A] ≤ S(n) · (nn )(3n+N(n))·n .  As we discussed in Remark 1.5, before giving the proof for Theorem 1.4, we need the following result which is proved in [8, §1, Proposition 7(b)]. Lemma 3.10. Let T be an algebraic torus acting faithfully on a projective variety X. Then T acts generically freely on X: the stabilizer subgroup Tx is trivial for general point x ∈ X. In particular, dim T = dim T x ≤ dim X. Lemma 3.11. Let G be a connected reductive linear algebraic group acting faithfully on a projective variety X with dim X = n. Then dim G ≤ 4n2 . Proof. Let T be a maximal torus of G. Then dim G ≤ 4(dim T )2 by Lemma 3.2. By Lemma 3.10, dim T ≤ n. So dim G ≤ 4n2 .  We also need the following effective (and optimal) bound of [5, Proposition 3.2]. Lemma 3.12. Let G be an anti-affine algebraic group acting faithfully on a projective variety X. Then dim G ≤ 2 dim X. The theorem below is the precise version of Theorem 1.4. Theorem 3.13. Let X be a projective variety of dimension n. Then we have: t J(Aut0 (X)) ≤ S(t) · (tt )(4n+t+N(t))·t , Rkf (Aut0 (X)) ≤ 4n + t + N(t) where t = 4n2 and S(t), N(t) are defined in Remark 2.10. Proof. Let G = Aut0 (X) and Gr a Levi subgroup of Gaff . By Lemmas 3.11 and 3.12, dim Gr ≤ t := 4n2 and dim Gant ≤ 2n. Then we are done by the same argument in the proof of Theorem 3.9.  Corollary 3.14. Let X be a projective variety of dimension n and G a connected algebraic group contained in Bir(X). Setting t = 4n2 , we have: t J(G) ≤ S(t) · (tt )(4n+t+N(t))·t , where S(t), N(t) are defined in Remark 2.10. Rkf (G) ≤ 4n + t + N(t), 12 SHENG MENG, DE-QI ZHANG Proof. By [18, Theorem 1], there exists a variety X0 birational to X such that G acts on X0 biregularly. Since the smooth locus of X0 is G-stable, we may assume that X0 is smooth. Then X0 is covered by G-stable quasi-projective open subsets by [2, Theorem 1]. So we may further assume that X0 is quasi-projective. Then X0 admits a G-equivariant embedding into the projectivization of a G-homogeneous vector bundle over an abelian variety by [2, Theorem 2]. In particular, X0 admits an G-equivariant embedding into a projective G-variety Y . Let X ′ be the closure of X0 in Y . Then X ′ is also a projective G-variety which is birational to X. So G ≤ Aut0 (X ′ ) and dim X ′ = n. The result then follows from Theorem 3.13.  References [1] C. Birkar, Singularities of linear systems and boundedness of Fano varieties, arxiv:1609.05543v1. [2] M. Brion, Some basic results on actions of nonaffine algebraic groups, in: Symmetry and spaces, 1-20, Progr. Math. 278, Birkhäuser, Boston, MA, 2010. [3] M. Brion, On the geometry of algebraic groups and homogeneous spaces, J. Algebra 329 (2011), 52-71. [4] M. Brion, On automorphism groups of fiber bundles, Publ. Mat. Urug. 12 (2011), 39-66. [5] M. Brion, On connected automorphism groups of algebraic varieties, J. Ramanujan Math. Soc. 28A (2013), 41-54. [6] M. Brion, On automorphisms and endomorphisms of projective varieties, in: Automorphisms in birational and affine geometry, 59-81, Springer Proc. Math. Stat., 79, Springer, Cham, 2014. [7] C. W. Curtis and I. Reiner, Representation theory of finite groups and associative algebras, Pure and Applied Mathematics, Vol. XI. Interscience Publishers, a division of John Wiley & Sons, New York-London, 1962. [8] M. Demazure, Sous-groupes algébriques de rang maximum du groupe de Cremona, (French) Ann. Sci. École Norm. Sup. (4) 3 (1970), 507-588. [9] B. Fantechi, L. Göttsche, L. Illusie, S. L. Kleiman, N. Nitsure and A. Vistoli, Fundamental algebraic geometry, Grothendieck’s FGA explained. Mathematical Surveys and Monographs, 123. American Mathematical Society, Providence, RI, 2005. x+339 pp. [10] J. E. Humphreys, Linear Algebraic Groups, Graduate Texts in Mathematics, Volume 21, Springer, 1975. [11] I. Mundet i Riera, Finite subgroups of Ham and Symp, arxiv:1605.05494. [12] J. Kollár, Rational curves on algebraic varieties, Ergebnisse der Mathematik und ihrer Grenzgebiete. 3. Folge. A Series of Modern Surveys in Mathematics 32. Springer-Verlag, Berlin, 1996. [13] D. I. Lieberman, Compactness of the Chow scheme: applications to automorphisms and deformations of Kähler manifolds, Fonctions de plusieurs variables complexes, III (Sém. François Norguet, 1975–1977 ), pp. 140–186, Lecture Notes in Math., 670, Springer, Berlin, 1978. [14] M. Maruyama, On automorphism groups of ruled surfaces, J. Math. Kyoto Univ. 11, No. 1 (1971), 89-112. [15] G. Mostow, Fully reducible subgroups of algebraic groups, Amer. J. Math. 78 (1956), 200-221. JORDAN PROPERTY 13 [16] V. L. Popov, Jordan groups and automorphism groups of algebraic varieties, in: Automorphisms in birational and affine geometry, 185-213, Springer Proc. Math. Stat., 79, Springer, Cham, 2014. [17] Y. Prokhorov and C. Shramov, Jordan property for groups of birational selfmaps, Compos. Math. 150 (2014), no. 12, 2054-2072. [18] M. Rosenlicht, Some basic theorems on algebraic groups, Amer. J. Math. 78 (1956), 401–443. [19] J. P. Serre, Bounds for the orders of the finite subgroups of G(k), Group representation theory, 405-450, EPFL Press, Lausanne, 2007. [20] Y. G. Zarhin, Theta groups and products of abelian and rational varieties, Proc. Edinburgh Math. Soc. 57, issue 1 (2014), 299-304. [21] Y. G. Zarhin, Jordan groups and elliptic ruled surfaces, Transform. Groups, 20 (2015), no. 2, 557572. Department of Mathematics National University of Singapore, 10 Lower Kent Ridge Road, Singapore 119076 E-mail address: [email protected] Department of Mathematics National University of Singapore, 10 Lower Kent Ridge Road, Singapore 119076 E-mail address: [email protected]
4math.GR
Applications of Graded Methods to arXiv:1803.02341v1 [math.RT] 6 Mar 2018 Cluster Variables in Arbitrary Types Thomas Booker-Price A thesis submitted for the degree of Doctor of Philosophy Department of Mathematics and Statistics Lancaster University June 2017 Applications of Graded Methods to Cluster Variables in Arbitrary Types Thomas Booker-Price A thesis submitted for the degree of Doctor of Philosophy June 2017 Abstract This thesis is concerned with studying the properties of gradings on several examples of cluster algebras, primarily of infinite type. We start by considering two classes of finite type cluster algebras: those of type Bn and Cn . We give the number of cluster variables of each occurring degree and verify that the grading is balanced. These results complete a classification in [16] for coefficient-free finite type cluster algebras. We then consider gradings on cluster algebras generated by 3×3 skew-symmetric matrices. We show that the mutation-cyclic matrices give rise to gradings in which all occurring degrees are positive and have only finitely many associated cluster variables (excepting one particular case). For the mutation-acyclic matrices, we prove that all occurring degrees have infinitely many variables and give a direct proof that the gradings are balanced. We provide a condition for a graded cluster algebra generated by a quiver to have infinitely many degrees, based on the presence of a subquiver in its mutation class. We use this to study the gradings on cluster algebras that are (quantum) coordinate rings of matrices and Grassmannians and show that they contain cluster variables of all degrees in N. Next we consider the finite list (given in [9]) of mutation-finite quivers that do not correspond to triangulations of marked surfaces. We show that A(X7 ) has a grading in which there are only two degrees, with infinitely many cluster variables e6 , E e7 and E e8 have infinitely in both. We also show that the gradings arising from E many variables in certain degrees. Finally, we study gradings arising from triangulations of marked bordered 2dimensional surfaces (see [10]). We adapt a definition from [24] to define the space of valuation functions on such a surface and prove combinatorially that this space is isomorphic to the space of gradings on the associated cluster algebra. We illustrate this theory by applying it to a family of examples, namely, the annulus with n + m marked points. We show that the standard grading is of mixed type, i with finitely many variables in some degrees and infinitely many in the others. We also give an alternative grading in which all degrees have infinitely many cluster variables. ii Acknowledgements Firstly, I would like to thank my supervisor, Jan Grabowski, for his generous support and guidance throughout the course of my studies. I am extremely grateful for all the time he gave up on the many useful discussions we have had regarding my research, as well as for his knack for finding pertinent results in the literature that have helped me make progress. I thank him also for his constant willingness to help provide interesting research topics, which has made my PhD experience all the more enjoyable. I also thank my examiners, Anna Felikson and Mark MacDonald, for making many useful suggestions that have improved my thesis. There are many people I am grateful to have met during my time at Lancaster. I thank the other PhD students I have met, many of whom I have become good friends with, for being such a down-to-earth group who have made the social life here a great experience. I am also grateful for the non-mathematical friends that I have made here (and for their reminders that it is inappropriate for a group of PhD students to repeatedly make lame mathematical jokes in their presence). Additionally, I thank the staff in the Maths and Stats department, who help to make it an exceptionally friendly and positive place. I owe an enormous debt of gratitude to my parents, Moshe and Lesley, who have always believed in me and supported me in everything I have done. I also thank the rest of my family, including my sister Maddy, for all their love and support. Last but not least, I owe a special thanks to Faye for her love, and all the encouragement she has given me (especially towards the end of my studies). I thank her also for providing an open problem far deeper than any I could encounter during my PhD: how to consistently make a cup of tea that isn’t “vile”. I am grateful to her for all the chocolate we shared, the places we visited together and the wonderful times we have had—and for always putting up with my rambling during all of the above. iii Declaration This thesis is my own work, and has not been submitted in substantially the same form for the award of a higher degree elsewhere. iv Contents 1 Introduction 1.1 1 Thesis overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Notation and preliminaries 5 9 2.1 Definition of a cluster algebra . . . . . . . . . . . . . . . . . . . . . 2.2 Graded cluster algebras . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.3 Quivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.4 Denominator vectors . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3 Gradings on finite type cluster algebras 9 25 3.1 Review of background . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.2 Gradings in type Bn . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.3 Gradings in type Cn . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4 Gradings in the rank 3 case 29 4.1 Structure of the problem . . . . . . . . . . . . . . . . . . . . . . . . 29 4.2 Finitely many degrees: the mixed case . . . . . . . . . . . . . . . . 34 4.3 Mutation-cyclic and mutation-acyclic matrices . . . . . . . . . . . . 38 4.4 Cluster algebras generated by mutation-infinite acyclic matrices . . 45 4.5 The singular cyclic case . . . . . . . . . . . . . . . . . . . . . . . . . 63 5 Degree subquivers with growth 66 5.1 Subquivers with growing arrows . . . . . . . . . . . . . . . . . . . . 66 5.2 Growing degrees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 5.3 New degree quivers from old . . . . . . . . . . . . . . . . . . . . . . 73 6 Gradings on cluster algebra structure for coordinate algebras of matrices and Grassmannians 78 6.1 Graded cluster algebra structure for matrices . . . . . . . . . . . . . 78 6.2 Infinitely many degrees . . . . . . . . . . . . . . . . . . . . . . . . . 79 v 6.3 Occurring degrees . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 6.4 Corollaries for Grassmannians . . . . . . . . . . . . . . . . . . . . . 84 7 Gradings for finite mutation type quivers not arising from surface triangulations 87 7.1 Initial information about the finite list of quivers . . . . . . . . . . . 87 7.2 Grading for X7 . . . . . . . . . . e6 , E e7 and E e8 . . . Gradings for E e6 . . . . . . 7.3.1 Grading for E e7 . . . . . . 7.3.2 Grading for E 7.3 7.3.3 . . . . . . . . . . . . . . . . . . . 90 . . . . . . . . . . . . . . . . . . . 92 . . . . . . . . . . . . . . . . . . . 93 . . . . . . . . . . . . . . . . . . . 95 e8 . . . . . . . . . . . . . . . . . . . . . . . . . 98 Grading for E 8 Gradings for quivers arising from surface triangulations 101 8.1 Graded cluster algebras associated to surfaces . . . . . . . . . . . . 101 8.2 Annulus with n + m marked points, m odd . . . . . . . . . . . . . . 116 8.3 Annulus with n + m marked points, m even . . . . . . . . . . . . . 119 A Appendix 124 vi Chapter 1 Introduction Cluster algebras are commutative, unital subalgebras of F := Q(X1 , . . . , Xn ) generated by a certain iterative process which endows them with a very particular combinatorial structure. They were introduced by Fomin and Zelevinsky in the series of papers [3, 11, 12, 13] (the third with co-author Berenstein) in an attempt to capture certain combinatorial patterns that had been observed in a number of algebras associated to some particularly nice classes of geometric objects. The authors of these founding papers realised that, though the combinatorial patterns appear complex, they arise from relatively simple rules, iterated over and over again. The original goal of cluster algebras was to provide an algebraic framework for the study of dual canonical bases, and the related notion of total positivity, in semisimple Lie groups and their quantum analogues. Since their introduction, however, they (and their quantum analogues) have appeared in many areas of mathematics, such as algebraic and symplectic geometry, noncommutative algebra, mathematical physics and others. The iterative process that produces the generators of a cluster algebra starts with only a small finite subset {x1 , . . . , xn } ⊂ F of all of the generators we will eventually obtain. These generators are known as cluster variables and the finite subset we start with is called the initial cluster. From this initial cluster, more clusters are produced, each replacing one old variable with a new one, in a process called mutation. How the mutation of the initial cluster is carried out is controlled by an n × n skew-symmetrisable matrix called the initial exchange matrix, whose entries in fact determine the entire cluster algebra. When the initial exchange matrix is used to mutate the initial cluster, it too mutates, so that we obtain a new exchange matrix along with a new cluster (together called a seed ) which in turn can be mutated again. This process of seed mutation is iterated repeatedly, and the union of all clusters thus obtained is the set of generators for the algebra. 1 A consequence of this method of construction is that we often end up with many more generators than we require. Indeed, there are finitely generated algebras (two important examples being coordinate rings of matrices and Grassmannians) that have cluster algebra structures with infinitely many generators. On the other hand, the relations between these generators are always of a very restricted and relatively simple form. While the exchange matrix dictates exactly how mutation is carried out, the new cluster variable zk0 that is obtained from a given cluster {z1 , . . . , zn } via a single mutation in direction k always satisfies an exchange relation of the form zk zk0 = M1 + M2 , where M1 and M2 are monomials in the variables {z1 , . . . , zn } − {zk } with no common divisors. By definition, any two cluster variables (from any two clusters) can be obtained from each other via some sequence of mutations. Thus, any cluster variable may be expressed as a rational function in the variables of any given cluster. One of the fundamental behaviours that a cluster algebra exhibits is the Laurent phenomenon ([11, Theorem 3.1]), which says that any cluster variable is in fact a Laurent polynomial in the variables of any given cluster. This property is remarkable, as mutating a cluster to obtain a new cluster variable requires dividing by a Laurent polynomial that in general will have many terms in the numerator. The fact that such a cancellation must always occur is therefore highly surprising. Another property, which arises from the form of exchange relations above, is that a cluster variable can always be represented as a subtraction-free rational function in the variables of any given cluster. This reflects the connection between cluster algebras and the theory of total positivity. Cluster algebras are either of finite type or infinite type, corresponding to whether the set of cluster variables is finite or infinite. That is, a cluster algebra is of finite type if the iterative process of mutation exhausts all possible clusters in a finite number of steps, and of infinite type otherwise. Cluster algebras of finite type are well-understood and have been fully classified. This classification is an incarnation of the well-known Cartan-Killing classification of simple Lie algebras: Theorem 1.0.1 ([12, Theorem 1.8]). Let A be a cluster algebra. The following are equivalent. (i) A is of finite type. (ii) For every seed (x, B) in A, the entries of the matrix B = (bij ) satisfy |bij bji | ≤ 3 for all i, j. 2 (iii) B is mutation equivalent to a matrix B 0 whose Cartan counterpart is a Cartan matrix of finite type. On the other hand, while cluster algebras of infinite type make up the vast majority, much less is understood about them. One of the reasons for this has been the lack of good tools to control the infiniteness present in them. This thesis is concerned with studying one of the first of these tools, namely, gradings on cluster algebras. The introduction of [16] contains a brief historical overview of the use of cluster algebra gradings in the literature. The first notion of a grading for cluster algebras was that of a Zn -grading introduced by Fomin and Zelevinsky ([13, Proposition 6.1]), where n is the rank of the cluster algebra (the number of cluster variables in each cluster). The notion of a graded quantum seed was defined by Berenstein and Zelevinsky [4, Definition 6.5], which gives rise to a module grading but not an algebra grading. Another notion of grading is due to Gekhtman et al. ([15, Section 5.2]) via the language of toric actions. The definition given by Gekhtman et al. is equivalent to the one we will eventually settle on, but more appropriate for the geometric perspective of the setting in which it arises. The definition of grading in the form we are interested in was introduced by Grabowski and Launois in [17], where the authors use it to prove that quantum Grassmannians Kq [Gr(k, n)] admit a quantum cluster algebra structure. This definition, which is of a Z-grading, is generalised to Zk -gradings in [16], which also studies and fully classifies gradings for finite type cluster algebras without coefficients (the classification for types Bn and Cn due to work that appears in Chapter 3 of this thesis). In general, when attempting to endow an algebra with a grading structure, we assign degrees to the generators and check that the relations are homogeneous, and for cluster algebra gradings we essentially do the same. However, instead of assigning degrees to all our generators at once, we initially only assign degrees to the generators in our initial cluster, according to a certain grading condition. The degrees of all the other cluster variables are then determined recursively from those of the initial cluster, and it turns out that the exchange relations mean all cluster variables will be homogeneous. Prior to this thesis, almost nothing was known about the properties of gradings on infinite type cluster algebras, and almost any question one could ask was open. The goal of the thesis is to study several classes of examples of graded cluster algebras (including the matrix and Grassmannian cases mentioned above) and 3 discover what structure the gradings have. In particular, we are interested in describing the cluster variables in terms of their degrees. More precisely, given a Z k -graded cluster algebra, we aim to answer the following questions: • Is the grading balanced, that is, is there a bijection between the variables of degree d and those of degree −d? (We only ask this when applicable; sometimes we end up with N-gradings.) • Do there exist cluster variables of infinitely many different degrees, or only finitely many? • Of the degrees that occur, how are the variables distributed among them; are there 1. finitely many variables of each occurring degree, 2. infinitely many variables of each occurring degree, or, 3. a mixture, with some degrees associated with infinitely many variables and others only finitely many? These questions are posed in a loosely increasing order of difficulty, though the real determinant of difficulty for any such question is the rank of the cluster algebra we are asking it about. For rank two cluster algebras, there are no nontrivial gradings; increasing the rank by just one, we immediately find gradings with complex structures and a rich variety of behaviours. In most cases, we are able to answer the questions above for rank three cluster algebras generated by skew-symmetric matrices. Even in this low-rank setting, though, some questions require significant effort to answer (and, for one particular case, some remain open). As the rank continues to grow, the complexity of cluster algebras and their graded structures increases extremely rapidly in a way that is difficult to control. For higher rank cases, therefore, our ambitions must be much more modest, even when the examples we look at have a great deal of additional structure. An exception to this occurs in cluster algebras associated to triangulated marked surfaces (see [10] for background). Here, the associated structure allows us to describe cluster variables geometrically, and this proves such a powerful tool when applied to gradings that results which would otherwise be extremely difficult to obtain can essentially be read off from the associated geometric combinatorial objects. It was anticipated that heavy use of representation theoretic techniques would be required in order to make progress on the questions above, but it turns out that a surprising amount can be said using direct, combinatorial methods (though some 4 of the combinatorial facts we use do themselves rely on underlying representation theory). In this thesis, we have persisted with this elementary approach and attempted to see how far it can be pushed in obtaining useful results. An additional tool we use at times is that of computer-aided calculation. While only a few results strictly rely on these calculations (all contained in Chapter 7), in practice, several other results and conjectures (mainly in Chapter 6) would not have been possible to obtain otherwise. The code developed while carrying out this research, along with accompanying documentation, is available along with the electronic version of the thesis. 1.1 Thesis overview This thesis is organised as follows. In Chapter 2 we summarise the basic theory of graded cluster algebras and their associated structures, and collect notation and definitions we will need throughout. In particular, we say what it means for two exchange matrices to be equivalent (which we term essentially equivalent), from the perspective of mutation directions. In Chapter 3 we study the gradings associated to finite type cluster algebras generated by matrices whose Cartan counterparts are of types Bn and Cn . We do so using a formula ([16, Corollary 4.2]) that arises from a known bijection ([11, Theorem 1.9]) between the cluster variables in a cluster algebra of finite type and the almost positive roots in the root system of the corresponding type in the Cartan-Killing classification. The results we obtain complete the classification of finite type cluster algebras without coefficients, which is presented in [16]. In Chapter 4 we turn to the first nontrivial infinite type case: gradings on rank 3 skew-symmetric matrices. Our goal is to classify as much of this entire family as we can. We start by noting  0 that, up to mutation and essential equivalence, a −c every matrix is of the form −a 0 b for some a, b, c ∈ N0 . Similarly, we note c −b 0 that up to integer scaling there is only one grading vector for such a matrix, and that the entries of the grading vector are contained in the matrix. We give a conjectured classification of grading behaviours in Table 4.1 and turn to working through the table in the remainder of the chapter, starting by showing that the division between finitely many and infinitely is as conjectured. Next  many degrees  0 2 −1 −2 0 1 1 −1 0 we consider the only mixed type case, , and prove that its grading behaves as such. In the next section we give an algorithm (similar to one in [1]) 5 which determines whether a 3 × 3 skew-symmetric matrix is mutation-cyclic1 or not and gives a minimal representative of the matrix in its mutation class. We prove that, aside from one particular case, mutation-cyclic matrices give rise to gradings with finitely many cluster variables in each degree. This is achieved by showing that the growth of degrees under mutation is too fast to allow for more than finitely many variables per degree. The penultimate section of this chapter considers mutation-acyclic matrices that are mutation-infinite, which require the most work to classify. We prove that the corresponding graded cluster algebras all have infinitely many variables in each occurring degree. A crucial result we use to do this is [6, Corollary 3], which concerns connectedness of subgraphs of an important object associated with a cluster algebra: its exchange graph. Another result which is helpful here is the classification of exchange graphs for 3 × 3 acyclic matrices, whose structures are identified in [28, Theorem 10.3]. Finally, in the last section, we consider theso-called singular cyclic case: the mutation-cyclic matrices  of the form 0 a −2 −a 0 a 2 −a 0 , a ≥ 3, that do not have the same fast growth behaviour as other mutation-cyclic matrices. We show that infinitely many of the occurring degrees contain infinitely many variables, and conjecture that in fact all degrees contain infinitely many variables. We briefly indicate why proving this is difficult and suggest some possible approaches. Chapter 5 collects some results that provide a condition for identifying when a graded cluster algebra has infinitely many degrees in general, some of which we will apply in Chapter 6. These involve inferring information about a degree quiver (a diagrammatic way of representing a skew-symmetric matrix along with a compatible grading vector) from information about its subquivers. As such, they are some of our first results of this kind, and this line of research remains largely undeveloped (although generalising these results is likely an approachable goal). In the final section we discuss this in more detail and introduce a way to sum degree quivers together to give another degree quiver. This gives one potential way of viewing gradings on cluster algebras as being made up of smaller gradings. We define the notion of an irreducible degree quiver and give an example of a restricted setting in which using sums of degree quivers is useful for inferring results from the summands. As mentioned, the coordinate rings O(M (k, l)) and O(Gr(k, k + l)) of matrices 1 A matrix is mutation-cyclic if all the matrices in its mutation class correspond to quivers that are cyclic (i.e. consist of an oriented cycle). In general, a skew-symmetric matrix is mutationacyclic if there is a matrix in its mutation class corresponding to an acyclic quiver (one without any oriented cycles). 6 and Grassmannians, along with their quantum counterparts, are important examples of well-understood algebras that turn out to have cluster algebra structures. In Chapter 6, we consider gradings on these cluster algebras (the specific grading chosen being the one defined in [17]). These are the first cluster algebras we encounter that have frozen vertices (or coefficients), vertices of the exchange quiver (equivalently, variables present in every cluster) which we are never allowed to mutate. These frozen vertices are needed in order to allow the quantum versions of the graded cluster algebras to have nontrivial gradings, as quantum cluster algebras without coefficients do not admit gradings. This is also the first high-rank setting we encounter. Our goals here are to decide whether the cluster algebras, which are N-graded, have variables of infinitely many different degrees, and, if so, whether this includes every positive degree. Both of these properties are suggested by the properties of O(M (k, l)) and O(Gr(k, k + l)) considered as graded algebras in the traditional sense. We show that this is also the case for the cluster algebra gradings, using some results from Chapter 5. Mostly, this reduces to finding appropriate subquivers present in the degree quiver mutation class. While this is simple in principle, the high rank means such subquivers are very sparsely distributed amongst the mutation class, and this is one of the situations in which we have benefited from computer-aided calculation. For n ≥ 3, it is known ([9, Theorem 6.1]) that n × n skew-symmetric matrices with a finite mutation class are either adjacency matrices of triangulations of marked bordered 2-dimensional surfaces, or one of a finite list of eleven exceptional matrices. In Chapter 7 we investigate what can be said about gradings on cluster algebras generated by some of these exceptional matrices. We use computer-aided calculation to find the size of the degree quiver class and the set of occurring degrees corresponding to several of the matrices. For one, X7 , we prove the grading gives rise to infinitely many variables in each degree (which would usually be very difficult for a cluster algebra of such high rank, but is possible here due to the e6 , E e7 and E e8 , we show that large amount of symmetry in the quiver for X7 ). For E certain of the occurring degrees contain infinitely many cluster variables (and we conjecture that the other degrees have only one or a finite number of variables). Having considered the mutation-finite matrices that are not adjacency matrices of triangulated surfaces, we turn our attention in Chapter 8 to the class of matrices that are. The process by which a cluster algebra arises from a bordered marked surface (S, M) is described in [10]. The authors define the arc complex of (S, M) as the simplicial complex whose ground set is the set of all arcs between marked points in M and whose maximal simplices are the ideal triangulations (collections 7 of non-intersecting arcs that fully triangulate the surface). They show that the arc complex of a surface is isomorphic to the cluster complex of the associated cluster algebra, and that the dual graph of the arc complex is isomorphic to the exchange graph. In particular, this means the cluster variables are in bijection with the arcs and seeds are in bijection with the ideal triangulations. In Section 3.5 (see also Section 7.5) of [24], Muller gives a notion of an endpoint grading which assigns degrees to arcs based on values of the marked points at their endpoints. This notion does not match our definition of grading, but we make an adjustment to it to obtain one that is compatible with gradings in our sense. We define the space of valuation functions—assignments of values to marked points according to certain compatibility conditions—for a marked surface and prove (using only the combinatorics of the surface theory) that it is isomorphic to the space of gradings on the associated cluster algebra. This allows us to translate grading questions into questions about degrees of arcs. As we noted above, this lets us capture a great deal of information about the grading structure with much less effort than would be expected. Lastly, we indicate some promising possibilities for further research involving this theory. 8 Chapter 2 Notation and preliminaries In this chapter we summarise basic definitions, results and notation which we will need throughout. We fix n, m ∈ N throughout the chapter. 2.1 Definition of a cluster algebra Definition 2.1.1. Let X be a set of cardinality n and let l : {1, . . . , n} → X be a bijection. We will call the pair (X, l) a labelled set, where l is the labelling of X. For i ∈ {1, . . . , n}, we will call l(i) the element of X labelled i. We will often refer to X by itself as a labelled set. We may write any labelled set (X, l) in the form X = {xl(1) , . . . , xl(n) }. This way we can think of a labelled set as a tuple when needed, and it will usually be convenient to do so as the labelled sets we will be working with will be clusters, where the order of the elements is important for seed mutation. (These terms will be defined below.) Hereafter, if a labelled set X is written down without reference to l, it is to be assumed that it has been written in this form. If it is written as a tuple, this is understood as shorthand for the above. Notation 2.1.2. Let σ ∈ Sn be a permutation of {1, . . . , n} and let (X, l) be a labelled set. We will write σ(X) to mean the labelled set (X, l ◦ σ). A cluster algebra has several associated structures which we now define before giving the definition of a cluster algebra itself. Most of the definitions in the remainder of this section (excluding those associated with mutation paths and essential equivalence) follow [15]. An original source can be found in [3, 11, 12, 13], which are the seminal papers introducing cluster algebras. Definition 2.1.3. The coefficient group P is the free multiplicative abelian group of rank m with generators y1 , . . . , ym . 9 Let K denote the field of fractions of the group ring ZP. The ambient field F is the field of rational functions in the n indeterminates X1 . . . , Xn with coefficients in K, that is, K(X1 , . . . , Xn ). e its principal part, B, is the Definition 2.1.4. Given an (n + m) × n matrix B, e obtained by deleting rows n + 1 to n + m. If B is skewn × n submatrix of B symmetrisable (i.e. can be multiplied by an invertible diagonal matrix to obtain a e also has this property. skew-symmetric matrix) then we say that B Notation 2.1.5. We retain the notation bij (rather than using ebij ) to refer to the e We will also use commas between indices in some situations, as (i, j) entry of B. in bi,j , to aid readability. Definition 2.1.6 (Cluster, extended cluster, seed). The notions of cluster and seed are defined iteratively. Though they require the notion of mutation, we will briefly suspend this definition as doing so allows for a neater presentation. An initial cluster in F is a labelled set x0 of cardinality n that is a transcendence base of F over K. (Recall that this means x0 is an algebraically independent set such that the field extension F/K(x0 ) is algebraic, that is, such that the elements of F are all algebraic over K(x0 ).) Given a fixed initial cluster x0 , a cluster (in the corresponding cluster algebra) is either x0 itself or a labelled set x that satisfies the same requirements as an initial cluster and that can be obtained from x0 by mutation. The elements of a cluster are called cluster variables and the elements of the initial cluster are called the initial cluster variables. Given a cluster x = {x1 , . . . , xn }, define the extended cluster x e to be the labelled set {x1 , . . . , xn , y1 , . . . , ym }, where the yi are the generators of ZP defined above. (We extend the labelling l on x to x e by setting l(n + i) = yi , so we may refer to yi as xl(n+i) .) The variables y1 , . . . , ym are called the coefficient variables. They are described as stable or frozen variables, whereas the cluster variables x1 , . . . , xn are called mutable. e0 ), where xe0 is an extended cluster An initial seed in F is a pair Σ0 = (xe0 , B e0 is an (n + m) × n skew-symmetrisable integer matrix. Given a fixed initial and B seed Σ0 , a seed (in the corresponding cluster algebra) is either Σ0 itself or a pair e that satisfies the same requirements as an initial seed and that can Σ = (e x, B) e the matrix B e is be obtained from Σ0 by seed mutation. Given a seed Σ = (e x, B), called an extended exchange matrix and its principal part B is called an exchange matrix. The matrix in the initial seed is called the initial (extended) exchange matrix. 10 All extended clusters x e in a cluster algebra share the same stable variables and so we will usually replace the extended cluster x e by the cluster x in the associated notation. Similarly, when the context is clear, we may simply refer to an extended cluster as a cluster. We keep in mind when needed (such as when carrying out mutation, as we now define) that the stable variables are present. e be a seed and let l be Definition 2.1.7 (Cluster mutation). Let Σ = (x, B) the labelling of the cluster x = {xl(1) , . . . , xl(n) }. The mutation of x in direction k ∈ {1, . . . , n} is the labelled set  µΣ,k (x) = x\{xl(k) } ∪ {µΣ,k (xl(k) )}, l0 , where µΣ,k (xl(k) ) is defined by the exchange relation Y µΣ,k (xl(k) )xl(k) = b Y i,k + xl(i) −b xl(i)i,k , (2.1.1) 1≤i≤n+m bi,k <0 1≤i≤n+m bi,k >0 with the empty product being taken to be equal to 1, and where  µΣ,k (xl(k) ) if i = k, 0 l (i) = l(i) otherwise. Definition 2.1.8. The indices (n + 1), . . . (n + m) in Equation 2.1.1 correspond to the stable variables of x e. The corresponding parts of the monomials formed from these are called coefficients. More precisely, define p+ k = Y b 1≤i≤m b(n+i),k >0 b Y (n+i),k xl(n+i) = yi (n+i),k (2.1.2) 1≤i≤m b(n+i),k >0 and p− k = Y −b (n+i),k xl(n+i) = 1≤i≤m b(n+i),k <0 Y −b(n+i),k yi (2.1.3) 1≤i≤m bn+i,k <0 and call these respectively the positive and negative coefficient associated to the exchange relation (2.1.1). Definition 2.1.9 (Matrix mutation). Given an (n + m) × m skew-symmetrisable e we define the mutation of B e in direction k ∈ {1, . . . , n} to be integer matrix B, f0 = µk (B) e given by the (n + m) × m matrix B b0ij =  −bij if i = k or j = k, b + [b ] b + b [−b ] ij ik + kj ik kj + otherwise, 11 (2.1.4) where we define [−]+ by  x if x ≥ 0, [x]+ = 0 otherwise. (2.1.5) It is fundamental to the theory of cluster algebras that µk (B) is again skewsymmetrisable and that µk (µk (B)) = B. This is straightforward to show. It is also easy to see that µk (−B) = −µk (B). e the mutation of Σ Definition 2.1.10 (Seed mutation). Given a seed Σ = (x, B), e in direction k ∈ {1, . . . , n} is the seed Σ0 = µk (Σ) = (µΣ,k (x), µk (B)). It is straightforward to show that µk (µk (Σ)) = Σ. We will often wish to make several mutations in a row, so we make the following definitions. Definition 2.1.11. A mutation path is a list [p] = [pt , . . . , p1 ] with each pi ∈ {1, . . . , n}, written from right to left. Its length, l([p]), is t. A subpath of [p] is a mutation path [p0 ] of the form [pj , . . . , pi ] for some t ≥ j ≥ i ≥ 1, and a rooted subpath of [p] is a subpath of [p] of the form [pj , . . . , p1 ]. The reverse path of [p] is the path [p−1 ] = [p1 , . . . , pt ]. The empty path is the path [ ] consisting of no mutation directions. Remark 2.1.12. Our notation for mutation paths is not the standard notation found in the literature, which uses µkn ◦ · · · ◦ µk1 for [kn , . . . , k1 ]. We will need to write down mutation paths frequently and some will be quite long. We use our notation to reduce clutter and improve readability. Notation 2.1.13. The concatenation of two paths [p], [q] will be denoted by [p, q]. We will use the notation (pt , . . . , p1 )r to mean that the list pt , . . . , p1 is to be repeated r times. We use (pt , . . . , p1 )r to denote the first r terms of the infinitely repeated list (pt , . . . , p1 )∞ . For example, the path [(1, 2, 3)2 , (9, 8, 7)4 ] is equal to [1, 2, 3, 1, 2, 3, 7, 9, 8, 7]. e be an (n + m) × n matrix, [p] = [pt , . . . , p1 ] a mutation Notation 2.1.14. Let B e[p] the matrix obtained by path and x = {x1 , . . . , xn+m } a cluster. We denote by B e (That is, we first mutate B e in direction p1 , then the resulting applying [p] to B. matrix in direction p2 , etc.) We denote by varBe [p](x) the newest cluster variable e If B e is clear from the context, we obtained after applying [p] to the seed (x, B). may omit it. Similarly, we denote, the seed and cluster obtained after applying [p] by sdBe [p](x) and clBe [p](x), respectively, though if x is the initial cluster we will e for sd e [p](x). often omit it from the notation. Alternatively we may use [p](x, B) B 12 Definition 2.1.15. Two clusters, matrices or seeds are mutation equivalent if there exists a mutation path [p] under which the latter respective object is obtained from the former. The mutation class of a cluster, matrix or seed is the set consisting of all clusters, matrices or seeds (respectively) that are mutation equivalent to the original object. A matrix is mutation-infinite if its mutation class is infinite and mutation-finite otherwise. We are now ready to give the definition of a cluster algebra. Definition 2.1.16 (Cluster algebra). Let xe0 = {x1 , . . . , xn , y1 , . . . , ym } be an exe0 be an (n + m) × n extended exchange matrix and let Σ0 = tended cluster, B  e0 . Let A be a unital subring of ZP which contains all the coefficients p± for xe0 , B k all 1 ≤ k ≤ n for every seed that is mutation equivalent to Σ0 . The cluster algebra A(Σ0 ) over A is the A-subalgebra of F generated by all cluster variables (the ones that occur as an entry in the cluster of some seed that is mutation equivalent to Σ0 ). The ring A is called the ground ring of A and the number n of mutable variables is the rank of A. A cluster algebra is said to be of finite type its set of cluster variables is finite and of infinite type otherwise. For cluster algebras of geometric type we take A to be Z[Xn+1 , . . . , Xn+m ]. As we will see in Proposition 2.1.19 below, this choice of A does indeed contain all the required coefficients to be a valid one. Remark 2.1.17. An alternative way of defining the cluster algebra A above is as the A-subalgebra of F generated by the set {varBe0 [p] | [p] is a mutation path}. A priori, a cluster variable is just a rational function in the ambient field F. However, it turns out that cluster variables possess the following remarkable property. Theorem 2.1.18 ([11, Theorem 3.1]). Any cluster variable is a Laurent polynomial in the variables from the initial (or any other) cluster with coefficients in ZP. This is known as the Laurent phenomenon. In the case of cluster algebras of geometric type, we have an even stronger result: Proposition 2.1.19 ([15, Proposition 3.20]). In a cluster algebra of geometric type, any cluster variable is a Laurent polynomial in the initial (or any other) cluster, whose coefficients are polynomials in the stable variables. 13 Remark 2.1.20. Let [p] = [p2 , p1 ] be a mutation path and let x = clAe[p1 ] and e = A e[p ] . Then var e[p] = var e [p2 ](x). We can think of var e [p2 ] as a rational B 1 B B A function f in n variables with coefficients in ZP. Then varAe[p] = f (x). (Here we think of x as a tuple, so that f (x) makes sense.) A cluster algebra often contains multiple seeds whose clusters are equal up to relabelling the respective sets and which produce the same set of exchange relations when mutated in all possible directions. Such seeds are the same in the sense that respective mutation is the same up to permutation of direction. e and B e be (n + m) × n skew-symmetrisable integer Definition 2.1.21. Let A e and B e are essentially equivalent (by σ) if there exists a matrices. We will say A permutation σ ∈ Sn such that   varAe[k] {X1 , . . . , Xn } = varBe [σ −1 (k)] σ{X1 , . . . , Xn } (2.1.6) e ≡ σ(A). e Similarly, we say that two seeds for all k ∈ {1, . . . , n}. We then write B   e and y, B e are essentially equivalent (by σ) if there exists σ ∈ Sn such that x, A   e ≡ σ(A) e and y = σ(x). We may then write y, B e ≡ σ x, A e . B   0 a −c  Example 2.1.22. Let a, b, c ∈ N. The seed {x1 , x2 , x3 }, A = −a 0 b is c −b 0   0 c −a  essentially equivalent to {x1 , x3 , x2 }, B = −c 0 b by the permutation σ = a −b 0 (2 3). Explicitly we have xa2 + xc3 = varB [1]({x1 , x3 , x2 }) = varB [σ −1 (1)](σ{x1 , x2 , x3 }), x1 xa + xb3 = varB [3]({x1 , x3 , x2 }) = varB [σ −1 (2)](σ{x1 , x2 , x3 }), varA [2]({x1 , x2 , x3 }) = 1 x2 xc1 + xb2 varA [3]({x1 , x2 , x3 }) = = varB [2]({x1 , x3 , x2 }) = varB [σ −1 (3)](σ{x1 , x2 , x3 }). x3 varA [1]({x1 , x2 , x3 }) = Remark 2.1.23. We have defined essential equivalence in terms of mutation directions. In the literature, such matrices and seeds are known as equivalent, which is defined from a slightly different perspective: saying (2.1.6) holds for all k is the e and B e differ (up to sign) by a simultaneous permutation of rows same as saying A and columns. More precisely, let σ be a permutation of n objects. Define Nσ to be the e whose principal part is n × n and simultaneously function that takes a matrix A permutes its rows and columns by σ. We have e ≡ σ(B) e ⇐⇒ A e = ±Nσ (B). e A (2.1.7) We favour our perspective since it preserves the intuition that mutating   e in one direction is the same as mutating x, A e in another. σ(x), Nσ (A) 14 Let us check that essential equivalence of matrices is transitive; doing so is useful as it lets us write down an explicit permutation involved. e B e and C e be (n + m) × n skew-symmetrisable matrices. Lemma 2.1.24. Let A, e is essentially equivalent to B e with B e ≡ σ(A) e and B e is essentially Suppose A e with C e ≡ ρ(B), e for some permutations ρ and σ. Then A e is equivalent to C e and we have C e ≡ (σρ)(A). e essentially equivalent to C e ≡ ρ(B) e and B e ≡ σ(A), e we have Proof. Since C =⇒ =⇒ =⇒   varBe [k] {X1 , . . . , Xn } = varCe [ρ−1 (k)] ρ{X1 , . . . , Xn }   varBe [k] σ{X1 , . . . , Xn } = varCe [ρ−1 (k)] σ(ρ{X1 , . . . , Xn })   varBe [σ −1 (k)] σ{X1 , . . . , Xn } = varCe [ρ−1 (σ −1 (k))] σ(ρ{X1 , . . . , Xn })   varAe[k] {X1 , . . . , Xn } = varCe [(σρ)−1 (k))] (σρ){X1 , . . . , Xn } ∀k ∀k ∀k ∀k e is essentially equivalent to C e with C e ≡ (σρ)(A). e which shows that A e ≡ σ(A) e and C e ≡ ρ(B), e Notation 2.1.25. In the situation above, where we have B  e ≡ ρ σ(A) e . we may write C  e ≡ ρ σ(A) e then C e = Nρ ◦ Nσ (A). e Note Remark 2.1.26. By Equation 2.1.7, if C that Nρ ◦ Nσ is equal to Nσ◦ρ (not Nρ◦σ ), as required by Lemma 2.1.24.   e and y, B e are essentially equivalent by Lemma 2.1.27. Suppose the seeds x, A σ. Let [p] be a mutation path. We have the following. e[p] is essentially equivalent to B e[σ−1 (p)] with B e[σ−1 (p)] = σ(A e[p] ) (that is, by the (a) A same permutation σ as above).   e[p] and cl e [σ −1 (p)](y), B e[σ−1 (p)] are essentially equiv(b) The seeds clAe[p](x), A B alent, again by σ. Proof. Part (a) is easy to see when [p] has length one. The full result then follows by induction. For (b), when [p] has length one, the result is immediate using part (a). Otherwise, suppose [p] has length r > 1 and assume the result is true for the rooted subpath of length r − 1, that is, the path [pr−1 , . . . , p1 ] =: [p0 ]. We have   clAe[p](x) = clAe[p0 ] [pr ] clAe[p0 ](x) =: clAe[p0 ] [pr ] x0 (2.1.8) and clBe [σ −1 (p)](y) = clBe [σ −1 (p0 )]  [σ −1 (pr )] clBe [σ −1 (p0 )](y) =: clBe [σ −1 (p0 )]  [σ −1 (pr )] y 0 . (2.1.9) 15 Now we wish to show that   e[p] and clAe[p0 ] [pr ] x0 , A clBe [σ −1 (p0 )]   e[σ−1 (p)] [pr ] y 0 , B are essentially equivalent by σ. But this is true, since (b) is established for paths   e[p0 ] and y 0 , B e[σ−1 (p0 )] are of length one, since we have by assumption that x0 , A e[p0 ] )[pr ] = A e[p] and (B e[σ−1 (p0 )] )[σ−1 (p )] = essentially equivalent by σ, and since (A r e B[σ−1 (p)] . Thus (b) follows by induction. Lemma (2.1.27) immediately implies the following formula, which is useful for relating mutation paths involving essentially equivalent seeds. e and B e ≡ σ(A) e are essentially equivalent matrices. Corollary 2.1.28. Suppose A Then −1 varAe[p](x) = varσ(A) e [σ (p)](σ(x)). (2.1.10) e we have that B e and −B e are Notice that for any skew-symmetrisable matrix B, trivially essentially equivalent (i.e. essentially equivalent by the identity permutation). Thus, by (2.1.6), reversing the sign of a matrix does nothing as far variables are concerned. Therefore we may at times be liberal with the signs of exchange matrices in such a context. e and B e are essentally equivalent matrices then the initial Proposition 2.1.29. If A e and (x, B) e generate isomorphic algebras. seeds (x, A) e Then Proof. Write x = (x1 , . . . , xn ) as usual. Let z be a cluster variable in A(x, A). be the rational function corresponding z = varAe[p](x) for some path [p]. Let fA,[p] e e Let σ ∈ Sn be a permutation such that B ≡ σ(A). e to this path with respect to A. By Corollary 2.1.28, fA,[p] is then the rational function fB,[σ e e −1 (p)] ◦σ, where fB,[σ e −1 (p)] −1 e is the function corresponding to the path [σ (p)] in A(x, B). Therefore any e corresponds to the cluster variable y in A(x, B) e that cluster variable z in A(x, A) is obtained by replacing every occurrence of initial variable xj in z by xσ(j) . Since the cluster variables generate the algebras, it follows that they are isomorphic. e be an (n+m)×n skew-symmetrisable matrix. Mutation Definition 2.1.30. Let B e directions i and j are   called essentially equivalent with respect to B if mutation e in direction i yields the same cluster variable as that for of {x1 , . . . , xn }, B mutation in direction j, but with xj in the latter swapped with xi .  0 a −c  Example 2.1.31. Let B = −a 0 c . Then directions 1 and 2 are essentially c −c 0 equivalent with respect to B since mutation in directions 1 and 2 produces the elements (xa2 + xc3 )/x1 and (xa1 + xc3 )/x2 , respectively. 16 Lemma 2.1.32. Let σ ∈ Sn be a permutation which sends each mutation direction e Then i to an essentially equivalent direction j with respect to the matrix B. var[p]Be (σ(x)) = var[σ(p)]Be (x). (2.1.11) Proof. This is immediate from the definition. Example 2.1.33. With B as in Example 2.1.31, we have varB [1](x2 , x1 , x3 ) = (xa1 + xc3 )/x2 = varB [2](x1 , x2 , x3 ). Often we will want to repeatedly apply a mutation path that leaves the mutated degree seed essentially equivalent to the initial one, but not trivially so. In this case we will need to permute the path along the way to ensure we are mutating the new seed in an analogous way. The following gives a notation for this. Notation 2.1.34. Let [p] be a mutation path and σ a permutation. We define [k ∗σ p] := [σ −(k−1) (p), . . . , σ −1 (p), p]. Finally, there are three further important structures associated to a cluster algebra. Definition 2.1.35. The exchange tree of a cluster algebra A is the n-regular tree Tn with each vertex ti associated to a seed Σ(ti ) and with two vertices ti and tj connected by an edge labeled k if and only if Σ(ti ) = µk (Σ(tj )). We usually denote the vertex associated to the initial seed by t0 . Definition 2.1.36. The exchange graph of A is the exchange tree modulo essential equivalence of seeds. As it no longer makes sense to label edges by mutation direction, we may instead choose to label them by the relevant exchange relation, that is, the right hand side of Equation 2.1.1. Definition 2.1.37. The cluster complex of A, denoted ∆(A), is the simplicial complex whose ground set is the set of all cluster variables and whose maximal simplices are are the clusters. 2.2 Graded cluster algebras There are several notions of gradings for cluster algebras in the literature. Our definition of gradings will follow [16]. 17 Definition 2.2.1. Let A be a cluster algebra of rank n. A (multi-)graded seed   e g where x e is a cluster in A and g is a r × (n + m) integer e, B is a triple x e, B, matrix satisfying e = 0. gB (2.2.1)  e . The ith column of g is the degree Such a matrix g is called a grading for x e, B of xi and the degree of a homogeneous rational function in the variables of a given graded cluster (possibly with coefficients in frozen variables) is defined in the obvious way. The condition (2.2.1) ensures that exchange relations, and therefore all cluster variables, will be homogeneous. Then, given a cluster variable z, we will denote its degree with respect to g by degg (z). Mutation of a graded seed in direction k is defined in the same way as in Definition 2.1.9, with the addition that the k th entry of g is replaced by the degree of the new cluster variable. Alternatively, we may directly mutate g: we replace the variables in Equation 2.1.1 by their degrees, and replace multiplication, division and taking powers of variables by addition, subtraction and multiplication, respectively, of their degrees. The following objects are useful when the only information we need about some  e such cluster variables pertains to their degrees. A degree seed in A is a pair g, B  e g is a graded seed occurring in A. A graded cluster or degree cluster that x e, B, (a pair of the form (e x, g) or the tuple g, respectively) is defined in a similar way. Finally, a graded cluster algebra will mean a cluster algebra generated from an initial graded seed. Remark/Definition 2.2.2. While we stipulate that the entries of g are integers, there is no reason in principle why they could not be elements of an arbitrary abelian group, provided g satisfies (2.2.1) (see [18] for more discussion along these e which we define as the set of lines). We may wish to refer to the grading space of B, e T ). When we do matrices g over some field satisfying (2.2.1) (i.e. the nullspace of B so, we will think of this vector space as being over Q. Often we will be interested in working with grading matrices g whose rows form a basis of the grading space (or possibly a subspace of the gradings space). We will call these rows grading vectors. In practice, we will scale these basis vectors so that they consist of integer entries (which is always possible if the entries are in Q). Notation 2.2.3. We will sometimes use the same notation to mean both the matrix g and the tuple whose entries are the columns of the matrix (though it should be clear from the context which version we are referring to at any given time). More precisely, let g1 , . . . , gn+m be the columns of g. We will write g = 18 (g1 , . . . , gn+m ) and refer to g1 , . . . , gn+m as the entries of g. We do this so g can be thought of as a tuple containing the degrees of the variables in the corresponding cluster. To fit better with this overloaded notation, we have transposed the matrix g from that in [16] so that, if r = 1, say, g is a tuple of integer degrees. We extend Notation 2.1.14 to the graded setting in the natural way. Aside from this, if we wish to denote the degree of a variable, or just the degree seed or cluster, we add the prefix “ deg .” to the respective notation, and we may simply e g) will mean the graded seed write deg e [p] to mean deg . var e [p]. Again, [p](x, B, B B e g). obtained on applying the mutation path [p] to (x, B, e g) be a graded seed. Proposition 2.2.4 ([16, Proposition 3.2]). Let Σ = (e x, B, The graded cluster algebra A(Σ) is a Zr -graded algebra, and every cluster variable of A(Σ) is homogeneous with respect to this grading. Definition 2.2.5. The grading matrix g is called a standard grading if its rows form a basis of the grading space. A seed or degree seed containing g is called a standard graded seed or degree seed. As mentioned in Remark/Definition 2.2.2, we will often choose our grading matrix g such that the rows form a basis of the grading space. We do so since understanding the behaviour of such a grading essentially lets us understand all gradings on the given cluster algebra. The next two results show that this is the case. Lemma 2.2.6 ([16, Lemma 3.7]). Any mutation of a standard graded seed or standard degree seed is again standard.  e g be a standard graded seed and Lemma 2.2.7 ([16, Lemma 3.8]). Let Σ = x e, B,  e . There exists an integer matrix M = M (g, h) such let h be any grading for x e, B  e h we have that for any cluster variable z in A x e, B, degh (z) = M degg (z). (2.2.2)   e g and e e h are essentially equivaDefinition 2.2.8. Two graded seeds x e, A, y , B, e and (h, B) e are essentially lent if their underlying seeds are. Two degree seeds (g, A) e ≡ σ(A) e and (2.1.6) holds for all k but for degrees rather than equivalent by σ if B variables. Of course, essential equivalence of degree seeds is much weaker than essential equivalence of graded seeds: two graded seeds that are not essentially equivalent may have underlying degree seeds that are. Indeed, we are often interested in 19 finding infinite sequences of non-equivalent graded seeds whose underlying degree seeds are essentially equivalent. This allows us to prove the existence of infinitely many different cluster variables of a particular degree or set of degrees. Finally, note the simple relationship between the mutation of a degree cluster and its negative. e be a degree seed and [p] a mutation path. We have Lemma 2.2.9. Let (g, B) deg . clBe [p](−g) = − deg . clBe [p](g) Proof. For l([p]) = 1, this is immediate from Equation 2.1.1. The full result then follows inductively. 2.3 Quivers e is an extended exchange matrix whose principal part is skew-symmetric, we If B e with a quiver, a directed weighted graph with no loops or 2-cycles. can represent B Working with a quiver is often easier than working with the corresponding matrix, and it lets us represent a whole seed in one diagram by identifying the cluster variables (or their degrees) with the vertices of the quiver. For background on quivers, see, for example, [26]. Unless otherwise stated, we will assume any quiver we refer to is connected. Definition 2.3.1. Let B be an n × n skew-symmetric matrix. The quiver Q(B) associated to B has n vertices (labelled 1, . . . , n) and an arrow of weight bij from vertex i to vertex j (a negative entry counts as an arrow in the opposite direction and a weight 0 arrow counts as no arrow). e to an extended exchange matrix B. e This We can also assign a quiver Q(B) quiver has n + m vertices (the last m of which correspond to frozen variables) and arrows are assigned in the same way as above. The frozen vertices are denoted by drawing a square around them. A quiver is acyclic if it contains no oriented cycles. A rank 3 quiver is cyclic if it is an oriented cycle. A subquiver of Q is a quiver R whose vertices are a subset of those in Q, such that if v1 and v2 are vertices in R then the edge from v1 to v2 in R is of the same weight and direction as it is in Q. What we define as a subquiver is often called a full subquiver in the literature. 20 Definition 2.3.2 (Quiver mutation). The mutation of a quiver Q(B) in direction k is the quiver Q0 corresponding to B[k] . Equivalently, we obtain Q0 from Q as follows: (1) Reverse each arrow incident to vertex k. (2) For each directed path of the form bkj add bik bkj to the , weight of the arrow from vertex i to j (which may involve creating an arrow i bik k j or reversing or deleting a present arrow). In general, we will use a quiver and its corresponding matrix interchangeably, but we make a couple of specific definitions for working with the corresponding objects. Definition 2.3.3. A (graded) quiver seed will mean a (graded) seed in which we identify vertex i of the quiver associated to the extended exchange matrix with the cluster variable in position i of the cluster. We represent this in a diagram by placing the cluster variables where the corresponding vertices would be. When we wish to emphasise the vertex numbering, we will place each cluster variable inside parentheses with the corresponding vertex number as a subscript. In terms of quivers, an equivalent condition to (2.2.1) for the matrix g is that each non-frozen vertex k is balanced. By this we mean that X bik deg (i) = X bki deg (i), (2.3.1) bki bik k→i i→k where the left sum runs over all weighted arrows into vertex k and the right sum does the same for arrows out. We will sometimes refer to the left (right) hand side of (2.3.1) as the weight into (out of ) k, which we will denote w→ (k) (w← (k)). A degree quiver will mean a degree seed in which we identify vertex i of the associated quiver with the ith entry of g. In the corresponding diagram, the ith vertex will be replaced by (d)i , where (d) = gi (though sometimes we may omit the subscript if it is not needed). A degree quiver is positive if the degree corresponding to each vertex is non-negative. We extend the definition of essentially equivalent to the above objects in the obvious way: two (graded) quiver seeds are essentially equivalent if their underlying (graded) seeds are, and two degree quivers are essentially equivalent if their underlying degree seeds are. Alternatively, two quivers are essentially equivalent if they are the same up to relabelling vertices and taking the opposite quiver (i.e. reversing all arrows), and similarly for (graded) quiver seeds and degree quivers. 21 Example 2.3.4. Let B =  0 5 −3 −5 0 4 3 −4 0   and let Σ = (x1 , x2 , x3 ), B, (4, 3, 5) . Then Σ is a graded seed. (Strictly, in accordance with Notation 2.2.3, the degree seed in Σ is the tuple ((4), (3), (5)) of 1 × 1 matrices or the corresponding 1 × 3 matrix 5 (4 3 5)). The quiver seed corresponding to Σ is (x2 )2 (x1 )1 (3)2 5 seed is Q1 = (4)1 and the degree (x3 )3 . For vertex 1, we have (5)3 3 X 4 3 4 bi1 deg (i) = 3.5 = 5.3 = bi1 X b1i deg (i), b1i i→1 1→i which shows that this vertex is balanced, as are the other two. The degree seed Q2 = 3 (4)1 (5)2 5 4 is essentially equivalent to Q1 : we have Q2 ≡ σ(Q1 ), (3)3 where σ = (2 3). 2.4 Denominator vectors The denominator vector of a cluster variable is a well-known invariant which we will make frequent use of. Denominator vectors were introduced by Fomin and Zelevinsky and we take the definition from [13]. Definition 2.4.1. Let x = (x1 , . . . , xn ) be a cluster in a cluster algebra A. By Theorem 2.1.18 we can express any given cluster variable z uniquely as z= N (x1 , . . . , xn ) , xd11 , . . . , xdnn (2.4.1) where N (x1 , . . . , xn ) is a polynomial with coefficients in ZP that is not divisible by any xi . The vector   d1 . . dx (z) =  . dn is called the denominator vector of z with respect to x. Its ith entry will be referred to as d(z)|i or d(z)i . If the cluster with respect to which we are writing our denominator vector is clear, we will omit the subscript x and write d(z) (if not specified, we assume x is the initial cluster from which we are generating our cluster algebra). 22 When working with a denominator vector we may write it as a tuple rather than a column vector. Example 2.4.2. With respect to the cluster x = (x1 , . . . , xn ), the variable z = c xa 2 +x3 x1 has denominator vector dx (z) = (1, 0, 0). Definition 2.4.3. Let x = (x1 , . . . , xn ) be a cluster of rank n. Then d. cl(x) will denote the corresponding denominator cluster, that is, the n-tuple whose ith entry is d(xi ) (with respect to some initial cluster). We will refer to the ith entry of d. cl(x) by d. cl(x)i or d. cl(x)|i . We will also use dB [p] and d. clB [p] for the denominator vector or cluster of the variable or cluster, respectively, obtained after mutation path [p]. A denominator quiver will mean a quiver corresponding to a given seed (x, B) but where we identify the ith vertex with d. cl(x)|i . In the corresponding diagram, the ith vertex will be replaced by (d. cl(x)|i )i (sometimes omitting the subscript if it is clear from context). Definition 2.4.4. We define a partial order on the set of denominator vectors in Zn by setting d(w) ≥ d(z) if each entry of d(w) is greater than or equal to the corresponding entry of d(z), and we also say d(w) > d(z) if d(w) ≥ d(z) and at least one entry of d(w) is strictly greater than the corresponding entry of d(z). Sometimes we will be interested in finding mutation paths which produce growing denominator vectors. When proving that denominator vectors are growing, it becomes cumbersome to work with the entire cluster of denominator vectors, so we single out only one entry of each denominator vector. This simplifies calculations, and showing that this entry grows is enough to distinguish the variables. This motivates the following definition. Definition 2.4.5. The j th denominator slice of d. cl(x) is the vector whose ith entry is the j th entry of d. cl(x)i . We will denote this using angle brackets as d. cl (x) |j = hd. cl(x)1j , . . . , d. cl(x)nj i = hd. cl(x)|1j , . . . , d. cl(x)|nj i. Given a seed (x, B), the j th denominator quiver will mean the quiver corresponding to B but where we identify the ith vertex with d. cl(x)|ij . In the corresponding diagram, the ith vertex will be replaced by hd. cl(x)|ij ii (again, sometimes omitting the subscript i). Example 2.4.6. Consider the seed   x2 + x x2 x + x4 + 2x2 x + x2   0 2 −1  3 2 1 3 2 2 3 3 Σ= z= , , x3 , B = −2 0 1 . 1 −1 0 x1 x21 x2 23 The denominator cluster with respect to x = (x1 , x2 , x3 ) is d. clx (z) = ((1, 0, 0), (2, 1, 0), (0, 0, −1)) . 2 The denominator quiver is (2, 1, 0)2 (1, 0, 0)1 1 1 . The first denominator slice of (0, 0, −1)3 h2i2 2 z is h1, 2, 0i and the first denominator quiver is h1i1 1 1 . h0i3 The next formula lets us mutate denominator vectors directly. Lemma 2.4.7 ([13, Equation 7.7]). The new cluster variable x0k obtained after mutation of the seed (x = (x1 , . . . , xn ), B) in direction k satisfies ! X X d(x0k ) = −d(xk ) + max [bik ]+ d(xi ), [−bik ]+ d(xi ) , i where [a]+ :=  a if a ≥ 0, 0 otherwise, i and where max is taken component-wise. 24 (2.4.2) Chapter 3 Gradings on finite type cluster algebras In this chapter we classify gradings on the cluster algebras of type Bn and Cn . This work was completed prior to the publication of [16] and the results are reported in the same paper. The classification for the other finite type cases that admit nontrivial gradings, namely An , Dn and En , can be also found in [16]. 3.1 Review of background Definition 3.1.1 ([12, Section 1.3]). Let B = (bij ) be an n×n skew-symmetrisable matrix. The Cartan counterpart of B, A(B) = (aij ), is defined by setting  2 if i = j, aij = (3.1.1) −|b | otherwise. ij Theorem 3.1.2 ([12, Theorem 1.8]). A skew-symmetrisable matrix B gives rise to a finite type cluster algebra A(x, B) if and only if B is mutation equivalent to some matrix B 0 whose Cartan counterpart A(B 0 ) is of finite type (i.e. A is irreducible and all its principal minors are strictly positive). Definition 3.1.3. A skew-symmetrisable matrix B is bipartite if bij bik ≥ 0 for all i, j, k. Lemma 3.1.4 ([12, Theorem 1.9]). Let B be a bipartite skew-symmetrisable matrix and A(x, B) a finite type cluster algebra. There is a bijection α 7→ x[α] between the almost positive roots (i.e. the positive roots along with the negation of the simple roots) of the semi-simple Lie algebra corresponding to A(B) and the cluster variables of A. Write α = λ1 α1 + · · · + λn αn as a linear combination of the simple 25 roots α1 , . . . , αn . The cluster variable x[α] is then expressed in terms of the initial cluster x = (x1 , . . . , xn ) as Pα (x) (3.1.2) xα Q where Pα (x) is a polynomial over Z with non-zero constant term and xα := ni=1 xλi i . x[α] = Under this bijection, x[−αi ] = xi . That is, the negative simple roots correspond to the initial cluster variables. Note for types Bn and Cn there are n2 + n almost positive roots. The following allows us to calculate the degree of a cluster variable in terms of its corresponding root.  Lemma 3.1.5 ([16, Corollary 4.2]). Let A x, B, g = (g1 , . . . , gn ) be a graded cluster algebra of finite type where B is bipartite. Let α be an almost positive root and write α = λ1 α1 + · · · + λn αn as a linear combination of the simple roots. Then n X deg(x[α]) = − λi gi . (3.1.3) i=1 It turns out that any gradings on cluster algebras of type Bn or Cn , or indeed any finite type cluster algebra, must be balanced, by which we mean that there is a bijection between the cluster variables of degree d and degree −d. For an explanation of this fact, see [16, Corollary 5.7] and the remark following. We will verify this for types Bn and Cn below. 3.2 Gradings in type Bn The appropriate bipartite matrix for type Bn is the n × n matrix is given by  0 1  −1 0 −1   1 0 1    −1 0 B=        0  1    −1 0 −1     1 0 1      or B =  −1 0     ..   . 1     −1 0 −1  2 0          .. . −1    1 0 1 −2 0 corresponding to whether n is odd or even, respectively. One checks that if n is even, B has full rank and so there is no non-trivial grading. If n is odd, B has rank n − 1. The grading space is then spanned by a one dimensional vector. There are two cases for the grading vector g:  (2, 0, −2, 0, . . . , 0, −2, 0, 1) g= (2, 0, −2, 0, . . . , 0, 2, 0, −1) 26 if n = 4k + 1, if n = 4k + 3. We will assume from now on that n = 4k + 3, but the final results we obtain are the same in both cases. We take the following description of the root system for Bn (as found in [7]): {±βi ± βj | i, j = 1 . . . n, i 6= j} ∪ {±βi | i = 1 . . . n}. Here βi is the function which selects the (i, i) entry of an n × n diagonal matrix, and we have taken α1 = β1 − β2 , . . . , αn−1 = βn−1 − βn , and αn = βn , where the αi denote the simple roots. From this description, the positive roots are of one of the following forms: βi − βj =αi + · · · + αj−1 (i < j), (3.2.1) βi + βj =αi + · · · + αj−1 + 2(αj + · · · + αn ) (i < j), (3.2.2) (i = 1, . . . , n). (3.2.3) βi =αi + · · · + αn To find the degrees of the remaining variables in A(x, B) we now apply Equation 3.1.3 to the above lists. This, along with the negative simple roots, tells us the degree of the cluster variable corresponding to each almost positive root. Counting the number of variables of each degree, we summarise the results in the Table 3.1 below. Degree Type (3.2.1) Type (3.2.2) Type (3.2.3) negative simples (n+1)2 Total 8 (n−1)(n−3) 8 0 n−3 4 (n+1)(n−1) 4 -1 0 0 n−1 2 1 n+1 2 0 (n+1)2 4 (n+1)(n−1) 4 0 n−1 2 (n+1)(n−1) 2 1 0 0 n+1 2 0 n+1 2 2 (n+1)(n−3) 8 (n+1)(n−1) 8 0 n+1 4 (n+1)(n−1) 4 Total n(n−1) 2 n(n−1) 2 n n n2 + n -2 Table 3.1 Thus, as expected, this grading is balanced. 27 3.3 Gradings in type Cn The appropriate bipartite matrix for type Cn is the n × n matrix is given by  0  1  −1 0 −1   1 0 1   −1 0 B=        0  1    −1 0 −1     1 0 1      or B =  −1 0     ..   . 1     −1 0 −2  1 0          .. . −1    1 0 2 −1 0 corresponding to whether n is odd or even, respectively. If n is even, C has full rank and so again there is no non-trivial grading. If n is odd, C has rank n − 1 and the grading space is again spanned by a one dimensional vector. There are two cases for the grading vector g: g=  (1, 0, −1, 0, . . . , 0, −1, 0, 1) if n = 4k + 1, (1, 0, −1, 0, . . . , 0, 1, 0, −1) if n = 4k + 3. In both case, the distribution of degrees we obtain is the same. This time the description of the root system is {±βi ± βj | i, j = 1 . . . n, i 6= j} ∪ {±2βi | i = 1 . . . n}. Here we have taken α1 = β1 − β2 , . . . , αn−1 = βn−1 − βn , and αn = 2βn . We then find that the positive roots are of one of the following forms: 2βi =2(αi + · · · + αn−1 ) + αn (i = 1, . . . , n), (3.3.1) βi − βj =αi + · · · + αj−1 (i < j), (3.3.2) β1 + βj =αi + · · · + αj−1 + 2(αj + · · · + αn−1 ) + αn (i = 1, . . . , n). (3.3.3) Applying Equation 3.1.3 to the above and counting the number of variables of each degree again, we obtain the following distribution: there are • (n+1)2 4 • (n+1)(n−1) 2 variables of degree 1 and and also of degree −1, and variables of degree 0. Again, this grading is balanced as expected. 28 Chapter 4 Gradings in the rank 3 case The goal of this chapter is to classify the graded cluster algebras generated by 3×3 skew-symmetric matrices. This classification is in terms of the cardinality of the set of occurring degrees and how the cluster variables are distributed with respect to these degrees. We do not consider any 2 × 2 matrices, since they can only give rise to trivial gradings. For this reason also, we will assume that any matrix we consider corresponds to a connected quiver; cluster algebras generated by quivers that are not connected (i.e. from direct sums of matrices) are easily understood in terms of the cluster algebras generated by the corresponding connected subquivers. Thus, only matrices corresponding to connected quivers can give rise to nontrivial grading   behaviours. So, for example, we will not consider matrices such as 4.1 0 a 0 −a 0 0 0 0 0 . Structure of the problem A graded cluster algebra can be classified by the following criteria: • The cardinality of the set of degrees that occur as degrees of cluster variables may be finite or infinite. • Of the degrees that occur, there may be (1) infinitely many cluster variables of each degree, (2) finitely many variables in each degree (which in the case of finitely many degrees means the cluster algebra is of finite type), or, (3) a “mixed” case where some degrees have finitely many variables while others have infinitely many. We first note that, for the purposes of classifying the graded cluster algebras above, there is an immediate reduction in the number of cases of generating ma29 trices that need to be considered. By the proof of Proposition 2.1.29, we see that essentially equivalent matrices generate isomorphic graded algebras (we simply relabel the variables in the initial cluster), so we need only consider matrices up to essential equivalence. It is also clear that we need only consider matrices up  to mutation equivalence. To see this, let A1 = A (x1 , x2 , x3 ), A, (g1 , g2 , g3 ) and  A2 = A (x01 , x02 , x03 ), B, (g10 , g20 , g30 ) and suppose B = A[p] for some mutation path [p]. Set (y1 , y2 , y3 ) = clA [p] in A1 . Then, since the initial seed of a cluster algebra  can be chosen arbitrarily, A1 = A (y1 , y2 , y3 ), B, (g10 , g20 , g30 ) (as if we mutate this  cluster along [p−1 ], we get back to (x1 , x2 , x3 ), A, (g1 , g2 , g3 ) ). But this is clearly isomorphic to A2 as a graded algebra. Given the above, it turns out that there is just one class of 3 × 3 matrices that needs to be studied. (Note that this does not mean that we will not need to look in detail at any cluster algebras generated by other classes of matrices in the process, rather that once we have classified those corresponding to the class of matrices above, we are done.) Definition 4.1.1. Let A be a matrix. A column of A will be called sign-coherent if all of its non-zero entries are of the same sign. Otherwise the column is of mixed sign. If A is skew-symmetric, it is called acyclic if its associated quiver is acyclic. If A is also 3 × 3, it is called cyclic if its associated quiver is cyclic. We call A mutation-cyclic if every matrix in its mutation class is cyclic and mutation-acyclic if there is a matrix in its mutation class that is acyclic. Remark 4.1.2. If A is skew-symmetric and 3×3, it is easy to see that A is acyclic if and only if it has a sign-coherent isacyclic then, up to essential  0 −acolumn:  if Q(A) −c 0 −a 0 equivalence, A is of the form a 0 −b or a 0 −b , where a, b, c ≥ 0. On the c b 0 0 b 0 other hand, if A has a sign-coherent column then it must also be of one of these two forms, again up to essential equivalence. Proposition 4.1.3. Every3×3 skew-symmetric matrix is either essentially equiv 0 a −c alent to the matrix A = −a 0 b , for some a, b, c ∈ N0 and a ≥ b ≥ c, or c −b 0 mutation equivalent to a matrix which is essentially equivalent to A. Proof. Let B be any given 3 × 3 skew-symmetric matrix and write B = −d −f d 0 −e f e 0 0  for some d, e, f ∈ Z. It is easy to check directly that B is in one of the following 30 essential equivalence classes: n  0 a −c   0 a −b   0 b −c   0 b −a   0 c −b   0 c −a o −a 0 b , , −a 0 c , −b 0 a , −b 0 c , −c 0 a , −c 0 b a −b 0 b −a 0 a −c 0 c −a 0 b −c 0   o       n  0c −a−b−c0  0 −b 0 −c −a 0 −c −b −c 0 a −b 0 b −a c 0 a a 0 −b , b 0 −a , , , c 0 b , −a 0 −c , −b 0 −c b −a 0 a −b 0 c a 0 a c 0 b 0 b c 0 o           n  0c −a 0 c −a 0 a −c 0 −b −a 0 −b −c 0 −c −b −b c 0 −a , a 0 −c , b 0 a , , b 0 c , −a 0 −b , −c 0 −b a −c 0 c −a 0 a b 0 c b 0 b a 0 c 0     n  0b −b       o 0 −a −c 0 −c −a 0 −a −b −a 0 b −c 0 c −b a 0 b c 0 −b , b 0 −c , , a 0 c , −b 0 −a , −c 0 −a , a c a b 0 0 c −b 0 b −c 0 c a 0 b a 0 for some a ≥ b ≥ c ≥ 0. (Note that these classes can be indexed by which entries appear in columns of mixed sign. Also, strictly, these sets are not the full equivalence classes, only up to sign; however, as noted previously, the sign of an exchange matrix is of no So it is now consider  enough  0 to    0importance.) a −c 0 −a −c −a −b −a 0 b a 0 −b a 0 −c , Y = and , X = just the representatives A = c −b 0 c b 0 b c 0  0 −b −a  Z = b 0 −c , say. Mutating X, Y and Z in direction 2 we obtain X[2] = a c 0       0 a −(ab+c) 0 c −(cb+a) 0 a −(ac+b) −a 0 c −c 0 b −a 0 b , Y[2] = and Z[2] = , and (ab+c) −b (ac+b) −c 0 (cb+a) −b 0 0 each of these matrices is clearly essentially equivalent to a matrix with the same form as A. Definition 4.1.4. As we see from the proof of Proposition 4.1.3, every ×3  0 a3−c skew-symmetric matrix A is essentially equivalent to (at least) one of −a 0 b , c −b 0  0 a −c   0 −a −c   0 −a −c  −a 0 −b , a 0 b or a 0 −b , for some a ≥ b ≥ c ≥ 0. We define the c b 0 c −b 0 c b 0 standard form of A, denoted A◦ , to be the first element in the above list that A is essentially equivalent to. We will say A is in standard form if A = A◦ . Remark 4.1.5. Let a, b, c ∈ Z such that we do not have a = b = c = 0. Up to sign and integer scaling, the degree vector (g1 , g2 , g3 ) is uniquely determined in the graded seed  (x1 , x2 , x3 ),  0 a −c −a 0 b c −b 0   , (g1 , g2 , g3 ) , namely (g1 , g2 , g3 ) = (b, c, a). Thus the degree vector is uniquely determined up to sign (and scaling, though the scale must match that of the initial degree vector) in every graded seed of any cluster algebra corresponding to any 3×3 skew-symmetric matrix. A consequence of this is the following lemma. Lemma 4.1.6. Let [p] = [pn , . . . , p1 ] be a mutation path  0 (without  repetition)  and a −c let z = varA [p] be a cluster variable in A (x1 , x2 , x3 ), −a 0 b , (b, c, a) , where c −b 0 31 a, b, c ∈ Z. Then deg(z) is an entry of A[p] :   (−1)l([p])+1 (A[p] )32 , pn = 1,    deg(z) = (−1)l([p]) (A[p] )31 , pn = 2,    (−1)l([p])+1 (A ) , p = 3. n [p] 21 (4.1.1) Proof. Equation 4.1.1 is easily checked directly if l([p]) = 1. Now suppose it is true for each path of length r. Let [q] be such a path. Assume that r is even (the  0 d −f  proof is similar if it is odd). Write A[q] = −d 0 e for some integers d, e and f . f −e 0 Then by (4.1.1) the corresponding degree vector is (e, f, d). Mutating this matrix and degree vector in directions 1, 2, and 3, we have   0 −d f d 0 −(df −e) A[1,q] = , deg . clA [1, q] = (df − e, f, d), −f (df −e) 0   0 −d (de−f ) d 0 −e A[2,q] = , deg . clA [2, q] = (e, de − f, d), −(de−f ) e 0   0 −(ef −d) f and A[3,q] = (ef −d) 0 −e , deg . clA [3, q] = (e, f, ef − d). −f e 0 Thus (4.1.1) is true for all paths of length r + 1. In particular, Lemma 4.1.6 implies the following. Corollary 4.1.7. A graded cluster algebra generated by a 3 × 3 skew-symmetric matrix A has infinitely many degrees if and only if A is mutation-infinite. Finally, we note a condition that lets us infer that a grading is balanced. Theorem 4.1.8 ([16, Corollary 5.7]). Let Q be a quiver and A(Q) the cluster algebra generated by Q. If A(Q) admits a cluster categorification then every grading for A(Q) is balanced. We will not cover background on cluster categorification (see [5]), but we note the following, which is what is relevant to our situation. Lemma 4.1.9. If Q is a finite connected acyclic quiver then A(Q) admits a cluster categorification. This fact follows from work of Palu in [25]. All of the quivers we deal with will be finite and connected, so whenever we consider a grading arising from an acyclic quiver (or a quiver mutation equivalent to one), we automatically know it is balanced. The main result of this chapter is the following. 32 Theorem 4.1.10. partial classification of graded cluster algebras of the form     0 A a −c A (x1 , x2 , x3 ), −a 0 b , (b, a, c) , with a, b, c ∈ N0 and a ≥ b ≥ c, is given in c −b 0 Table 4.1. As noted earlier, the restrictions a, b, c ∈ N0 and a ≥ b ≥ c above do not exclude any graded cluster algebras generated by 3 × 3 skew-symmetric matrices as far as questions of classification are concerned, by Proposition 4.1.3. For mutation-finite matrices (which give rise to finitely many degrees) Finite type A3 =  Mixed 0 1 0 −1 0 1 0 −1 0   Infinitely many variables per degree 0 2 −1 −2 0 1 1 −1 0   0 2 −2 −2 0 2 2 −2 0  For mutation-infinite matrices (which give rise to infinitely many degrees) Finitely many variables per degree  0 a −c −a 0 b c −b 0  , mutation-cyclic with c > 2 Mixed Infinitely many variables per degree ∅  0 a −c −a 0 b c −b 0  , mutation-acyclic Table 4.1 The entries of this table cover all possible cases except for one:  0 a −2 −a 0 a 2 −a 0  with a ≥ 3, which we will call the singular cyclic case. That all other cases are covered follows we will see in Section 4.3: Lemma 4.3.14 shows that if  from results  c = 2 then 0 a −c −a 0 b c −b 0 is either mutation acyclic or a singular cyclic matrix, and  0 a −c  Lemma 4.3.13 shows that if c = 1 then −a 0 b is mutation-acyclic. We also c −b 0 need [1, Corollary 2.3], which says precisely that the three matrices in the top row are the only 3 × 3 mutation-finite matrices. We conjecture that the singular cyclic case should be placed in the lower right cell of the table: Conjecture 4.1.11. a ≥ 3, that is,in the singular cyclic case, the graded  For 0 a −2 cluster algebra A x, −a 0 a , (a, 2, a) has infinitely many variables in each 2 −a 0 occurring degree. Inthe remainder of this chapter we will prove that 4.1   Table  is correct. Note 0 2 −2 0 1 0 that −1 0 1 has been covered in Chapter 3, and −2 0 2 gives rise to the 0 −1 0 2 −2 0 well-known Markov type cluster algebra in which all (infinitely many) variables have degree 2. We will address what can be said about the singular cyclic case in Section 4.5. 33 4.2 Finitely many degrees: the mixed case  0 2 −1  We now let A = −2 0 1 and G = (1, 1, 2) and consider the associated cluster 1 −10    0 2 −1 algebra A (x1 , x2 , x3 ), −2 0 1 , (1, 1, 2) . We will show that this graded clus1 −1 0 ter algebra is of mixed type with finitely many degrees. More specifically, there is exactly one variable of degree 2 and one of degree −2, but infinitely many variables of degree 1 and −1 each; these are the only degrees which occur. Proposition 4.2.1. that occur in the graded cluster algebra   0 2 The  only degrees  −1 A (x1 , x2 , x3 ), −2 0 1 , (1, 1, 2) are ±1 and ±2. 1 −1 0 Proof. One way to find all occurring degrees is by attempting to compute the exchange tree for A, but closing each branch whenever we obtain a degree seed that is essentially equivalent, up to the sign of the degree cluster, to one that has already occurred. In this case, by Lemma 2.2.9, any subsequent degrees obtained on the particular branch will have already occurred up to sign. This process terminates and is recorded in the diagram below. A black box indicates we have found a degree seed that is essentially equivalent (up to sign) to some previously occurring one. A circle in a degree cluster indicates the newly obtained degree after mutation. We see that the only degrees that can occur are ±1 and ±2.  (1, 1, 2), A 1  ( 1 , 1, 2), −A  2 3   (1, 1 , 2), −A  (1, 1, −1), −( 1 , −1, 1),  0 −1 −1  1 0 −1 1 1 0   0 1 1 −1 0 −1 −1 1 0  0 −1 1 1 0 1 −1 −1 0  2 1   (1, -1 , −1),   Figure 4.1 Notice that, after negating the degree clusters, the degree seeds obtained after the mutation paths [1, 3] and [2, 3] are essentially equivalent to the one obtained 34 by mutating the initial degree seed in direction 3. So we can obtain from either of these new degree seeds the negative of any degree we have encountered so far (thus degree −2 must  occur). The  diagram above also shows there are matrices in 0 2 −1 the mutation class of −2 0 1 that are sign-coherent. That is, matrices whose 1 −1 0 corresponding quivers are acyclic. Therefore, by Lemma 4.1.9, any grading on the cluster algebra we are considering is balanced.   0 2 −1  has infinitely many cluster variProposition 4.2.2. A (x1 , x2 , x3 ), −2 0 1 1 −1 0 ables of degree 1 and degree −1. Proof. We will show that varA [(2, 1)r ] is distinct for all r. Denote the ith entry (j) of the cluster clA [(2, 1)j ] by xi . These cluster variables are rational functions in (j) x1 , x2 and x3 and we will evaluate them at (1, 1, 1). We claim that x1 |(1,1,1) (j) and x2 |(1,1,1) are strictly increasing in j. To simplify notation we will write f (x1 , x2 , x3 ) > g(x1 , x2 , x3 ) to mean f (x1 , x2 , x3 )|(1,1,1) > g(x1 , x2 , x3 )|(1,1,1) , for rational functions f and g. It is easy to show that A[(2,1)r ] = ±A, so we have the following exchange relations for all j: (j) (j+1) x1 = (j+1) = x2 (x2 )2 + x3 (j) , (4.2.1) x1 (j+1) 2 (x1 ) + x3 (j) x2 . (4.2.2) The claim will follow by induction. For the base case, note clA [2, 1]|(1,1,1) = (2, 5, 1) and clA [(2, 1)2 ]|(1,1,1) = (13, 34, 1). For the induction hypothesis assume (j) (j) x2 > x1 , (j+1) (which implies (x1 (j) )/x1 > 1), and (j+1) x1 (j+1) (which implies (x2 (4.2.3) (j) > x2 , (4.2.4) (j) )/x2 > 1). We wish to show (4.2.3) and (4.2.4) for j + 1. First, using (4.2.4), we have (j+1) x2 (j+1) 2 = (x1 ) + x3 (j) x2 (j+1) (j+1) x1 (j) x2 = x1 + x3 (j) x2 (j+1) > x1 . (4.2.5) Now, using (4.2.5), (j+2) x1 (j+1) 2 = (x2 ) + x3 (j+1) x1 (j+1) (j+1) x2 (j+1) x1 = x2 35 + x3 (j+1) x1 (j+1) > x2 . (4.2.6) (j) (j) Thus, we have our result for j + 1. Now since x1 |(1,1,1) and x2 |(1,1,1) are strictly (j) (j) increasing in j, x1 and x2 must be distinct for all j. Now, since deg . varA [(2, 1)r ] = 1 for all r, we have infinitely many variables of degree 1. Next, note that deg . varA [3, (2, 1)r ] = −1 for all r. To find infinitely many (j) (j) variables of degree −1, let x3 = var[3, (2, 1)j ]; we will show x3 |(1,1,1) is strictly (j) (j) (j) increasing in j. We have x3 = x1 +x2 x3 (j) , so since we have shown that x1 |(1,1,1) (j) (j) and x2 |(1,1,1) are strictly increasing in j, this is also the case for x3 |(1,1,1) . Thus there are infinitely many variables of degree −1. In the proof above, we have shown that cluster variables are distinct by considering their numerators. In future, we will usually instead use the more efficient method of considering their denominators via denominator  0 2vectors.   −1 To complete the classification for A (x1 , x2 , x3 ), −2 0 1 , (1, 1, 2) it re1 −1 0 mains to prove that there is just one variable each in degrees 2 and −2. For this we make use of Example 7.8  of [11].Here, the authors consider the cluster algebra generated by the matrix 0 1 1 −1 0 1 −1 −1 0 and show that the corresponding exchange graph is given by Figure 4.2. In this graph, the initial cluster at vertex t0 is (y1 , y2 , y3 ) and the cluster at a general vertex is given (up to permutation) by the three variables in the three regions adjacent to the vertex.   0 2 −1   Proposition 4.2.3. A (x1 , x2 , x3 ), −2 0 1 , (1, 1, 2) has exactly one variable 1 −1 0 of degree 2 and one variable of degree −2.   0 2 −1  Proof. Since, up to essential equivalence, the degree seed (1, 1, 2), −2 0 1 1 −1 0   0 1 1  is mutation equivalent to (1, −1, 1), −1 0 1 (which can be inferred −1 −1 0 from results concerning the behaviour of the grading on  Figure 4.1),  0 any   2 −1 A (x1 , x2 , x3 ), −2 0 1 , (1, 1, 2) may alternatively be obtained by considering 1 −1 0  0 1 1  the grading on A (y1 , y2 , y3 ), −1 0 1 , (1, −1, 1) . Thus it will now be enough −1 −1 0 to show that the latter graded cluster algebra has just one variable each in degrees 2 and −2. Referring again to the example the following exchange  in [11], wehave  0 1 1 relations for the cluster variables in A (y1 , y2 , y3 ), −1 0 1 , (1, −1, 1) for all −1 −1 0 m ∈ Z: 36 wy2m = y2m−1 + y2m+1 , (4.2.7) 2 + w, y2m−1 y2m+3 = y2m+1 (4.2.8) ym ym+3 = ym+1 ym+2 + 1, (4.2.9) 2 y2m−2 y2m+2 = y2m + z, (4.2.10) y2m−1 z = y2m−2 + y2m . (4.2.11) From these equations we may calculate   0 recursively   the degrees of all the cluster 1 1 variables in A (y1 , y2 , y3 ), −1 0 1 , (1, −1, 1) . To start, we have w = var[2] = −1 −1 0 y1 +y3 , y2 which has degree 2. (We know that w is obtained by mutation of the initial cluster in direction 2 since the corresponding cluster is obtained by replacing the second element of the initial cluster, y2 , by w.) Similarly we find that the variable z has degree −2. Now we just need to check that these are the only such variables. By (4.2.8) we have y1 y5 = y32 +w, so y5 has degree 1. Then by (4.2.7), wy4 = y3 +y5 , so y4 has degree −1. By (4.2.10), y2 y6 = y42 + z, so y6 also has degree −1. Similarly we find deg(y7 ) = 1, deg(y8 ) = −1 and deg(y9 ) = 1. This is now enough to infer that deg(y2m ) = −1 and deg(y2m+1 ) = 1 for all m. Therefore w is the only cluster variable of degree 2 and z the only variable of degree −2.   0 2 −1   Corollary 4.2.4. A (x1 , x2 , x3 ), −2 0 1 , (1, 1, 2) is of mixed type. The oc1 −1 0 curring degrees are ±1 and ±2. The graded cluster algebra has one variable each in degrees 2 and −2 and infinitely many variables each in degrees 1 and −1. The grading is also balanced. w s s y1 s s y0 s y3 st0 s y2 s s y5 s s y4 s z Figure 4.2: [11, Figure 4.] 37 s y6 s 4.3 Mutation-cyclic and mutation-acyclic matrices According to Table 4.1, we will need to be able to determine whether a given 3 × 3 matrix is mutation-cyclic or not. In this section we give a simple algorithm that allows us to do this. We also prove that (excluding the singular cyclic case) mutation-cyclic matrices give rise to graded cluster algebras with finitely many variables in each degree. At this stage we should mention [1], which is concerned with parametrising and testing for 3×3 mutation-cyclic matrices, and covers some of the same material that we are about to. While the results in this section were not derived from [1], some can be. In particular, Algorithm 4.3.3 is very similar in spirit to the algorithm in Section 2.5 of [1], which detects whether an input matrix is mutation-cyclic. However, in general we treat the material from a slightly different perspective. Algorithm  0 a −c4.3.3  is motivated by the observation that, when mutating a matrix A = −a 0 b , a ≥ b ≥ c ≥ 2 (and then rearranging to standard form), there c −b 0 is only one chance to obtain a matrix of the same form but with smaller absolute values for the new values corresponding to the b or c entries: if this does not happen when we mutate in direction 3, it can never happen, and therefore A must be mutation-cyclic. For this reason, we use the slightly weaker condition of bc − a ≥ b (rather than bc − a ≥ a, as used in [1]) to detect whether a matrix is mutationcyclic during our algorithm. This allows the possibility of detecting the property a step earlier but means we may have to perform an additional mutation if we want to obtain a minimal mutation-cyclic matrix. In addition to detecting mutationcyclicity, Algorithm 4.3.3 gives an output that is a standard representative for the mutation class of A. (The algorithm in [1] gives the same output if A is mutationcyclic, but does not necessarily otherwise.) This lets us determine whether two matrices are mutation equivalent and tells us where in Table 4.1 an input matrix should be placed. In particular, for any input matrix, it tells us the classification of the corresponding graded cluster algebra (modulo the conjecture about the singular cyclic cases). If the matrix is mutation-acyclic, our output also tells us which case (i.e. which of (4.4.5)–(4.4.9)—see the next section) its mutation class falls into. The idea at the heart of both algorithms is very simple: if the input matrix A is not a fork (defined in the next section), it is not mutation-cyclic, and if it is a fork, we repeatedly mutate at the point of return until we get either a “minimal fork”, which means A is mutation-cyclic, or a matrix that is not a fork, which 38 means A is mutation-acyclic. Finally, if the mutation class of A does not need to be determined, [2] gives a condition that allows us to read off whether A is mutation-cyclic or not from its entries. Theorem 4.3.1 ([2, Theorem 1.2]). Let A =  0 a −c −a 0 b c −b 0  with a, b, c ∈ N0 . A is mutation-cyclic if and only if a, b, c ≥ 2 and C(a, b, c) ≤ 4, where C(a, b, c) := a2 + b2 + c2 − acb (4.3.1) is the Markov constant of the triple (a, b, c). Remark 4.3.2. Note the following fact about mutation of a degree seed of the form  (b, c, a),  0 a −c −a 0 b c −b 0  , (4.3.2) with a ≥ b ≥ c ≥ 2. We have   0 −a  c deg . sdA [1] = (ca − b, c, a), a 0 −(ca−b) −c ca−b 0   0 ca−b −c  ≡ (a, c, ca − b), −(ca−b) 0 a , c −a (4.3.3) (4.3.4) 0 where ca − b ≥ a ≥ c, and   0 −a ab−c a 0 −b −(ab−c) b 0  (b, ab − c, a),    0 ab−c −b , ≡ (a, b, ab − c), −(ab−c) 0 a deg . sdA [2] = b −a a −c 0 b c −b 0   0 where ab − c ≥ a ≥ b. So mutation of (b, c, a), −a (4.3.5) (4.3.6) 0  in directions 1 and 2 yields a degree seed essentially equivalent to one of the same form and a degree at least as large as a (and strictly larger if c ≥ 3). However, we have    0 (bc−a) −c deg . sdA [3] = (c, b, bc − a), − −(bc−a) 0 b , c −b (4.3.7) 0 which may not be equivalent to a degree seed of the same form (if bc − a ≤ 1). Algorithm 4.3.3. Take as input any 3 × 3 skew-symmetric matrix A. Assume A is in form; if it is not, perform the algorithm on A◦ instead. Write  0standard  a −c A = −a 0 b with a, b, c ∈ Z such that |a| ≥ |b| ≥ |c| ≥ 0. c −b 0 1. Set the counter i to the value 1. Let A1 = A. If a ≥ b ≥ c ≥ 2 and bc − a ≥ b then say that A has passed the algorithm and go to Step 4. (Note if c = 2 that bc − a ≥ b means a = b.) Next, if any of the columns of A are sign-coherent or if c ≤ 2, say that A has failed and go to Step 4. 39 2. If there exists a matrix essentially equivalent to (Ai )[3] which is of the form 0 d −f  −d 0 e , where d ≥ e ≥ f ≥ 2, then let Ai+1 be such a matrix. If not, then f −e 0 say that A has failed and go to Step 4. Now, if f ≥ 3 and ef − d ≥ e, then say that A has passed and go to Step 4. If f = 2, say that A has passed if d = e and failed if d > e, and go to Step 4. 3. Increment the counter i by 1 and repeat Step 2. (Note that we reach this step if f ≥ 3 but ef − d < e.) 4. Define the output of the algorithm, which we will denote m(A), as follows. If A passed the algorithm and ef − d ≥ d, m(A) is the matrix Ai computed most recently. If A passed and ef − d < d, m(A) := (Ai )[3] . Otherwise, continue computing Ai for higher values of i in the same way as above until we find k such that Ak is acyclic (we will show later that this must eventually happen—see the proofs of Lemma 4.3.13 and Lemma 4.3.14). Then m(A) := Ak . Let us first check that this algorithm terminates after finitely many steps. As noted, once the algorithm reaches Step 4, we can conclude it will terminate, so we just need to check that A passes or fails in a finite number of iterations. Suppose it does not pass or fail in Step 1 and does not fail in Step 2 when i = 1. Consider 0 d −f  A2 := −d 0 e . Since A1 did not satisfy bc − a ≥ b, we must have d = b and f −e 0 either e < b or f < c (i.e. mutation in direction 3 has produced a degree strictly smaller than b). So each of the subdiagonal entries of A2 is no larger in absolute value than the corresponding entry of A1 , and at least one is strictly smaller. Now A2 will either pass the algorithm or A3 must have some strictly smaller entry than A2 (provided A3 exists—if not, A fails). Continuing in this way, either A must pass after computing (or showing there is no) Ai for some i, or we must eventually obtain a matrix in which at least one entry strictly smaller than than 3, at which point we can immediately determine whether A passes or fails. Definition 4.3.4. We will call the output m(A) of Algorithm 4.3.3 a minimal mutation representative of A, denoted m(A). Remark 4.3.5. Algorithm 4.3.3 allows us to determine if any two 3 × 3 skewsymmetric matrices are in the same mutation class as follows. We will see below that m(A) is unique up to essential equivalence if A passes the algorithm. If it fails the algorithm, there may be up to three minimal representatives, up to equivalence. (However, all will share the same set of entries.) In this case, it easy to work out all the representatives of m(A) (c.f. Equations 4.4.2–4.4.4 in the next section). 40 Algorithm 4.3.3 tests whether A is mutation-cyclic: we will show below that A fails the algorithm if and only if it is mutation-acyclic.  0 a −c  Definition 4.3.6. Let A = ± −a 0 b be a 3 × 3 skew-symmetric matrix. We c −b 0 will call A c-cyclic if a ≥ b ≥ c ≥ 1 and cyclic-preserving if it is c-cyclic with bc − a ≥ b. We will also call a matrix B essentially c-cyclic or essentially cyclicpreserving if B ◦ is c-cyclic or cyclic-preserving, respectively. Note A cannot be cyclic-preserving if c = 1, and if c = 2, A is cyclic-preserving if and only if a = b. Lemma 4.3.7. (i) If A◦ passes Algorithm 4.3.3 then we may write m(A) :=  0 a −c −a 0 b c −b 0  for some a ≥ b ≥ c ≥ 2 and we have that m(A) is cyclic-preserving. (ii) If A is cyclic-preserving then either A = m(A) or A[3] = m(A) and if it is essentially cyclic-preserving then either A◦ = m(A) or A◦ [3] = m(A). Proof. This is immediate considering any of the possible forms of An that are required in order that A passes the algorithm. Lemma 4.3.8. Let A be c-cyclic where c ≥ 2 and let i ∈ {1, 2}. Let σ be such that A[i] ≡ σ((A[i] )◦ ). If c ≥ 3 or c = 2 and a > b, then σ is uniquely determined and σ(i) = 3. If c = 2 and a = b, then σ can be chosen such that σ(i) = 3. Proof. This follows by considering (4.3.4)–(4.3.7) at the beginning of this subsection. Lemma 4.3.9. If A is c-cyclic with c ≥ 2 then (A[1] )◦ and (A[2] )◦ are d-cyclic, where d ≥ c. If c > 2 or a > b (i.e. if A is not the singular cyclic case) then d > c. Proof. This follows from the forms of (4.3.4)–(4.3.6). Corollary 4.3.10. Suppose A is c-cyclic with c ≥ 2. Let [p] be a mutation path without repetitions such that p1 = 1 or p1 = 2 and suppose [p0 ] is either a rooted proper subpath of [p] or the empty path. Then (A[p] )◦ is d-cyclic, where d ≥ c, and (A[p0 ] )◦ is d0 -cyclic with d ≥ d0 ≥ c. Suppose further that c > 2 or a > b (where A = d0 -cyclic with d > d0 ≥ c. 41  0 a −c −a 0 b c −b 0  ). Then (A[p0 ] )◦ is Proof. Assume without loss that p1 = 1. By Lemma 4.3.9, (A[1] )◦ is d-cyclic with d ≥ c. Let δ be such that A[1] = δ((A[1] )◦ ) and δ(p1 ) = 3; such a permutation exists by Lemma 4.3.8. This serves as a base case. Let [p(r)] denote the rooted subpath of p of length r. Assume for induction there exists an n-cyclic matrix C which is essentially equivalent to A[p(r)] and write A[p(r)] = ρ(C). Assume also that ρ is such that ρ(pr ) = 3. Now mutating in direction pr+1 we obtain, A[p(r+1)] = (ρ(C))[pr+1 ] = ρ(C[ρ(pr+1 )] ), (4.3.8) using Part (a) of Lemma 2.1.27 for the second equality. Now since we know ρ(pr+1 ) 6= 3 (otherwise [p] must contain repetitions of direction), (C[ρ(pr+1 )] )◦ is m-cyclic, where m ≥ n, by Lemma 4.3.9. But (C[ρ(pr+1 )] )◦ is essentially equivalent  to C[ρ(pr+1 )] , say C[ρ(pr+1 )] = σ (C[ρ(pr+1 )] )◦ . So we have A[p(r+1)] = ρ σ (C[ρ(pr+1 )] )◦  = ρ (σ (C 0 )) , (4.3.9) where C 0 := (C[ρ(pr+1 )] )◦ . This shows that (A[p(r+1)] )◦ is m-cyclic. By Lemma 2.1.24, we may write A[p(r+1)] = (σρ)(C 0 ). Finally, since C 0 is m-cyclic, we know by Lemma 4.3.8 that (σ can be chosen such that) σ (ρ (pr+1 )) = (σρ)(pr+1 ) = 3. For the second part we use Lemma 4.3.9 again: if c > 2, we may replace the inequalities involving c, d, n and m above by strict inequalities. We may do the same also if a > b, since, after mutation, this property is preserved for the corresponding entries of the mutated matrix (once re-arranged into standard form). A cyclic-preserving matrix is no more than one mutation away from being a “minimal” mutation-cyclic matrix, in the following sense.  0 a −c  Proposition 4.3.11. Suppose A = −a 0 b is c-cyclic and cyclic-preserving. c −b 0 Let [p] be any mutation path without repetitions and suppose [p0 ] is either a rooted proper subpath of [p] or the empty path. Then (A[p] )◦ is d-cyclic with d ≥ c, and (A[p0 ] )◦ is d0 -cyclic with d ≥ d0 ≥ c. In particular, A is mutation-cyclic. Suppose further that l(p) ≥ 2 or p1 6= 3. If we also have c > 2 or a > b, then (A[p0 ] )◦ is d0 -cyclic with d > d0 ≥ c. Proof. If [p] starts with direction 1 or 2 then the result holds by Corollary 4.3.10.   0 −(bc−a) c Suppose p1 = 3. We have A[3] = (bc−a) 0 −b . But bc − a ≥ b as A is cyclic−c b 0 preserving, so A[3] is c-cyclic. We now need to show that ((A[3] )[q0 ] )◦ is d-cyclic, where [q 0 ] is the subpath obtained by deleting the first mutation in [p] (i.e. its 42 rightmost entry, p1 ). This is indeed the case, by Corollary 4.3.10, since the first mutation in [q 0 ] is either direction 1 or 2. For the strict inequality, suppose c > 2 or a > b. If p1 = 1 or 2 then the result holds by Corollary 4.3.10 again. Assume p1 = 3 and l([p]) ≥ 2. We have that the inequality corresponding to bc − a > b holds in (A[3] )◦ . Thus, to obtain (A[p] )◦ , we  0 d −c  are now mutating a c-cyclic matrix of the form −d 0 a with d > a (or c > 2) c −a 0 along a path that does not start with 3. Therefore by Corollary 4.3.10, (A[p] )◦ is d-cyclic with d > c. We list a few results which tell us whether certain matrices are mutation-cyclic or mutation-acyclic. Lemma 4.3.12. Let A =  0 a −c −a 0 b c −b 0  with a ≥ b ≥ c ≥ 3 and bc − a ≥ b. Then A is mutation-cyclic. Proof. Since A is c-cyclic and cyclic-preserving, this holds by Proposition 4.3.11.  Lemma 4.3.13. Let A =  Proof. We have A[3] = 0 a −1 −a 0 b 1 −b 0  with a ≥ b ≥ 1. Then A is mutation-acyclic. 0 −(b−a) c (b−a) 0 −b −c b 0 Lemma 4.3.14. Let A =  0 a −2 −a 0 b 2 −b 0   which is acyclic since b − a ≤ 0. with a ≥ b ≥ 2. Then A is mutation-cyclic if and only if a = b. Proof. If a = b then A is 2-cyclic and cyclic-preserving. Then the result holds by Proposition 4.3.11. Suppose a > b. In this case, we can infer that A is mutation-acyclic using Theorem 4.3.1. However, we will give an alternative proof that shows how to directly mutate A to obtain an acyclic matrix(which we wish  to be able to do for 0 −(2b−a) 2 part 4. of Algorithm 4.3.3). We have A[3] = (2b−a) 0 −b . Three cases can −2 b 0 occur. If 2b − a ≤ 0, then  A[3] is acyclic  as it has a (weakly) sign-coherent column. 0 −b 1 b 0 −2 , which is mutation-acyclic by Lemma 4.3.13. If 2b − a = 1, then A[3] ∼ −1 2 0 If 2b − a ≥ 2 then ◦ (A[3] ) =  0 b −2 −b 0 (2b−a) 2 −(2b−a) 0   =: 0 a(1) −2 −a(1) 0 b(1) 2 −b(1) 0  =: A(1) , where a(1) > b(1) . We have strict inequality here since a 6= b. This matrix has the same form as A, but a(1) < a and b(1) < b. Next consider (A(1) )[3] = 43 0 −b(1) b(1) 0 −2 (2b(1) −a(1) ) 2 −(2b(1) −a(1) ) 0 ! . This matrix is either immediately seen to be mutation- acyclic, in the same way as above, or 2b(1) − a(1) ≥ 2. Then !  0 −b(1) 2 0 (1) (1) −a(1) (1) ◦ b 0 − 2b ( ) =: − −a(2) ((A )[3] ) = 2 −2 (2b(1) −a(1) ) 0 a(2) −2 0 b(2) −b(2) 0  , where a(2) > b(2) . Continuing this process, we must eventually have 2b(n) −a(n) ≤ 1 for some n, at which point we may conclude that A is mutation-acyclic. Proposition 4.3.15. An input matrix A passes Algorithm 4.3.3 if and only if it is mutation-cyclic. Proof. A passes the algorithm. Then A is essentially mutation equivalent  0 Suppose d −f  to −d 0 e where either d ≥ e ≥ f ≥ 3 and ef − d ≥ e, or f = 2 and d = c. In f −e 0 the first case A must then be mutation-cyclic by Lemma 4.3.12 and in the second it must be mutation-cyclic by Lemma 4.3.14. Suppose A fails. Then A is essentially mutation equivalent  0 d −2 to a matrix which either has some sign-coherent column or is of the form −d 0 e where d > e ≥ 2. 2 −e 0 In the first case A is essentially mutation equivalent to an acyclic matrix and in the second it must be mutation-acyclic by Lemma 4.3.14. Now we apply the above to graded cluster algebras generated by mutationcyclic matrices. Theorem 4.3.16. Let A be mutation-cyclic. Let m(A) =  0 a −c −a 0 b c −b 0  and suppose c > 2 (i.e. that m(A) is not a singular cyclic matrix). Then the graded cluster algebra arising from A has finitely many variables in each occurring degree. We also have that the grading is not balanced. Proof. Since m(A) is essentially mutation equivalent to A, it is enough to consider  A (x1 , x2 , x3 ), m(A), (b, c, a) . Since A is mutation-cyclic, it passes Algorithm 4.3.3 by Proposition 4.3.15. Then m(A) is c-cyclic-preserving by Lemma 4.3.7. Let [p] be a mutation path of length n ≥ 1. Then, as c > 2, the second part of Proposition 4.3.15 implies we must have degm(A) [p] > n, since degm(A) [p] is bounded below by the smallest entry of m(A)[p] . Thus, there are only finitely many possible mutation paths that can result in any given degree, and so there are only finitely many possible cluster variables of that degree. The grading is clearly not balanced since all occurring degrees are positive. 44 4.4 Cluster algebras generated by mutation-infinite acyclic matrices Gradings on cluster algebras generated by mutation-infinite 3 × 3 skew-symmetric acyclic matrices all have the property that there are infinitely many variables in each occurring degree. A reason why one may expect this behaviour is the following: cluster algebras associated with such acyclic matrices have a special mutation sequence which gives rise to infinitely many seeds that are not equal (or essentially equivalent) to the initial seed, but whose corresponding degree seeds are. Given any degree, there exists a mutation path applied to the initial seed which results in a cluster variable of this degree. But then (accounting for essential equivalence) the same mutation path applied to each of these different seeds gives us infinitely many different ways of obtaining variables of this degree. The purpose of this section is to prove that the variables we obtain in this way are in fact all distinct. This turns out to be nontrivial, and we rely on a property of the exchange graphs of acyclic cluster algebras in order to prove our result. All such exchange graphs have been identified by Warkentin in Chapter 10 of [28]. The following theorem is the crucial property we need for our result. It appears in [15] as Conjecture 3.47, but is proved in our setting, for acyclic matrices, in [6, Corollary 3]. Theorem 4.4.1. Let A be a cluster algebra arising from a mutation-acyclic matrix. For any cluster variable x in A, the seeds whose clusters contain x form a connected subgraph of the exchange graph. We will show that certain variables are distinct by showing that they define different subgraphs, or regions, of the exchange graph. Definition 4.4.2. Let x be a cluster variable in a cluster algebra A. Call the subgraph of Γ(A) formed by the set of seeds whose clusters contain x the region defined by x, denoted by R(x). By Theorem 4.4.1, if A is a (mutation-)acyclic matrix and A = A(x, A), then R(x) is connected for each cluster variable x in A. It is clear that the regions of A are in bijection with the cluster variables. We also have that, in acyclic cluster algebras of rank 3, a region must either be a loop (or polygon) or an infinite line of vertices. We may see this as follows. If a region R(x) is not a loop then let t1 be a vertex of R(x) and let L be the list of 45 vertices encountered so far, initially containing only t1 . Exactly two of the vertices connected to t1 , say t2 and t3 , are also in R(x), since mutation in exactly two out of three possible directions does not replace x. Now add t2 and t3 to the list L. Then exactly two of the neighbours of t2 and t3 must also be in R(x), and since R(x) is not a loop, these new vertices must not already be in L. (To be precise, this is only true if R(x) contains no loops, rather than is not a loop, but it is clear that R(x) must be a loop if it contains one.) Continuing in this way, we see that R(x) is an infinite line. Let us fix a representative for our acyclic matrices, to which we may restrict our attention. We will assume any such matrix is of the form  0 −a −c  A = a 0 −b , c b 0 (4.4.1) with a ≥ b ≥ c ≥ 0. We may assume |a| ≥ |b| ≥ |c| because of essential equivalence; if A does not satisfy this to begin with, we can always permute its entries to get an essentially equivalent matrix for which this will be the case. Now note the mutation equivalence A[1] = A[2,1] = and 0 −a  −c 0 a −c  a c 0 −b , b 0  −a c 0 b , −b 0  A[3,2,1] = A, (4.4.2) (4.4.3) (4.4.4) which shows that if any of a, b, c are negative, we can mutate A to make them all positive (or at least all of the same sign, in which case we can then negate the whole matrix). Thus we can also assume that a, b and c are non-negative. This choice of representative is the same as that in [28]. The exchange graphs we will consider are made up of two main elements: a series of infinite 2-trees and a “floor” of varying complexity, to which each 2-tree is attached by another edge. We wish to be able to formally distinguish between these two components of the graph. The following definition helps with this. It is made in Chapter 2 of [28]. Definition 4.4.3. Let Q be the quiver corresponding to an n × n skew-symmetric matrix. Q, or its corresponding matrix, is called a fork if it is not acyclic, |qjk | ≥ 2 for all j 6= k, and there is a vertex r called the point of return such that 1. For all i ∈ Q− (r) and j ∈ Q+ (r) we have qji > qir and qji > qrj , and 2. Q− (r) and Q+ (r) are acylic, 46 where Q+ (r) (resp. Q− (r)) is the full subquiver of Q induced by all vertices with an incoming arrow from r (resp. outgoing arrow to r). The property of forks that is relevant to us is that mutation of the corresponding matrix in any direction excluding that of the point of return gives rise to another “larger” fork. In the exchange graphs we are considering, forks are found at the base of each of the infinite 2-trees (see [28], Lemma 2.8) that make up one component of a graph. Definition 4.4.4. We will say a vertex of an exchange graph Γ is in the canopy of Γ if the associated matrix is a fork, otherwise we will say it is in the floor. Given a vertex t in the canopy of Γ, there is a unique path of shortest length connecting t to a vertex t0 which is in the floor of Γ. We will call the infinite 2-tree of which t is a vertex the branch of Γ associated with t0 . If (x, A) is a seed where A is a fork with point of return r, then we know that part of the exchange graph looks as in the following figure, where the dotted (but not dashed) lines represent an infinite continuation of the 2-tree. (x, A) r Figure 4.3 We will depict such a seed corresponding to a fork along with the associated infinite 2-tree by a rectangle as in the following. (x, A) Figure 4.4 It turns out that there are five cases of acyclic matrices 47  0 −a −c  a 0 −b c b 0 which we will need to consider: a, b, c ≥ 2, (4.4.5) a, b ≥ 2, c = 1, (4.4.6) a ≥ 2, b = c = 1, (4.4.7) a, b ≥ 2, c = 0, (4.4.8) a ≥ 2, b = 1, c = 0. (4.4.9) Any to finite type cluster algebras, matrices of the form  cases correspond   0 aother 0 −1 −1 0 −a 0 0 , or the mixed case 1 0 −1 which was considered in Section 4.2. 0 0 0 1 1 0 As mentioned above, these acyclic matrices have a special mutation path which produces equal degree seeds. Lemma 4.4.5. Let A be one of the matrices in the above list. Then deg . sd[(3, 2, 1)n ] (x, A) = (− deg(x), A) , and so deg . sd[(3, 2, 1)2n ] (x, A) = (deg(x), A) . Proof. Noting that (up to sign and scaling) the grading vector is (b, −c, a) and using Lemma 4.1.6, this follows immediately from direct computation of the case for n = 1 (which we have already done by Equations 4.4.2–4.4.4). Remark 4.4.6. We could alternatively have used the path [1, 2, 3] in Lemma 4.4.5 above, which does the same thing in the “opposite” direction. In fact, starting from the initial seed and mutating along both [(3, 2, 1)n ] and [(1, 2, 3)n ] for all n, we traverse precisely the vertices of the exchange graph that comprise the seeds of the floor containing acyclic matrices. (This idea of traversing the exchange graph will be made more precise when we discuss walks on the exchange graphs below.) Remark 4.4.7. While we do not make use of it in this section, it is not difficult to show that dx (varA [(3, 2, 1)r ]) < dx (varA [(3, 2, 1)r+1 ]) for all r ≥ 1 (using the partial order in Definition 2.4.4). In other words, the variables in the clusters obtained under the path in Lemma 4.4.5 “grow” indefinitely and so are distinct for each n. In all cases, dealing with the infinite 2-trees beginning at a fork can be done in the same way. 48 Proposition 4.4.8. Let A =  0 −a −c  a 0 −b c b 0 be a matrix with entries satisfying one of (4.4.5)–(4.4.9). Let A(x, A) be the corresponding cluster algebra and Γ(A) the exchange graph. Let z and z 0 be two cluster variables that appear in the seeds of the vertices t and t0 , respectively, and suppose these vertices belong to different branches in Γ. Write z = varA [p](x) and z 0 = varA [p0 ](x) for some minimal length mutation paths [p] and [p0 ] and suppose that A[p] and A[p0 ] are forks (in other words, that z and z 0 are obtained by mutation paths terminating in the canopy). Then z and z 0 are not the same cluster variable. Proof. Assume without loss of generality that t occurs in the branch associated with the initial cluster. We just need to show R(z) 6= R(z 0 ). Let [p] be a mutation path of minimal length such that varA [p](x) = z. Let (xt , B) = sdA [p](x) be (an equivalence class representative of) the seed associated with t. Then the seed sdB [pn ](xt ) does not contain z. But then since the component of Γ containing z is connected by Theorem 4.4.1, it must be separate from the component containing z 0 , as (excluding repeated mutation directions) there is only one path from t to the initial cluster. Therefore z and z 0 cannot be equal. Before turning our attention to the vertices in the floor of a graph, we make note of [28, Lemma 7.4] (a restatement of [11, Theorem 7.7] for quivers) which is crucial. Theorem 4.4.9. Let A be a skew-symmetric matrix and let i 6= j. Then, starting at the seed (x, A), alternating mutations in directions i and j produces a cycle in the corresponding exchange graph if and only if either aij = 0 or |aij | = 1 . The cycle has length 4 in the first case and length 5 in the second. Our next aim is to prove the following.  0 −a −c  Proposition 4.4.10. Let A = a 0 −b be a matrix with entries satisfying one c b 0 of (4.4.5)–(4.4.9). Let z be a cluster variable in A(x, A) such that z = varA [p](x) for some mutation path [p]. Suppose that the vertex t ∈ Γ(A) corresponds to the seed sdA [p](x), and that t is in the floor of Γ(A). Then, for n ≥ 1, z 0 := varA [p, (3, 2, 1)2n ](x) is not the same cluster variable as z. We will only need to prove the above for n = 1; due to the manner in which we prove it for n = 1, which will use Theorem 4.4.1, the result for all higher values of n will automatically be implied. We will also make use of Theorem 10.3 of [28], which tells us what the required exchange graphs are. Note since A[(3,2,1)2n ] = A, the exchange graph “repeats” every six vertices along the mutation 49 path whose corresponding vertices make up this part of the floor of the graph. (In fact, A[(3,2,1)n ] = A, so it actually repeats every three vertices, but we think of the repetition as over six vertices as we need six mutations to obtain equal degree seeds.) Therefore we may restrict our attention to just one such segment of the graph. We will call the segment containing the initial seed the initial segment. We will label vertices ti , with t0 being the vertex corresponding to the initial cluster. Our argument will proceed as follows. Suppose z = varA [p](x) as above. By taking the fixed representative (x, A) for the initial seed at t0 (which we will denote sd(t0 )—and similarly for seed representatives at the other vertices), the mutation path [p] identifies a walk and a terminal vertex in Γ. We may identify such a walk since, although the exchange graph is not labelled with mutation directions, we will still be able to deduce the mutation direction that results in a seed in the same class as that of the required vertex at every step of the walk. So we can identify z in a fixed seed representative at a particular vertex ti in Γ. Next we identify the corresponding vertex t0i for z 0 . We may simply read this off the graph since it corresponds to the mutation path [p, (3, 2, 1)2 ], so, as the graph repeats, it is the end point of the same walk on Γ as for z but extended by six vertices along from the initial cluster. We then aim to show that this vertex does not belong to R(z). We will do so by showing that any walk in Γ from ti to t0i must pass through a vertex whose corresponding cluster no longer contains z. Since R(z) is connected by Theorem 4.4.1, this accomplishes our aim and shows z 6= z 0 . As mentioned, this also implies that the same holds for all larger values of n: if we take a larger value of n and consider the new corresponding variable z 0 and vertex t0i , it is clearly still the case that any walk from ti to t0i must pass through a vertex whose cluster no longer contains z. Since we have a fixed seed representative for ti , we can superimpose mutation paths onto Γ in the same way as above and show that z must be replaced along any walk resulting in a seed in the same equivalence class as that of t0i . We will denote (part of) such a walk as a directed series of labelled arrows highlighted in blue and ending at a blue square vertex (by which we will mean that this vertex no longer belongs to R(z)). For the initial vertex t0 , we will need to show that each of the three variables in the cluster representative must be replaced at some point in any walk to t00 . In other words, that all three regions adjacent to t0 are distinct from all three regions adjacent to t00 . For other vertices, we will only need to do this for one entry of the corresponding cluster. For example, if a cluster representative at the vertex t1 is obtained by one mutation of the initial cluster at t0 , then two of its entries will have already been dealt with in t0 , and so only the 50 new entry needs to be considered. Let us now apply our method each of the cases (4.4.5)–(4.4.9). Case 1 (4.4.5). The exhange graph is partially drawn in Figure 4.5. We will show that t0 and t00 are in different regions (the proof for t1 to t5 is essentially the same). This is easy to see since a representative of the seed class at t3 is obtainable from the initial seed, sd(t0 ), by the mutation path [3, 2, 1], and clA [3, 2, 1](x) no longer contains any of the variables in x. Since any walk from t0 to t00 passes through t3 , we are done. t0 1 t1 x1 2 x2 t2 3 t3 x3 t5 t4 t00 Figure 4.5: Case 4.4.5 — part of the exchange graph. Case 2 (4.4.6). We will use Figure 4.13 to give a detailed explanation of how we deduce the mutation directions in the walks that are superimposed onto the exchange graph and so show that certain vertices are in separate regions. This approach will also be how we proceed in all subsequent cases. Figure 4.13 corresponds to the variable var[2, 1] in cl(t5 ), the cluster class at vertex t5 . The other two variables in this cluster, var[1] and x3 , will have already been dealt with by the time we consider var[2, 1].   0 −a −c  We start the case by taking the representative (x1 , x2 , x3 ), A = a 0 −b for c b 0 the initial seed at vertex t0 . We need to find the vertex whose seed class contains sdA [2, 1](x1 , x2 , x3 ). First note the following: by Theorem 4.4.9, it is clear that mutating the initial seed in direction 1 will produce a seed in the same class as either sd(t1 ) or sd(t4 ). Since the exchange graph is “symmetric” about t0 , we may simply assume that direction 1 corresponds to sd(t4 ) rather than sd(t1 ). However, once this choice has been fixed, we will need to use it consistently throughout all diagrams in the case. To obtain a seed in the same class as sd(t5 ) we must mutate in direction 2, since (again by Theorem 4.4.9) direction 3 keeps us on the pentagon comprising R(x2 ). Therefore t5 is the desired vertex. We have now obtained var[2, 1] as the second entry of our cluster, and our seed is in the same class as sd(t5 ). We mark the mutation walk leading up to the variable we are considering in red on the diagram, and we will consider diagrams in an order such that we will have already dealt with the other two entries of our cluster. 51 Now we wish to prove that the vertex t05 is not part of the region R(var[2, 1]) by finding “variable breaks” in the exchange graph, which show that t05 is not in the connected subgraph containing var[2, 1]. Such breaks will occur the next time we mutate in direction 2 along any walk, as this is when the second entry of our cluster representative is replaced. (We do not need to worry about the variable appearing as a different entry before this point, as this would violate that the variables in a cluster form a transcendence base.) Clearly any walk from t5 to t05 must pass through t01 , which we can show is not in R(var[2, 1]). To get from t5 to t6 we next mutate in direction 3. To see that it is direction 3 that takes us to t6 rather than direction 1, recall that A[1,2,3] = A. So the exchange graph must have the same form about the vertex we end up at after [3, 2, 1] as it does about the initial vertex t0 —this is not the case for t9 , so direction 3 must indeed take us to t6 . (Alternatively, we may argue by contradiction that if this were not the case then the walk corresponding to [3, 2, 1, 3, 2, 1] would in fact take us to a seed which is a fork, but the matrix A[3,2,1,3,2,1] = A is not a fork.) Next, to get to t7 , we mutate in direction 1. Finally we must mutate in direction 2 to arrive at t01 . In the process, we replace the second entry of our cluster representative, var[2, 1]. Now that we know cl(t01 ) does not contain var[2, 1] we mark it with a blue square, and we are done. We check all the other variables in the diagrams below. The regions corresponding to the initial variables are indicated as a visual aid, although we bear in mind that regions are abstract sets rather than regions of the plane in the geometric sense. In some of the figures, we simultaneously superimpose two mutation paths onto the exchange graph. Note that a representative of cl(t4 ) is given by (var[1, 3, 1, 3] = x3 , x2 , var[3, 1, 3]), and these three variables are accounted for in Figures 4.7–4.12. (This is suggested by the diagram, as we can see that the regions adjacent to t4 are R(x2 ), R(x3 ) and R(var[3, 1, 3]).) Alternatively, we could have taken another representative of cl(t4 ): (var[1], x2 , x3 ). But our previous choice makes it more obvious that var[1] (which is var[3, 1, 3]) has been accounted for, given that we have already considered all variables along the path [3, 1, 3]. In a similar way, the variables of cl(t9 ) are already accounted for elsewhere. Therefore we do not to concern ourselves with the variables in t4 and t9 . 52 t2 t02 t6 t3 t5 t03 t06 t05 t7 t07 R(x2 ) t1 R(x1 ) t0 t01 t4 R(x3 ) t9 t04 t00 t8 t09 t08 Figure 4.6: Case 4.4.6 — two segments of the exchange graph for this matrix. t2 t3 R(x2 ) t1 1 t4 t0 R(x3 ) R(x1 ) Figure 4.7: Case 4.4.6 — variable x1 of the initial cluster cl(t0 ). t2 t3 2 R(x2 ) t1 R(x1 ) 1 t5 t4 t0 R(x3 ) Figure 4.8: Case 4.4.6 — variable x2 of the initial cluster cl(t0 ). 53 t2 t3 2 R(x2 ) t1 R(x1 ) 1 t6 t5 t7 3 1 t4 t0 R(x3 ) t9 3 t8 Figure 4.9: Case 4.4.6. Variable x3 of the initial cluster cl(t0 ). 3 t2 1 t1 R(x1 ) 3 t3 R(x2 ) 3 t4 t0 R(x3 ) Figure 4.10: Case 4.4.6 — variable var[3] of cl(t1 ). 3 t2 1 t3 R(x2 ) t1 3 t0 R(x1 ) 1 t4 R(x3 ) Figure 4.11: Case 4.4.6 — variable var[1, 3] of cl(t2 ). 54 3 t2 1 t3 1 R(x2 ) t1 3 t6 t5 1 3 t7 2 t4 t0 R(x3 ) t9 R(x1 ) t8 Figure 4.12: Case 4.4.6 — variable var[3, 1, 3] of cl(t3 ). t2 t3 1 t5 2 R(x2 ) t1 t6 3 1 t7 t4 t01 t0 R(x3 ) t9 R(x1 ) 2 t8 Figure 4.13: Case 4.4.6 — variable var[2, 1] of cl(t5 ). t2 t3 2 R(x2 ) t1 R(x1 ) 1 t02 t6 t5 3 1 t7 1 2 t01 t4 t0 R(x3 ) t9 t8 t03 3 3 t04 t00 Figure 4.14: Case 4.4.6 — variable var[3, 2, 1] of cl(t6 ). 55 t2 t3 1 t1 t5 2 R(x2 ) 3 1 t7 t03 1 2 t01 t4 t0 R(x3 ) t9 R(x1 ) t02 t6 3 1 t04 t00 t8 Figure 4.15: Case 4.4.6 — variable var[1, 3, 2, 1] of cl(t7 ). t2 t3 R(x1 ) 1 t5 2 R(x2 ) t1 t6 t7 3 1 3 t4 t0 R(x3 ) t9 3 t8 Figure 4.16: Case 4.4.6 — variable var[3, 1, 3, 2, 1] of cl(t8 ). In each case, we see that the variable in question at vertex ti is in a separate region to those of the variables at t0i . Case 3 (4.4.7). We deal with all variables in the initial cluster at the same time in Figure 4.18. We then consider var[1] of cl(t4 ), var[3] of cl(t1 ), var[1, 3] of cl(t2 ) and var[3, 1] of cl(t3 ). The other cases are similar and are not shown. 56 R(x3 ) t0 t8 t4 t11 t7 t9 t00 t6 t10 t01 t04 t07 t08 t09 t011 R(x1 ) R(x2 ) t1 t3 t2 t03 t02 t5 t05 t06 t010 Figure 4.17: Case 4.4.7 — two segments of the exchange graph. R(x3 ) t8 t0 R(x1 ) 1 3 t1 t4 x1 R(x2 ) 1 3 t7 x2 2 13 t9 x3 3 t3 t2 x1 x3 t6 2 t10 x2 t 5 Figure 4.18: Case 4.4.7 — variables x1 , x2 and x3 of the initial cluster cl(t0 ). R(x3 ) t8 t0 1 t4 t7 2 R(x1 ) 3 R(x2 ) t1 t9 1 1 t3 t6 t2 t10 t5 Figure 4.19: Case 4.4.7 — variable var[1] of cl(t4 ). 57 R(x3 ) t0 3 t4 3 1 3 t1 t3 t2 Figure 4.20: Case 4.4.7 — variable var[3] of cl(t1 ). R(x3 ) t4 t0 R(x1 ) 3 t1 R(x2 ) 1 3 t7 1 2 1 t3 t2 t6 t5 Figure 4.21: Case 4.4.7 — variable var[1, 3] of cl(t2 ). R(x3 ) t0 t4 1 R(x1 ) 3 t1 t7 3 t3 t2 2 3 t6 t5 Figure 4.22: Case 4.4.7 — variable var[3, 1] of cl(t3 ). Case 4 (4.4.8). In this case we show the relevant diagrams for the initial variables as well as var[1] of cl(t3 ), var[2, 1] of cl(t4 ), var[3] of cl(t1 ) and var[1, 3] of cl(t2 ). Other cases are similar. 58 t2 t1 R(x2 ) t3 t4 t0 R(x1 ) t02 t5 t01 t6 t05 t03 t04 t00 t7 t06 t07 R(x3 ) Figure 4.23: Case 4.4.8 — two segments of the exchange graph. t2 t1 1 t5 x1 t3 2 x2 t4 t0 R(x1 ) 13 x3 t6 t7 R(x3 ) Figure 4.24: Case 4.4.8 — variables x1 , x2 and x3 of the initial cluster cl(t0 ). t2 3 2 t1 1 t3 1 t4 t0 R(x1 ) t5 t6 t7 R(x3 ) Figure 4.25: Case 4.4.8 — variable var[1] of cl(t3 ). 59 t2 t5 3 2 1 t1 2 1 t3 t4 t6 t0 t7 R(x1 ) R(x3 ) Figure 4.26: Case 4.4.8 — variable var[2, 1] of cl(t4 ). t2 1 2 3 3 t1 t3 t0 R(x1 ) R(x3 ) Figure 4.27: Case 4.4.8 — variable var[3] of cl(t1 ). t2 1 3 2 3 t1 3 t3 1 t4 t0 R(x1 ) t5 t6 t7 R(x3 ) Figure 4.28: Case 4.4.8 — variable var[1, 3] of cl(t2 ). Case 5 (4.4.9). This case has a slightly different property to the others: the vertices t4 and t04 share a common region, namely, R(var[2, 1, 3]). (Similarly, so do t9 and t09 .) This means we can not prove that the cluster variables of t4 are distinct from those of t04 . This does not cause any problems, though; while it is not the case 60 that the variable is replaced as we move one segment to the right, this does occur as we move two segments to the right. Showing this is not difficult (see Figure 4.33) and is enough to prove that we have infinitely many variables in all degrees. Indeed, if we are given a variable in the canopy, this shows it is distinct from all the variables in the corresponding cluster two segments to the right (which, as usual, is the same degree cluster). As before, this behaviour propagates inductively, so that the corresponding cluster in every second segment must contain a variable unique to just one pair of adjacent segments, but of the same degree as the others. We show the diagrams for the initial variables as well as for var[3] of cl(t1 ), var[1, 3] of cl(t3 ), var[2, 1, 3] of cl(t4 ) and var[3, 2, 1, 3] of cl(t5 ). t0 t09 t9 R(x3 ) t2 t6 t7 t00 t02 t06 t07 t3 t5 t8 t01 t03 t05 t08 R(x1 ) R(x2 ) t1 t04 t4 Figure 4.29: Case 4.4.9 — two segments of the exchange graph. t9 R(x3 ) t0 R(x1 ) 1 3 R(x ) 2 t1 1 t2 x1 2 t6 x2 t7 2 3 1 t00 x3 3 x1 t3 2 t5 x3 t8 t01 t 4 x2 Figure 4.30: Case 4.4.9 — variables x1 , x2 and x3 of the initial cluster cl(t0 ). 61 t9 R(x3 ) t2 t0 R(x1 ) 3 R(x ) 2 t1 1 t6 t7 t00 t5 t8 t01 3 t3 2 3 t4 Figure 4.31: Case 4.4.9 — variable var[3] of cl(t1 ). t9 R(x3 ) t0 R(x1 ) t2 t6 t7 t00 t8 t01 1 3 R(x ) 2 t1 1 2 1 t3 2 3 t5 t4 Figure 4.32: Case 4.4.9 —variable var[1, 3] of cl(t3 ). t0 R(x1 ) t2 t6 3 R(x2 ) t1 1 t09 t9 R(x3 ) t02 t00 t7 t06 t07 t05 t08 2 1 t3 2 3 t5 3 1 t01 t8 t03 3 2 t04 t4 Figure 4.33: Case 4.4.9 — variable var[2, 1, 3] of cl(t4 ). 62 t9 R(x3 ) t0 R(x1 ) t2 t6 t7 t00 3 1 3 R(x ) 2 t1 1 2 1 t3 2 3 t5 3 t8 t01 t4 Figure 4.34: Case 4.4.9 —variable var[3, 2, 1, 3] of cl(t5 ). We have now shown what we want for all cases, which establishes Proposition 4.4.10. Putting together Proposition 4.4.8 and Proposition 4.4.10, we have the following. Theorem 4.4.11. Let A be a 3 × 3 mutation-acyclic matrix. Then the graded  cluster algebra A x, A, g has infinitely many variables in each occurring degree. The grading is also balanced. Proof. Given the above work, we now need only justify that the grading is balanced. Of course, this follows from Lemma 4.1.9 since A is acyclic, but here we are to able see this directly. Let z be a cluster variable in A. Then z = varA [p, (3, 2, 1)n ] for some n and some minimal length mutation path [p] (strictly, we may need to replace the path [(3, 2, 1)n ] by [(1, 2, 3)n ]). But then z 0 := varA [p, (3, 2, 1)n+1 ] satisfies degg (z 0 ) = − degg (z). This gives a bijection between the variables of degree d and degree −d for any occurring degree d. 4.5 The singular cyclic case The case of A =  0 a −2 −a 0 a 2 −a 0  , a ≥ 3, is special. Mutation in direction 1 or 3 gives −A, while mutation in direction 2 gives a fork. Thus A is mutation-cyclic, but unlike the other mutation-cyclic cases we can mutate along a repetition-free path without obtaining a strictly increasing sequence of degrees. Thus the arising graded cluster algebra is not forced to have finitely many variables in each degree (though, like the other mutation-cyclic cases, all degrees will be positive). Indeed, 63 as in the acyclic case, we can obtain a floor of equal degree seeds with different underlying clusters, and so we might expect the graded cluster algebra to behave as one generated by an acyclic matrix. However, as Theorem 4.4.1 is only conjectured for mutation-cyclic matrices, this can not be proved in the same way as above. Let us now consider what can be said about this case. For the following lemma, recall the relevant notation regarding denominator vectors from Definition 2.4.1. Lemma 4.5.1. We have dx (varA [(3, 1)k ]) < dx (varA [(3, 1)k+1 ]) for all k ≥ 1. Proof. We will show   (k − 1, 0, k − 2), (0, −1, 0), (k, 0, k − 1) d. cl[(3, 1)k ] =  (k, 0, k − 1), (0, −1, 0), (k − 1, 0, k − 2) if k is even, if k is odd.  As a base case note that d. cl[(3, 1)1 ] = d. cl[1] = (1, 0, 0), (0, −1, 0), (0, 0, −1) . Assume the result is true for k and assume without loss of generality that k is  even. Then the current degree cluster is (k − 1, 0, k − 2), (0, −1, 0), (k, 0, k − 1) and the current matrix is A. We then have d[(3, 1)k+1 ] = d[1, (3, 1)k ]  = −(k − 1, 0, k − 2) + max a(0, −1, 0), 2(k, 0, k − 1)) = −(k − 1, 0, k − 2) + (2k, 0, 2k − 2) = (k + 1, 0, k).  So the new denominator cluster is (k + 1, 0, k), (0, −1, 0), (k, 0, k − 1) as required. Thus, since A[(3,1)k ] = (−1)k A, the path [(3, 1)n ] is the special mutation path for A analogous to the one in Lemma 4.4.5 for an acyclic matrix.   0 a −2   Corollary 4.5.2. In the graded cluster algebra A x, −a 0 a , (a, 2, a) , there 2 −a 0 are infinitely many degrees that each contain infinitely many variables. Proof. Let [p] be a mutation path in A whose corresponding terminal vertex is at least three mutations above the floor of the exchange graph (i.e. three mutations above a vertex in the equivalence class of sd[(3, 1)r ].) We must have that clA [p] and clA [p, 3, 1] are distinct. If not, then clA [p] = clA [p, 3, 1] so that, applying the reverse path [p−1 ] to both clusters, clA [p−1 , p] = clA [p−1 , p, 3, 1]. This implies clA [3, 1] = (x1 , x2 , x3 ), a contradiction by Lemma 4.5.1. Now by prepending the path [3, 1] to [p] infinitely many times, we obtain infinitely many distinct clusters 64 whose corresponding degree clusters are all equal. By the pigeonhole principle, this produces infinitely many variables in at least one of the degrees in deg . cl[p]. Now say [p] has length n and let q1 , q2 and q3 be mutation directions such that q1 6= pn and {q1 , q2 , q3 } = {1, 2, 3}. (Applying the mutation path [q3 , q2 , q1 ] to the current cluster will then replace each each cluster variable.) Repeating the above process with the path [q3 , q2 , q1 , p] then yields infinitely many variables of a different degree to the previous one, since degrees strictly increase as we increase the mutation distance from the floor of the exchange graph. We may continue extending the mutation path in a similar way an indefinite number of times and then repeat the same prepending process each time. This produces infinitely many degrees each containing infinitely many variables. Remark 4.5.3. Given that we may no longer use Theorem 4.4.1, the most obvious approach when attempting to prove Conjecture 4.1.11 might be that of an inductive argument. We have shown in Lemma 4.5.1 that the denominator clusters along the floor of the exchange graph grow as we move along the special mutation path, and this would appear to be a suitable base case for the following argument. Suppose [p] is a mutation path resulting in degree d, starting from the initial cluster, and that the denominator vector obtained after [p] is smaller than that obtained after [p, 3, 1] (i.e. after starting with a larger denominator cluster). We may then expect to be able to prove that if [p0 ] is a path obtained by extending [p] by one mutation, then [p0 , 3, 1] also gives a larger denominator vector than [p] does. In practice, showing this is true seems more difficult than might initially be hoped, the difficulty being that when we mutate a larger denominator cluster, we must also subtract a larger denominator vector when computing the new variable. An alternative approach may involve trying to find an invariant of a cluster variable that is more appropriate to our task. This invariant would need to capture some notion of the size of a cluster variable, while having a mutation formula that circumvents the above problem. Yet another approach may involve considering [p] as a rational function of a denominator cluster (or possibly of some other object capturing relevant information about a cluster) and attempting to show that, given two such objects as inputs, the larger of the two must give a larger output. 65 Chapter 5 Degree subquivers with growth It is useful to make note of certain small quivers and degree quivers which, if embedded as a subquiver in a larger quiver, will provide a way to find increasing arrows and degrees. This will reduce the problem of finding infinitely many degrees to one of finding such a subquiver in the mutation class of our initial exchange quiver. This reduction will, in particular, be useful in the Chapter 6. Note that all results concerning quivers below are automatically also true of their respective opposite quivers. Notation 5.0.1. Given a quiver Q with vertices v1 , . . . , vn , we will use wQ (vi , vj ), to mean the (i, j) entry of the corresponding matrix. That is, the number (or weight) of arrows from vertex vi to vertex vj , with an arrow in the opposite direction counting as negative. In what follows we will refer to degree subquivers. This means a subquiver (in the sense of Definition 2.3.1) of a degree quiver, where we require that the degrees of the vertices of the subquiver must match those of the corresponding vertices of the quiver. It is important to note that a degree subquiver need not be a degree quiver itself. 5.1 Subquivers with growing arrows Proposition 5.1.1. Consider the quiver v2 2 Q= v3 . (5.1.1) v1 (Recall that no label on an arrow means it has weight 1.) Let [p] be a repetitionfree mutation path such that p1 6= v1 . Let R = Q[p,v1 ,v2 ] . Then |wR (vi , vj )| ≥ 66 |wQ (vi , vj )| for each i 6= j, and this inequality is strict for at least one choice of i and j. Moreover, if [p0 ] is a proper rooted subpath of [p] and R0 := Q[p0 ,v1 ,v2 ] , then |wR (vi , vj )| > |wR0 (vi , vj )| for some pair i 6= j. Proof. For notational simplicity we will use i and vi interchangeably when working with mutation directions. Mutation at vertex v2 turns Q into the quiver v2 2 v3 . v1 2 Mutation at v1 then turns this into v2 3 v3 which corresponds to the matrix  2 2 0 2 −2 −2 0 3 2 −3 0 , v1  . Note that  0 2 −2 −2 0 3 2 −3 0  ≡σ  0 3 −2 −3 0 2 2 −2 0  where σ is such that  σ(1) = 3 (i.e. such that if k ∈ {2, 3} then σ(k) ∈ {1, 2}). The matrix 0 3 −2 −3 0 2 2 −2 0 is 2-cyclic, and since [p] starts with mutation of vertex v2 or  0 3 −2  v3 , we may apply Corollary 4.3.10 to −3 0 2 with the path [σ(p)]. This gives 2 −2 0 the desired result for an essentially equivalent quiver, and hence for our original quiver. Since we applied Corollary 4.3.10 in the proof of Proposition 5.1.1, we immediately obtain a further corollary: Corollary 5.1.2. Let Q and [p] be as in Proposition 5.1.1. Then Q[p,v1 ,v2 ] is cyclic. 5.2 Growing degrees Next we give some conditions in which the same quiver allows us to obtain an increasing sequence of degrees. Remark 5.2.1. Let Q be a positive degree quiver and R a degree subquiver. Notice that when carrying out degree seed mutation at a particular vertex v in R, we subtract the degree of v and then only add multiples of degrees of adjacent vertices. Since we have assumed Q is positive, the degrees of these adjacent vertices are positive. Any arrows external to R can therefore only add to the degrees that would be obtained under mutation if R was the entire quiver, and if we only mutate at vertices inside R, these are the only vertices whose degrees may change. Thus, if we are interested in showing that mutation paths give increasing degrees, we may safely ignore any arrows that are adjacent to any vertex outside R. 67 , Proposition 5.2.2. Let Q be a positive degree quiver which contains the degree subquiver (d2 )v2 R= (d3 )v3 2 . (5.2.1) (d1 )v1 Let [p] be a repetition free mutation path such that p1 6= v1 . Suppose (di ) ≥ 1 for i = 1, 2, 3, (5.2.2) (d3 ) > (d1 ) ≥ (d2 ). (5.2.3) Then deg[p, v1 , v2 ] > max(d3 , d2 ), and if [p0 ] is a proper rooted subpath of [p], then deg[p, v1 , v2 ] > deg[p0 , v1 , v2 ]. Proof. We will prove the result by induction. First, mutating at vertex v2 , we obtain the degree subquiver (d02 ) (d3 ) 2 2 , (d1 ) where (d02 ) ≥ 2(d1 ) − (d2 ) > (d1 ). Mutating next at v1 we obtain 3 (d3 ) (d02 ) 2 2 , (d01 ) where (d01 ) ≥ 2(d02 )−(d1 ) > (d02 )+(d1 )−(d1 ) = (d02 ) and (d01 ) ≥ 2(d3 )−(d1 ) > (d3 ). For the induction step, let [q] be a proper rooted subpath of [p] and suppose the result is true for [q]. Up to isomorphism, our degree subquiver is then c (e3 ) (e2 ) b a , (5.2.4) (e1 ) where, depending on whether the last mutation of [q] is v1 , v2 or v3 , we have either (e1 ) > (e2 ), (e3 ), (5.2.5) (e2 ) > (e1 ), (e3 ), or (5.2.6) (e3 ) > (e1 ), (e2 ), (5.2.7) respectively, and where a, b, c ≥ 2 by Proposition 5.1.1. Let [q̂] be the rooted subpath of [p] of length m := l([q]) + 1. We wish to show that mutation in the 68 direction of q̂m results in a degree larger than each (ei ), and another degree quiver of the form (5.2.4) satisfying one of (5.2.5) – (5.2.7). First we will write down what is obtained upon mutation of (5.2.4) in each direction. Direction v1 : ab − c (e2 ) (e3 ) c Direction v2 : (e3 ) c Direction v3 : (e03 ) a (e01 ) b (e02 ) ac − b (e2 ) b , where (e01 ) ≥ max(a(e2 ), b(e3 )) − (e1 ). (5.2.8) a , where (e02 ) ≥ max(a(e1 ), c(e3 )) − (e2 ). (5.2.9) (e1 ) bc − a , where (e03 ) ≥ max(c(e2 ), b(e1 )) − (e3 ). (5.2.10) (e1 ) In the degree subquivers above, all edge weights are again at least two, by Proposition 5.1.1. Now if q̂m is direction v1 , then the previous mutation direction was v2 or v3 , so that, by the induction hypothesis, either (e2 ) or (e3 ) is strictly greater than the other two degrees. Then max(a(e2 ), b(e3 )) − (e1 ) > max((e2 ), (e3 )) > (e1 ), since a, c ≥ 2, so (e01 ) > max((e2 ), (e3 )) > (e1 ). Similarly, if q̂m is direction v2 , we find (e02 ) ≥ max(a(e1 ), c(e3 )) − (e2 ) > max((e1 ), (e3 )) > (e2 ) and if q̂m is direction v3 then (e03 ) ≥ max(c(e2 ), b(e1 )) − (e3 ) > max((e1 ), (e2 )) > (e3 ). We can relax our assumptions and still obtain infinitely many degrees, though possibly without a strictly increasing sequence, and requiring a specific mutation path. Proposition 5.2.3. Let Q be a positive degree quiver which contains the degree subquiver (d2 )v2 2 R= (d3 )v3 , (5.2.11) (d1 )v1 where (di ) ≥ 1 for i = 1, 2, 3. Then deg[(v1 , v2 )n ] → ∞ as n → ∞ if (d1 ) ≥ (d2 ), deg[(v1 , v2 )n , v3 , v1 ] → ∞ as n → ∞ if (d2 ) > (d1 ). Proof. We will split our proof into three cases: (i) (d1 ) > (d2 ) 69 (ii) (d2 ) > (d1 ) (iii) (d1 ) = (d2 ) (i). Mutate R in direction v2 to obtain (d02 ) (d3 ) 2 2 , (d1 ) where (d02 ) ≥ 2(d1 ) − (d2 ) > (d1 ). Next mutate in direction v1 to obtain 3 (d3 ) (d02 ) 2 2 , (d01 ) where (d01 ) ≥ 2(d02 ) − (d1 ) > (d02 ). The result is now easy to see by induction. Notice in this case that we did not need any assumptions about any edge weights or directions other than |wQ (v1 , v2 )|, which is always 2 under this mutation path. However, we already know that our quiver will remain cyclic by Corollary 5.1.2 (so that there will always be exactly one incoming and one outgoing weighted arrow adjacent to the vertex we are mutating at), and this means we do not even need to assume that (d3 ) ≥ 0; we can always use the weight 2 arrow between v1 and v2 to get a lower bound on the degree we will next obtain. (ii). Mutate R in direction v1 to obtain (d2 ) 2 , (d01 ) (d3 ) where (d01 ) ≥ 2(d2 ) − (d1 ) > (d2 ). Next mutate in direction v3 to obtain (d2 ) (d03 ) 2 . (d01 ) This subquiver is Rop , but now satisfying case (i), so we are done. (iii). As we alternate mutations between vertices v2 and v1 , the weight of the edge between v3 and v2 increases by one each time. Now, suppose after n mutations that we have not obtained a new degree, that is, we have obtained the degree (d1 ) = (d2 ) again after each mutation. Then the next time we mutate at vertex v2 , we obtain the lower bound m(d3 ) − (d2 ) for the new degree, where m is the edge weight between v3 and v2 in the current degree subquiver. As we continue 70 to mutate, we must either eventually obtain a new degree which is strictly greater than (d1 ) (we always obtain one that is at least as great), or otherwise the value of m will eventually grow large enough that m(d3 ) − (d2 ) > (d1 ), since in this case (d3 ) ≥ 1. Once this occurs, we may proceed in a similar way to the previous cases. Corollary 5.2.4. Suppose that A is a graded cluster algebra generated by the initial quiver Q and that Q contains a subquiver R satisfying the conditions of Proposition 5.2.2 or Proposition 5.2.3. Then A contains cluster variables of infinitely many different degrees. Remark 5.2.5. Of course, if we mutate a degree subquiver satisfying the hypothesis of Proposition 5.2.2 or of Proposition 5.2.3, we obtain another degree subquiver whose presence is an equivalent condition for showing that a cluster algebra has variables of infinitely many degrees. So Corollary 5.2.4 still holds if we replace Q by a quiver mutation equivalent to it. Remark 5.2.6. It may well be possible to further relax the assumptions in Proposition 5.2.3 and still retain the infinitely many degrees property. In some situations, we may not even need the quiver Q to be positive outside of the subquiver R. Having weaker assumptions here would make it more likely that we could read off from a given degree quiver that the associated graded cluster algebra has infinitely many degrees, and so this line of enquiry may be a good candidate for further research. Finally, we give a sufficient condition for a graded cluster algebra to have all positive degrees, based on the presence of a degree subquiver. As with Proposition 5.2.3, this will be applied in Chapter 6. Notation 5.2.7. Consider the three cyclic subquivers 2 v1 k+1 v 2 v1 k v v2 , (5.2.12) , (5.2.13) , (5.2.14) k v2 k+1 and v1 2 v 71 v2 where k ≥ 0. Given a quiver Q, we will use the notation 2 v1 v2 , (5.2.15) w W ∗ to mean that for each vertex v ∈ Q that shares a (non-zero) arrow with either v1 or v2 , the triangular subquiver formed by the three vertices is of the form (5.2.12) or (5.2.14) (where k is allowed to be different for each v). So for each such triangular subquiver, either W = w + 1, or W = w = 1. Similarly, we will use 2 v1 v2 w , (5.2.16) W ∗ to mean that for each vertex v that shares an arrow with v1 or v2 , the triangular subquiver formed by the three vertices is of the form (5.2.13) or (5.2.14). When we refer to (5.2.15) or (5.2.16) as being a subquiver of Q, we will mean the subquiver containing the vertices v1 and v2 along with all other vertices that share a (non-zero) arrow with v1 or v2 (and by referring to such a subquiver, we will mean that Q has the corresponding property specified above). Note that mutating (5.2.12) at v1 yields a subquiver of the form (5.2.13) with k increased by 1, mutating (5.2.13) at v2 yields a subquiver of the form (5.2.12) with k increased by 1, and mutating (5.2.14) at either v1 or v2 does not change its form (aside from reversing arrows). Hence, mutating the subquiver (5.2.15) at v1 gives a subquiver of the form (5.2.16), and mutating the subquiver (5.2.16) at v2 gives a subquiver of the form (5.2.15). So [v2 , v1 ] applied to a subquiver of the form (5.2.15) is still of the form (5.2.15), and similarly for [v1 , v2 ] applied to a quiver of the form (5.2.16). Lemma 5.2.8. Suppose Q is a degree quiver with the subquiver 0 Q = (d1 )v1 w 2 ∗ (d2 )v2 . (5.2.17) W Then mutation along the path [(v1 , v2 )n ] yields the degree (d1 − d2 )n + d1 . 72 (5.2.18) Similarly, mutation of 0 Q = (d1 )v1 W 2 ∗ (d2 )v2 , (5.2.19) w along [(v2 , v1 )n ] yields degree (d2 − d1 )n + d2 . (5.2.20) Proof. It is clear that the result is true for n = 1 and n = 2. Suppose the result is true for n and assume without loss n is even (which we may do by the comments in the paragraph below Notation 5.2.7). Then the degree quiver is of the form ([d1 − d2 ]n + d1 ) 2 ([d1 − d2 ](n − 1) + d1 ) w W ∗ and our next mutation is at v2 . Carrying out this mutation, we obtain degree 2[(d1 − d2 )n + d1 ] − [(d1 − d2 )(n − 1) + d1 ] = (d1 − d2 )(n + 1) + d1 , from which the result follows by induction. The result for [(v2 , v1 )n ] is immediate from this, as the direction of the weight 2 arrow does not matter. 5.3 New degree quivers from old In the sections above we saw how the presence of a degree subquiver gave us information about cluster algebras arising from larger quivers containing the subquiver. A natural question that arises is whether, in general, understanding properties of rank n graded cluster algebras can be reduced to understanding properties of lower rank cluster algebras. More precisely, we might ask the following: Question 5.3.1. Let R be a degree quiver and consider the graded cluster algebra A(R) it gives rise to. Suppose Q is a degree quiver that contains R as a subquiver. Which properties of the graded cluster algebra A(R) are inherited by A(Q)? For instance, if A(R) has infinitely many variables of each occurring degree, must A(Q) have a corresponding set of degrees each associated with infinitely many variables? If, rather than containing R as a subquiver, Q can be constructed from a combination of smaller degree quivers in some way, which properties of these smaller quivers are inherited by A(Q)? 73 Progress in this direction would greatly increase our understanding of gradings in general, though establishing an answer to the question does not appear to be easy. While we don’t attempt to tackle this here, we do note an interesting property about degree quivers: that they can often be broken down into sums of smaller degree quivers. Definition 5.3.2. Let Q and R be degree quivers and let Q0 and R0 be the sets of vertices of Q and R, respectively. Let M be a subset of Q0 × R0 , whose elements will be called matches, such that for each match (v, ω) ∈ M , we have that deg(v) = deg(ω) and also that there is no other match involving either v or ω in M . We will call the vertices that do not appear in any match in M unmatched. Denote the unmatched vertices of Q and R by UQ and UR , respectively. We define Q +M R to be the quiver obtained from Q and R as follows: (1) For each match (v, ω) ∈ M , create a new vertex mvω (in other words, identify vertex v in Q with vertex ω in R). Then define the set of vertices of Q +M R to be UQ t UR t {mvω |(v, ω) ∈ M }. (2) For each pair of vertices mv1 ω1 and mv2 ω2 , create an arrow from mv1 ω1 to mv2 ω2 of weight wQ (v1 , v2 ) + wR (ω1 , ω2 ) (with a negatively weighted arrow in one direction meaning a positively weighted arrow in the opposite direction, as usual). For each pair of unmatched vertices u1 and u2 , if both come from the same original quiver, set the weight of the arrow from u1 to u2 to its original value, w(u1 , u2 ), and if both come from different quivers, do not create an arrow between them. Proposition 5.3.3. Let Q and R be degree quivers. Then Q +M R is also a degree quiver. Proof. Let t be a vertex in Q +M R. We just need to check that t is balanced, that is, satisfies Equation 2.3.1. If t is an unmatched vertex then it is clearly balanced since it was in its original quiver. Suppose t = mvω for some match (v, ω) ∈ M . Then the weight into mvω is w→ (v) + w→ (ω) while the weight out of mvω is w← (v) + w← (ω). Since w→ (v) = w← (v) and w→ (ω) = w← (ω), we have w→ (mvω ) = w← (mvω ), so t is balanced. 74 Example 5.3.4. Let 4 Q= (3)v2 (5)v1 3 (3)ω2 5 5 (4)ω3 , R= 5 (4)v3 3 (4)ω1 3 (5)ω4 and M = {(v3 , ω1 ), (v2 , ω2 )}. Then 5 (3)mv2 ω2 (4)ω3 4 Q +M R = (5)v1 10 3 3 (4)mv3 ω1 3 (5)ω4 is a degree quiver. The vertex mv2 ω2 is balanced since w→ (mv2 ω2 ) = 10 · 4 = 5 · 4 + 4 · 5 = w← (mv2 ω2 ). Similarly, so is mv3 ω1 . Definition 5.3.5. We will call a degree quiver S irreducible if there are no degree quivers Q and R with Q0 ( S0 and R0 ( S0 such that S = Q +M R for some M , where Q0 , R0 and S0 denote the sets of vertices of Q, R and S, respectively. Example 5.3.6. The degree quiver Q in Example 5.3.4 is irreducible as any degree quiver that is an appropriate potential summand of Q must have two vertices, but any degree quiver with two vertices must assign all vertices degree 0 in order to be balanced. On the other hand, the degree quiver R in Example 5.3.4 is not irreducible since (3)ω2 5 R= 5 (4)ω3 3 (3)v2 5 (3)v2 4 = 5 +M 4 (4)ω1 3 (5)ω4 (4)v3 3 (5)v1 (4)v3 3 , (5)v1 where M = {(v1 , v1 ), (v2 , v2 )}. Thus R = Q +M Qop . For degree quivers S that are not irreducible, it might be hoped that if S = Q +M R, then S[p] = Q[p] +M R[p] , 75 (5.3.1) but this turns out not to be the case. However, as we see in the examples below, there are some restricted settings in which information about A(S) can obviously be obtained from information about A(Q) and A(R). It is possible that progress towards Question 5.3.1 could involve attempting to expand these restricted settings or attempting to find the correct relationship, similar to Equation 5.3.1, between degree quivers and their summands. Example 5.3.7. Let Q be any degree quiver with a vertex ω with deg(ω) = 2 and let 2 R= (2)v2 (2)v1 2 2 . (2)v3 So R is the quiver of Markov type—recall from Chapter 4 that the associated graded cluster algebra has infinitely many variables, all of degree 2. It is easy to show that the mutation path [(v2 , v1 )r ] gives infinitely many variables of degree 2 in A(R). Let M = {(ω, v3 )}. Then the graded cluster algebra A(Q +M R) must also have infinitely many variables of degree 2. This is since, when mutating along [(v2 , v1 )r ] in Q +M R, the subquiver corresponding to Q cannot change in any way (as we would need to mutate at the vertex (ω, v3 ) in order to affect Q), while the variables we obtain are essentially the same as those obtained under the same mutation in A(R), and of the same degree. Example 5.3.8. For another example, let A =  0 a −c −a 0 b c −b 0  with a ≥ b ≥ c ≥ 3. Then, as it is mutation-infinite, A gives rise to a cluster algebra with infinitely many degrees by Corollary 4.1.7. Let us show that infinitely many degrees can produced by alternately mutating between only two particular directions. Denote (k) A[(1,2)k ] by A(k) and denote the (i, j) entry of A(k) by Aij . We will show that the sequence (0) (0) (1) (1) |A32 |, |A31 |, |A32 |, |A31 |, . . . (5.3.2) is strictly increasing (excluding first term if a = b). Mutating A along the  0 a cthe 0  (1) path [1, 2] gives A = −a0 00 −b0 , where c0 = c − ab and b0 = b + ac0 . Since −c b 0 a ≥ b ≥ c ≥ 3, c0 is negative. We have b+c0 < 0 since c0 = c−ab = (c−b)−(a−1)b. Then b0 = b + ac0 = b + c0 + (a − 1)c0 < (a − 1)c0 < c0 . So b0 and c0 are both  0 negative  a c00 0 0 (1) (2) 00 −a 0 −b and |b | > |c |. Mutating A along [1, 2] again we obtain A = , 00 00 −c b 0 where b00 and c00 satisfy the same respective relations as b0 and c0 . From this, (5.3.2) now holds by induction. Thus, by Lemma 4.1.6, we obtain an infinite increasing sequence of degrees by alternately mutating in directions 2 and 1. 76 Suppose R is the quiver associated to A (and label it such that v3 does not correspond to one of the alternating directions). Let Q be any degree quiver with a vertex ω satisfying deg(ω) = deg(v3 ) and let M = {(ω, v3 )}. Then A(Q +M R) must also have infinitely many degrees. In other words, attaching R to another quiver by vertex v3 endows the arising cluster algebra with infinitely many degrees. For example, we can take R= 5 (3)v2 (4)v1 3 4 , (5)v3 for which the two alternating vertices to mutate at are v2 and v1 . 77 Chapter 6 Gradings on cluster algebra structure for coordinate algebras of matrices and Grassmannians In this chapter we consider gradings on cluster algebra structures for coordinate algebras of matrices and Grassmannians and prove that, for the infinite type cases, they contain variables of infinitely many different degrees. We also prove that all positive degrees occur in these cluster algebras. While we only deal with the classical cluster algebra structures here, any results about gradings on their quantum analogues are also determined by the classical case. This follows from [4, Theorem 6.1] and [17, Remark 3.6]. At various points we use some fairly long mutation paths to prove certain results. Given such paths, it is not difficult to prove these results by hand, but the reader may wonder how such paths were found. So it is worth mentioning that specific code was written to help discover some of these paths, or other patterns that led to them. As noted previously, this code is available with the electronic version of the thesis. 6.1 Graded cluster algebra structure for matrices Definition 6.1.1. Let M (k, l) be the set of k ×l matrices. The coordinate algebra of the k × l matrices is O(M (k, l)) = C[xi,j ], for 1 ≤ i ≤ k, 1 ≤ j ≤ l, where xij is the coordinate function M (k, l) → C given by A 7→ aij .  O(M (k, l)) has the structure of a cluster algebra, A O(M (k, l)) , as follows. 78   For row set I and column set J with |I| = |J|, let minor of the matrix J I denote the corresponding   x11 x12 . . . x1l  . .. ..  ..  .. . . .   . xk1 xk2 . . . xkl For 1 ≤ r ≤ k and 1 ≤ s ≤ l, define the sets R(r, s) = {k − r + 1, k − r + 2, . . . , k − r + s} ∩ {1, . . . , k}, C(r, s) = {l − s + 1, l − s + 2, . . . , l − s + r} ∩ {1, . . . , l}. (6.1.1) (6.1.2) For a cluster algebra of this cardinality, it is more efficient to define the initial seed using a quiver. We show the initial quiver for M (4, 4) (which we will denote by QM (4,4) ) in Figure 6.1 below. This generalises to M (k, l) by replacing the 4 × 4 grid by a k × l grid of the same form, again with only the bottom and rightmost vertices frozen (see also [17, p. 715]). The initial cluster is given by defining the entry  of the cluster corresponding to the vertex in position (i, j) to be equal to C(i, j) . The initial grading vector is then given by assigning the vertex in the R(i, j) (i, j) position degree min(i, j). It is easy to check that this definition gives a valid degree quiver. Moreover, since O(M (k, l)) is an N-graded algebra ([17, p. 716]) we have that the corresponding cluster algebra is also N-graded (as, similarly, is the cluster algebra corresponding to O(Gr(k, k + l)) which we will introduce in Section 6.4). For a justification that this initial structure gives rise to a cluster algebra that agrees with the coordinate ring of (quantum) matrices, see [14, Corollary 12.10] or [17]. 6.2 Infinitely many degrees We first consider the case for when k ≥ 4 and l ≥ 4. Without loss of generality, we may consider the smallest such case: M (4, 4). We prove our result by considering a certain subquiver of QM (4,4) . Larger cases will always contain the same subquiver, and it is thus possible to show they also contain infinitely many degrees in exactly the same way. The initial exchange quiver, QM (4,4) , is given below. (Recall that we denote frozen vertices by placing a square around them.) 79 1 2 3 16 4 5 6 15 7 8 9 14 10 11 12 13 Figure 6.1: Initial quiver for M (4, 4). Lemma 6.2.1. The graded cluster algebra structure for O(M (4, 4)) has variables in infinitely many degrees. Proof. We will show that the mutation sequence [4, 8, 2, 9, 5, 6, 1, 5, 2] transforms Q into a quiver to which we can apply Proposition 5.2.3. Note that embedding the same sequence into larger initial quivers (we can embed the subquiver in Figure 6.2 at the bottom left of the larger quiver) allows us to immediately generalise any results to O(M (k, l)) for k, l ≥ 4. (Of course, using the exact same mutation sequence as above would not work in general, since the vertices of the corresponding subquiver are relabelled when embedded in a larger initial quiver, but it is clear how to adjust the mutation path to compensate for this.) Consider the following subquiver of Q(M (4, 4)). 1 2 4 5 6 8 9 11 Figure 6.2: Subquiver of Q(M (4, 4)). We now perform the sequence of mutations to this subquiver, as shown in the following diagram. After a mutation, we will often no longer be interested in the 80 mutated vertex, and if so we will remove it from our mutated subquiver. 1 2 4 5 6 1 2 4 5 6 2 2 4 5 6 8 9 5 −→ 8 1 −→ 9 8 11 9 11 11 2 4 2 5 4 6 1 5 6 −→ 5 −→ 8 −→ 9 8 11 9 11 2 2 4 4 4 9 2 −→ 8 −→ 9 8 8 9 8 −→ 9 11 11 11 9 11 9 2 4 4 −→ 11 2 4 . Direct computation shows that this last subquiver corresponds to the degree subquiver (5)9 (2)11 2 . (9)4 Since 9 ≥ 5, we can now apply Proposition 5.2.3, noting that the frozen vertex 11 is not part of the mutation path stipulated by the proposition. Corollary 6.2.2. For k ≥ 4 and l ≥ 4, the graded cluster algebra structure for M (k, l) has variables in infinitely many degrees. The other infinite type cases that are not covered by the above are M (3, 6) and M (6, 3). Note that QM (3,6) ∼ = QM (6,3) , so we only need to consider QM (3,6) . For this, we can start with the subquiver 81 1 2 6 7 3 4 9 10 11 and perform the mutation path [2, 4, 3, 7, 10, 6, 1, 2, 7, 6, 9, 3] to obtain a quiver con6 2 taining the subquiver 11 (this time we do not write down all the in4 (4)6 2 termediate computations). The corresponding degree quiver is (1)11 , (10)4 which satisfies Proposition 5.2.3. We again note that vertex 11 is not part of the stipulated mutation path. We have now established the following. Proposition 6.2.3. If the graded cluster algebra associated to O(M (k, l)) is of infinite type, it has cluster variables of infinitely many different degrees. 6.3 Occurring degrees A natural question to ask is whether variables of all positive degrees exist in the graded cluster algebra associated to O(M (k, l)). We will prove that this is indeed the case for O(M (4, 4)) and O(M (3, 6)), which, as before, also proves the result for all larger cases and therefore all infinite type cases.  Lemma 6.3.1. A O(M (4, 4)) has cluster variables of each degree in N. Proof. We show this by writing down certain mutation sequences that result in degree subquivers of the form of (5.2.19). It turns out in this case that these will yield sequences of degrees increasing by 4 at each mutation. The initial quiver mutated by the path [6, 4, 8, 9, 1, 4, 2, 6] has the subquiver and degree subquiver 4 W 2 6 (8) and w W ∗ 2 ∗ (12) , so we have variables w in all degrees of the form 4k for k ≥ 2 by Lemma 5.2.8. The path [4, 6, 8, 9, 1, 4, 2, 6] gives the subquiver and degree subquiver 2 4 w ∗ 82 6 W and (10) w 2 ∗ (6) , so we have variables in all degrees of the form 4k + 2 for W k ≥ 1. Next, [1, 2, 4, 8, 6, 9, 1] gives the subquiver and degree subquiver 2 1 w ∗ and (9) w 2 ∗ (5) 9 W , which leads to variables in all degrees of the form 4k + 1 W for k ≥ 1. 2 1 Finally, [1, 9, 1, 8, 6, 1, 2, 6, 4, 8] gives w ∗ 9 and (11) W w 2 ∗ (7) W which leads to variables in all degrees of the form 4k + 3 for k ≥ 1. The initial cluster contains variables of degrees 1, 2 and 3, and it is easy to find a mutation path that yields a variable of degree 4. (For example, deg[6] = 4.) This covers all positive degrees. Remark 6.3.2. In lifting the result of Lemma 6.3.1 to larger cases, we should check that the subquiver (corresponding to QM (4,4) ) that we deal with will not interact with the rest of the quiver it is embedded in. In fact it is easy to see that if mutation of QM (k,l) is restricted to the vertices at (i, j) within the rectangle 1 ≤ i ≤ k, 1 ≤ j ≤ l, then there can be no arrow created between one of these vertices and a vertex in position (i0 , j 0 ) where i0 ≥ k + 2 or j 0 ≥ l + 2. So since vertices we mutate at in QM (4,4) satisfy 1 ≤ i, j ≤ 3 (and since this time, rather than embedding the pattern in the bottom left, we will keep vertices corresponding to the above mutation paths where they are in any larger initial quivers), we do not need to worry about vertices outside the leftmost 4 × 4 square in larger cases.  Lemma 6.3.3. A O(M (3, 6)) has cluster variables of each degree in N. Proof. In this case, we find sequences of degrees increasing by 6 at each mutation. We might expect that the sequences in this case will increase by a larger amount than in O(M (4, 4)) because having so few vertices in which to mutate means achieving a double arrow is not possible in as few mutations as previously, which in turn means degrees have longer to grow along the way. The proof is essentially the same as for O(M (4, 4)) so we will summarise it in Table 6.1 below. This leaves degrees 1, 2, 3, 4, 6 and 7 to consider, but all these degrees are contained in cl[10, 12, 4, 7, 10, 5, 8, 1, 4, 9, 4], for example. 83 Path [9, 7, 5, 2, 10, 9, 5, 8, 1, 4, 9] Quiver 2 7 W [10, 2, 4, 7, 10, 5, 8, 1, 4, 9, 4] 10 w [8, 3, 5, 2, 6, 9, 8, 9, 3, 4, 7] ∗ 2 8 w [10, 9, 2, 7, 1, 5, 9, 10, 4, 8, 9] 10 ∗ 2 w [10, 7, 9, 7, 2, 9, 8, 4, 9, 1, 5] 10 ∗ 2 w ∗ (12) W ∗ 2 ∗ 2 7 9 w w [7, 9, 5, 2, 10, 9, 5, 8, 1, 4, 9] Degree Quiver 2 (19) w W 9 (14) w W 3 w W 9 (16) w W 7 W (15) (11) w 2 ∗ 2 ∗ 2 ∗ 2 ∗ 2 ∗ 2 ∗ (18) Degrees 6k, k ≥ 2 w (13) 6k + 1, k ≥ 2 W (8) 6k + 2, k ≥ 1 W (9) 6k + 3, k ≥ 1 W (10) 6k + 4, k ≥ 1 W (5) 6k + 5, k ≥ 0 W Table 6.1: Mutation paths leading to all degrees for M (3, 6) Corollary 6.3.4. If the graded cluster algebra associated to O(M (k, l)) is of infinite type, it has cluster variables of each degree in N. 6.4 Corollaries for Grassmannians Definition 6.4.1. The Grasmmannian Gr(k, k + l) is the set of k-dimensional subspaces of a (k + l)-dimensional vector space V over C. After fixing a basis for V , such a subspace can be described by a k × (k + l) matrix whose rows are linearly independent vectors forming a basis of the subspace. Let I be a subset of {1, . . . , (k + l)} such that |I| = k. The Plücker coordinate xI is the function that maps a k × (k + l) matrix to its minor indexed by I. The coordinate ring O(Gr(k, k + l)) is isomorphic to the subalgebra of O(M (k, k + l)) generated by the Plücker coordinates. The Grasmannian coordinate ring O(Gr(k, k +l)) has the structure of a graded cluster algebra as follows. For the initial exchange quiver, we take the same quiver 84 as for O(M (k, l)), but add a frozen vertex with a single arrow to the vertex at position (1, 1). We then assign all vertices degree 1. By results of [17], this quiver gives rise to a cluster algebra for O(Gr(k, k + l)). While an explicit expression for the initial cluster variables is not given in [17], one can be obtained by tracing through the construction therein. References [15] and [27] give more explicit initial clusters but with different quivers. Since we do not need to know the cluster variables explicitly, we do not concern ourselves unduly with this. Again, it is easy to check that the degree quiver is valid. For further background on how the associated cluster algebra has the desired structure, see [27] (for the classical case), [17] (for the quantum case) or [15]. In terms of proving the existence of infinitely many degrees, the corresponding results for O(Gr(k, k + l)) will immediately follow from the matrix algebra case. Since the grading on O(Gr(k, k +l)) is an N-grading, and since the initial exchange quiver is the same as that for O(M (k, l)) but for an added frozen vertex, the same mutation sequences as in the matrix case will yield quivers which have the same subquivers as above, to which we can again apply Proposition 5.2.3. Thus we have: Proposition 6.4.2. If the graded cluster algebra associated to O(Gr(k, k + l)) is of infinite type, it has cluster variables of infinitely many different degrees. We also have variables in each degree and prove this in a very similar way as for the matrix case.  Lemma 6.4.3. A O(Gr(4, 8)) has cluster variables of each degree in N. Proof. In this case we find paths that give degree sequences increasing by 2 with each mutation. Applying [9, 1, 2, 4, 8, 6, 9, 1] gives the subquiver and degree subquiver 2 9 w ∗ 1 and 2 (6) W w ∗ (4) , so by Lemma 5.2.8 we have W variables in all degrees of the form 2k for k ≥ 2. The path [4, 6, 8, 9, 1, 4, 2, 6] gives the subquiver and degree subquiver 2 4 w ∗ 6 and W (5) w 2 ∗ (3) , so W we have variables in all degrees of the form 2k + 1 for k ≥ 1. This only leaves degree 2, which is easy to find. For example, var[6] = 2.  Lemma 6.4.4. A O(Gr(3, 9)) has cluster variables of each degree in N. Proof. As in the previous section, the degree sequences for this case increase by a larger amount than for the matrix case. We summarise three paths which work in Table 6.2 below. 85 Path [10, 7, 9, 7, 2, 9, 8, 4, 9, 1, 5] Quiver 10 2 7 w [7, 4, 3, 1, 4, 9, 10, 6, 2, 9, 3] W [10, 9, 2, 7, 1, 5, 9, 10, 4, 8, 9] 10 7 w ∗ 2 W ∗ (4) W 9 w (6) w W ∗ 2 4 Degree Quiver (8) w 2 ∗ 2 ∗ 2 ∗ Degrees (3) 3k, k ≥ 1 W (7) 3k + 1, k ≥ 1 w (5) 3k + 2, k ≥ 1 W Table 6.2: Mutation paths leading to all degrees for Gr(3, 9) This leaves degrees 1 and 2 which are found in cl[7], for example. Corollary 6.4.5. If the graded cluster algebra associated to O(Gr(k, k + l)) is of infinite type, it has cluster variables of each degree in N. 86 Chapter 7 Gradings for finite mutation type quivers not arising from surface triangulations Quivers of finite mutation type (i.e. ones whose associated matrices are mutationfinite) are known to fall into one of two cases: adjacency matrices of triangulations of two-dimensional marked surfaces, and a finite collection of quivers that do not correspond to triangulations of surfaces. More precisely, we have the following: Theorem 7.0.1 ([9, Theorem 6.1]). A rank n quiver (n ≥ 3) of finite mutation type either corresponds to an adjacency matrix of a triangulation of a bordered two-dimensional surface or is mutation equivalent to one of the following quivers: e6 , E e7 , E e8 , E6(1,1) , E7(1,1) , E8(1,1) , X6 and X7 . E6 , E7 , E8 , E In this chapter we will investigate the latter class. 7.1 Initial information about the finite list of quivers We will try to determine what can be said about the gradings on the cluster algebras associated to some of the quivers in this finite list; ultimately we will e6 , E e7 and E e8 in detail (though we give some additional information consider X7 , E (1,1) about E6 (1,1) , E7 (1,1) and E8 in Table 7.2). Note that the quivers E6 , E7 and E8 give rise to finite type cluster algebras and have been considered in [16]. Our approach will be to use computer-aided calculation to find the degree quiver class for each case, which will yield an exhaustive list of all occurring degrees, and then 87 to prove which degrees have infinitely many variables. To do this, we will find mutation paths that give rise to repeating degree quivers (up to sign), but which produce growing denominator vectors. We start by writing down initial grading bases for the quivers in the list that we have not considered in a previous chapter. e6 , E e7 , E e8 , E6(1,1) , E7(1,1) , E8(1,1) , X6 and Lemma 7.1.1. Initial grading bases for E X7 are given in Table 7.1. Quiver Grading 2 2 4 X6 = 1 2 3 5 {(0, 0, 0, 0, 0, 0)} 5 {(1, 1, 2, 1, 1, 1, 1)} 6 2 2 4 X7 = 1 2 3 7 6 2 7 e6 = E {(1, 0, 1, 0, 1, 0, 1)} 6 1 2 3 4 5 8 {(−1, 0, −1, 0, 1, 0, 1, 0), e7 = E 1 2 3 4 5 6 (−1, 0, −1, 0, 0, 0, 0, 1)} 7 9 {(0, 0, 0, −1, 0, −1, 0, −1, 1)} e8 = E 1 2 3 4 5 6 7 8 3 (1,1) E6 = 1 2 2 4 8 6 {(0, 0, 0, 0, 0, 0, 0, 0)} 7 5 3 (1,1) E7 = 9 1 2 {(0, 1, 0, −1, 0, 0, 0, 0, 1), 2 4 6 7 (0, 0, 1, 2, 1, 0, 0, 0, 0), 8 (0, 0, 0, −1, 0, 1, 0, 1, 0)} 5 3 (1,1) E8 = 1 {(0, 0, 1, 2, 1, 0, 0, 0, 0, 0), 2 2 4 6 7 8 5 Table 7.1 88 9 10 (0, 0, 0, −1, 0, 1, 0, 1, 0, 1)} Proof. This reduces to finding bases for the kernels of the skew-symmetric matrices corresponding to these quivers. (1,1) So we see that X6 and E6 only give rise to the zero grading. Next we wish to determine which degrees occur in the corresponding cluster algebras. We do so with a MAGMA algorithm (available in an accompanying file) which computes the mutation class of degree quivers as well as some other information, which we summarise in Proposition 7.1.2. Note that mutation and degree quiver class sizes are computed up to essential equivalence. In particular, this number will be smaller than that of the classes computed up to quiver isomorphism (as is done in the Java app of [22]) since not all quivers are isomorphic to their opposites whereas a quiver is always essentially equivalent to its opposite. e6 , E e7 , Proposition 7.1.2. We have the following for the quivers E6 , E7 , E8 , E e8 , E6(1,1) , E7(1,1) , E8(1,1) , X6 and X7 . E Quiver Mutation class Degree quivers class Occurring Degrees X6 3 3 {0} X7 2 2 {1, 2} e6 E 74 148 {0, ±1, ±2} e7 E 571 2297 {( 00 ) , ± ( 21 ) , ± ( 11 ) , ± ( 10 ) , ± ( 01 )} e8 E 7560 7634 {0, ±1, ±2} 26 26 (1,1) E6 {0} n    1 1 , ± −2 , ± −1 ,  0  1 1   1  1 1 1 ± −1 , ± −1 , ± 0 , ± −10 , 0     1  o 0 1 0 ± 1 ,± 0 ,± 0 0 0 0 (1,1) E7 279 13616 0 (1,1) E8 5739 ⊇ > 30000   0 1 ( 00 ) , ± ( 10 ) , ± ( 01 ) , ± ( 11 ) , ± ( −11 ) , ± ( −12 ) , ± ( −21 ) Table 7.2 We are now ready to investigate the question of variables per degree for these quivers. Although we are not able to answer this completely in every case, we may still determine part of the answer. 89 7.2 Grading for X7 In the case of X7 , whose grading behaviour is qualitatively different from that ei , we are able to determine all the information about the associated graded of E cluster algebra. To start, note that (X7 )[j] ≡ X7 for all j 6= 3. Lemma 7.2.1. dX7 [(2, 1)n ] = (n, n − 1, 0, 0, 0, 0, 0). 2 2 Proof. It is easy to show (X7 )[(2,1)n ] = 1 4 3 7 2 2 5 for odd n and 6 (X7 )[(2,1)n ] = X7 for even n. The claim is true for n = 1, 2, by direct computation. Assume true for n and suppose n is even. Then, since (X7 )[(2,1)n ] = X7 , we have dX7 [(2, 1)n+1 ] = dX7 [1, (2, 1)n/2 ] = − (n − 1, n − 2, 0, 0, 0, 0, 0) + max(2(n, n − 1, 0, 0, 0, 0, 0), (0, 0, −1, 0, 0, 0, 0)) = (n + 1, n, 0, 0, 0, 0, 0). (Recall max is taken componentwise as in Equation 2.4.2.) Now suppose n is odd. Then, using the quiver we wrote down above for odd n, we have dX7 [(2, 1)n+1 ] = dX7 [(2, 1)n/2+1 ] = − (n − 1, n − 2, 0, 0, 0, 0, 0) + max(2(n, n − 1, 0, 0, 0, 0, 0), (0, 0, −1, 0, 0, 0, 0)) = (n + 1, n, 0, 0, 0, 0, 0) again. This proves the result for all n. Corollary 7.2.2. A((1, 1, 2, 1, 1, 1, 1), X7 ) has infinitely many variables in degree 1. Proof. This follows since degX7 [(2, 1)n ] = 1, which is easy to show. Corollary 7.2.3. dX7 [5, 4, 3, (2, 1)n ] = (2n, 2(n − 1), 1, 1, 1, 0, 0). Proof. Assume n is even (the proof for n odd is very similar). By Lemma 7.2.1, the denominator cluster d. clX7 [(2, 1)n ] is then  (n − 1, n − 2, 0, 0, 0, 0, 0), (n, n − 1, 0, 0, 0, 0, 0), (0, 0, −1, 0, 0, 0, 0), . . . , (0, 0, 0, 0, 0, 0, −1) . 90 Mutating in direction 3 we get d[3, (2, 1)n ] = − d. cl[(2, 1)n ]|3  + max d. cl[(2, 1)n ]|1 + d. cl[(2, 1)n ]|4 + d. cl[(2, 1)n ]|6 ,  d. cl[(2, 1)n ]|2 + d. cl[(2, 1)n ]|5 + d. cl[(2, 1)n ]|7 = − d. cl[(2, 1)n ]|3 + d. cl[(2, 1)n ]|2 = − (0, 0, −1, 0, 0, 0, 0) + (n, n − 1, 0, 0, 0, 0, 0) = (n, n − 1, 1, 0, 0, 0, 0). We have 0 1 1 0 −1 0 −1  −1 0 −1 1 0 1 0  −10 −11 01 −10 11 −10 −11   1 0 −1 −1 0 1 0  0 −1 1 0 −1 0 1 1 0 −1 1 0 −1 0  (X7 )[3,(2,1)n ] = (we express this as a matrix as the quiver is not planar). So d[4, 3, (2, 1)n ] = − d. cl[3, (2, 1)n ]|4  + max d. cl[3, (2, 1)n ]|2 + d. cl[3, (2, 1)n ]|7 ,  d. cl[3, (2, 1)n ]|3 + d. cl[3, (2, 1)n ]|5 = − d. cl[3, (2, 1)n ]|4 + d. cl[3, (2, 1)n ]|3 = − (0, 0, 0, −1, 0, 0, 0) + (n, n − 1, 1, 0, 0, 0, 0) = (n, n − 1, 1, 1, 0, 0, 0). Next we have 0 1 1 0 −1 0 −1  −1 0 0 −1 1 1 0  −10 01 −10 01 −11 −10 10   1 −1 −1 1 0 1 −1  , 0 −1 1 0 −1 0 1 1 0 0 −1 1 −1 0  (X7 )[4,3,(2,1)n ] = so d[5, 4, 3, (2, 1)n ] = − d. cl[4, 3, (2, 1)n ]5  + max d. cl[4, 3, (2, 1)n ]2 + d. cl[4, 3, (2, 1)n ]3 + d. cl[4, 3, (2, 1)n ]7 ,  d. cl[4, 3, (2, 1)n ]1 + d. cl[4, 3, (2, 1)n ]4 + d. cl[4, 3, (2, 1)n ]6 = − (0, 0, 0, 0, −1, 0, 0)  + max (n, n − 1, 0, 0, 0, 0, 0) + (n, n − 1, 1, 0, 0, 0, 0),  (n − 1, n − 2, 0, 0, 0, 0, 0) + (n, n − 1, 1, 1, 0, 0, 0) = (0, 0, 0, 0, 1, 0, 0) + (2n, 2(n − 1), 1, 1, 0, 0, 0) = (2n, 2(n − 1), 1, 1, 1, 0, 0), 91 as required. (We omitted d. cl[4, 3, (2, 1)n ]6 and d. cl[4, 3, (2, 1)n ]7 in the second max above as they only have zero or negative entries.) Corollary 7.2.4. A((1, 1, 2, 1, 1, 1, 1), X7 ) has infinitely many variables in degree 2. Proof. This follows since degX7 [5, 4, 3, (2, 1)n ] = degX7 [5, 4, 3] = 2. Proposition 7.2.5. A((1, 1, 2, 1, 1, 1, 1), X7 ) has infinitely many variables of each occurring degree. Proof. This is immediate from the previous two Corollaries, since A((1, 1, 2, 1, 1, 1, 1), X7 ) only has variables in degrees 1 and 2, as noted in Table 7.1. 7.3 e6, E e7 and E e8 Gradings for E ei . For these cases, there are certain degrees which we expect Now let us consider E to correspond with only one variable, while other degrees have infinitely many variables. We are able to show that the latter is true, and we do so by finding a mutation path which gives us infinitely many examples. Such a path is comparable to the special path [(3, 2, 1)2n ] in Lemma 4.4.5. However, while there was only one minimal path of this kind in the cases in Chapter 3, we can find more than one in these examples, and it is not always the case that such a minimal path will always have length equal to the rank. Such paths are also usually much more difficult to find for these cases. All of these facts are due to the higher rank: for the rank 3 acyclic quivers, the floor of the exchange graph consists of repeating segments comprised of twodimensional polytopes along which the special path traverses. In higher ranks, we expect the floor to consist of polytopes whose dimension is close to the rank. Thus there may be many routes between one “segment” of the floor and another, but due to the size and complexity of the segments, finding paths that move between the initial vertex of each segment is more difficult. In general, little is known about the structure of the exchange graph of cluster algebras of rank greater than 3. The paths we provide below show that the exchange graph for these example does consist of repeating segments. We conjecture that, similar to the rank 3 mixed case (but in contrast to the rank 3 acyclic cases), these segments are bounded by hyperplanes (rather than being enclosed by a canopy of infinitely many trees whose vertices are forks). 92 e6 , E e7 and E e8 are all Remark 7.3.1. The graded cluster algebras arising from E balanced. This is by Lemma 4.1.9, since the corresponding quivers are acyclic. 7.3.1 e6 Grading for E e6 we will show that degrees 0 and ±1 have infinitely many different variables. In E We conjecture that degrees ±2 correspond to one variable each. Lemma 7.3.2. Let [p] = [3, 4, 6, 2, 1, 7, 5]. Then  e6 . deg . sdEe6 [pn ] = (−1)n (1, 0, 1, 0, 1, 0, 1), E e6 along [p] results in the the negative That is, mutating the initial degree seed of E of the initial degree seed again. Proof. Although it is straightforward, we will write out the computation for n = 1 since we will need to refer to the intermediate quivers involved again later. After this, the result is immediate. We have  deg . sdEe6 [5] = deg . sdEe6 [7, 5] = deg . sdEe6 [1, 7, 5] = deg . sdEe6 [2, 1, 7, 5] = deg . sdEe6 [6, 2, 1, 7, 5] = deg . sdEe6 [4, 6, 2, 1, 7, 5] =  0 −1  0  (1, 0, 1, 0, −1, 0, 1),  00 0 0  1 0 0 0 0 0 0 1 0 0 0 0 −1 0 −1 0 −1 0  0 1 0 1 0 0  , 0 0 −1 0 0 0 0 1 0 0 0 −1  0 0 10 00 00 01 0 0 0   −1 0 1 0 0 0 0  0 −1 0 −1 0 −1 0   0 1 0 0  , (1, 0, 1, 0, −1, 0, −1),  00 00 10 −1  0 0 0 0 0 1 0 0 0 1 0 0 0 0 −1 0  0 0 −1  0 0 0 0 0 1 0 1 0 0 0 0   0 −1 0 −1 0 −1 0  0 1 0 0  , (−1, 0, 1, 0, −1, 0, −1),  00 00 10 −1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 −1 0   0 1 0 0 0 0 0  −1 0 −1 0 0 0 0   0 1 0 −1 0 −1 0  0 1 0 0  , (−1, 0, 1, 0, −1, 0, −1),  00 00 10 −1 0 0 0 0 0 1 0 0 0 1   00 10 00 00 00 0−100  −1 0 −1 0 0 0 0   0 1 0 −1 0 1 0  0 1 0 0  , (−1, 0, 1, 0, −1, 0, −1),  00 00 10 −1 0 0 0 0 0 −1 0 0 0 −1   00 10 00 00 00 01 00  −1 0 −1 0 0 0 0 0 1 0 1 0    00 10 −1 0 0  , (−1, 0, 1, 0, −1, 0, −1),  0 0 0 10 −1 0 0 0 0 0 −1 0 0 0 −1 0 0 0 0 0 1 0   e deg . sdEe6 [3, 4, 6, 2, 1, 7, 5] = (−1, 0, −1, 0, −1, 0, −1), E6 , as required. 93 e6 . (We conjecture that this is a minimal Note that l([p]) is equal to the rank of E length path with the desired property.) We will soon require the use of floor and ceiling functions. Note the following identities involving these functions, which we will make frequent use of in this chapter. We have   n−1 = + 1, m m j n k n + 1 = − 1, m m lnm (or equivalently) and (7.3.1) (7.3.2)    n−1 n−m+1 + + ··· + , n= m m m lnm  (7.3.3) for any n, m ∈ N. (Equation 7.3.3 is given in [19, p. 85].) Lemma 7.3.3. Let [p] = [3, 4, 6, 2, 1, 7, 5]. Then, for n ≥ 1, j l 3n m jn − 1k j n − 1 k n − 1k n , n − 1, − 1, n − 1, , n − 1, . d. clEe6 [(p) ]|3 = 2 2 2 2 (7.3.4) Proof. We refer to the matrices in Lemma 7.3.2 throughout. As a base case, we have that d. clEe6 [p]|3 = h0, 0, 1, 0, 0, 0, 0i . Assume the claim is true for n. Then: j k j k l m n−1 n−1 • d[5, (p)n ]|3 = − n−1 + max (n − 1, 0) = n − 1 − = , 2 2 Dj k l m l m 2 j kE n−1 3n n−1 n−1 n so d. clEe6 [5, (p) ]|3 = , n − 1, 2 − 1 , n − 1, 2 , n − 1, 2 . 2 j k j k l m n−1 n−1 • d[7, 5, (p)n ]|3 = − n−1 + max (n − 1, 0) = n − 1 − = , 2 2 Dj k l m l2 m l mE n−1 3n n−1 n−1 so d. cl [7, 5, (p)n ]|3 = , n − 1, − 1 , n − 1, , n − 1, . 2 2 2 2 k l m j n−1 • d[1, 7, 5, (p)n ]|3 = − n−1 + max (n − 1, 0) = , 2 Dl m l m2 l m l mE 3n n−1 n−1 n−1 n so d. cl [1, 7, 5, (p) ]|3 = , n − 1, 2 − 1 , n − 1, 2 , n − 1, 2 . 2 l m l m  n−1 • d[2, 1, 7, 5, (p)n ]|3 = −(n − 1) + max 3n + − 1, 0 2 2 l m l m = 3n + n−1 − (n − 1) − 1 = n, 2 Dl 2 m l m l m l mE n−1 3n n−1 n−1 n so d. cl [2, 1, 7, 5, (p) ]|3 = , n, 2 − 1 , n − 1, 2 , n − 1, 2 . 2 l m  + − 1, 0 = n, m l m l mE n−1 , n, . − 1 , n − 1, n−1 2 2 3n 2 n • d[6, 2, 1, 7, 5, (p) ]|3 = −(n − 1) + max Dl m l n−1 so d. cl [6, 2, 1, 7, 5, (p)n ]|3 = , n, 3n 2 2 l n−1 2 m m  l m l n−1 • d[4, 6, 2, 1, 7, 5, (p)n ]|3 = −(n − 1) + max 3n + − 1, 0 = n, Dl m l 2 m 2l m l mE n−1 3n n−1 n−1 n so d. cl [4, 6, 2, 1, 7, 5, (p) ]|3 = , n, 2 − 1 , n, 2 , n, 2 . 2 94 Finally  3n m d[p ]|3 = − − 1 + max (n + n + n, 0) 2 l 3n m l 3n m l 3n − 1 m l 3n m l 3(n + 1) m = 3n − +1= + − +1= − 1, 2 2 2 2 2 n+1 l where we have used the identity (7.3.3) with m = 2. So l l n − 1 m l n − 1 m n − 1 m l 3(n + 1) m n+1 d. cl [p ]|3 = , n, − 1, n, , n, 2 2 2 2  j k l m j k j k 3(n + 1) n n n , n, − 1, n, , n, . = 2 2 2 2 Thus the result is also true for n + 1. Therefore the claim is proved. f6 ) has infinitely many variables of deProposition 7.3.4. A((1, 0, 1, 0, 1, 0, 1), E gree 0 and ±1. Proof. By the proof of Lemma 7.3.2 we see that repeating the path [p] gives infinitely many variables of degree m, where m ∈ {0, ±1}. By Lemma 7.3.3 we have that infinitely many of these paths must result in different variables as their denominator vectors are different.  e6 has only one variable in degree 2 and Conjecture 7.3.5. A (1, 0, 1, 0, 1, 0, 1), E one variable in degree −2. This statement may be compared with the analogous result for  0 2 −1 −2 0 1 1 −1 0  in Proposition 4.2.3. There, it was not difficult to establish the structure of the exchange graph, and its form was simple enough that we could deduce our result using the relevant set of recurrence relations. In this case, the higher rank makes it much more difficult to attempt the same method, but we still expect the result will hold. Computer aided calculation gives some further confidence in our conjecture: after computing thousands of different mutation paths that result in degree 2 and −2, only one variable was found in each degree. Similar considerations also apply to Conjecture 7.3.9 and Conjecture 7.3.13, which we will make later in the chapter. 7.3.2 e7 Grading for E e7 . This has a 2-dimensional grading under which we will Let us now consider E show that the degrees ( 00 ), ± ( 11 ), ± ( 10 ) and ± ( 01 ) all contain infinitely many variables. We conjecture that the degrees ± ( 21 ) correspond to only one variable each. 95 Lemma 7.3.6. Let [p] = [7, 1, 6, 2, 5, 8, 3, 4]. Then deg . sdEe7 [pn ] = (−1)n −1 −1  , ( 00 ) , −1 −1    e7 . , ( 00 ) , ( 10 ) , ( 00 ) , ( 10 ) , ( 01 ) , E e7 along [p] results in the negation of That is, mutating the initial degree seed of E the initial degree seed. Proof. See Proof A.0.1 of the appendix for the proof, including the list of matrices obtained (which we will use again below). Lemma 7.3.7. Let [p] = [7, 1, 6, 2, 5, 8, 3, 4]. Then l m l m l m l 2n m l n m l 2n − 1 m n 2n 4n d. clEe7 [(p) ]|4 = , , n, − 1, n, , , . 3 3 3 3 3 3 n (7.3.5) Proof. The result is clearly true for n = 0 which provides a base case. Assume true for n. We refer to the matrices in Proof A.0.1 throughout. This time we will not write down the new denominator slice after each mutation. We have the following: n d[4, (p) ]|4 d[3, 4, (p)n ]|4 d[8, 3, 4, (p)n ]|4 d[5, 8, 3, 4, (p)n ]|4 d[2, 5, 8, 3, 4, (p)n ]|4 l m 4n   l 2n − 1 m  =− − 1 + max n + n + ,0 3 3 l 2n − 1 m l 4n m − +1 = 2n + 3 3 l 2n − 1 m l n m =n+ − + 1. 3  3  l 2n m l n + 1 m  = −n + max + n+ ,0 3 3 l 2n m l n + 1 m = + . 3 3  ln + 1m  l 2n − 1 m + max n + ,0 = 3 3 ln + 1m l 2n − 1 m =n −1 . 3 3  l n + 1 m l 2n m  = −n + max n+ + ,0 3 3 l n + 1 m l 2n m + . = 3 3 l 2n m l n m l 2n m l n + 1 m  =− + max + + ,0 3 3 3 3 ln + 1m lnm = + . 3 3 96 l l 2n m n  l m  n + 1 m l 2n m n + + ,0 3 3 3 + max d[6, 2, 5, 8, 3, 4, (p) ]|4 = − 3 ln + 1m lnm = + . 3 3 lnm l n + 1 m l n m  l n + 1 m n d[1, 6, 2, 5, 8, 3, 4, (p) ]|4 = − + max + ,0 = . 3 3 3 3 l   l lnm n + 1m lnm n + 1m n+1 + max + ,0 = . d[p ]|4 = − 3 3 3 3 So the new denominator slice, d. clEe7 [(p)n ]|4 , is * l n + 1 m l n + 1 m l n m l 2n m l n + 1 m l 2n − 1 m l n m , + , + ,n + − + 1, 3 3 3 3 3 3 3 + l n + 1 m l 2n m l n + 1 m l n m l n + 1 m l n + 1 m l 2n − 1 m + , + , ,n + − . 3 3 3 3 3 3 3 For the induction step, we need to check that (i) l (ii) l m n+1 3 2n 3 m + + l l m n 3 n+1 3 (iii) n + l 2n−1 3 (iv) n + l n+1 3 m m = m − − l 2(n+1) 3 m , = n + 1, l m l n 3 +1= 2n−1 3 m = l l 4(n+1) 3 m − 1, and m . 2(n+1)−1 3 This is straightforward. We write n = 3k + i, for some k ∈ N and some i ∈ {0, 1, 2} and split into cases based on n mod 3. We show the calculation for (i) and assert that the other cases are easily shown in a similar way. For n = 3k: l n + 1 m l n m l 3k + 1 m l 3k m l1m + = + =k+ + k = 2k + 1 3 3 3 3 3 l 2 m l 6k + 2 m l 2(n + 1) m = 2k + = = . 3 3 3 For n = 3k + 1: l n + 1 m l n m l 3k + 2 m l 3k + 1 m l 6k + 4 m l 2(n + 1) m + = + = 2k + 2 = = . 3 3 3 3 3 3 For n = 3k + 2: l n + 1 m l n m l 3k + 3 m l 3k + 2 m l 6k + 6 m l 2(n + 1) m + = + = 2k + 2 = = . 3 3 3 3 3 3 Thus we obtain the induction step which gives our result. 97 Proposition 7.3.8. A  −1 −1  −1 −1 , ( 00 ) , finitely many variables of degree ( 00 ),  , ( 00 ) , ( 10 ) , ( 00 ) , ( 10 ) , ( 01 ) ± ( 11 ), ± ( 10 ) and  e7 ,E  has in- ± ( 01 ). Proof. This follows by combining Lemma 7.3.6 and Lemma 7.3.7    0  0  −1 −1 1 0 1 0 f Conjecture 7.3.9. A has only −1 , ( 0 ) , −1 , ( 0 ) , ( 0 ) , ( 0 ) , ( 0 ) , ( 1 ) , E7  −2 2 one variable in degree ( 1 ) and one variable in degree −1 . 7.3.3 e8 Grading for E e8 , we again expect degrees ±2 correspond to one variable each, while degrees In E 0 and ±1 have infinitely many different variables. For this case it is more difficult to write down a simple formula for the entries of the third denominator slice. The entries after [(p)n ] depend on n mod 5. Lemma 7.3.10. Let [p] = [3, 4, 2, 6, 9, 1, 6, 5, 6, 7, 8]. Then  e8 . deg . sdEe8 [(p)n ] = (−1)n (0, 0, 0, −1, 0, −1, 0, −1, 1), E Proof. See Proof A.0.2 of the appendix, where again we include the list of matrices obtained. Lemma 7.3.11. Let [p] = [3, 4, 2, 6, 9, 1, 6, 5, 6, 7, 8]. The entries of d. clEe8 [(p)n ]|3 are as follows.  l m 2 n − 2, 5 1 n l m d. cl3 [(p) ] = 2 n − 1, 5  l m   4 n5 − 4,    l m   4 n − 3, 5 l m d. cl23 [(p)n ] =  n  4 5 − 2,    l m   4 n − 1, 5  l m  6 n5 − 5,    l m    n  6 − 4,    l5m d. cl33 [(p)n ] = 6 n5 − 3,  l m    n  6 − 2,  5   l m   6 n − 1, 5 98 n = 5k + i, (i = 1, 2) (7.3.6) n = 5k + j, (j = 0, 3, 4). n = 5k + 1 n = 5k + 2 (7.3.7) n = 5k + i, (i = 3, 4) n = 5k. n = 5k + 1 n = 5k + 2 n = 5k + 3 n = 5k + 4 n = 5k. (7.3.8) d. cl43 = n − 1  l m n   4 5 − 4,   m l   4 n − 3, 5 l m d. cl53 [(p)n ] =  n  4 5 − 2,    l m   4 n − 1, 5  l m   3 n5 − 3,    l m d. cl63 [(p)n ] = 3 n5 − 2,  l m    3 n − 1, 5  l m 2 n − 2, 5 7 n l m d. cl3 [(p) ] = 2 n − 1, 5 lnm − 1. d. cl83 [pn ] = 5 l m   3 n − 3,    l5m d. cl93 [(p)n ] = 3 n5 − 2,  l m    3 n − 1, 5 (7.3.9) n = 5k + i, (i = 1, 2) n = 5k + 3 (7.3.10) n = 5k + 4 n = 5k. n = 5k + i, (i = 1, 2, 3) n = 5k + 4 (7.3.11) n = 5k. n = 5k + i, (i = 1, 2, 3, 4) (7.3.12) n = 5k. (7.3.13) n = 5k + 1 n = 5k + i, (i = 2, 3) (7.3.14) n = 5k + j, (j = 0, 4). Proof. The result is clearly true for n = 0 which provides a base case. Assume true for n when n = 5k. (Other cases can be proved l inma similar l m way.) We l mrefer to the matrices in Proof A.0.2. Note, since n = 5k, n+1 = n5 + 1 and n5 = n5 . 5 We compute the denominator entries along the mutation path. l n m   lnm  3 n d [8, (p) ] = − − 1 + max 2 − 1, 0 5 lnm 5 . = 5 l m   l n m  lnm  n 3 n d [7, 8, (p) ] = − 2 − 1 + max 3 −1 + ,0 5 5 lnm 5 . =2 5 l n m   l n m  lnm  3 n d [6, 7, 8, (p) ] = − 3 − 1 + max 4 −1 +2 ,0 5 5 lnm 5 =3 . 5 l n m   lnm  3 n − 1 + max (n − 1) + 3 ,0 d [5, 6, 7, 8, (p) ] = − 4 5 l n5m l m n n =n− =n− =4 . 5 l n5m  l n5 m l n m d3 [6, 5, 6, 7, 8, (p)n ] = −3 + max n − ,2 5l m l m 5 5 n n =n−4 = . 5 5 99  lnm   l n m   d [1, 6, 5, 6, 7, 8, (p) ] = − 2 − 1 + max 4 − 1 ,0 5 lnm 5 =2 .   l n m   5 l n m 3 n d [9, 1, 6, 5, 6, 7, 8, (p) ] = − 3 − 1 + max 6 − 1 ,0 5 lnm 5 . =3   l m  l m 5 l m 3 n n n d [6, 9, 1, 6, 5, 6, 7, 8, (p) ] = − n − 4 5 − 1 + max n − 5 − 1 , 2 n5 lnm =4 . 5 l n m   lnm  lnm   − 1 + max 2 + 6 − 1 ,0 d3 [2, 6, 9, 1, 6, 5, 6, 7, 8, (p)n ] = − 4 5 5 lnm 5 =4 . 5  l n m   l n m  d3 [4, 2, 6, 9, 1, 6, 5, 6, 7, 8, (p)n ] = −(n − 1) + max 6 −1 + n− ,0 5 5 lnm . =5 5 3 n Finally,  lnm   lnm lnm lnm  − 1 + max 4 +5 +3 ,0 d3 [pn+1 ] = − 6 5 5 5 lnm 5 =6 + 1. 5 So the new denominator slice is lnm d. clEe8 [pn+1 ]|3 = h2, 4, 6, 5, 4, 3, 2, 1, 3i + h0, 0, 1, 0, 0, 0, 0, 0, 0i. 5 l m  l m l m n n+1 n Considering the first entry, we have 2 5 = 2 5 + 1 − 2 = 2 5 − 2, so (7.3.6) is true for n + 1 (which is of the form 5k + 1). Similarly, so are (7.3.7)– (7.3.14). So, when n = 5k, the result is true for n + 1.  e8 has infinitely many variProposition 7.3.12. A (0, 0, 0, −1, 0, −1, 0, −1, 1), E ables of degree 0 and ±1. Proof. By the proof of Lemma 7.3.10 we see that repeating the path [p] gives infinitely many variables of degree m, where m ∈ {0, ±1}. By Lemma 7.3.11 we have that infinitely many of these paths must result in different variables since the denominator vectors obtained grow indefinitely.  e8 has only one variable in Conjecture 7.3.13. A (0, 0, 0, −1, 0, −1, 0, −1, 1), E degree 2 and one variable in degree −2. 100 Chapter 8 Gradings for quivers arising from surface triangulations 8.1 Graded cluster algebras associated to surfaces There exists a class of cluster algebras associated to oriented bordered surfaces with marked points. In [10] the authors describe the process by which a cluster algebra arises from such a surface. As is explained in [24], these cluster algebras may be given a grading by assigning each cluster variable a degree which is the sum of valued marked points (though this grading does not agree precisely with the definition of grading we have assumed in this thesis). In this chapter we will review the theory of cluster algebras arising from surfaces, following [10], and adapt a definition from [24] to our setting in order to define a grading (in our sense) on such a cluster algebra arising from the properties of its associated surface. We will then apply this theory to study the graded cluster algebra structure of some classes of examples. The basic idea when associating a surface with a cluster algebra is that the surface will be triangulated by arcs, each of which represents a cluster variable, and the configuration of the triangulation then also encodes an exchange quiver so that the triangulated surface can be considered as a seed. This is made more precise with the following definitions. Definition 8.1.1 (Marked surfaces). A bordered surface with marked points is a pair (S, M) where S is a connected oriented 2-dimensional Riemann surface with boundary and M is a finite, non-empty set of marked points in the closure of S such that each connected component of the boundary of S has at least one marked 101 point. However, for technical reasons, the following particular cases are excluded from the definition: a sphere with one or two punctures, an unpunctured or oncepunctured monogon, an unpunctured digon, an unpunctured triangle and a sphere with three punctures. This excludes cases that are not able to be triangulated — which we will define shortly. A marked point which is not on a boundary component is called a puncture. (However, when we consider gradings arising from surfaces later, we will not allow surfaces with punctures.) Definition 8.1.2 (Arcs and ideal triangulations). An arc in (S, M) is a curve (up to isotopy) in S that does not intersect itself (except, possibly, for its endpoints) whose endpoints (and only its endpoints) are marked points in M. An arc is not allowed to cut out an unpunctured monogon or unpunctured digon, so that an arc cannot be contractible to a marked point or to the boundary of S. We use A◦ (S, M) to denote the set of all arcs in (S, M) (which is typically infinite—see [10, Proposition 2.3]). Two arcs are called compatible if they have representatives in their respective isotopy classes that do not intersect in the interior of S. An ideal triangulation of (S, M) is a maximal collection of distinct, pairwise compatible arcs, and these arcs cut S into ideal triangles. Thus, each side of an ideal triangle is an arc or a segment of a boundary component between two marked points. Deviating from [10] slightly, we will use the term boundary arc to refer to such a segment, even though it is not a genuine arc. The three sides of an ideal triangle are not required to be distinct; such a triangle (shown in Figure 8.1) is called self-folded (although, as above, these will not be allowed when we consider gradings). Furthermore, two triangles can share more than one side. Figure 8.1: The self-folded triangle. The following defines the analogue of seed mutation for triangulated surfaces. 102 Definition 8.1.3 (Arc complex and flips). The arc complex is the simplicial complex on the ground set A◦ (S, M) whose simplices are collections of distinct mutually compatible arcs and whose maximal simplices are ideal triangulations. We denote the arc complex by ∆◦ (S, M) and its dual graph by E◦ (S, M). So the vertices of E◦ (S, M) are in bijection with the ideal triangulations of (S, M). A flip is a transformation of an ideal triangulation of (S, M) that removes a particular arc and replaces it with a (unique) new arc that forms a new ideal triangulation of (S, M) together with the remaining arcs. Thus, the edges of E◦ (S, M) above correspond to flips. It is clear that a flip of a triangulated surface is involutive, though not every arc can be flipped: there is no suitable replacement arc for the self-folded edge (interior to the loop) of the self-folded triangle mentioned above. This is in contrast with seed mutation, in which every (non-frozen) entry of the seed may be mutated. In [10, Section 7], the authors resolve this issue by introducing tagged arcs and their flips. However, for the class of examples from which our gradings arise, every arc will be flippable (indeed, as we will not allow punctures, the self-folded triangle can not arise in our examples). Proposition 8.1.4. Any two ideal triangulations are related by a sequence of flips. That is, E◦ (S, M) is connected. Proof. This follows from results of [20], [21] and [23]. Compare the following to Theorem 4.4.9. Theorem 8.1.5 ([8, Theorem 1.1]). The fundamental group of E◦ (S, M) is generated by cycles of length 4 and 5, pinned down to a base point. Still following [10], we now explain how to associate an exchange matrix to a triangulated surface. Definition 8.1.6 ([10, Definition 4.1]). Let T be an ideal triangulation of (S, M). We define the signed adjacency matrix B(T ) as follows. We label the rows and columns of B(T ) by the arcs in T (strictly, by l(1), . . . , l(n) for some labelling l as in Definition 2.1.1). For an arc labelled i, the map πT (i) is defined as follows: if there is a self-folded ideal triangle in T in which i is the self-folded edge, then πT (i) is the arc that is the remaining edge of the triangle. Otherwise, πT (i) = i. Then, for each ideal triangle ∆ in T which is not self-folded, define the n × n matrix B ∆ 103 by b∆ ij =   1       if ∆ has sides labeled πT (i) and πT (j) with πT (i) followed by πT (j) in the clockwise order, (8.1.1)   −1 if the same is true but in the counter-clockwise order,      0 otherwise. Then we set B(T ) = P ∆ B ∆ , where ∆ ranges over all ideal triangles in T that are not self-folded. We have that B(T ) is skew-symmetric and all its entries are in {0, ±1, ±2}. Remark 8.1.7. As an alternative to using a matrix, we may draw the corresponding quiver on a triangulated surface by picking a point on each arc and adding an arrow between arcs α and α0 each time α0 appears after α in the clockwise direction in a triangle (which may happen more than once for a given pair of arcs, leading to a double arrow or cancellation of arrows). Remark 8.1.8. Suppose T and T 0 are two triangulations of the same marked surface. It is not true that T 6= T 0 B(T ) 6= B(T 0 ). Indeed, unless =⇒ B(T ) gives rise to a finite type cluster algebra, there will be infinitely many different triangulations T 0 such that B(T 0 ) = B(T ). Note also that two different marked surfaces may have the same signed adjacency matrix (for example, see [10, Example 4.3]). Example 8.1.9. Consider the triangulated marked surface α3 α2 (S, M) = . α1 This is the six-gon. The ideal triangulation T consistsof the three non-boundary 0 −1 1 1 0 −1 . Flipping the arc α1 , we arcs α1 , α2 and α3 and we have B(T ) = −1 1 0 obtain the new ideal triangulation T 0 = {α10 , α2 , α3 }, as in 104 α3 α2 , α10 0 and we have B(T ) =  0 1 −1 −1 0 0 1 0 0  . The corresponding quiver is an orientation of a Dynkin diagram of type A3 , and indeed the cluster algebra associated to this marked surface is of type A3 . (In general, the cluster algebra associated to the n-gon with no punctures is of type An —see [10, Table 1].) Notice in the example above that B(T 0 ) = B(T )[1] , that is, the matrix corresponding to flipping the arc α1 in T is the same as the one obtained by mutating B(T ) in direction 1. This happens in general, as we see from the next result, which relates flips of arcs to matrix mutation. Proposition 8.1.10 ([10, Proposition 4.8]). Let T be an ideal triangulation and suppose the ideal triangulation T 0 is obtained from T by flipping an arc labelled k. Then B(T 0 ) = B(T )[k] . The following is a corollary of Proposition 8.1.4 and Proposition 8.1.10. Proposition 8.1.11 ([10, Proposition 4.10]). Let T be a triangulation of (S, M). The mutation equivalence class of B(T ) is independent of T and depends only on (S, M). Definition 8.1.12. We will write A(S, M) to unambiguously refer to the cluster algebra arising from a particular triangulated surface. We have not yet precisely established the relationship between the arcs in the class of ideal triangulations of a given surface and the cluster variables in the corresponding cluster algebra, that is, the relationship between the arc complex ∆◦ (S, M) of a triangulated surface and the cluster complex of the cluster algebra arising from that surface. The next theorem, which is the main result of [10], addresses this. The version presented here is in fact only a special case of that theorem (which allows for the possibility of self-folded triangles by using tagged 105 triangulations), but it is all we will need as we will ultimately be excluding surfaces with punctures. Theorem 8.1.13 ([10, Theorem 7.11]). Let (S, M) be a bordered surface with marked points without any punctures and let A be a cluster algebra generated by B(T ), where T is a triangulation of (S, M). Then the arc complex ∆◦ (S, M) is isomorphic to the cluster complex of A, and E◦ (S, M) is isomorphic to the exchange graph of A. Apart from one or two particular cases, this result can be extended to allow for surfaces with punctures. We will exclude such surfaces in our study as they do not work with the set-up we are going to introduce that allows a grading to arise from a triangulation. We are now ready to introduce the mechanism by which such a grading arises. The idea is to assign values to the marked points of a surface and then set the degree of an arc (and thus its corresponding cluster variable) to the sum of its endpoints. First note the following, which lets us read off the dimension of the grading from (S, M). Theorem 8.1.14 ([10, Theorem 14.3]). Let T be an ideal triangulation of (S, M). Then the corank of B(T ) is the number of punctures in (S, M) plus the number of boundary components having an even number of marked points. We will refer to boundary components with an even number of marked points as even boundary components and ones with an odd number of points as odd components. Thus, for our class of examples, the dimension of a grading is given by the number of even boundary components. The set E in Definition 8.1.16 below is where we make an alteration to the definition in [24, Section 3.5]. This set will essentially give us our grading space, but since we have changed the definition from [24], we need to prove this and any subsequent results for our altered setting. We will do so here in a combinatorial way without needing the background theory in [24]. Definition 8.1.15. Let α be an arc in an ideal triangulation of (S, M) and consider the marked points (or common marked point) m and m0 attached to each end of α. We will call m and m0 the endpoint(s) of α. We will call functions s, t : A◦ (S, M) → M such that {s(α), t(α)} = {m, m0 } for all α ∈ A◦ (S, M) endpoint maps of A◦ (S, M). Given A◦ (S, M), unless otherwise stated we will tacitly fix two endpoint maps and refer to them as s and t. 106 Definition 8.1.16. Let (S, M) be a marked surface without punctures with an ideal triangulation T . Then E := {f : M → Q | f (s(β)) + f (t(β)) = 0 for all boundary arcs β ∈ T } . We will call a function f ∈ E a valuation function and (S, M) along with f (or a tuple of valuation functions (f1 , . . . , fn )) a valued marked surface. Although we allow f to take arbitrary rational values (so that E is a genuine vector space), in practice we will choose values such that the degree of any arc, which we will define presently, is an integer (c.f. Remark/Definition 2.2.2). For an arc α in a valued marked surface with valuation function f , we define the function degf : A◦ (S, M) → Z by degf (α) := f (s(α)) + f (t(α)). We will call degf (α) the degree of α. We will now turn to proving that a valuation function gives rise to a grading on the cluster algebra associated to a marked surface. For a seed to be graded, the exchange relations for mutation in each direction need to be homogeneous. We will show that the corresponding exchange relations will be homogeneous for any arc in an ideal triangulation of a valued marked surface. First, we need to introduce some new combinatorial objects that let us translate the notion of balanced vertices of a quiver to arcs of a triangulation. Definition 8.1.17. Let α be a (non-boundary) arc in a marked surface (S, M) without punctures with triangulation T . Then α is an edge of two ideal triangles. We define the configuration of α, κ(α) to be the subset of T consisting of these two triangles. A standard configuration is one in which the two triangles share only one edge and whose arcs’ endpoints make up four distinct points. (In other words, a standard configuration is a square with a diagonal, up to homotopy.) A starred configuration is one that looks like a standard configuration except that certain marked points, those starred by the symbol ∗ or ?, are identified with any others starred by the same symbol. We do not allow two or more adjacent boundary arcs to have all their endpoints starred by the same symbol. If (S, M) has a valuation function f , we will say κ(α) is balanced if X degf (αcw ) = X αcw degf (αac ), (8.1.2) αac where αcw runs over all (non-boundary) arcs that follow α in the clockwise direction inside one of the triangles (adding two summands if this occurs in both triangles) and similarly for αac in the counter-clockwise direction. (Empty sums are defined 107 to be 0.) This may be extended in the obvious way if we have a tuple of valuation functions. Equivalently, when the quiver is superimposed on the configuration, κ(α) is balanced if the corresponding vertex of the quiver is balanced—c.f. Remark 8.1.7. When representing κ(α) as a diagram, we will use dotted lines to mean that an edge is a boundary arc. There may be other arcs contained in the region of S that falls inside the outer boundary formed by the two triangles; in this case, we may write T ∗ to indicate that some arbitrary set of arcs is present (although they are not part of the configuration) to make the diagram more clear and avoid depicting something that appears not to be part of an ideal triangulation. Note that the outer boundary formed by the configuration of an arc may consist of between one and four arcs. Example 8.1.18. Consider the valued marked surface −1 1 1 (S, M) = . 0 α −1 −1 1 The shaded area represents a region that is excluded from the surface—a convention we will adopt throughout. So (S, M) is an annulus (a class of surfaces we will consider in the next section) with six points on the outer boundary and one point on the inner boundary. The configuration of α is −1 1 T∗ κ(α) = α , 1 which is balanced since P degf (αcw ) = (−1 − 1) + (1 + 1) while αcw P αac (−1 + 1). 108 degf (αac ) = Definition 8.1.19. In the setting of Definition 8.1.17, suppose κ(α) is such that the two triangles share exactly one edge. Then if κ(α) is not a standard configuration we may use it to form a new starred configuration as follows. For each loop in κ(α) that encloses a region that is not the interior of one of the two triangles (i.e. a region marked T ∗ ), we “cut” the loop open at its basepoint. More precisely, each loop of the form T∗ is replaced by ∗ and any other ∗ arcs that were attached to the base point of the loop are now attached to one of the starred points, corresponding to the side of the arc they were originally on. It is important to maintain the distinction between loops with different base points in the starred configuration we obtain, so we will star the corresponding pairs of points with different symbols when cutting loops based at different points. This is a valid starred configuration: the only way we could obtain two or more adjacent boundary arcs with endpoints starred with the same symbol is if the original configuration had multiple boundary loops with the same basepoint, but there is no such configuration. We will call the starred configuration obtained by this process the opened configuration of α. Example 8.1.20. The configuration of α in Example 8.1.18 is not a standard configuration. The opened configuration is −1 1 ∗ α , ∗ −1 1 which is again balanced. For a second example, let (S, M) be the marked surface −1 0 α 0 1 109 . Then −1 T∗ κ(α) = , α T? 1 which is balanced as P degf (αcw ) = 0 while αcw P degf (αac ) = (−1 − 1) + (1 + 1). αac We obtain the opened configuration in two steps. First we open the loop whose endpoints are on the upper marked point of value −1 (i.e. the loop bounding T ∗ ), which gives −1 −1 ∗ ∗ α . T? 1 Then we open the remaining loop, which gives us the opened configuration −1 −1 ∗ ∗ α . ? ? 1 1 This is again balanced. In the examples above, a balanced configuration gave rise to a balanced open configuration. This is not a coincidence, as we will see shortly. Remark 8.1.21. It is possible to obtain any configuration by starting with a starred configuration and “gluing” along matching symbols such that we create internal loops. For example, for the latter opened configuration in Example 8.1.20, if we reverse the two steps we carried out to obtain it, we get back the original configuration of α. The other possible configurations are obtained by starring a standard configuration in all the possible ways (including starring more than two points with the same symbols) and then gluing. 110 Below are some simple results that allow us to restrict our attention to a small number of configurations in a systematic way. Lemma 8.1.22. Let α be an arc in an ideal triangulation of a valued marked surface such that the triangles of κ(α) share just one edge. Then the opened configuration of α is balanced if and only if κ(α) is balanced. Proof. This is clear by inspection. Lemma 8.1.23. Suppose a given standard configuration is balanced for all valuation functions. Then so is any starred configuration obtained from it by replacing some marked points with starred points (that is, by starring some of the points). Proof. Replacing points of the standard configuration by starred points simply restricts the possible values of these points (points starred with the same symbol must now share a common value), but the configuration is already balanced for all values endowed by a valuation function, and in particular for these restricted values. Lemma 8.1.24. Let α be an arc in some ideal triangulation T of a valued marked surface and let α0 be the unique new arc in the triangulation T 0 obtained by flipping α in T . We have that κ(α) is balanced if and only if κ(α0 ) is balanced. Proof. The arcs that follow α0 in the clockwise direction are exactly those that follow α in the counter-clockwise direction, and the arcs that follow α0 in the counter-clockwise direction are those that follow α clockwise. Thus exchanging α for α0 simply has the effect of swapping the left hand side of Equation 8.1.2 with the right hand side, and vice versa. Proposition 8.1.25. Let α be an arc in an ideal triangulation of a valued marked surface. Then κ(α) is balanced. Proof. In any configuration, the two triangles share either one or two edges. Thus there are two cases to consider. If the triangles share two edges, there are only two possibilities for κ(α): 0 0 α and v α 0 111 . Note the double arrow (between α and the other interior arc) which would be present in the superimposed quiver. Both of these configurations are balanced: in the first we have X degf (αcw ) = 2(v + 0) = (v + v) = αcw X degf (αac ), αac while in the second both sums are automatically zero (as both marked points must have zero value under any valuation function, being on boundaries with an odd number of points). Suppose the two triangles share one edge. Then by Lemma 8.1.22 and Lemma 8.1.23 we may assume without loss of generality that they form a standard configuration. We therefore just need to list all these configurations and check they are balanced for an arbitrary valuation function. We write down and check this list in Table 8.1. LHS: P degf (αcw ) αcw Configuration RHS: P degf (αac ) αac a1 a4 a1 −a1 LHS: (a1 + a2 ) + (a3 + a4 ) α LHS: (a1 + a2 ) + (a3 − a1 ) α RHS: (a1 + a4 ) + (a2 + a3 ) a2 a3 a1 −a1 RHS: (a2 + a3 ) a2 a3 a1 LHS: (a1 + a2 ) + (−a1 − a2 ) α −a1 LHS: (a2 − a1 ) α RHS: (a2 − a1 ) RHS: 0 a2 −a2 a1 −a1 −a1 a2 a1 −a1 LHS: (a1 − a1 ) α LHS: 0 α RHS: 0 −a1 RHS: 0 a1 −a1 a1 Table 8.1: the standard configurations. Proposition 8.1.26. Let (S, M) be a valued marked surface with valuation function f and initial ideal triangulation T . Say the arcs of T are α1 , . . . , αn . Then A(S, M) is the graded cluster algebra generated by the initial degree seed  (degf (α1 ), . . . , degf (αn )), B(T ) . 112 Proof. Since arcs are in bijection with cluster variables by 8.1.13, we just need to justify that the seed above is a degree seed. By Proposition 8.1.25, κ(αi ) is balanced for each i, but this is exactly the condition required in Equation 2.2.1. Corollary 8.1.27. Given a tuple of valuation functions, Proposition 8.1.26 extends to multi-gradings in the obvious way. We have shown that degf takes a triangulation and gives a valid degree cluster for any valuation function f . Now we will show that, given a degree cluster, there is a valuation function f such that degf gives this degree cluster. Suppose (S, M) is a marked surface with ideal triangulation T , where T has arcs α1 . . . , αn , and that B = B(T ). Assume ker(B T ) is k-dimensional, that is we have a k-dimensional grading. Then by Theorem 8.1.14 we know there are k boundary components of (S, M) that have an even number of marked points. Then E = E(S, M) is also k-dimensional as follows. Denote the even boundary components of (S, M) by Σ1 , . . . , Σk . For the component Σi , denote the set of its marked points by {mi1 , . . . miri } and assume these are labelled such that mij and mij+1 are adjacent for all j (working mod ri so that mi1 and miri are adjacent). A basis of E is given by (f1 , . . . , fk ) where fi = δmi1 − δmi2 + δmi3 − · · · + (−1)ri +1 δmir . i (8.1.3)  1 if m = p, (Here, we are defining δ∗ by δm (p) = for marked points m and p.) 0 otherwise, Definition 8.1.28. For the triangulation T , define θT : E → ker(B(T )T ) by  θT (f ) = degf (α1 ), . . . , degf (αn ) . (8.1.4) By Proposition 8.1.26, we know that the image of f is indeed in ker(B T ), and it is easy to show that θT is linear. We wish to show it is an isomorphism. The crucial step is establishing that it is enough to show the result for any single triangulation in the mutation class. Lemma 8.1.29. For any mutation direction j, if θT is injective then so is θT 0 , where T 0 = µj (T ). Proof. Suppose θT is injective. Then f 6= 0 =⇒ θT (f ) 6= 0. Thus for any f 6= 0 there is some αi ∈ T such that degf (αi ) 6= 0, that is, such that f (s(αi ))+f (t(αi )) 6= 0. Fix f 6= 0 and say degf (αi ) 6= 0. Consider T 0 := µj (T ). If i 6= j or if there is another arc with non-zero degree then clearly we still have degf (α) 6= 0 for some 113 α in T 0 . So assume i = j and that αi is the only arc in T such that degf (αi ) 6= 0. Consider the configuration of αi in T : we have a b αi κ(αi ) = , (8.1.5) c d where a, b, c, d are the values of the corresponding marked points. (We do not assume these marked points are distinct and, apart from αi , the arcs may be boundary arcs.) But since αi is the only arc in T with non-zero degree, we must have a = −b, a = −d, d = −c and b = −c. So the configuration is −a a αi κ(αi ) = −a , (8.1.6) a and we must have deg(αi ) = −2a 6= 0. Now the configuration of αi0 in µj (T 0 ) is −a a κ(αi0 ) = , αi0 −a (8.1.7) a which means deg(αi0 ) = 2a 6= 0. So θT 0 (f ) 6= 0. Thus θT 0 is also injective. This immediately implies the step we wished to establish: Corollary 8.1.30. Let T0 be a fixed ideal triangulation. If θT0 is injective then so is θT for any ideal triangulation T . We can now deal uniformly with all but a special class of cases. Lemma 8.1.31. Suppose (S, M) is a marked surface. There exists a triangulation T such that the following is true: if a valuation function f is such that θT (f ) = 0, then f is zero on every boundary component that does not have exactly two marked points. Proof. If a boundary component Σ has an odd number of marked points, then f must always be zero on Σ. Let T be a triangulation satisfying the following: for each even boundary component Σi with more than two marked points, there is an 114 arc βi between the marked points mi1 and mi3 (which must both exist as Σi has at least 4 marked points). We should justify that β1 , . . . , βk are compatible; this is clear since each arc’s endpoints are confined to a unique boundary component. It is also easy to see there does indeed exist a triangulation containing these arcs: if T 0 = {β1 , . . . , βk } isn’t an ideal triangulation already, then by definition there is another arc β ∈ / T 0 compatible with T 0 . Let f ∈ E. Note that since mi1 and mi3 are on an even boundary, and by how we have labelled the marked points, we have f (mi1 ) = f (mi3 ). Also, for each i we have degf (βi ) = f (s(βi )) + f (t(βi )) = f (mi1 ) + f (mi3 ). Now suppose θT (f ) = 0. Then in particular f (mi1 ) + f (mi3 ) = 0, so we now have both f (mi1 ) = −f (mi3 ) and f (mi1 ) = f (mi3 ) and thus f (mi1 ) = 0. But this implies all the other marked points m on Σi must also satisfy f (m) = 0. Thus f is 0 on each even boundary component of (S, M) not containing exactly two marked points. Given the above, all that is left to address are boundary components with exactly two marked points, in the surfaces that have them. Theorem 8.1.32. Let (S, M) be a marked surface. Then θT is an isomorphism for any ideal triangulation T . Proof. We will show θT is injective, and therefore bijective, for any triangulation T . If (S, M) has no boundary components with exactly two marked points, then, by Corollary 8.1.30, we can assume T is a triangulation satisfying Lemma 8.1.31. Then we have θT (f ) = 0 implies f = 0 and we are done. So assume (S, M) has boundary components with exactly two marked points. Suppose the valuation function f is such that θT (f ) = 0. We will show that there exists a triangulation containing an arc on Σ that goes between marked points of the same value, which implies these points have zero value. This triangulation will be an extension of {β1 , . . . , βk } from before. Indeed, by Corollary 8.1.30, we may assume T is such that for each even boundary component Σi there is an arc βi between the marked points mi1 and mi3 . Then, by Lemma 8.1.31, f is zero on any even boundary components with more than two points. As always, f is automatically zero on any odd boundary components. Now, suppose Σ is a boundary component with exactly two marked points. Then Σ must fall into one of three cases: (i) Σ is the only boundary component (i.e. (S, M) is the digon), (ii) Σ is contained inside the region of (S, M) bounded by another component, or, 115 (iii) Σ encloses an interior boundary component. Let m be a fixed marked point on Σ. Case (i) is trivial as there can be no nonboundary arcs, so the arc complex is empty. In case (ii), we use Corollary 8.1.30 again: assume T contains an arc α that is a loop from m to itself encircling Σ itself. Such a triangulation exists since α is clearly compatible with the arcs β1 , . . . , βk , which we have previously assumed are in T . Then 0 = f (s(α)) + f (t(α)) = f (m) + f (m), so f (m) = 0. Thus, f is zero on Σ. Case (iii) is topologically equivalent to (ii), so we are done. This shows we can assume that T is such that f must be zero on every boundary component, that is, f = 0. Thus, θT is injective and hence bijective. Therefore θT is an isomorphism. Remark 8.1.33. A potentially worthwhile line of future research is investigating whether the grading we have defined can be extended to surfaces with punctures. A possible approach is the following. By [10, Lemma 2.13] such a surface has a triangulation without self folded triangles, and we can choose a valuation function for such a triangulation—problems only occur when the mutated triangulation produces self-folded triangles. If we pass to a tagged triangulation so that self-folded triangles are replaced with notched arcs, a suitable way to extend the grading may be to set the degree of a notched arc to the value of the point at the plain end minus the value of the point at the notched end. 8.2 Annulus with n + m marked points, m odd e m) (where n, m ≥ 1) has n marked points on the outer boundary The annulus A(n, component and m points on the inner boundary component. For the grading on the corresponding cluster algebra, there are two different scenarios depending on whether both, or just one, of n and m are even (we assume at least one is even, otherwise no nontrivial gradings can occur by Theorem 8.1.14). In the former case, we will assume n ≥ m, and in the latter, that n is even. We may do so by the following. e m) is Remark 8.2.1. The graded cluster algebra associated to the annulus A(n, e the same as that for A(m, n). To see this, simply note that any initial triangulation e m) is the same as a triangulation of an open cylinder with n marked points of A(n, on the top circle and m on the base circle. Turning the cylinder upside down e then gives an initial triangulation for A(m, n), and clearly this does not change the corresponding initial quiver or grading. 116 In this section we consider the case for when only n is even, and we will show that the grading is of mixed type. For our initial set-up we take the valued triangulation ±1 ∓1 ∓1 m+ n +1 2 m+ n 2 +2 m+ n 2 m+ n +3 2 −1 m+ n 2 ±1 ±1 0 0 0 0 0 m+1 1 0 2 0 3 m m−1 m+1 m+3 2 2 m+n m+2 −1 −1 1 which corresponds to the initial graded quiver (1)m+1 (−1)m+2 (1)m (1)m+3 (1)m−1 Q= . (1)n+m−1 (1)3 (−1)n+m (1)2 (1)1 m entries As a tuple, the degree cluster is gn,m n entries z }| { z }| { := (1, . . . , 1, 1, −1, . . . , 1, −1).  Lemma 8.2.2. A gn,m , Q has infinitely many variables in degrees 1 and −1. 117 Proof. To see that there are infinitely many variables in degree −1, say, fix any marked point p of value −1 (which will be on the outer boundary) and any point q on the inner boundary (which will have value 0). For r ≥ 1, let α(r) be the arc that starts at p, winds r times around the inner boundary in a clockwise fashion e 1), if we let (spiralling inwards as it does so), and ends at q. For example, in A(6, p be the point at the top of the outer boundary and q the only point on the inner boundary, then α(1) is the arc as drawn below: −1 1 1 0 −1 α(1) . −1 1 Then, if r1 6= r1 , α(r1 ) and α(r2 ) are not homotopic, so the corresponding cluster variables are distinct by Theorem 8.1.13. But α(r) has degree −1 for any r, so {α(r) | r ∈ N} is a set of infinitely many variables of degree −1. Degree 1 may be dealt with in a similar way.  Lemma 8.2.3. A gn,m , Q has only finitely many variables in degrees 0 and ±2. Proof. While we will not write down exact values for upper bounds on the number of variables that can occur in these degrees, it is easy to see that these numbers must be finite. The only way to obtain infinitely many non-homotopic arcs in the annulus with n + m marked points is to produce a sequence of arcs that loop increasingly many times around the inner boundary of the annulus (such as α(r) above). But any such arc must start on one boundary and end on the other and therefore must have degree ±1, since all points on the inner boundary have value 0 and all points on the outer boundary have value ±1. Therefore, there are only finitely many arcs of degree 0 and ±2.  Corollary 8.2.4. A gn,m , Q has infinitely many variables in degrees ±1 and finitely many in degrees 0 and ±2, and these are the only degrees that occur. Thus the graded cluster algebra associated to a triangulation of the annulus with n + m marked points, with m odd, is of mixed type. Remark 8.2.5. It is possible to prove Lemma 8.2.2 above using standard methods involving growing sequences of denominator vectors (though this takes considerably more effort than we needed above), but Lemma 8.2.3, which involves showing 118 certain degrees have only finitely many variables, would be very difficult to prove without the theory in Section 8.1 (as is often the case when trying to establish there are finitely many variables in a given degree) Remark 8.2.6. None of the above relies on m being odd. We could thus extend any of these results to the case when m is even (provided we extend the grading gn,m appropriately), although doing so would not alone be enough to show what happens for the graded cluster algebra when m is even, assuming we take a standard grading (recall Definition 2.2.5), which will be a Z2 -grading. However, we will make use of this fact in the following section. 8.3 Annulus with n + m marked points, m even Now let us assume both n and m are even. As there are now two boundary components with an even number of marked points, we get a 2-dimensional grading. We take the initial valued triangulation ± ∓ 1 0  1 0  1 0 ∓ m+ n +1 2  m+ n +2 2 m+ n 2 m+ ± n 2 +3 m+ n −1 2  1 0 − 0 1 − 0 1  0 1  0 1   0 1 −  m+1 1 m 2 ±  0 1 3 m−1 m 2 +1 m+n − 1 0 m+2  − ( 10 ) which corresponds to the initial graded quiver 119 1 0  ± 1 0  1 −1 m+1  −1 −1 m+2  ( 11 )m 1 −1 m+3 1 −1 m−1   Q= .  1  1 −1 m+n−1 −1 3 −1 −1 m+n  ( 11 )2 1 −1 1  As a tuple, the degree cluster is hn,m m entries z }| { z := ( −11 ) , ( 11 ) , . . . , ( −11 ) , ( 11 ), ( −11 ) , n entries  }| −1 1 −1 , . . . , ( −1 ) , −1 −1 {  , and a basis for the grading space is given by m entries {gn,m n entries m entries n entries z }| { z }| { z }| { z }| { := (1, . . . , 1, 1, −1, . . . , 1, −1), fn,m := (−1, 1, . . . , −1, 1, −1, −1, . . . , −1)}. Note gn,m is the same grading vector as the one in the case for odd n. At first glance, the addition of a dimension to the grading may appear to have a potential effect on the classification of the graded cluster algebra. However, it is not difficult to show that this will not be the case. In fact, the work we have done in Section 8.2 is already almost enough to determine the classification for the present case. Proposition 8.3.1. Assume n and m are both even. In the graded cluster algebra   A hn,m , Q , the cardinality of the the set of cluster variables of degree dd12 is determined by d1 : it is equal to the cardinality of the set of cluster variables of  degree d1 in A gn,m , Q . This cardinality is the same as for the case when m is  odd. More specifically, A hn,m , Q is of mixed type with infinitely many variables 1 in degrees ± ( −1 ) and ± ( 11 ) and finitely many variables in degrees ( 00 ), ± ( 02 ) and ± ( 20 ), and these are all the occurring degrees.   Proof. Write A = A hn,m , Q and A0 = A gn,m , Q . First note that, as in the case when m is odd, A0 is of mixed type with infinitely many variables in degrees ±1 and finitely many in degree ±2 and 0. (As noted in Remark 8.2.5, this may be proved in exactly the same way as for when m is odd.) 120 To justify that the degrees listed in the proposition are the only ones that can occur is easy: from the initial valued triangulation we may read off that these are the only possible combinations obtained when summing two valued marked points, to which any degree must correspond. A priori, at least one of ( −11 ) and ( 11 ) must be associated with infinitely many  variables, and similarly for ( −11 ) and −1 −1 . This is since, as noted in Lemma 8.2.2, there are infinitely many non-homotopic arcs of degrees 1 and −1 in A0 , and so these same arcs give infinitely many variables in degrees ( 1∗ ) and ( −1∗ ) in A. It is easy to see that we can in fact obtain infinitely many non-homotopic arcs both of degree ( −11 ) and degree ( 11 ). Again, we do this by fixing appropriate points (of 0 value ( 10 ) on the outer boundary and either ( −1 ) or ( 01 ) as appropriate on the inner boundary) and taking arcs that wind around the inner boundary component an increasing number of times. Similarly, we have infinitely many variables in degrees  ( −11 ) and −1 −1 . On the other hand, there are only finitely many possible arcs that can result in degrees ±2 or 0 in A0 , and therefore this is the case also for any degree of the form ( d0 ) or ± ( d2 ) in A, since these same arcs are the only ways to obtain the corresponding first entries. This shows what happens when we consider a standard grading. For a nonstandard grading, however, it is possible to get a graded structure with a different e m) given as follows: behaviour. Consider the valuation on A(n, 121 ± 12 ∓ 21 ∓ 21 m+ n +1 2 m+ n +2 2 m+ n 2 +3 m+ n 2 m+ n −1 2 ± 12 ± 12 − 12 1 2 1 2 − 12 − 12 m+1 1 m 2 ± 12 3 m−1 m 2 +1 m+n m+2 − 12 − 12 1 2 which corresponds to the initial graded quiver (0)m+1 (−1)m+2 (1)m (0)m+3 (0)m−1 Q= . (0)m+n−1 (0)3 (−1)m+n (1)2 (0)1 m entries As a tuple, the degree cluster is thus ln,m n entries z }| { z }| { := (0, 1, . . . , 0, 1, 0, −1, . . . , 0, −1). In this case, the following is easy to see.  Proposition 8.3.2. For n and m even, A ln,m , Q has infinitely many variables in degrees 0 and ±1, and these are the only occurring degrees. Proof. That the above are the only possible degrees is clear. 122 By similar arguments to those used in previous cases we have considered, we can find infinitely many non-homotopic arcs of each of these degrees. Remark 8.3.3. The theory we have developed in this chapter is likely to be able to successfully attack many other examples of cluster algebras arising from marked surfaces. Some of these examples could include a generalisation of the annulus that has k inner boundaries rather than one, or the torus with a disc or multiple discs removed. 123 Appendix A Appendix Proof A.0.1 (Lemma 7.3.6). We will write out the computation for n = 1, after which the result is immediate. First we write down the matrices obtained along the mutation path [7, 1, 6, 2, 5, 8, 3, 4] from Lemma 7.3.6. We have 0 1 0 0 0 0 0 0 −1 0 1 0 0 0 0 0 0 0 −1 0 0 0 0   0 −1 0 1 0 0 1  0 00 10 −1 0 0  0 0 0 0 10 −1 0 −1 0 0 0 0 0 0 1 0 0 0 0 0 0  00 10 0 0 −1  0 0 0 0 0 −1 0 −1 0 0 0 0 0 0 1 0 0 0 0   00 10 −1 0 1 0 0 −1   0 0 0 −1 0 0   0 0 0 0 10 −1 0 −1 0 0 0 0 0 0 1 0 0  00 −10 00 01 00 00 00 00  1 0 1 0 0 0 0 0  0 −1 0 1 0 0 0 0   0 0 −1 0 −1 0 0 −1  0 1 0 0   00 00 00 10 −1 0 −1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0  0 1 0 0 0 0 0 0  −1 0 1 0 0 0 0 0 0 1 0 0 0 0   00 −1 0 −1 0 −1 0 0 −1   0 0 0 1 0 −1 0 0   0 0 0 0 1 0 1 0 0 0 0 0 0 −1 0 0 0 0 0 1 0 0 0 0  e7 )[4] = (E e7 )[8,3,4] = (E e7 )[2,5,8,3,4] = (E e7 )[1,6,2,5,8,3,4] = (E 0 1 0 0 0 0 0 0 −1 0 −1 0 0 0 0 0 0 1 0 0 0 0  00 10 −1 0 1 0 0 1  0 0 0 −1 0 0  0 0 0 0 10 −1 0 −1 0 0 0 0 0 0 1 0 0  00 10 00 0−100 00 0 0 00  −1 0 −1 0 0 0 0 0 0 1 0 0 0 0   00 10 −1 0 −1 0 0 −1   0 1 0 0   00 00 00 10 −1 0 −1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0  0 −1 0 0 0 0 0 0  1 0 1 0 0 0 0 0 0 1 0 0 0 0   00 −1  0 −1 0 −1 0 0 −1   0 0 0 1 0 −1 0 0  0 0 0 0 1 0 1 0 0 0 0 0 0 −1 0 0  00 01 00 10 00 00 00 00  −1 0 1 0 0 0 0 0 0 1 0 0 0 0   00 −1  0 −1 0 −1 0 0 −1  0 0 0 1 0 −1 0 0   0 0 0 0 1 0 −1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0   , e7 )[3,4] = (E , e7 )[5,8,3,4] = (E , e7 )[6,2,5,8,3,4] = (E e7 )[7,1,6,2,5,8,3,4] = , (E e7 )[7,1,6,2,5,8,3,4] = E e7 , as claimed. Thus (E Then, for the degree seeds, we have deg . clEe7 [4] = deg . clEe7 [3, 4] = deg . clEe7 [8, 3, 4] = deg . clEe7 [5, 8, 3, 4] = deg . clEe7 [2, 5, 8, 3, 4] = deg . clEe7 [6, 2, 5, 8, 3, 4] = −1 −1  −1 −1  , ( 00 ) , ( 10 ) , ( 00 ) , ( 10 ) , ( 01 ) ,  0  −1 1),(0),(1),(0),(1),(0) , , ( ) , ( −1 0 1 0 0 0 0 1  0  −1 0 1 0 1 0 1 −1 , ( 0 ) , ( 1 ) , ( 0 ) , ( 0 ) , ( 0 ) , ( 0 ) , ( −1 ) ,  0  −1 1 ) , ( 0 ) , ( −1 ) , ( 0 ) , ( 1 ) , ( 0 ) , , ( ) , ( −1 −1 0 1 0 0 0 0  0  −1 −1 0 1 0 0 1 −1 , ( 0 ) , ( 1 ) , ( 0 ) , ( 0 ) , ( 0 ) , ( 0 ) , ( −1 ) ,  0  −1 −1 0 1 0 0 1 −1 , ( 0 ) , ( 1 ) , ( 0 ) , ( 0 ) , ( 0 ) , ( 0 ) , ( −1 ) , , ( 00 ) ,  0 0 1 deg . clEe7 [1, 6, 2, 5, 8, 3, 4] = (( 11 ) , ( 00 ) , ( 11 ) , ( 00 ) , ( −1 0 ) , ( 0 ) , ( 0 ) , ( −1 )) , 124  , , , . −1 0 0 deg . clEe7 [7, 1, 6, 2, 5, 8, 3, 4] = (( 11 ) , ( 00 ) , ( 11 ) , ( 00 ) , ( −1 0 ) , ( 0 ) , ( 0 ) , ( −1 )) . Thus deg . clEe7 [7, 1, 6, 2, 5, 8, 3, 4] is the negation of the initial cluster, as claimed. Proof A.0.2 (Lemma 7.3.10). We write down the matrices obtained along the mutation path [3, 4, 2, 6, 9, 1, 6, 5, 6, 7, 8] from Lemma 7.3.6. We have 0 1 0 0 0 0 0 0 0 −1 0 1 0 0 0 0 0 0 0 −1 0 0 0 0 −1   00 −1 0 1 0 −1 0 0 0 0    0 0 0 1 0 −1 0 0 0   0 0 0 0 1 0 −1 0 0  0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 −1 0 0 0 0 1 0 0 0 0 0 0  e7 )[8] (E = 0 −1  00  0  0 0 0 0  e7 )[6,7,8] (E =  e7 )[6,5,6,7,8] (E = e7 )[9,1,6,5,6,7,8] (E = e7 )[2,6,9,1,6,5,6,7,8] = (E e7 )[3,4,2,6,9,1,6,5,6,7,8] = (E  1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0  , e7 )[7,8] (E = , e7 )[5,6,7,8] (E = , e7 )[1,6,5,6,7,8] (E = , e7 )[6,9,1,6,5,6,7,8] (E =  0 1 0 0 0 0 0 0 0 −1 0 1 0 0 0 0 0 0  0 −1 0 −1 0 0 0 0 −1  0 1 0 0 0 0   00 00 10 −1 0 1 −1 0 0   0 0 0 0 −1 0 1 0 0   0 0 0 0 1 −1 0 −1 0 0 0 0 0 0 0 1 0 0  00−10 01 00 00 00 00 0 0 00  1 0 1 0 0 0 0 0 0 0 −1 0 0 0 0 1   00 −1 0 1 0 0 0 0  0 00 10 −1 0 1 −1 0 0   0 0 0 0 −1 0 1 0 0  0 0 0 0 1 −1 0 −1 0 0 0 0 0 0 0 1 0 0 0 0 −1 0 0 0 0 0 0  0 1 0 0 0 0 0 0 0 −1 0 −1 0 0 0 0 0 0 0 0 0 0 1  00 10 01 −1 0 1 0 0 0 0  0 0 0 −1 0 0 0  0 0 0 0 10 −1 0 0  0 0 0 0 0 01 −1 0 −1 0 0 0 0 0 0 0 1 0 0 0 0 −1 0 0 0 0 0 0  0 1 0 0 0 0 0 0 0  −1 0 1 0 0 0 0 0 0 0 −1 0 0 0 0 −1   00 −1  0 1 0 −1 0 0 0 0   0 0 0 1 0 −1 0 0 0   0 0 0 0 1 0 −1 0 0  0 0 0 0 0 1 0 −1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 , (Ee7 )[4,2,6,9,1,6,5,6,7,8] = . e8 )[3,4,2,6,9,1,6,5,6,7,8] = E e8 , as claimed. Thus (E Then, for the degree seeds, we have deg . clEe7 [8] = (0, 0, 0, −1, 0, −1, 0, 1, 1) , deg . clEe7 [7, 8] = (0, 0, 0, −1, 0, −1, 0, 1, 1) , deg . clEe7 [6, 7, 8] = (0, 0, 0, −1, 0, 1, 0, 1, 1) , deg . clEe7 [5, 6, 7, 8] = (0, 0, 0, −1, 0, 1, 0, 1, 1) , deg . clEe7 [6, 5, 6, 7, 8] = (0, 0, 0, −1, 0, −1, 0, 1, 1) , deg . clEe7 [1, 6, 5, 6, 7, 8] = (0, 0, 0, −1, 0, −1, 0, 1, 1) , deg . clEe7 [9, 1, 6, 5, 6, 7, 8] = (0, 0, 0, −1, 0, −1, 0, 1, −1) , 125  0 1 0 0 0 0 0 0 0 −1 0 1 0 0 0 0 0 0  0 −1 0 −1 0 0 0 0 −1   0 0 1 0 −1 0 0 0 0   0 0 0 1 0 −1 0 0 0   0 0 0 0 1 0 1 0 0  0 0 0 0 0 −1 0 −1 0 0 0 0 0 0 0 1 0 0  00 01 01 00 00 0 0 00 00 00  −1 0 1 0 0 0 0 0 0  0 −1 0 −1 0 0 0 0 −1  0 1 0 0 0 0   00 00 10 −1 0 −1 0 0 0    0 0 0 0 1 0 −1 0 0  0 0 0 0 0 1 0 −1 0 0 0 0 0 0 0 1 0 0  00−100 10 0 00 00 00 00 00  1 0 1 0 0 0 0 0 0  0 −1 0 −1 0 0 0 0 −1  0 1 0 0 0 0   00 00 10 −1 0 1 −1 0 0   0 0 0 0 −1 0 1 0 0   0 0 0 0 1 −1 0 −1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0  00 −1  0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 −1 0 0 0 0 1   00 −1 0 1 0 0 0 0  0 00 10 −1 0 0 0  0 0 0 0 01 −1 0 0  0 0 0 0 0 01 −1 0 −1 0 0 0 0 0 0 0 1 0 0 0 0 −1 0 0 0 0 0 0  0 1 0 0 0 0 0 0 0 −1 0 −1 0 0 0 0 0 0 0 1 0 0 0 0 1  00 10 −1 0 0 0 0  0 0 0 10 −1 0 0 0  0 0 0 0 01 −1 0 0  0 0 0 0 0 01 −1 0 −1 0 0 0 0 0 0 0 1 0 0 0 0 −1 0 0 0 0 0 0 , , , , , deg . clEe7 [6, 9, 1, 6, 5, 6, 7, 8] = (0, 0, 0, −1, 0, 1, 0, 1, −1) , deg . clEe7 [2, 6, 9, 1, 6, 5, 6, 7, 8] = (0, 0, 0, −1, 0, 1, 0, 1, −1) , deg . clEe7 [4, 2, 6, 9, 1, 6, 5, 6, 7, 8] = (0, 0, 0, 1, 0, 1, 0, 1, −1) , deg . clEe7 [3, 4, 2, 6, 9, 1, 6, 5, 6, 7, 8] = (0, 0, 0, 1, 0, 1, 0, 1, −1) . Thus deg . clEe7 [3, 4, 2, 6, 9, 1, 6, 5, 6, 7, 8] is the negation of the initial cluster, as claimed. 126 References [1] Assem, I., Blais, M., Brüstle, T., and Samson, A. (2008). Mutation classes of skew-symmetric 3 × 3-matrices. Comm. Algebra, 36(4):1209–1220. [2] Beineke, A., Brüstle, T., and Hille, L. (2011). Cluster-cyclic quivers with three vertices and the Markov equation. Algebr. Represent. Theory, 14(1):97–112. With an appendix by Otto Kerner. [3] Berenstein, A., Fomin, S., and Zelevinsky, A. (2005). Cluster algebras. III. Upper bounds and double Bruhat cells. Duke Math. J., 126(1):1–52. [4] Berenstein, A. and Zelevinsky, A. (2005). Quantum cluster algebras. Adv. Math., 195(2):405–455. [5] Buan, A. B., Marsh, R., Reineke, M., Reiten, I., and Todorov, G. (2006). Tilting theory and cluster combinatorics. Adv. Math., 204(2):572–618. [6] Caldero, P. and Keller, B. (2006). From triangulated categories to cluster algebras. II. Ann. Sci. École Norm. Sup. (4), 39(6):983–1009. [7] Carter, R. W. (2005). Lie algebras of finite and affine type, volume 96 of Cambridge Studies in Advanced Mathematics. Cambridge University Press, Cambridge. [8] Chekhov, L. O. and Penner, R. C. (2003). Introduction to Thurston’s quantum theory. Uspekhi Mat. Nauk, 58(6(354)):93–138. [9] Felikson, A., Shapiro, M., and Tumarkin, P. (2012). Skew-symmetric cluster algebras of finite mutation type. J. Eur. Math. Soc. (JEMS), 14(4):1135–1180. [10] Fomin, S., Shapiro, M., and Thurston, D. (2008). Cluster algebras and triangulated surfaces. I. Cluster complexes. Acta Math., 201(1):83–146. [11] Fomin, S. and Zelevinsky, A. (2002). Cluster algebras. I. Foundations. J. Amer. Math. Soc., 15(2):497–529. 127 [12] Fomin, S. and Zelevinsky, A. (2003). Cluster algebras. II. Finite type classification. Invent. Math., 154(1):63–121. [13] Fomin, S. and Zelevinsky, A. (2007). Cluster algebras. IV. Coefficients. Compos. Math., 143(1):112–164. [14] Geiß, C., Leclerc, B., and Schröer, J. (2013). Cluster structures on quantum coordinate rings. Selecta Math. (N.S.), 19(2):337–397. [15] Gekhtman, M., Shapiro, M., and Vainshtein, A. (2010). Cluster algebras and Poisson geometry, volume 167 of Mathematical Surveys and Monographs. American Mathematical Society, Providence, RI. [16] Grabowski, J. E. (2015). Graded cluster algebras. J. Algebraic Combin., 42(4):1111–1134. [17] Grabowski, J. E. and Launois, S. (2014). Graded quantum cluster algebras and an application to quantum Grassmannians. Proc. Lond. Math. Soc. (3), 109(3):697–732. [18] Grabowski, J. E. and Pressland, M. (2016). Graded Frobenius cluster categories. ArXiv e-prints. [19] Graham, R. L., Knuth, D. E., and Patashnik, O. (1994). Concrete mathematics. Addison-Wesley Publishing Company, Reading, MA, second edition. A foundation for computer science. [20] Harer, J. L. (1986). The virtual cohomological dimension of the mapping class group of an orientable surface. Invent. Math., 84(1):157–176. [21] Hatcher, A. (1991). On triangulations of surfaces. Topology Appl., 40(2):189– 194. [22] Keller, B. Quiver mutation in Java. www.math.jussieu.fr/~keller/ quivermutation. [23] Mosher, L. (1988). Tiling the projective foliation space of a punctured surface. Trans. Amer. Math. Soc., 306(1):1–70. [24] Muller, G. (2016). Skein and cluster algebras of marked surfaces. Quantum Topol., 7(3):435–503. [25] Palu, Y. (2008). Cluster characters for 2-Calabi-Yau triangulated categories. Ann. Inst. Fourier (Grenoble), 58(6):2221–2248. 128 [26] Schiffler, R. (2014). Quiver representations. CMS Books in Mathemat- ics/Ouvrages de Mathématiques de la SMC. Springer, Cham. [27] Scott, J. S. (2006). Grassmannians and cluster algebras. Proceedings of the London Mathematical Society, 92(2):345–380. [28] Warkentin, M. (2014). Exchange Graphs via Quiver Mutation. PhD thesis, Universität Bonn. 129
0math.AC
arXiv:1708.06219v1 [cs.NE] 21 Aug 2017 ON THE APPROXIMATION BY SINGLE HIDDEN LAYER FEEDFORWARD NEURAL NETWORKS WITH FIXED WEIGHTS NAMIG J. GULIYEV AND VUGAR E. ISMAILOV Abstract. Feedforward neural networks have wide applicability in various disciplines of science due to their universal approximation property. Some authors have shown that single hidden layer feedforward neural networks (SLFNs) with fixed weights still possess the universal approximation property provided that approximated functions are univariate. But this phenomenon does not lay any restrictions on the number of neurons in the hidden layer. The more this number, the more the probability of the considered network to give precise results. In this note, we constructively prove that SLFNs with the fixed weight 1 and two neurons in the hidden layer can approximate any continuous function on a compact subset of the real line. The applicability of this result is demonstrated in various numerical examples. Finally, we show that SLFNs with fixed weights cannot approximate all continuous multivariate functions. Contents 1. 2. 3. Introduction Construction of a sigmoidal function Practical computation and properties of the constructed sigmoidal function 4. Main results 5. Numerical results 6. Analysis of the multivariate case Acknowledgements References 1 3 7 7 11 12 15 15 1. Introduction Approximation capabilities of single hidden layer feedforward neural networks (SLFNs) have been investigated in many works over the past 30 years. Typical results show that SLFNs possess the universal approximation property; that is, they can approximate any continuous function on a compact set with arbitrary precision. 2010 Mathematics Subject Classification. 41A30, 41A63, 65D15, 68T05, 92B20. Key words and phrases. feedforward neural network, approximation, hidden layer, sigmoidal function, activation function, weight. 1 2 NAMIG J. GULIYEV AND VUGAR E. ISMAILOV An SLFN with r units in the hidden layer and input x = (x1 , . . . , xd ) evaluates a function of the form r X ci σ(wi · x − θi ), (1.1) i=1 i where the weights w are vectors in Rd , the thresholds θi and the coefficients ci are real numbers, and the activation function σ is a univariate function. Properties of this neural network model have been studied quite well. By choosing various activation functions, many authors proved that SLFNs with the chosen activation function possess the universal approximation property (see, e.g., [3, 4, 6, 7, 8, 10, 11, 14, 29]). That is, for any compact set Q ⊂ Rd , the class of functions (1.1) is dense in C(Q), the space of continuous functions on Q. The most general and complete result of this type was obtained by Leshno, Lin, Pinkus and Schocken [23]. They proved that a continuous activation function σ has the universal approximation property (or density property) if and only if it is not a polynomial. This result has shown the power of SLFNs within all possible choices of the activation function σ, provided that σ is continuous. For a detailed review of these and many other results, see [30]. In many applications, it is convenient to take the activation function σ as a sigmoidal function which is defined as lim σ(t) = 0 t→−∞ and lim σ(t) = 1. t→+∞ The literature on neural networks abounds with the use of such functions and their superpositions (see, e.g., [2, 4, 6, 8, 10, 11, 13, 15, 20, 22, 29]). The possibility of approximating a continuous function on a compact subset of the real line or d-dimensional space by SLFNs with a sigmoidal activation function has been well studied in a number of papers. In recent years, the theory of neural networks has been developed further in this direction. For example, from the point of view of practical applications, neural networks with a restricted set of weights have gained a special interest (see, e.g., [9, 16, 17, 19, 21, 24]). It was proved that SLFNs with some restricted set of weights still possess the universal approximation property. For example, Stinchcombe and White [34] showed that SLFNs with a polygonal, polynomial spline or analytic activation function and a bounded set of weights have the universal approximation property. Ito [20] investigated this property of networks using monotone sigmoidal functions (tending to 0 at minus infinity and 1 at infinity), with only weights located on the unit sphere. In [16, 17, 19], one of the coauthors considered SLFNs with weights varying on a restricted set of directions and gave several necessary and sufficient conditions for good approximation by such networks. For a set W of weights consisting of two directions, he showed that there is a geometrically explicit solution to the problem. Hahm and Hong [13] went further in this direction, and showed that SLFNs with fixed weights can approximate arbitrarily well any univariate function. Since fixed weights reduce the computational expense and training time, this result is of particular interest. In a mathematical formulation, the result reads as follows. Theorem 1.1 (Hahm and Hong [13]). Assume f is a continuous function on a finite segment [a, b] of R. Assume σ is a bounded measurable sigmoidal function on R. Then for any sufficiently small ε > 0 there exist constants ci , θi ∈ R and ON THE APPROXIMATION BY SINGLE HIDDEN LAYER NETWORKS 3 positive integers K and n such that f (x) − n X ci σ(Kx − θi ) < ε i=1 for all x ∈ [a, b]. Note that in this theorem both K and n depend on ε. The smaller the ε, the more neurons in the hidden layer one should take to approximate with the required precision. This phenomenon is pointed out as necessary in many papers. For various activation functions σ, there are plenty of practical examples, diagrams, tables, etc. in the literature, showing how the number of neurons increases as the error of approximation gets smaller. It is well known that one of the challenges of neural networks is the process of deciding optimal number of hidden neurons. The other challenge is understanding how to reduce the computational expense and training time. As usual, networks with fixed weights best fit this purpose. In this respect, Cao and Xie [2] strengthened the above result by specifying the number of hidden neurons to realize approximation to any continuous function. By implementing modulus of continuity, they established upper bound estimations for the approximation error. It was shown in [2] that for the class of Lipschitz functions LipM (α) with a Lipschitz constant M and degree α, the approximation bound is M (1 + kσk)(b − a)n−α , where kσk is the sup of σ(x) on [a, b]. Approximation capabilities of SLFNs with a fixed weight were also analyzed in Lin, Guo, Cao and Xu [26]. Taking the activation function σ as a continuous, even and 2π-periodic function, the authors of [26] showed that neural networks of the form r X ci σ(x − xi ) (1.2) i=1 can approximate any continuous function on [−π, π] with an arbitrary precision ε. Note that all the weights are fixed equal to 1, and consequently do not depend on ε. To prove this, they first gave an integral representation for trigonometric polynomials, and constructed explicitly a network formed as (1.2) that approximates this integral representation. Finally, the obtained result for trigonometric polynomials was used to prove a Jackson-type upper bound for the approximation error. In this paper, we construct a special sigmoidal activation function which meets both the above mentioned challenges in the univariate setting. In mathematical terminology, we construct a sigmoidal function σ for which K and n in the above theorem do not depend on the error ε. Moreover, we can take K = 1 and n = 2. That is, only parameters ci and θi depend on ε. Can we find these numbers? For a large class of functions f , especially for analytic functions, our answer to this question is positive. We give an algorithm and a computer program for computing these numbers in practice. Our results are illustrated by several examples. Finally, we show that SLFNs with fixed weights are not capable of approximating all multivariate functions with arbitrary precision. 2. Construction of a sigmoidal function In this section, we construct algorithmically a sigmoidal function σ which we use in our main result in the following section. Besides sigmoidality, we take care 4 NAMIG J. GULIYEV AND VUGAR E. ISMAILOV about smoothness and monotonicity of our σ in the weak sense. Here by “weak monotonicity” we understand behavior of a function whose difference in absolute value from a monotonic function is a sufficiently small number. In this regard, we say that a real function f defined on a set X ⊆ R is called λ-increasing (respectively, λ-decreasing) if there exists an increasing (respectively, decreasing) function u : X → R such that |f (x) − u(x)| ≤ λ for all x ∈ X. Obviously, 0-monotonicity coincides with the usual concept of monotonicity, and a λ1 -increasing function is λ2 -increasing if λ1 ≤ λ2 . To start with the construction of σ, assume that we are given a closed interval [a, b] and a sufficiently small real number λ. We construct σ algorithmically, based on two numbers, namely λ and d := b − a. The following steps describe the algorithm. 1. Introduce the function h(x) := 1 − min{1/2, λ} . 1 + log(x − d + 1) Note that this function is strictly increasing on the real line and satisfies the following properties: (1) 0 < h(x) < 1 for all x ∈ [d, +∞); (2) 1 − h(d) ≤ λ; (3) h(x) → 1, as x → +∞. We want to construct σ satisfying the inequalities h(x) < σ(x) < 1 (2.1) for x ∈ [d, +∞). Then our σ will tend to 1 as x tends to +∞ and obey the inequality |σ(x) − h(x)| ≤ λ, i.e., it will be a λ-increasing function. 2. Before proceeding to the construction of σ, we need to enumerate the monic polynomials with rational coefficients. Let qn be the Calkin–Wilf sequence (see [1]). Then we can enumerate all the rational numbers by setting r0 := 0, r2n := qn , r2n−1 := −qn , n = 1, 2, . . . . Note that each monic polynomial with rational coefficients can uniquely be written as rk0 + rk1 x + . . . + rkl−1 xl−1 + xl , and each positive rational number determines a unique finite continued fraction 1 [m0 ; m1 , . . . , ml ] := m0 + 1 m1 + m2 + 1 .. .+ 1 ml with m0 ≥ 0, m1 , . . . , ml−1 ≥ 1 and ml ≥ 2. We now construct a bijection between the set of all monic polynomials with rational coefficients and the set of all positive rational numbers as follows. To the only zeroth-degree monic polynomial 1 we associate the rational number 1, to each first-degree monic polynomial of the form rk0 + x we associate the rational number k0 + 2, to each second-degree monic ON THE APPROXIMATION BY SINGLE HIDDEN LAYER NETWORKS 5 polynomial of the form rk0 +rk1 x+x2 we associate the rational number [k0 ; k1 +2] = k0 + 1/(k1 + 2), and to each monic polynomial rk0 + rk1 x + . . . + rkl−2 xl−2 + rkl−1 xl−1 + xl of degree l ≥ 3 we associate the rational number [k0 ; k1 + 1, . . . , kl−2 + 1, kl−1 + 2]. In other words, we define u1 (x) := 1, un (x) := rqn −2 + x if qn ∈ Z, un (x) := rm0 + rm1 −2 x + x2 if qn = [m0 ; m1 ], and un (x) := rm0 + rm1 −1 x + . . . + rml−2 −1 xl−2 + rml−1 −2 xl−1 + xl if qn = [m0 ; m1 , . . . , ml−2 , ml−1 ] with l ≥ 3. For example, the first few elements of this sequence are 1, x2 , x, x2 − x, x2 − 1, x3 , x − 1, x2 + x, .... 3. We start with constructing σ on the intervals [(2n − 1)d, 2nd], n = 1, 2, . . .. For each monic polynomial un (x) = α0 + α1 x + . . . + αl−1 xl−1 + xl , set B1 := α0 + α1 − |α1 | αl−1 − |αl−1 | + ... + 2 2 and αl−1 + |αl−1 | α1 + |α1 | + ... + + 1. 2 2 Note that the numbers B1 and B2 depend on n. To avoid complication of symbols, we do not indicate this in the notation. Introduce the sequence B2 := α0 + Mn := h((2n + 1)d), n = 1, 2, . . . . Clearly, this sequence is strictly increasing and converges to 1. Now we define σ as the function  x σ(x) := an + bn un − 2n + 1 , x ∈ [(2n − 1)d, 2nd], (2.2) d where 1 h(3d) a1 := , b1 := , (2.3) 2 2 and (1 + 2Mn )B2 − (2 + Mn )B1 1 − Mn an := , bn := , n = 2, 3, . . . . 3(B2 − B1 ) 3(B2 − B1 ) (2.4) It is not difficult to notice that for n > 2 the numbers an , bn are the coefficients of the linear function y = an + bn x mapping the closed interval [B1 , B2 ] onto the closed interval [(1 + 2Mn )/3, (2 + Mn )/3]. Besides, for n = 1, i.e. on the interval [d, 2d], 1 + M1 . σ(x) = 2 Therefore, we obtain that 1 + 2Mn 2 + Mn h(x) < Mn < ≤ σ(x) ≤ < 1, (2.5) 3 3 for all x ∈ [(2n − 1)d, 2nd], n = 1, 2, . . .. 6 NAMIG J. GULIYEV AND VUGAR E. ISMAILOV 4. In this step, we construct σ on the intervals [2nd, (2n + 1)d], n = 1, 2, . . .. For this purpose we use the smooth transition function βa,b (x) := b − x) β(b , b − x) + β(x b − a) β(b where ( b β(x) := e−1/x , x > 0, 0, x ≤ 0. Obviously, βa,b (x) = 1 for x ≤ a, βa,b (x) = 0 for x ≥ b, and 0 < βa,b (x) < 1 for a < x < b. Set σ(2nd) + σ((2n + 1)d) , n = 1, 2, . . . . Kn := 2 Note that the numbers σ(2nd) and σ((2n + 1)d) have already been defined in the previous step. Since both the numbers σ(2nd) and σ((2n + 1)d) lie in the interval (Mn , 1), it follows that Kn ∈ (Mn , 1). First we extend σ smoothly to the interval [2nd, 2nd+d/2]. Take ε := (1−Mn )/6 and choose δ ≤ d/2 such that x  an + bn un − 2n + 1 − (an + bn un (1)) ≤ ε, x ∈ [2nd, 2nd + δ]. (2.6) d One can choose this δ as   εd d , , δ := min bn C 2 where C > 0 is a number satisfying |u0n (x)| ≤ C for x ∈ (1, 1.5). For example, for n = 1, δ can be chosen as d/2. Now define σ on the first half of the interval [2nd, (2n + 1)d] as the function σ(x) := Kn − β2nd,2nd+δ (x)  x  × Kn − an − bn un − 2n + 1 , d   d x ∈ 2nd, 2nd + . 2 (2.7) Let us prove that σ(x) satisfies the condition (2.1). Indeed, if 2nd + δ ≤ x ≤ 2nd + d/2, then there is nothing to prove, since σ(x) = Kn ∈ (Mn , 1). If 2nd ≤ x < 2nd + δ, then 0 < β2nd,2nd+δ (x) ≤ 1 and hence from (2.7) it follows that for each x ∈ [2nd,  2nd + δ), σ(x) is between the numbers Kn and An (x) := an + bn un xd − 2n + 1 . On the other hand, from (2.6) we obtain that an + bn un (1) − ε ≤ An (x) ≤ an + bn un (1) + ε,   n n which together with (2.2) and (2.5) yields An (x) ∈ 1+2M − ε, 2+M + ε for x ∈ 3 3 [2nd, 2nd + δ). Since ε = (1 − Mn )/6, the inclusion An (x) ∈ (Mn , 1) is valid. Now since both Kn and An (x) belong to (Mn , 1), we finally conclude that   d h(x) < Mn < σ(x) < 1, for x ∈ 2nd, 2nd + . 2 We define σ on the second half of the interval in a similar way: σ(x) := Kn − (1 − β(2n+1)d−δ,(2n+1)d (x))  x  × Kn − an+1 − bn+1 un+1 − 2n − 1 , d   d x ∈ 2nd + , (2n + 1)d , 2 ON THE APPROXIMATION BY SINGLE HIDDEN LAYER NETWORKS 7 where  δ := min εd d bn+1 C 2 ,  , ε := 1 − Mn+1 , 6 C ≥ sup |u0n+1 (x)|. [−0.5,0] One can easily verify, as above, that the constructed σ(x) satisfies the condition (2.1) on [2nd + d/2, 2nd + d] and     d d (i) σ 2nd + = Kn , σ 2nd + = 0, i = 1, 2, . . . . 2 2 Steps 3 and 4 construct σ on the interval [d, +∞). 5. On the remaining interval (−∞, d), we define σ as   b − x) 1 + M1 , x ∈ (−∞, d). σ(x) := 1 − β(d 2 It is not difficult to verify that σ is a strictly increasing, smooth function on (−∞, d). Note also that σ(x) → σ(d) = (1 + M1 )/2, as x tends to d from the left and σ (i) (d) = 0 for i = 1, 2, . . .. This final step completes the construction of σ on the whole real line. 3. Practical computation and properties of the constructed sigmoidal function It should be noted that the above algorithm allows one to compute the constructed σ at any point of the real axis instantly. The code of this algorithm is available at http://sites.google.com/site/njguliyev/papers/monic-sigmoidal. As a practical example, we give here the graph of σ (see Figure 3.1) and a numerical table (see Table 3.1) containing several computed values of this function on the interval [0, 20]. Figure 3.2 shows how the graph of λ-increasing function σ changes on the interval [0, 100] as the parameter λ decreases. The above σ obeys the following properties: (1) σ is sigmoidal; (2) σ ∈ C ∞ (R); (3) σ is strictly increasing on (−∞, d) and λ-strictly increasing on [d, +∞); (4) σ is easily computable in practice. All these properties are easily seen from the above exposition. But the essential property of our sigmoidal function is its ability to approximate an arbitrary continuous function using only a fixed number of translations and scalings of σ. More precisely, only two translations and scalings are sufficient. We formulate this important property as a theorem in the next section. 4. Main results The main results of the paper are formulated in the following two theorems. Theorem 4.1. Assume that f is a continuous function on a finite segment [a, b] of R and σ is the sigmoidal function constructed in Section 2. Then for any sufficiently small ε > 0 there exist constants c1 , c2 , θ1 and θ2 such that |f (x) − c1 σ(x − θ1 ) − c2 σ(x − θ2 )| < ε for all x ∈ [a, b]. 8 NAMIG J. GULIYEV AND VUGAR E. ISMAILOV Figure 3.1. The graph of σ on [0, 20] (d = 2, λ = 1/4) Table 3.1. Some computed values of σ (d = 2, λ = 1/4) t 0.0 0.4 0.8 1.2 1.6 2.0 2.4 2.8 3.2 3.6 σ 0.37462 0.44248 0.53832 0.67932 0.87394 0.95210 0.95210 0.95210 0.95210 0.95210 t 4.0 4.4 4.8 5.2 5.6 6.0 6.4 6.8 7.2 7.6 σ 0.95210 0.95146 0.95003 0.95003 0.94924 0.94787 0.94891 0.95204 0.95725 0.96455 t 8.0 8.4 8.8 9.2 9.6 10.0 10.4 10.8 11.2 11.6 σ 0.97394 0.96359 0.96359 0.96314 0.95312 0.95325 0.95792 0.96260 0.96727 0.97195 t 12.0 12.4 12.8 13.2 13.6 14.0 14.4 14.8 15.2 15.6 σ 0.97662 0.97848 0.97233 0.97204 0.97061 0.96739 0.96565 0.96478 0.96478 0.96565 t 16.0 16.4 16.8 17.2 17.6 18.0 18.4 18.8 19.2 19.6 σ 0.96739 0.96309 0.96309 0.96307 0.96067 0.95879 0.95962 0.96209 0.96621 0.97198 Proof. Set d := b − a and divide the interval [d, +∞) into the segments [d, 2d], [2d, 3d], . . .. It follows from (2.2) that σ(dx + (2n − 1)d) = an + bn un (x), x ∈ [0, 1] (4.1) for n = 1, 2, . . .. Here an and bn are computed by (2.3) and (2.4) for n = 1 and n > 1, respectively. From (4.1) it follows that for each n = 1, 2, . . ., un (x) = an 1 σ(dx + (2n − 1)d) − . bn bn (4.2) Let now g be any continuous function on the unit interval [0, 1]. By the density of polynomials with rational coefficients in the space of continuous functions over any compact subset of R, for any ε > 0 there exists a polynomial p(x) of the above form such that |g(x) − p(x)| < ε ON THE APPROXIMATION BY SINGLE HIDDEN LAYER NETWORKS 9 Figure 3.2. The graph of σ on [0, 100] (d = 2) for all x ∈ [0, 1]. Denote by p0 the leading coefficient of p. If p0 6= 0 (i.e., p 6≡ 0) then we define un as un (x) := p(x)/p0 , otherwise we just set un (x) := 1. In both cases |g(x) − p0 un (x)| < ε, x ∈ [0, 1]. This together with (4.2) means that |g(x) − c1 σ(dx − s1 ) − c0 | < ε for some c0 , c1 , s1 ∈ R and all x ∈ [0, 1]. Namely, c1 = p0 /bn , s1 = d − 2nd and c0 = p0 an /bn . On the other hand, we can write c0 = c2 σ(dx − s2 ), where 10 NAMIG J. GULIYEV AND VUGAR E. ISMAILOV c2 := 2c0 /(1 + h(3d)) and s2 := −d. Hence, |g(x) − c1 σ(dx − s1 ) − c2 σ(dx − s2 )| < ε. (4.3) Note that (4.3) is valid for the unit interval [0, 1]. Using linear transformation it is not difficult to go from [0, 1] to the interval [a, b]. Indeed, let f ∈ C[a, b], σ be constructed as above, and ε be an arbitrarily small positive number. The transformed function g(x) = f (a + (b − a)x) is well defined on [0, 1] and we can apply the inequality (4.3). Now using the inverse transformation x = (t−a)/(b−a), we can write |f (t) − c1 σ(t − θ1 ) − c2 σ(t − θ2 )| < ε for all t ∈ [a, b], where θ1 = a + s1 and θ2 = a + s2 . The last inequality completes the proof.  Since any compact subset of the real line is contained in a segment [a, b], the following generalization of Theorem 4.1 holds. Theorem 4.2. Let Q be a compact subset of the real line and d be its diameter. Let λ be any positive number. Then one can algorithmically construct a computable sigmoidal activation function σ : R → R, which is infinitely differentiable, strictly increasing on (−∞, d), λ-strictly increasing on [d, +∞), and satisfies the following property: For any f ∈ C(Q) and ε > 0 there exist numbers c1 , c2 , θ1 and θ2 such that |f (x) − c1 σ(x − θ1 ) − c2 σ(x − θ2 )| < ε for all x ∈ Q. Remark 4.1. The idea of using monic polynomials (see Section 2 and the proof above) is new in the numerical analysis of neural networks with limited number of hidden neurons. In fact, if one is interested more in a theoretical than in a practical result, then any countable dense subset of C[0, 1] suffices. Maiorov and Pinkus [28] used such a subset to prove existence of a sigmoidal, monotonic and analytic activation function, and consequently a neural network with a fixed number of hidden neurons, which approximates arbitrarily well any continuous function. Note that the result is of theoretical value and the authors of [28] do not suggest constructing and using their sigmoidal function. In our previous work [12], we exploited a sequence of all polynomials with rational coefficients to construct a new universal sigmoidal function. Note that in [12] the problem of fixing weights in approximation by neural networks was not considered. Although the construction was efficient in the sense of computation of that sigmoidal function, some difficulties appeared while computing an approximating neural network parameters for some relatively simple approximated functions (see Remark 2 in [12]). This was a reason why we avoided giving practical numerical examples. The usage of monic polynomials in this instance turned out to be advantageous in reducing “running time” of the algorithm for computing the mentioned network parameters. This allows one to approximate various functions with sufficiently small precision and obtain all the required parameters (scaling coefficients and thresholds) in practice. We give corresponding numerical results in the next section. ON THE APPROXIMATION BY SINGLE HIDDEN LAYER NETWORKS 11 5. Numerical results We prove in Theorem 4.1 that any continuous function on [a, b] can be approximated arbitrarily well by SLFNs with the fixed weight 1 and with only two neurons in the hidden layer. An activation function σ for such a network is constructed in Section 2. We have seen from the proof that our approach is totally constructive. One can evaluate the value of σ at any point of the real axis and draw its graph instantly using the programming interface at the URL shown at the beginning of Section 3. In the current section, we demonstrate our result in various examples. For different error bounds we find the parameters c1 , c2 , θ1 and θ2 in Theorem 4.1. All computations were done in SageMath [33]. For computations, we use the following algorithm, which works well for analytic functions. Assume f is a function, whose Taylor series around the point (a + b)/2 converges uniformly to f on [a, b], and ε > 0. (1) Consider the function g(t) := f (a + (b − a)t), which is well-defined on [0, 1]; (2) Find k such that the k-th Taylor polynomial  i k X 1 g (i) (1/2) x− Tk (x) := i! 2 i=0 satisfies the inequality |Tk (x) − g(x)| ≤ ε/2 for all x ∈ [0, 1]; (3) Find a polynomial p with rational coefficients such that ε |p(x) − Tk (x)| ≤ , x ∈ [0, 1], 2 and denote by p0 the leading coefficient of this polynomial; (4) If p0 6= 0, then find n such that un (x) = p(x)/p0 . Otherwise, set n := 1; (5) For n = 1 and n > 1 evaluate an and bn by (2.3) and (2.4), respectively; (6) Calculate the parameters of the network as p0 2p0 an c1 := , , θ1 := b − 2n(b − a), θ2 := 2a − b; c2 := bn bn (1 + h(3d)) (7) Construct the network N = c1 σ(x − θ1 ) + c2 σ(x − θ2 ). Then N gives an ε-approximation to f. In the sequel, we give four practical examples. To be able to make comparisons between these examples, all the considered functions are given on the same interval [−1, 1]. First we select the polynomial function f (x) = x3 + x2 − 5x + 3 as a target function. We investigate the sigmoidal neural network approximation to f (x). This function was also considered in [13]. Note that in [13] the authors chose the sigmoidal function as ( 1, if x ≥ 0, σ(x) = 0, if x < 0, and obtained the numerical results (see Table 5.1) for SLFNs with 8, 32, 128, 532 neurons in the hidden layer (see also [2] for an additional constructive result concerning the error of approximation in this example). As it is seen from the table, the number of neurons in the hidden layer increases as the error bound decreases in value. This phenomenon is no longer true for our sigmoidal function (see Section 2). Using Theorem 4.1, we can construct explicitly an SLFN with only two neurons in the hidden layer, which approximates the above polynomial with arbitrarily given precision. Here by explicit construction we mean 12 NAMIG J. GULIYEV AND VUGAR E. ISMAILOV Table 5.1. The Heaviside function as a sigmoidal function N 2 4 8 16 Number of neurons (2N 2 ) Maximum error 8 0.666016 32 0.165262 128 0.041331 512 0.010333 Table 5.2. Several ε-approximators of the function 1 + x + x2 /2 + x3 /6 + x4 /24 + x5 /120 + x6 /720 Number of neurons 2 2 2 2 2 2 Parameters of the network c1 c2 θ1 2.0619 × 102 2.1131 × 102 −1979 5.9326 × 102 6.1734 × 102 −1.4260 × 108 1.4853 × 103 1.5546 × 103 −4.0140 × 1022 5.1231 × 102 5.3283 × 102 −3.2505 × 107 4.2386 × 103 4.4466 × 103 −2.0403 × 1065 2.8744 × 104 3.0184 × 104 −1.7353 × 10442 θ2 −3 −3 −3 −3 −3 −3 Maximum error 0.95 0.60 0.35 0.10 0.04 0.01 that all the network parameters can be computed directly. Namely, the calculated values of these parameters are as follows: c1 ≈ 2059.373597, c2 ≈ −2120.974727, θ1 = −467, and θ2 = −3. It turns out that for the above polynomial we have an exact representation. That is, on the interval [−1, 1] we have the identity x3 + x2 − 5x + 3 ≡ c1 σ(x − θ1 ) + c2 σ(x − θ2 ). Let us now consider the other polynomial function x2 x3 x4 x5 x6 + + + + . 2 6 24 120 720 For this function we do not have an exact representation as above. Nevertheless, one can easily construct a ε-approximating network with two neurons in the hidden layer for any sufficiently small approximation error ε. Table 5.2 displays numerical computations of the network parameters for six different approximation errors. At the end we consider the nonpolynomial functions f (x) = 4x/(4 + x2 ) and f (x) = sin x − x cos(x + 1). Tables 5.3 and 5.4 display all the parameters of the ε-approximating neural networks for the above six approximation error bounds. As it is seen from the tables, these bounds do not alter the number of hidden neurons. Figures 5.1, 5.2 and 5.3 show how graphs of some constructed networks N approximate the corresponding target functions f . f (x) = 1 + x + 6. Analysis of the multivariate case In this section, we want to draw the reader’s attention to the following question. Do SLFNs with fixed weights preserve their universal approximation property in the multivariate setting? That is, if networks of the form h(x) = r X i=1 ci σ(w · x − θi ), (6.1) ON THE APPROXIMATION BY SINGLE HIDDEN LAYER NETWORKS 13 Figure 5.1. The graphs of f (x) = 1 + x + x2 /2 + x3 /6 + x4 /24 + x5 /120 + x6 /720 and some of its approximators (λ = 1/4) Table 5.3. Several ε-approximators of the function 4x/(4 + x2 ) Number of Parameters of the neurons c1 c2 2 1.5965 × 102 1.6454 × 102 2 1.5965 × 102 1.6454 × 102 3 2 −1.8579 × 10 −1.9428 × 103 2 1.1293 × 104 1.1842 × 104 4 2 2.6746 × 10 2.8074 × 104 6 2 −3.4218 × 10 −3.5939 × 106 network θ1 −283 −283 −6.1840 × 1011 −4.6730 × 1034 −6.8296 × 1082 −2.9305 × 104885 θ2 −3 −3 −3 −3 −3 −3 Maximum error 0.95 0.60 0.35 0.10 0.04 0.01 Table 5.4. Several ε-approximators of the function sin x − x cos(x + 1) Number of neurons 2 2 2 2 2 2 c1 8.950 × 103 3.145 × 103 1.649 × 105 −4.756 × 107 −1.241 × 107 1.083 × 109 Parameters of the network c2 θ1 9.390 × 103 −3.591 × 1053 3.295 × 103 −3.397 × 1023 1.732 × 105 −9.532 × 101264 −4.995 × 107 −1.308 × 10180281 −1.303 × 107 −5.813 × 1061963 1.138 × 109 −2.620 × 105556115 θ2 −3 −3 −3 −3 −3 −3 Maximum error 0.95 0.60 0.35 0.10 0.04 0.01 where the weight w ∈ Rd is fixed for all units of the hidden layer, but which may be different for different networks h, can approximate any continuous multivariate function f (x1 , . . . , xd ), d > 1, within arbitrarily small tolerance? Note that if w is fixed for all h, then it is obvious that there is a multivariate function which cannot be approximated by networks of the form (6.1). Indeed, the linear functional F (f ) = f (x1 ) − f (x2 ), 14 NAMIG J. GULIYEV AND VUGAR E. ISMAILOV Figure 5.2. The graphs of f (x) = 4x/(4 + x2 ) and some of its approximators (λ = 1/4) Figure 5.3. The graphs of f (x) = sin x − x cos(x + 1) and some of its approximators (λ = 1/4) where x1 and x2 are selected so that w · x1 = w · x2 , annihilates all functions h. Since the functional F is nontrivial, the set of all functions h, which we denote in the sequel by H, is not dense in C(Q) for an arbitrary compact set Q containing the points x1 and x2 ; hence approximation to all continuous functions cannot be possible on such compact sets Q. The above question, in the case where w is different for different networks h, is rather complicated. The positive answer to this question would mean, for example, that Theorem 1.1 admits a generalization to d-variable functions. Unfortunately, our answer to this question is negative. The details are as follows. Each summand in (6.1) is a function depending on the inner product w · x. Thus, the whole sum itself, i.e. the function h(x) is a function of the form g(w · x). Note that functions of the form g(w · x) are called ridge functions. ON THE APPROXIMATION BY SINGLE HIDDEN LAYER NETWORKS 15 The literature abounds with the use of such functions and their linear combinations (see, e.g., [18, 31] and a great deal of references  therein). We see that the set H is a subset of the set of ridge functions R := g(w · x) : w ∈ Rd \ {0}, g ∈ C(R) . Along with R, let us also consider the sets ( k ) X Rk := gi (wi · x) : wi ∈ Rd \ {0}, gi ∈ C(R), i = 1, . . . , k . i=1 Note that in Rk we vary over both the vectors wi and the functions gi , whilst k is fixed. Clearly, R = R1 . In [27], Lin and Pinkus proved that for any k ∈ N, there exists a function f ∈ C(Rd ) and a compact set Q ⊂ Rd such that inf kf − gk > 0. g∈Rk Here k·k denotes the uniform norm. It follows from this result that for each k ∈ N the set Rk (hence R) is not dense in C(Rd ) in the topology of uniform convergence on compacta. Since H ⊂ R, we obtain that the set H cannot be dense either. Thus there are always continuous multivariate functions which cannot be approximated arbitrarily well by SLFNs with fixed weights. This phenomenon justifies why we and the other researchers (see Introduction) investigate universal approximation property of such networks only in the univariate case. The above analysis leads us to the following general negative result on the approximation by SLFNs with limited weights. Theorem 6.1. For any continuous function σ : R → R, there is a multivariate continuous function which cannot be approximated arbitrarily well by neural networks of the form r X ci σ(wi · x − θi ), (6.2) i=1 where we vary over all r ∈ N, ci , θi ∈ R, wi ∈ Rd , but the number of pairwise independent vectors (weights) wi in each network (6.2) is uniformly bounded by some positive integer k (which is the same for all networks). This theorem shows a particular limitation of neural networks with one hidden layer. We refer the reader to [5, 25] for interesting results and discussions around other limitations of such networks. Acknowledgements The research of the second author was supported by the Azerbaijan National Academy of Sciences under the program “Approximation by neural networks and some problems of frames”. References [1] N. Calkin and H. S. Wilf, Recounting the rationals, Amer. Math. Monthly 107 (2000), 360– 367. [2] F. Cao and T. Xie, The construction and approximation for feedforword neural networks with fixed weights, Proceedings of the ninth international conference on machine learning and cybernetics, Qingdao, 2010, pp. 3164–3168. [3] T. Chen and H. Chen, Approximation of continuous functionals by neural networks with application to dynamic systems, IEEE Trans. Neural Networks 4 (1993), 910–918. 16 NAMIG J. GULIYEV AND VUGAR E. ISMAILOV [4] C. K. Chui and X. Li, Approximation by ridge functions and neural networks with one hidden layer, J. Approx. Theory 70 (1992), 131–141. [5] C. K. Chui, X. Li and H. N. Mhaskar, Limitations of the approximation capabilities of neural networks with one hidden layer, Adv. Comput. Math. 5 (1996), no. 2-3, 233–243. [6] D. Costarelli and R. Spigler, Constructive approximation by superposition of sigmoidal functions, Anal. Theory Appl. 29 (2013), 169–196. [7] N. E. Cotter, The Stone–Weierstrass theorem and its application to neural networks, IEEE Trans. Neural Networks 1 (1990), 290–295. [8] G. Cybenko, Approximation by superpositions of a sigmoidal function, Math. Control Signal Systems 2 (1989), 303–314. [9] S. Draghici, On the capabilities of neural networks using limited precision weights, Neural Networks 15 (2002), 395–414. [10] K. Funahashi, On the approximate realization of continuous mapping by neural networks, Neural Networks 2 (1989), 183–192. [11] A. R. Gallant and H. White, There exists a neural network that does not make avoidable mistakes, Proceedings of the IEEE 1988 international conference on neural networks, vol. 1, IEEE Press, New York, 1988, pp. 657–664. [12] N. J. Guliyev and V. E. Ismailov, A single hidden layer feedforward network with only one neuron in the hidden layer can approximate any univariate function, Neural Computation 28 (2016), no. 7, 1289–1304. arXiv:1601.00013 [13] N. Hahm and B.I. Hong, An approximation by neural networks with a fixed weight, Comput. Math. Appl. 47 (2004), no. 12, 1897–1903. [14] K. Hornik, Approximation capabilities of multilayer feedforward networks, Neural Networks 4 (1991), 251–257. [15] A. Iliev, N. Kyurkchiev and S. Markov, On the approximation of the step function by some sigmoid functions, Math. Comput. Simulation 133 (2017), 223–234. [16] V. E. Ismailov, Approximation by neural networks with weights varying on a finite set of directions, J. Math. Anal. Appl. 389 (2012), no. 1, 72–83. [17] , Approximation by ridge functions and neural networks with a bounded number of neurons, Appl. Anal. 94 (2015), no. 11, 2245–2260. , Approximation by sums of ridge functions with fixed directions (Russian), Algebra [18] i Analiz, 28 (2016), no. 6, 20–69. [19] V. E. Ismailov and E. Savas, Measure theoretic results for approximation by neural networks with limited weights, Numer. Funct. Anal. Optim. 38 (2017), no. 7, 819–830. [20] Y. Ito, Approximation of continuous functions on Rd by linear combinations of shifted rotations of a sigmoid function with and without scaling, Neural Networks 5 (1992), 105–115. [21] B. Jian, C. Yu and Y. Jinshou, Neural networks with limited precision weights and its application in embedded systems, Proceedings of the the second international workshop on education technology and computer science, Wuhan, 2010, pp. 86–91. [22] V. Kůrková, Kolmogorov’s theorem and multilayer neural networks, Neural Networks 5 (1992), 501–506. [23] M. Leshno, V. Ya. Lin, A. Pinkus and S. Schocken, Multilayer feedforward networks with a non-polynomial activation function can approximate any function, Neural Networks 6 (1993), 861–867. [24] Y. Liao, S.-C. Fang and H. L. W. Nuttle, A neural network model with bounded-weights for pattern classification, Comput. Oper. Res. 31 (2004), 1411–1426. [25] S. Lin, Limitations of shallow nets approximation, Neural Networks 94 (2017), 96–102. [26] S. Lin, X. Guo, F. Cao and Z. Xu, Approximation by neural networks with scattered data Appl. Math. Comput. 224 (2013), 29–35. [27] V. Ya. Lin and A. Pinkus, Fundamentality of ridge functions, J. Approx. Theory 75 (1993), 295–311. [28] V. Maiorov and A. Pinkus, Lower bounds for approximation by MLP neural networks, Neurocomputing 25 (1999), 81–91. [29] H. N. Mhaskar and C. A. Micchelli, Approximation by superposition of a sigmoidal function and radial basis functions, Adv. Appl. Math. 13 (1992), 350–373. [30] A. Pinkus, Approximation theory of the MLP model in neural networks, Acta numerica, 1999, Cambridge Univ. Press, Cambridge, 1999, pp. 143–195. [31] , Ridge functions, Cambridge University Press, Cambridge, 2015. ON THE APPROXIMATION BY SINGLE HIDDEN LAYER NETWORKS 17 [32] P. C. Sikkema, Der Wert einiger Konstanten in der Theorie der Approximation mit Bernstein-Polynomen, Numer. Math. 3 (1961), 107–116. [33] W. A. Stein et al., Sage Mathematics Software (Version 7.6), The Sage Developers, 2017, http://www.sagemath.org. [34] M. Stinchcombe and H. White, Approximating and learning unknown mappings using multilayer feedforward networks with bounded weights, Proceedings of the 1990 IEEE international joint conference on neural networks, vol. 3, IEEE, New York, 1990, pp. 7–16. Institute of Mathematics and Mechanics, Azerbaijan National Academy of Sciences, 9 B. Vahabzadeh str., AZ1141, Baku, Azerbaijan. E-mail address: [email protected] Institute of Mathematics and Mechanics, Azerbaijan National Academy of Sciences, 9 B. Vahabzadeh str., AZ1141, Baku, Azerbaijan. E-mail address: [email protected]
7cs.IT
Robust Specification Mining from Demonstrations Marcell Vazquez-Chanlatte1 , Susmit Jha2 , Ashish Tiwari2 , and Sanjit A. Seshia1 arXiv:1710.03875v2 [cs.LG] 14 Feb 2018 1 University of California, Berkeley {marcell.vc,sseshia}@eecs.berkeley.edu 2 SRI International, Menlo Park, {jha,tiwari}@csl.sri.com Abstract. We consider the problem of inferring temporal specifications from demonstrations by an agent interacting with an uncertain, stochastic environment. Such specifications are useful for correct-by-construction control of autonomous systems operating in uncertain environments. Some demonstrations may have errors, and the specification inference method must be robust to them. We provide a novel formulation of the problem as a maximum a posteriori (MAP) probability inference problem, and give an efficient approach to solve this problem, demonstrated by case studies inspired by robotics. 1 Introduction Formal specifications, precise mathematical descriptions of desired system properties, play a central role in formal methods. Not all specifications are equally useful. Having the right specification at the right level of abstraction can turn an intractable problem into a tractable one, and an infeasible problem into a solvable one. However, finding the right specification is hard in practice, as has been well-documented in the literature (e.g. [2]). In particular, in many settings, e.g., robotics, the most natural way to specify the task is through demonstrations. In this setting, an agent (e.g., human expert) gives one or more demonstrations of the task from which we must automatically synthesize a controller for the robot to execute. This setting requires a way to generalize from specific demonstrations to a broader task specification. The field of specification mining attempts to address these problems by positing that data-driven techniques can conjecture (“mine”) useful specifications from available data. One can characterize these techniques by (i) how/if they use labeled data; (ii) how many types of labels are possible; (iii) the class of specifications considered; (iv) how the underlying data is generated, and (v) the ability to handle inconsistencies in that data. We motivate these issues with an example. Example 1. Consider a remote controlled omnidirectional robot placed on a 2x2 elevated platform (white cells). If the robot moves off the grid, it falls from the platform and cannot move. At each time step, the robot is capable of moving forward, backward, diagonally, side-to-side, or staying in place. When an action is performed, there is a small chance of performing a different action (called the slip probability). The operator of the robot is tasked with the following (time-sensitive) assignment: Move to the southeast cell, stay in the cell for one second, move to the northwest cell, and stay in the northwest cell for one second. Suppose we wish to infer the specification intended by the operator providing the demonstrations (experiments). Crucially, because the robot can slip at any time step, Fig. 1: Illustration of the running grid world example. Left: Grid world with cells annotated with coordinates. White cells indicate the platform. Right: Example trajectory in running example specification. the demonstrations (as seen by an observer) can include executions that violate the specification the operator has in mind. However, if the slip probability is very low, a demonstration will succeed with high probability. Thus, an algorithm with some information about the environment may be able to conclude that the slip was unintentional and discount the buggy demonstration. In other words, the algorithm can be robust to erroneous demonstrations, as long as such errors are infrequent. More abstractly, one can imagine the specification mining task as an interaction between the agent demonstrating the task (“teacher”) and a “student”. The teacher interacts with an environment to provide a series of demonstrations, that may include some erroneous demonstrations. The student then observes the demonstrations (possibly without labels) and attempts to robustly infer the intended (“correct”) specification. This is the problem setting considered in this paper. One application of this problem is for temporal logic based planning in uncertain, stochastic environments (e.g.,see [22], [7], [8]), where inferred formal specifications can be used to synthesize controllers with provable guarantees. Related Work: The field of specification inference is a vast one, going back several decades (e.g., see [21,5]). For lack of space, we point the reader elsewhere, e.g., [14], for a detailed survey. We focus here on the most closely related work that shares the following key characteristics of our problem: (i) the demonstrations are traces intended to be positive examples, but otherwise unlabeled; (ii) the underlying system generating the demonstration is stochastic; (iii) the specification is a set of traces, and (iv) there can be inconsistencies in the data (i.e., unlabeled negative examples). Such demonstrations can be viewed as positive examples, with “noise”, and thus literature on learning from positive examples is relevant. Previous works have tuned parametric specifications using only positive examples [1], used Linear Temporal Logic (LTL) templates to find the specification that minimizes the number of times the property was violate and maximizes the number of times the specification was satisfied [13], inferred the specification that minimizes the mis-classification rate within a grammar given positive and negative examples via optimization [11], or based on decision trees [4] or genetic algorithms [19]. Similarly, there is recent work on learning temporal properties from unlabeled data by adapting clustering techniques either to directly work within the parameter space [20] or as a post processing step from hierarchical cluster- ing dendograms [3]. However, these techniques are purely data-driven, and make no assumptions about a model of system generating the traces. For this reason, no formal guarantees are provable. The closest work to ours is recent work on inferring LTL by finding the specification that minimizes the expected number of violations by an optimal agent and the expected number of violations by an agent applying actions uniformly at random [10]. The violation measure is defined as the minimum number of time steps that must be skipped over for the demonstration to satisfy a temporal logic specification. For arbitrary specifications, the violation measure of bounded length demonstration is however not well defined. The computation of the optimal agent’s expected violations is done via dynamic programming on the product of the deterministic Rabin automaton of the specification and the state dynamics. While powerful, this procedure incurs a heavy run-time cost even on simple two state and two action Markov Decision Processes (MDPs). The authors then apply genetic algorithms to generate a series of specifications and compute the costs to find the minimium. Contributions: Our work contributes to the state of the art in specification inference from demonstrations given in a stochastic environment in the following key ways: • We present a novel formulation of the problem of learning specifications from unlabeled demonstrations in a stochastic environment as a maximum a posteriori (MAP) probability inference problem [17]. Our formulation covers a broad class of boundedtime trace properties, including those not specified in temporal logics. • Inspired by the effectiveness of maximum entropy inverse reinforcement learning [23] in the artificial intelligence and robotics literature (e.g., [18]), we apply the principle of maximum entropy to our problem. In particular, we introduce a new teacher model we term the maximum entropy teacher. We find a simple analytic formula for the likelihood of the demonstrations given the satisfaction rate on the demonstrations and the satisfaction rate of a random action policy. • We exploit the structure in the maximum entropy teacher model to design an algorithm to efficiently search a candidate set of specifications, in which some subset relations between specifications are known. We demonstrate our algorithm on case studies. Additional contributions include providing a reduction from learning specifications from expert demonstrations to inverse reinforcement learning and recovering cost functions used in other specification mining algorithms as special cases. This includes characterizing when finding the most likely demonstrations from a violation minimizing agent coincides with the maximum entropy teacher. Outline: In Sec 2 we introduce the problem of Specification Inference from Demonstrations. In Sec 2.1 we show that this problem is special case of reinforcement learning, but a naive reduction is intractable to solve. In Sec 3 we introduce and specialize to the maximum entropy teacher model. We show how this model can be used to motivate or derive existing cost functions in literature. In Sec 4 we exploit the special structure induced by the maximum entropy teacher model to efficiently do robust specification inference from demonstrations on very general classes of bounded specifications. Finally, in Sec 5 we demonstrate the performance of the algorithm on a larger variant of the grid world , profile how much better the algorithm performs than brute force and our worst case bounds on two families of specification classes of varying size, and perform a comparison with the violation minimizing agent model. 2 Specification Inference from Demonstrations In this section, we formulate the problem of inferring a specification from demonstrations and present a formal definition of the problem. As illustrated in Ex 1, the demonstrations are provided by a teacher. The teacher operates in a possibly stochastic environment, and executes a sequence of actions where each action probabilistically changes the system state. For simplicity, we assume that the set of actions and states are finite, and the system states and actions are observable in the provided demonstration. The system is naturally modeled as a probabilistic automaton formally defined below: Definition 1 (Probabilistic Automaton). A probabilistic automaton is a tuple M = (S, s0 , A, δ), where S is the finite set of states, s0 ∈ S is the starting state, A is the finite set of actions, and δ : S × A × S → [0, 1] specifies the transition X probability of 0 0 0 0 going from s to s given action a, i.e. δ(s, a, s ) = P (s | s, a) and P (s | s, a) = 1 s0 ∈S for all states s. Remark 1. A probabilistic automaton can be extended to a Markov Decision Process (MDP) by adding a Markovian reward function that only depends on the current state and action. In this paper, we aim at learning temporal specifications and consequently, the reward corresponding to these specifications can be non-Markovian and depend on the sequence of states and actions. Example 2 (Grid World). The robot operating in a grid world in Ex 1 can be formalized def 2 as a probablistic automaton as follows: Let platform = {0, 1} be the platform grid def 2 cells and fallen = {−1, 0, 1, 2} \ platform denote the square ring surrounding the platform. If a robot enters fallen, it is assumed to have fallen off of the platform. The initial state s0 is a special state from which any action transitions to the robot occupying def one of the four cells in platform. So, the overall set of states is S = platform ∪ fallen ∪ def 2 {s0 }. The set of actions A = {0, 1, −1} correspond to staying in place (for a = (0, 0)) or moving from cell s to cell s + a. Finally, let p ∈ [0, 1] be the probability def that the robot slips, uniformly transitioning to a neighboring cell, Neighbor(s, a) = 0 0 0 0 {s ∈ S | ∃a ∈ A \ {a} . s = s + a }. Finally, the transition function is:  1/4      1 def δ(s, a, s0 ) = p/8    1−p    0 s = s0 ∧ s0 ∈ platform s ∈ fallen ∧ s0 = s s ∈ platform ∧ s0 ∈ Neighbors(s, a) s ∈ platform ∧ s0 = s + a otherwise (1) Definition 2 (Trace). A sequence of state/action pairs is called a trace. A trace of length τ ∈ N is an element of (S × A)τ . Traces, state sequences, and action sequences will be bolded. Remark 2. We employ the order preserving isomorphism (S × A)τ ' S τ × Aτ to sometimes write a trace x = (s1 , a1 ) . . . , (sτ , aτ ) as (s1 , . . . , sτ ) × (a1 , . . . , aτ ) = s×a. This enables pattern matching to refer to the state and action sequences separately. Next, we develop machinery to distinguish between desirable and undesirable traces. For simplicity, we focus on trace properties that are decidable within some fixed τ ∈ N time steps, and leave general specifications over infinite sequences as future work. For example, we do not allow “eventually event A will occur”, but do allow “event A will occur before step 20”. We formalize these bounded-time trace properties as sets. Definition 3 (Bounded Specification). Given a set of states S, a set of actions A, and a fixed trace length τ ∈ N, a bounded specification, φ, is a subset of (S × A)τ . Further, def def def we define True = (S × A)τ , False = ∅, and ¬φ = True \ φ. Specifications may be given as in any formal notation, as sets, logical formulas, or automata. Example 3. We now formalize the experiment specification given in Ex 1. Let M = (S, A, s0 , δ) be the grid world from Ex 2. Let se = (1, 1) and nw = (0, 0) denote the southeast and northwest corners resp. Let s[2 : 5] denote the sub-sequence of s from t = 2 to t = 5. Consider the specification:  φ∗ = s × a ∈ (S × A)6 | s[2 : 5] = (se, se, nw, nw) (2) This denotes all traces that spawn into the grid world (t = 0 and t = 1), move to the southeast corner (t = 2), stay put (t = 3), move to the northwest corner (t = 4), and then stay put again (t = 5). The next example illustrates, perhaps unsurprisingly, that any exact learning technique that relies strictly on positive examples is incredibly fragile when demonstrations are imperfect, mislabeled, or given in a stochastic enviroment. Example 4. Let φ∗ be the specification given in Ex 3 where the agent visits the southeast and then northwest corners of the grid world from Ex 2. Denote by Y = {y 1 , y 2 , y 3 , y 4 , y 5 } a series of five demonstrations, four of which satisfy φ∗ without slipping and one, y 5 , which slips at t = 4, resulting in the robot falling off of the grid (thus not satisfying φ∗ ). Suppose one is told that the correct specification lies within the set: Φ = {True, ¬ {y 1 } , φ∗ } (3) An algorithm that naively assumes that all demonstrations are positive examples would rule out φ∗ and {y 1 } as y 5 ∈ / φ∗ or {y 1 }, and thus must incorrectly select True. Crucially, adding more demonstrations does not salvage the previous example. If Y contained 1010 correct demonstrations and only 1 incorrect demonstration resulting from a slip, the above logic holds. More generally, the algorithm must take into account the intent of the agent in addition to the outcome. A first step is to formalize the idea of the strategy or policy the agent uses to satisfy the specification. Formally, a policy determines which action to take next, and can in general be stochastic or depend on the sequence of previous states and actions (called the history). Definition 4 (Policies). A policy is a collection of distributions over actions indexed by the history: ! [ τ π: (S × A) × A → [0, 1] (4) τ ∈N We denote the collection of all policies by Π. Example 5. Let M be a grid world transition system. A possible policy is:  9/10 if |x| is prime and a = (1, 0)    1/10 if |x| is prime and a = (0, 1) π(x, a) =  1 if |x| is not prime and a = (1, 0)    0 otherwise (5) A teacher model attaches to each specification, φ, the policy the teacher would use to demonstrate φ within a particular probabilistic automaton. Definition 5 (Teacher Model). Let M be a set of transition systems and Φ be the set of candidate specifications. A teacher model is a map T : M × Φ → Π, that associates with each transition system/specification pair a unique policy. Remark 3. The above definition makes no presumptions about the quality of the demonstrations given by a teacher. For example, this model allows the teacher to occasionally make mistakes. Given a fixed a teacher model, transition system, and specification, one obtains a teaching policy which induces a stationary distribution over the set of traces. Definition 6 (Trace Distributions). Given a policy π, a transition system M , and a length τ ∈ N, the induced distribution (M ◦τ π) : (S × A)τ → [0, 1] over traces of length τ is given by: (M ◦τ π)(x) = τY −1 δ(si , a, si+1 )π(x[: i], a) (6) i=0 where x[: i] denotes the i length prefix of x = s × a. If τ is obvious from context or not important, we will often just write M ◦ π. Formally, our learning problem is a Maximum a Posteriori Probability (MAP) inference problem: Definition 7 (Specification Inference from Demonstrations). The specification inference from demonstrations problem is a four tuple (M, T, Y, Φ) where 1. M = (S, s0 , A, δ) is a probabilistic automaton. 2. T is a Teacher Model. 3. Y is a sequence of τ length demonstrations drawn from an unknown distribution M ◦ T (M, ϕ) induced by some unknown specification ϕ. τ 4. Φ ⊆ 2(S×A) is a family of bounded specifications. The solution to (M, T, Y, Φ) is: φ∗ ∈ arg max P (φ|Y, M ◦ T (M, φ)) (7) φ∈Φ where P (φ|Y, M ◦ T (M, φ)) denotes the probability that the teacher used specification φ to generate demonstrations given that the demonstrations Y were observed. 2.1 Reduction to Inverse Reinforcement Learning Def 7 is intimately related to problem known as Inverse Reinforcement Learning (IRL) [16]. Definition 8 (Inverse Reinforcement Learning). An Inverse Reinforcement Learning Problem is a four tuple (M, T, Y, R) where 1. 2. 3. 4. M is a set of probabilistic automaton with states S and actions A. M = (S, s0 , A, δ) is a probabilistic automaton from M. R is a family of state reward functions R : S → R. Each state reward function R maps to a trace reward function: def R̂(s) = τ X R(si ) (8) i∈1 5. The family of trace reward functions induced by R is denoted R̂. 6. T : M × R̂ → Π is an (IRL) Teacher Model. 7. Y is a sequence of τ length demonstrations drawn from an unknown distribution M ◦ T (M, R̂) induced by some unknown state reward function R. The solution to (M, T, Y, R) is R∗ ∈ arg maxR∈R P (R|Y, M ◦ T (M, R̂)) Next , we show that Def 7 is a special case of Def 8. Theorem 1. Given a specification inference from demonstrations problem (M, T, Y, Φ) (Def 7), there is a reduction to an IRL problem whose solution reward function maps to a solution specification of (M, T, Y, Φ). τ Proof. Consider the problem of learning specifications φ ∈ 2(S×A) given demonstrations on a transition system M = (S, s0 , A, δ). To reduce (M, T, Y, Φ) to an IRL problem, it is sufficient to generate a probabilistic automaton, a class of state reward functions, and a bijective map from state reward function to specifications, such that a reward function that solves the IRL problem associates with a specification that solves Eq 7. First, unroll the transition system, M , τ steps to create a new transition system, M 0 , where each state in M 0 corresponds to a time step i + 1 and an element of (S × A)i corresponds to the history of states and actions seen by step i. Thus, M 0 is a tree rooted at s0 . To each state, attach a state reward R : S → {0, 1} such that non-leaf states have reward 0 and leaf states have reward either 0 or 1. Finally, observe that (1) there is a unique path from s0 to a given leaf node and (2) reaching the leaf nodes requires τ steps, and thus the satisfaction is decided. Thus the reward function in Eq 8 naturally maps to the specification: φ = {x ∈ (S × A)τ | R̂(x) 6= 0} (9) Since there is a bijection between leaf nodes and paths, φ can encode any bounded specification.  While powerful, this reduction suffers from an exponential blow up in the state size, and thus traditional IRL algorithms are intractable. For example, φ∗ , the specification from Ex 3 is a subset of (S × A)6 for the grid world with 17 states and nine actions. Thus the cardinality of (S × A)6 is is greater than 1013 . As such, in the sequel, we shall leverage techniques that currently exist in the IRL literature, but exploit the structure in the bijection between Eq 8 and Eq 9 to avoid explicitly unrolling the transition system. 3 Maximum Entropy Teacher Model We begin by deriving an analytic form for P (φ|Y, M ◦ T (M, φ)) under the following 4 assumptions. (1) There is a uniform prior over the set of specifications reducing our MAP instance to Maximum Likelihood Estimation, i.e., P (φ | Y ) = P (Y | φ) (10) (2) the demonstrations are given i.i.d. and (3) the teacher model adheres to the principle of maximum entropy - discussed in a moment - and (4) The teacher’s satisfaction rate is approximately the satisfaction rate in the demonstrations. This suggests defining a satisfaction indicator that serves a similar role as Eq 8. Definition 9 (Satisfaction Indicator). Let x be a trace and φ a bounded specification. def [x ∈ φ] = 1 if x ∈ φ else 0 (11) Next, we define the satisfaction rate (which is the same as the average of the indicator function). Definition 10. Let φ a bounded specification, M a probalistic automaton, and π a policy. def Jφ (π) = P ([x ∈ φ] = 1) = E ([x ∈ φ]) (12) x∼M ◦π x∼M ◦π Definition 11. Given a series of n ∈ N demonstrations, if k ∈ N demonstrations are def satisfied, the empirical satisfaction rate is denoted J¯φ = k/n. Next, in a manner analogous to maximum entropy inverse reinforcement learning [23], we apply the principle of maximum entropy to indirectly define a teacher model via its demonstration distribution. Many justifications are often given for using this principle, but we merely remark that in maximizing the entropy, we minimize the bias encoded in the distribution while maintaining consistency with observations. Functionally, this means weighting traces by their “riskiness” with respect to satisfaction. Such weighting enables resilience to imperfect demonstrations. In the next theorem, we provide an analytic form for the likelihood of a series of demonstrations from a maximum entropy teacher. Theorem 2. Let M = (S, s0 , A, δ) be a probabilistic automaton, φ ⊂ (S × A)τ be a bounded specification, and y ∈ (S × A)τ a demonstration. If T is a maximum entropy risk averse teacher with satisfaction rate J¯φ , then, ( P (y | φ) = G{y} · J¯φ /Gφ J¯¬φ /G¬φ y∈φ y∈ /φ (13) Where Gφ is the probability that a uniformly random action sequence will satisfy φ and thus G{y} is read as the probability of generating y using the random action policy. Proof. The probability of sampling a trace x = s × a given M and policy T (M, φ) is: P (x|φ) = τY −1 δ(si , ai , si+1 )T (M, φ)(x[: i], ai ) (14) i=0 Observe that since the transition probabilities are fixed, the only degree of freedom in Eq 14 is T . Recalling that [x ∈ φ] is a function with mean J¯φ , the principle of maximum entropy asserts [9][23] that Eq 14 become: P (x|φ) = c[x∈φ] Z Y δ(s, a, s0 ) (15) s0 ,s,a∈s×a For some c, Z ∈ R+ such that the mean of Eq 15 is J¯φ and the sum over all traces is 1. Qτ −1 Now, define wx to be the probability of s given a. Namely, ws×a = i=0 δ(si , ai , si+1 ). def P Next, let Wφ = x∈φ wx . Applying the aforementioned constraints on Z and c yields: J¯φ = X [x ∈ φ] P (x | φ) = c X X Wφ ; Z=c wx + wx = cWφ + W¬φ (16) Z x∈φ x∈> x∈φ / Combining gives, Z = W¬φ /(J¯¬φ ) = W¬φ /(1 − J¯φ ). If x 6∈ φ, then c[x∈φ] = 1 and, / φ) = J¯¬φ /W¬φ P (x | φ, x ∈ (17) ¯ If x ∈ φ (implying Wφ 6= 0) then c = JZ/W φ and, P (x | φ, x ∈ φ) = J¯φ /Wφ Finally, observe that Gφ = Wφ W> . (18) Substituting and factoring yields Eq 13.  Remark 4. In the case that the agent gives only positive examples and the transition τ | Nφ 1 system M is deterministic, Eq 13 reduces to P (x|φ) = G{x} · |(S×A) |φ| |Y | ∝ |φ| , a common heuristic to maximize when learning from positive examples. The following corollary to Thm 2 gives the likelihood of a series of demonstrations. Corollary 1. Let M = (S, s0 , A, δ) be a probabilistic automaton, φ ⊂ (S × A)τ be a bounded specification, and Y a finite sequence demonstrations drawn i.i.d. from M ◦ T (M, φ). If T is a maximum entropy risk averse teacher with satisfaction rate J¯φ , then, the likelihood of Y is: P (Y |φ) = γY def where γY = Q y∈Y def G{y} , Nφ = Pn  ¯ Nφ  ¯ N¬φ Jφ J¬φ Gφ G¬φ i=0 [Y (19) (i) ∈ φ] . 34 Remark 5. As γY is a positive constant when Y and M are fixed, one can safely take γY = 1 when searching for a specification that maximizes Eq 19. Remark 6. Taking the log of Eq 19 does not change the maximum when comparing specifications. Negating the result and rearranging yields:  def Obj = −Nφ ln(J¯φ ) − N¬φ ln(J¯¬φ ) − (−Nφ ln(Gφ ) − N¬φ ln(G¬φ )) (20) Recalling that Gφ is the satisfaction rate of the random action policy, πrand , one can dedef fine Vπ (φ) = −Nφ log(Jφπ ) − N¬φ log(Jφπ ), where Jφπ is the satisfaction rate of policy π. Therefore, Obj = VT (M,φ) − Vπrand . If the violation measure of [10] is proportional to the log of the satisfaction rate, then minimizing Obj finds the specification that best explains the actions of a violation minimizing agent. Example 6. Recall the grid world M , specification, φ∗ , and specification pool, Φ = {True, φ∗ , ¬ {y 1 }}, and demonstrations Y = {y 1 , y 2 , y 3 , y 4 , y 5 } from Ex 2, Ex 3, Ex 4, and Ex 4 respectively. We seek to apply Eq 19 to select the most likely specification in Φ given Y . Observe that: J¯True = 1, J¯¬{y1 } = J¯φ∗ = 4/5 (21) Now suppose the probability of slipping is p = 1/100. Note that GTrue = 1 independent of p. To compute G¬{y1 } observe that the probability of randomly generating a trace x with s ∈ [0, 5] slips is: G{x} = 9−6 (1 − p)5−s (p/8)s (22) As y 1 contains no slips, G¬{y1 } = 1− with  = 9−6 ·(99/100)5 < 1.8×10−6 . Recall that to satisfy φ∗ , after the robot spawns into the world, it must visit a fixed sequence of four cells. In the grid world, if one selects an action at random, transitioning to a particular (reachable) next state has probability 91 (1 − p) + 89 p8 = 91 accounting for the slip and non-slip cases respectively. Thus, Gφ∗ = 9−4 . To summarize, GTrue = 1, G¬{y1 } = 1 − , Gφ∗ = 9−4 3 4 (23) By definition we take (. . .)0 = 1. We have suppressed a multinomial coefficient required if any two demonstrations are the same. However, since this term will not change as φ varies, one can simply absorb this coefficient into γY . Recall that Gφ + G¬φ = Jφ + J¬φ = 1, thus one can evaluate Eq 19. Denoting the natural log of Eq 19 with γY = 1 as f (φ) and evaluating f on elements of Φ yields: f (True) = 0, f (¬ {y 1 }) ≈ 10.7, f (φ∗ ) ≈ 32.6 (24) Therefore, arg maxφ∈Φ (f (φ)) correctly selects φ∗ as desired. The above example illustrates how Ex 4 uses the enviroment model to provide inferences that are robust to demonstration errors; however, it is important to observe that one can still over fit to the demonstrations. Example 7. Consider the same set up as Ex 6, but add to the candidate specification pool the set of demonstrations Y . Recall that out of the five demonstations in Y , one had a single slip and the other 4 had no slips. Via Eq 22 GY = 4 · 9−6 (99/100)5 + 9−6 (99/100)4 (1/800) ≈ 7.17 × 10−6 . Thus the natural log of f (Y ) evaulates to 59.22, and Y would be chosen over φ∗ . Nevertheless, we assert that the above example paints an overly pessimistic view. Assuming the demonstrations are really given via our teacher model, then given enough samples, one expects Y ∩ φ∗ to be close to the set of safe behaviors. Moreover, in the above example, if the number of demonstrations is sufficiently increased, a straight forward calculation reveals that the subset of traces Y ∩ φ∗ is expected to have a higher log likelihood than Y . Thus, the algorithm has a tendency to over fit to the safe subset of the specification being demonstrated. 4 Algorithm We seek to systematically exploit the structure imposed by Eq 19 to find the most likely specification within a fixed (but potentially large) pool of specifications. Remark 7. In practice, evaluating if a trace satisfies a specification is fairly efficent, and thus J¯φ is assumed easy to compute. Gφ on the other hand is often expensive to compute and analytic solutions are often not known for complex transition system/specification pairs. Thus, one resorts to probabilistic model checking [12], Monte Carlo [15], or weighted model counting [6]. As such queries are comparatively expensive, and because Φ can be very large, our algorithm seeks few Gφ queries. We now present a series of results that provide insights into how the demonstration likelihood can change as the specification changes. Proposition 1. Nφ (and thus J¯φ ) can only take on |Y | + 1 possible values. Remark 8. Via excluded middle, for every specification φ, J¬φ + Jφ = G¬φ + Gφ = 1. Further, J¯φ = Nφ /|Y |. Thus, given a maximum entropy teacher, a fixed transition system, and a fixed demonstration sequence, P (Y |φ) is completely characterized by Nφ , Gφ ∈ {0, 1, . . . |Y |} × [0, 1]. The above suggests a piecewise analysis of Eq 19 by case splitting on Nφ . Definition 12. Given candidate specifications Φ and demonstrations Y , for i ∈ {0, . . . , |Y | + 1}, def Φi = {φ ∈ Φ|Nφ = i} and def fi (α) =  i |Y |x i  |Y | − i |Y |(1 − x) (25) |Y |−i (26) That is, split Φi into |Y | + 1 partitions and associate to each partition a function fi (α) s.t. fNφ (Gφ ) agrees with Eq 19 when γY = 1. The function, fi (α) enables commenting on the likelihood given various theoretical random policy probability values within Φi . The next three lemmas (with proofs in the appendix) provide insight into how to systematically find the most likely specification without enumerating all specifications. Lemma 1. ∀φ0 , φ ∈ Φ . φ0 ⊆ φ =⇒ Gφ0 ≤ Gφ ∧ Nφ0 ≤ Nφ Lemma 2. For all i ∈ {0, . . . , |Y |}, δα fi (α) ≥ 0 ⇐⇒ α ≥ i/|Y | Lemma 3. For all i ∈ {0 . . . |Y | + 1}, fi (α) is convex and fi (i/|Y |) is its a global minimum. These insights are combined the following Theorem 3: Theorem 3. Let B ⊂ Φi be a finite sequence of specifications, φ1 . . . φn ordered by subset inclusion φj ≤ φk =⇒ φj ⊆ φk . Then, max(fi (Gφ )) = max(fi (Gφ1 ), fi (Gφn )) φ∈B (27) Proof. Gφ is monotonically increasing on the sequence B (Lemma 1). Via Lemma 3 fi (α) is convex and thus the maximum of fi (Gφ ) must occur at the beginning and end of the sequence B.  Theorem 3 suggests specializing to sets of candidate specifications that are organized into a finite (bounded) partial order, (Φ, E), that respects subset inclusion: (φ E φ0 =⇒ φ ⊆ φ0 ). By “bounded” we mean that ∅ and (S × A)τ are always assumed to be in Φ and act as the bottom and top of the partial order respectively. Remark 9. The above construction does no preclude two incomparable specifications in (Φ, E) from being related by subset inclusion. Such partial orders arise naturally when practical constraints require one apply an incomplete technique (such as syntax analysis) for determining subset inclusion. The sequences of specifications ordered by subset inclusion generalize naturally to ascending chains in the partial order. Definition 13 (Ascending Chains). Given a partial order (Φ, E), an ascending chain (or just chain) is a sequence of elements of B ordered by E. A chain B is said to be maximal if every element of Φ \ B is incomparable to every element of B. As chains are totally ordered, one can extend the interval notation [φ, ψ]E to be all specifications between specifications φ and ψ in the chain B. We define notation for the bottom and top of the chain, B.⊥ and B.>, so that B = [B.⊥, B.>]E . Corollary 2. Let B be a chain in (Φi , E), Y the set of demonstrations, and Bi = {φ ∈ B | Nφ = i} . Then,  max i∈{0,1,...,|Y |}  max (fi (Gφ )) φ∈Bi  = max i∈{0,1,...,|Y |}  max(fi (GBi .⊥ ), fi (GBi .> )) (28) Further, observe that Bi is easily computed by performing a binary search for Bi .⊥ and Bi .>. These insights are combined into Algorithm 1. Algorithm 1 Specification Inference on Chains 1: 2: 3: 4: 5: procedure CHAIN INFERENCE(Y, (B, E)) β ← {0,  1, . . . , |Y |}  Ψ ← (i, search bot(B, i)) i ∈ β  ∪  (i, search top(B, i)) i ∈ β φ∗ ← arg maxi,φ∈Ψ (fi (Gφ )) return φ∗ , fNφ∗ (Gφ∗ ) Theorem 4. Let TN and TG represent the worst case execution time of computing Nφ and Gφ for φ in chain B. Given a chain of n specifications and m demonstrations, Algorithm 1 runs in time: O(TN · log(n) + TG · m) (29) Proof (Proof of Thm 4). The first line and second lines of Algorithm 1 perform binary searches to compute the bottom and top of the m partitions of the input chain. Each binary search is O(log(n)) and 2m binary searches are performed. Finally, the algorithm returns the maximum likelihood in the chain according to corollary 2. Each likelihood query requires one TG operation. There are 2 · m such queries. Thus, the running time is O(TN · log(n) + TG · m).  Our implementation uses the following proposition to further prune candidates without computing Gφ in line 4. def Proposition 2. Let φ ∈ Φ be a candidate specification. Let f ∗ = fNφ (Gφ ) and suppose there exists a ψ 6= φ in Φ that is more likely than φ, i.e., fNψ (Gψ ) > f ∗ . Let a, b ∈ R be the two values such that fNψ (a) = fNψ (b) = f ∗ . Then, by Theorem 3, Gψ ∈ / [a, b], where [a, b] is called the refuted interval. Of course, in general (Φ, E) does not only contain a single chain. Moreover, nothing precludes Φ from being a set of n ∈ N unrelated chains connected by ⊥ and >. In such a scenario, one appears doomed to compute each the maximum of chain separately. Similarly, if the n chains shared a prefix rooted at ⊥, but then fork into n incomparable segments which merge at >, the n incomparable segments must have their maximums compared separately. Crucially, one need not recompute the maximum along the shared prefix. This suggests the following simple algorithm: Algorithm 2 Specification Inference on Partial Orders 1: 2: 3: 4: 5: 6: 7: 8: procedure PARTIALORDER INFERENCE(Y, (Φ, E)) φ∗ , f ∗ ← ∅, 1 while Φ 6= ∅ do B ← sample maximal chain(Φ) φ, f ← chain inference(Y, B) if f > f ∗ then φ∗ , f ∗ ← φ, f Φ←Φ\B return φ∗ , f ∗ Where the maximal chain subroutine returns a maximal chain in Φ. To analyze the running time of Alg 2, we first define the height, width, and degree of a partial order. The height of (Φ, E) is size of the largest maximal chain in Φ. The width of Φ is the size of the largest subset of Φ containing only incomparable elements. Finally, let the degree of a parital order be the average number of outgoing edges when Φ is represented as a Hasse diagram (see Fig 3 for an example). Theorem 5. Let TN and TG represent the worst case execution time of computing Nφ and Gφ for φ in the bounded partial order Φ with height h, width w, and degree d. If run on m demonstrations, Algorithm 2 runs in time:   O w · (TN · log(h) + TG · m + d · h) (30) Proof. Since Φ has height h, the longest possible chain has length h. Thus, by Thm 4 each call of chain inference takes O(TN · log(h) + TG · m) time. Let C be the largest set of incomparable elements in Φ, where by assumption, |C| = w. Since sampled chains are maximal, and element of C must be sampled each round. By construction, if a specification ψ ∈ Φ appears in a sampled chain, it cannot appear in a future chain. Thus, at most w chains are sampled. If Φ’s Hasse diagram is represented as a directed acyclic graph, as a preprocessing step, one can compute a spanning tree rooted as the bottom of the partial order. Sampling a chain can then be done by walking down a path for unexplored branches of the tree. This requires a most O(d · h) time. Removing a chain the tree as visited (O(d · h)). Thus, Alg 2 takes  is done by marking the nodes in  O w · (TN · log(h) + TG · m + d · h) time.  Remark 10. As with Alg 1, in practice the running time of Alg 2 can be improved by exploiting Prop 2. Namely, if one passes the likelihood of the best candidate so far, one can compute more aggressive refuted intervals and avoid unnecessarily computing random satisfaction probabilities. 5 Experiments and Conclusion Experiment 1: In this experiment, we sought to test whether the maximum entropy teacher model could correctly infer a specification when more than 30% of the unlabeled demonstrations contain errors. To begin, we adapted the 2 × 2 grid world from 2 Ex 2 to an 8 × 8 grid world by substituting p = 1/10, platform = {0, 1, . . . , 8} , and 2 fallen = {−1, 1, . . . 9} \ platform. The specification φ∗ from Ex 3 was adapted by (1) generalizing the condition of visiting a corner and remaining for one time step to visiting within r (infinity norm) of the corner for 4 − τ units of time steps (2) allowing the agent to visit corners in any order. Denote this generalization as ϕ(r, τ ). We def considered the candidate pool Φ = {ϕ(r, τ ) | r, τ ∈ {0, 1, 2, 3, 4}}. Gφ was computed 5 using 2.4 × 10 Monte Carlo simulations taking on average 10 seconds to compute. Jφ required a linear pass over each demonstration to count the time spent in the target regions. We then implemented a controller to generate 100 demonstrations for ϕ(2, 2). Within the demonstrations, only 65% of the demonstrations satisfied ϕ(2, 2). Then by enumeration, we scored each specification using fi , the log likelihood - log of γY . Fig 2 illustrates that despite there being many errors in the demonstrations, ϕ(2, 2) is recovered with high confidence, and the confidence increases exponentially as more demonstrations are given (scores are proportional to the log of the likelihood). (a) 5 Demonstrations (b) 100 Demonstrations Fig. 2: Specification scores for experiment 1. Experiment 2: In the next experiment, we tested how Alg 2 compared to brute force enumeration. As the run-time is entirely dominated by Monte Carlo queries, we give performance in terms of the number of queries. Using the same 8 × 8 grid world, specification pool, and controller, we ran Alg 2 on 5, 100, and 1000 demonstrations. Observing that (r, τ ) < (r0 , τ 0 ) =⇒ ϕ(r, τ ) ⊂ ϕ(r0 , τ 0 ), Φ’s Hasse diagram took the form a 5 × 5 grid. The correct specification was inferred using 7, 20, and 20 Monte Carlo queries respectively compared to the 25 required via enumeration. Experiment 3: This experiment used the the same 8 × 8 grid world and controller as Experiments 1 and 2, but between each specification, ϕ(r, τ ) and ϕ(r0 , τ 0 ) of the Hasse diagram of Φ, we added a chain of nine specifications where each element of the chain introduced a new random trace.5 We then reran Alg 2 with 5, 100, and 1000 demonstrations resulting in 9, 21, and 23 Monte Carlo queries respectively compared to the 250 queries required via enumeration. Combined experiments 2 and 3 show how the performance of Alg 2 depends intimately on the class of the specifications being explored. In the case of 5 demonstrations, the correct specification was inferred in ≈ 90 seconds compared to the estimated 2500 of enumeration. 5 Care was taken to union the new random traces along ascending chains. Experiment 4: In our final experiment, we sought to compare the maximum entropy teacher model to the expected violation minimizing objective function introduced in [10]. For comparison, we adapted the clean world experiment from [10] to the setting of bounded specifications. The clean world (dynamics in Fig 3) comprises of two states (dock, undocked) and two state variables (dirt, battery). The teacher’s objective is to vacuum the room until dirt = 0. The problem is that the finite battery means the teacher must interleave vacuuming with docking and charging. Our candidate specifications are the most likely specifications found in [10] along with a new specification, φ5 , that captures the strategy employed by the demonstrations. Name φ∗ φ1 φ2 φ3 φ4 φ5 Description (Not a candidate): Vacuum the room until dirt = 0. dirt = 0 at all time steps. At time step 11, dirt = 0. dirt = 0 at some point during the demonstration. At time step 11, dirt = 0 or in the docked state. Vacuum unless dirt = 0 or bat has been less than 1 within two time steps. These specifications were organized into the Hasse diagram depicted in Fig 3. The five (identical) 11 step demonstrations (also from [10]) are the result of the action sequence (vacuum, vacuum, dock, wait, undock, vacuum, vacuum, dock, wait, undock). In the original experiment, the violation measure was used to conclude that φ1 is the most likely specification (followed closely by φ2 ). The maximum entropy teacher model assigned φ4 and φ5 scores of 2.9 and 17 respectively and all other specifications scores near 0. Thus, the violation model and the maximum entropy teacher model disagree on the interpretation of the demonstrations. We argue that the maximum entropy teacher model interpretation is justifiable for three reasons (1) The action sequence given above never results in dirt = 0, and thus φ1 , φ2 , φ3 , and φ4 are never demonstrated. (2) The strategy encoded into φ5 is demonstrated. (3) There exists an action sequence that bring demonstrates φ2 , φ3 , φ4 , and φ5 : (vacuum, vacuum, dock, wait, undock, vacuum, vacuum, dock, undock, vacuum). As the dynamics are deterministic, one should expect a teacher trying to demonstrate the specification to provide this or another a positive example. Thus, given that a positive example was not given, φ2 , φ3 , φ4 , should be heavily discounted. Running Alg 2 with the new action sequence results in φ2 and φ3 being the most likely demonstrations. Before concluding, we briefly remark that each Monte Carlo query (again 2.4 × 105 simulations) took under 1 ms. For both demonstration sets, 3 queries were made not including True and False. Conclusion. In this work, we formulated the problem of learning bounded-time specifications from unlabeled demonstrations in a stochastic environment as a (MAP) probability inference problem. To solve this problem, we first observed that a naive reduction to the related problem of inverse reinforcement learning was intractable. We then introduced the maximum entropy teacher model and derived an analytic formula for the likelihood of the demonstrations given the satisfaction rate on the demonstrations and the satisfaction rate of a random action policy. We then developed an algorithm to efficiently find the mostly likely specification within a candidate set of specifications, in which some subset relations between specifications are known. Finally, our case studies showed that the maximum entropy teacher model is robust to demonstration imperfec- Fig. 3: Cleaning world dynamics and Hasse diagram of the candidates. tion, and that the developed algorithm searches the candidate space better than brute force. Future work includes extending to infinite horizon specifications, infinite state and action spaces, and characterizing the optimal set of teacher demonstrations for a student using the maximum entropy teacher model. References 1. E. Asarin, A. Donzé, O. Maler, and D. Nickovic. Parametric identification of temporal properties. In Proc. of RV, pages 147–160, 2011. 2. I. Beer, S. Ben-David, C. Eisner, and Y. Rodeh. Efficient detection of vacuity in ACTL formulas. Formal Methods in System Design, 18(2):141–162, 2001. 3. G. Bombara and C. Belta. Signal Clustering Using Temporal Logics, pages 121–137. Springer International Publishing, Cham, 2017. 4. G. Bombara, C.-I. Vasile, F. Penedo, H. Yasuoka, and C. Belta. A Decision Tree Approach to Data Classification using Signal Temporal Logic. In Proc. of HSCC, pages 1–10, 2016. 5. M. Caplain. Finding invariant assertions for proving programs. In ACM SIGPLAN Notices, volume 10, pages 165–171. ACM, 1975. 6. M. Chavira and A. Darwiche. On probabilistic inference by weighted model counting. Artificial Intelligence, 172(6-7):772–799, 2008. 7. X. C. D. Ding, S. L. Smith, C. Belta, and D. Rus. Ltl control in uncertain environments with probabilistic satisfaction guarantees. IFAC Proceedings Volumes, 44(1):3515–3520, 2011. 8. J. Fu and U. Topcu. Probably approximately correct mdp learning and control with temporal logic constraints. arXiv preprint arXiv:1404.7073, 2014. 9. E. T. Jaynes. Information theory and statistical mechanics. Physical review, 106(4):620, 1957. 10. D. Kasenberg and M. Scheutz. Interpretable apprenticship learning with temporal logic specifications. arXiv preprint arXiv:1710.10532, 2017. 11. Z. Kong, A. Jones, A. Medina Ayala, E. Aydin Gol, and C. Belta. Temporal logic inference for classification and prediction from data. In Proc. of HSCC, pages 273–282, 2014. 12. M. Kwiatkowska, G. Norman, and D. Parker. PRISM 4.0: Verification of probabilistic realtime systems. In G. Gopalakrishnan and S. Qadeer, editors, Proc. 23rd International Conference on Computer Aided Verification (CAV’11), volume 6806 of LNCS, pages 585–591. Springer, 2011. 13. C. Lemieux, D. Park, and I. Beschastnikh. General LTL specification mining. In Automated Software Engineering (ASE), 2015 30th IEEE/ACM International Conference on, pages 81– 92, 2015. 14. W. Li. Specification Mining: New Formalisms, Algorithms and Applications. PhD thesis, EECS Department, University of California, Berkeley, Mar 2014. 15. N. Metropolis and S. Ulam. The monte carlo method. Journal of the American statistical association, 44(247):335–341, 1949. 16. A. Y. Ng, S. J. Russell, et al. Algorithms for inverse reinforcement learning. In Icml, pages 663–670, 2000. 17. C. Robert. Machine learning, a probabilistic perspective, 2014. 18. D. Sadigh, S. Sastry, S. A. Seshia, and A. D. Dragan. Planning for autonomous cars that leverages effects on human actions. In Proceedings of the Robotics: Science and Systems Conference (RSS), June 2016. 19. S. Silvetti, L. Nenzi, L. Bortolussi, and E. Bartocci. A robust genetic algorithm for learning temporal specifications from data. CoRR, abs/1711.06202, 2017. 20. M. Vazquez-Chanlatte, J. V. Deshmukh, X. Jin, and S. A. Seshia. Logical clustering and learning for time-series data. In Proc. Computer-Aided Verification (CAV), 2017. 21. B. Wegbreit. The synthesis of loop predicates. Communications of the ACM, 17(2):102–113, 1974. 22. E. M. Wolff, U. Topcu, and R. M. Murray. Robust control of uncertain markov decision processes with temporal logic specifications. In Decision and Control (CDC), 2012 IEEE 51st Annual Conference on, pages 3372–3379. IEEE, 2012. 23. B. D. Ziebart, A. L. Maas, J. A. Bagnell, and A. K. Dey. Maximum entropy inverse reinforcement learning. In AAAI, volume 8, pages 1433–1438. Chicago, IL, USA, 2008. 6 Appendix Proof (Proof of Lemma 1). Nφ0 ≤ Nφ follows trivially. For Gφ note that Gφ = (Wφ0 + P 0 x∈φ\φ0 wx )/W> . Further, wx ≥ 0. Thus, Gφ ≤ Gφ . Proof (Proof of Lemma 2). For α ∈ (0, 1): δα fi = fi (α) |Y |α − i α(1 − α) Note that fi (α) and α(1 − α) are positive, thus δα fi ≥ 0 Rearranging proves the Lemma.  (31) ⇐⇒ |Y |α − i ≥ 0. Proof (Proof of Lemma 3). For the global minimum, observe that if α = i/|Y |, fi (α) = 1. The sign of δα fi is determined by the sign of α − i/|Y | (Lemma 2). Therefore, as α moves from less than i/|Y | to larger than i/|Y |, fi (α) decreases and then increases. Thus α = i/|Y | is a local minimum. As the sign of the expression α − i/|Y | can only change once. Thus, fi is convex and f (i/|Y |) must be a global minimum. 
2cs.AI
Improved stochastic trace estimation using mutually unbiased bases J. K. Fitzsimons,1 M. A. Osborne,1 S. J. Roberts,1 and J. F. Fitzsimons2, 3 1 Department of Engineering Science, University of Oxford 2 Engineering Product Development, Singapore University of Technology 3 Centre and Design for Quantum Technologies, National University of Singapore arXiv:1608.00117v1 [cs.NA] 30 Jul 2016 We examine the problem of estimating the trace of a matrix A when given access to an oracle which computes x† Ax for an input vector x. We make use of the basis vectors from a set of mutually unbiased bases, widely studied in the field of quantum information processing, in the selection of probing vectors x. This approach offers a new state of the art single shot sampling variance while requiring only O(log(n)) random bits to generate each vector. This significantly improves on traditional methods such as Hutchinson’s and Gaussian estimators in terms of the number of random bits required and worst case sample variance. I. INTRODUCTION The problem of stochastic trace estimation is relevant to a range of problems from physics and applied mathematics such as electronic structure calculations [1], seismic waveform inversion [2], discretized parameter estimation problems with PDEs as constraints [3] and approximating the log determinant of symmetric positive semi-definite matrices [4]. Machine learning, in particular, is an example of a research domain which has many uses for stochastic trace estimation. They have been used efficiently by Generalised Cross Validation (GCV) in discretized iterative methods for fitting Laplacian smoothing splines to very large datasets [5], computing the number of triangles in a graph [6, 7], string pattern matching [8, 9] and the training Gaussian Processes using score functions [10]. Stochastic trace estimation endeavours to choose n dimensional vectors x such that the expectation of xT Ax is equal to the trace of the implicit symmetrical positive semi definite matrix A ∈ Rn×n . It can be seen that many sampling policies satisfy this condition. As such several metrics are used in order to choose a sampling policy such as the one sample variance, the number of samples to achieve a (ε, δ )-approximation and the number of random bits required to create x [11]. This last metric is motivated in part by the relatively long timescales for hardware number generation, and concerns about parallelising pseudo-random number generators. In this work we propose a new stochastic trace estimator based on mutually unbiased bases (MUBs) [12], and quantify the single shot sampling variance of the proposed MUBs sampling method and its corresponding required number of random bits. We will refer to methods which sample from a fixed set of basis functions as being fixed basis sampling methods. For example, we can randomly sample the diagonal values of the matrix A by sampling z from the set of columns which form the identity matrix. This is referred to as the unit vector estimator in the literature [11]. Other similar methods sample from the columns Discrete Fourier Transform (DFT), the Discrete Hartley Transform (DHT), the Discrete Cosine Transform (DCT) or a Hadamard matrix. We prove that sampling from the set of mutually unbiased bases significantly reduces this single shot sample variance, in particular in the worst case bound. The paper is laid out as follows: Section II gives a brief introduction to mutually unbiased basis, Section III describes our novel approach of using mutually unbiased bases for trace estimation and Section III B gives a rigorous analysis of of the new estimator. Section IV compares the proposed MUBs estimator to established approaches both in terms of the analytic expectation of sample variance and as applied to synthetic and real data. The task of counting the number of triangles in a graph is considered as an example application. II. MUTUALLY UNBIASED BASIS Linear algebra has found application in a diverse range of fields, with each field drawing from a common set of tools. However, occasionally, techniques developed in one field do not become well known outside of that community, despite the potential for wider use. In this work, we will make extensive use of mutually unbiased bases, sets of bases that arise from physical considerations in the context of quantum mechanics [12] and which have been extensively exploited within the quantum information community [13]. In quantum mechanics, physical states are represented as vectors in a complex vector space, and the simplest form of measurement projects the state onto one of the vectors from some fixed orthonormal basis for the space, with the probability for a particular outcome given by the square of the length of the projection onto the corresponding basis vector [20]. In such a setting, it is natural to ask about the existence of pairs or sets of measurements where the outcome of one measurement reveals nothing about the outcome of another measurement, and effectively erases any information about the outcome had the alternate measurement instead been performed. As each measurement corresponds to a particular basis, such a requirement implies that the absolute value of the overlap between pairs of vectors drawn from bases corresponding to different measurements be constant. This leads directly to the concept of mutually unbiased bases (MUBs). A set of orthonormal bases {B1 , . . . , Bn } are said to be mutually unbiased if for all choices of i and j, such that i 6= j, and for every u ∈ Bi and every v ∈ B j , |u† v| = √1n , where n is the dimension of the space. While for real vector spaces the number of mutually unbiased bases has a complicated relationship with the dimensionality [14], for complex vector spaces the number of mutually unbiased bases is known to be exactly 2 n + 1 when n is either a prime or an integer power of a prime [15]. Furthermore, a number of constructions are known for constructing such bases [15]. When n is neither prime nor a power of a prime, the number of mutually unbiased bases remains open, even for the case of n = 6 [16], but is known to be at least pd11 + 1, where n = ∏i pdi i and pi are prime numbers such that pi < pi+1 for all i. III. TRACE ESTIMATORS In order to estimate the trace of a n × n positive semidefinite matrix A from a single call to an oracle for x† Ax, we consider four strategies: • Fixed basis estimator: For a fixed orthonormal basis B, choose x uniformly at random from the elements of B. The trace is then estimated to be nx† Ax. • Mutually unbiased bases (MUBs) estimator: For a fixed choice of a set of b mutually unbiased bases B = {B1 , ..., Bb }, choose B uniformly at random from B and then choose x uniformly at random from the elements of B. Here b is taken to be the maximum number of mutually unbiased bases for a complex vector space of dimension n. As in the fixed basis strategy, the trace is then estimated to be nx† Ax. of these methods in this paper but will compare the fixed basis estimator and MUBs estimator to them in Table III. A. We first analyse the worst case variance of the fixed base estimator. In this analysis and the analysis for the MUBs estimator which follows, we make no assumption on A and consider the worst case variance. We begin from the definition of the variance of the estimator for a single query. Let X be a random variable such that X = x† Ax, where x is chosen according to the fixed basis strategy. Then Var(X) = E(X 2 ) − E(X)2 , The first strategy is a generic formulation of approaches which sample vectors from a fixed orthogonal basis, the most efficient sampling method in terms of the number of random bits required in the literature [11], while the second strategy is novel and represents our main contribution. Both strategies have similar randomness requirements: In the first strategy at least dlog2 (n)e random bits are necessary to ensure the possibility of choosing every element of B. In the second strategy, an identical number of random bits is necessary to choose x for a fixed B, and dlog2 (b)e random bits are necessary to choose B. Note that an upper bound on the number of mutually unbiased bases is one greater than dimensionality of the space, and this bound is saturated for spaces where the dimensionality is prime or an integer power of a prime, i.e. b ≤ n + 1. Thus the number of random bits necessary to implement these strategies differs by a factor of approximately two. The third and forth strategies significantly outperform the fixed basis estimator in terms of single-shot variance, at the cost of a dramatic increase in the amount of randomness required, and have been extensively studied in the literature [11, 17, 18]. For conciseness we will not repeat the analysis (1) where E(·) denotes the expectation value of the argument. We compute this term by term. First E(X) = 1 Tr(A) ∑ x† Ax = n . n x∈B (2) where n = dim(A), and hence the second term in Eq. 1 is equal to Tr(A)2 . n2 Turning to the first term, E(X 2 ) = • Hutchinson’s estimator: Randomly choose the elements of x independently and identically distributed  from a Rademacher distribution Pr(xi = ±1) = 21 . The trace is then estimated to be x† Ax. • Gaussian estimator: Randomly choose the elements of x independently and identically distributed from a zero mean unit variance Gaussian distribution. The trace is then estimated to be x† Ax. Analysis of fixed basis estimator = 2 1 x† Ax ∑ n x∈B (3) 1 n 2 ∑ Mii , n i=1 (4) where M = UAU † for some fixed unitary matrix U, such that U † x is a vector in the standard basis for all x ∈ B, and Mii is the ith entry on the main diagonal of M. The variance for the fixed basis estimator is then given by Vfixed = n ∑ni=1 Mii2 − Tr(A)2 . The worst case occurs when the value of ∑ni=1 Mii2 is maximized for fixed trace of A (and hence M), which occurs when a single diagonal entry is non-zero, and so the worst case single shot variance for the fixed basis estimator is V fworst ixed = 2 (n − 1)Tr(A) . B. Analysis of MUBs estimator We now turn to analysis of the MUBs estimator. We assume that n is either prime or a prime raised to some integer power, since when this is not the case the matrix can always be padded out with zeros to such a dimension with little overhead. In this case, it has been established that b = n + 1 [15]. The variance is remains as given in Eq. 1, except that X is defined in terms of vectors x chosen according to the MUBs strategy. Again, we analyse the individual terms making up the variance. We begin with E(X) = 1 Tr(A) x† Ax = . ∑ ∑ nb B∈B x∈B n (5) 3 V V worst R n ∑ni=1 Mii2 − Tr(A)2 (n − 1)Tr(A)2 log2 (n) n 1 2 2 n+1 Tr(A ) − n+1 Tr(A) n 2 n+1 Tr(A ) log2 (n) + log2 (n + 1) 2(n−1) 2 n Tr(A ) n Estimator Fixed basis MUBs 2 Tr(A2 ) − ∑ni=1 A2ii Hutchinson [17]  2Tr(A2 ) Gaussian [18] ∞ for exact; O(n) for fixed precision 2Tr(A2 ) TABLE I: Comparison of single shot variance V , worst case single shot variance V worst and number of random bits R required for commonly used trace estimators and the MUBs estimator. In the case of the MUBs estimator, the quantities provided for the variances are upper bounds rather than the exact variance. and hence the second term in the variance is the same as for the fixed basis estimator. Analysing the first term is, however, more difficult. We begin with the observation that E(X 2 ) can be expressed in terms of the trace of the Kronecker product of two matrices, as follows E(X 2 ) = 1 ∑∑ nb B∈B x∈B = ∑∑  † ⊗2 xx A (8) (9) ⊗2 1 xx† ∑ ∑ 2 B∈B x∈B 2 1 = x† x ∑ ∑ 2 B∈B x∈B = nb . 2 4 (10) (11) (12) (13) (14) (15) (16)  2 Tr A⊗2 nb 2 Tr (A)2 , = nb E(X 2 ) ≤ ! ! Notice that this implies that Tr(P) = Tr(P2 ) for dimensions which are prime or integer powers of a prime, since in such cases b = n + 1. This implies that the eigenvalues on the nonzero subspace minimize the sum of their squares for a fixed sum, and since P is positive semi-definite, we can conclude that each non-zero eigenvalue must be equal to unity. Returning to the calculation of variance, we then have . While this form of P may appear intimidating, we now prove that P is in fact a projector with each eigenvalue being either 0 or 1. We prove this indirectly, first by showing that P has rank at most n(n + 1)/2, and then using the relationship between the traces of P and P2 to conclude that the remaining n(n + 1)/2 eigenvalues are equal to unity. Any vector of the form w = u ⊗ v − u ⊗ v for u, v ∈ B1 trivially satisfies Pw = 0. Since such vectors form a basis for a subspace of dimension n(n − 1)/2, we conclude that rank(P) ≤ n2 − n(n − 1)/2 = n(n + 1)/2. Turning now to the issue of trace, we have Tr(P) = Tr 1 ∑ ∑ x† y 4 B,B∑ 0 ∈B x∈B y∈B0 nb n2 b(b − 1) + 4 4n2 b(n + b − 1) = . 4 (7) B∈B x∈B ⊗2 ⊗2 ⊗2 1 xx† yy† ∑ ∑ ∑ 4 B,B0 ∈B x∈B y∈B0 = ! ⊗2  2 Tr PA⊗2 , nb where P = 21 ∑B∈B ∑x∈B xx† Tr(P ) = Tr (6) Moving the summations inside the equation we obtain 1 Tr E(X ) = nb 2 = 2 x† Ax  1 = ∑ ∑ Tr (xx† A)⊗2 . nb B∈B x∈B 2 We can similarly compute the trace of P2 to obtain (17) (18) and hence  Var(X) ≤ 2 1 − nb n2  Tr (M)2 ≤ Tr (A)2 . n2 (19) This implies that the variance on the estimate of Tr(A) is bounded from above by Tr(A)2 . It is, in fact, possible to compute the variance exactly from Eq. 9 by observing that M is the projector onto the symmetric subspace when n is an integer power of a prime. That is to say, for any vector u and any vector v orthogonal to u, the vectors u ⊗ v + v ⊗ u, u ⊗ u and v ⊗ v are in the +1 eigenspace of M, whereas the vector u ⊗ v − v ⊗ u is in the null space of M. We can then compute the exact variance of the MUBs estimator using the spectral 4 decomposition A = ∑i λi ui u†i as 1.6  2n (20) Tr PA⊗2 − Tr(A)2 n+1  2n n n = ∑ ∑ λi λ j Tr P(ui ⊗ u j )(ui ⊗ u j )† − Tr(A)2 n + 1 i=1 j=1 ! n 2n 1 2 = (21) ∑ λi + 2 ∑ λi λ j − Tr(A)2 n + 1 i=1 j6=i Absolute Error 1.0 0.8 0.6 0.4 0.0 10 Having quantified the worst case performance of the MUBs estimator, we now explore its performance in practice, in a set of numerical experiments. As an example application we will consider counting the number of triangles in a graph. This is an important problem in a number of application domains such as identifying the number of mutual acquaintences in a social network. An efficient method to do this is the Trace Triangle algorithm [8]. The algorithm is based on a relationship 30 40 50 Dataset: ca-GrQc 0.9 Absolute Error 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 10 20 30 40 50 Number of Samples 0.6 Dataset: cit-HepTh Absolute Error 0.5 0.4 0.3 0.2 0.1 0.0 10 20 30 40 50 Number of Samples 0.6 Dataset: ca-AstroPh 0.5 Absolute Error NUMERICAL RESULTS 20 Number of Samples 2(n−1) 2 n Tr(A ). = Thus, the MUBs estimator has better worst case performance than the Hutchinson estimator by a factor 2(n+1)(n−1) which apn2 proaches 2 for large n. This improvement is perhaps unsurprising, since for a symmetric matrices x† Ax = xTR AxR + xTI AxI where xR and xI are the real and imaginary parts of x. Hence evaluating x† Ax for a single complex vector is equivalent to taking the sum of it over for two different real vectors, leading to a factor of two improvement in the variance of the average. Table I compares the single shot variance, worst case single shot variance and randomness requirements of the trace estimators. As can be seen from the comparison the MUBs estimator has strictly smaller variance than either the Hutchinson or Gaussian methods, while requiring significantly less randomness to implement. Given the drastic reduction in randomness requirements, and the improved worst case performance, the MUBs estimator provides an attractive alternative to previous methods for estimating the trace of implicit matrices. IV. 1.2 0.2 (22) Since for all positive semi-definite matrices A the value of Tr(A)2 is bounded from below by Tr(A2 ), the single shot variance on the MUBs estimator is bounded by Vworst MUBs = n−1 2 ) in the worst case, a significant improvement on the Tr(A n+1 bound stemming from Eq. 19. Even if when not restricted to positive semi-definite A, the worst case variance is bounded n 2 2 by Vworst MUBs = n+1 Tr(A ), since Tr(A) is non-negative for any A defined over Rn . The worst case single shot variance of the MUBs estimator is then at least a factor of n − 1 better than that of any fixed basis estimator. Furthermore, the variance for the widely used Hutchinson  estimator [11, 17], is given by VH = 2 Tr(A2 ) − ∑ni=1 A2ii . In the worst case, ∑ni=1 A2ii = 1n Tr(A2 ), and hence the worst case single shot variance for Hutchinson estimator is VHworst Gaussian Hutchinson Unit MUBs 1.4 VMUBs = 1 n Tr(A2 ) − Tr(A)2 . = n+1 n+1 Dataset: wiki-Vote 0.4 0.3 0.2 0.1 0.0 10 20 30 40 50 Number of Samples FIG. 1: A comparison of the performance of the stochastic trace estimation methods on the four datasets. The fixed basis method was not included as it was not competitive. The experiments were performed 500 times each. The solid line indicated the empirical mean absolute relative error and the the surrounding transparent region indicates one empirical standard deviation of the 500 trials. 5 Dataset Arxiv-HEP-th CA-AstroPh CA-GrQc wiki-vote Vertices 27,240 18,772 5,242 7,115 Edges 341,923 198,050 14,484 100,689 Triangles 1,478,735 1,351,441 48,260 608,389 TABLE II: Datasets used for the comparison of stochastic trace estimation methods in the counting of triangles in graphs. All datasets can be found at snap.stanford.edu/data triangles for the graphs presented in Table II and the results of the experiment are presented in Figure 1. The code for these experiments, with an efficient Python implementation for generating the MUBs sample vectors in O(n), has been made publically available [21]. The MUBs estimator outperforms the classical method in all of the experiments, as would be expected from the theoretical analysis in terms of variance. In addition, the exponential reduction in randomness means that implementations making use of hardware random number generation will generally see a significant decrease in processing times. between the adjacency matrix, A, and the number of triangles for an undirected graph, ∆g , ∆g = Tr(A3 ) . 6 Acknowledgements (23) The trace of the adjacency matrix cubed can be sampled in O(n2 ) per sample as opposed to being explicitly computed in O(n3 ). We compared Gaussian, Hutchinson’s, Unit and MUBs estimators performance at predicting the number of [1] Z. Bai, M. Fahey, G. H. Golub, M. Menon, and E. Richter, Tech. Rep., Citeseer (1998). [2] T. van Leeuwen, A. Y. Aravkin, and F. J. Herrmann, International Journal of Geophysics 2011 (2011). [3] E. Haber, M. Chung, and F. Herrmann, SIAM Journal on Optimization 22, 739 (2012). [4] C. Boutsidis, P. Drineas, P. Kambadur, and A. Zouzias, arXiv preprint arXiv:1503.00374 (2015). [5] M. F. Hutchinson, Communications in Statistics-Simulation and Computation 19, 433 (1990). [6] M. J. Atallah, F. Chyzak, and P. Dumas, Algorithmica 29, 468 (2001). [7] M. J. Atallah, E. Grigorescu, and Y. Wu, Information Processing Letters 113, 690 (2013). [8] H. Avron, in Workshop on Large-scale Data Mining: Theory and Applications (2010), vol. 10, pp. 10–9. [9] C. E. Tsourakakis, in Data Mining, 2008. ICDM’08. Eighth IEEE International Conference on (IEEE, 2008), pp. 608–617. [10] M. L. Stein, J. Chen, M. Anitescu, et al., The Annals of Applied Statistics 7, 1162 (2013). [11] H. Avron and S. Toledo, Journal of the ACM (JACM) 58, 8 JFF acknowledges support from the Air Force Office of Scientific Research under AOARD grant FA2386-15-1-4082. This material is based on research funded in part by the Singapore National Research Foundation under NRF Award NRFNRFF2013-01. (2011). [12] J. Schwinger, Proceedings of the National Academy of Sciences 46, 570 (1960). [13] T. Durt, B.-G. Englert, I. Bengtsson, and K. Życzkowski, International journal of quantum information 8, 535 (2010). [14] P. O. Boykin, M. Sitharam, M. Tarifi, and P. Wocjan, arXiv preprint quant-ph/0502024 (2005). [15] A. Klappenecker and M. Rötteler, in Finite fields and applications (Springer, 2004), pp. 137–144. [16] P. Butterley and W. Hall, Physics Letters A 369, 5 (2007). [17] M. Hutchinson, Communications in Statistics-Simulation and Computation 18, 1059 (1989). [18] R. Silver and H. Röder, Physical Review E 56, 4822 (1997). [19] M. A. Nielsen and I. L. Chuang, Quantum computation and quantum information (Cambridge university press, 2010). [20] For a more comprehensive introduction to the mathematics of quantum mechanics in finite-dimensional systems, we refer the reader to [19] [21] www.github.com/OxfordMLRG/traceEst
8cs.DS
Scavenger 0.1: A Theorem Prover Based on Conflict Resolution Daniyar Itegulov1 , John Slaney2 , and Bruno Woltzenlogel Paleo2 ? arXiv:1704.03275v2 [cs.LO] 31 Oct 2017 1 2 ITMO University, St. Petersburg, Russia [email protected] Australian National University, Canberra, Australia [email protected] [email protected] Abstract. This paper introduces Scavenger, the first theorem prover for pure first-order logic without equality based on the new conflict resolution calculus. Conflict resolution has a restricted resolution inference rule that resembles (a first-order generalization of) unit propagation as well as a rule for assuming decision literals and a rule for deriving new clauses by (a first-order generalization of) conflict-driven clause learning. 1 Introduction The outstanding efficiency of current propositional Sat-solvers naturally raises the question of whether it would be possible to employ similar ideas for automating first-order logical reasoning. The recent Conflict Resolution calculus1 (CR) [25] can be regarded as a crucial initial step to answer this question. From a proof-theoretical perspective, CR generalizes (to first-order logic) the two main mechanisms on which modern Sat-solvers are based: unit propagation and conflict-driven clause learning. The calculus is sound and refutationally complete, and CR derivations are isomorphic to implication graphs. This paper goes one step further by defining proof search algorithms for CR. Familiarity with the propositional CDCL procedure [18] is assumed, even though it is briefly sketched in Section 2. The main challenge in lifting this procedure to first-order logic is that, unlike in propositional logic, first-order unit propagation does not always terminate and true clauses do not necessarily have uniformly true literals (cf. Section 4). Our solutions to these challenges are discussed in Section 5 and Section 6, and experimental results are presented in Section 7. Related Work: CR’s unit-propagating resolution rule can be traced back to unit-resulting resolution [20]. Other attempts to lift DPLL [13, 19] or CDCL [18] to first-order logic include Model Evolution [2, 5, 3, 4], Geometric Resolution [24], Non-Redundant Clause Learning [1] and the Semantically-Guided Goal Sensitive procedure [6–9]. A brief summary of these approaches and a comparison with ? 1 Author order is alphabetical by surname. Not to be confused with the homonymous calculus for linear rational inequalities [17]. CR can be found in [25]. Furthermore, many architectures [12, 15, 16, 29, 11] for first-order and higher-order theorem proving use a Sat-solver as a black box for propositional reasoning, without attempting to lift it; and Semantic Resolution [26, 14] is yet another related approach that uses externally built first-order models to guide resolution. 2 Propositional CDCL During search in the propositional case, a Sat-solver keeps a model (a.k.a. trail) consisting of a (conjunctive) list of decision literals and propagated literals. Literals of unit clauses are automatically added to the trail, and whenever a clause has only one literal that is not falsified by the current model, this literal is added to the model (thereby satisfying that clause). This process is known as unit-propagation. If unit propagation reaches a conflict (i.e. a situation where the dual of a literal already contained in the model would have to be added to it), the Sat-solver backtracks, removing from the model decision literals responsible for the conflict (as well as propagated literals entailed by the removed decision literals) and deriving, or learning, a conflict-driven clause consisting2 of duals of the decision literals responsible for the conflict (or the empty clause, if there were no decision literals). If unit propagation terminates without reaching a conflict and all clauses are satisfied by the model, then the input clause set is satisfiable. If some clauses are still not satisfied, the Sat-solver chooses and assigns another decision literal, adding it to the trail, and satisfying the clauses that contain it. 3 Conflict Resolution The inference rules of the conflict resolution calculus CR are shown in Figure 1. The unit propagating resolution rule is a chain of restricted resolutions with unit clauses as left premises and a unit clause as final conclusion. Decision literals are denoted by square brackets, and the conflict-driven clause learning rule infers a new clause consisting of negations of instances of decision literals used to reach a conflict (a.k.a. the empty clause ⊥). A clause learning inference is said to discharge the decision literals that it uses. As in the resolution calculus, CR derivations are directed acyclic graphs that are not necessarily tree-like. A CR refutation is a CR derivation of ⊥ with no undischarged decision literals. From a natural deduction point of view, a unit propagating resolution rule can be regarded as a chain of implication eliminations taking unification into account, whereas decision literals and conflict driven clause learning are reminiscent of, respectively, assumptions and chains of negation introductions, also generalized to first-order through unification. Therefore, CR can be considered a first-order hybrid of resolution and natural deduction. 2 In practice, optimizations (e.g. 1UIP) are used, and more sophisticated clauses, which are not just disjunctions of duals of the decision literals involved in the conflict, can be derived. But these optimizations are inessential to the focus of this paper. Unit-Propagating Resolution: `1 ... `n `01 ∨ . . . ∨ `0n ∨ ` u(σ) `σ where σ is a unifier of `k and `0k , for all k ∈ {1, . . . , n}. Conflict: ` `0 c(σ) ⊥ where σ is a unifier of ` and `0 . Conflict-Driven Clause Learning: i i [`1 ]1 [`n ]n .. .. 1 n .. (σ11 , . . . , σm ) ) .. (σ1n , . . . , σm n 1 .. .. ⊥ cli 1 n n ) (`1 σ11 ∨ . . . ∨ `1 σm ) ∨ . . . ∨ (` σ ∨ . . . ∨ ` σ n n 1 m n 1 where σjk (for 1 ≤ k ≤ n and 1 ≤ j ≤ mk ) is the composition of all substitutions used on the j-th patha from `k to ⊥. a Since a proof DAG is not necessarily tree-like, there may be more than one path connecting `k to ⊥ in the DAG-like proof. Fig. 1: The Conflict Resolution Calculus CR 4 Lifting Challenges First-order logic presents many new challenges for methods based on propagation and decisions, of which the following can be singled out: (1) non-termination of unit-propagation: In first-order logic, unit propagation may never terminate. For example, the clause set {p(a), ¬p(X) ∨ p(f (X)), q ∨ r, ¬q ∨ r, q ∨ ¬r, ¬q ∨ ¬r} is clearly unsatisfiable, because there is no assignment of p and q to true or false that would satisfy all the last four clauses. However, unit propagation would derive the following infinite sequence of units, by successively resolving ¬p(X) ∨ p(f (X)) with previously derived units, starting with p(a): {p(f (a)), p(f (f (a))), . . . , p(f (. . . (f (a)) . . .)), . . .}. Consequently, a proof search strategy that would wait for unit propagation to terminate before making decisions would never be able to conclude that the given clause set is unsatisfiable. (2) absence of uniformly true literals in satisfied clauses: While in the propositional case, a clause that is true in a model always has at least one literal that is true in that model, this is not so in first-order logic, because shared variables create dependencies between literals. For instance, the clause set {p(X) ∨ q(X), ¬p(a), p(b), q(a), ¬q(b)} is satisfiable, but there is no model where p(X) is uniformly true (i.e. true for all instances of X) or q(X) is uniformly true. (3) propagation without satisfaction: In the propositional case, when only one literal of a clause is not false in the model, this literal is propagated and added to the model, and the clause necessarily becomes true in the model and does not need to be considered in propagation anymore, at least until backtracking. In the first-order case, on the other hand, a clause such as p(X) ∨ q(X) would propagate the literal q(a) in a model containing ¬p(a), but p(X) ∨ q(X) does not become true in a model where q(a) is true. It must remain available for further propagations. If, for instance, the literal ¬p(b) is added to the model, the clause will be used again to propagate q(b). (4) quasi-falsification without propagation: A clause is quasi-falsified by a model iff all but one of its literals are false in the model. In first-order logic, in contrast to propositional logic, it is not even the case that a clause will necessarily propagate a literal when only one of its literals is not false in the model. For instance, the clause p(X) ∨ q(X) ∨ r(X) is quasi-falsified in a model containing ¬p(a) and ¬q(b), but no instance of r(X) can be propagated. The first two challenges affect search in a conceptual level, and solutions are discussed in Section 5. The last two prevent a direct first-order generalization of the data structures (e.g. watched literals) that make unit propagation so efficient in the propositional case. Partial solutions are discussed in Section 6. 5 First-Order Model Construction and Proof Search Despite the fundamental differences between propositional and first-order logic described in the previous section, the first-order algorithms presented aim to adhere as much as possible to the propositional procedure sketched in the Section 2. As in the propositional case, the model under construction is a (conjunctive) list of literals, but literals may now contain (universal) variables. If a literal `[X] is in a model M , then any instance `[t] is said to be true in M . Note that checking that a literal ` is true in a model M is more expensive in first-order logic than in propositional logic: whereas in the latter it suffices to check that ` is in M , in the former it is necessary to find a literal `0 in M and a substitution σ such that ` = `0 σ. A literal ` is said to be strongly true in a model M iff ` is in M . There is a straightforward solution for the second challenge (i.e. the absence of uniformly true literals in satisfied clauses): a clause is satisfied by a model M iff all its relevant instances have a literal that is true in M , where an instance is said to be relevant if it substitutes the clause’s variables by terms that occur in M . Thus, for instance, the clause p(X) ∨ q(X) is satisfied by the model [¬p(a), p(b), q(a), ¬q(b)], because both relevant instances p(a)∨q(a) and p(b)∨q(b) have literals that are true in the model. However, this solution is costly, because it requires the generation of many instances. Fortunately, in many (though not all) cases, a satisfied clause will have a literal that is true in M , in which case the clause is said to be uniformly satisfied. Uniform satisfaction is cheaper to check than satisfaction. However, a drawback of uniform satisfaction is that the model construction algorithm may repeatedly attempt to satisfy a clause that is not uniformly satisfied, by choosing one of its literals as a decision literal. For example, the clause p(X) ∨ q(X) is not uniformly satisfied by the model [¬p(a), p(b), q(a), ¬q(b)]. Without knowing that this clause is already satisfied by the model, the procedure would try to choose either p(X) or q(X) as decision literal. But both choices are useless decisions, because they would lead to conflicts with conflict-driven clauses equal to a previously derived clause or to a unit clause containing a literal that is part of the current model. A clause is said to be weakly satisfied by a model M if and only if all its literals are useless decisions. Because of the first challenge (i.e. the non-termination of unit-propagation in the general first-order case), it is crucial to make decisions during unit propagation. In the example given in item 1 of Section 4, for instance, deciding q at any moment would allow the propagation of r and ¬r (respectively due to the 4th and 6th clauses), triggering a conflict. The learned clause would be ¬q and it would again trigger a conflict by the propagation of r and ¬r (this time due to the 3rd and 5th clauses). As this last conflict does not depend on any decision literal, the empty clause is derived and thus the clause set is refuted. The question is how to interleave decisions and propagations. One straightforward approach is to keep track of the propagation depth 3 in the implication graph: any decision literal or literal propagated by a unit clause has propagation depth 0; any other literal has propagation depth k + 1, where k is the maximum propagation depth of its predecessors. Then propagation is performed exhaustively only up to a propagation depth threshold h. A decision literal is then chosen and the threshold is incremented. Such eager decisions guarantee that a decision will eventually be made, even if there is an infinite propagation path. However, eager decisions may also lead to spurious conflicts generating useless conflictdriven clauses. For instance, the clause set {1 : p(a), 2 : ¬p(X) ∨ p(f (X)), 3 : ¬p(f (f (f (f (f (f (a))))))), 4 : ¬r(X)∨q(X), 5 : ¬q(g(X))∨¬p(X), 6 : z(X)∨r(X)} (where clauses have been numbered for easier reference) is unsatisfiable, because a conflict with no decisions can be obtained by propagating p(a) (by 1), and then p(f (a)), p(f (f (a))), . . . , p(f (f (f (f (f (f (a))))))), (by 2, repeatedly), which conflicts with ¬p(f (f (f (f (f (f (a))))))) (by 3). But the former propagation has depth 6. If the propagation depth threshold is lower than 6, a decision literal is chosen before that conflict is reached. If r(X) is chosen, for example, in an attempt to satisfy the sixth clause, there are propagations (using r(X) and clauses 1, 4, 5 and 6) with depth lower than the threshold and reaching a conflict that 3 Because of the isomorphism between implication graphs and subderivations in Conflict Resolution [25], the propagation depth is equal to the corresponding subderivation’s height, where initial axiom clauses and learned clauses have height 0 and the height of the conclusion of a unit-propagating resolution inference is k + 1 where k is the maximum height of its unit premises. generates the clause ¬r(g(a)), which is useless for showing unsatisfiability of the whole clause set. This is not a serious issue, because useless clauses are often generated in conflicts with non-eager decisions as well. Nevertheless, this example suggests that the starting threshold and the strategy for increasing the threshold have to be chosen wisely, since the performance may be sensitive to this choice. Interestingly, the problem of non-terminating propagation does not manifest in fragments of first-order logic where infinite unit propagation paths are impossible. A well-known and large fragment is the effectively propositional (a.k.a. BernaysSchönfinkel ) class, consisting of sentences with prenex forms that have an ∃∗ ∀∗ quantifier prefix and no function symbols. For this fragment, a simpler proof search strategy that only makes decisions when unit propagation terminates, as in the propositional case, suffices. Infinite unit propagation paths do not occur in the effectively propositional fragment because there are no function symbols and hence the term depth4 does not increase arbitrarily. Whenever the term depth is bounded, infinite unit propagation paths cannot occur, because there are only finitely many literals with bounded term depth (given the finite set of constant, function and predicate symbols with finite arity occurring in the clause set). The insight that term depth is important naturally suggests a different approach for the general first-order case: instead of limiting the propagation depth, limit the term depth instead, allowing arbitrarily long propagations as long as the term depth of the propagated literals are smaller than the current term depth threshold. A literal is propagated only if its term depth is smaller than the threshold. New decisions are chosen when the term-depth-bounded propagation terminates and there are still clauses that are not uniformly satisfied. As before, eager decisions may lead to spurious conflicts, but bounding propagation by term depth seems intuitively more sensible than bounding it by propagation depth. 6 Implementation Details Scavenger is implemented in Scala and its source code and usage instructions are available in https://gitlab.com/aossie/Scavenger. Its packrat combinator parsers are able to parse TPTP CNF files [28]. Although Scavenger is a firstorder prover, every logical expression is converted to a simply typed lambda expression, implemented by the abstract class E with concrete subclasses Sym, App and Abs for, respectively, symbols, applications and abstractions. A trait Var is used to distinguish variables from other symbols. Scala’s case classes are used to make E behave like an algebraic datatype with (pattern-matchable) constructors. The choice of simply typed lambda expressions is motivated by the intention to generalize Scavenger to multi-sorted first-order logic and higher-order logic and support TPTP TFF and THF in the future. Every clause is internally represented as an immutable two-sided sequent consisting of a set of positive literals (succedent) and a set of negative literals (antecedent). 4 The depth of constants and variables is zero and the depth of a complex term is k + 1 when k is the maximum depth of its proper subterms. When a problem is unsatisfiable, Scavenger can output a CR refutation internally represented as a collection of ProofNode objects, which can be instances of the following immutable classes: UnitPropagatingResolution, Conflict, ConflictDrivenClauseLearning, Axiom, Decision. The first three classes correspond directly to the rules shown in Figure 1. Axiom is used for leaf nodes containing input clauses, and Decision represents a fictive rule holding decision literals. Each class is responsible for checking, typically through require statements, the soundness conditions of its corresponding inference rule. The Axiom, Decision and ConflictDrivenClauseLearning classes are less than 5 lines of code each. Conflict and UnitPropagatingResolution are respectively 15 and 35 lines of code. The code for analyzing conflicts, traversing the subderivations (conflict graphs) and finding decisions that contributed to the conflict, is implemented in a superclass, and is 17 lines long. The following three variants of Scavenger were implemented: – EP-Scavenger: aiming at the effectively propositional fragment, propagation is not bounded, and decisions are made only when propagation terminates. – PD-Scavenger: Propagation is bounded by a propagation depth threshold starting at 0. Input clauses are assigned depth 0. Derived clauses and propagated literals obtained while the depth threshold is k are assigned depth k + 1. The threshold is incremented whenever every input clause that is neither uniformly satisfied nor weakly satisfied is used to derive a new clause or to propagate a new literal. If this is not the case, a decision literal is chosen (and assigned depth k + 1) to uniformly satisfy one of the clauses that is neither uniformly satisfied nor weakly satisfied. – TD-Scavenger: Propagation is bounded by a term depth threshold starting at 0. When propagation terminates, a stochastic choice between either selecting a decision literal or incrementing the threshold is made with probability of 50% for each option. Only uniform satisfaction of clauses is checked. The third and fourth challenges discussed in Section 4 are critical for performance, because they prevent a direct first-order generalization of data structures such as watched literals, which enables efficient detection of clauses that are ready to propagate literals. Without knowing exactly which clauses are ready to propagate, Scavenger (in its three variants) loops through all clauses with the goal of using them for propagation. However, actually trying to use a given clause for propagation is costly. In order to avoid this cost, Scavenger performs two quicker tests. Firstly, it checks whether the clause is uniformly satisfied (by checking whether one of its literals belongs to the model). If it is, then the clause is dismissed. This is an imperfect test, however. Occasionally, some satisfied clauses will not be dismissed, because (in first-order logic) not all satisfied clauses are uniformly satisfied. Secondly, for every literal ` of every clause, Scavenger keeps a set of decision literals and propagated literals that are unifiable with `. A clause c is quasi-falsified when at most one literal of c has an empty set associated with it. This is a rough analogue of watched literals for detecting quasi-falsified clauses. Again, this is an imperfect test, because (in first-order logic) not all quasi-falsified clauses are ready to propagate. Despite the imperfections of these tests, they do reduce the number of clauses that need to be considered for propagation, and they are quick and simple to implement. Overall, the three variants of Scavenger listed above have been implemented concisely. Their main classes are only 168, 342 and 176 lines long, respectively, and no attempt has been made to increase efficiency at the expense of the code’s readability and pedagogical value. Premature optimization would be inappropriate for a first proof-of-concept. Scavenger still has no sophisticated backtracking and restarting mechanism, as propositional Sat-solvers do. When Scavenger reaches a conflict, it restarts almost completely: all derived conflict-driven clauses are kept, but the model under construction is reset to the empty model. 7 Experiments Experiments were conducted5 in the StarExec cluster [27] to evaluate Scavenger’s performance on TPTP v6.4.0 benchmarks in CNF form and without equality. For comparison, all other 21 provers available in StarExec’s TPTP community and suitable for CNF problems without equality were evaluated as well. For each job pair, the timeouts were 300 CPU seconds and 600 Wallclock seconds. Prover Problems Solved EPR All PEPR-0.0ps 432 GrAnDe-1.1 447 Paradox-3.0 467 ZenonModulo-0.4.1 315 TD-Scavenger 350 PD-Scavenger 252 Geo-III-2016C 344 EP-Scavenger 349 Metis-2.3 404 Z3-4.4.1 507 Zipperpin-FOF-0.4 400 Otter-3.3 362 432 447 506 628 695 782 840 891 950 1027 1029 1068 Prover Bliksem-1.12 SOS-2.0 CVC4-FOF-1.5.1 SNARK-20120808 Beagle-0.9.47 E-Darwin-1.5 Prover9-1109a Darwin-1.4.5 iProver-2.5 ET-0.2 E-2.0 Vampire-4.1 Problems Solved EPR All 424 351 452 417 402 453 403 508 551 486 489 540 1107 1129 1145 1150 1153 1213 1293 1357 1437 1455 1464 1524 Table 1: Number of problems solved by each prover Table 1 shows how many of the 1606 unsatisfiable CNF problems and 572 effectively propositional (EPR) unsatisfiable CNF problems each theorem prover solved; and figures 2 and 3 shows the performance in more detail. For a first implementation, the best variants of Scavenger show an acceptable performance. All variants of Scavenger outperformed PEPR, GrAnDe, DarwinFM, Paradox 5 Raw experimental data are available at https://doi.org/10.5281/zenodo.293187. and ZenonModulo; and EP-Scavenger additionally outperformed Geo-III. On the effectively propositional propblems, TD-Scavenger outperformed LEO-II, ZenonModulo and Geo-III, and solved only 1 problem less than SOS-2.0 and 12 less than Otter-3.3. Although Otter-3.3 has long ceased to be a state-of-the-art prover and has been replaced by Prover9, the fact that Scavenger solves almost as many problems as Otter-3.3 is encouraging, because Otter-3.3 is a mature prover with 15 years of development, implementing (in the C language) several refinements of proof search for resolution and paramodulation (e.g. orderings, set of support, splitting, demodulation, subsumption) [21, 22], whereas Scavenger is a yet unrefined and concise implementation (in Scala) of a comparatively straightforward search strategy for proofs in the Conflict Resolution calculus, completed in slightly more than 3 months. Conceptually, Geo-III (based on Geometric Resolution) and Darwin (based on Model Evolution) are the most similar to Scavenger. While Scavenger already outperforms Geo-III, it is still far from Darwin. This is most probably due to Scavenger’s current eagerness to restart after every conflict, whereas Darwin backtracks more carefully (cf. Sections 6 and 8). Scavenger and Darwin also treat variables in decision literals differently. Consequently, Scavenger detects more (and non-ground) conflicts, but learning conflict-driven clauses can be more expensive, because unifiers must be collected from the conflict graph and composed. Fig. 2: Performance on all benchmarks (provers ordered by performance) EP-Scavenger solved 28.2% more problems than TD-Scavenger and 13.9% more than PD-Scavenger. This suggests that non-termination of unit-propagation is an Fig. 3: Performance on EPR benchmarks only (provers ordered by performance) uncommon issue in practice: EP-Scavenger is still able to solve many problems, even though it does not care to bound propagation, whereas the other two variants solve fewer problems because of the overhead of bounding propagation even when it is not necessary. Nevertheless, there were 28 problems solved only by PD-Scavenger and 26 problems solved only by TD-Scavenger (among Scavenger’s variants). EP-Scavenger and PD-Scavenger can solve 9 problems with TPTP difficulty rating 0.5, all from the SYN and FLD domains. 3 of the 9 problems were solved in less than 10 seconds. 8 Conclusions and Future Work Scavenger is the first theorem prover based on the new Conflict Resolution calculus. The experiments show a promising, albeit not yet competitive, performance. A comparison of the performance of the three variants of Scavenger shows that it is non-trivial to interleave decisions within possibly non-terminating unitpropagations, and further research is needed to determine (possibly in a problem dependent way) optimal initial depth thresholds and threshold incrementation strategies. Alternatively, entirely different criteria could be explored for deciding to make an eager decision before propagation is over. For instance, decisions could be made if a fixed or dynamically adjusted amount of time elapses. The performance bottleneck that needs to be most urgently addressed in future work is backtracking and restarting. Currently, all variants of Scavenger restart after every conflict, keeping derived conflict-driven clauses but throwing away the model construct so far. They must reconstruct models from scratch after every conflict. This requires a lot of repeated re-computation, and therefore a significant performance boost could be expected through a more sensible backtracking strategy. Scavenger’s current naive unification algorithm could be improved with term indexing [23], and there might also be room to improve Scavenger’s rough first-order analogue for the watched literals data structure, even though the first-order challenges make it unlikely that something as good as the propositional watched literals data structure could ever be developed. Further experimentation is also needed to find optimal values for the parameters used in Scavenger for governing the initial thresholds and their incrementation policies. Scavenger’s already acceptable performance despite the implementation improvement possibilities just discussed above indicates that automated theorem proving based on the Conflict Resolution calculus is feasible. However, much work remains to be done to determine whether this approach will eventually become competitive with today’s fastest provers. Acknowledgments: We thank Ezequiel Postan for his implementation of TPTP parsers for Skeptik [10], which we have reused in Scavenger. We are grateful to Albert A. V. Giegerich, Aaron Stump and Geoff Sutcliffe for all their help in setting up our experiments in StarExec. This research was partially funded by the Australian Government through the Australian Research Council and by the Google Summer of Code 2016 program. Daniyar Itegulov was financially supported by the Russian Scientific Foundation (grant 15-14-00066). References 1. Alagi, G., Weidenbach, C.: NRCL - A model building approach to the bernaysschönfinkel fragment. In: Lutz, C., Ranise, S. (eds.) Frontiers of Combining Systems - 10th International Symposium, FroCoS 2015, Wroclaw, Poland, September 2124, 2015. Proceedings. Lecture Notes in Computer Science, vol. 9322, pp. 69–84. Springer (2015), http://dx.doi.org/10.1007/978-3-319-24246-0_5 2. Baumgartner, P.: A first order Davis-Putnam-Longeman-Loveland procedure. In: Proceedings of the 17th International Conference on Automated Deduction (CADE). pp. 200–219 (2000) 3. Baumgartner, P.: Model evolution-based theorem proving. IEEE Intelligent Systems 29(1), 4–10 (2014), http://dx.doi.org/10.1109/MIS.2013.124 4. Baumgartner, P., Fuchs, A., Tinelli, C.: Lemma learning in the model evolution calculus. In: Hermann, M., Voronkov, A. (eds.) Logic for Programming, Artificial Intelligence, and Reasoning, 13th International Conference, LPAR 2006, Phnom Penh, Cambodia, November 13-17, 2006, Proceedings. Lecture Notes in Computer Science, vol. 4246, pp. 572–586. Springer (2006), http://dx.doi.org/10.1007/ 11916277_39 5. Baumgartner, P., Tinelli, C.: The model evolution calculus. In: Baader, F. (ed.) Automated Deduction - CADE-19, 19th International Conference on Automated Deduction Miami Beach, FL, USA, July 28 - August 2, 2003, Proceedings. Lecture Notes in Computer Science, vol. 2741, pp. 350–364. Springer (2003), http://dx. doi.org/10.1007/978-3-540-45085-6_32 6. Bonacina, M.P., Plaisted, D.A.: Constraint manipulation in SGGS. In: Kutsia, T., Ringeissen, C. (eds.) Proceedings of the Twenty-Eighth Workshop on Unification (UNIF), Seventh International Joint Conference on Automated Reasoning (IJCAR) and Sixth Federated Logic Conference (FLoC). pp. 47–54. Technical Reports of the Research Institute for Symbolic Computation, Johannes Kepler Universität Linz (July 2014), http://vsl2014.at/meetings/UNIF-index.html 7. Bonacina, M.P., Plaisted, D.A.: SGGS theorem proving: an exposition. In: Schulz, S., Moura, L.D., Konev, B. (eds.) Proceedings of the Fourth Workshop on Practical Aspects in Automated Reasoning (PAAR), Seventh International Joint Conference on Automated Reasoning (IJCAR) and Sixth Federated Logic Conference (FLoC), July 2014. EasyChair Proceedings in Computing (EPiC), vol. 31, pp. 25–38 (July 2015) 8. Bonacina, M.P., Plaisted, D.A.: Semantically-guided goal-sensitive reasoning: Model representation. Journal of Automated Reasoning 56(2), 113–141 (2016), http: //dx.doi.org/10.1007/s10817-015-9334-4 9. Bonacina, M.P., Plaisted, D.A.: Semantically-guided goal-sensitive reasoning: Inference system and completeness. Journal of Automated Reasoning pp. 1–54 (2017), http://dx.doi.org/10.1007/s10817-016-9384-2 10. Boudou, J., Fellner, A., Woltzenlogel Paleo, B.: Skeptik: A proof compression system. In: Demri, S., Kapur, D., Weidenbach, C. (eds.) Automated Reasoning - 7th International Joint Conference, IJCAR 2014, Held as Part of the Vienna Summer of Logic, VSL 2014, Vienna, Austria, July 19-22, 2014. Proceedings. Lecture Notes in Computer Science, vol. 8562, pp. 374–380. Springer (2014), http: //dx.doi.org/10.1007/978-3-319-08587-6_29 11. Brown, C.E.: Satallax: An automatic higher-order prover. In: Gramlich, B., Miller, D., Sattler, U. (eds.) Automated Reasoning - 6th International Joint Conference, IJCAR 2012, Manchester, UK, June 26-29, 2012. Proceedings. Lecture Notes in Computer Science, vol. 7364, pp. 111–117. Springer (2012), http://dx.doi.org/ 10.1007/978-3-642-31365-3_11 12. Claessen, K.: The anatomy of Equinox – an extensible automated reasoning tool for first-order logic and beyond (talk abstract). In: Proceedings of the 23rd International Conference on Automated Deduction (CADE-23). pp. 1–3 (2011) 13. Davis, M., Putnam, H.: A computing procedure for quantification theory. Journal of the ACM 7, 201–215 (1960) 14. Hodgson, K., Slaney, J.K.: System description: SCOTT-5. In: Automated Reasoning, First International Joint Conference, IJCAR 2001, Siena, Italy, June 18-23, 2001, Proceedings. pp. 443–447 (2001), http://dx.doi.org/10.1007/3-540-45744-5_36 15. Korovin, K.: iprover - an instantiation-based theorem prover for first-order logic (system description). In: Armando, A., Baumgartner, P., Dowek, G. (eds.) Automated Reasoning, 4th International Joint Conference, IJCAR 2008, Sydney, Australia, August 12-15, 2008, Proceedings. Lecture Notes in Computer Science, vol. 5195, pp. 292–298. Springer (2008), http://dx.doi.org/10.1007/978-3-540-71070-7_24 16. Korovin, K.: Inst-Gen - a modular approach to instantiation-based automated reasoning. In: Programming Logics. pp. 239–270 (2013) 17. Korovin, K., Tsiskaridze, N., Voronkov, A.: Conflict resolution. In: Gent, I.P. (ed.) Principles and Practice of Constraint Programming - CP 2009, 15th International Conference, CP 2009, Lisbon, Portugal, September 20-24, 2009, Proceedings. Lecture Notes in Computer Science, vol. 5732, pp. 509–523. Springer (2009), http://dx. doi.org/10.1007/978-3-642-04244-7_41 18. João Marques-Silva, I.L., Malik, S.: Conflict-driven clause learning SAT solvers. In: Handbook of Satisfiability, pp. 127 – 149 (2008) 19. Martin Davis, G.L., Loveland, D.: A machine program for theorem proving. Communications of the ACM 57, 394–397 (1962) 20. McCharen, J., Overbeek, R., Wos, L.: Complexity and related enhancements for automated theorem-proving programs. Computers and Mathematics with Applications 2, 1—-16 (1976) 21. McCune, W.: OTTER 2.0. In: Stickel, M.E. (ed.) 10th International Conference on Automated Deduction, Kaiserslautern, FRG, July 24-27, 1990, Proceedings. Lecture Notes in Computer Science, vol. 449, pp. 663–664. Springer (1990), http: //dx.doi.org/10.1007/3-540-52885-7_131 22. McCune, W.: OTTER 3.3 reference manual. CoRR cs.SC/0310056 (2003), http: //arxiv.org/abs/cs.SC/0310056 23. Nieuwenhuis, R., Hillenbrand, T., Riazanov, A., Voronkov, A.: On the evaluation of indexing techniques for theorem proving. In: Automated Reasoning, First International Joint Conference, IJCAR 2001, Siena, Italy, June 18-23, 2001, Proceedings. pp. 257–271 (2001), http://dx.doi.org/10.1007/3-540-45744-5_19 24. de Nivelle, H., Meng, J.: Geometric resolution: A proof procedure based on finite model search. In: Furbach, U., Shankar, N. (eds.) Automated Reasoning, Third International Joint Conference, IJCAR 2006, Seattle, WA, USA, August 17-20, 2006, Proceedings. Lecture Notes in Computer Science, vol. 4130, pp. 303–317. Springer (2006), http://dx.doi.org/10.1007/11814771_28 25. Slaney, J., Woltzenlogel Paleo, B.: Conflict resolution: a first-order resolution calculus with decision literals and conflict-driven clause learning. Journal of Automated Reasoning pp. 1–24 (2017), http://dx.doi.org/10.1007/s10817-017-9408-6 26. Slaney, J.K.: SCOTT: A model-guided theorem prover. In: Bajcsy, R. (ed.) Proceedings of the 13th International Joint Conference on Artificial Intelligence. Chambéry, France, August 28 - September 3, 1993. pp. 109–115. Morgan Kaufmann (1993), http://ijcai.org/Proceedings/93-1/Papers/016.pdf 27. Stump, A., Sutcliffe, G., Tinelli, C.: StarExec: A cross-community infrastructure for logic solving. In: Demri, S., Kapur, D., Weidenbach, C. (eds.) Automated Reasoning: 7th International Joint Conference, IJCAR 2014, Held as Part of the Vienna Summer of Logic, VSL 2014, Vienna, Austria, July 19-22, 2014. Proceedings. pp. 367–373. Springer International Publishing, Cham (2014), http://dx.doi.org/ 10.1007/978-3-319-08587-6_28 28. Sutcliffe, G.: The TPTP problem library and associated infrastructure: The FOF and CNF parts, v3.5.0. Journal of Automated Reasoning 43(4), 337–362 (2009) 29. Voronkov, A.: AVATAR: the architecture for first-order theorem provers. In: Biere, A., Bloem, R. (eds.) Computer Aided Verification - 26th International Conference, CAV 2014, Held as Part of the Vienna Summer of Logic, VSL 2014, Vienna, Austria, July 18-22, 2014. Proceedings. Lecture Notes in Computer Science, vol. 8559, pp. 696–710. Springer (2014), http://dx.doi.org/10.1007/978-3-319-08867-9_46
2cs.AI
Markov Decision Processes with Continuous Side Information Aditya Modi [email protected] Computer Science and Engineering, Univ. of Michigan Ann Arbor arXiv:1711.05726v1 [stat.ML] 15 Nov 2017 Nan Jiang [email protected] Microsoft Research, New York Satinder Singh [email protected] Computer Science and Engineering, Univ. of Michigan Ann Arbor Ambuj Tewari [email protected] Department of Statistics, Univ. of Michigan Ann Arbor Abstract We consider a reinforcement learning (RL) setting in which the agent interacts with a sequence of episodic MDPs. At the start of each episode the agent has access to some side-information or context that determines the dynamics of the MDP for that episode. Our setting is motivated by applications in healthcare where baseline measurements of a patient at the start of a treatment episode form the context that may provide information about how the patient might respond to treatment decisions. We propose algorithms for learning in such Contextual Markov Decision Processes (CMDPs) under an assumption that the unobserved MDP parameters vary smoothly with the observed context. We also give lower and upper PAC bounds under the smoothness assumption. Because our lower bound has an exponential dependence on the dimension, we consider a tractable linear setting where the context is used to create linear combinations of a finite set of MDPs. For the linear setting, we give a PAC learning algorithm based on KWIK learning techniques. Keywords: Reinforcement Learning, PAC bounds, KWIK Learning. 1. Introduction Consider a basic sequential decision making problem in healthcare, namely that of learning a treatment policy for patients to optimize some health outcome of interest. One could model the interaction with every patient as a Markov Decision Process (MDP). In precision or personalized medicine, we want the treatment to be personalized to every patient. At the same time, the amount of data available on any given patient may not be enough to personalize well. This means that modeling each patient via a different MDP will result in severely suboptimal treatment policies. The other extreme of pooling all patients’ data results in more data but most of it will perhaps not be relevant to the patient we currently want to treat. We therefore face a trade-off between having a large amount of shared data to learn a single policy, and, finding the most relevant policy for each patient. A similar trade-off occurs in other applications involving humans as the agents environment such as online tutoring and web advertising. c 2017 A. Modi, N. Jiang, S. Singh & A. Tewari. A key observation is that in many personalized decision making scenarios, we have some side information available about individuals which might help us in designing personalized policies and also help us pool the interaction data across the right subsets of individuals. Examples of such data include laboratory data or medical history of patients in healthcare, user profiles or history logs in web advertising, and student profiles or historical scores in online tutoring. Access to such side information should let us learn better policies even with a limited amount of interaction with individual users. We refer to this side-information as contexts and adopt an augmented model called Contextual Markov Decision Process (CMDP) proposed by Hallak et al. (2015). We assume that contexts are fully observed and available before the interaction starts for each new MDP.1 In this paper we study the sample complexity of learning in CMDPs in the worst case. We consider two concrete settings of learning in a CMDP with continuous contexts. In the first setting, the individual MDPs vary in an arbitrary but smooth manner with the contexts, and we propose our Cover-Rmax algorithm in Section 3 with PAC bounds. The innate hardness of learning in this general case is captured by our lower bound construction in Section 3.1. To show that it is possible to achieve significantly better sample complexity in more structured CMDPs, we consider another setting where contexts are used to create linear combinations of a finite set of fixed but unknown MDPs. We use the KWIK framework to devise the KWIK LR-Rmax algorithm in Section 4.1 and also provide a PAC upper bound for the algorithm. 2. Contextual Markov Decision Process 2.1 Problem setup and notation We start with basic definitions and notations for MDPs, and then introduce the contextual case. Definition 2.1 (Markov Decision Processes). A Markov Decision Process (MDP) is defined as a tuple (S, A, p(·|·, ·), r(·, ·), µ) where S is the state space and A is the action space; p(s0 |s, a) defines the transition probability function for a tuple (s, a, s0 ) where s, s0 ∈ S, a ∈ A; and µ defines the initial state distribution for the MDP. We consider the case of fixed horizon (denoted H) episodic MDPs. We use πh (s) to denote a policy’s action for state s at timestep h. For each episode, an initial state is observed according to the distribution µ and afterwards, for 0 ≤ h < H, the agent chooses an action ah = πh (sh ) according to a (non-stationary) policy. There is a reward rh and then a next state sh+1 according to the reward and the transition functions. For policy π we define its value as follows: h 1 H−1 i X π VM = Es0 ∼µ,M,π r(sh , πh (sh )) . (1) H h=0 π∗ An optimal policy is one that achieves the largest possible value (called optimal value ∗ ). Next we define the contextual model which is similar to the definition and denoted VM given by Hallak et al. (2015): 1. Hallak et al. (2015) assumes latent contexts, which results in significant differences from our work in application scenarios, required assumptions, and results. See detailed discussion in Section 5. 2 Markov Decision Processes with Continuous Side Information Definition 2.2 (Contextual MDP). A contextual Markov Decision Process (CMDP) is defined as a tuple (C, S, A, M) where C is the context space, S is the state space, and A is the action space. M is a function which maps a context c ∈ C to MDP parameters M(c) = {pc (·|·, ·), rc (·, ·), µc (·)}. We denote the MDP for a context c by M c . We make the simplifying assumption that the initial state distribution is independent of the context and is same for all. We assume throughout the paper that the rewards are bounded between 0 and 1. We denote |S|, |A| by S, A respectively. We also assume that the context space is bounded, and for any c ∈ C the `2 norm of c is upper bounded by some constant. We consider the online learning scenario with the following protocol: For t = 1, 2, . . .: 1. Observe context ct ∈ C. 2. Choose a policy πt (based on ct and previous episodes). 3. Experience an episode in M ct using πt . We do not make any distributional assumptions over the context sequence. Instead, we allow the sequence to be chosen in an arbitrary and potentially adversarial manner. A natural criteria for judging the efficiency of the algorithm is to look at the number of episodes where it performs sub-optimally. The main aim of the PAC analysis is to bound the number πt ∗ of episodes where we have VM ct < VM ct − , i.e., the value of the algorithm’s policy is not -optimal (Dann and Brunskill, 2015). Although, we do give PAC bounds for the CoverRmax algorithm given below, the reader should make note that, we have not made explicit attempts to achieve the tightest possible result. We use the Rmax (Brafman and Tennenholtz, 2002) algorithm as the base of our construction to handle exploration-exploitation because of its simplicity. Our approach can also be combined with the other PAC algorithms (Strehl and Littman, 2008; Dann and Brunskill, 2015) for improved dependence on S, A and H. 3. Cover-Rmax In this section, we present the Cover-Rmax algorithm and provide a PAC bound for it under a smoothness assumption. The key motivation for our contextual setting is that sharing information among different contexts is helpful. Therefore, it is natural to assume that the MDPs corresponding to similar contexts will themselves be similar. This can be formalized by the following smoothness assumption: Definition 3.1 (Smoothness). Given a CMDP (C, S, A, M), and a distance metric over the context space φ(·, ·), if for any two contexts c1 , c2 ∈ C, we have the following constraints: kpc1 (·|s, a) − pc2 (·|s, a)k1 ≤ Lp φ(c1 , c2 ) |rc1 (s, a) − rc2 (s, a)| ≤ Lr φ(c1 , c2 ) then, we call this a smooth CMDP with smoothness parameters Lp and Lr . 3 We assume that the distance metric and the constants Lp and Lr are known. This smoothness assumption allows us to use a minimally tweaked version of Rmax (Brafman and Tennenholtz, 2002) and provide an analysis for smooth CMDPs similar to existing literature on MDPs(Kearns and Singh, 2002; Strehl et al., 2009; Strehl and Littman, 2008). If we know the transition dynamics and the expected reward functions for each state-action pair in a finite MDP, we can easily compute the optimal policy. The idea of Rmax is to distinguish the state-action pairs as known or unknown: a state-action pair is known if we have visited it for enough number of times, so that the empirical estimates of reward and transition probabilities are near-accurate due to sufficient data. A state s becomes known when all for all actions a the pairs (s, a) become known. Rmax then constructs an auxiliary MDP which encourages optimistic behaviour by assigning maximum reward (hence the name Rmax) to the remaining unknown states. When we act according to the optimal policy in the auxiliary MDP, one of the following must happen: 1) we exploit the information available and achieve near-optimal value, or, 2) we visit unknown states and accumulate more information efficiently. Formally, for a set of known states K, we define an (approximate) induced MDP M̂K in the following manner. Let n(s, a) and n(s, a, s0 ) denote the number of observations of state-action pair (s, a) and transitions (s, a, s0 ) respectively. Also, let R(s, a) denote the total reward obtained from state-action pair (s, a). For each s ∈ K, define the values n(s, a, s0 ) , n(s, a) rM̂K (s, a) = R(s, a)/n(s, a). pM̂K (s0 |s, a) = (2) For each s ∈ / K, define the values as pM̂K (s0 |s, a) = I{s0 = s} and rM̂K (s, a) = 1. We use the certainty equivalent policy computed for this induced MDP and perform balanced wandering (Kearns and Singh, 2002) for unknown states. Balanced wandering ensures that all actions are tried equally and fairly for unknown states. Assigning maximum reward to the unknown states pushes the agent to visit these states and provides the necessary exploration impetus. The generic template of Rmax is given in Algorithm 1. For the contextual case, we have an infinite number of such MDPs. The idea behind our algorithm is that, one can group close enough contexts and treat them as a single MDP. Utilizing the boundedness of the context space C, we create a cover of C with finitely many balls Br (oi ) of radius r centered at oi ∈ Rd . By tuning the radius r, we can control the bias introduced by ignoring the differences among the MDPs in the same ball. Doing so allows us to pool together the data from all MDPs in a ball, so that we avoid the difficulty of infinite MDPs and instead only deal with finitely many of them. The size of the cover, i.e., the number of balls can be measured by the notion of covering numbers (see e.g., Wu (2016)), defined as N (C, r) = min{|Y| : C ⊆ ∪y∈Y Br (y)}. The resulting algorithm, Cover-Rmax, is obtained by using the subroutines in Algorithm 2, and we state its sample complexity guarantee in Theorem 3.2. 4 Markov Decision Processes with Continuous Side Information Algorithm 1: Rmax Template for CMDP 1 2 3 4 5 6 7 8 9 10 11 12 13 Initialize(S, A, C, , δ); for each episode t = 1, 2, · · · do Receive context ct ∈ C; ∗ ; Set K, MK using P redict(ct , s, a) for all (s, a). π ← πM K for h = 0, 1, · · · H − 1 do if sh ∈ K then Choose ah := πh (sh ); else Choose ah : (sh , ah ) is unknown; U pdate(ct , sh , ah , (sh+1 , rh )); end end end Algorithm 2: Cover-Rmax 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Function Initialize(S, A, C, , δ)  r0 = min( 8HL ,  ); p 8Lr Create an r0 -cover of C; Initialize counts for all balls B(oi ); Function Predict(c, s, a) Find j such that c ∈ B(oj ); if nj (s, a) < m then return p̂c (·|s, a) and r̂c (s, a) using (2); else return unknown; end Function Update(c, s, a, (s0 , r)) Find j such that c ∈ B(oj ); if nj (s, a) < m then Increment counts and rewards in B(oj ); end Theorem 3.2 (PAC bound for Cover-Rmax). For any input values 0 < , δ ≤ 1 and a CMDP with smoothness parameters Lp and Lr , with probability at least 1 − δ, the CoverRmax algorithm produces a sequence of policies {πt } which yield at most O  N H 2 SA 3 S + ln N SA N  ln δ δ  ,  ). non--optimal episodes, where N = N (C, r0 ) and r0 = min( 8HL p 8Lr Proof sketch. We first of all carefully adapt the analysis of Rmax by Kakade (2003) to get the PAC bound for an episodic MDP. Let m be the number of visits to a state-action pair 5 after which the model’s estimate p̂(·|s, a) for p(·|s, a) has an `1 error of at most /4H and reward estimate r̂(s, a) has an absolute error of at most /4. We can show that: Lemma 3.3. Let M be an MDP with the fixed horizon H. If π̂ is the optimal policy for M̂K as computed by Rmax, then for any starting state s0 , with probability at least 1 − 2δ, π̂ ≥ V ∗ − 2 for all but O( mSA ln 1 ) episodes. we have VM M  δ Now instead of learning the model for each contextual MDP separately, we combine the data within each ball. Therefore, we have to take care of two things: choose the radius r0 for a fine enough cover and a value of m which is the number of visits after which a state becomes known for a ball. For satisfying the conditions of Lemma 3.3 for all MDPs within  a ball, we need the radius r of the cover to be r ≤ r0 = min 8HL ,  and the value of p 8Lr 128(S ln 2+ln SA )H 2 δ m= . Using Lemma 3.3, we obtain an upper bound on number of non- 2  2 1 episodes in a single ball as O H 3SA S + ln SA ln with probability at least 1 − δ. δ δ Setting the individual failure probability to be δ/N (C, r0 ) and using the union bound, we get the stated PAC bound.2 We observe that the PAC bound has linear dependence on the covering number of the context space. In case of a d-dimensional Euclidean metric space, the covering number would be of the order O( r1d ). However, we show in Section 3.1, that, the dependence would be at least linear, and hence, indicate the difficulty of optimally learning in such cases. 3.1 Lower Bound We prove a lower bound on the number of sub-optimal episodes for any learning algorithm in a smooth CMDP which shows that a linear dependence on the covering number of the context space is unavoidable. As far as we know, there is no existing way of constructing PAC lower bounds for continuous state spaces with smoothness, so we cannot simply augment the state representation to include context information. Instead, we prove our own lower bound in Theorem 3.4 which builds upon the work of Dann and Brunskill (2015) on lower bounds for episodic finite MDPs and of Slivkins (2014) on lower bounds for contextual bandits. Theorem 3.4 (Lower bound for smooth CMDP). There exists constants δ0 , 0 , such that for every δ ∈ (0, δ0 ) and  ∈ (0, 0 ), any algorithm that satisfies a PAC guarantee for (, δ) and computes a sequence of deterministic policies for each context, there is a hard CMDP (C, S, A, M) with smoothness constant Lp = 1, such that   E[B] = Ω N (C,21 )SA (3) where B is the number of sub-optimal episodes and 1 = 1280He4 (H−2) . Proof. The overall idea is to embed multiple MDP learning problems in a CMDP, such that the agent has to learn the optimal policy in each MDP separately and cannot generalize across them. We show that the maximum number of problems that can be embedded scales 2. For detailed proofs, we refer the reader to the appendix. 6 Markov Decision Processes with Continuous Side Information Figure 1: Hard instances for episodic MDP (Dann and Brunskill, 2015). The initial state 0 moves to a uniform distribution over states 1 to n regardless of the action, and states +/− are absorbing with 1 and 0 rewards respectively. States 0 to n have 0 reward for all actions. Each state i ∈ [n] essentially acts as a hard bandit instance, whose A actions move to + and − randomly. Action a0 satisfies 0 p(+|i, a0 ) = 21 + 2 and there is at most one other action ai with p(+|i, ai ) = 12 +0 . Any other action aj satisfies p(+|i, aj ) = 12 . with the covering number, and the result follows by incorporating known PAC lower bound for episodic MDPs. We start with the lower bound for learning in episodic MDPs. See Figure 1 and its caption for details. The construction is due to Dann and Brunskill (2015) and we adapt their lower bound statement to our setting in Theorem 3.5. Theorem 3.5 ( Lower bound for episodic MDPs (Dann and Brunskill, 2015) ). There exists constants δ0 , 0 , such that for every δ ∈ (0, δ0 ) and  ∈ (0, 0 ), any algorithm that satisfies a PAC guarantee for (, δ) and computes   a sequence of deterministic policies, there is a hard instance Mhard so that E[B] = Ω SA , where B is the number of sub-optimal episodes. The 2 constants can be chosen as δ0 = e−4 80 , 0 = H−2 3 . 640He4 Now we discuss how to populate the context space with these hard MDPs. Note in Figure 1 that, the agent does not know which action is the most rewarding (ai ), and the adversary can choose i to be any element of [A] (which is essentially choosing an instance from a family of MDPs). In our scenario, we would like to allow the adversary to choose the MDP independently for each individual packing point to yield a lower bound linear in the packing number. However, this is not always possible due to the smoothness assumption, as committing to an MDP at one point may restrict the adversary’s choices in another point. To deal with this difficulty, we note that any pair of hard MDPs differ from each other by O(0 ) in transition distributions. Therefore, we construct a packing of C with radius r = 80 , defined as a set of points Z such that any two points in Z are at least r away from 3. The lower bound here differs from that in the original paper by H 2 , because our value is normalized (see Eq.(1)), whereas they allow the magnitude of value to grow with H. 7 each other. The maximum size of such Z is known as the packing number : D(C, r) = max{|Z| : Z is an r-packing of C}, which is related to the covering number as N (C, r) ≤ D(C, r). The radius r is chosen to be O(0 ) so that arbitrary choices of hard MDP instances at different packing points always satisfy the smoothness assumption (recall that Lp = 1). Once we fix the MDPs for all c ∈ Z, we specify the MDP for c ∈ C \ Z as follows: for state i and action a, pc (+|i, a) = max max(1/2, pc0 (+|i, a) − φ(c, c0 )/2). 0 c ∈Z Essentially, as we move away from a packing point, the transition to +/− become more uniform. We can show that: Claim 3.6. The CMDP defined above is satisfies Definition 3.1 with constant Lp = 1.4 We choose the context sequence given as input to be repetitions of an arbitrary permutation of Z. By construction, the learning at different points in Z are independent, so the lower bound is simply the lower bound for learning a single MDP (Theorem 3.5) multiplied by the cardinality of Z (the packing number). Using the well known relation that N (C, r) ≤ D(C, r), we have the desired lower bound. We refer the reader to the appendix for proof of Claim 3.6 and a more detailed analysis. 4. Contextual Linear Combination of MDPs From the previous section, it is clear that for a contextual MDP with just smoothness assumptions, exponential dependence on context dimension is unavoidable. Further, the computational requirements of our Cover-Rmax algorithm scales with the covering number of the context space. As such, in this section, we focus on a more structured assumption about the mapping from context space to MDPs and show that we can achieve substantially improved sample efficiency. The specific assumption we make in this section is that the model parameters of an individual MDP M c is the linear combination of the parameters of d base MDPs, i.e.,   p1 (s0 |s, a)   .. > 0 pc (s0 |s, a) = c>   := c P (s, a, s ), . pd (s0 |s, a)  r1 (s, a)   rc (s, a) = c>  ...  := c> R(s, a).  (4) rd (s, a) We use P (s, a, s0 ) and R(s, a) as shorthand for the d × 1 vectors that concatenate the parameters from different base MDPs for the same s, a (and s0 ). The parameters of the base MDPs (pi and ri ) are unknown and need to be recovered from data by the learning 4. The reward function does not vary with context hence reward smoothness is satisfied for all Lr ≥ 0. The proof of the claim is deferred to the appendix. 8 Markov Decision Processes with Continuous Side Information agent, and the combination coefficients are directly available which is the context vector c itself. This assumption can be motivated in an application scenario where the user/patient responds according to her characteristic distribution over d possible behavioural patterns. A mathematical difficulty here is that for an arbitrary context vector c ∈ Rd , pc (·|·, ·) is not always a valid transition function and may violate non-negativity and normalization constraints. Therefore, we require that c ∈ ∆d−1 , that is, c stays in the probability simplex so that pc (·|·, ·) is always valid.5 4.1 KWIK LR-Rmax We first explain how to estimate the model parameters in this linear setting, and then discuss how to perform exploration properly. Model estimation Recall that in Section 3, we treat the MDPs whose contexts fall in a small ball as a single MDP, and estimate its parameters using data from the local context ball. In this section, however, we have a global structure due to our parametric assumption (d base MDPs that are shared across all contexts). This implies that data obtained at a context may be useful for learning the MDP parameters at another context that is far away, and to avoid the exponential dependence on d we need to leverage this structure and generalize globally across the entire context space. Due to the linear combination setup, we use linear regression to replace the estimation procedure in Equation 2: in an episode with context c, when we observe the state-action pair (s, a), a next-state snext will be drawn from pc (·|s, a).6 Therefore, the indicator of whether snext is equal to s0 forms an unbiased estimate of pc (s0 |s, a), i.e., Esnext ∼pc (·|s,a) [I[snext = s0 ]] = pc (s0 |s, a) = c> P (s, a, s0 ). Based on this observation, we can construct a feature-label pair (c, I[snext = s0 ]) (5) whenever we observe a transition tuple (s, a, snext ) under context c, and their relationship is governed by a linear prediction rule with P (s, a, s0 ) being the coefficients. Hence, to estimate P (s, a, s0 ) from data, we can simply collect the feature-label pairs that correspond to this particular (s, a, s0 ) tuple, and run linear regression to recover the coefficients. The case for reward function is similar, hence, not discussed. If the data is abundant (i.e., (s, a) is observed many times) and exploratory (i.e., the design matrix that consists of the c vectors for (s, a) is well-conditioned), we can expect to recover P (s, a, s0 ) accurately. But how to guarantee these conditions? Since the context is chosen adversarially, the design matrix can indeed be ill-conditioned. Observe, however, when the matrix is ill-conditioned and new contexts lie in the subspace spanned by previously observed contexts, we can make accurate predictions despite the inability to recover the model parameters. An online linear regression (LR) procedure will take care of this issue, and we choose KWIK LR (Walsh et al., 2009) as such a procedure. The original KWIK LR deals with scalar labels, which can be used to decide whether the estimate of pc (s0 |s, a) is sufficiently accurate (known). A (s, a) pair then becomes known if (s, a, s0 ) is known for all s0 . This approach, however, generally leads to a loose analysis, Pn+1 5. ∆n is the n-simplex {x ∈ Rn+1 : i=1 xi = 1, x ≥ 0}. 6. Here we use snext to denote the random variable, and s0 to denote a possible realization. 9 because there is no need to predict pc (s0 |s, a) for each individual s0 accurately: if the estimate of pc (·|s, a) is close to the true distribution under L1 error, the (s, a) pair can already be considered as known. We extend the KWIK LR analysis to handle vector-valued outputs, and provide tighter error bounds by treating pc (·|s, a) as a whole. Below we introduce our extended version of KWIK LR, and explain how to incorporate the knownness information in Rmax skeleton to perform efficient exploration. Identifying known (s, a) with KWIK LR The KWIK LR-Rmax algorithm we propose for the linear setting still uses Rmax template (Algorithm 1) for exploration: in every episode we build the induced MDP MK , and act greedily according to its optimal policy with balanced wandering. The major difference from Cover-Rmax lies in how the set of known states K are identified and how MK is constructed, which we explain below (see pseudocode in Algorithm 3). At a high level, the algorithm works in the following way: when constructing MK , we query the KWIK procedure for estimates p̂c (·|s, a) and r̂c (s, a) for every pair (s, a) using P redict(c, s, a). The KWIK procedure either returns ⊥ (don’t know), or returns estimates that are guaranteed to be accurate. If ⊥ is returned, then we consider (s, a) as unknown and associate s with Rmax reward for exploration. Such optimistic exploration ensures significant probability of observing (s, a) pairs on which we have predicted ⊥. If we do observe such pairs in an episode, we call U pdate with feature-label pairs formed via Equation 5 to make progress on estimating parameters for unknown state-action pairs. Next we walk through the pseudocode and explain how P redict and U pdate work in detail. Then we prove an upper bound on the number of updates that can happen (i.e., the if condition holds on Line 11), which forms the basis of our analysis of KWIK LR-Rmax. In Algorithm 3, we initialize matrices Q and W for each (s, a) using Initialize(·) and update them over time. Let Ct (s, a) be the design matrix at episode t, where each row is a context cτ such that (s, a) was observed in episode τ < t. By matrix inverse rules, we can verify that the update rule on Line 10 essentially yields Qt (s, a) = (I + Ct> Ct )−1 , where Qt (s, a) is the value of Q(s, a) in episode t. This is the inverse of the (unnormalized and regularized) empirical covariance matrix, which plays a central role in linear regression analysis. The matrix W accumulates the outer product between the feature vector (context) c and the one-hot vector label y = ({I[snext = s0 ]}∀s0 ∈S )> . It is then obvious that Qt (s, a)Wt (s, a) is the linear regression estimate of P (s, a) using the data up to episode t. When a new input vector ct comes, we check whether kQ(s, a)ct k2 is below a predetermined threshold αS (Line 5). Recall that Q(s, a) is the inverse covariance matrix, so a small kQ(s, a)ct k2 implies that the estimate Qt (s, a)Wt (s, a) is close to P (s, a) along the direction > of ct , so we predict pct (·|s, a) = c> t P (s, a) ≈ ct Q(s, a)W (s, a); otherwise we return ⊥. The KWIK subroutine for rewards is similar hence omitted. To ensure that the estimated transition probability is valid, we project the estimated vector onto ∆S−1 , which can be done efficiently using existing techniques (Duchi et al., 2008). Below we state the KWIK bound for learning the transition function; the KWIK bound for learning rewards is much smaller hence omitted here. We use the KWIK bound for scalar linear regression from Walsh et al. (2009) and the property of multinomial samples to get our KWIK bound. 10 Markov Decision Processes with Continuous Side Information Theorem 4.1 (KWIK LR bound for learning multinomial vectors). For any  > 0 and δ > 0, if the KWIK LR algorithm is executed for probability vectors pt (·|s, a), with αS = 2 2 min{b1 d3/2 , b2 √d log(d2 , √ } with suitable constants b1 and b2 , then the number of ⊥’s S /δ) 2 d 2 where updates take place (see Line 11) will be bounded by O( d4 max{d2 , S 2 log2 (d/δ 0 )}), and, with probability at least 1 − δ, ∀ct where a non-“⊥” prediction is returned, kp̂ct t (·|s, a) − pct t (·|s, a)k1 ≤ . Proof sketch. (See full proof in the appendix.) We provide a direct reduction to KWIK bound for learning scalar values. The key idea is to notice that for any vector v ∈ RS : kvk1 = sup v > f. f ∈{−1,1}S So conceptually we can view Algorithm 3 as running 2S scalar linear regression simultaneously, each of which projects the vector label to a scalar by a fixed linear transformation f . We require every scalar regressor to have (, δ/2S ) KWIK guarantee, and the `1 error guarantee for the vector label follows from union bound. Algorithm 3: KWIK learning of pc (·|s, a) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Function Initialize(S, d, αS ) Q(s, a) ← Id for all (s, a); W (s, a) ← {0}d×S for all (s, a); Function Predict(c, s, a) if kQ(s, a)ck1 ≤ αS then return p̂c (·|s, a) = c> Q(s, a)W (s, a); else return p̂c (·|s, a) =⊥; end Function Update(c, s, a, snext ) if kQ(s, a)ck1 > αS (“⊥” prediction) then (Q(s,a)c)(Q(s,a)c)> ; 1+c> Q(s,a)c 0 > s ]}∀s0 ∈S ) ; Q(s, a) ← Q(s, a) − y ← ({I[snext = W (s, a) ← W (s, a) + cy; end With this result, we are ready to prove the formal PAC guarantee for KWIK LR-Rmax. Theorem 4.2 (PAC bound for KWIK LR-Rmax). For any input values 0 < , δ ≤ 1 and a linear CMDP model with d number of base MDPs, with probability 1 − δ, the KWIK LRRmax algorithm, produces a sequence of policies {πt } which yield at most O  d2 H 4 SA 5 log 1δ max{d2 , S 2 log2 ( dSA δ )} non--optimal episodes. 11  Proof. When the KWIK subroutine (Algorithm 3) makes non-“⊥” predictions p̂c (s, a, s0 ), we require that kp̂c (·|s, a) − pc (·|s, a)k1 ≤ /8H. After projection onto ∆S−1 , we have: kΠ∆S−1 (p̂c (s, a)) − pc (·|s, a)k1 ≤ 2kp̂c (·|s, a) − pc (·|s, a)k1 ≤ /4H. Further, the update to the matrices Q and W happen only when an unknown state action pair (s, a) is visited and the KWIK subroutine still predicts ⊥ (Line 10). The KWIK bound states that after a fixed number of updates to an unknown (s, a) pair, the parameters will always be known with desired accuracy. The number of updates m can be obtained by setting the desired accuracy in transitions to /8H and failure probability as δ/SA in Theorem 4.1: m=O d2 H 4 4 max{d2 , S 2 log2 ( dSA δ )}  We now use Lemma 3.3 where instead of updating counts for number of visits, we look at the number of updates for unknown (s, a) pairs. On applying a union bound over all state action pairs  and using  Lemma 3.3, it is easy to see that the sub-optimal episodes are 1 mSA bounded by O  ln δ with probability at least 1 − δ. The bound in Theorem 4.2 is obtained by substituting the value of m. We see that for this contextual MDP, the linear structure helps us in avoiding the exponential dependence in context dimension d. The combined dependence on S and d is now O(max{d4 S, d2 S 3 }). 5. Related work Transfer in RL with latent contexts The general definition of CMDPs captures the problem of transfer in RL and multi-task RL. See Taylor and Stone (2009) and Lazaric (2011) for surveys of empirical results. Recent papers have also advanced the theoretical understanding of transfer in RL. For instance, Brunskill and Li (2013) and Hallak et al. (2015) analyzed the sample complexity of CMDPs where each MDP is an element of a finite and small set of MDPs, and the MDP label is treated as the latent (i.e., unseen) context. Mahmud et al. (2013) consider the problem of transferring the optimal policies of a large set of known MDPs to a new MDP. The commonality of the above papers is that the MDP label (i.e., the context) is not observed. Hence, their methods have to initially explore in every new MDP to identify its label, which requires the episode length to be substantially longer than the planning horizon. This can be a problematic assumption in our motivating scenarios, where we interact with a patient / user / student for a limited period of time and the data in a single episode (whose length H is the planning horizon) is not enough for identifying the underlying MDP. In contrast to prior work, we propose to leverage observable context information to perform more direct transfer from previous MDPs, and our algorithm works with arbitrary episode length H. 12 Markov Decision Processes with Continuous Side Information RL with side information Our work leverages the available side-information for each MDP, which is inspired by the use of contexts in contextual bandits (Langford and Zhang, 2008; Li et al., 2010). The use of such side information can also be found in RL literature: Ammar et al. (2014) developed a multi-task policy gradient method where the context is used for transferring knowledge between tasks; Killian et al. (2016) used parametric forms of MDPs to develop models for personalized medicine policies for HIV treatment. RL in metric space For smooth CMDPs (Section 3), we pool observations across similar contexts and reduce the problem to learning policies for finitely many MDPs. An alternative approach is to consider an infinite MDP whose state representation is augmented by the context, and apply PAC-MDP methods for metric state spaces (e.g., C-PACE proposed by Pazis and Parr (2013)). However, doing so might increase the sample and computational complexity unnecessarily, because we no longer leverage the structure that a particular component of the (augmented) state, namely the context, remains the same in an episode. Concretely, the augmenting approach needs to perform planning in the augmented MDP over states and contexts, which makes its computational/storage requirement worse than our solution: we only perform planning in MDPs defined on S, whose computational characteristics have no dependence on the context space. In addition, we allow the context sequence to be chosen in an adversarial manner. This corresponds to adversarially chosen initial states in MDPs, which is usually not handled by PAC-MDP methods. KWIK learning of linear hypothesis classes Our linear combination setting (Section 4) provides an instance where parametric assumptions can lead to substantially improved PAC bounds. We build upon the KWIK-Rmax learning framework developed in previous work (Li et al., 2008; Szita and Szepesvári, 2011) and use KWIK linear regression as a sub-routine. For the resulting KWIK LR-Rmax algorithm, its sample complexity bound inherently depends on the KWIK bound for linear regression. It is well known that even for linear hypothesis classes, the KWIK bound is exponential in input dimension in the agnostic case (Szita and Szepesvári, 2011). Therefore, the success of the algorithm relies on the validity of the modelling assumption. Abbasi-Yadkori and Neu (2014) studied a problem similar to our linear combination setting, and proposed a no-regret algorithm by combining UCRL2 (Jaksch et al., 2010) with confidence set techniques from stochastic linear optimization literature (Dani et al., 2008; Filippi et al., 2010). Our work takes an independent and very different approach, and we provide a PAC guarantee which is not directly comparable to regret bound. Still, we √ observe that our dependence on A is optimal for PAC whereas theirs is not ( A is optimal for bandit regret analysis and they have A); on the other hand, their dependence on T (the number of rounds) is optimal, and our dependence on 1/, its counterpart in PAC analysis, is suboptimal. It is an interesting future direction to combine the algorithmic ideas from both papers to improve the guarantees. 6. Conclusion In this paper, we present a general setting of using side information for learning near-optimal policies in a large and potentially infinite number of MDPs. The proposed Cover-Rmax algorithm is a model-based PAC-exploration algorithm for the case where MDPs vary smoothly 13 with respect to the observed side information. Our lower bound construction indicates the necessary exponential dependence of any PAC algorithm on the context dimension in a smooth CMDP. We also consider another instance with a parametric assumption, and using a KWIK linear regression procedure, present the KWIK LR-Rmax algorithm for efficient exploration in linear combination of MDPs. Our PAC analysis shows a significant improvement with this structural assumption. The use of context based modelling of multiple tasks has rich application possibilities in personalized recommendations, healthcare treatment policies, and tutoring systems. We believe that our setting can possibly be extended to cover the large space of multi-task RL quite well with finite/infinite number of MDPs, observed/latent contexts, and deterministic/noisy mapping between context and environment. We hope our work spurs further research along these directions. Acknowledgments This work was supported in part by a grant from the Open Philanthropy Project to the Center for Human-Compatible AI, and in part by NSF Grant IIS 1319365. Ambuj Tewari acknowledges the support from NSF grant CAREER IIS-1452099 and Sloan Research Fellowship. Any opinions, findings, conclusions, or recommendations expressed here are those of the authors and do not necessarily reflect the views of the sponsors. References Yasin Abbasi-Yadkori and Gergely Neu. Online learning in mdps with side information. arXiv preprint arXiv:1406.6812, 2014. Haitham B Ammar, Eric Eaton, Paul Ruvolo, and Matthew Taylor. Online multi-task learning for policy gradient methods. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 1206–1214, 2014. Ronen I Brafman and Moshe Tennenholtz. R-max-a general polynomial time algorithm for near-optimal reinforcement learning. Journal of Machine Learning Research, 3(Oct): 213–231, 2002. Emma Brunskill and Lihong Li. Sample complexity of multi-task reinforcement learning. arXiv preprint arXiv:1309.6821, 2013. Varsha Dani, Thomas P Hayes, and Sham M Kakade. Stochastic linear optimization under bandit feedback. In COLT, pages 355–366, 2008. Christoph Dann and Emma Brunskill. Sample complexity of episodic fixed-horizon reinforcement learning. In Advances in Neural Information Processing Systems, pages 2818– 2826, 2015. John Duchi, Shai Shalev-Shwartz, Yoram Singer, and Tushar Chandra. Efficient projections onto the l 1-ball for learning in high dimensions. In Proceedings of the 25th international conference on Machine learning, pages 272–279. ACM, 2008. 14 Markov Decision Processes with Continuous Side Information Sarah Filippi, Olivier Cappe, Aurélien Garivier, and Csaba Szepesvári. Parametric bandits: The generalized linear case. In Advances in Neural Information Processing Systems, pages 586–594, 2010. Assaf Hallak, Dotan Di Castro, and Shie Mannor. Contextual markov decision processes. arXiv preprint arXiv:1502.02259, 2015. Thomas Jaksch, Ronald Ortner, and Peter Auer. Near-optimal regret bounds for reinforcement learning. Journal of Machine Learning Research, 11(Apr):1563–1600, 2010. Sham Machandranath Kakade. On the sample complexity of reinforcement learning. PhD thesis, 2003. Michael Kearns and Satinder Singh. Near-optimal reinforcement learning in polynomial time. Machine Learning, 49(2-3):209–232, 2002. Taylor Killian, George Konidaris, and Finale Doshi-Velez. Transfer learning across patient variations with hidden parameter markov decision processes. arXiv preprint arXiv:1612.00475, 2016. John Langford and Tong Zhang. The epoch-greedy algorithm for multi-armed bandits with side information. In Advances in neural information processing systems, pages 817–824, 2008. A. Lazaric. Transfer in reinforcement learning: a framework and a survey. In M. Wiering and M. van Otterlo, editors, Reinforcement Learning: State of the Art. Springer, 2011. Lihong Li, Michael L Littman, and Thomas J Walsh. Knows what it knows: a framework for self-aware learning. In Proceedings of the 25th international conference on Machine learning, pages 568–575. ACM, 2008. Lihong Li, Wei Chu, John Langford, and Robert E Schapire. A contextual-bandit approach to personalized news article recommendation. In Proceedings of the 19th international conference on World wide web, pages 661–670. ACM, 2010. MM Mahmud, Majd Hawasly, Benjamin Rosman, and Subramanian Ramamoorthy. Clustering markov decision processes for continual transfer. arXiv preprint arXiv:1311.3959, 2013. Jason Pazis and Ronald Parr. Pac optimal exploration in continuous space markov decision processes. In AAAI, 2013. Aleksandrs Slivkins. Contextual bandits with similarity information. Journal of Machine Learning Research, 15(1):2533–2568, 2014. Alexander L Strehl and Michael L Littman. An analysis of model-based interval estimation for markov decision processes. Journal of Computer and System Sciences, 74(8):1309– 1331, 2008. Alexander L Strehl, Lihong Li, and Michael L Littman. Reinforcement learning in finite mdps: Pac analysis. Journal of Machine Learning Research, 10(Nov):2413–2444, 2009. 15 István Szita and Csaba Szepesvári. Agnostic kwik learning and efficient approximate reinforcement learning. In Proceedings of the 24th Annual Conference on Learning Theory, pages 739–772, 2011. Matthew E Taylor and Peter Stone. Transfer learning for reinforcement learning domains: A survey. Journal of Machine Learning Research, 10(Jul):1633–1685, 2009. Thomas J Walsh, István Szita, Carlos Diuk, and Michael L Littman. Exploring compact reinforcement-learning representations with linear regression. In Proceedings of the Twenty-Fifth Conference on Uncertainty in Artificial Intelligence, pages 591–598. AUAI Press, 2009. A corrected version is available as Technical Report DCS-tr-660, Department of Computer Science, Rutgers University, December, 2009. Yihong Wu. Packing, covering, and consequences on minimax risk. EECS598: Informationtheoretic methods in high-dimensional statistics, Statistics, Yale University, 2016. 16 Markov Decision Processes with Continuous Side Information Appendix A. Proofs from Section 3 A.1 Proof of Lemma 3.3 We adapt the analysis in Kakade (2003) for the episodic case which results in the removal of a factor of H, since complete episodes are counted as mistakes and we do not count every sub-optimal action in an episode. We reproduce the detailed analysis here for completion. For completing the proof of Lemma 3.3, firstly, we will look at a version of simulation lemma from Kearns and Singh (2002). Also, for the complete analysis we will assume that the rewards lie between 0 and 1. Definition A.1 (Induced MDP). Let M be an MDP with K ⊆ S being a subset of states. Given, such a set K, we define an induced MDP MK in the following manner. For each s ∈ K, define the values pMK (s0 |s, a) = pM (s0 |s, a) rMK (s, a) = rM (s, a) For all s ∈ / K, define pMK (s0 |s, a) = I{s0 = s} and rMK (s, a) = 1. Lemma A.2 (Simulation lemma for episodic MDPs). Let M and M 0 be two MDPs with the same state-action space. If the transition dynamics and the reward functions of the two MDPs are such that kpM (·|s, a) − pM 0 (·|s, a)k1 ≤ 1 ∀s ∈ S, a ∈ A |rM (s, a) − rM 0 (s, a)| ≤ 2 ∀s ∈ S, a ∈ A then, for every (non-stationary) policy π the two MDPs satisfy this property: π π |VM − VM 0 | ≤ 2 + H1 π (τ ) denote the Proof. Consider Th to be the set of all trajectories of length h and let PM probability of observing trajectory τ in M with the behaviour policy π. Further, let UM (τ ) the expected average reward obtained for trajectory τ in MDP M . X π π π π = | [PM (τ )UM (τ ) − PM |VM − VM 0| 0 (τ )UM 0 (τ )] | τ ∈TH ≤ | X π π π π [PM (τ )UM (τ ) − PM (τ )UM 0 (τ ) + PM (τ )UM 0 (τ ) − PM 0 (τ )UM 0 (τ )] | τ ∈TH ≤ | X π [PM (τ )(UM (τ ) − UM 0 (τ ))] | + | τ ∈TH ≤ | X π π [UM 0 (τ )(PM (τ ) − PM 0 (τ ))] | τ ∈TH π PM (τ )|2 + | τ ∈TH ≤ 2 + | X X π π [PM (τ ) − PM 0 (τ )] | τ ∈TH X π [PM (τ ) π − PM 0 (τ )] | τ ∈TH The bound for the second term follows from the proof of lemma 8.5.4 in Kakade (2003). Combining the two expressions, we get the desired result. 17 Lemma A.3 (Induced inequalities). Let M be an MDP with K being the set of known states. Let MK be the induced MDP as defined in A.1 with respect to K and M . We will show that for any (non-stationary) policy π, all states s ∈ S, π π VM (s) ≥ VM (s) K and π π VM (s) ≥ VM (s) − PπM [Escape to an unknown state|s0 = s] K π (s) denotes the value of policy π in MDP M when starting from state s. where VM Proof. See Lemma 8.4.4 from Kakade (2003). Corollary A.4 (Implicit Explore and Exploit). Let M be an MDP with K as the set of ∗ ∗ be the optimal policies for M known states and MK be the induced MDP. If πM and πM K K and M respectively, we have for all states s: ∗ πM VM K ∗ (s) ≥ VM (s) − PπM [Escape to an unknown state|s0 = s] Proof. Follows from Lemma 8.4.5 from Kakade (2003). ∗ be the optimal policy for M . Also, using the assumption Proof of Lemma 3.3. Let πM about m, we have an /2-approximation of MK as the MDP M̂K . Rmax computes the optimal policy for MˆK which is denoted by π̂. Then, by Lemma A.2, π̂ π̂ (s) − /2 VM (s) ≥ VM̂ K K ≥ V ≥ ∗ πM (s) − /2 M̂K π∗ VMM (s) K − Combining this with Lemma A.3, we get π̂ π̂ VM (s) ≥ VM (s) − PπM [Escape to an unknown state|s0 = s] K π∗ ≥ VMM (s) −  − PπM [Escape to an unknown state|s0 = s] K ∗ ≥ VM (s) −  − PπM [Escape to an unknown state|s0 = s] If this escape probability is less than , then the desired relation is true. Therefore, we need to bound the number of episodes where this expected number is greater than . Note that, due to balanced wandering, we can have at most mSA visits to unknown states for the Rmax algorithm. In the execution, we may encounter an extra H − 1 visits as the estimates are updated only after the termination of an episode. Whenever this quantity is more than , the expected number of exploration steps in mSA/ such episodes is at least mSA. By the Hoeffding’s inequality, for N episodes, with probability, at least 1 − δ, the number of successful exploration steps is greater than r N 1 N − ln 2 δ 1 Therefore, if N = O( mSA  ln δ ), with probability at least 1 − δ, the total number of visits to an unknown state is more than mSA. Using the upper bound on such visits, we conclude that these many episodes suffice. 18 Markov Decision Processes with Continuous Side Information A.2 Proof of Theorem 3.2 We now need to compute the required resolution of the cover and the number of transitions m which will guarantee the approximation for the value functions as required in the previous lemma. The following result is the key result: Lemma A.5 (Cover approximation). For a given CMDP and a finite cover, i.e., C = N (C,r) ∪i=1 Bi such that ∀i, ∀c1 , c2 ∈ Bi : kpc1 (·|s, a) − pc2 (·|s, a)k1 ≤ /8H and |rc1 (s, a) − rc2 (s, a)| ≤ /8 128(S ln 2+ln SA )H 2 δ if we visit every state-action pair m = times in a ball Bi summing ob2 servations over all c ∈ Bi , then, for any policy π and with probability at least 1 − 2δ, the approximate MDP M̂i corresponding to Bi computed using empirical averages will satisfy π π | ≤ /2 |VM − VM̂ c i for all c ∈ Bi . Proof. For each visit to a state action pair (s, a), we observe a transition to some s0 ∈ S for context ct ∈ Bi in tth visit with probability pct (s, a). Let us encode this by an S-dimensional vector It with 0 at all indices except s0 . After observing m such transitions, we create the 1 Pm estimate for any c ∈ Bi as pM̂i (·|s, a) = m t=1 It . Now for all c ∈ Bi , m kpM̂i (·|s, a) − pc (·|s, a)k1 ≤ kpM̂i (·|s, a) − 1 X ct p (·|s, a)k1 + /8H m t=1 For bounding the first term, we use the Hoeffding’s bound: m h i 1 X ct P kpM̂i (·|s, a) − p (·|s, a)k1 ≥  m t=1 = ≤ P m h max (pM̂i (s0 ∈ A|s, a) − 0 s ∈A⊆S X s0 ∈A⊆S ≤ i 1 X ct 0 p (s ∈ A|s, a)) ≥ /2 m t=1 m i h 1 X ct 0 P (pM̂i (s0 ∈ A|s, a) − p (s ∈ A|s, a)) ≥ /2 m t=1 (2S − 2) exp(−m2 /2) Therefore, with probability at least 1 − δ/2, for all s ∈ S, a ∈ A, we have: r 2(S ln 2 + ln 2SA/δ) c kpM̂i (·|s, a) − p (·|s, a)k1 ≤ + /8H m 128(S ln 2+ln SA )H 2 δ If m = , the error becomes /4H. One can easily verify using similar 2 arguments that, the error in rewards for any context c ∈ Bi is less than /4. By using the simulation lemma A.2, we get the desired result. 19 Appendix B. Lower bound analysis B.1 Proof of Claim 3.6 Once the instances at the packing points are assigned, the parameters for any other context c ∈ C, state i and action a are given by: pc (+|i, a) = max max(1/2, pc0 (+|i, a) − φ(c, c0 )/2) 0 c ∈Z We now prove that, with this definition, the smoothness requirements are satisfied: Claim B.1. The contextual MDP defined above is a valid instance of a contextual MDP with smoothness constants Lp = 1. (The reward function does not vary with context hence reward smoothness is satisfied for all Lr ≥ 0.). Proof. We need to prove that the defined contextual MDP, satisfies the constraints in Definition 3.1. Let us assume that the smoothness assumption is violated for a context pair (c1 , c2 ). The smoothness constraints for rewards are satisfied trivially for any value of Lr as they are constant. This implies that there exists state i ∈ [n] and action a such that kpc1 (·|i, a) − pc2 (·|i, a)k1 > φ(c1 , c2 ) ⇒ 2|pc1 (+|i, a) − pc2 (+|i, a)| > φ(c1 , c2 ) We know that, pc (+|i, a) ∈ [1/2, 1/2 + 0 ], which shows that φ(c1 , c2 ) < 20 . Without loss of generality, assume pc1 (+|i, a) > pc2 (+|i, a) which also leads to pc1 (+|i, a) > 1/2 ⇒ ∃c0 ∈ Z such that φ(c1 , c0 ) < 20 By triangle inequality, we have φ(c2 , c0 ) < 40 Now, ∀c00 ∈ Z, such that φ(c00 , c0 ) ≥ 80 , by triangle inequality, we have φ(c00 , c1 ) > 60 φ(c00 , c2 ) > 40 This simplifies the definition of pc (+|i, a) for c = c1 , c2 to pc (+|i, a) = max(1/2, pc0 (+|i, a) − φ(c0 , c)/2) Now, |pc1 (+|i, a) − pc2 (+|i, a)| = pc1 (+|i, a) − pc2 (+|i, a) = pc0 (+|i, a) − φ(c0 , c1 )/2 − max(1/2, pc0 (+|i, a) − φ(c0 , c2 )/2) ≤ pc0 (+|i, a) − φ(c0 , c1 )/2 − (pc0 (+|i, a) − φ(c0 , c2 )/2) = 1 2 (φ(c0 , c2 ) − φ(c0 , c1 )) ≤ φ(c1 , c2 )/2 which leads to a contradiction. 20 Markov Decision Processes with Continuous Side Information B.2 Lower bound for smooth CMDP In the lower bound construction, we made a key argument that the defined contextual mapping with specific instances, requires any agent to learn the models of a significant number of MDPs separately to get decent generalization. The construction populates a set of packing points in the context space with hard MDPs and argues that these instances are independent of each other from the algorithm’s perspective. To formalize this statement, let Z be the 80 -packing as before. The adversary makes the choices of the instances at each context c ∈ Z, as follows: Select an MDP from the family of hard instances described in Figure 1 where the optimal action from each state in {1, . . . , n} is chosen randomly and independently from the other assignments. The parameter 0 deciding the difference in 4 optimality of actions in Figure 1 is taken as 160He (H−2) which is required by the construction of Theorem 3.5. We denote these instances by the set I and an individual instance by Iz where z = {z1 , z2 , . . . , z|Z| } is the set of these random choices made by the adversary. By construction, we have a uniform distribution Γ ≡ Γ1 × Γ2 × . . . Γ|Z| over these possible set of instances Iz . From claim 5.3, any assignment of optimal actions to these packing points would define a valid smooth contextual MDP. Further, the independent choice of the optimal actions makes MDPs at each packing point at least as difficult as learning a single MDP. Formally, let the sequence of transitions and rewards observed by the learning agent for all packing points be T ≡ {τ1 , τ2 , . . . , τ|Z| }. Due to the independence between individual instances, we can see that: PΓ [ τ1 |τ2 , τ3 , . . . , τ|Z| ] ≡ PΓ1 [ τ1 ] where PΓ [τi ] denotes the distribution of trajectories τi . Thus, observing trajectories from MDP instances at other packing points does not let the algorithm deduce anything about the nature of the instance chosen for one point. With respect to this distribution, learning in the contextual MDP is equivalent to or worse than simulating a single MDP learning algorithm at each of these packing points. For any given contextual MDP algorithm Alg, we have: EΓ [Bi ] = EΓ−i [EΓi ,Alg [Bi |T−i ]] ≥ EΓ−i [EΓ1 ,Alg* [Bi ]] where Alg* is an optimal single MDP learning algorithm. The expectation is with respect to the distribution over the instances Iz and the algorithm’s randomness. From Theorem  3.5, we can lower bound the expectation on the right hand side of the inequality by Ω SA . 2 The total number of mistakes is lower bounded as: |Z| |Z|   X X EΓ [ Bi ] = EΓ [Bi ] ≥ Ω |Z|SA 2 i=1 i=1 Setting |Z| = D(C, 1 ) ≤ N (C, 1 ) gives the stated lower bound with 1 = 80 . Appendix C. Proof of the Theorem 4.1 In this section, we present the proof of our KWIK bound for learning transition probabilities. Our proof uses a reduction technique that reduces the vector-valued label setting to the scalar setting, and combines the KWIK bound for scalar labels given by Walsh et al. (2009). 21 Proof. Fix a state action pair (s, a). Consider a sequence of contexts c1 , c2 , ... for which the transitions were observed for pair (s, a). Given a new context c, we want to estimate: pc (·|s, a) = c> P (s, a) In our KWIK LR algorithm, we estimate this as: p̂c (·|s, a) = c> Q(s, a)W (s, a) where Q(s, a) and W (s, a) are as described in Section 4.1. We wish to bound the `1 error between p̂c (·|s, a) and pc (·|s, a) for all c for which a prediction is made. We know that kpc (·|s, a) − p̂c (·|s, a)k1 = sup (pc (·|s, a) − p̂c (·|s, a))f. (6) f ∈{−1,1}S We use this representation of `1 -norm to prove a tighter KWIK bound for learning transition probabilities. For every fixed f ∈ {−1, 1}S , we formulate a new linear regression problem with feature-label pair: (c, yf ). Recall that y = ({I[snext = s0 ]}∀s0 ∈S )> is the vector label of real interest, and f projects y to a scalar value. Algorithm 3 can be viewed as implicitly running this regression thanks to linearity: since Q only depends on input contexts and W is linear in y, p̂c (·|s, a)f is simply equal to the linear regression prediction for the problem (c, yf ). As a result, the KWIK bound for the problem (c, yf ) (which we establish below) automatically applies as a property of p̂c (·|s, a)f . Taking union bound over all f ∈ {−1, 1}S yields the desired `1 error guarantee for p̂c (·|s, a) thanks to Equation 6. Now we establish the KWIK guarantee for the new regression problem. The groundtruth (expected) label is pc (·|s, a)f = c> (P (s, a)f ) := c> θf . (7) The noise in the label is then η f := (y − pc (·|s, a))f. (8) This noise has zero-mean and constant magnitude: |η f | ≤ ky − pc (·|s, a)k1 kf k∞ ≤ 2. With the above conditions, we can invoke the KWIK bound for scalar linear regression from Walsh et al. (2009): Theorem C.1 (KWIK bound for linear regression(Walsh et al., 2009)). Suppose the observation noise in a noisy linear regression problem has zero-mean and its absolute value is bounded by β. Let M be an upper bound on the `2 norm of the true linear coefficients. For any δ 0 > 0 and  > 0, if the KWIK linear regression algorithm is executed with 2 2  , b2 M log(d/δ α0 = min{b1 dM 0 ) , 2M }, with suitable constants b1 and b2 , then the number of 3 2 0 ) ⊥’s will be O(M 2 max{ d4 , d log (d/δ }), and with probability at least 1 − δ 0 , for each sample 4 xt for which a prediction is made, the prediction is -accurate. 22 Markov Decision Processes with Continuous Side Information √ √ For our purpose, β = 2 as |η f | ≤ 2 and M = d as kθf k2 = kP (s, a)f k2 ≤ d. Now set δ 0 = 2δS in Theorem C.1. In the KWIK linear regression algorithm, the known status for a context c is checked in the same manner as done in Line 5 in Algorithm 3. Therefore h i P r kpc (·|s, a) − p̂c (·|s, a)k1 ≥  h i = Pr sup (pc (·|s, a) − p̂c (·|s, a))f ≥  (Equation 6) f ∈{−1,1}S ≤ X h i P r (pc (·|s, a) − p̂c (·|s, a))f ≥  (union bound) f ∈{−1,1}S = X h i P r c> θf − c> Q(s, a)(W (s, a)f ) ≥  (regression w.r.t. f implicitly run) f ∈{−1,1}S ≤ X δ/2S = δ. f ∈{−1,1}S Substituting the values of M and δ 0 in Theorem C.1, we get: 2 2  , √ } αS = min{b1 d3/2 , b2 √d log(d/2 S δ0 ) 2 d and number of ⊥’s is bounded as 4 O(max{ d4 , d 2S2 23 log2 (d/δ 0 ) }). 4
2cs.AI
Robust Visual SLAM with Point and Line Features arXiv:1711.08654v1 [cs.CV] 23 Nov 2017 Xingxing Zuo1 , Xiaojia Xie1 , Yong Liu1,2 and Guoquan Huang3 Abstract— In this paper, we develop a robust efficient visual SLAM system that utilizes heterogeneous point and line features. By leveraging ORB-SLAM [1], the proposed system consists of stereo matching, frame tracking, local mapping, loop detection, and bundle adjustment of both point and line features. In particular, as the main theoretical contributions of this paper, we, for the first time, employ the orthonormal representation as the minimal parameterization to model line features along with point features in visual SLAM and analytically derive the Jacobians of the re-projection errors with respect to the line parameters, which significantly improves the SLAM solution. The proposed SLAM has been extensively tested in both synthetic and real-world experiments whose results demonstrate that the proposed system outperforms the state-of-the-art methods in various scenarios. I. I NTRODUCTION Visual SLAM (V-SLAM) is one of enabling technologies for autonomous systems such as self-driving cars, unmanned aerial vehicles and space robots. While most V-SLAM solutions rely on point features due to their simplicity, line features commonly seen in man-made environments are less sensitive to lighting variation and position ambiguity and have been only used in recent work [2]–[8]. In principle, the combination of point and line features would provide more geometric constraints about the structure of the environment than either one, which motivates us to design robust V-SLAM with point and line features. Recently, optimization-based approaches have become favorable for the V-SLAM due to its superior accuracy per computational unit as compared with filtering-based approaches [9]. In particular, graph-based SLAM is one of the most popular formulations which constructs a factor graph whose nodes correspond to the states to estimate and edges represent measurement constraints between the nodes. When incorporating the line features into the traditional point feature-based graph SLAM framework, two challenges arise: The first one is that the spatial line is often over parameterized for the convenience of transformation [3], [4], [7], which incurs extra computational overhead in the graph optimization. Note that while a spatial line has only four degrees of freedom, typically it is represented by its two spatial endpoints or the P lücker coordinates with six degrees of freedom. Secondly, it is known that the Jacobian plays 1 Xingxing Zuo and Xiaojia Xie are with the Institute of Cyber-Systems and Control, Zhejiang University, Zhejiang, 310027, China. 2 Yong Liu is with the State Key Laboratory of Industrial Control Technology and Institute of Cyber-Systems and Control, Zhejiang University, Zhejiang, 310027, China (Yong Liu is the corresponding author, email: [email protected]). 3 Guoquan Huang is with the Department of Mechanical Engineering, University of Delaware, Newark, DE 19716, USA. an important role when using an iterative approach to solve the graph optimization problem. In part because of the over parametrization, most approaches [6], [7] using line features typically employ the numerically computed Jacobians, which incurs approximation. In contrast, we analytically compute the Jacobians during the graph optimization in order to improve accuracy as well as efficiency. In particular, this paper introduces a robust and efficient graph-based visual SLAM system using both point and line features with a unified cost function, combining the reprojection errors of points and lines. In our back-end, the spatial line is parametrized by the orthonormal representation, which is the minimal and decoupled representation. Based on this minimal parametrization, we further derive the analytical Jacobian of the line re-projection error. Specifically, the main contributions of this paper are the following: • An improved extraction and matching method for line features is introduced to robustify data association. • In the back-end of the proposed visual SLAM, we employ the orthonormal (minimal) representation to parameterize lines and analytically compute the corresponding Jacobians. • We design and implement a complete visual SLAM system using both point and line features, which includes stereo matching, frame tracking, local mapping, bundle adjustment of both line feature and point feature, as well as point-line based loop detection. Extensive experimental results are presented to validate its performance. II. R ELATED W ORK Some methods have been proposed to parameterize line in three-dimensional (3D) space efficiently. Sola [10] summarizes several methods to represent line including P lücker coordinates, Anchored P lücker Lines, and homogeneouspoints line etc. For minimizing the number of the parameters, Bartoli [11] proposed the orthonormal representation with the minimum four parameters to represent spatial lines in SFM. Combination of point and line features has been utilized in the SLAM community recently. Marzorati et al. [3] proposed a SLAM with points and lines, which uses a special trifocal cameras to detect and reconstruct 3D lines. Rother [2] reconstructed points and lines at the cost of requiring a reference plane to be visible in all views. Koletschka et al. [5] proposed a stereo odometry based on points and lines, which computes the sub-pixel disparity of the endpoints of the line and deals with partial occlusions. Lu [7] fuses point and line features to form a RGBD visual odometry algorithm, which extracts 3D points and lines from RGB-D data. It is also proved that fusing these two types of features (a) Point and line features detected in one image (b) The point and line map Fig. 1. The proposed visual SLAM with point and line features on the it3f dataset [6]. Note that in (b), the green lines indicate the trajectory of camera motion. The blue frames represent keyframes, the current frame in green, and the local map for the tracking at that moment in red. produced smaller uncertainty in motion estimation than using either feature type alone in his work. Ruben [8] proposed a probabilistic approach to stereo visual odometry based on the combination of points and line segments, which weighs the associated errors of points and line segments according to their covariance matrices. III. D ETECTION AND R EPRESENTATION OF L INE F EATURES A. Extraction and Description of Line Features Line Segment Detector (LSD) [12] is a popular feature detector for line segments. It is designed to work on noisy image in various scenes without parameter tuning and is able to provide subpixel accuracy. However, the LSD suffers from the problem of dividing a line into multiple segments in some scenarios as shown in Fig. 2, causing failures for matching and tracking line features. side of the line segment is darker. In our improvement, we merge the segments according to their differences of both direction and distance. As shown in Fig. 3, l represents the minimum distance between the endpoints of the two segments, and d indicates the distance from the midpoint of one segment to the other line segment. If d and l are smaller than the given threshold and the direction difference is also small, then the two segments are considered to be the candidates to be combined. This improved line detector has the advantages of making more robust and accurate data association as demonstrated in our experiments. Fig. 4 shows the result of the two different detectors. Note that the merged line segments found by our improved detector is represented by the LBD line descriptor [13], which is a 256-bit vector same as ORB point descriptor [14]. The distance between the two descriptors can be another criterion for fusing two lines. B. Line Feature Matching Fig. 2. Performance of LSD. Left: Original image. Right: Line features detected in the image by LSD. Therefore, in this paper, we seek to improve the LSD algorithm by minimizing the influence of dividing a line into multiple segments. In particular, we merge the line segments which should be on the same one straight line while being divided to several parts. For each line segment extracted by LSD, the start point and end point can be distinguished, because the direction is encoded by which Fig. 3. Distances between two line segments. Based on the LBD line segment descriptor, we introduce the geometric properties [15] of line to perform effective line matching. In our approach, two successfully matched line features l1 , l2 need to satisfy the following conditions: 1) the angular difference of two matched lines is smaller than a given threshold Φ; 2) the length of l1 , kl1 k is similar to the length of l2 , min(kl1 k,kl2 k) kl2 k: max(kl > τ; 1 k,kl2 k) 3) the overlapping length of the two lines is greater than loverlap a certain value: min(kl > β; 1 k,kl2 k) Fig. 4. Comparative results of different detectors. Left: The original LSD detector. Right: The proposed improved detector. 4) the distance between the two LBD descriptors is less than a certain value. C. Geometric Representation As 3D line can be initialized by its two spatial points, we assume that their homogeneous coordinates are X1 = (x1 , y1 , z1 , r1 )T , X2 = (x2 , y2 , z2 , r2 )T respectively, while the inhomogeneous coordinates are represented as X̃1 , X̃2 . Then P lücker coordinates can be constructed as follows:  L= X̃1 × X̃2 r2 X̃1 − r1 X̃2   = n v  ∈ P5 ⊂ R6 (1) Fig. 5. Geometric interpretation of four parameters δθ in updating orthonormal representation. which is a 6-dimensional vector consisting of n and v. v is the direction vector of the line and n is the normal vector of the plane determined by the line and the origin [10]. Since 3D line has only four degrees of freedom, the P lücker coordinates are over parameterized. In the backend graph optimization, the extra degrees of freedom will increase the computational cost and cause the numerical instability of the system. Thus, Bartoli [11] proposed the orthonormal representation with minimum four parameters. We can obtain the orthonormal representation (U , W ) ∈ SO(3) × SO(2) from P lücker coordinates:  L = [n|v] =  w1 =U 0 0 h n knk v kvk n×v kn×vk  0 w2  . 0 The orthonormal representation of  u11 U = U (θ) =  u21 u31  w1 W = W (θ) = w2 i knk  0 0  0 kvk  (2) 0 (3) line (U , W ) consists of:  u12 u13 u22 u23  (4) u32 u33  −w2 . (5) w1 We can update the orthonormal representation with the T minimum four parameters δ θ = [θ T , θ] ∈ R4 , we can up3 date U with the vector θ ∈ R , and update W with θ. Each sub-parameter of δθ has a specific geometric interpretation. W updated by θ encapsulates the vertical distance d from the origin to the spatial line. As shown in Fig. 5, in the case of fixed W represented in gray, the three-dimensional vector θ is related to the rotation of the line around three axes, drawn in orange, green, and blue. Note that in the proposed visual SLAM system, we only use the orthonormal representation in the back-end optimization, as it is the minimal and decoupled representation. However, in the other steps, the P lücker coordinates are used due to its convenience in camera projection, endpoints trimming, and line initialization [6], [11]. IV. G RAPH O PTIMIZATION WITH P OINT AND L INE M EASUREMENTS In what follows, we present in detail how the line measurements are incorporated into our graph-based visual SLAM system, while the point measurements are treated in a standard way, for example, as in ORB-SLAM [1]. A. Measurement Models of Point and Line Features We use the transformation matrix Tcw ∈ SE(3) to denote the transformation from world frame to camera frame, which consists of a rotation matrix Rcw ∈ SO(3), and a translation vector tcw ∈ R3 , as shown in (6). First, we convert the 3D line Lw from the world frame to the camera frame [16] as shown in (7), denoted as Lc , with representation of the P lücker coordinates. Then the 3D line Lc is projected to the image in (8), described as l0 on image plane, according to the known intrinsic parameters of camera. It should be noted that only normal components nc in the P lücker coordinates Lc can provide meaningful information in the projection. Then, the re-projection error of 3D line is represented as the distance between two homogeneous endpoints xs , xe of the matched line segment z to the back-projected line l0 on image plane as shown in (9).   Rcw tcw Tcw = (6) 0 1     Rcw [tcw ]× Rcw nc Lc = = Hcw Lw = Lw , vc 0 Rcw (7) where [.]× denotes the skew-symmetric matrix of a vector, and Hcw represents transformation matrix of the line.     fv 0 0 l1 0 fu 0  nc =  l2  , (8) l0 = Knc =  −fv cu fu cv fu fv l3 where K denotes the projection matrix of the line [10]. #T " 0 0 xT xT el sl 0 el = d (z, l ) = p 2 ,p2 , (9) l1 + l22 l1 + l22 where d(.) denotes the distance function. The camera pose Tkw , the 3D point position Xw,i , and the position of 3D line Lw,j are denoted as vertices in the graph model. The two types of edge, the pose-point edge in (10), the pose-line edge in (11), are constructed according to the front-end data association. The re-projection errors encapsulated in the edges are: Epk,i =xk,i − KTkw Xw,i (10) Elk,j = d (zk,j , Knc [Hcw Lw,j ]) , (11) where xk,i stands for the coordinates of point in the image, nc [.] denotes the normal components of the P lücker coordinates. For simplicity, we omit the conversion from homogeneous coordinates to the inhomogeneous in the above equations. Assuming that the observations obey Gaussian distribution, the final cost function C can be obtained as in (12), Where Σp−1 , Σl−1 are the inverse covariance matrices of points and lines, and ρp , ρl are robust Huber cost functions. The back-end optimization minimizes the cost function C.  X   X  −1 T C= ρp EpT ρl Elk,j Σl−1 k,i Σpk,i Epk,i + k,j Elk,j k,i k,j (12) B. Jacobian of Line Re-projection Error It is known that the Jacobian is important when using an iterative approach to solve the the graph optimization problem. To the best of our knowledge, this is the first paper deriving out the analytical Jacobains of re-projection errors with respect to line parameters, which including the Jacobian with respect to the small pose changes δξ , and to the four dimensional vector δθ which updates the orthonormal representation. The Jacobian of the line re-projection error el = d(z, l0 ) with respect to the back-projected line l0 = [l1 , l2 , l3 ]T is given by: # " l e l e 1 u1 − 1ln2 1 v1 − 2ln2 1 1 ∂el , (13) = ∂l0 ln u2 − l1l2e2 v1 − l2l2e2 1 n n 2×3 p 0 T 0 where e1 = xT (l12 + l22 ). xs = s l , e 2 = x e l , ln = T T [u1 , v1 , 1] and xe = [u2 , v2 , 1] are the two endpoints of matched line segment in the image. Recall the projection of 3D line l0 = Knc , then:   ∂l0 ∂Knc = = K 0 3×6 (14) ∂Lc ∂Lc Assuming that the orthonormal representation of line in the world frame Lw , which consists of U and W , We write the Jacobians directly: ∂Hcw Lw ∂Lc = = Hcw (15) ∂Lw ∂Lw   ∂Lw −[w1 u1 ]× −w2 u1 = , (16) −[w2 u2 ]× w1 u2 6×4 ∂δθ where ui is the ith column of U . w It is difficult to compute ∂L ∂δξ directly, so we divide the pose changes δξ into two parts, the translation part δρ and the rotation part δφ . δφ are set to zeros when computing Jacobian with respect to δρ . With a transformation matrix T ∗ containing the translation δρ , the new line L∗c is: ∗ T = exp δξ ∧   Tcw ≈ I 0T δρ 1  Tcw R∗ = Rcw , t∗ = δρ + tcw H∗cw = L∗c = H∗cw Lw  Rcw 0  = [δρ + tcw ]× Rcw Rcw (17) (18)  Rcw nw + [δρ + tcw ]× Rcw vw T Rcw vw (19)  , (20)  where exp δξ ∧ denotes the exponential map from Lie algebras to Lie Groups (hence δξ ∧ is a Lie algebra). Then it is easy to deduce the partial derivative of δρ : " #   [δρ +tcw ]× Rcw vw ∂L∗c −[Rcw vw ]× ∂δρ = = 0 ∂δρ 0 6×3 (21) ∗ ∗ ∂L ∂L The process to deduce ∂δφc is similar to ∂δρc , except for δρ = 0. We only shows the final result Eq.22, and drops the coordinate frame subscripts for readability. Readers can refer to the Appendix for more details. ∂L∗c == ∂δφ     −[Rn]× − [t]× Rv × −[Rv]× 6×3 (22) Stacking the Jacobians of δρ and δφ , we can obtain the final Jacobian of δξ :     −[Rn]× − [t]× Rv × −[Rv]× ∂L∗c = (23) −[Rv]× 0 ∂δξ 6×6 Finally, the Jacobian of the re-projection error with respect to the line parameters can be found using the chain rule: ∂el ∂el ∂l0 ∂Lc = 0 ∂δξ ∂l ∂Lc ∂δξ (24) ∂el ∂l0 ∂Lc ∂Lw ∂el = 0 ∂δθ ∂l ∂Lc ∂Lw ∂δθ (25) Jlξ = Jlθ = Once these analytical Jacobians are available, we can employ iterative algorithms such as Gaussian-Newton to solve the graph optimization problem. V. E XPERIMENTAL R ESULTS A. System Implementation The proposed visual SLAM system is designed and implemented based on ORB-SLAM2 [1] and has three main parallel threads (see Fig. 6): Tracking, Local Mapping and Loop Closing. The global BA thread is started only after finishing loop closing. In the following, we briefly describe each component while focusing on the difference from [1]. build more associations. Then we perform a guided search to bound the complexity and enhance the accuracy of matching. Since the 3D line may be partially observed, the projected 2D line cannot be handled the same as the projected 2D point. Fig. 8 shows a simple example, the dash lines can’t be observed by the camera while the solid lines can. In order to ensure the visibility of the projected 2D line segments in image plane, we propose a culling based method described as follow: Fig. 6. The architecture of the proposed graph-based visual SLAM system using both point and line features. 1) Tracking: Our system uses rectified stereo image sequence as input. For every input frame, four threads are launched to extract point feature (Keypoints) and line feature (Keylines) for left and right image in parallel. ORB features are applied for point feature detection and description. Line feature is detected by LSD and described by LBD descriptor. Then two threads are launched for stereo matching and all the features are classified as stereo or monocular features according to whether the feature in the left image could find its stereo match in the right image, as shown in Fig. 7. The stereo matching of 3D lines performs as described in Section III-B. For each monocular feature, we search a match with other unmatched features in other keyframes. Once finding the matched feature, we triangulate the feature in the same way as stereo features. 1) Transform the 3D line Lw from world frame to current frame according to the prior Tkw 0 . Compute the two endpoints Xsk and Xek . 2) Discard the line if both Xsk and Xek are behind the camera. If one of them is behind the camera, compute the intersection of the plane and the 3D line by Xik = Xsk + λ (Xsk − Xek ) , where λ is a value between 0 and 1, as depicted in Fig. 8. 3) Project the two 3D endpoints in front of the camera to image plane. Since the projected line maybe lays across or even out of the image bound, all the projected lines must be dealt by Liang-Barsky algorithm [18] which is an efficient line clipping algorithm and can retain the orientation of original line. Then line matching can be done efficiently thanks to the restricted searching space and binary descriptor. The last step is to decide whether the current frame is a new keyframe. We adopt the same policy as ORB-SLAM2 [1] and add more conditions related to line features. Fig. 8. Partial observation of 3D line. (The dash lines can’t be observed by the camera while the solid lines can. The red points denotes the intersection of the plane and the 3D line.) Fig. 7. The workflow of pre-processing images. Motion estimation is made by two types of tracking, namely tracking last frame and tracking local map. The former one gives an initial pose estimation with the correspondences of adjacent frame, while the latter one refines the pose with much more constraints between the current frame and the local map. After the data association, the pose is estimated by motion-only BA using Levenberg-Marquardt algorithm [17]. We use a constant velocity motion model to predict the camera pose as a prior when tracking last frame. Once the prior is known, the map points and the map lines in the last frame or the local map can be projected to current frame to 2) Local Mapping: Once a new keyframe is added, the connections between the current keyframe and other frames will be updated by providing the co-visible information. Local mapping triangulates more map points and lines, removes outlier landmarks, and deletes redundant keyframe. All the camera poses and landmarks in the local map are adjusted by performing local BA. During back-end optimization, the 3D line is parameterized by infinite spatial line, hence its endpoints have no affect on the final optimization results. However, the endpoints play an important role in matching and visualizing, so our system need to maintain two endpoints of the 3D line after optimization. It can be done by back-projecting the 2D line in current keyframe and trimming the corresponding 3D line, which is similar to SLSLAM [6]. 3) Loop Closing and Global BA: The loop closing thread is used to reduce drift accumulated during exploration by loop detection and loop correction. Loop detection try to find candidate keyframes based on the technique of bags of words. The visual vocabulary should be trained offline with both point and line features. Here we cluster the ORB features and LBD features to build their own vocabulary by DBOW [19] respectively. For every input keyframe, it is converted to the bag of words vector and stored in the online database. The similarity score between two bag of vector va and vb can be computed as follow: s = λsp (va , vb ) + (1 − λ) sl (va , vb ), (26) where λ is an empirical weight coefficient related to scenes. sp (va , vb ) and sl (va , vb ) are the similarity score of point feature and line feature. Then we can find the correspondences between the new keyframe and the candidate keyframe. we also refine the correspondences with time consistency test [20]. And try to compute a SE(3) transformation matrix by EPnP [21] with corresponding points in a RANSAC scheme [22]. If failed, we alternatively compute a SE(3) by a method proposed in [23] using the matching lines across two stereo views. Finally, a pose graph optimization is launched to correct the loop. Once finished, a global BA is incorporated to achieve the optimal solution in a separate thread. of 1 pixel are added to the points and endpoints of lines in the captured images. Loop detection is disabled to display pose error clearly. RM SE (Root Mean Square Error) of RP E (Relative Pose Error) is the metric to evaluate the performance of our method. Fig. 10 shows an estimated trajectory by our proposed system. The average result of Monte Carlo experiments of 25 runs, is shown in Table I. RP Etrans1 and RP Erot1 are translation and rotation errors obtained in the scene with lots of point features, while RP Etrans2 and RP Erot2 result from the scene containing few points. In the scene with comparable number of points and lines, odometry based on only point feature performs better than one using only lines. The reason may be that re-projection error of an infinite long spatial line is only related to the normal vector of the P lücker line coordinates as shown in Section IV-A. So the matched point features produce more constrains than the same number lines. The table shows that the method based on point features has a larger error than on line features in the scene with few points. Our method based on fusion of points and lines outperform than the both. B. Results Various experiments have been conducted in both synthetic and real-world scene. The accuracy and time efficiency of our approach are analyzed. In these experiments, the algorithm run on a computer with Intel Core i7-2600 @ 3.40GHz and 16GB memory in a 64-bit Linux operating system. Fig. 10. Top and oblique views of estimated camera trajectory. TABLE I RPE OF THE M ETHODS BASED ON D IFFERENT F EATURES Point Feature Line Feature Point-Line Feature RP Etrans1(m) 0.08702 0.09827 0.07852 RP Erot1(rad) 0.00430 0.00486 0.00381 RP Etrans2(m) 0.19254 0.09621 0.08637 RP Erot2(rad) 0.00798 0.00481 0.00408 Fig. 9. Synthetic scene with 25 lines and variable number of points. 1) Synthetic data: There is an accurate data association in synthetic Scene. And this experiment is proposed to verify the correctness and advantage of the introduced line feature in the back-end optimization. The derived Jacobian of 3D line re-projection error is used in the optimization. The synthetic scene in Fig. 9 contains a house with a total of 25 lines and variable number of points. This construction is similar to the scene in [10]. Virtual stereo camera with baseline of 0.5m moves around the house, collecting images of 640 × 480 pixels. Gaussian white noise with a variance 2) Real data: The real-world scene experiment is carried on both it3f dataset [6] and KITTI dataset [24]. For a more comprehensive assessment of the approach presented in this article, several open source approaches are compared in this section, including ORB-SLAM2 [1], SLSLAM [6], PLSVO [8] and PL-SLAM presented in this paper. ORB-SLAM2 is a complete point feature based SLAM system that contains map reuse, loop detection and relocation. SLSLAM is based on the straight line feature, constructing scene composed of only straight lines, which is a relatively excellent line based SLAM system. PLSVO is only an odometry using two endpoints to represent the spatial line and performing brute-force matching in the front-end. Fig. 11 shows images from the it3f dataset, and Fig. 1 shows the results generated from this dataset. Fig. 12 shows the trajectory and map of the camera before and after a Fig. 11. Sample images used in it3f dataset [6]. Fig. 13. Comparison results on it3f dataset [6] without loop closure. The top and bottom row show the top and side views of the results. Fig. 12. Results before and after of the loop closure. Left: Results before the loop closure. Right: Results after the loop closure and loop correction. loop closure followed by a bundle adjustment. PLSVO has a poor performance on this dataset, so we only compare ORB-SLAM2 and SLSLAM with our proposed PL-SLAM. it3f dataset doesn’t provided the ground truth. The degrees of drift before the loop closure are compared. For fair comparison, both ORB-SLAM2 and PL-SLAM disable the loop detection thread, and use the same parameters in point feature extraction. For each image, we extract 1000 point features at 8 scale levels with a scale factor of 1.2. TABLE II E RRORS B EFORE L OOP C LOSURE Method Errors Before Loop Closure PL-SLAM [−0.3549, 1.4056, −0.0273]T ORB-SLAM2 [−0.3748, 1.9065, 0.17442]T [−0.3141, −0.5455, −0.06449]T SLSLAM Fig. 13 shows the top and side views of the reconstruction results by the three systems without loop closures, respectively. The point with zero coordinates is the starting point and the other is the finishing point. Table II shows the drift before the loop closure (translation in X(m), Y (m), Z(m)). It can be observed from the table that PL-SLAM perform better than ORB-SLAM2, which demonstrate the strength of including constraints of straight line. SLSLAM has the best performance, only -0.5455 meters error in the vertical direction. A reason can account for this is that it3f dataset contains low-textured scenarios, reflective white walls, windows and floor etc. At the same time, due to the influence of the ceiling lights, point features prone to be mismatched and bring big errors. In the optimization process of our proposed approach, we don’t set different weights to the error terms of points and lines in (12) with consideration of versatility. When the component based on point feature has unstable performance and low accuracy, the proposed system based on combination of point and line features will be affected, which coincides with the synthetic scene experiment. In terms of time efficiency, the execution time will not increase much because features are extracted in parallel threads. For images with dimensions of 640×480, the feature extraction and stereo matching in ORB-SLAM2 requires 32.15ms, while our system requires 42.401ms with additional consideration of line features on it3f dataset. Our tracking thread can achieve a performance of 15.1 frame/s, which can satisfy the real-time requirements. Fig. 14. Results on KITTI dataset. Left: The map composed of point and line features. Right: One frame with extracted point and line features. We also evaluate our system on KITTI odometry benchmark. Sequences 03, 04, and 10, which have scenarios with lines, are selected. Fig. 14 shows the result on KITTI dataset in our system. In this experiment, we only compare our PL-SLAM with ORB-SLAM2 and PLSVO1 . Loop detection modules are all disabled for fair comparison. In this experiment, RP E and AT E (Absolute Trajectory Error) are used as evaluation criterion. Table III shows the results of the experiment, where T rans and Rot represent RP E of the translations and rotations respectively. The smallest AT E in each sequence is marked in the table. It is shown that our system has acceptable performance in several sequences. A performance improvement can be achieved compared to the original ORB-SLAM2. PLSVO has a poor performance because of the brute-force matching in data association and accumulated errors. VI. C ONCLUSIONS To improve the accuracy and robustness of visual SLAM, we present a graph-based approach using point and line features. The spatial line is expressed by the orthonormal representation in the optimization process, which is the compactest and decoupled form. And the Jacobians of reprojection error with respect to the line parameters is also derived out to make a good performance. It is proved that fusing these two types of features will produce more robust estimation in synthetic and real-world scene. Our robust visual SLAM is also able to work in real-time. In the future, we will investigate how to introduce inertial sensors into our system with point and line features. 1 As the source code of the front-end module in SLSLAM is unavailable, we do not include it in the experiments on KITTI dataset. TABLE III R ESULTS OF ORB-SLAM, PLSVO AND PL-SLAM ON KITTI DATASET PLSVO ORB-SLAM2 PL-SLAM Trans(m) Rot(rad) ATE(m) Trans(m) Rot(rad) ATE(m) Trans(m) Rot(rad) 0.2247 0.0046 13.2415 0.1598 0.0023 2.6638 0.1601 0.0024 0.2045 0.0019 2.3020 0.1180 0.0015 0.7415 0.1183 0.0017 0.1809 0.0053 9.0208 0.1143 0.0022 6.3974 0.1166 0.0021 sequence 03 sequence 04 sequence 10 A PPENDIX This appendix will explain the Jacobian with respect to δφ in detail. δρ are set to zeros when computing Jacobian with respect to δφ . With a transformation T ∗ containing rotation δφ , the new 3D line is denoted as L∗c :  [δφ ]× 0 T (27) 0T 0     (28) R∗ = I + [δφ ]× R, t∗ = I + [δφ ]× t       I + [δφ ]× R I + [δφ ]× [t]× R    (29) = 0 I + [δφ ]× R  T ∗ = exp δξ ∧ T ≈ H∗cw L∗c = H∗cw Lw =    I+    I + [δφ ]× Rn + I +  [δφ ]× [t]× Rv , I + [δφ ]× Rv (30) where [.]× denotes the skew-symmetric matrix of a vector. In the process of deducing H∗cw , the properties of rotation matrix (Ra) × (Rb) = R (a × b) , R ∈ SO (3) is used. ∂L∗ Then ∂δφc can be written directly:   ∂[δφ ]× Rn ∂[δφ ]× [t]× Rv ∗ + ∂Lc ∂δφ ∂δφ  = (31) ∂[δφ ]× Rv ∂δφ ∂δφ   ∂ [[t]× Rv ] δφ [Rn]× δφ × − ∂δφ − ∂δφ  = (32) [Rv]× δφ − ∂δφ     −[Rn]× − [t]× Rv × = (33) −[Rv]× 6×3 R EFERENCES [1] R. Mur-Artal and J. D. Tardós, “ORB-SLAM2: an open-source SLAM system for monocular, stereo and RGB-D cameras,” arXiv preprint arXiv:1610.06475, 2016. [2] C. Rother, “Linear multi-view reconstruction of points, lines, planes and cameras using a reference plane.,” in ICCV, pp. 1210–1217, 2003. [3] D. Marzorati, M. Matteucci, D. Migliore, and D. G. Sorrenti, “Integration of 3d lines and points in 6dof visual slam by uncertain projective geometry.,” in EMCR, Citeseer, 2007. [4] G. Klein and D. Murray, “Improving the agility of keyframe-based slam,” in European Conference on Computer Vision, pp. 802–815, Springer, 2008. [5] T. Koletschka, L. Puig, and K. Daniilidis, “Mevo: Multi-environment stereo visual odometry,” in Intelligent Robots and Systems (IROS 2014), 2014 IEEE/RSJ International Conference on, pp. 4981–4988, IEEE, 2014. [6] G. Zhang, J. H. Lee, J. Lim, and I. H. Suh, “Building a 3-d line-based map using stereo slam,” IEEE Transactions on Robotics, vol. 31, no. 6, pp. 1364–1377, 2015. [7] Y. Lu and D. Song, “Robust rgb-d odometry using point and line features,” in Proceedings of the IEEE International Conference on Computer Vision, pp. 3934–3942, 2015. ATE(m) 2.6203 0.3663 5.9207 [8] R. Gomez-Ojeda and J. Gonzalez-Jimenez, “Robust stereo visual odometry through a probabilistic combination of points and line segments,” in Robotics and Automation (ICRA), 2016 IEEE International Conference on, pp. 2521–2526, IEEE, 2016. [9] H. Strasdat, J. Montiel, and A. J. Davison, “Real-time monocular slam: Why filter?,” in Robotics and Automation (ICRA), 2010 IEEE International Conference on, pp. 2657–2664, IEEE, 2010. [10] J. Sola, T. Vidal-Calleja, J. Civera, and J. M. M. Montiel, “Impact of landmark parametrization on monocular ekf-slam with points and lines,” International journal of computer vision, vol. 97, no. 3, pp. 339–368, 2012. [11] A. Bartoli and P. Sturm, “Structure-from-motion using lines: Representation, triangulation, and bundle adjustment,” Computer vision and image understanding, vol. 100, no. 3, pp. 416–441, 2005. [12] R. G. von Gioi, J. Jakubowicz, J.-M. Morel, and G. Randall, “Lsd: A fast line segment detector with a false detection control,” IEEE transactions on pattern analysis and machine intelligence, vol. 32, no. 4, pp. 722–732, 2010. [13] L. Zhang and R. Koch, “An efficient and robust line segment matching approach based on lbd descriptor and pairwise geometric consistency,” Journal of Visual Communication and Image Representation, vol. 24, no. 7, pp. 794–805, 2013. [14] E. Rublee, V. Rabaud, K. Konolige, and G. Bradski, “Orb: An efficient alternative to sift or surf,” in Computer Vision (ICCV), 2011 IEEE International Conference on, pp. 2564–2571, IEEE, 2011. [15] D.-M. Woo, D.-C. Park, S.-S. Han, and S. Beack, “2d line matching using geometric and intensity data,” in Artificial Intelligence and Computational Intelligence, 2009. AICI’09. International Conference on, vol. 3, pp. 99–103, IEEE, 2009. [16] A. Bartoli and P. Sturm, “The 3d line motion matrix and alignment of line reconstructions,” in Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings of the 2001 IEEE Computer Society Conference on, vol. 1, pp. I–I, IEEE, 2001. [17] J. J. Moré, “The levenberg-marquardt algorithm: implementation and theory,” in Numerical analysis, pp. 105–116, Springer, 1978. [18] Y.-D. Liang and B. A. Barsky, “A new concept and method for line clipping,” ACM Transactions on Graphics (TOG), vol. 3, no. 1, pp. 1– 22, 1984. [19] D. Gálvez-López and J. D. Tardos, “Bags of binary words for fast place recognition in image sequences,” IEEE Transactions on Robotics, vol. 28, no. 5, pp. 1188–1197, 2012. [20] R. Mur-Artal and J. D. Tardós, “Fast relocalisation and loop closing in keyframe-based slam,” in Robotics and Automation (ICRA), 2014 IEEE International Conference on, pp. 846–853, IEEE, 2014. [21] V. Lepetit, F. Moreno-Noguer, and P. Fua, “Epnp: An accurate o (n) solution to the pnp problem,” International journal of computer vision, vol. 81, no. 2, p. 155, 2009. [22] M. A. Fischler and R. C. Bolles, “Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography,” Communications of the ACM, vol. 24, no. 6, pp. 381–395, 1981. [23] V. Pradeep and J. Lim, “Egomotion estimation using assorted features,” International journal of computer vision, vol. 98, no. 2, pp. 202–216, 2012. [24] A. Geiger, P. Lenz, C. Stiller, and R. Urtasun, “Vision meets robotics: The kitti dataset,” The International Journal of Robotics Research, vol. 32, no. 11, pp. 1231–1237, 2013.
1cs.CV
Nonparametric Regression with Adaptive Truncation via a Convex Hierarchical Penalty Asad Haris∗, Ali Shojaie†, and Noah Simon‡ University of Washington arXiv:1611.09972v2 [stat.ME] 1 Dec 2016 January 14, 2018 Abstract We consider the problem of non-parametric regression with a potentially large number of covariates. We propose a convex, penalized estimation framework that is particularly well-suited for highdimensional sparse additive models. The proposed approach combines appealing features of finite basis representation and smoothing penalties for non-parametric estimation. In particular, in the case of additive models, a finite basis representation provides a parsimonious representation for fitted functions but is not adaptive when component functions posses different levels of complexity. On the other hand, a smoothing spline type penalty on the component functions is adaptive but does not offer a parsimonious representation of the estimated function. The proposed approach simultaneously achieves parsimony and adaptivity in a computationally efficient framework. We demonstrate these properties through empirical studies on both real and simulated datasets. We show that our estimator converges at the minimax rate for functions within a hierarchical class. We further establish minimax rates for a large class of sparse additive models. The proposed method is implemented using an efficient algorithm that scales similarly to the Lasso with the number of covariates and samples size. 1 Introduction and Motivation Consider first univariate non-parametric function estimation from n pairs of observations (x1 , y1 ), . . . , (xn , yn ) with xi , yi ∈ R for each i. Assume that, for each i, yi = f (xi ) + εi , where εi are i.i.d. with mean 0 and finite variance σ 2 . There are many proposals for estimating f ; local polynomials (Stone, 1977), kernels (Nadaraya, 1964; Watson, 1964), splines (Wahba, 1990), and others. Here, we focus on basis expansions estimators (also known as projection estimators) (Čencov, 1962) which are arguably the simplest and among the most commonly used. Let y = [y1 , . . . , yn ]T P ∈ Rn and x = [x1 , . . . , xn ]T ∈ Rn be the response and covariate vectors. For n n 2 −1 2 v ∈ R , let kvkn = n i=1 vi be a modified `2 -norm, referred to as the empirical norm. Projection estimators are solutions to linear regression problems based on a set of basis functions {ψk }∞ k=1 , along with a truncation level K. More specifically, let ΨK ∈ Rn×K be the n×K matrix with entries ΨK(i,k) = ψk (xi ) P for k ≤ K, i ≤ n. The basis expansion estimate of f is then given by fb = k≤K βbkproj ψk , where b proj = argmin 1 ky − ΨK βk2 . β n β∈RK 2 (1) To asymptotically balance bias and variance, K ≡ Kn is allowed to vary with n. Unfortunately, choosing the truncation level K can be difficult in practice; it depends on σ 2 , properties of f (e.g., smoothness) and the choice of basis functions. Usually, K is chosen via split sample validation. For basis ∗ [email protected], Department of Biostatistics [email protected], Departments of Biostatistics ‡ [email protected], Department of Biostatistics † 1 expansions hierarchically ordered by some measure of complexity (i.e., ψ1 less complex than ψ2 , etc, ...), projection estimators with small K would also give a parsimonious representation of f . The projection estimation approach extends easily to additive models (Hastie et al., 2009) , where each xi = (xi1 , . . . , xip )> is now a p-vector, and the true underlying model is believed to be of the form yi = p X fj (xij ) + εi . (2) j=1 The components of this model can be estimated by using a basis expansion in each component and solving the optimization problem b A−proj , . . . , β b A−proj β 1 p 2 p X j 1 = argmin y− ΨKj β j 2 β ∈RKj j=1 j . (3) n PKj bA−proj The estimate of fj is then fbj = k=1 βjk ψk . For high-dimensional problems, when p  n, it is often assumed that for many components fj ≡ 0. A popular choice in this scenario is to add a sparsity inducing penalty to the basis expansion framework (Ravikumar et al., 2009) and solve b SP AM , . . . , β b SP AM β 1 p p X j 1 y− ΨK β j = argmin β j ∈RK 2 j=1 2 +λ n p X j=1 j βj ΨK n . (4) This approach is known as Sparse Additive Modeling (SpAM). In practice, the same truncation level is used for each feature (Kj ≡ K) to keep computation tractable, even in low-dimensional additive models. When fj have widely different complexities, this strategy leads to poor estimates. In scenarios with only a moderate number of observations this issue often severely limits the effectiveness of predictive models built using SpAM. Addressing this limitation is one of our major motivations. In this manuscript, we propose hierbasis, a penalized estimation method motivated by the projection estimator: In hierbasis, the truncation level is determined data-adaptively rather than being prespecified. The hierbasis framework can be applied to fit both univariate and multivariate models, as well as additive models with or without sparsity. We also discuss an extension of hierbasis for multivariate settings. When applied to univariate problems, hierbasis performs similarly to a standard basis expansion/projection estimator (with a little more regularization). However, for additive or sparse additive models, hierbasis automatically chooses a truncation level for each feature. These truncation levels will often differ between features based on the underlying complexity of the true fj . This can vastly improve prediction accuracy of our model; it additionally allows us to maintain as much parsimony as possible in estimating each fbj . We illustrate these advantages in our data example in section 3 — there, using a polynomial basis expansion, on average, we find 13 features with non-zero fbj ; of these 5 are linear, 7 are quadratic, and 1 is cubic. None were selected to have truncation level larger than 4. hierbasis is also computationally very efficient: It can be applied to problems with thousands of observations and features. In addition, hierbasis estimates attain minimax optimal rates under standard smoothness assumptions, for univariate, multivariate, and sparse additive models. In particular,  2m − 2m+1 the univariate hierbasis converges at the order of O n where m is the degree of smoothness,   2m − 2m+p and similarly the multivariate hierbasis attains the rate O n . The sparse additive hierbasis, n  o 2m p under a suitable compatibility condition, is shown to converge at O max sn− 2m+1 , s log where s is n the number of non-zero fj . Even compatibility condition, additive hierbasis is consistent  without the  q m with convergence rate O max sn− 2m+1 , s logn p . 2 𝜓1 (𝑥) 𝜓2 (𝑥) 𝜓3 (𝑥) 𝜓4 (𝑥) Figure 1: Examples of basis functions with natural hierarchical complexity; polynomial, trigonometric and wavelet basis functions are shown in the left, center and right panels, respectively. The rest of this paper is organized as follows: Section 2 gives a formal description of hierbasis in the univariate case, as well as its extension to additive and sparse additive models. Section 3 contains an analysis of genomic data comparing hierbasis to SpAM. Section 4 gives an efficient algorithm for fitting hierbasis and its additive extension. In Section 5, we present a theoretical analysis of hierbasis, which also applies to a more general class of sparse additive models. Section 6 contains a simulation study exploring the operating characteristics of hierbasis, and comparing its performance to other non-parametric estimation methods. Concluding remarks are presenting in Section 7. 2 Methodology Estimation via a basis expansion is a commonly used technique in nonparametric regression. The basis expansion is often truncated to achieve a parsimonious representations and control the bias-variance tradeoff. While separately tuning the truncation level over each parameter may be feasible for lowdimensional regressions, this approach becomes quickly infeasible for additive models where, the optimal truncation level requires searching over a subset of Rp . Our proposal is motivated by the need for an adaptive estimator that can select the truncation level in a data-driven manner. We achieve this goal through a penalized estimation formulation using a novel penalty. Our approach is particularly suitable for basis functions which possess a natural hierarchy, i.e., when basis functions {ψk }∞ k=1 become increasingly complex for higher values of k; examples of such basis functions include polynomial, trigonometric and wavelet basis functions and are depicted in Figure 1. To emphasize the hierarchical nature of our proposed penalized estimation framework and its motivation based on basis functions with natural hierarchy, we refer to it as the hierarchical basis expansion estimator, or, hierbasis. 2.1 The hierbasis Proposal Consider first the univariate case and the projection estimator of Equation 1. As noted in Section 1, choosing the truncation level K is key here: K too small will result in a large  bias,  while K too large will 1 over-inflate variance. In particular, the balance necessitates that K = O n 2m+1  n, where m relates to the smoothness of the underlying f . Our proposal, hierbasis, addresses this challenge by consider instead a complete basis with K = n and using a penalized regression framework to data-adaptively choose the truncation level. More specifically, the hierbasis estimator is defined as b hier = argmin 1 ky − Ψn βk2 + λΩ (β) , β n β∈Rn 2 3 (5) where Ω (β) = n X wk kΨk:n β k:n kn , (6) k=1 km 1)m . with wk = − (k − Here, Ψk:n denotes the submatrix of Ψn containing columns k, k + 1, . . . , n, β k:n is the subvector of β containing the k, k + 1, . . . , n entries, and m and λ are tuning parameters. The hierarchical group lasso form (Zhao et al., 2009) of the hierbasis penalty, Ω (β), will result in 0 b hier with hierarchical sparsity: That is, if βbhier = 0 for some k, then βbhier a solution β = 0 for all k > k. 0 k k For sufficiently large λ, many entries of βbhier will be 0. For a given λ, we define the induced truncation level to be the minimal K ≤ n such that βbkhier = 0 for all k > K. Unlike the simple basis expansion estimator, this truncation level is data-adaptive, not prespecified. The hierbasis estimator is determined by two tuning parameters, m and λ. m is analogous to the smoothness parameter in smoothing splines (Wahba, 1990), or the number of bounded derivatives used in the truncation level of the simple projection estimator (Čencov, 1962). In practice using m = 2 or 3 gives good results (this is similar to the use of cubic smoothing splines). λ, on the other hand, determines the tradeoff between goodness-of-fit and parsimony/smoothness; A theoretically optimal λm value is λ ∝ n− 2m+1 . In practice, we suggest using split sample validation to choose λ. In the univariate setting, the simple basis expansion estimator (1) with truncation level chosen by split sample validation, is likely adequate. In contrast, hierbasis adds additional regularization to the function estimate (in addition to choosing a truncation level). The additional shrinkage may be helpful, as indicated in the empirical results of Section 6; however the benefit is generally relatively small. The true benefit of hierbasis comes in application to additive and multivariate problems described next. 2.2 Additive hierbasis As noted in Section 1, the projection estimator is commonly used to fit additive models (3), often using the same set of basis functions {ψk }∞ k=1 for all features. Ideally, the additive projection estimator (3) is obtained by considering a different truncation level Kj for each feature. When p is small, this can be achieved by using split sample validation and searching over all combinations of (K1 , . . . , Kp ); however, the number of candidate models grows exponentially in p and becomes quickly unwieldy. Often, a single K = Kj for all j is used in practice. This difficulty in selecting the truncation level is the primary limitation of the projection estimator in additive and multivariate models. If the level of smoothness of each component is vastly different, then this single truncation level will result in some fj estimates with too many degrees of freedom (giving overly variable function estimates), and others with too few (with insufficiently flexible estimates). A single choice of truncation level can thus lead to very poor regression estimates. Our hierbasis proposal is designed to circumvent the above limitation of projection estimators in choosing the truncation level in models with multiple covariate. In particular, the additive hierbasis is a straightforward extension of the univariate hierbasis (5), and is defined as the solution to b A−hier , . . . , β b A−hier β 1 p 2 p X 1 = argmin y− Ψnj β j n 2 β j ∈R j=1 where n  X j wk Ψk:n Ωj β j = β j,k:n k=1 n +λ n , p X  Ωj β j , (7) j=1 (8) P A−hier The function estimates are obtained as fbj = nk=1 βbjk ψk . b estimates that are hierarchically sparse for each The additive hierbasis solution (7) will result in β j A−hier j. Specifically, for each j, there is some minimal Kj such that for all k > Kj , βbjk = 0. In addition, with wk = km − (k − 1)m . 4 the major advantage of additive hierbasis is that the induced truncation level is feature-wise adaptive: Kj may be different for each feature j. This important characteristic mitigates a major disadvantage of simple projection estimators. As a result the additive hierbasis allows us to balance goodness-of-fit and parsimony for each feature individually, without an exhaustive computational search. The advantage of hierbasis over simple projection estimators becomes even more significant in high dimensions, when p  n. For instance, the popular SpAM estimator (4) is generally obtained by using a single truncation level, which, as noted above, can result in poor estimators. Similar to SpAM, the sparse additive hierbasis for high-dimensional additive models employs an additional sparsity-inducing penalty (Yuan and Lin, 2006), and is defined as p X b S−hier , . . . , β b S−hier = argmin 1 y − Ψnj β j β 1 p β j ∈Rn 2 j=1 +λ 2 p X j=1 p X  Ωj β j + λ 2 Ψnj β j n , (9) j=1  where Ωj β j is defined as in (8). An important feature of the the optimization problem for sparse additive hierbasis (9) is that the tuning parameters for the two penalty terms are linked (λ and λ2 ). This link is theoretically justified in Section 5. Briefly, for an oracle λ, the choice of tuning parameters in (9) gives rate-optimal estimates. Our numerical experiments in Section 3 and 6 corroborate this finding and show that the above choice of tuning parameters results in strong predictive performance without requiring split-sample validation over a multi-dimensional space of tuning parameters. As with SpAM, for sufficiently large λ, the sparse additive hierbasis gives a sparse solution with b S−hier ≡ 0. The two estimators differ, however, in their nonzero estimates: non-zero β b S−hier most β j j are hierarchically sparse, with a data-driven feature-specific induced truncation level, whereas nonzero b SP AM in (4) all have the same complexity. This additional flexibility of sparse additive hierbasis β j proves critical in high-dimensional settings, and is achieved without paying a price in computational or sample complexity. Moreover, with the tuning parameters in (9), the additional flexibly of sparse additive hierbasis is achieved with the same number of tuning parameters as SpAM. 2.3 Relationship to Existing Methods The univariate hierbasis of Section 2.1 builds upon existing penalized methods for estimating regression functions. A popular penalized estimation method is the smoothing spline estimator (Wahba, 1990), which sets ψ1 , . . . , ψn as a basis of n natural splines with knots at the observed {xi } and solves the following optimization problem 1 minimize ky − Ψ βk2n + λkC 1/2 βk2n , (10) β∈Rn 2 R ( m+1 ) ( m+1 ) where C ∈ Rn×n and Cj,k = ψj 2 (t)ψk 2 (t) dt, and where ψ (k) is the derivative of ψ of order k. The smoothing spline eliminates the dependence on the truncation level and has an efficient-to-compute closed form solution; however, its estimated functions are piecewise polynomial splines of degree m with n knots. As a result, smoothing spline estimates are not parsimonious, especially in multivariate settings. To achieve more parsimonious estimates, Mammen and van de Geer (1997) use a data-driven approach to select the knots in spline functions. Their locally adaptive regression splines use the same natural spline basis and solve 1 λ ky − Ψ βk2n + kDβk1 , (11) minimize β∈Rn 2 m! (m) (m) where D ∈ R(n−m−1)×n is defined as Di,j = ψj (ti ) − ψj (ti−1 ). This proposal of Mammen and van de Geer (1997) is closely related to the recent, more computationally tractable trend filtering proposal (Kim et al., 2009; Tibshirani, 2014). Despite their appealing properties in the univariate setting, locally adaptive regression splines and trend filtering, are computationally difficult to extend to high-dimensional sparse additive models — even 5 for a single feature neither estimator has a closed-form solution. The SpAM estimator (4) overcomes this difficulty by using a fixed truncation level for all p components. As pointed out before, the main drawback of SpAM is that each of nonzero components in the additive model have the same level of complexity. The recently proposed sparse partially linear additive model (SPLAM) by Lou et al. (2014) partly mitigates this shortcoming by setting some of theP nonzero components to linear functions. This is achieved by using a hierarchical penalty of the form pj=1 λ1 kβ j k2 + λ2 kβ j,−1 k2 , where βj,1 is the coefficient of the linear term in the basis expansion and β j,−1 = [βj,2 , . . . , βj,K ] ∈ RK−1 . Depending on the value of tuning parameters λ1 and λ2 , the first term in the above penalty sets the entire vector of coefficients for the jth feature to zero, whereas the second term only sets the K − 1 coefficients corresponding to higher-oder terms to zero. The additive and sparse additive hierbasis proposals of Section 2.2 can be seen as generalizations of SpAM and SPLAM, wherein the complexity of nonzero component are determined data-adaptively. More specifically, SpAM becomes a special case of sparse additive hierbasis if the weights in (8) are set to w1 = 1 and wk = 0 for k = 2, . . . , K. Similarly, with an orthogonal design matrix, ΨlT Ψl /n = IK , SPLAM is a special case of sparse additive hierbasis that allows for another level of hierarchy with weights in (8) set to w1 = w2 = 1 and wk = 0 for k = 3, . . . , K. Our theoretical analysis in Section 5.3 indicates that, in addition to the improved flexibility, the choice of weights in hierbasis result in optimal rates of convergence. 3 Analysis of Colitis Data We apply hierbasis with logistic loss, in order to perform classification using gene expression measurements. Details on hierbasis with logistic loss are given in section 4.5. We consider the Colitis dataset (Burczynski et al., 2006) which has 22,283 gene expression measurements from peripheral blood mononuclear cells (PBMCs) sampled from 26 adults with ulcerative colitis and 59 with Crohn’s disease, available from GEO at accession number GDS 1615. The aim is to use gene expression measurements to distinguish between the two diseases. Given the small sample size, we consider 1000 genes with the largest variance. We compare the performances of hierbasis to SpAM and the LASSO (Tibshirani, 1996), over 30 splits of the data into training and test sets, after standardizing each gene to have mean zero and variance one in the training set. We choose the tuning parameters using 5-fold CV in the training set and calculate the misclassification rate in the test set. We also calculate the sparsity for the model selected by CV defined as the proportion of fitted components which were identically zero. We use the parametrization for hierbasis given in (9) with m = 3. The maximum number of basis functions selected for each fitted component is 6 for hierbasis and for SpAM we fit multiple models with 2 to 6 basis functions. For computational reasons we did not use the full set of n = 75 basis vectors in hierbasis, and instead used only 6 basis functions. The use of smaller than n basis functions for hierbasis is further discussed in section 4.1. The box-plots of misclassification error rates in the test set and sparsity are shown in Figure 2. The box-plots clearly show the superior performance of hierbasis over SpAM. hierbasis appears to be comparable to the LASSO in terms of the MSE and gains a slight advantage in sparsity. In addition, each fitted function from hierbasis is monotonic and nearly as parsimonious as those linear fits from the lasso. This is demonstrated in Figure A.1 in Appendix A, where we plot some fitted functions for one split of the data. We also show SpAM estimates which are highly irregular and would indicate very complex non-linear relationships. 4 4.1 Computational Considerations and Extensions Conservative Basis Truncation The hierbasis proposal (5) uses a basis expansion with n basis functions. In practice, for any reasonable b will never have n nonzero entries. It will generally have very few non-zero choice of λ the solution, β, 6 Misclassification Error 0.3 0.2 0.1 0.0 HierBasis Lasso SPAM, # basis 2 SPAM, # basis 3 SPAM, # basis 4 SPAM, # basis 5 SPAM, # basis 6 SPAM, # basis 2 SPAM, # basis 3 SPAM, # basis 4 SPAM, # basis 5 SPAM, # basis 6 1.00 Sparsity 0.99 0.98 0.97 0.96 0.95 HierBasis Lasso Figure 2: Top: Box-plot of test errors for 30 different train/test splits of the colitis data for each method. Bottom: Box-plot of the sparsity for the model selected by CV for 30 different train/test splits of the data for each method. entries (K0  n). If we instead solve K X b hier(K) = argmin 1 ky − ΨK βk + λ β {k m − (k − 1)m } kΨk:K β k:K kn , 2 2 K β∈R (12) k=1 for K < n, then so long as K ≥ K0 , the solution will be identical to that of the original proposal (5). Even 1 when not identical, so long as K is sufficiently large (K  n 2m+1 , where an  bn ⇔ an = Cbn for some constant C) the theoretical properties of (5) will be maintained. This bound relies on the smoothness √ of the underlying f ; choosing K  n gives a conservative upper bound which is independent of the underlying f . Additionally, as discussed in Section 4.2, by   using K rather than n basis functions, the computational complexity decreases from O n3 to O K 2 n . A similar result holds for the sparse additive hierbasis with S−hier(K) β̂ 1 S−hier(K) , . . . , β̂ p p = argmin β j ∈RK +λ p X j=1  where now Ωj β j = PK k=1 wk j Ψk:K β j,k:K n X j 1 y− ΨK β j 2 j=1 Ωj β j + λ2  p X 2 j ΨK βj j=1 (13) n , . It is worth noting that it is easier to choose the pre-truncation level in (12) and (13) than the truncation level for the simple basis expansion estimator (Čencov, 1962) — the simple basis expansion requires an exact truncation level that is neither too large, nor too small. On the other hand, hierbasis only requires a basis that is not too small. 4.1.1 Algorithm for Solving hierbasis and sparse additive hierbasis An appealing feature of hierbasis is that it can be efficiently computed. In fact, using the results of Jenatton et al. (2010), hierbasis can be computed via a one-step coordinate descent algorithm. We begin 7 by re-writing the optimization problem (12). Consider the decomposition Ψ = U V such that U ∈ Rn×K e = V β, the optimization problem (5) can be equivalently written and U T U/n = IK . Then, by defining β as: K X 2 1 e e y − Uβ + λ wk β minimize , (14) k:K K 2n e 2 2 β∈R k=1 which is equivalent to solving 1 U T y/n − β minimize K 2 β∈R 2 2 +λ K X wk kβ k:K k2 . (15) k=1 With this formulation, we can directly apply the results of Jenatton et al. (2010), as detailed in Algorithm 1. The reformulation in (15) can also be used to efficiently solve the sparse additive extension (13) Algorithm 1 One-Step coordinate descent for hierbasis 1: procedure hierbasis(y, U, λ, {wk }K k=1 ) 2: Initialize β 1 = . . . = β K ← U T y/n 3: for k = K, . . . , 1 do  wk λ 4: Update β k−1 ← 1 − β kk:K , where (x)+ = max(x, 0) k:K kβ k k k:K 2 . Algorithm for Solving (15) + end for 6: return β 1 7: end procedure 5: via a block coordinate descent algorithm. Specifically, given a set of estimates {β}pl=1 , we can fix all but one of the vectors β l and optimize over the non-fixed vector using Algorithm 1. Iterating until convergence yields the solution to problem (13), as described in Algorithm B.1 in Appendix B. 4.2 Convergence and Computational Complexity As noted in Section 4.1.1, a closed form solution for the hierbasis optimization problem can be obtained by one pass of a coordinate descent algorithm as shown in Jenatton et al. (2010). The block coordinate descent algorithm for the sparse additive hierbasis has been extensively studied in the literature and is guaranteed to converge to the global optimum for convex problems. Solving problem (5) requires a QR decomposition of the matrix Ψ followed by the multiplication U T y; these steps require O(nK 2 ) and O(nK) operations, respectively. However, these steps are only needed once for a sequence of λ values. For additive hierbasis, p such QR decompositions are needed once for the entire sequence of λs. By Proposition 2 of Jenatton et al. (2010), for a given λ, the optimization problem (15) can be solved in O(K) operations. Each block update of the additive hierbasis requires a matrix multiplication UjT r −j followed by solving the proximal problem (B.1) (see Appendix B), which requires O(nK) operations. Thus, the sparse additive hierbasis requires O(npK) operations, which is equal to the computational complexity of the Lasso (Friedman et al., 2010) when K = 1. The above computational complexity calculations indicate that hierbasis and sparse additive hierbasis can be solved very efficiently. Next, we report timing results for our R-language implementation of hierbasis on an Intel R CORETM i5-3337U, 1.80 GHz processor. Solving the univariate hierbasis for an example with K = n = 300 takes a median time of 0.17 seconds. Solving the sparse additive hierbasis for the simulation setting of Section 6.2 on a grid of 50 λ values takes a median time of 5.96 seconds. 4.3 Degrees of Freedom For a regression with fixed design and  ∼ N (0, σ 2 In ), we consider the definition of degrees of freedom 1 Pn given by Stein (1981) df = σ2 i=1 Cov(yi , ybi ) , where ybi are the fitted response values. We apply 8 𝑥1 , 𝑥2 , 𝑥12 , 𝑥22 , 𝑥1 𝑥2 , 𝑥13 , 𝑥23 , 𝑥1 𝑥22 , 𝑥12 𝑥2 , 𝑥14 , 𝑥24 , 𝑥12 𝑥22 , 𝑥1 𝑥23 , 𝑥13 𝑥2 , … Figure 3: A visual representation of the multivariate hierbasis penalty with p = 2 and ψj (x) ≡ x. Claim 3.2 of Haris et al. (2015) to derive an unbiased estimate of df for the solution to the optimization problem (14), using the decomposition Ψ = U V from section 4.1.1. Let K0 = max{k : βbk 6= 0}, and let UK0 ∈ Rn×K0 denote the first K0 columns of U . Furthermore, for a vector ν ∈ Rn , define ν k:K0 ∈ RK0 as ν k:K0 = [0, 0, . . . , 0, νk , νk+1 , . . . , νK0 ]T . We arrive at the following lemma. b as defined in (5), is then given by Lemma 4.1. An unbiased estimator for the degrees of freedom of β, b = 1 + trace df    UK0 IK0 +  K0 X k=1 λwk   diag(1 k:K0 ) b  kβ k:K0 k2  −1 T    b bT UK β k:K0 β k:K0 T 0  , − In − 1n 1n /n 3  b  n kβ k:K k2 (16) 0 where diag(ν) ∈ Rn×n is a diagonal matrix with ν ∈ Rn on the main diagonal. 4.4 Non-additive Multivariate hierbasis We begin by extending the hierbasis penalty to non-additive multivariate regression. To define the multivariate basis expansion, consider x ∈ Rp and ν ∈ Zp+ and let ν xν = xν11 xν22 . . . xpp . (17) Then for functions f 0 : Rp → R, with the univariate basis functions {ψj }∞ j=1 consider the following PK ν 0 0 k basis representation f (x) k=1 ψk (x )βk , where kνk k1 = 1 for k = 1, 2, . . . , p, kνm k1 = 2 for  = k = p + 1, p + 2, . . . , p+2 − 1 and so on. As in the univariate case, let Ψ ∈ Rn×K be the matrix with p entries Ψi,k = ψk (xi νk ). Then, the multivariate hierbasis estimator is simply (5) with weights given by   k+p−1 m m wqk = k − (k − 1) , where qk = , (18) p and wk = 0 for all other k. Figure 3 demonstrates the multivariate hierbasis penalty for p = 2 and ψk the identity function, i.e. for z ∈ R, ψk (z) ≡ z. It is clear from the figure that the multivariate hierbasis is a natural extension of the univariate penalty: when ψk (z) = z, the fitted model can be a multivariate polynomial of any degree. With this choice of basis functions, multivariate hierbasis acts as a procedure for selecting the level of complexity of interaction models. It also follows that the multivariate hierbasis can be solved using Algorithm 1 with a single pass over the basis elements. 4.5 Extension to Classification We can also extend hierbasis to the setting of binary classification via a logistic loss function. Let y with yi ∈ {−1, 1} for i = 1, . . . , n be the response. The logistic hierbasis is then obtained from the following modification of (5): n b = arg min (β0 , β) β0 ∈R, β∈RK 1 X log (1 + exp [−yi {β0 + (Ψ β)i }]) + λΩ(β), 2n i=1 9 (19) h n oi P Given a new x ∈ R, predicted values are given by pb(x) = 1/ 1 + exp −βb0 − k ψk (x) βbk . The extension of additive hierbasis to binary response can also be defined similarly, as     p n   X X 1 c }p ) = (Ψ j β j )i  log 1 + exp −yi β0 + (β0 , {β arg min j j=1   β0 ∈R, {β j }p ∈RK 2n j=1 j=1 i=1 +λ p X Ωj (β j ) + λ2 j=1 p X kΨ j β j kn . (20) j=1 The logistic hierbasis problem can be efficiently solved via a proximal gradient descent algorithm (Combettes and Pesquet, 2011); see Appendix B for details. 5 Theoretical Results In this section we investigate asymptotic properties of hierbasis. In proving theoretical results about hierbasis, we combine previously developed ideas from empirical process theory and metric entropy with a number of novel results about general convergence rates of sparse additive models, and the metric entropy of our hierarchical class. In particular, our new results in Section 6.2 allow one to establish convergence rates for a broad class of penalized sparse additive model estimators. Under a compatibility condition on the component features, these rates match the minimax lower bound for estimation of sparse additive models under independent component functions, established previously by Raskutti et al. (2009) — see Corollary 5.7.1. Thus, our additive and sparse additive hierbasis estimators are rate-optimal. On the other hand, with no assumptions on the component functions, we obtain rates that are the additive analog to assumption-free convergence rates for the Lasso (Chatterjee, 2013); this is established in Theorem 5.7. To our knowledge, assumption-free convergence rates have not been previously derived out for sparse additive models. Finally, we also calculate the entropy of our hierarchical class (with matching upper and lower bounds Lemma 5.4 and Lemma 5.5). These new results allows us to establish that our univariate and sparse additive estimators, (5) and (9), are minimax rate-optimal within the hierarchical univariate and hierarchical sparse additive classes, respectively. 5.1 Entropy-based Rates We begin by stating two results from the literature for establishing convergence rates. We then present our contributions in Sections 5.2 and 5.3. Firstly, Theorem 1 of Yang and Barron (1999) establishes a lower bound for the minimax rate subject to certain conditions. Secondly, a framework for establishing an upper bound on convergence rates is given by Theorem 10.2 of van de Geer (2000). Here, we require a slight generalization of the result of van de Geer (2000), which we state below and prove in Appendix H. We first introduce some terminology and notation for the entropy of a set. For a set F equipped with some metric d(·, ·), the subset {f1 , . . . , fN } ⊂ F is a δ-cover if for any f ∈ F min1≤i≤N d(f, fi ) ≤ δ. The log-cardinality of the smallest δ-cover is the δ-entropy of F with respect to metric d(·, ·). We denote by H(δ, F, Q), Rthe δ-entropy of a function class F with respect to the k · kQ metric for a measure Q, where kf k2Q = [f (x)]2 dQ(x). For a fixed sample x1 , . . . , xn we denote by Qn the empirical measure P Qn = n1 ni=1 δxi and use the short-hand notation k · kn = k · kQn . Theorem 5.1 (Theorem 1, Yang and Barron (1999)). Consider the model yi = f 0 (xi ) + εi , i.i.d. (21) i.i.d. with εi ∼ N (0, σ 2 ), xi ∼ Q. Assume the entropy condition H(δ, F, Q) = A0 δ −α 10 (22) holds for some function class F for α ∈ (0, 2), and A0 > 0. Then, min max E fb − f 0 0 fb f ∈F 2 Q 2 ≥ A1 n− 2+α , (23) where the minimum is over the space of all measurable functions and A1 is a constant that depends on A0 , α and σ 2 . Theorem 5.2 (Theorem 10.2, van de Geer (2000)). Consider the model (21), and define 1 fb = arg min ky − f k2n + λ2n Ω(f |Qn ) , 2 f ∈Fn (24) for some function class Fn and semi-norm Ω(·|Qn ) on Fn which satisfy the entropy condition H(δ, {f ∈ Fn : Ω(f |Qn ) ≤ 1}, Qn ) ≤ A0 δ −α , (25) for α ∈ (0, 2). Then for 2−α 1 2+α {Ω(f ∗ |Q )} 2(2+α) , λ−1 n n =n n (26) fn∗ and for any ∈ Fn , there is a constant c such that for all T ≥ c, with probability at least n function o T2 1 − c exp − c we have  5 1 b kf − f 0 k2n ≤ max 2kf 0 − fn∗ k2n , C0 λ2n Ω(fn∗ |Qn ) , 2 2 (27) where C0 is a constant that depends on α and T . We state Theorems 5.1 and 5.2 only for the sake of completeness. These results are well-known in the nonparametric literature and allow us to establish convergence rates of an estimator using only entropy bounds of the relevant function class. In the following section, we establish these entropy bounds for the hierbasis and multivariate hierbasis penalty. 5.2 Theoretical Results for hierbasis In this section we prove minimax rates for univariate and multivariate hierbasis by specializing Theorems 5.1 and 5.2. We first introduce the nonparametric function classes for hierbasis. We then present the primary contribution of this section, that is establishing entropy bounds for the univariate and multivariate hierbasis function class. Using Theorem 5.1, these results immediately establish a lower bound on the minimax rate. For the upper bound, we use Theorem 5.2 and use an upper bound for the truncation error as a function of the truncation level Kn . Proof of entropy results are presented in Appendix G; for completeness, we provide details for the upper bound in Appendix D. We define the following function class for x ∈ R, ( ) Z Z Kn X Fn = fβ (x) = ψk (x)βk : ψk ψl dQ = 0 for k 6= l, ψk2 dQ = 1 , (28) k=1 and similarly define the multivariate function class Fp,n for x ∈ Rp ( Fp,n = fβ (x) = Kn X ψk (x νk Z )βk : ψk (x νk νl )ψl (x ) dQ(x) = 0 for k 6= l, ) Z {ψk (x νk 2 )} dQ(x) = 1 , (29) k=1 where νk is a p-vector of non-negative integers, xνk is as defined in (17) and Q is the probability measure associated with x. In (28) and (29), we allow for the limiting case n =P ∞ where K∞ = ∞. With some ∞ 2 abuse of notation for β ∈ `2 (R), we define the notation kβ k:∞ k22 = l=k βl . The next subsection is dedicated to proving the main condition of Theorem 5.1 and 5.2, the entropy of the appropriate function classes for hierbasis. 11 5.2.1 Entropy Results for hierbasis M , Q) To specialize Theorems 5.1 and 5.2 for the analysis of hierbasis, we need to characterize H(δ, F∞ M where F∞ is the hierbasis function class (as defined in (30)), and establish an upper bound for H(δ, {fβ ∈ Fn : Ω(β) ≤ 1}, Qn ). In the next lemma, Lemma 5.3, we show that the calculation of M , Q) and H(δ, {f ∈ F : Ω(β) ≤ 1}, Q ) is equivalent to an entropy calculation for a subset of H(δ, F∞ n n β 2 ` (R) and RKn , respectively with respect to the usual k · k2 norm. This reduction allows us to use simple volume arguments and existing results for establishing the entropy conditions. The lemma considers the hierbasis penalty in full generality, i.e. the penalty (6) with any set of non-negative weights. This gives a similar reduction of entropy calculations for the multivariate case with little extra work. M ] the class of hierbasis (respecLemma 5.3 (Reduction to `2 (R) and RKn ). We denote by FnM [or Fp,n tively multivariate hierbasis) functions where FnM = {fβ ∈ Fn : Kn X M wk kβ k:Kn k2 ≤ M }, Fp,n = {fβ ∈ Fp,n : k=1 Kn X wk kβ k:Kn k2 ≤ M }, (30) k=1 w/M w/M M ), Q) = H(δ, H and allow the limiting case n = ∞. Then H(δ, FnM (or Fp,n Kn ), the entropy of HKn with respect to the k · k2 norm, where ) ( Kn X wk w/M Kn HKn = β ∈ R : (31) kβk:Kn k2 ≤ 1 . M k=1 Secondly, assume that the Gram matrix ΨTKn ΨKn /n has a finite maximum eigenvalue of denoted by Λmax . w/1 w =H Then, denoting HK Kn , we have n H δ, {fβ ∈ Fn (or Fp,n ) : Kn X ! wk kΨk:Kn β k:Kn k ≤ 1}, Qn p w ≤ H(δ/ Λmax , HK ). n k=1 Lemma 5.3 establishes the connections between entropy results for the function classes of interest and √ w w w . It is easy to see that H(δ, H w/M ) and H(δ/ Λ the set HK max , HKn ) are proportional to H(δ, HKn ) Kn n √ where the proportionality constant depends on M and Λmax , respectively. The next lemma establishes w ) for univariate and multivariate hierbasis weights. This upper bound is an upper bound for H(δ, HK n all we need to specialize Theorem 5.2. w with univariate hierbasis weights we Lemma 5.4 (An Upper Bound). For δ ≥ 0, for the region HK n have  1 w H δ, HK ≤ UE,1 δ − m , (32) n and for the multivariate hierbasis weights (18) we have  p w H δ, HK ≤ UE,2 δ − m , n (33) for constants UE,1 , UE,2 > 0. While Lemma 5.4 is sufficient for applying Theorem 5.2, to invoke Theorem 5.1 we need an exact value for the entropy up to a proportionality constant. A natural way to achieve this is to find a lower bound for the entropy which matches the upper bound, we do this in the following lemma. w with univariate Lemma 5.5 (A Lower Bound). For δ ∈ ([w1 + . . . + wKn +1 ]−m , 1/2), for the region HK n hierbasis weights we have 1 w H(δ, HK ) ≥ LE,1 δ − m , (34) n 12 and for the multivariate hierbasis weights (18) we have p w H(δ, HK ) ≥ LE,2 δ − m , n (35) for constants LE,1 , LE,2 > 0 and where we assume, for simplicity, that Kn = qK 0 − 1 ≡ some K 0 . 5.2.2 K 0 +p−1 p  − 1 for Specializing Theorems 5.1 and 5.2 for hierbasis The following corollary establishes a lower bound for the minimax rate for estimating f0 , the true function which belongs to some function class F. We consider three different choices for F: 1) the hierbasis class; 2) the multivariate hierbasis class; and 3) the Sobolev class. To prove the result, we use the fact that if an upper bound for the convergence rates can be found that matches the lower bound, then we can conclude that our estimator is minimax. P∞ M ≡ {f ∈ F Corollary 5.5.1. For the mth order hierbasis function class F∞ ∞ : k=1 wk kβk:∞ k2 ≤ M }, where wk = k m − (k − 1)m , we have min max E fb − f 0 M fb f 0 ∈F∞ 2 Q 2m ≥ A1 n− 2m+1 . M ≡ {f ∈ F For the mth order multivariate hierbasis class Fp,∞ p,∞ : are the weights defined in (18), we have min max E fb − f 0 M fb f 0 ∈Fp,∞ 2 ≥ A2 n Q M = {f ∈ F Finally, for the mth order Sobolev class FSob ∞ : min max E fb − f 0 fb M f 0 ∈FSob 2 Q P∞ Pn k=1 wk kβk:∞ k2 2m − 2m+p k=1 (k mβ (36) ≤ M }, where wk . 2 k) (37) ≤ M 2 }, we have 2m ≥ A3 n− 2m+1 . (38) As the last step in our analysis, we next specialize Theorem 5.2 to establish an upper bound for the convergence rate of the univariate and multivariate hierbasis estimators. The following corollary demonstrates a number of interesting points. Firstly, we note that with respect to the empirical norm, M and F M (as defined in (30)). For the k · kn , our estimators achieve the minimax rate for the classes F∞ p,∞ P ∞ M , then hierbasis is minimax over the M , if w kβ k ≤ C(M ) for all f ∈ F Sobolev class, FSob 2 β k:∞ k=1 k Sob Sobolev class as well. This result also gives insight into the role of Kn . Corollary 5.5.2. Consider the model Yi = f 0 (xi ) + εi for mean zero sub-gaussian noise εi . Define the univariate and multivariate hierbasis estimators as 1 fbuni = arg min ky − fβ k2n + λ2n Ωuni (β), fβ ∈Fn 2 1 fbmulti = arg min ky − fβ k2n + λ2n Ωmulti (β), fβ ∈Fp,n 2 for p = 1 and p > 1, respectively, where Ωuni is the penalty (6) and Ωmulti is the penalty (18). Assume T Ψ that maxk kψk k∞ = ψmax < ∞ and that the Gram matrix ΨK Kn /n has a bounded maximum eigenvalue n denoted by Λmax . Then, M there is a constant c > 0 such that for all T ≥ c, we have with probability 1. For p = 1 and f 0n∈ F∞ o 2 at least 1 − c exp − Tc2 , n o 2m 1 buni 5 kf − f 0 k2n ≤ max C1 Kn−(2m−1) , C2 n− 2m+1 , 2 2 where C1 , C2 > 0 are constants that depend on M , ψmax , Λmax , m and T . 13 (39) M there is a constant c > 0 such that for all T ≥ c, we have with probability at 2. For p = 1, f 0 ∈ n FSob o 2 least 1 − c exp − Tc2 , n o 2m 1 buni 5 kf − f 0 k2n ≤ max C1 Kn−(2m−1) , C2 C3 n− 2m+1 , 2 2 where C1 , C2 > 0 are constants that depend on M , ψmax , Λmax , m, T and, for f 0 = 2m+1 P 0 we have C3 2 = ∞ k=1 wk kβ k:∞ k2 . (40) P∞ 0 k=1 ψk βk , M , assume that p < 2m and define the integer K 0 such that K = q 0 − 1 ≡ 3. For p > 1, f 0 ∈ Fp,∞ n K  K 0 +p−1 − 1. Then there is a constant such that for all T ≥ c, we have with probability at least p n 2o 1 − c exp − Tc2 , n o 1 bmulti 5 − 2m kf − f 0 k2n ≤ max C1 K 0−(2m−1) , C2 n 2m+p , 2 2 (41) where C1 , C2 > 0 are constants that depend on M , ψmax , Λmax , m, and T . The above result demonstrates that we can achieve the usual non-parametric rates as long as the 2m −(2m−1) truncation level Kn satisfies Kn ≤ n− 2m+1 . We note that since Kn2m ≥ Kn2m−1 , an appropriate 1 √ choice of truncation level would be any Kn ≥ n 2m+1 , which gives us n as a conservative truncation level. 5.3 Theoretical Results for Sparse Additive Models In this section, we will establish the convergence rates of high-dimensional sparse additive models in terms of a general entropy condition. Raskutti et al. (2009) proved a lower bound for the minimax rates for estimation of sparse additive models assuming independent covariates; for completeness, we state this result as Theorem 5.6. Our first contribution is an oracle inequality for an upper bound on the prediction error of additive models. This inequality establishes consistency for the estimators with slow convergence rates, specifically, these rates are O(νn ) where νn2 is the minimax lower bound of Raskutti et al. (2009). We then proceed to state a compatibility condition which leads to two corollaries: firstly, it establishes convergence rates of the order of O(νn2 ) and, secondly, it automatically establishes minimax rates for univariate regression as a special case of an additive model with p = 1. Our contributions in this section extend to a broad class of estimators and can be seen as the additive model analog of Theorem 5.2. Let f 0 be the true function such that Yi = f 0 (xi ) + εi , for i = 1, 2, . . . , n, (42) where εi is independent random mean-zero noise, xi = [xi,1 , xi,2 , . . . , xi,p ]T ∈ Rp for each i = 1, 2, . . . , n. We denote by f ∗ a sparse additive approximation to the function f 0 , f ∗ (xi ) = c0 + p X fj∗ (xi,j ) = c0 + j=1 X fj∗ (xi,j ), (43) j∈S where S, which we call the active set, is a subset of {1, . . . , p} and, c0 = E[Ȳ ] where Ȳ is the sample mean. To ensure identifiability we assume, n X fj∗ (xi,j ) = 0 for all j = 1, 2, . . . , p. i=1 14 (44) P Consider the estimator fb = pj=1 fbj , where, 2  p p n   X X X 1 + λn I(fj ) , fb1 , . . . , fbp = arg min Yi − Ȳ − fj (xi,j )   {fj }p ∈F 2n (45) j=1 j=1 i=1 j=1 where I(·) is a penalty of the form I(fj ) = kfj kn + λn Ω(fj ) , (46) for a semi-norm Ω(·). We can think of Ω(fj ) as a smoothness penalty for function fj . Theorem 5.6 (Theorem 1, Raskutti et al. (2009)). For n i.i.d. samples from the sparse additive model X Yi = fj0 (xi,j ) + εi , (47) j∈S iid iid where |S| = s ≤ p/4, xi ∼ Q, εi ∼ N (0, σ 2 ) and, fj0 ∈ F where F is a class satisfying the entropy condition (48) H(δ, F, Q) = A0 δ −α , Np with α ∈ (0, 2). Further assume the covariates are independent, i.e. Q = j=1 Qj . Then for a constant C > 0, 2 ( 2 )  2  2+α p 2 s log(p/s) X σ σ 0 min max E fbj − fj ≥ max , (49) , Cs 0 p 32n n {fb}pj=1 {fj }j=1 ∈F j=1 Q where the minimum is over the set of all measurable functions. We next state the first key result of this section, which establishes an oracle inequality for additive models, as well as slow rates of convergence.  2 2  Theorem 5.7. Assume the model (42), with maxi K 2 Eeεi /K − 1 ≤ σ02 , for some constants K and σ0 . Assume the entropy condition H(δ, {f ∈ F : Ω(f ) ≤ 1}, Qn ) ≤ A0 δ −α , (50) holds for α ∈ (0, 2), for some function class F and, some constant A0 . Then for the estimator (45), for ! r 1 log p ρn = κ max n− 2+α , , (51) n   and for λn ≥ 4ρn with probability at least 1 − 2 exp −c1 nρ2n − c2 exp −c3 nρ2n we have kfb − f 0 k2n + λn X j∈S c 3λ2n X b Ω(fj − fj∗ ) 2 j∈S X X b ≤ 3λn kfj − fj∗ kn + 4λ2n Ω(fj∗ ) + kf ∗ − f 0 k2n , kfbj − fj∗ kn + j∈S (52) j∈S where κ ≥ c2 and c1 = c1 (A0 , σ0 ), c2 = c2 (A0 , α, K, σ0 ), c3 ≥ 1/c22 are positive constants and S = {j : fj∗ 6≡ 0}. Furthermore, if the function class F satisfies supf ∈F kf kn ≤ R, we have ! r 1 1 b log p 1 − 2+α 0 2 kf − f kn ≤ Cs max sn ,s + kf ∗ − f 0 k2n , (53) 2 n 2 where Cs ≥ 0 depends on κ, R and maxj Ω(fj∗ ) and s = |S|. 15 We are now ready to establish the fast rates of convergence for additive models, using the compatibility condition stated next. Compatibility Condition: We say that the compatibility condition is met for the set S, if for some Pp constant φ(S) > 0, and for all f ∈ F = {f : f = j=1 fj }, satisfying X X kfj kn ≤ 4 kfj kn , (54) j∈S c j∈S it holds that X kfj kn ≤ √ skf kn /φ(S). (55) j∈S Corollary 5.7.1. Assuming the conditions of Theorem5.7 and the condition  compatibility   is met for α α ∗ 2+α 2+α S = {j : fj 6≡ 0}, then with probability at least 1 − 2 exp −c1 κn − c2 exp −c3 κn we have   X X 2 1 b s log p kf − f 0 k2n + λn kfbj − fj∗ kn + λ2n Ω(fbj − fj∗ ) ≤ Cf max sn− 2+α , 2 n c j∈S j∈S ∗ + 2kf − (56) f 0 k2n , where Cf ≥ 0 is a constant that depends on φ(S) and maxj Ω(fj∗ ) and c1 , c2 and c3 are the constants of Theorem 5.7. Corollary 5.7.2. Assuming the conditions of Theorem 5.7 with p = 1, the compatibility condition holds trivially with φ(S) = 1 and we have 2 1 b kf − f 0 k2n ≤ Cf n− 2+α + 2kf ∗ − f 0 k2n , (57) 2     α α with probability at least 1 − 2 exp −c1 κn 2+α − c2 exp −c3 κn 2+α for a constant Cf ≥ 0 that depends on Ω(f ∗ ). 6 6.1 Simulation Studies Simulation for Univariate Regression We begin with a simulation to compare the performance of hierbasis to smoothing splines (Wahba, 1990) and trend filtering (Kim et al., 2009; Tibshirani, 2014). Smoothing splines and trend filtering are implemented in the R packages splines (R Core Team, 2014) and genlasso (Arnold and Tibshirani, 2014), respectively. We generate the data using (21) for different choices P of the function f 0 . The errors are generated −1 n 0 2 2 as ε ∼ Nn (0, σ 2 In ) where σ 2 satisfies SNR = (n − 1) i=1 {f (xi )} /σ , for a fixed Signal-to-Noise Ratio (SNR). For this simulation we consider the fixed design with xi = i/n for i = 1, . . . , n. This was also done to facilitate comparison to trend filtering which can become substantially slow for random xi , particularly when the covariates are not uniformly distributed over a closed interval. We consider four different choices of f 0 denoted by gt for t = 1, 2, 3, 4. for n = 150 and SNR of 2 or 3. The true functions gt are as follows: g1 (x) = −0.43 + 4.83x − 14.65x2 + 11.76x3 , g2 (x) = 0.23 − 8.44x + 45.20x2 − 81.41x3 + 46.59x4 , g3 (x) = exp (−5x + 1/2) − 2/5 sinh (5/2) , (58) g4 (x) = − sin(7x − 0.4). We applied hierbasis to 100 λ values linear on the log scale from λmax , for which βb = 0, down to 10−4 λmax . We applied smoothing splines to a grid of 100 values for degrees of freedom from 10 to 1. Trend 16 Table 1: The average relative MSE and Degrees of Freedom relative to hierbasis of order 3, (m = 3). A value greater than 1, indicates a lower corresponding value for hierbasis. The results presented are averaged over 100 datasets with the standard error shown within the parenthesis. Function Method DoF Relative MSE Degree 3 polynomial Degree 4 polynomial Exponential function Sine function Smoothing splines First order trend filter Second order trend filter Third order trend filter Smoothing splines First order trend filter Third order trend filter Third order trend filter Smoothing Splines First order trend filter Second order trend filter Third order trend filter Smoothing splines First order trend filter Second order trend filter Third order trend filter 1.32 1.88 1.30 1.06 1.25 1.92 1.42 1.27 1.13 1.67 1.34 1.47 1.10 1.85 1.20 1.34 (0.034) (0.130) (0.093) (0.120) (0.029) (0.120) (0.092) (0.110) (0.033) (0.160) (0.130) (0.160) (0.027) (0.130) (0.100) (0.120) 1.48 2.40 1.61 1.37 1.58 2.46 1.81 1.66 1.21 1.76 1.48 1.51 1.00 1.88 1.30 1.48 (0.073) (0.300) (0.240) (0.320) (0.088) (0.300) (0.260) (0.310) (0.037) (0.310) (0.290) (0.350) (0.047) (0.240) (0.210) (0.250) filtering is applied to a sequence of lambda values, automatically selected by the its R implementation. For hierbasis and smoothing splines we fix m = 3. We fit trend filters of orders 1, 2 and 3. For each simulation setting, we plot the Mean-Squared-Error (MSE) as a function of degrees-offreedom (DoF) where we define MSE = kf 0 − fbk2n for a fitted model fb. We also generate a test set of size ntest = 75. For each method, we find a λ∗ which minimizes the prediction error on the test set. For this λ∗ , we evaluate the MSE and DoF for the fitted model and report them relative to the MSE and DoF of hierbasis, to be precise we report the ratios MSE/MSEhierbasis and DoF/DoFhierbasis . Figure 4 displays the MSE of hierbasis, smoothing splines, trend filtering of orders 1, 2 and 3 as a function of degrees of freedom. We also plot the results for fitting hierbasis with m = 1. Hierbasis appears to outperform the competitors in terms of MSE especially for polynomials. We observe comparable performance for the exponential and sine functions. This also provides empirical evidence for the theoretical results where we proved hierbasis to converge with rates comparable to smoothing splines. Since the functions considered in this simulation are smooth, as expected, we see that hierbasis with m = 1 does not converge as fast as competing methods. Figure A.2 shows examples of some fitted models for a fixed value of DoF. We see hierbasis seems to perform very well and is mostly robust to changes in the value of m. The smoothing splines estimates are unable to do as well as hierbasis for the same number of effective degrees of freedom. In the bottom panel of Figure A.2, it is not surprising to observe the first order trend filter perform poorly due to model misspecification. 6.2 Simulation for Multivariate Additive Regression We proceed with a simulation study to illustrate the performance of hierbasis in the additive setting. We perform a small simulation study to compare the performance of additive hierbasis to SpAM (Ravikumar et al., 2009). SpAM is implemented in the R package SAM (Zhao et al., 2014) which uses natural spline basis functions. To facilitate a fairer comparison, we also implement SpAM using a polynomial basis expansion, which we refer to as SpAM.poly. Due to a lack of R packages for sparsity-smoothness penalties (Meier et al., 2009) and SPLAM (Lou et al., 2014), we defer the comparison to these methods to future work. 17 Degree 4 Polynomial 0.20 0.10 Average MSE 0.05 0.10 0.05 0.01 0.02 0.02 Average MSE 0.20 0.50 0.50 Degree 3 Polynomial 4 6 8 10 2 4 6 Degrees of Freedom Degrees of Freedom Exponential Function Sine Function 8 10 8 10 0.10 0.02 0.05 Average MSE 0.020 0.010 0.01 0.005 Average MSE 0.050 0.20 0.100 0.50 2 2 4 6 8 10 2 Degrees of Freedom 4 6 Degrees of Freedom Figure 4: Average MSE (over 100 simulated datasets) as a function of degrees of freedom for true models ) and given by g1 , . . . , g4 in (58). The colored lines indicate results for hierbasis of order 3 ( 1( ), Trend Filtering of order 1 ( ), 2 ( ) and 3 ( ), and Smoothing Splines ( ). We consider the simulation setting of Meier et al. (2009) with some modifications to have high dimensional data and smaller signal-to-noise ratio. We generate n = 200 samples for p = 500 features. The data is generated as follows: yi = 5f1 (xi, 1 ) + 3f2 (xi, 2 ) + 4f3 (xi, 3 ) + 6f4 (xi, 4 ) + εi , (59) where εi are i.i.d. normal such that SNR = 3 and 2 sin(2πx) and 2 − sin(2πx) f4 (x) = 0.1 sin(2πx) + 0.2 cos(2πx) + 0.3 sin2 (2πx) + 0.4 cos3 (2πx) + 0.5 sin3 (2πx) , f1 (x) = x, f2 (x) = (2x − 1)2 , f3 = and the covariates are i.i.d. Uniform(0, 1). We implemented the parametrization (13), with m = 1 and a sequence of 50 λ values, decreasing linearly on the log-scale. We fix the maximum number of basis functions Kn = 20 for hierbasis and we implement SpAM with {3, 5, 8, 10, 15, 20} basis functions. It is not surprising to observe superior performance of hierbasis over SpAM.poly in terms of MSE in Figure 5. However, we note in the same figure that hierbasis seems to even outperform SpAM. For small lambda values, i.e. more complex models, we observe lower MSE for SpAM with fewer basis functions. With low sparsity SpAM is able to control the variance of the estimator by the small number of basis functions used. Whereas hierbasis can control the variance by controlling smoothness via the Ωj (·) penalty. For large lambda values, we obtain sparser models and hence control the variance. However, now the bias for SpAM is inflated when using fewer basis functions. In Figure A.3, we show some of the fitted functions for both SpAM and HierBasis using the λ value which minimizes the test set error for SpAM with 3 and 15 basis functions. 18 10 MSE 2 5 10 5 MSE 2 0.05 0.10 0.20 0.50 1.00 2.00 0.05 lambda 0.10 0.20 0.50 1.00 2.00 lambda Figure 5: Average MSE (over 100 simulated datasets) as a function of λ for hierbasis vs SpAM (Left) and for hierbasis vs SpAM.poly (Right). The colored lines indicate results for hierbasis of order 1 ( ) and, SpAM (SpAM.poly) with 3 ( ), 5 ( ), 8 ( ) basis functions and SpAM (SpAM.poly) with 10 ( ), 15 ( ) and, 20 ( ) basis functions. 7 Conclusion In this paper we introduced hierbasis, a novel approach to non-parametric regression and high dimensional models. Recall the original motivation: for non-parametric regression, especially additive models, we require an estimator that can adapt to function complexity in a data-adaptive way. We showed that state-of-the-art methods like SpAM and SPLAM are unable to do that effectively. More data adaptive proposals, such as the sparsity smoothness penalty of Meier et al. (2009), come at a cost of highly complex fitted models even for simple underlying surfaces. The use of hierarchical penalty allows us to adaptively fit simple models for simple functions as shown in Sections 6 and 6.2. Our theoretical analyses in Section 5 not only show that hierbasis rates are faster than any of the existing methods but also establish fast convergence rates for a broad class sparse additive estimators, where the sparsity smoothness penalty is one special case. A similar result was proved by Raskutti et al. (2012); however, they considered independent component functions in a RKHS. Thus smoothness penalties that are not a norm of some Hilbert space are not covered by their formulation. The R package HierBasis, available on https://github.com/asadharis/HierBasis, implements the methods described in this paper. References Arnold, T. B. and Tibshirani, R. J. (2014) genlasso: Path algorithm for generalized lasso problems. URL: http://CRAN.R-project.org/package=genlasso. R package version 1.3. Burczynski, M. E., Peterson, R. L., Twine, N. C., Zuberek, K. A., Brodeur, B. J., Casciotti, L., Maganti, V., Reddy, P. S., Strahs, A., Immermann, F., Spinelli, W., Schwertschlag, U., Slager, A. M., Cotreau, M. M. and Dorner, A. J. (2006) Molecular classification of crohn’s disease and ulcerative colitis patients using transcriptional profiles in peripheral blood mononuclear cells. The Journal of Molecular Diagnostics, 8, 51–61. Chatterjee, S. (2013) Assumptionless consistency of the lasso. Preprint. Available at arXiv:1303.5817. Combettes, P. L. and Pesquet, J. (2011) Proximal splitting methods in signal processing. In Fixed-Point Algorithms for Inverse Problems in Science and Engineering (eds. H. H. Bauschke, R. S. Burachik, P. L. Combettes, V. Elser, D. R. Luke and H. Wolkowicz), 185–212. Springer New York. 19 Dumer, I. (2006) Covering an ellipsoid with equal balls. Journal of Combinatorial Theory, Series A, 113, 1667–1676. Friedman, J., Hastie, T. and Tibshirani, R. (2010) Regularization paths for generalized linear models via coordinate descent. Journal of Statistical Software, 33, 1–22. van de Geer, S. (2000) Empirical Processes in M-estimation, vol. 6. Cambridge University Press. Haris, A., Witten, D. and Simon, N. (2015) Convex modeling of interactions with strong heredity. Preprint. Available at arXiv:1410.3517. Hastie, T., Tibshirani, R. and Friedman, J. (2009) The Elements of Statistical Learning. Springer New York. Jenatton, R., Mairal, J., Bach, F. R. and Obozinski, G. R. (2010) Proximal methods for sparse hierarchical dictionary learning. In Proceedings of the 27th International Conference on Machine Learning (ICML10), 487–494. Kim, S., Koh, K., Boyd, S. and Gorinevsky, D. (2009) `1 trend filtering. SIAM review, 51, 339–360. Lou, Y., Bien, J., Caruana, R. and Gehrke, J. (2014) Sparse partially linear additive models. Preprint. Available at arXiv:1407.4729. Mammen, E. and van de Geer, S. (1997) Locally adaptive regression splines. The Annals of Statistics, 25, 387–413. Meier, L., Van de Geer, S. and Bühlmann, P. (2009) High-dimensional additive modeling. The Annals of Statistics, 37, 3779–3821. Nadaraya, E. A. (1964) On estimating regression. Theory of Probability and Its Applications, 9, 141–142. R Core Team (2014) R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. URL: http://www.R-project.org/. Raskutti, G., Wainwright, M. J. and Yu, B. (2012) Minimax-optimal rates for sparse additive models over kernel classes via convex programming. The Journal of Machine Learning Research, 13, 389–427. Raskutti, G., Yu, B. and Wainwright, M. J. (2009) Lower bounds on minimax rates for nonparametric regression with additive sparsity and smoothness. In Advances in Neural Information Processing Systems, 1563–1570. Ravikumar, P., Lafferty, J., Liu, H. and Wasserman, L. (2009) Sparse additive models. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 71, 1009–1030. Stein, C. M. (1981) Estimation of the mean of a multivariate normal distribution. The Annals of Statistics, 9, 1135–1151. Stone, C. J. (1977) Consistent nonparametric regression. The Annals of Statistics, 5, 595–620. Tibshirani, R. (1996) Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), 267–288. Tibshirani, R. J. (2014) Adaptive piecewise polynomial estimation via trend filtering. The Annals of Statistics, 42, 285–323. Čencov, N. (1962) Evaluation of an unknown distribution density from observations. Doklady, 3, 1559– 1562. 20 −1 0 1 Gene expression value 2 0 1 2 3 4 −1 Gene expression value 3 2 1 Change in log odds −1 −1.0 −1 0 0.0 Change in log odds −0.5 2 1 −1 0 Change in log odds 0.5 4 3 5 0.6 0.4 0.2 0.0 Change in log odds −0.2 −0.4 −2 0 1 2 Gene expression value −1 0 1 2 3 4 Gene expression value Figure A.1: Plots of some fitted functions for a single split of the colitis data into training and test sets for hierbasis ( ), LASSO ( ), SpAM ( ) with 3 basis functions. Wahba, G. (1990) Spline models for observational data. SIAM. Watson, G. S. (1964) Smooth regression analysis. Sankhyā: The Indian Journal of Statistics, Series A, 26, 359–372. Yang, Y. and Barron, A. (1999) Information-theoretic determination of minimax rates of convergence. The Annals of Statistics, 27, 1564–1599. Yuan, M. and Lin, Y. (2006) Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 68, 49–67. Zhao, P., Rocha, G. and Yu, B. (2009) The composite absolute penalties family for grouped and hierarchical variable selection. The Annals of Statistics, 37, 3468–3497. Zhao, T., Li, X., Liu, H. and Roeder, K. (2014) SAM: Sparse Additive Modelling. URL: http://CRAN. R-project.org/package=SAM. R package version 1.0.5. A Additional Figures for Simulation Studies and Data Analysis In this Appendix we present some additional figures referenced in Section 3 and 6. Figure A.1 shows examples of some fitted functions for one split of the dataset into training and test sets. Figure A.2 shows examples of some fitted models for a fixed value of DoF. In Figure A.3, we show some of the fitted functions for both SpAM and HierBasis using the λ value which minimizes the test set error for SpAM with 3 and 15 basis functions. B Algorithms for Additive and Logistic hierbasis Here we give an algorithm for additive and sparse-additive hierbasis as well as an algorithm for logistic hierbasis. We use a block-wise coordinate descent algorithm for solving additive and sparse additive hierbasis. This algorithm cyclically iterates through features, and for each feature applies the univariate solution detailed in Algorithm 1. The exact details are given in Algorithm B.1. We also give an algorithm for solving logistic hierbasis based on proximal gradient descent. To 1 Pn begin let L(β0 , β) = 2n i=1 log (1 + exp [−yi {β0 + (Ψβ)i }]). We denote by ∇L(β0 , β), the derivative of L at the point (β0 , β) ∈ RK+1 . Algorithm B.2 presents the steps for solving (19). The algorithm for additive logistic hierbasis can be similarly derived and is omitted in the interest of brevity. 21 Degree 4 polynomial 0.6 0.8 1.0 0.0 0.2 0.4 x 0.6 0.8 1.0 0.0 0.2 0.4 x 0.6 0.8 −2 ● 0.2 0.4 0.6 x 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.5 0.5 f0 −0.5 −1.5 f0 ●●● ● ●● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ●●● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ●●●● ●● ● ●● ● ●●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●●● ● ● ●●● ● ●● ●●●● ●●●● ● ● ●●● ● ●●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● Estimated function −1.0 −1.0 4 3 2 1 Estimated function −1 0 3 2 ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ●●● ●● ● ●●● ● ● ● ●●● ●●● ●● ● ● ● ● ● ●●●● ● ● ● ● ● ●● ●● ● ●● ● ● ●●●● ● ● ●● ● ●●●● ● ● ●● ● ● ● ●● ●●● ●● ●● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● 1.0 0.4 0.6 0.8 0.5 −0.5 −1.5 Estimated function 1.5 0.2 1.0 0.0 0.2 0.4 0.6 x df = 4 df = 4 1.5 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 df = 4 df = 4 0.8 ● 0.2 0.4 0.6 x 0.8 1.0 ● ● ● ●●● ● ● ●● ●● ●●● ● ● ● ●● ●● ●●● ● ●● ● ● ● ●● ● ● ●● ● ●● ● ●● ●● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ●● ● ●●● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ●● ● ● ● ●● ● ●● ● ●●● ●● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● x ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●●●● ● ● ● ●● ● ●● ● ● ● ● ● ●●●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ●●● ●● ● ●●●●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● 1.0 ● x ● ● ●● ● 0.8 ● 0.2 1.0 ● ● ●●● ● ● ●● ●● ●●● ● ● ● ●● ●● ●●● ● ●● ● ● ● ●● ● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ●● ●● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ●● ● ●●● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ●● ● ● ●●● ● ●● ● ●● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● x ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●●●● ● ● ● ● ● ●● ● ● ● ● ● ● ●●●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ●●●●●● ● ●●●●● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● 0.0 x 0.8 ● ● ● ● ● ● ● ● ● ● ● 0.6 df = 4 ● ● ●● 0.0 ●● ● 0.4 ● df = 5 ●● ●● ● ●● ●● ● ● ● ● ●● ● ●●● 0.0 −3.0 1.0 ● 0.2 df = 4 1.5 df = 4 0.0 x x −2.0 0.4 ●●● ● ●● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ●●● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ●●●● ●● ● ● ● ●● ● ● ●●●● ● ●●● ●●●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●●● ● ● ●●● ● ● ●●●● ●●●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● 1.0 ● ● −2.0 4 3 −2 ● ● ● ● ● ● ● 0.8 ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●●●● ● ● ● ●● ● ●● ● ● ● ● ● ●●●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ●●●●●● ● ●●●●● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● 0.0 ● ● 2 1 Estimated function −1 ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ●● ● ●● ● ● ● ●●● ●●● ● ● ● ● ●●● ● ●● ● ●●● ● ● ● ●●●● ●● ●● ● ● ●● ●● ● ●● ● ●●● ● ● ●● ● ● ●● ●●● ●● ●● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● 0.2 −3.0 1.0 ●● 0 3 0 1 2 ●● ●● ● ●● ●● ● ● ● ● ●● ● ●●● 0.6 x ● ● ●● df = 5 ● Estimated function 0.8 ● 0.0 0.4 x df = 4 −1 0.6 −3.0 ●●● ● ●● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ●●● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ●●●● ● ● ● ● ● ●● ● ● ●●●● ● ●●● ●●●● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●●● ● ● ●●● ● ●● ●●●● ●●●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● −1.0 ● ● ● ● ● ● Estimated function 3 ● ● 2 1 Estimated function −1 −2 ● 0.4 0.2 ● ● ● ●●● ● ● ●● ●● ●●● ● ● ● ●● ●● ●●● ● ●● ● ● ● ●● ● ● ●● ● ●● ● ●● ●● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ●● ●● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ●● ● ●●● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ●●● ● ● ●● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● −2.0 4 ●● 0 3 2 1 0 Estimated function −1 ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ●●● ●●● ●●● ● ● ● ●● ● ●●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●●●● ●● ●● ●● ● ●● ●● ● ●● ● ● ● ●● ●●● ● ● ● ●● ●●● ●● ●● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● 0.2 0.0 df = 5 ●● ●● ● ●● ●● ● ● ● ● ●● ● ●●● 0.0 1 1.0 ● ● 0 0.8 0.5 df = 4 Estimated function 0.6 x −0.5 0.4 Estimated function 0.2 −1.5 0.0 ● ● 0.5 1.0 ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●●●● ● ● ● ●● ● ●● ● ● ● ● ● ●●●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ●●● ●● ● ●●●●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● −0.5 0.8 x ● ● ● ●● Estimated function 0.6 ●●● ● ●● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ●●● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ●●●● ●● ● ●● ● ●●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●●● ● ● ●●● ● ●● ●●●● ●●●● ● ● ●●● ● ●●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● Estimated function 0.4 ● ● ● ● ● ● −3.0 0.2 −1.0 3 −2 ● 0.0 ● ● 2 0 1 f0 ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ●●● ●● ● ●●● ● ● ● ●●● ●●● ●● ● ● ● ● ● ●●●● ● ● ● ● ● ●● ●● ● ●● ● ● ●●●● ● ● ●● ● ●●●● ● ● ●● ● ● ● ●● ●●● ●● ●● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● −1 −1 0 f0 1 2 ●● ●● ● ●● ●● ● ● ● ● ●● ● ●●● Sine function ● ● −2.0 4 3 ●● ● −1 Exponential function ● −1.5 Degree 3 polynomial 1.0 ● ● ● ●●● ● ● ●● ●● ●●● ● ● ● ●● ●● ●●● ● ●● ● ● ● ●● ● ● ●● ● ●● ● ●● ●● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ●● ●● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ●● ● ●●● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ●●● ● ● ●● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● 0.0 0.2 0.4 0.6 0.8 1.0 x Figure A.2: Scatterplots of simulated data along with true and estimated functions. The top row includes plots of the simulated data along with the true function used for generating the data. The other three rows show the fitted functions for each method and the degrees of freedom corresponding to the fitted model — hierBasis, smoothing splines and trend filtering are shown in rows 2-4, respectively. For trend filtering and hierbasis m = 1, 2 and 3 are shown in green ( ), blue ( ) and red ( ). Only the available R implementation with order m = 3 is shown for smoothing splines. 22 0.2 0.4 0.6 0.8 1.0 0.0 0.2 x 0.4 0.6 0.8 1.0 4 −4 −2 0 f4 2 4 −4 −2 0 f3 2 4 −4 −2 0 f2 2 4 2 0 f1 −2 −4 0.0 0.0 0.2 0.4 x 0.6 0.8 1.0 0.0 0.2 0.4 x 0.6 0.8 1.0 x Figure A.3: The first 4 component functions of the simulation study from Section 6.2. The estimates of hierbasis are shown in green ( ), whereas SpAM fitted with 20 and SpAM with 3 basis functions are shown in In blue ( ) and red ( ), respectively. In each case, the tuning parameter leading to the smallest MSE was used. Algorithm B.1 Block coordinate descent for additive hierbasis p 1: procedure Additive hierbasis(y, {Ψ j }j=1 , λ, {wk }K k=1 , max iter) 2: Initialize β j ← 0 for j = 1, . . . , p 3: while l ≤ max iter and not converged do 4: for j = 1, . . . , p do 5: Set X 0 r −j ← y − Ψ j βj0 j 0 6=j 6: Update β j ← arg min β∈RK 1 r −j − Ψ j β 2 2 n +λ K X j β j,k:K w ek Ψk:K k=1 n , (B.1) where w e1 = w1 + λ and w ek = wk for k = 2, . . . , K. end for 8: end while 9: return β 1 , . . . , β p 10: end procedure 7: Algorithm B.2 Proximal gradient descent for logistic hierbasis 1: procedure Logistic hierbasis(y, Ψ , λ, {wk }K k=1 ) 0 0 2: Initialize (β0 , β ) 3: for l = 1, 2, . . . until convergence do 4: Select a step size tl via line search 5: Update (β0l , β l ) ← . Algorithm for Solving (19) h i 1 (β0 , β) − (β0l−1 , β l−1 ) − tl ∇L(β0l−1 , β l−1 ) (β0 ,β)∈RK+1 2 arg min end for 7: return (β l , β l ) 8: end procedure 6: 23 2 2 + λΩ(β) C Proofs for Section 5.2.1 Proof of Lemma 5.3. Firstly, we have for f1 , f2 ∈ Fn )2 Z Z (X Kn [1] [2] ψk (x)(βk − βk ) dQ kf1 − f2 k2Q = (f1 − f2 )dQ = k=1 =  Z X Kn   [1] [2] ψk2 (x) βk − βk 2 + k=1 = β [1] − β [2] X k6=l    [1] [2] [1] [2] ψk (x)ψl (x) βk − βk βl − βl dQ   2 2 , where the final equality follows due to the orthonormality of ψk . Similarly for f1 , f2 ∈ Fp,n we can show w/M that kf1 − f2 k2Q = kβ [1] − β [2] k22 . Thus if {β 1 , . . . , β N } the smallest δ-cover of HKn then the functions fβ associated with {β 1 , . . . , β N } form the smallest δ-cover with respect to the LQ norm. This can be extended to the case n = ∞. This proves the first part. Secondly, note that for f1 , f2 ∈ Fn (or Fp,n ) we have kf1 − f2 k2n = (β [1] − β [2] )T Ψ T Ψ [1] (β − β [2] ) ≤ Λmax kβ [1] − β [2] k22 , n (C.1) w , then the associated functions {f 1 , . . . , f N } is a thus if {β 1 , . . . , β N } is the smallest δ-cover for HK n √ PKn Λmax δ cover of {fβ ∈ Fn (or Fp,n ) : k=1 wk kΨk:Kn β k:Kn k ≤ 1} with respect to the Qn metric. Since this is a cover and not the smallest cover, we have Kn X p w ), wk kΨk:Kn β k:Kn k ≤ 1}, Qn ) ≤ H(δ, HK H( Λmax δ, {fβ ∈ Fn (or Fp,n ) : n k=1 √ and since the inequality holds for all δ > 0, we can select δ = δ 0 / Λmax giving us the result. w where Proof of Lemma 5.4. For the Ellipsoid EK n ) ( Kn X 2 2 w Kn βk (w1 + . . . + wk ) ≤ 1 , EKn = β ∈ R : (C.2) k=1 w HK n w EK n we show that ⊂ in Lemma F.1. Dumer (2006) proved an upper bound for ellipsoids which we state in Appendix G.1. For the special case of wk = k m − (k − 1)m , this theorem yields the desired upper −1 w ) ≤ H(δ, E w ) ≤ U bound as shown in Corollary G.1.1. Therefore we have H(δ, HK E,1 δ m . Kn n Similarly, we can consider the special case of multivariate hierbasis weights in Corollary G.1.2, −p w ) ≤ H(δ, E w ) ≤ U which gives us the result H(δ, HK E,2 δ m . Kn n Proof of Lemma 5.5. Let d be the integer such that (w1 + . . . + wd+1 )−1 ≤ δ ≤ (w1 + . . . + wd )−1 for δ ∈ ((w1 +. . .+wKn +1 )−1 , 1). Note that since δ ≥ (w1 +. . .+wKn +1 )−1 , d ≤ Kn . We define the truncated hierbasis region as  e w = β ∈ H w : βj = 0 ∀ j ≥ d + 1 . H (C.3) Kn d e w ⊆ H w where H w is simply viewing H e w as a subset of Rd . Let Bn (r) Then we have that Hdw ⊂ H Kn d d d  be the n-ball of radius r. By Lemma F.2, we have Bd [w1 + . . . + wd ]−1 ⊂ Hdw . The lower bound of the entropy of a ball can be obtained by a simple volume argument. Since (w1 + . . . + wd )−1 ≥ δ then Bd (δ) ⊆ Bd ([w1 + . . . + wd ]−1 ) and hence H(δ/2, Hdw ) ≥ H(δ/2, Bd (δ)) ≥ log 24 V ol(Bd (δ)) = d log(2). V ol(Bd (δ/2)) Since the above inequality holds for δ ≤ 1, for δ ∈ ([w1 +. . .+wKn +1 ]−1 , 1/2) we have H(δ, Hdw ) ≥ d log(2). 1 Now for the univariate case we have (w1 + . . . + wd+1 )−1 = (d + 1)−m ≤ δ ⇒ (d + 1) ≥ δ − m and hence we have     1 1 1 1 w −m −m 1/m −m 1 − 1/m log(2). H(δ, Hd ) ≥ d log(2) ≥ (δ − 1) log(2) = δ 1−δ log(2) ≥ δ 2 Now for the multivariate case, the argument is slightly different due to presence of zero weights. As before, there is some d0 such that (w1 + . . . + wqd0 −1 )−1 ≤ δ ≤ (w1 + . . . + wqd0 )−1 and hence d = qd0 − 1. Note that by assumption we have Kn = qK 0 − 1 and hence δ ≥ (w1 + . . . + wqK 0 )−1 which implies that d0 ≤ K 0 and hence d ≤ Kn . Finally we have that since w1 + . . . + wqd0 −1 = w1 + . . . + wqd0 −1 = (d0 − 1)m , 1 therefore d0 − 1 ≥ δ − m . Now we have that H(δ, Hdw )  0   d +p−1 ≥ d log(2) = (qd0 − 1) log(2) = − 1 log(2) p ( )  0  1 (d + p − 1)p (δ − m + p)p ≥ − 1 log(2) ≥ − 1 log(2) pp pp ( ) p p p (1 + pδ 1/m )p −m −m m =δ log(2) ≥ δ A log(2), − δ pp | {z } g(δ) where the last inequality follows from the fact that g(δ) > 0 for all δ ∈ (0, 1). D D.1 Details for Corollary 5.5.2 Univariate Case PKn P 0 0 ∗ Firstly, if f 0 (x) = ∞ k=1 ψk (x)βk then we select fn (x) = k=1 ψk (x)βk ∈ Fn . Secondly, we note that for the hierbasis estimator we have Ω(fn∗ |Qn ) = Ωuni (β 01:Kn ). For brevity we will drop the dependence on β 0 and denote Ωuni (β 01:Kn ) by Ω. Thus we have 2 2−α 2 2α 2m 2 λ2n Ω(fn∗ |Qn ) = n− 2+α Ω− 2+α Ω = n− 2+α Ω 2+α = n− 2m+1 Ω 2m+1 . For the term Ω(β 01:Kn ) we have Ω(β 01:Kn ) = Kn X k=1 s wk β 01:Kn Kn T X T Ψk:K Ψk:Kn 0 n β 1:Kn ≤ ψmax wk kβ 01:Kn k2 ≤ ψmax M, n k=1 M . For F M , we do have the above bound and hence we keep the Ω term in the inequality. for f 0 ∈ F∞ Sob 25 For the truncation error we note that  2  2 n  X ∞ n ∞  X X X 1 1 2  kf 0 − fn∗ k2n = ψk (xi )βk0 ≤ ψmax βk0    n n i=1 i=1 k=Kn +1 k=Kn +1 2  n ∞ 1 X  X km 0  2 ≤ ψmax |β | n km k i=1 k=Kn +1 v 2 v u X n u X ∞ ∞  X u u 1 1 2 t ≤ ψmax k 2m (βk0 )2 t  n k 2m  i=1 k=Kn +1 k=Kn +1 2  v u X n X u ∞ 1 2  ≤ ψmax Mt n i=1 k=Kn +1 k ∞ X 1  2 = ψmax M2 2m k=Kn +1 1 k 2m , where the last inequality follows from the proof of Lemma F.1. The result now follows since ∞ X  k −2m ≤ (2m − 1)(Kn + 1)2m−1 −1 ≤ k=Kn +1 D.2 1 1 . 2m−1 2m − 1 Kn Multivariate Case PKn P νk 0 p ∗ νk 0 Now we assume that f 0 (x) = ∞ k=1 ψk (x )βk for x ∈ R . Then we take fn (x) = k=1 ψk (x )βk . Now by the same calculations as in the univariate case, we have λ2n Ω(fn∗ |Qn ) = n 2m − 2m+p 2p Ω 2m+p ≤ n 2m − 2m+p 2p [ψmax M ] 2m+p . For the truncation error we note that Kn = qK 0 − 1 and hence 2   2 n  X n ∞ ∞  X X X 1 1 2  ≤ ψmax kf 0 − fn∗ k2n = ψk (xi νk )βk0 βk0    n n i=1 i=1 k=Kn +1 k=qK 0 2  n   0 m 0m X X X (K + 1) 1 K 2 0 0 | + | + . . . = ψmax |β |β   n K 0m k (K 0 + 1)m k i=1 k:kνk k1 =K 0 +1 k:kνk k1 =K 0  2 n ∞ m X X X 1 R 2  = ψmax |βk0 | m n R i=1 R=K 0 k:kνk k1 =R v 2 v u ∞ uX n ∞ X X X u 1 u 1 2 t t Rm = ψmax |βk0 | 2m n R 0 0 i=1 2 ≤ ψmax M2 ∞ X R=K 0 E R=K R=K k:kνk k1 =R 2 1 M 2 ψmax 1 ≤ . 2m 0 R 2m − 1 (K )2m−1 Proof of Theorem 5.7 Recall that {fbj }pj=1 ∈ F where F is some arbitrary univariate function class . We denote the functions P P fb(x) = pj=1 fbj (xj ) and f 0 (x) = pj=1 fj0 (xj ) for x = [x1 , . . . , xp ]T ∈ Rp . For the proof of Theorem 5.7, λn and ρn are functions of n but for convenience we will simply write λ, ρ. We begin the proof of Theorem 5.7 with a basic inequality. 26 Lemma E.1 (Basic Inequality). For any function f ∗ = (45), we have the following basic inequality Pp ∗ j=1 fj , where fj∗ ∈ F and, the solution fb of p X 1 b 1 kf − f 0 k2n + λIp (fb) ≤ |hε, fb − f ∗ in | + λIp (f ∗ ) + |ε̄| kfbj − fj∗ kn + kf ∗ − f 0 k2n , 2 2 (E.1) j=1 Pn where hε, f in = n1 additive function f . i=1 εi f (xi ), ε̄ = 1 n Pn i=1 εi and Ip (f ) = Pp j=1 I(fj ) = Pp j=1 kfj kn + λΩ(fj ) for an Proof. We have n n i=1 i=1 i2 2 1 Xh 1 X Yi − Ȳ − fb(xi ) + λIp (fb) ≤ Yi − Ȳ − f ∗ (xi ) + λIp (fj∗ ), 2n 2n ⇔ n n i=1 i=1 i2 2 1 X 1 Xh εi + c0 − Ȳ − (fb − f 0 )(xi ) + λIp (fb) ≤ εi + c0 − Ȳ − (f ∗ − f 0 )(xi ) + λIp (fj∗ ) 2n 2n n ⇒ ≤ 2 1 X εi + c0 − Ȳ + (fb − f 0 )2 (xi ) − 2[εi + c0 − Ȳ ](fb − f 0 )(xi ) + λIp (fb) 2n 1 2n i=1 n X  2 εi + c0 − Ȳ + (f ∗ − f 0 )2 (xi ) − 2(εi + c0 − Ȳ )(f ∗ − f 0 )(xi ) + λIp (f ∗ ) i=1 1 ⇒ kfb − f 0 k2n − hε + c0 − Ȳ , fb − f 0 in + λIp (fb) 2 1 ≤ kf ∗ − f 0 k2n − hε + c0 − Ȳ , f ∗ − fb + fb − f 0 in + λIp (f ∗ ) 2 1 ⇒ kfb − f 0 k2n − hε + c0 − Ȳ , fb − f 0 in + λIp (fb) 2 1 ≤ kf ∗ − f 0 k2n − hε + c0 − Ȳ , f ∗ − fbin − hε + c0 − Ȳ , fb − f 0 in + λIp (f ∗ ), 2 which implies 1 b 1 kf − f 0 k2n + λIp (fb) ≤ kf ∗ − f 0 k2n − hε + c0 − Ȳ , f ∗ − fbin + λIp (f ∗ ) 2 2 p X 1 1 ⇒ kfb − f 0 k2n + λIp (fb) ≤ |hε, fb − f ∗ in | + hc0 − Ȳ , fbj − fj∗ in + λIp (f ∗ ) + kf ∗ − f 0 k2n 2 2 j=1 p X 1 1 ⇒ kfb − f 0 k2n + λIp (fb) ≤ |hε, fb − f ∗ in | + |c0 − Ȳ | kfbj − fj∗ kn + λIp (f ∗ ) + kf ∗ − f 0 k2n . 2 2 j=1 Now for the second term note that:   p n n   X X X 1 1 |c0 − Ȳ | = = |ε̄|. (c0 − Yi ) = c0 − c0 − fj0 (xi,j ) − εi   n n i=1 i=1 j=1 Which leads us to p X 1 b 1 kf − f 0 k2n + λIp (fb) ≤ |hε, fb − f ∗ in | + λIp (f ∗ ) + |ε̄| kfbj − fj∗ kn + kf ∗ − f 0 k2n . 2 2 j=1 27 (E.2) Lemma E.2 (Bounding the term |ε̄|). For ε = [ε1 , . . . εn ] such that E(εi ) = 0 and  2 2  K 2 Eeεi /K − 1 ≤ σ02 , (E.3) for all κ > 0 and ρ = κ max n 1 − 2+α r , log p n ! , (E.4)   2 we have that with probability at least 1 − 2 exp − nρ c1 , |ε̄| ≤ ρ, (E.5) for a constant c1 that depends on K and σ0 . Proof. By Lemma 8.2 of van de Geer (2000) (with γn = 1n /n) we have for all t > 0 !   n nt2 1X . P εi ≥ t ≤ 2 exp − n 8(K 2 + σ02 ) i=1 The result follows by setting t = ρ.   q 1 Lemma E.3 (Bounding the term |hε, fb − f ∗ in |). For λ ≥ 4ρ where ρ = κ max n− 2+α , logn p and for some constant κ, if H(δ, {f ∈ F : Ω(f ) ≤ 1}, Qn ) ≤ A0 δ −α ,  we then have with probability at least 1 − c2 exp −c3 nρ2 |hε, fbj − fj∗ in | ≤ ρkfbj − fj∗ kn + ρλΩ(fbj − fj∗ ), (E.6) (E.7) for all j = 1, . . . , p and positive constants c2 and c3 . Proof. Firstly, for F0 = {f ∈ F : Ω(f ) ≤ 1} we have by assumption a δ cover f1 , . . . , fN such that for all f ∈ F0 we have minj∈{1,...,N } kfj −f kn ≤ δ. Now we are interested in the set F0,λ = {f ∈ F : λΩ(f ) ≤ 1}. Firstly, for a function f ∈ F0,λ , min j∈{1,...,N } kf − fj /λkn = 1 δ kλf − fj kn ≤ , λ j∈{1,...,N } λ min because Ω(λf ) = λΩ(f ) ≤ 1 ⇒ λf ∈ F0 . This means that the set {f1 /λ, . . . , fN /λ} is a δ/λ cover of the set F0,λ . This implies that H(δ, F0 , Qn ) ≤ A0 δ −α ⇒ H(δ/λ, F0,λ , Qn ) ≤ A0 δ −α or equivalently H(δ, F0,λ , Qn ) ≤ A0 (δλ)−α . Finally, since {f ∈ F : I(f ) ≤ 1} ⊂ {f ∈ F : Ω(f ) ≤ λ−1 } we have H(δ, {f ∈ F : I(f ) ≤ 1}, Qn ) ≤ A0 (δλ)−α ≤ A1 (δρ)−α , since λ−1 ≤ ρ−1 /4. o n √ f We now apply Lemma I.1 to the class I(f : f ∈ F with T = nρ1+α/2 . We have for κ > c2 ) sufficiently large !   1 Pn ε f (x ) nρ2 i j i i=1 n P sup ≥ ρ ≤ c2 exp − 2 , 1−α/2 α/2 c2 fj ∈F kfj kn I (fj ) 28 and by the union bound we have P max |hε, fj in | sup j∈{1,...,p} fj ∈F 1−α/2 α/2 I (fj ) ! ≥ρ kfj kn   nρ2 ≤ pc2 exp − 2 c2   nρ2 ≤ c2 exp − 2 + log p c2    1 log p 2 = c2 exp −nρ − nρ2 c22  ≤ c2 exp −c3 nρ2 , p 1 − log . Finally, we show that c3 > 0. This follows from nρ2 c22 log p 1 2 2 − nρ2 > 0 ⇔ nρ > c2 log p. This holds since nρ2 ≥ κ2 log p and κ > c2 . Thus, c22  probability at least 1 − c2 exp c3 nρ2 for all j ∈ {1, 2, . . . , p} for some constant c3 ≥ the fact that we have with b j in | ≤ ρk∆k b 1−α/2 I α/2 (∆ b j) |hε, fbj − fj∗ in | ≡ |hε, ∆ n ( )α/2 b j) λΩ( ∆ b j kn 1 + b j kn + ρλΩ(∆ b j) , = ρk∆ ≤ ρk∆ b j kn k∆ where the last inequality follows by Bernoulli’s inequality. E.1 Using the Active Set    2 So far we have shown that, for λ ≥ 4ρ, with probability at least 1 − 2 exp − nρ c1 − c2 exp −c3 nρ , the following inequality holds kfb − f 0 k2n + 2λ p X I(fbj ) ≤ 2|hε, fb − f ∗ in | + 2|ε̄| j=1 p X b j kn + 2λ k∆ j=1 p X I(fj∗ ) + kf ∗ − f 0 k2n j=1  p X    p   X  b j kn + 2ρλΩ(∆ b j ) + 2ρ b j kn ≤ 2ρk∆ k∆     j=1 j=1   p  X  + 2λ I(fj∗ ) + kf ∗ − f 0 k2n   j=1 ⇒ kfb − f 0 k2n + 2λ p X I(fbj ) ≤ j=1 p  X j=1  λ2 b ∗ 2 ∗ b λk∆j kn + Ω(∆j ) + 2λkfj kn + 2λ Ω(fj ) + kf ∗ − f 0 k2n . 2 For notational convenience we will exclude the kf ∗ − f 0 k2n term in the following manipulations. If S is the active set then we have on the right hand side,   X X λ b λ b ∗ ∗ b b RHS = λ k∆j kn + Ω(∆j ) + 2kfj kn + 2λΩ(fj ) + λ kfj kn + Ω(fj ) 2 2 j∈S j∈S c   X X λ b λ b ∗ b b b b ≤λ k∆j kn + Ω(∆j ) + 2k∆j kn + 2kfj kn + 2λΩ(fj ) + λ kfj kn + Ω(fj ) 2 2 c j∈S j∈S =3 X j∈S b j kn + 2 λk∆ X j∈S λ2 Ω(fj∗ ) + X 1 X 2 b 1X 2 b λkfbj k + λ Ω(fj ) + 2 λkfbj kn + λ Ω(∆j ), 2 2 c c X j∈S j∈S 29 j∈S j∈S b j kn + kfbj kn . where the inequality holds by the decomposition kfj∗ kn = kfj∗ − fbj + fbj kn ≤ k∆ On the left hand side we have o o Xn Xn LHS = kfb − f 0 k2n + 2λ kfbj kn + λΩ(fbj ) + 2λ kfbj kn + λΩ(fbj ) j∈S c j∈S o o Xn Xn bj kn + λΩ(fbj ) , b j ) − λΩ(f ∗ ) + 2λ ≥ kfb − f 0 k2n + 2λ kfbj kn + λΩ(∆ k f j j∈S c j∈S b j ) since Ω(·) is a semi-norm. where the inequality follows from the triangle inequality Ω(fbj )+Ω(fj∗ ) ≥ Ω(∆ By re-arranging the terms we obtain the inequality  X X X 3λ2 X b 3λ2 b 0 2 b b b j kn + 4λ2 Ω(fj ) + Ω(∆j ) ≤ 3λ k∆ Ω(fj∗ ) + kf ∗ − f 0 k2n kf − f kn + λ kfj kn + 2 2 c j∈S j∈S j∈S j∈S which implies that kfb − f 0 k2n + λ X b j kn + k∆ j∈S c X X 3λ2 X b b j kn + 4λ2 Ω(∆j ) ≤ 3λ k∆ Ω(fj∗ ) + kf ∗ − f 0 k2n . 2 j∈S j∈S (E.8) j∈S This implies the slow rates for convergence for λ ≥ 4ρ and s = |S|   1 b 1 0 2 ∗ kf − f kn + ≤ sλ 3R + 2λ max Ω(fj ) + kf ∗ − f 0 k2n . j 2 2 (E.9) This completes the proof of Theorem 5.7. In the next section we prove the oracle inequality with fast rates via the compatibility condition. E.2 Using the Compatibility Condition Recall the compatibility condition for f = Pp j=1 fj , X whenever kfj kn ≤ 4 j∈S c kfj kn , (E.10) j∈S then we have X X kfj kn ≤ √ skf kn /φ(S). (E.11) j∈S Once we assume the compatibility condition we can prove Corollary 5.7.1 by considering the following two cases. P ∗ b j kn ≥ 4λ2 P Case 1: λ j∈S k∆ j∈S Ω(fj ) in which case we have kfb − f 0 k2n + λ X j∈S c b j kn + k∆ X 3λ2 X b b j kn + kf ∗ − f 0 k2 , Ω(∆j ) ≤ 4λ k∆ n 2 j∈S j∈S 30 P b j (E.10) holds and hence by the compatibility condition we have hence for the function fb − f ∗ = pj=1 ∆ √ 3λ2 X b 4λ s b b k∆j kn + Ω(∆j ) ≤ kf − f ∗ kn + kf ∗ − f 0 k2n 2 φ(S) j∈S j∈S c √ √ 4λ s b 4λ s ∗ 0 ≤ kf − f kn + kf − f 0 kn + kf ∗ − f 0 k2n φ(S) φ(S) ! ( √ )  √   kfb − f 0 kn 2λ s 2λ 2s √ +2 ≤2 kf ∗ − f 0 kn + kf ∗ − f 0 k2n φ(S) φ(S) 2 kfb − f 0 k2n + λ X 4λ2 s 4λ2 (2s) kfb − f 0 k2n + + + kf ∗ − f 0 k2n + kf ∗ − f 0 k2n φ2 (S) 2 φ2 (S) 12λ2 s kfb − f 0 k2n ≤ 2 + + 2kf ∗ − f 0 k2n , φ (S) 2 ≤ where we use the inequality 2ab ≤ a2 + b2 and this implies that 2 X 2 X 1 b b j kn + 3λ b j ) ≤ 12sλ + 2kf ∗ − f 0 k2n . kf − f 0 k2n + λ k∆ Ω(∆ 2 2 φ2 (S) c j∈S Case 2: λ P j∈S b j kn ≤ 4λ2 k∆ kfb − f 0 k2n + λ Ω(fj∗ ) in which case we have P X (E.12) j∈S j∈S b j kn + k∆ j∈S c X 3λ2 X b Ω(fj∗ ) + kf ∗ − f 0 k2n Ω(∆j ) ≤ 16λ2 2 j∈S ≤ j∈S 2 16sλ max Ω(fj∗ ) j + kf ∗ − f 0 k2n , which implies 2 X X 1 b b j kn + 3λ b j ) ≤ 16sλ2 max Ω(f ∗ ) + 2kf ∗ − f 0 k2 . kf − f 0 k2n + λ k∆ Ω(∆ j n j 2 2 c j∈S F (E.13) j∈S Constraining the hierbasis Penalty Region Recall the following definitions ( w HK n β∈R = Kn : Kn X ) wk kβk:Kn k2 ≤ 1 , and (F.1) k=1 ( w EK = n β ∈ RKn : Kn X ) βk2 (w1 + . . . + wk )2 ≤ 1 . (F.2) k=1 w and E w as defined in (F.1) and (F.2), respectively, we have H w ⊆ Lemma F.1. For the regions HK Kn Kn n w for all n ≥ 1 and non-negative weights. EK n 31 Proof. It is sufficient to show Kn X PKn 2 k=1 βk (w1 !2 wk kβ k:Kn k2 = Kn X + . . . + wk ) 2 ≤ = Kn X Kn k=1 wk kβk:Kn k2 X 2 wm kβm:Kn k22 + 2 m=1 k=1 P 2 . We now have wk wm kβm:Kn k2 kβk:Kn k2 m<k 2 wm m=1 Kn X βl2 + 2 l=m X wk wm kβk:Kn k22 m<k kβm:Kn k kβ n k | k:K {z } ≥1 ≥ = = Kn X Kn X 2 2 wm βl 1[l ≥ m] + 2 l=1 m=1 Kn l X X 2 2 wm βl m=1 l=1 Kn X l=1 βl2 l X +2 Kn X l=1 2 +2 wm m=1 βl2 Kn X k−1 X wk wm k=2 m=1 K k−1 n X X Kn X βl2 1[l ≥ k] l=1 wk wm 1[l ≥ k] k=2 m=1 l X k−1 X k=2 m=1 ! wk wm = Kn X l X βl2 !2 wm . m=1 l=1 w as defined in (F.1), we have the inclusion Bw ⊂ H w where Lemma F.2. For the region HK Kn Kn n ( Bw Kn = β ∈ RKn : Kn X ) βk2 ≤ (w1 + . . . + aKn )−2 . (F.3) k=1 w Proof. Let β ∈ Bw Kn and we for brevity we denote k · k = k · k2 . Then for β ∈ BKn 1 ≥ kβk (w1 + w2 + . . . + wKn )   kβ1:Kn k kβ2:Kn k kβKn :Kn k 2 ≥ kβk w1 + w2 + . . . + wKn kβ1:Kn k kβ1:Kn k kβ1:Kn k = w1 kβ1:Kn k + w2 kβ2:Kn k + . . . + wKn kβKn :Kn k, w . which implies that β ∈ HK n In Figure F.1, we demonstrate the above two lemma’s for Kn = 2 for the special case of wk = k m − (k − 1)m . G Some Entropy Results for Ellipsoids In this section we establish some entropy results for the ellipsoid (C.2) and the circle (F.3) which will w . allow us to establish entropy rates for the hierbasis, penalty region HK n Since Kn can potentially be ∞ (or arbitrarily large), we need a way to handle this dimension. It turns out that this can be done using a simple argument which we demonstrate in the following theorem. G.1 An Upper Bound w satisfies the Theorem G.1. (Dumer, 2006) For any θ ∈ (0, 1/2), the δ-entropy of the ellipsoid EK n following inequality ! d−1 X 1 w + µθ log(3/θ) , (G.1) H(δ, EKn ) ≤ log Pk δ l=1 wl k=1 32 −0.5 0.0 0.5 1.0 1.0 −1.0 −0.5 0.0 beta2 0.5 1.0 −1.0 −0.5 0.0 beta2 0.5 1.0 0.5 0.0 beta2 −0.5 −1.0 −1.0 −1.0 beta1 −0.5 0.0 0.5 1.0 −1.0 −0.5 beta1 0.0 0.5 1.0 beta1 Figure F.1: Demonstration of Lemma F.1 and Lemma F.2 for the special case of wk = aj, m = k m −(k−1)m and Kn = 2. We have in blue ( ) the region E2w , C2w in red ( ) and H2w in black (——-). From left to right we have the plots for m = 0.5, 1 and 1.5. √ where µθ ≤ Kn is the largest integer such that w1 + . . . + wµθ < ( 1 − θδ)−1 and d ≤ Kn + 1 is the largest w ) = 0 holds trivially. integer such that w1 + . . . + wd−1 ≤ δ −1 . If δ −1 ≤ w1 then H(δ, EK n Corollary G.1.1 (Sobolev Ellipsoids). For Theorem G.1, let wk = k m − (k − 1)m . Then we have the following upper bound: w H(δ, EK ) ≤ UE δ −1/m , (G.2) n for some constant UE which only depends on m and θ. Proof. Firstly, we note that with this definition of wk , we can let Kn = ∞. Thus if we can show that w ) ≤ U δ −1/m then the result follows since E w ⊂ E w for all K < ∞. H(δ, E∞ n ∞ Kn Now we have w1 + . . . + wµθ = µm θ , hence δ −1 µm ⇒ µθ log(3/θ) < log(3/θ) θ < √ 1−θ  δ −1 √ 1−θ 1/m 1 = U1 δ − m . Now for the second part we use the fact that w1 + . . . + wd−1 = (d − 1)m ≤ δ −1 < dm and we obtain     d−1 X 1 1 −1 = (d − 1) log(δ ) + log ≤ δ −1/m log(δ −1 ) − m log {(d − 1)!} log δj m {(d − 1)!}m j=1 h i h i ≤ δ −1/m log(δ −1 ) − mδ 1/m log {(d − 1)!} ≤ δ −1/m log(dm ) − mδ 1/m log {(d − 1)!}   ≤ δ −1/m m log(d) − d−1 log{(d − 1)!} . Now by sterling’s inequality we have for all d ∈ {1, 2, . . .} √  log 2πdd+1/2 e−d log(d!) log(d + 1) − ≤ log(d + 1) − d+1 d+1 √ d log( 2π) d + 1/2 = log(d + 1) + − − log(d) d+1 d+1 d+1 d + 1 − 1 + 1/2 ≤ log(d + 1) + 1 − log(d) d+1   d+1 log(d) = 1 + log + (1/2) d d+1   1 log(d) ≤ 1 + log 1 + + (1/2) ≤ 1 + log(2) + 1. d d+1 33 This implies that d−1 X j=1  log 1 δj m    ≤ δ −1/m m log(d) − d−1 log{(d − 1)!} ≤ U2 δ −1/m . Corollary G.1.2 (Multivariate hierbasis). For Theorem G.1, let wqk = k m − (k − 1)m where for a fixed   P k+p−1 and all other wk = 0. Then we have the following = dimension p we define qk = kl=1 l+p−2 p l−1 upper bound: w H(δ, EK ) ≤ UE δ −p/m , (G.3) n for some constant UE which only depends on m and θ. Proof. Firstly, since w1 = 1 the entropy is 0 for δ ≥ 1 and hence we will restrict ourselves to δ ∈ (0, 1). We note that we must have µθ = qk1 − 1 for some integer k1 . This is because all weights after qk1 −1 are zero until wqk . Now we have by definition  √ −1 w1 + . . . + wqk1 −1 = (k1 − 1)m ≤ δ 1 − θ , and we have   k1 + p − 1 (k1 + p − 1)p µ θ = qk 1 − 1 = −1< p p! n √ n √ op op −1/m −1/m p δ− m +p 1−θ + pδ 1/m δ 1−θ = ≤ p! p! n √ op −1/m 1−θ +p p ≤ δ− m , p!  where the second line follows from the inequality nk ≤ nk /k!. This implies that for δ ∈ (0, 1) p µθ log(3/θ) ≤ U1 δ − m . Similarly, there is an integer k2 such that d − 1 = qk2 − 1. Which means that (k2 − 1)m ≤ δ −1 ≤ k2m . For the other term we have ! ( ) Pd−1 Pk d−1 X 1 −1 k=1 log( l=1 al ) = (d − 1) log(δ ) − log Pk d−1 δ a l l=1 k=1   (q2 − 1) log(1m ) + (q3 − q2 ) log(2m ) + . . . + (qk2 − 1 − qk2 −1 ) log(qkm2 −1 ) −1 = (d − 1) log(δ ) − d−1   m{f (k2 ) − log(qk2 −1 )} = (d − 1) log(δ −1 ) − , d−1 P 2 where f (k2 ) = (q2 − 1) log(1) + (q3 − q2 ) log(2) + . . . + (qk2 − qk2 −1 ) log(qk2 −1 ) = kl=1 (ql − ql−1 ) log(ql−1 ). Hence we have !   d−1 X 1 m{f (k2 ) − log(qk2 −1 )} m log ≤ (d − 1) log(k2 ) − P d−1 δ kl=1 al j=1   f (k2 ) − log(qk2 −1 ) = m(d − 1) log(k2 ) − . qk2 − 1 34 Now by induction we can show that f (k2 )−log(qk2 −1 ) qk2 −1 ≥ log{(k2 −1)!} k2 which implies that     f (k2 ) − log(qk2 −1 ) log{(k2 − 1)!} m(d − 1) log(k2 ) − ≤ m(d − 1) log(k2 ) − qk2 − 1 k2 ≤ (d − 1)m {2 + log(2)} . Finally, we note that  d − 1 = qk2 − 1 =    k2 + p − 1 k2 + p − 1 −1< p p p 1 + pδ 1/m (δ −1/m + p)p (k2 + p − 1)p ≤ = δ− m ≤ p! p! p! H p p ≤ δ− m (1 + p)p . p! Proof of Theorem 5.2 Proof. By definition 1 b 1 kf − yk2n + λ2n Ω(fb|Qn ) ≤ kfn∗ − yk2n + λ2n Ω(fn∗ |Qn ), 2 2 which leads to the following inequality 1 b 1 kf − f 0 k2n + λ2n Ω(fb|Qn ) ≤ |hε, fb − fn∗ in | + kfn∗ − f 0 k2n + λ2n Ω(fn∗ |Qn ) , (H.1) 2 2 P where hε, f in = n1 ni=1 εi f (xi ). Via the simple decomposition kfb − fn∗ k2n ≤ 2kfb − f 0 k2n + 2kf 0 − fn∗ k2n we obtain 1 b kf − fn∗ k2n + λ2n Ω(fb|Qn ) ≤ kfb − f 0 k2n + kf 0 − fn∗ k2n + 2λ2n Ω(fb|Qn ) 2   1 b = kf 0 − fn∗ k2n + 2 kf − f 0 k2n + λ2n Ω(fb|Qn ) 2   1 ∗ 0 2 2 ∗ 0 ∗ 2 ∗ b ≤ kf − fn kn + 2 |hε, f − fn in | + kfn − f kn + λn Ω(fn |Qn ) 2 ∗ 2 ∗ = 2|hε, fb − fn in | + 2λn Ω(fn |Qn ) + kf 0 − fn∗ k2n n o ≤ max 4|hε, fb − fn∗ in | + 4λ2n Ω(fn∗ |Qn ), 2kf 0 − fn∗ k2n . Thus our basic inequality is given by n o 1 b kf − fn∗ k2n + λ2n Ω(fb|Qn ) ≤ 2 max 2|hε, fb − fn∗ in | + 2λ2n Ω(fn∗ |Qn ), kf 0 − fn∗ k2n . 2 (H.2) Hence from the basic inequality either 12 kfb − fn∗ k2n + λ2n Ω(fb|Qn ) ≤ 2kf 0 − fn∗ k2n which implies the result or 1 b kf − fn∗ k2n + λ2n Ω(fb|Qn ) ≤ 4hε, fb − fn∗ in + 4λ2n Ω(fn∗ |Qn ) . 2 Now note that H(δ, {f ∈ Fn : Ω(f |Qn ) ≤ 1}, Qn ) ≤ A1 δ −α implies     f − fn∗ e1 δ −α . : f ∈ Fn , Qn ≤ A H δ, Ω(f |Qn ) + Ω(fn∗ |Qn ) 35 (H.3) (H.4) Thus we invoke Lemma 8.4 of van de Geer (2000) and conclude that with probability at least 1 − 2 c exp{− Tc2 } for constants c and T ≥ c, we have n oα T 1− α 2 |hε, fb − fn∗ in | ≤ √ kfb − fn∗ kn 2 Ω(fb|Qn ) + Ω(fn∗ |Qn ) . n (H.5) Define the set T as ( T = sup (ε, f − f ∈Fn fn∗ )n α T 1− α ≤ √ kf − fn∗ kn 2 {Ω(f |Qn ) + Ω(fn∗ |Qn )} 2 n ) , (H.6) then on the set T we have n oα 1 b T 1− α 2 + 4λ2n Ω(fn∗ |Qn ) . kf − fn∗ k2n + λ2n Ω(fb|Qn ) ≤ 4 √ kfb − fn∗ kn 2 Ω(fb|Qn ) + Ω(fn∗ |Qn ) 2 n Which means we have either 1 b kf − fn∗ k2n + λ2n Ω(fb|Qn ) ≤ 8λ2n Ω(fn∗ |Qn ), 2 (H.7) n oα T 1 b 1− α 2 kf − fn∗ k2n + λ2n Ω(fb|Qn ) ≤ 8 √ kfb − fn∗ kn 2 Ω(fb|Qn ) + Ω(fn∗ |Qn ) . 2 n (H.8) which is of the desired form or We now consider (H.8) only. H.1 Case 1: Ω(fb|Qn ) ≥ Ω(fn∗ |Qn ) In this case we have n oα 1 b T 1− α 2 . kf − fn∗ k2n + λ2n Ω(fb|Qn ) ≤ 8 √ kfb − fn∗ kn 2 2Ω(fb|Qn ) 2 n which gives us n oα T 1− α 2 λ2n Ω(fb|Qn ) ≤ 8 √ kfb − fn∗ kn 2 2Ω(fb|Qn ) n n o1− α α α 1 2 ∗ 1− 2 b ⇔ Ω(fb|Qn ) ≤ 23+ 2 T n− 2 λ−2 n kf − fn kn   2 α 1 2−α ⇔ Ω(fb|Qn ) ≤ 23+ 2 T n− 2 λ−2 kfb − fn∗ kn . n Plugging this into the right hand side of (H.9) and solving for kfb − fn∗ kn we obtain  2 α  1 1 α α 1 b 1− α 2−α 2 kf − fn∗ k2n ≤ T 23+ 2 n− 2 kfb − fn∗ kn 2 23+ 2 T n− 2 λ−2 kfb − fn∗ kα/2 ⇒ n n 2 6+α 2 1 − 2α 1 b kf − fn∗ kn ≤ T 2−α 2 2−α n− 2−α λn 2−α ⇒ 2 2 − 4α 1 b kf − fn∗ k2n ≤ C1 n− 2−α λn 2−α = C1 λ2n Ω(fn∗ |Qn ) , 2 4 14+α 1 2−α 2+α {Ω(f ∗ |Q )} 2(2+α) . where C1 = T 2−α 2 2−α and recall the definition λ−1 n n =n n 36 (H.9) H.2 Case 2: Ω(fb|Qn ) ≤ Ω(fn∗ |Qn ) In this case we have α 1 b T 1− α kf − fn∗ k2n + λ2n Ω(fb|Qn ) ≤ 8 √ kfb − fn∗ kn 2 {2Ω(fn∗ |Qn )} 2 . 2 n (H.10) From which we directly get 1 b kf − fn∗ k2n 2 1 b 1+ α kf − fn∗ kn 2 2 kfb − fn∗ kn 1 b kf − fn∗ k2n 2 4 1− α 2 1 ≤ 8T n− 2 kfb − fn∗ kn α 1 α α {2Ω(fn∗ |Qn )} 2 ⇒ ≤ 23+ 2 T n− 2 {Ω(fn∗ |Qn )} 2 ⇒ 8+α 2 1 α ≤ 2 2+α T 2+α n− 2+α {Ω(fn∗ |Qn )} 2+α ⇒ 2α 2 ≤ C2 n− 2+α {Ω(fn∗ |Qn )} 2+α = C2 λ2n Ω(fn∗ |Qn ), 14+α where C2 = T 2+α 2 2+α . Thus we have shown that on the set T we have 1 b kf − fn∗ k2n ≤ max{8, C1 , C2 }λ2n Ω(fn∗ |Qn ) = C0 λ2n Ω(fn∗ |Qn ). 2  2 We have shown that with probability at least 1 − c exp − Tc we have the inequality  1 b kf − fn∗ k2n ≤ max 2kf 0 − fn∗ k2n , C0 λ2n Ω(fn∗ |Qn ) 2 (H.11) (H.12) To complete the proof we note that 1 b kf − f 0 k2n ≤ kfb − fn∗ k2n + kfn∗ − f 0 k2n 2  ≤ 2 max 2kf 0 − fn∗ k2n , C0 λ2n Ω(fn∗ |Qn ) + kfn∗ − f 0 k2n  5 ≤ max 2kf 0 − fn∗ k2n , C0 λ2n Ω(fn∗ |Qn ) . 2 I Variation of Lemma 8.4 of van de Geer (2000) Lemma I.1. Assume that supf ∈F kf kQn ≤ R for some univariate function class F. Given the entropy bound H(δ, F, Qn ) ≤ A0 (δρ)−α , (I.1) for some α ∈ (0, 2) and constant A0 and that  2 2  max K 2 Eeεi /K − 1 ≤ σ02 . i=1,...,n Then for some constant c depending on A0 , α, K and σ0 , we have for all T ≥ c,     1 Pn −α/2 ρ T 2 ρ−α i=1 εi f (xi ) n   ≥T √ ≤ c exp − . P sup 1−α/2 c2 n f ∈F kf kQn 37 (I.2) (I.3) Proof. We have Z δ H 1/2 (u, G, Qn ) du ≤ A1 γ −α/2 δ 1−α/2 . 0 For C1 ≥ 1 by Corollary 8.3 of van de Geer (2000) we have, n P sup g∈G,kgkQn ≤δ 1X γ −α/2 εi g(xi ) ≥ 2CC1 A1 √ δ 1−α/2 n n !  ≤ C exp −C12 A21 δ −α γ −α . i=1 Now we apply the peeling device (see van de Geer (2000)) to the class G. Let T = 2C1 CA1 21−α/2 ,     ∞ 1 Pn 1 Pn −α/2 −α/2 [ εi g(xi ) γ γ i=1 εi g(xi ) n ≥T √ =P ≥T √  P sup n i=11−α/2 sup 1−α/2 n n R R g∈G kgkQn kgkQn s=1 g:g∈G, 2s ≤kgkQn ≤ 2s−1     ∞ n X 1X γ −α/2 R 1−α/2   √ ≤ P sup εi g(xi ) ≥ T n 2s n R g:g∈G,kgkQn ≤ s−1 s=1 i=1 2    1−α/2 n ∞ −α/2 X X 1 R T γ  εi g(xi ) ≥ √ 1−α/2 = P sup n 2s−1 n2 R g:g∈G,kgk ≤ Q s=1 i=1 n 2s−1   1−α/2  ∞ n −α/2 X X 1 γ R  = P sup εi g(xi ) ≥ 2C1 CA1 √ n 2s−1 n R g:g∈G,kgkQn ≤ s−1 s=1 i=1 2 (  −α ) X ∞ ∞ n o X  R 2 2 −s+1 −α −α −α ≤ C exp −C12 A21 γ −α = C exp −C A 2 R γ 1 1 2s−1 s=1 s=1   T 2 γ −α ≤ c exp − . c2 38
10math.ST
(version 17 March 2015) How the Symbol Grounding of Living Organisms Can Be Realized in Artificial Agents J. H. van Hateren [email protected] Johann Bernouilli Institute for Mathematics and Computer Science University of Groningen, P.O. Box 407, 9700 AK Groningen, The Netherlands Abstract A system with artificial intelligence usually relies on symbol manipulation, at least partly and implicitly. However, the interpretation of the symbols – what they represent and what they are about – is ultimately left to humans, as designers and users of the system. How symbols can acquire meaning for the system itself, independent of external interpretation, is an unsolved problem. Some grounding of symbols can be obtained by embodiment, that is, by causally connecting symbols (or sub-symbolic variables) to the physical environment, such as in a robot with sensors and effectors. However, a causal connection as such does not produce representation and aboutness of the kind that symbols have for humans. Here I present a theory that explains how humans and other living organisms have acquired the capability to have symbols and sub-symbolic variables that represent, refer to, and are about something else. The theory shows how reference can be to physical objects, but also to abstract objects, and even how it can be misguided (errors in reference) or be about non-existing objects. I subsequently abstract the primary components of the theory from their biological context, and discuss how and under what conditions the theory could be implemented in artificial agents. A major component of the theory is the strong nonlinearity associated with (potentially unlimited) self-reproduction. The latter is likely not acceptable in artificial systems. It remains unclear if goals other than those inherently serving selfreproduction can have aboutness and if such goals could be stabilized. 1. Introduction Much of artificial intelligence relies on manipulating symbols. Even a system that relies mostly on connectionist processing of sub-symbolic variables (e.g., Brooks, 1991) must ultimately be interpreted symbolically, such as when a human judges its performance in terms of whether it relates inputs to outputs in a meaningful way. Transforming meaningful inputs into meaningful outputs is a symbolic transformation. Newell and Simon (1976) conjectured that information processing by a physical symbol system is all that is needed for producing general intelligent action of the kind humans produce. Physical symbols, such as present in the physical patterns within a computing machine, can be regarded as forming a formal system. Searle (1980) questioned the sufficiency of formal systems for producing some of the major characteristics that symbols, and combinations of symbols, have for humans. Symbols, as used for example in human language, typically refer to something else that does not need to resemble the symbol. For example, the word “tree” can refer to an actual tree that has no resemblance to the word. Symbols therefore refer in an arbitrary way, only agreed upon by convention. In addition, human symbols are typically vague and ambiguous, with their meaning shifting depending on context. The word “tree” can mean quite different things to a forester, a genealogist, or a computer scientist. Even within a particular field, symbols get many different interpretations depending on context. But the most puzzling aspect of symbols is their capability to be about something else, even if this something else is not concrete like a specific tree, but quite abstract like a tree in general or very abstract like the concept “danger”. The aboutness (the being about and referring to) of symbols as used by humans, and the VAN HATEREN apparent lack of aboutness of symbols in artificial systems, was Searle's main argument to question the sufficiency of physical symbol systems for obtaining general, human-level intelligence. Harnad (1990) discussed the arbitrariness of symbols in a purely formal system as the “symbol grounding problem”, the problem that in a formal system it is not clear how symbols can unequivocally connect to physical reality. The proposed solution was to use a connectionist system as intermediate between the formal system and sensory data. A material system with sensors and possibly effectors, as in a robot, can produce a causal connection between external reality and internal symbolic processing, by embodying the symbols. In a way, this was already discussed as the “robot reply” by Searle (1980, p. 420), and deemed not sufficient for solving the problem of aboutness (also known as “intentionality” in philosophical jargon). “Symbol grounding” as defined by Harnad (1990) is focused on physical reference, which does not specifically aim to solve the general problem of aboutness (Rodríguez et al., 2012). In this article I use “symbol grounding” in a wider sense (following Sun, 2000), thus including the grounding of reference (aboutness) in the more general sense. Symbol grounding for artificial systems then becomes the problem of how to produce reference for and meaning within an artificial agent without meaning being parasitic on human interpretation. Although many solutions have been proposed, often by combining symbolic with connectionist processing, none appear to really solve the problem of aboutness (for reviews see Ziemke, 1999; Taddeo & Floridi, 2005; Rodriguez et al., 2012; Coradeschi et al., 2013; Bielecka, 2015). Recent theoretical and computational work has produced a plausible explanation of how aboutness and symbols have evolved in living organisms in general and humans in particular (van Hateren, 2014, 2015). Below I will start with reviewing this theory, and explain the mechanisms involved. I will then abstract these mechanisms from their biological context, and formulate them in a form that is independent of a specific material implementation. I will subsequently discuss the prospects for copying such mechanisms into artificial agents, and identify the primary problems that would need to be solved for accomplishing that. 2. Biological Symbol Grounding Understanding how aboutness has likely arisen in organic evolution requires appreciating three key notions. The first is that the basic Darwinian theory of differential reproduction (organisms equipped to reproduce more effectively than others are likely to become dominant, that is, they appear to be naturally selected) has an extension that depends on the organism establishing an internal model of its capability to reproduce. The second notion is that the specific, stochastic role of this internal model produces a connection between internal and external variables that is indirect; it represents rather than causally connects, thus producing a primordial form of aboutness. The third notion is that communication between organisms can reduce the ambiguity that results from combining such internal variables into abstract symbols. The three sections below explain these notions. 2.1 E xtending Basi c Darw inian E volution The basic Darwinian theory of evolution by natural selection consists of a reproductive loop (loop R in Figure 1) where an organism (called agent below) produces offspring that incorporates slight structural changes. The rate of reproducing is given by a quantity called fitness (ftrue in the figure). Fitness is taken here as an expected rate of reproduction (i.e., number of offspring per unit of time), with the actual number of offspring the stochastic (random) realization of the rate as integrated over the lifetime of the 2 SYMBOL GROUNDING OF LIVING AND ARTIFICIAL AGENTS Figure 1: Basic Darwinian theory and extension; agents reproduce in a reproductive loop (R) depending on a reproduction rate ftrue, while an agent-made estimate fest of ftrue stochastically drives structural, behavioral changes (hereditary and learned) in an agent's goal-directed loop (G); fest is about ftrue agent. In evolutionary biology, fitness is often measured, empirically and retrospectively, as a simple parameter estimated by counting offspring. However, for the purpose of modeling and prediction, fitness should be seen as the result of a complex dynamical process, also denoted by the term fitness (then more akin to a function, which has a value, form, and argument(s)). This fitness process has the timevarying properties of the environment and the agent (including its memory) as inputs and the expected reproduction rate as output. The output will vary continually and instantly, for example temporarily dropping at times when resources are scarce, recovering when resources become abundant, and finally going to zero when the agent dies. The structure (form) of ftrue can be extremely complex for complex agents in a natural environment. When ftrue or its internal estimate are mentioned below, this refers either to their value or to their structure, which either will be clear from the context or will be specified explicitly. Agents typically occupy an environment that continually and unpredictably changes and they compete with one another because of limited resources, such as limited materials, limited energy, and limited space. Environmental change and competition tend to drive fitness down, and only by changing, and thereby improving their fitness, agents and lineages can survive. Such changes can take place not only over evolutionary time (across generations, such as in the form of mutations), but also within the lifetime of a single agent through learning, resulting in behavioral change. Although the latter changes usually are not transferred to offspring (unless there is cultural transfer), learning still influences fitness as defined here as an instantly varying rate of reproduction. It is important to stress that the power of the Darwinian process originates from the fact that reproduction is a multiplicative process: when fitness is above the replacement level, growth in numbers will be very fast (exponential). On the other hand, when fitness remains below the replacement level for a particular line of descending agents, that lineage will eventually become extinct. In addition to the basic Darwinian process, directly depending on ftrue, there is a second process that can promote evolutionary success by utilizing fitness indirectly (van Hateren, 2015). This is illustrated by the G loop in Figure 1. The basic idea is that some of the structural changes in agents (either across generations or within their lifetime) are controlled by an internal estimate of their own fitness produced within the agents themselves. Such an estimate, called fest in Figure 1, subsequently drives the variance of structural change (called “variation” in the figure) in an inverse way depending on the value of fest (symbolized by ~1/fest in the figure; the precise form is subject to evolutionary optimization). The traces 3 VAN HATEREN to the right illustrate how this works: a non-negative variable (lower trace) modulates the variance of a stochastic process (upper trace). This way of causing change is therefore midway between regular deterministic causation (the usual way things are modeled in science) and regular stochastic causation (e.g., letting a random generator drive downstream effects). The key point here is that the noise is not added to a deterministic variable, but is multiplied by it. As noted above, fitness can best be seen as a process (in the case of fest a physiological process within the agent), with as output a rate of reproduction (in the case of fest an estimated rate of reproduction). However, the value of fest is taken to be present not explicitly (as a specific physiological variable) but only implicitly, in a distributed way within the agent. Similarly, producing structural change in the agent is also seen as a distributed process. When there are many different structures (behaviors) that could be changed, then the partial fitness effects of the inputs to fest and the outputs to structural change would need to be taken into account such that the changes are weighted properly. The required system would be very hard to design from first principles, but should be readily amenable to evolutionary optimization. The theory has been shown to work in evolutionary simulations (van Hateren, 2015), for structural changes at evolutionary as well as agential timescales. The reason it works can be understood intuitively as follows. When ftrue is high, fest is likely to be high as well because it is assumed to be a reasonable estimate of ftrue. When fitness is high, things are going well for the agent, and there is no reason to change much – just a little variation would be beneficial to facilitate future adaptation to environmental change. Thus when fitness is high, variation should be low. But when fitness is low, the agent is in trouble, and not changing (thereby likely maintaining low fitness for the agent and its descendants) is likely to lead to death and extinction, at least on average. Then it is a better strategy to increase variation in the hope of finding a variant with higher fitness (“desperate times call for desperate measures”). Because the variation is random, there is a considerable chance that the change will be for the worse, subsequently increasing variation even more (the G loop acts continually, and a change for the worse will decrease fest and thereby increase variation). However, when a variant with higher fitness is encountered by chance, variation will be strongly reduced (because of the ~1/fest). Then the agent will remain close to this beneficial state, drifting away only slowly, at least until environmental change reduces the fitness and things start over again. The G loop is therefore an adaptive optimization process. The reason it works is that the low probability of success (when changing randomly) is compensated, on average, by the prospect of exponential growth when fitness becomes high enough. The mechanism of the G loop uses only random change and thus only concerns structural change where the effects on fitness cannot be foreseen. Yet, there are many cases where the effects of structural change can be foreseen, at least partly. Foresight is possible, for example, when knowledge about similar situations in the past is available in genetic memory (as established through previous natural selection) or in behavioral memory (as established through previous learning, or perhaps obtained by cultural transmission). The agent should obviously make use of foreseeable benefits to fitness, automatically. No fest-driven stochastic variation is needed for that. The G loop of Figure 1 should handle only those parts of structural change that have unknown effects. Although any internally generated behavior by an agent could be seen as agency in the wide sense, the specific behavior produced through the G loop can be seen as agency in the narrow sense. Agency in the narrow sense involves an internal, intrinsic overall goal of the agent (the goal of obtaining high fest) in addition to a rather special stochastic process for generating behavior. This process generates new 4 SYMBOL GROUNDING OF LIVING AND ARTIFICIAL AGENTS Figure 2: Expansion of the relationship between fest and ftrue into factors e deriving from the environment E, factors a deriving from the agent A, and irrelevant factors i (for fest only) internal structure (and the behavior that derives from that) in an unpredictable way (because of the stochasticity) without being completely random (because the stochasticity is continually driven by the overall goal of high fest). Elsewhere I argue that this agency in the narrow sense is the source of the intrinsic goal-directedness and behavioral freedom that living organisms appear to have (van Hateren, 2013). For the topic of this article, the most interesting part of the theory in Figure 1 is the establishment of reference and aboutness, at least in primordial form. The internal fest is somewhat arbitrary, because the factors that are taken into account for making a reasonable estimate of the value of ftrue are not fixed, and indeed are likely to vary between members of the same species. Moreover, fest itself is part of the agent, which implies that also fest is subject to structural change through evolution and learning. Nevertheless, fest still must refer to ftrue, be about ftrue, because agents that completely lack this connection are very unlikely to exist. They would not have survived previous natural selection, because they would have been outcompeted by agents with adequate fest. Even weak (inaccurate) aboutness has low probability, because such agents would at best belong to a small minority heading for extinction. As I will argue in the next two sections, the fact that fest stands for, refers to, and is about ftrue is the source of all aboutness of specific variables and symbols in the agent. 2.2 Details of Aboutness Both ftrue and fest have a complex structure, as illustrated in Figure 2. As mentioned above, ftrue arises in nature through the interaction of environmental factors (ej, arising from the environment E) and agential factors (aj, arising from the agent A). Together these factors, and their history up to the present (such as retained indirectly in the genetic or learned memory of agents), physically cause ftrue in a rather complex way. Also fest is likely to have a complex structure. Although a complete model of ftrue is infeasible for the agent, there is an evolutionary drive to make the modeled fest as good as possible given the resources of the agent. The better the value of fest mimics the value of ftrue, the better the mechanism of the G loop in Figure 1 can work to increase ftrue. The only way by which fest can faithfully mimic the value of ftrue across a wide range of environmental conditions is by mimicking at least some of the structure of ftrue in its own structure, even if only very approximate. 5 VAN HATEREN An agent has no direct access to the factors that may be relevant for modeling fitness. External factors that derive from E must be sampled by environmental sensors. Accessing internal states and processes may also require sensors, or at least specialized subprocesses making implicit estimates of the relevant factors. Together, the estimated environmental factors ej,est and agential factors aj,est are the physical and physiological factors producing (causing) fest, through an internal process in the agent. However, not all of these factors need to be relevant for ftrue, that is, there may be errors in the structure of fest. Such factors (ij,est in the figure) may derive from irrelevant parts of E or A, or perhaps may be primarily random and self-generated. Although there is evolutionary pressure to make fest free from errors, there is no guarantee that fest will be optimal in that sense: evolution only requires “good enough” and not “flawless” or “optimal”. Some errors may be inevitable if they are causally coupled to factors that are more important and if there is no simple (feasible) way by which the agent can separate them. Moreover, what is an error today may turn out to be an asset tomorrow, and vice versa. The aboutness of fest with respect to ftrue (Figure 1) produces the aboutness of factors ej,est and aj,est with respect to corresponding ej and aj (broken arrows in Figure 2). However, this also points to several ways reference can be missing or misdirected. First, there may be relevant factors for ftrue, such as e2 in Figure 2, that are completely missed in the estimated fest – perhaps they were not yet discovered as a factor, or perhaps it would be too complicated and take too many resources to incorporate them. One might call this incomplete or missed reference. Second, an estimate, such as e1,est of e1, may vary in its level of accuracy, or vary in how adequately its functional incorporation in the structure fest reflects its true role in the structure of ftrue. If it is not very accurate, the reference is partial at best. Finally, a factor may be false or irrelevant. In that case, it still refers to ftrue, because it inherits its aboutness from the overall aboutness of fest with respect to ftrue (as depicted in Figure 1). But the reference is then to a wrong or non-existing factor, such as i1 in Figure 2. The aboutness as illustrated in Figure 2 explains several puzzling aspects of aboutness. First, aboutness is different from a simple physical connection, and in fact somewhat fuzzy. Although both ftrue and fest are physically connected to E and A, and thereby indirectly to each other, there is some arbitrariness in this connection because of the (relative) arbitrariness of fest. Complex estimators like fest are likely to be somewhat flexible, with different variants showing similar performance. This implies that the estimates of specific factors, such as e1,est, are also flexible. Aboutness and reference are therefore flexible and fuzzy as well. Another puzzling aspect of aboutness is the fact that it can be in error, pointing to false or even non-existent factors (Christiansen & Chater, 1993; the classical example in mental aboutness is thinking about a non-existing animal like a unicorn). As can be seen, this possibility of error is built into the concept right at the low level of the factors depicted in Figure 2. How low-level factors can be combined into high-level symbols, and how these symbols can be stabilized, is discussed in the section below. 2.3 Stabilization of Symbols A primary problem for an agent is that a literal model of ftrue is infeasible for any realistic situation, when a complex agent has to deal with a natural environment filled with other complex agents. Constructing an fest that is sufficiently adequate for the G loop of Figure 1 therefore requires heuristic strategies, using short-cuts and rules of thumb. One strategy that is likely to be useful is combining elementary factors of E and A into more abstract compounds that can be tested for actual utility. For example, several factors (or compounded factors) may be combined into a compounded factor signifying “danger”. Such a compounded factor may be useful when it approximately corresponds to a conjectured compounded 6 SYMBOL GROUNDING OF LIVING AND ARTIFICIAL AGENTS Figure 3: Elementary factors constituting fest can be compounded into symbols S, which can be synchronized and aligned by communication between agents factor of ftrue that explains why ftrue decreases when “danger” increases – recall that ftrue is the expected rate of reproduction, which indeed temporarily decreases during danger, even when the danger, in retrospect, did not actually result in damage and the realized rate of reproduction was not compromised. Heuristic strategies may thus utilize rather abstract and somewhat fuzzy factors. Conventionally, such factors are called symbols. Symbols are about corresponding aspects of ftrue, and thereby indirectly about the reality of E and A as causally connected to ftrue. For example, the agent on the left in Figure 3 has formed a symbol S1 (signifying "danger" for that agent) from several simpler factors. Such factors may include irrelevant ones, that is, factors that the agent believes to signify danger without them actually doing so. Symbols formed by a single agent are likely to be somewhat arbitrary, because there are many ways to identify and combine factors contributing to a symbol like danger. There are also many ways to include irrelevant or marginally relevant factors. Single agents have only limited opportunities and resources to verify the accuracy and effectiveness of such symbols. In species that are sufficiently social and cooperative, there may be an evolutionary advantage to communicate symbols, for example a symbol signifying impending danger. However, communicating symbols is only useful if the symbols of different agents are approximately aligned. Therefore, communication will drive synchronization and stabilization of symbols (Steels, 2008). For example, the agent on the right in Figure 3 has a symbol S1' that signifies for that agent “danger” in a roughly similar, but not identical way as S1 for the left agent. If communicating “danger” produces, on average, joint fitness benefits for both agents, then there is an incentive to synchronize the composition of the symbols, by reducing the differences and perhaps getting rid of clearly irrelevant factors. Moreover, the utility of the symbol thus defined for modeling the typical ftrue of the agents' species is more easily checked if many agents are sharing the symbol. This implies that there is also a drive to modify symbols such that it increases their utility for accurately estimating ftrue. Symbols can become considerably more useful if they are incorporated into a symbolic system such as human language. Such systems not only facilitate synchronizing and modifying symbols, but also enable the additional efficacy and flexibility of symbolic expressions. Moreover, an environment that includes symbol-using agents (partly responsible for ftrue) implies that models of symbol-using agents should be incorporated into fest (van Hateren, 2014). It thereby enables symbols (as part of fest) to be about other symbols (as part of ftrue). These topics obviously form a very large and complex field that is beyond the scope of this article. Nevertheless, the current theory implies that the human grounding of 7 VAN HATEREN symbols in the form of the meaning of words (and semantics in general) requires more than mere embodiment (or multimodal grounding as, e.g., in Bruni et al., 2014). 3. Discussion and Conclusion Abstracting from the biological context, the primary functional components of the theory presented above are the following. First, there is the strong nonlinearity of exponential growth (or decline) in agent numbers, lying at the heart of reproduction (self-multiplication in the R loop of Figure 1). This nonlinearity depends on a parameter (the reproduction rate ftrue) that is a complex function of a time-varying environment (including other agents) and a gradually changing agent structure. Runaway growth is ultimately stopped by an automatic reduction of ftrue when resources become limiting. On average, the mechanism of the R loop results in agents that are sufficiently well matched to the environment to reproduce at least as fast as they die. The process therefore appears to optimize ftrue, but only when viewed retrospectively from an external point of view. There are no actual, explicit goals built into the process or into the agents themselves. The process naturally arises from the capability to reproduce with small changes, combined with the inevitable scarcity of resources. The strong nonlinearity driving the process enables an extension that utilizes stochastic change in the agent's structure that is driven (modulated) by an agent-made estimate of ftrue. This estimate, fest, also depends on environment and agent structure, but in a way that is fully defined and controlled within the agent itself. Because of the nonlinearity associated with reproduction, agents with an fest-driven loop typically obtain higher ftrue than agents without an fest-driven loop obtain. The extension is therefore evolvable and sustainable by the basic ftrue-optimizing process. The theory requires that fest has evolved to be a reasonable estimate of ftrue, that is, the values of fest and ftrue are likely to be similar to one another. Although ftrue and fest are thus coupled, this coupling is not hard-wired, because the way ftrue is produced (primarily through external processes) is mostly independent of the way fest is produced (through processes evolved and learned within the agent). When the agent induces structural changes within itself that increase ftrue, that is likely (though not guaranteed) to increase fest as well. Similarly, when the agent induces structural changes within itself that increase fest, that is likely (though not guaranteed) to increase ftrue. The strength (likelihood) of this co-varying of fest and ftrue is itself a feature that has been optimized by previous evolution and is maintained by continued evolution. The coupling between fest and ftrue implies that agents must have an intrinsic drive to increase fest, because that will increase ftrue, on average, and increasing ftrue is the main feature of the basic optimization process. Because fest is an internal process within the agent, increasing fest is an actual goal of the agent (van Hateren, 2015). It is in fact the agent's ultimate goal, to which all more specific sub-goals (tasks) of an agent are subordinate. Sub-goals are always serving fest, but they are not guaranteed to serve ftrue, because the coupling between fest and ftrue is not perfect. For the topic of this article, the most important consequence of this theory is that fest is about ftrue. The aboutness arises from the fact that fest and ftrue are tightly coupled, but in a somewhat arbitrary way that is under control of the agent through the way it constructs fest. The primary aboutness produced by the internalized version of fitness within the agent (Figure 1) is inherited by the factors of agent and environment (including other agents) that compose fest (Figure 2). Such factors may or may not correspond accurately to factors composing ftrue, leading to varying degrees 8 SYMBOL GROUNDING OF LIVING AND ARTIFICIAL AGENTS of accuracy of aboutness and the possibility of error (such as reference to non-existent items). Straightforward extensions of the basic theory consist of combining factors into more abstract symbols and of synchronizing and stabilizing symbols amongst communicating agents (Figure 3). As will be clear from the above summary, the latter parts of the theory – defining and stabilizing symbols through physical and social grounding (Vogt, 2002; Cangelosi, 2006; Coradeschi et al., 2013) and organizing them in a symbolic system – may be complex, but do not require anything that goes beyond existing robotic technology. Indeed, Steels (2008) has shown that letting robots communicate about colored samples can produce a consistent and stable framework for the meaning of the symbols used. The technologically more challenging part is the foundation of the theory, which requires a system with inherent exponential growth that can continually utilize an estimate of its own fitness, fest, for modulating stochastic change of its structure. In evolutionary robotics (Floreano, 2010; Bongard, 2013), it is normally the experimenter who decides how ftrue is defined. For example, robotic designs that can move faster across a plane (Lipson & Pollack, 2000) are granted more reproduction, and therefore the possibility to mutate into forms that might move even faster. In the theory presented above, such a goal would only be a sub-goal, serving the ultimate goal of fast reproduction (high ftrue and fest). Evolving and learning biological agents can therefore switch sub-goals whenever such switching is technically possible (given physical and physiological constraints and constraints on the pathways open for evolution and learning) and whenever it increases their rate of reproduction. They can therefore autonomously abandon a sub-goal like moving fast and switch to new and unpredictable sub-goals when their reproduction is served in that way. A full implementation following the organic version of the theory would require solving several challenging problems. First, the problem of how to realize fully autonomous reproduction, including autonomous gathering of the materials and energy needed for reproduction. Second, the problem of designing an initial structure that has a sufficiently open-ended evolvability such that it can serve the basic optimization mechanism of the R loop of Figure 1, and can continue to do so indefinitely. Finally, the problem of constructing the initial version of an evolvable, learning, and ftrue-mimicking fest that can stochastically modulate structural change and thereby serve the extended optimization mechanism of the G loop of Figure 1. However, successfully solving these problems implies that the evolving artificial agents will occasionally give rise to exponential growth in numbers – a plague. Waves of extinction will also occur occasionally. This would not only imply a waste of resources, but also competition with organic life, including humans. The artificial agents' overall goal of fast reproduction is independent of and therefore likely to be unaligned with human goals. The same applies to the sub-goals composing the overall goal. Thus even if autonomous reproduction (and a functioning fest) would be feasible – either with materials similar to or different from current biological ones – there would be compelling reasons not to implement the theory because there would be no alignment (that is, likely conflict) with human purposes. Can the theory also work with agential goals that are kept constrained to goals that serve human interests? Clearly, the basic mechanism (loop R in Figure 1) could work like that, as the example of quickly moving robots given above illustrates. However, agents evolving through such a mechanism do not have the symbol grounding as proposed here, because they lack the G loop and fest. Their goals and symbols therefore remain parasitic on human goals and symbols, and the symbols lack autonomous aboutness. The G loop depends on a subtle stochastic process, because the modulated stochasticity does 9 VAN HATEREN not change fitness directly, but only through a mechanism depending on second-order statistics (variance of structural change). Therefore, it can only function if it is driven by a strong nonlinearity. In organic life, this nonlinearity comes from the exponential growth in numbers implied by self-reproduction. This produces not only strong selection (nearly all variants die, only very few can continue), but also prevents complete extinction by quickly multiplying the numbers of the few successful variants. If the autonomous goal of self-reproduction (high fest) is unacceptable, as suggested above, then fest must be replaced by another goal, say gest. In principle, this is possible (for an example of a simulation with an arbitrary goal see figure 1b in van Hateren, 2015). For example, gest might by defined as high when a robot can move quickly across a place. Then low gest (slow moving) would imply an increased mutation rate (~1/gest as in Figure 1). However, when gest is high, that is, when the task is performed well, such successful variants must still be selected and be protected from extinction by letting them multiply. In other words, gest must be coupled not to a gtrue, but to a genuine reproductive fitness, ftrue – either that, or multiplying must be controlled purely through human intervention1. But for autonomous agents, gest and ftrue will generally have a rather different value and structure if the assigned goal gest has little to do with reproduction. The aboutness of Figures 1 and 2 will then be broken. A second issue is that gest is as much a part of the agent's structure as anything else. In an evolving or learning agent, it is therefore likely to change along with the rest of the agent, unless it could somehow be isolated. In organic life, fest is presumably distributed throughout the agent (see Section 2.1), and isolating it from change is then not an option. It is not clear if sustained isolation could be realized in artificial agents, but it is at least conceivable. However, isolating fest from change may hinder the synchronization of symbols as depicted in Figure 3, and thereby prevent the establishment and maintenance of a useful symbolic system. Moreover, if such an isolation turns out to be infeasible in practice, then the goal gest will eventually align itself with ftrue, because the latter drives the basic Darwinian optimization process. Then gest will change into fest, gradually, but inevitably. Such change may happen quite slowly if the agent has little or limited intelligence, such as in a bacterium or insect. But it will happen much faster when agents are more intelligent, because high intelligence requires the capacity to change sub-goals continually and to expand the space of possible sub-goals into unpredictable directions – not just on the timescale of evolution but also on the timescale of the individual's lifetime. The conclusion from the above considerations is that it is not clear how goals can be kept constrained to serve human goals (for similar concerns see Bostrom, 2012). Even if it were possible, for example by isolating gest from the agent's structures involved in learning, it is not clear how symbol grounding in the form of aboutness could then be obtained, because gest would be unrelated to ftrue. The primary question is, then, if another solution than the organic one can be found that retains the special stochastic properties of the G loop and that would produce aboutness without the issues sketched here. It will be interesting to see if this problem has a solution, and if human ingenuity can find it. References Bielecka, K. (2015). Symbol Grounding Problem and causal theory of reference. New Ideas in Psychology, doi:10.1016/j.newideapsych.2015.01.006 Bongard, J. C. (2013). Evolutionary robotics. Communications of the ACM, 56, 74-83. 1 Self-reproduction and alignment with human goals could be controlled and enforced, as the case of animal husbandry shows. However, if the agents involved would have a level of intelligence that requires symbolic reasoning, enforcement would presumably be unethical as well as resisted by the agents, and goals might be actively sabotaged. 10 SYMBOL GROUNDING OF LIVING AND ARTIFICIAL AGENTS Bostrom, N. (2012). The superintelligent will: motivation and instrumental rationality in advanced artificial agents. Minds & Machines, 22, 71-85. Brooks, R. A. (1991). Intelligence without representation. Artificial Intelligence, 47, 139-159. Bruni, E., Tran, N. K., & Baroni, M. (2014). Multimodal distributional semantics. Journal of Artificial Intelligence Research, 49, 1-47. Cangelosi, A. (2006). The grounding and sharing of symbols. Pragmatics & Cognition, 14, 275285. Christiansen, M. H., & Chater, N. (1993). Symbol grounding – the emperor's new theory of meaning? In Proceedings of the 15th Annual Conference of the Cognitive Science Society (pp. 155-160). Hillsdale, NJ: Lawrence Erlbaum Associates. Coradeschi, S., Loutfi, A., & Wrede, B. (2013). A short review of symbol grounding in robotic and intelligent systems. Künstliche Intelligenz, 27, 129-136. Floreano, D., & Keller, L. (2010). Evolution of adaptive behaviour in robots by means of Darwinian selection. PLoS Biology, 8, 1-8. Harnad, A. (1990). The symbol grounding problem. Physica D, 42, 335-346. Lipson, H., & Pollack, J. B. (2000). Automatic design and manufacture of robotic lifeforms. Nature, 406, 974-978. Newell, A., & Simon, H. A. (1976). Computer science as empirical inquiry: Symbols and search. Communications of the ACM, 19, 113-126. Rodríguez, D., Hermosillo, J., & Lara, B. (2012). Meaning in artificial agents: the symbol grounding problem revisited. Mind & Machines, 22, 25-34. Searle, J. R. (1980). Minds, brains, and programs. The Behavioral and Brain Sciences, 3, 417-457. Steels, L. (2008). The symbol grounding problem has been solved. So what's next? In M. de Vega (Ed.), Symbols and embodiment: debates on meaning and cognition (pp. 223-244). Oxford: Oxford University Press. Sun, R. (2000). Symbol grounding: A new look at an old idea. Philosophical Psychology, 13, 149172. Taddeo, M., & Floridi, L. (2005). Solving the symbol grounding problem: a critical review of fifteen years of research. Journal of Experimental & Theoretical Artificial Intelligence, 17, 419445. van Hateren, J. H. (2013). A new criterion for demarcating life from non-life. Origins of Life and Evolution of Biospheres, 43, 491-500. van Hateren, J. H. (2014). The origin of agency, consciousness, and free will. Phenomenology and the Cognitive Sciences, doi:10.1007/s11097-014-9396-5 van Hateren, J. H. (2015). Active causation and the origin of meaning. Biological Cybernetics, 109, 33-46. Vogt, P. (2002). The physical symbol grounding problem. Cognitive Systems Research, 3, 429457. Ziemke, T. (1999). Rethinking grounding. In A. Riegler, M. Peschl, & A. von Stein (Eds.), Understanding representation in the cognitive sciences (pp. 177-190). New York: Plenum Press. 11
9cs.NE
Modularizing and Specifying Protocols among Threads Sung-Shik T.Q. Jongmans Farhad Arbab Centrum Wiskunde & Informatica (CWI) Amsterdam, the Netherlands [email protected] Centrum Wiskunde & Informatica (CWI) Amsterdam, the Netherlands [email protected] We identify three problems with current techniques for implementing protocols among threads, which complicate and impair the scalability of multicore software development: implementing synchronization, implementing coordination, and modularizing protocols. To mend these deficiencies, we argue for the use of domain-specific languages (DSL) based on existing models of concurrency. To demonstrate the feasibility of this proposal, we explain how to use the model of concurrency Reo as a high-level protocol DSL, which offers appropriate abstractions and a natural separation of protocols and computations. We describe a Reo-to-Java compiler and illustrate its use through examples. 1 Introduction With the advent of multicore processors, a new era began for many software developers of general, nonnumerical, applications: to harness the power of multicore processors, the need for writing concurrently executable code, instead of traditional sequential programs, intensified—a notoriously difficult task with the currently popular tools and technology! To alleviate the burden of implementing concurrent applications, researchers started developing new techniques for multicore programming. Examples include stream processing, transactional memory, and lock-free synchronization. However, one rather high-level aspect of multicore programming has received only little attention: the sets of rules that interacting parties must abide by when they communicate with each other—protocols. In this paper, we investigate a new approach for implementing protocols among threads. Many popular general-purpose programming languages (GPPL) feature threads: concurrently executing program fragments sharing the same address space. To name a few such GPPLs and (some of) their multithreading facilities: • Fortran has coarrays and OpenMP; • C and C++ have Pthreads and OpenMP; • Objective-C has Pthreads and the NSThread class; • Visual Basic and C# have the System.Threading namespace; • Java has the Thread class. These languages have a combined share of roughly 63% according to the T LP and Tiobe indexes of January 2012.1,2 From these statistics, one can conclude that (a good portion of) sixty percent of software developers encounters threads regularly. Consequently, many developers will benefit from improvements to existing techniques for implementing protocols among threads. We consider such improvements not merely relevant but a sheer necessity: the current models and languages, APIs and libraries, fail to scale 1 2 http://lang-index.sourceforge.net/ http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html S. J. Gay and P. H. Kelly (Eds.): Programming Language Approaches to Concurrency- and Communication-cEntric Software (PLACES 2012) EPTCS 109, 2013, pp. 34–45, doi:10.4204/EPTCS.109.6 S.-S.T.Q. Jongmans & F. Arbab 35 when it comes to implementing protocols. Importantly, we refer to scalability not only in terms of performance but also in terms of other aspects of software development (e.g., correctness, maintainability, and reusability). Our approach in this paper takes such aspects into account. Organization In Section 2, we identify three problems with current techniques for implementing protocols among threads. In Section 3, we sketch an abstract solution based on the general notion of domainspecific languages. In Section 4, we concretize our approach for one particular such language, namely Reo. Section 5 concludes this paper. 2 Problems with Implementing Protocols While threads prevail for implementing concurrency in general-purpose programming languages (GPPL), they also provoke controversy. Programming with threads would inflict unreasonable demands on the reasoning capabilities of software developers, partly due to the unpredictable ways in which threads interact with each other [7]: typically, one cannot analyze all the ways in which threads may interleave, and consequently, unforeseen—and potentially dangerous—execution paths may exist. Some propose to discard our present notion of threads, unless we improve our ways of programming with them [21]. Because many existing GPPLs support threads—and since this seems unlikely to change in the near future—we gear our efforts toward getting such improvements. In particular, our interest lies in solving problems with implementing protocols among threads. In this section, we identify three such problems. At first sight, writing the computation code and the protocol code of a program using a single language may seem only natural. Indeed, many popular GPPLs have sufficient expressive power for doing so. Nevertheless, we consider it an inappropriate approach in many cases: typically, language designers gear GPPLs toward implementing computations. Implementing protocols, at a suitable level of abstraction, seems a secondary concern. Consequently, these languages work well for writing computation code, but not so for developing protocol code: the low-level concurrency constructs that they provide do not coincide with the higher-level concepts needed to express protocols directly. This results in two problems that complicate “writing code” for protocols. Problem 1 (Implementing synchronization) Threads communicating with each other using a shared memory, by directly reading from and writing to their common address space, must synchronize their actions. However, implementing synchronization using primitives such as locks, mutexes, sempahores, etc., comprises a tedious and error-prone activity. Problem 2 (Implementing coordination) Threads interacting with each other in structured ways, according to some protocol, require coordination to ensure that they respect this protocol. However, implementing coordination using constructs such as assignments, if-statements, while-loops, etc., produces code that only indirectly conveys a protocol, which make it a tedious and error-prone activity. Interestingly, these two problems have a common cause: the lack of appropriate abstractions for implementing communication and interaction in GPPLs. For example: software developers should specify that a thread sends two integers and receives an array of rationals for a response—not that a thread allocates shared memory and performs pointer arithmetic. Or: developers should specify that communication between two threads inhibits interaction among other threads—not that threads acquire and release locks. Or: developers should specify that threads exchange data elements synchronously (i.e., atomically)—not that threads wait on a monitor until they get notified. We believe that programming languages should enable developers implementing communication and interaction to focus on the logic of the protocols 36 1 2 Modularizing and Specifying Protocols among Threads import java.util.LinkedList; import java.util.concurrent.Semaphore; 3 4 5 6 7 10 11 12 13 14 15 16 18 19 public class Main { private LinkedList<Object> buffer; private Semaphore notEmpty; private Semaphore notFull; 8 9 17 20 21 22 23 24 public Main() { buffer = new LinkedList<Object>(); notEmpty = new Semaphore(0); notFull = new Semaphore(1); (new Producer()).start(); (new Producer()).start(); (new Consumer()).start(); } 25 26 27 28 29 30 31 32 private class Producer extends Thread { public run() { while (true) { Object d = produce(); notFull.acquire(); buffer.offer(d); notEmpty.release(); } } } private class Consumer extends Thread { public run() { while (true) { notEmpty.acquire(); Object d = buffer.poll(); notFull.release(); consume(d); } } } } Figure 1: Java implementation of the producer–consumer example in [4, Algorithm 6.8]. involved—not on the realization of the necessary synchronization and coordination. We (should) have compilers for that. In addition to the two problems identified above, the lack of appropriate abstractions in GPPLs causes a third problem: in the absence of proper structures to enforce (or at least encourage) good protocol programming practices, programmers frequently succumb to the temptation of not isolating protocol code. Conceptually, this problem differs from Problems 1 and 2, because it does not complicate “writing code” directly. However, it does perplex essentially everything else involved in a software development process. Although notions such as “modularization” [22] and “separation of concerns” [10] have long histories in computer science, linguistic support for their application in programming of concurrency protocols has scarcely received due attention. Modularization and separation of concerns have driven the development of modern programming languages and software development practices for decades. In fact, already in the early 1970s, Parnas attributed three advantages to abiding by these principles [22]: “(1) managerial—development time should be shortened because separate groups would work on each module with little need for communication; (2) product flexibility—it should be possible to make drastic changes to one module without a need to change others; (3) comprehensibility—it should be possible to study the system one module at a time.” Nevertheless, popular GPPLs do not enforce modularization of protocols. Consequently, dispersing protocol code among computation code comprises a common practice for implementing protocols among threads. To illustrate such dispersion—and its deficiencies—we discuss the producer–consumer Java code in Figure 1 (based on [4, Algorithm 6.8]). Two producer threads produce data elements and append them to a queue buffer (of size 1). Concurrently, a consumer thread takes elements from this queue and consumes them. While the queue buffer contains an element, the producers cannot append data until the consumer takes this element out of the queue. (We skip the methods produce and consume.) Easily, one can get the gist of the protocol involved in this example: the producers send—asynchronously, reliably, and in arbitrary order—data elements to the consumer. In contrast, one cannot easily point to coherent segments of the source code that actually implement this protocol. Indeed, only the combination of lines 5–7, 10–12, 21–23, and 28–30 does so. In this example, thus, we have not isolated the protocol in a distinct module; we have not separated our concerns. Therefore, the “Advantages of Modularization” identified by Parnas do not apply. In fact, the monolithic program in Figure 1 suffers from their opposites—the “Disadvantages of Dispersion:” (1) Groups cannot work independently on computation code and protocol code of monolithic pro- S.-S.T.Q. Jongmans & F. Arbab 1 2 3 4 5 6 7 8 9 10 11 12 public interface Protocol { public void offer(Object o); public Object poll(); } public class Main { private Protocol protocol; public Main() { protocol = new P(); (new Producer()).start(); (new Producer()).start(); (new Consumer()).start(); } 37 13 14 15 16 17 18 19 20 21 22 23 24 private class Producer extends Thread { public run() { while (true) { Object d = produce(); protocol.offer(d); } } } private class Consumer extends Thread { public run() { while (true) { Object d = protocol.poll(); consume(d); } } } } Figure 2: Reimplementation of the producer–consumer program in Figure 1. grams. Moreover, one cannot straightforwardly reuse computation code or protocol code of monolithic programs in other programs: this would require dissecting and disentangling the former. (2) Small changes to a protocol require nontrivial changes throughout a monolithic program. For instance, suppose that we allow the producers in the producer–consumer example to send data elements only in alternating order. Implementing such turn-taking requires significant changes. (3) One cannot study computation code and protocol code in isolation when they are entangled: to reason about protocol correctness, one must analyze monolithic programs in their entirety. The impact of these shortcomings only increases when programs grow larger, interaction among threads intensifies, and protocol complexity increases—a likely situation in the current multicore era. Problem 3 (Modularizing protocol code) The lack of appropriate abstractions in GPPLs tempts developers to disperse protocol code among code of computational tasks. In that case, developers do not isolate protocols in modules (e.g., classes, packages, namespaces), but intermix them with computations. This practice makes independently developing, maintaining, reusing, modifying, testing, and verifying protocol code problematic or impossible. To avoid the Disadvantages of Dispersion, we propose to isolate protocol code in separate modules. In object-oriented languages, for instance, one can achieve this by encapsulating all the protocol logic in a separate class. To illustrate this approach, we rewrote the monolithic program in Figure 1 as the modular program in Figure 2: we moved all the protocol code to a class P (see Section 4.2 for its implementation), which implements the interface Protocol.3 To such programs, the Advantages of Modularization apply. First, groups can develop protocol code (e.g., the implementations of the methods offer and poll) independently from computation code. Moreover, one can easily reuse protocol implementations. Second, changing the protocol requires changing only the class implementing the protocol (e.g., the class P); computation code, however, remains unaffected. Third, we can analyze the protocol in isolation by studying only the class implementing the protocol (e.g., the class P). 3 Solution: Protocol DSLs In the previous section, we explained how the lack of appropriate abstractions complicates three aspects of implementing protocols: implementing synchronization (Problem 1), implementing coordina3 The definition of the interface Protocol in Figure 2 serves only our present discussion: not every protocol has methods offer and poll. In general, the interface of a protocol should provide methods that computation code can invoke for executing this protocol. In the context of our present discussion, offer and poll seemed appropriate names. 38 Modularizing and Specifying Protocols among Threads tion (Problem 2), and modularizing protocol code (Problem 3). We believe that domain-specific languages (DSL) offer a solution to these problems. Definition 1 (Domain-specific language [8]) A domain-specific language is a programming language that offers, through appropriate notations and abstractions, expressive power focused on, and usually restricted to, a particular problem domain. Domain-specific languages dedicated to the implementation of protocols solve Problems 1 and 2 by this very definition. Moreover, such protocol DSLs naturally force developers to isolate their protocols in modules: specifying protocols in a different language leads to a clear syntactic separation between computation code and protocol code. Consequently, using protocol DSLs in the following workflow secures the Advantages of Modularization. • Developers write the computation code of an application in a GPPL. • Developers specify protocols among threads in a protocol DSL. • A DSL compiler compiles protocol specifications to GPPL code, seemlessly integrating protocols with computations. While the benefits seem clear, one question remains: where to get these protocol DSLs from? Must we invent them from scratch? And if so, what kinds of “appropriate abstractions” should they provide? Fortunately, we do not need to design everything from the ground up: interaction and concurrency have received plenty of attention from the theoretical computer science community over the past decades, and researchers have investigated high-level models of concurrency for many years (e.g., Petri nets, process algebras). This led to various formalisms for synchronizing and coordinating parties running concurrently (e.g., actors, agents, components, services, processes, etc.). We believe that these models of concurrency provide appropriate abstractions for specifying and reasoning about protocols (albeit, not all do so equally well). In other words, the protocol DSLs that we look for already exist. However, many of these formalisms lack sophisticated tool support, and in particular, the kind of compiler mentioned above. Therefore, we consider implementing such code generation tools among the main goals in our efforts toward alleviating the burden of programming with threads. But which existing concurrency formalism should we focus on? 4 Reo as a Protocol DSL One model of concurrency has our particular interest: Reo [1, 2], an interaction-based model of concurrency with a graphical syntax, originally introduced for coordinating components in component-based systems. As with other models of concurrency, Reo has a solid foundation: there exist various compositional semantics [17] for describing the behavior of Reo programs, called connectors, along with tools for analyzing them. This includes both functional analysis (detecting deadlock, model-checking) and reasoning about nonfunctional properties (computing quality-of-service guarantees). Its declarative nature, however, distinguishes Reo from other models of concurrency. Using Reo, software developers specify what, when, where, and why interaction takes place; not how. Indeed, Reo does not feature primitive actions for sending or receiving data elements. Rather, Reo considers interaction protocols as constraints on such actions. In stark contrast to traditional models of concurrency, Reo’s constraint-based notion of interaction has the advantage that to formulate (specify, verify, etc.) protocols, one does not need to even consider any of the alternative sequences of actions that give rise to them. Using Reo, computational threads remain completely oblivious to protocols that compose them into, and coordinate their interactions within, a concurrent application: their code contains no concurrency S.-S.T.Q. Jongmans & F. Arbab 39 A {A, B, C} A {D} C C D d {A, C} {B, C} B B (a) Syntax. (b) Semantics. Figure 3: Syntax and semantics, as a port automaton, of MergerWithBuffer. D {D} {D} d d {C} (a) Syntax. (b) Semantics. Figure 4: Syntax and semantics, as a port automaton, of AlternatorWithBuffer. primitive (e.g., semaphore operations, signals, mutex, or even direct communication as in send/receive). The sole means of communication for a computational thread consists of I / O actions that it performs on its own input/output ports. To construct an application, one composes a set of such threads together with a protocol by identifying the input/output ports of the computational threads with the appropriate output/input nodes of a Reo connector that implements the protocol. A Reo compiler then generates the proper multithreaded application code. We proceed as follows. In Section 4.1, we explain the main concepts of Reo through three example connectors, each of which represents a protocol that one can use in the producer–consumer example of Section 2. In Section 4.2, we discuss our Reo-to-Java compiler. 4.1 Reo by Example: Producer–Consumer Protocols Figures 3a, 4a, and 5a show three example connectors (i.e., Reo programs): graphs of nodes and arcs, which we refer to as channels. We refer to nodes that admit I / O operations as boundary nodes and draw them as open circles in figures. Intuitively, one can interpret the graph representing a Reo connector as follows: data elements, dispatched on input (boundary) nodes by output operations, move along arcs to other nodes, which replicate them if they have multiple outgoing channels, along to output (boundary) nodes, from which input operations can fetch them. Groups of such (input, output, and transport) activities may take place atomically. Importantly, communicating parties that perform I / O operations on the boundary nodes of a connector remain oblivious to how the connector routes data: parties that fetch or dispatch data elements do not know where these elements come from or go to. The connector in Figure 3a specifies the same protocol as the one embedded in the Java code in Figure 1. We can explain the behavior of this connector, named MergerWithBuffer, best by discussing the port automaton [20] that describes its semantics. Figure 3b shows this automaton (derived automatically from Figure 3a): every state corresponds to an internal configuration of MergerWithBuffer, while every transition describes a step of the protocol specified by MergerWithBuffer. Transitions carry a synchronization constraint: a set containing those nodes through which a data element passes in an atomic protocol step. Thus, in the initial state of MergerWithBuffer, a data element passes either nodes A and C or nodes B and C. Every element that passes C subsequently arrives at a buffer with capacity 1. We represent this buffer with a rectangle in Figure 3a. While the buffer remains full, no data elements can pass A, B, or C. In that case, the only admissible step results in the element stored in the buffer leave the buffer and pass through D. Figure 4 shows another connector, named AlternatorWithBuffer, that one can use in the producer– consumer example. In contrast to MergerWithBuffer, AlternatorWithBuffer forces the producers to 40 Modularizing and Specifying Protocols among Threads ϕ A d d d B D {D} , [D] = m {A}, [A] = “foo” ∧ m0 = [A] {A }, [A ] 6= “fo o” ” o “fo ] 6= A [ }, {A {D} , [D] = m {B}, m0 = [B] (a) Syntax (with ϕ ≡ [A] = “foo”). (b) Semantics. Figure 5: Syntax and semantics, as a constraint automaton, of SequencerWithBufferϕ . synchronize (represented by the arrow-tailed edge between nodes A and B): only if they can dispatch data elements simultaneously, the connector allows them to do so. In that case, the data element dispatched on A passes node C and enters the horizontal buffer; concurrently, the data element dispatched on B enters the diagonal buffer. In the next protocol step, the data element in the horizontal buffer leaves this buffer and passes node D. Subsequently, the data element in the diagonal buffer leaves this buffer, passes C, and enters the horizontal buffer. Finally, the data element now in the horizontal buffer (originally dispatched on B) leaves this buffer and passes D. Thus, AlternatorWithBuffer first synchronizes the producers, and second, it offers their data elements in alternating order to the consumer. Figure 5 shows a third connector, named SequencerWithBufferϕ , that one can use in the producer– consumer example. The protocol specified by this connector differs in two significant ways from MergerWithBuffer and AlternatorWithBuffer. The first difference relates to (the lack of) synchronization: unlike AlternatorWithBuffer, SequencerWithBufferϕ does not force the producers to synchronize before they dispatch their data elements. (Similar to AlternatorWithBuffer, however, SequencerWithBufferϕ orders the sequence in which data elements arrive at the consumer.) The second difference relates to the data-sensitivity that SequencerWithBufferϕ exhibits: the zigzagged edge in Figure 5a represents a filter channel and we call ϕ a filter constraint: only those data elements satisfying its filter constraint propagate through a filter channel. In this example, we assume a simple filter constraint, namely [A] = “foo”, which means: the data element passing A equals the string “foo”.4 In other words, if a producer dispatches “foo” on A, the (right-horizontal) buffer becomes filled with “foo”; otherwise, the filter loses the dispatched data element, which means essentially, its producer has wasted its turn. In general, filter channels facilitate the specification of protocols whose execution depends on the content of the exchanged data. Port automata cannot express the semantics of connectors with filter channels. For that, we need a stronger formalism: constraint automata (CA) [3], which support richer transition structures than port automata. Instead of only a synchronization constraint, transitions of CA carry also a data constraint: an expression about what the data passing particular nodes should look like in some protocol step. Figure 5b shows the constraint automaton that describes the semantics of SequencerWithBufferϕ (we omitted its nonboundary nodes from this CA). The symbols m and m0 refer to the content of the (right-horizontal) buffer while and after a transition fires: m0 = [A] means that this buffer contains the value exchanged through A after a transition; [D] = m means that the content of this buffer passes through D during a transition. 4 Alternatively, one can formulate filter constraints as regular expressions or patterns. See [1]. S.-S.T.Q. Jongmans & F. Arbab 4.2 41 Compiling Reo to Java Next, we discuss how to use Reo as a DSL for implementing protocols: we present here an early version of our Reo-to-Java compiler, because it is simpler to explain. Although we focus on Java here, we emphasize the generality of our approach: nothing in Reo prevents us from compiling Reo to Fortran, C, C++, Objective-C, C#, or Visual Basic. Before we can compile anything, we need a means to implement the “paper-and-pencil drawings” of connectors. We use the Reo IDE for this purpose, called the Extensible Coordination Tools (E CT).5 The E CT consists of a collection of Eclipse plug-ins, including a drag-and-drop editor for drawing connector diagrams. Under the hood, the E CT stores and manipulates such diagrams as XML documents. These XML documents serve as input to our Reo-to-Java compiler, detailed next. Previously, we introduced Reo in terms of how data elements move through a connector, not unlike dataflow programming. Compiling connectors to some kind of distributed application, therefore, may seem an obvious choice: nodes naturally map to processing elements (e.g., cores), and the connections between processing elements can serve as channels. However, this approach has several shortcomings. First, the network topology of the hardware may not correspond with the topology of the connector that we want to deploy. Second, emulating Reo channels with hardware connections requires additional computations from the processing elements connected. This destroys the original idea of mapping Reo channels to hardware connections. Third, achieving the global atomicity, synchronization, and exclusion emerging in a connector requires complex distributed algorithms. Such algorithms inflict communication and processing overhead, deteriorating performance. In short, construing connectors and their topology too literally seems a bad idea in the context of compilation. Instead, our Reo-to-Java compiler compiles connectors based on their constraint automaton (CA) semantics. The E CT ships with the CA of many common channels, including those in Figures 3, 4, and 5. By combining such primitive CA, through the act of composition [3], the E CT can automatically compute the CA of larger connectors. We use this open source CA library in our Reo-to-Java compiler: on input of an XML document specifying a connector, our compiler first computes the corresponding CA . Subsequently, it annotates this CA with Java identifiers. Finally, it produces a Java class using A NTLR’s StringTemplate technology [23]. One can use the resulting class as any Java class. By using CA for compiling connectors, we conveniently abstract away their nonboundary nodes. To illustrate the compilation process, suppose that we want to compile MergerWithBuffer for use in the producer–consumer example of Section 2. After drawing MergerWithBuffer using the E CT, we feed the corresponding XML document to our Reo-to-Java compiler. This tool automatically generates a Java class MergerWithBuffer based on the CA semantics of MergerWithBuffer. More precisely, MergerWithBuffer objects run state machines representing the protocol specified by MergerWithBuffer. Figure 6 shows (parts of) the Java class generated by compiling MergerWithBuffer. We discuss some of its salient aspects. • The class MergerWithBuffer extends the class Thread (line 1). By running connectors in their own thread, we enable them to proactively sense their environment for I / O operations; with massive-scale concurrent hardware, ample cores to run connectors on should always exist. • Instances of MergerWithBuffer listen to three ports (line 7), which grant “computation threads” access to the boundary nodes of MergerWithBuffer. All interaction between computation threads and a MergerWithBuffer object occurs through the latter’s ports: computation threads can perform I / O operations—writes and takes—on ports, which in turn suspend threads until their op5 http://reo.project.cwi.nl/ 42 1 2 3 4 Modularizing and Specifying Protocols among Threads public class MergerWithBuffer extends Thread { /* The current state. */ private State current = State.EMPTY; private enum State { FULL, EMPTY } 7 /* The boundary nodes of this connector. */ private Port A; private Port B; private Port D; 10 11 14 17 18 26 28 29 30 31 32 33 34 35 36 37 47 48 /* Check the synchronization and data constraints. */ if (/* ---snip---*/) { 51 /* Process writes and takes. */ A.performAndUnlock(/* ---snip---*/); D.performAndUnlock(/* ---snip---*/); 52 /* Constructs a MergerWithBuffer. */ public MergerWithBuffer(Port A, Port B, Port D) { this.A = A; this.B = B; this.D = D; 53 54 55 /* Update memory cells. */ // ---snip---; 56 /* Initialize data constraints. */ // ---snip--} 57 58 /* Update state. */ current = State.FULL; 59 60 23 27 /* Lock and get pending takes. */ Set<Take> takesOnD = A.lockAndGetTakes(); if (takesOnD.isEmpty()) { abort(); return; } 49 21 25 44 50 20 24 43 /* A random number generator for selecting transitions. */ Random random = new Random(); 19 22 /* Lock and get pending writes. */ Set<Write> writesOnA = A.lockAndGetWrites(); if (writesOnA.isEmpty()) { abort(); return; } 41 46 15 16 40 /* The data constraints this connector checks and */ /* the memory cells this connector has access to. */ // ---snip--- 12 13 /* Makes a transition from state EMPTY to state FULL, firing A. */ private void tFromEmptyToFullA() { 45 8 9 39 42 5 6 38 /* Runs the state machine modeling MergerWithBuffer. */ public void run() { while (true) { switch (current) { case State.EMPTY: switch (random.nextInt(2)) { case 0: tFromEmptyToFullA(); break; case 1: tFromEmptyToFullB(); break; } break; case State.FULL: // ---snip--break; } } } } abort(); 61 62 63 } 64 65 66 67 68 /* Makes a transition from state EMPTY to state FULL, firing B. */ private void tFromEmptyToFullB() { // ---snip--} 69 70 71 72 73 74 /* Aborts a transition by unlocking all that it may have locked. */ private abort() { A.unlockWrites(); B.unlockWrites(); D.unlockTakes(); } } Figure 6: (Parts of the) Java class generated by compiling MergerWithBuffer (see also Figure 3). erations succeed. More technically, ports extend concurrent data structures called synchronization points:6 pairs of sets—one containing pending writes, another containing pending takes— supporting and admissible to two-phase locking schemes (see below) [5]. The class SyncPoint exposes the following methods: – – – – lockAndGetWrites() locks and returns the set of pending write operations (line 42). lockAndGetTakes() locks and returns the set of pending take operations (line 46). unlockWrites() and unlockTakes() unlock the sets of writes and takes (lines 72–73). performAndUnlock(Write) performs the specified write operation (first parameter) and unlocks the set of pending write operations (line 53). – performAndUnlock(Take,Object) performs the specified take operation (first parameter) by passing it the data element to take (second parameter) and unlocks the set of pending take operations (line 54). • The overridden method run() implements a state machine corresponding to the input CA of the compilation process (lines 25–37). The main loop never terminates (line 26). In each iteration, 6 Synchronization points resemble π-calculus channels. S.-S.T.Q. Jongmans & F. Arbab 1 2 3 4 5 6 public class P implements Protocol { private Port A = new Port(); private Port B = new Port(); private Port D = new Port(); private Map<Thread, Port> threads = new ConcurrentHashMap<Thread, Port>(); 7 8 9 10 43 11 12 13 14 15 16 17 public P() { new MergerWithBuffer(A, B, D).start(); } 18 19 20 public Object poll() { return D.take(); } public void offer(Object o) { Thread thread = Thread.currentThread(); if (!threads.containsKey(thread)) synchronized (this) { threads.put(thread, !threads.containsValue(A) ? A : B); } threads.get(thread).write(o); } } Figure 7: Class P. it randomly selects a transition (line 29) going out of the current state (line 3). We collect code responsible for making transitions in separate methods (lines 39–63 and 66–68). • An important step in the process of making a transition consists of checking its synchronization and data constraints (line 50). To do this in a thread-safe manner, a MergerWithBuffer object employs a two-phase locking scheme. During the growing phase, it acquires the locks of: – the set of pending writes of each port providing access to an input node (line 42); – the set of pending takes of each port providing access to an output node (line 46). A MergerWithBuffer object locks only the sets of those boundary nodes that actually occur in the constraints under investigation. Later, during the shrinking phase, it releases these locks again (lines 43, 47, and 62). Only between phases, a MergerWithBuffer object checks the constraints under investigation. If they hold, it fires the corresponding transition, transporting data elements accordingly and removing the operations involved from the sets it has locked (lines 53–54). To use the class MergerWithBuffer in the producer–consumer example of Section 2, we should incorporate it in the implementation of the class P, encountered before on line 8 in Figure 2; Figure 7 shows this implementation. Line 19 specifies that a producer performs a (blocking) write operation on the port assigned to it; line 11 specifies that a consumer performs a (blocking) take operation. The rest of P consists of initialization code. The latter characterizes the use of Reo as a protocol DSL: implementations of the Protocol interface serve as wrappers for compiled connectors, encapsulating all the protocol logic. To change Figure 1 such that it respects the protocol specified by AlternatorWithBuffer requires nontrivial modifications across the source code. In contrast, we can straightforwardly implement a class Q implements Protocol and replace P() with Q() on line 8 in Figure 2. In fact, Q would differ from P only on line 9 in Figure 7: in Q, we would construct an AlternatorWithBuffer object instead of a MergerWithBuffer object. Similarly, we can use the protocol specified by SequencerWithBufferϕ . This shows that using Reo, we can easily change protocols without affecting computation code.7 This subsection demonstrates the feasibility of modularizing protocols and implementing protocol DSL s. We remark that this approach does not preclude the use of dedicated implementations for certain parts of a protocol. For instance, consider the buffer of MergerWithBuffer. Our Reo-to-Java compiler implements this buffer using shared memory and explicit locks (transparent to software developers using Reo, though). But suppose that the architecture we deploy our producer–consumer program on features also hardware transactional memory (HTM) [12]. Our approach allows one to write a dedicated 7 More precisely, handwritten computation code and protocol code generated by our Reo compiler communicate only through shared ports; these ports do not change when replacing one connector with another. Thus, unless the number of ports changes, a syntactically valid program remains syntactically valid. 44 Modularizing and Specifying Protocols among Threads implementation of buffers that exploits this HTM. Subsequently, we can replace the standard buffer implementation with this dedicated implementation.8 Thus, besides high-level constructs by default, our approach offers developers the flexibility of applying lower-level languages if necessary. 5 Concluding Remarks Our current work focuses on improving our Reo-to-Java compiler. For instance, the classes currently generated by our compiler execute sequentially. We can parallelize this rather straightforwardly by checking ports for appropriate I / O operations concurrently for different transitions. However, we speculate that we can get even better performance if, instead, we optimize at the semantic level: we wish to decompose automata into “smaller” automata that can execute concurrently without synchronization while preserving the original semantics (see [18] for preliminary results). Another potential optimization involves scheduling: the formal semantics of connectors provide very tangible information for scheduling threads. Exploiting this information should yield substantial performance gains. Hopefully, such improvements make our approach a competitive alternative to lower level approaches also in terms of performance. In recent years, session types [14, 15] have entered the realm of object-oriented programming (recent work includes [6, 9, 11, 13, 16]). Although session types comprise a valuable new technique for programming with threads, we wonder if the abstractions provided by them suffice. Still, we consider it a very interesting development, especially since Reo does not feature types; extending Reo with session types would comprise a significant improvement. Finally, although we focused on implementing protocols among threads in this paper, the Reo-to-Java compiler presented has proven itself useful also in the domain of Web Service orchestration [19]. References [1] Farhad Arbab (2004): Reo: a channel-based coordination model for component composition. MSCS 14(3), pp. 329–366, doi:10.1017/S0960129504004153. [2] Farhad Arbab (2011): Puff, The Magic Protocol. In Gul Agha, Olivier Danvy & José Meseguer, editors: Formal Modeling: Actors, Open Systems, Biological Systems, LNCS 7000, Springer, pp. 169–206, doi:10.1007/978-3-642-24933-4 9. [3] Christel Baier, Marjan Sirjani, Farhad Arbab & Jan Rutten (2006): Modeling component connectors in Reo by constraint automata. SCICO 61(2), pp. 75–113, doi:10.1016/j.scico.2005.10.008. [4] Mordechai Ben-Ari (2006): Semaphores. In: Principles of Concurrent and Distributed Programming, 2nd edition, Addison-Wesley, pp. 107–144. [5] Philip Bernstein, Vassos Hadzilacos & Nathan Goodman (1987): Two Phase Locking. In: Concurrency Control and Recovery in Database Systems, Addison-Wesley, pp. 47–111. 8 Roughly, first, we write an HTM -based implementation of buffers. Second, we remove the connection between nodes C and D in Figure 4a. Third, we generate code for the subconnector containing nodes A, B, and C and for the subconnector containing node D. (The latter consists of only node D. However, by the semantics of Reo, we can replace this by an equivalent connector of two synchronizing nodes.) Thus, we now have two compiled connectors. Finally, we place the HTM-based implementation of buffers between these two compiled connectors, as an active entity: our dedicated buffer implementation, which performs writes and takes on C and D, runs in its own thread—effectively, it operates as a fourth party involved in the protocol. Interestingly, the “real” communicating parties remain oblivious to the introduction of this fourth party. Further optimization can eliminate the active entity that performs writes and takes on C and D, merging its functionality in the behavior of nodes C and D. S.-S.T.Q. Jongmans & F. Arbab 45 [6] Sara Capecchi, Mario Coppo, Mariangiola Dezani-Ciancaglini, Sophia Drossopoulou & Elena Giachino (2009): Amalgamating sessions and methods in object-oriented languages with generics. TCS 410(2–3), pp. 142–167, doi:10.1016/j.tcs.2008.09.016. [7] Sung-Eun Choi & Christopher Lewis (2000): A Study of Common Pitfalls in Simple Multi-Threaded Programs. In: Proceedings of SIGCSE, pp. 325–329, doi:10.1145/330908.331879. [8] Arie Van Deursen, Paul Klint & Joost Visser (2000): Domain-Specific Languages: An Annotated Bibliography. ACM SIGPLAN Notices 35(6), pp. 26–36, doi:10.1145/352029.352035. [9] Mariangiola Dezani-Ciancaglini, Sophia Drossopoulou, Dimitris Mostrous & Nobuko Yoshida (2009): Objects and session types. IC 207(5), pp. 595–641, doi:10.1016/j.ic.2008.03.028. [10] Edsger Dijkstra (1982): On the Role of Scientific Thought (EWD447). In: Selected Writings on Computing: A Personal Perspective, Texts and Monographs in Computer Science, Springer, pp. 60–66, doi:10.1007/9781-4612-5695-3 12. [11] Simon Gay, Vasco Vasconcelos, António Ravara, Nils Gesbert & Alexandre Caldeira (2010): Modular Session Types for Distributed Object-Oriented Programming. In: Proceedings of POPL 2010, pp. 299–312, doi:10.1145/1706299.1706335. [12] Maurice Herlihy & Eliot Moss (1993): Transactional Memory: Architectural Support for Lock-Free Data Structures. ACM SIGARCH Computer Architecture News 21(2), pp. 289–300, doi:10.1145/173682.165164. [13] Kohei Honda, Aybek Mukhamedov, Gary Brown, Tzu-Chun Chen & Nobuko Yoshida (2011): Scribbling Interactions with a Formal Foundation. In Raja Natarajan & Adegboyega Ojo, editors: Distributed Computing and Internet Technology, LNCS 6536, Springer, pp. 55–75, doi:10.1007/978-3-642-19056-8 4. [14] Kohei Honda, Vasco Vasconcelos & Makoto Kubo (1998): Language Primitives and Type Discipline for Structured Communication-Based Programming. In Chris Hankin, editor: Programming Languages and Systems, LNCS 1381, Springer, pp. 122–138, doi:10.1007/BFb0053567. [15] Kohei Honda, Nobuko Yoshida & Marco Carbone (2008): Multiparty Asynchronous Session Types. In: Proceedings of POPL 2008, pp. 273–284, doi:10.1145/1328438.1328472. [16] Raymond Hu, Dimitrios Kouzapas, Olivier Pernet, Nobuko Yoshida & Kohei Honda (2010): Type-Safe Eventful Sessions in Java. In Chris Hankin, editor: ECOOP 2010 — Object-Oriented Programming, LNCS 6183, Springer, pp. 329–353, doi:10.1007/978-3-642-14107-2 16. [17] Sung-Shik Jongmans & Farhad Arbab (2012): Overview of Thirty Semantic Formalisms for Reo. SACS 22(1), pp. 201–251, doi:10.7561/SACS.2012.1.201. [18] Sung-Shik Jongmans, Dave Clarke & José Proença (2012): A Procedure for Splitting Processes and its Application to Coordination. EPTCS 91(1), pp. 79–96, doi:10.4204/EPTCS.91.6. [19] Sung-Shik Jongmans, Francesco Santini, Mahdi Sargolzaei, Farhad Arbab & Hamideh Afsarmanesh (2011): Automatic Code Generation for the Orchestration of Web Services with Reo. In Flavio De Paoli, Ernesto Pimentel & Gianluigi Zavattaro, editors: Service-Oriented and Cloud Computing, LNCS 7592, Springer, pp. 1–16, doi:10.1007/978-3-642-33427-6 1. [20] Christian Koehler & Dave Clarke (2009): Decomposing Port Automata. In: Proceedings of SAC 2009, pp. 1369–1373, doi:10.1145/1529282.1529587. [21] Edward Lee (2006): The Problem with Threads. Computer 39(5), pp. 33–42, doi:10.1109/MC.2006.180. [22] David Parnas (1972): On the Criteria To Be Used in Decomposing Systems into Modules. CACM 15(12), pp. 1053–1058, doi:10.1145/361598.361623. [23] Terence Parr (2007): The Definitive ANTLR Reference: Building Domain-Specific Languages. The Pragmatic Bookshelf.
6cs.PL
A Greedy Blind Calibration Method for Compressed Sensing with Unknown Sensor Gains Valerio Cambareri, Amirafshar Moshtaghpour, Laurent Jacques arXiv:1610.02851v3 [cs.IT] 20 Feb 2018 Image and Signal Processing Group, ICTEAM/ELEN, Université catholique de Louvain, Louvain-la-Neuve, Belgium. E-mail: {valerio.cambareri, amirafshar.moshtaghpour, laurent.jacques}@uclouvain.be Abstract—The realisation of sensing modalities based on the principles of compressed sensing is often hindered by discrepancies between the mathematical model of its sensing operator, which is necessary during signal recovery, and its actual physical implementation, which can amply differ from the assumed model. In this paper we tackle the bilinear inverse problem of recovering a sparse input signal and some unknown, unstructured multiplicative factors affecting the sensors that capture each compressive measurement. Our methodology relies on collecting a few snapshots under new draws of the sensing operator, and applying a greedy algorithm based on projected gradient descent and the principles of iterative hard thresholding. We explore empirically the sample complexity requirements of this algorithm by testing its phase transition, and show in a practically relevant instance of this problem for compressive imaging that the exact solution can be obtained with only a few snapshots. Index Terms—Compressed Sensing, Blind Calibration, Iterative Hard Thresholding, Non-Convex Optimisation, Bilinear Inverse Problems I. I NTRODUCTION The implementation of practical sensing schemes based on Compressed Sensing (CS) [1] often encounters physical nonidealities in realising the mathematical model of the sensing operator, whose accuracy is paramount to attaining a highquality recovery of the observed signal [2]. Among such nonidealities, we here focus on the case in which each compressive measurement is affected by an unknown multiplicative factor or sensor gain, i.e., we focus on the sensing model y l = diag(g)Al x, l ∈ [p] := {1, . . . , p}, (1) where x ∈ Rn is the input signal, Al ∈ Rm×n , l ∈ [p] are independent and identically distributed (i.i.d.) random sensing matrices, and y l ∈ Rm , l ∈ [p] are the respective snapshots of measurements obtained by applying each sensing matrix to x (the reason why the acquisition is partitioned in snapshots will be cleared below). In this uncalibrated sensing model g ∈ Rm + is an unknown set of positive-valued gains that remains identical throughout the snapshots, but whose value is unknown. Hence, this sensing model is bilinear in x and g, and retrieving both quantities given the measurements is a non-trivial bilinear inverse problem (BIP). Note that (1) can be practically realised in compressive imaging schemes using snapshot (i.e., parallel) acquisition by convolving an input signal with one or more The authors are funded by the Belgian F.R.S.-FNRS. Part of this study is funded by the project A LTER S ENSE (MIS-FNRS). random masks, such as those detailed in [3]–[7]. When sensor gains are not calibrated, e.g., in the presence of fixed-pattern noise or strong pixel-response non-uniformity [8], taking a few snapshots allows for on-line blind calibration without missing any instance of the signal x due to an off-line calibration process, as we showed in previous contributions [9], [10]. There, we proved that instances of (1) with sensing matrices having i.i.d. sub-Gaussian entries (for a rigorous definition, see [11]) and (x, g) being either unstructured or endowed with subspace models can be solved by a simple, suitably initialised projected gradient descent on a non-convex objective. The number of measurements ensuring the recovery of the exact solution was shown to be1 mp & n + m, i.e., a linear sample complexity in the dimensions of the unknowns (up to log factors, and referring to the findings in [10]). In this paper we focus on the case in which the single input signal x has a k-sparse representation in a known basis. To leverage this more involved model on x we simply resort to a hard thresholding operator at each iterate of our former non-convex algorithm, turning it into a greedy scheme. The proposed greedy approach allows for blind calibration in actual CS schemes; the additional requirement of our methodology is a set of p snapshots that collects a sufficient amount of information on (x, g). Our emphasis is on assessing, at least empirically, how the sample complexity can be reduced in function of the signal-domain sparsity k (up to log factors). Hence, provided x is sufficiently sparse, we will show empirically that the total amount of measurements mp can be lower than n while still recovering both (x, g). A. Related Work Blind calibration of sensor gains has been tackled in recent literature, starting from initial approaches for uncalibrated sensor networks in [12], [13], and more recently for radiointerferometry [14]. In the context of CS, some algorithms have been proposed to cope with such model errors [15]–[19]. Interestingly, most algorithms use sparse or known subspace models for several input signals, rather than random draws of the sensing operator itself (as typically feasible in optical CS schemes [6], [7]); moreover, these works do not attain sample complexity results that grant exact recovery. A first 1 Hereafter, given two functions f, g, f & g indicates that f > Cg for some constant C > 0. work proposing such provable guarantees using a single sparse input signal was introduced by Ling and Strohmer [20] based on a lifting approach to the problem (as in [21]; improved guarantees were outlined in [22]). The main drawback of this approach is its computational complexity, given that it corresponds to very large-scale semidefinite programming. Our former contributions [9], [10] then showed that a nonconvex approach could provide exact recovery guarantees and computational advantages with respect to (w.r.t.) lifting approaches; these were inspired by the methodologies of Candès et al. [23], Sanghavi et al. [24], and Sun et al. [25] used for the closely related problem of phase retrieval. For what concerns the related task of blind deconvolution, very recent approaches to this BIP adopt similar non-convex schemes [26], [27] or alternating minimisation [28], [29], yet targeting a more general context than blind calibration and therefore subject to different requirements and conditions than those we encountered independently. Ling and Strohmer [30] proposed linear least squares for settings including (1). What is not covered, as we study a practical, non-convex solver for blind calibration under the sensing model (1) and sparse signal priors, is the identifiability of our BIP, i.e., to what extent the solution (x, g) can be uniquely and unambiguously determined given y; for completeness, we refer the reader to recent contributions on this aspect [31]–[34]. B. Contributions and Outline Our paper extends the non-convex algorithm devised in [9], [10] to account for a sparse model in the signal domain; this is a fundamental prior for CS, whereas sparse models on the gains g could be inapplicable when these are drawn at random as each sensor is manufactured. Thus, we adopt a greedy algorithm to enforce signal-domain sparsity, and detail its empirical performances as a function of our BIP’s dimensions. Our findings are presented as follows. In Sec. II we introduce the non-convex problem and propose a greedy algorithm based on hard thresholding. This algorithm is studied numerically in Sec. III, where we focus on the empirical phase transition as the problem dimensions vary. We then simulate a practical case of blind calibration for compressive imaging in Sec. IV. A conclusion is drawn afterwards. II. A G REEDY AND N ON -C ONVEX A PPROACH TO B LIND C ALIBRATION and solving argmin f (ξ, γ) are minimisers of f (ξ, γ) (i.e., the scaling of (x, g) is anyway unrecoverable), so we adopted the constraint γ ∈ Πm + which 1 . This also serves fixes one admitted solution for α = kgk m to control kγk1 during the iterates of our algorithm. We then assume that x is k-sparse w.r.t. an orthonormal basis Z ∈ Rn×n such that x = Zz ∈ ZΣnk , with Σnk := {u ∈ Rn : k = |supp u|}. Thus, to enforce sparsity we aim to solve (x̂, ĝ) = (3) ξ∈Rn ,γ∈Πm + > m where Πm + := {v ∈ R+ : 1m v = m} is the scaled probability simplex and 1m the vector of ones in Rm . To begin with, up to a scaling all points in  (ξ, γ) ∈ Rn × Rm : ξ = αx, γ = αg , α 6= 0 (4) argmin m ξ∈ZΣn k ,γ∈Π+ f (ξ, γ), (5) where the problem would be non-convex both due to the bilinear nature of f (ξ, γ) and to that of the union of kdimensional canonical subspaces Σnk . This differs w.r.t. the solver to (3) we devised in [10], as there we assumed the support T := supp z was given, i.e., a known subspace model. We now proceed to devise an algorithm solving (5) that accounts for the two constraints. Firstly, if we consider that kgk1 = m (always verified up to a scaling) there exists a value ρ > kg − 1m k∞ , ρ < 1 that quantifies the deviation of the gains w.r.t. the ideal case in which they are all equal. Note that ρ < 1 also avoids that any component of g is null, which would correspond to losing all measurements from the corresponding sensor. Hence, the gains will be inside2 Gρ := ⊥ m 1m +ρBm `∞ ∩1m , i.e., in a subset Gρ ⊂ Π+ . It is in this closed convex set that we search for g. To do so, we start from some γ 0 ∈ Gρ and compute the projected gradient w.r.t. γ, ∇⊥ γ f (ξ, γ) := Our initial approach to the blind calibration problem involved defining a simple Euclidean loss, Pp 2 1 (2) f (ξ, γ) := 2mp l=1 kdiag(γ)Al ξ − y l k2 , (x̂, ĝ) = Pp > 1 Initialise ξ 0 := mp l=1 (Al ) y l ; γ 0 := 1m ; the exact sparsity level k; j := 0. 2: while stop criteria not met do 3: {Line searches} µξ := argminυ∈R f (ξ j − υ∇ξ f (ξ j , γ j ), γ j ) µγ := argminυ∈R f (ξ j , γ j − υ∇⊥ γ f (ξ j , γ j )) 4: {Hard-thresholded signal estimate}   ξ j+1 := ZHk Z > (ξ j − µξ ∇ξ f (ξ j , γ j )) 5: {Gain estimate}   γ j+1 := PGρ γ j − µγ ∇⊥ γ f (ξ j , γ j ) 6: j := j + 1 7: end while Algorithm 1: Blind Calibration with Iterative Hard Thresholding (BC-IHT) 1: 1 mp p X P 1⊥ diag(Al ξ)(diag(γ)Al ξ − y l ). m l=1 (6) This ensures that the steps are taken on 1⊥ m . In theory, we would have to use the projection operator PGρ to ensure that a gradient step still belongs to this convex set; however, when we start from an initialisation γ 0 := 1m , we have observed that the algorithm will remain inside Gρ when convergent or, conversely, diverge independently of the presence of PGρ . Thus, we will not practically use this projector, while it will be necessary for devising guarantees as in [9]. 2 Bm `p denotes an `p -ball in Rm ; 1⊥ m denotes the orthogonal complement of 1m , i.e., all zero-mean vectors; the projection matrix P 1⊥ := I m − m 1m 1> m . m 5 4 4 4 3 mp ∼ k +m 3 mp ∼ k +m 0.95 2 1 0.2 5 0. 1 75 5 2 3 4 1 5 0 0 .2 .5 5 0.95 0.7 5 1 3 4 1 5 mp ∼ k +m 0.95 mp ∼ k +m 0.95 2 0.9 2 3 4 5 1 0.25 0.5 1 0.7 5 2 log2 m k (d) n = 210 , k = 25 3 3 4 5 4 5 mp ∼ k +m 2 0.9 0.75 3 log2 p 4 log2 p 4 1 3 (c) n = 29 , k = 27 4 1 2 (b) n = 29 , k = 26 5 0. 5 1 log2 m k 5 0.2 5 0. 5 log2 m k 5 2 0.9 0.75 2 (a) n = 29 , k = 25 3 mp ∼ k +m 2 0.9 log2 m k log2 p 3 0.95 2 0.9 0. log2 p 5 log2 p log2 p 5 4 1 5 log2 m k 0.95 0.9 0. 0.2 5 5 1 0.75 2 3 log2 m k (e) n = 210 , k = 26 (f) n = 210 , k = 27 Figure 1. Empirical phase transition of Alg. 1 as n increases (top to bottom) and k increases (left to right), as a function of m , p and fixing ρ = k report the estimated contour levels of the probability of successful recovery, as it exceeds the value indicated above of each curve. Secondly, as typically done in greedy algorithms, instead of adopting a proxy for sparsity such as the `1 -norm we iteratively enforce it by evaluating the gradient ∇ξ f (ξ, γ) = 1 mp p X A> l diag(γ)(diag(γ)Al ξ − y l ) (7) l=1 and applying after each gradient step the hard thresholding operator Hk , which sets all but the k largest-magnitude entries of the argument to 0. This operator is at the heart of Iterative Hard Thresholding (IHT, [35]) and allows us to enforce signaldomain sparsity. Finally, as in [9] we an initialisation Ppchoose > 1 by backprojection, i.e., ξ 0 := mp l=1 (Al ) y l that is an unbiased estimate of x, i.e., as p → ∞ we have that ξ 0 → Eξ 0 ≡ x. With all previous considerations, we approach our version of Blind Calibration with Iterative Hard Thresholding (BC-IHT), as summarised in Alg. 1. The line searches reported in step 3 can be computed in closed form, as they are crucial to accelerate the algorithm (albeit in a sub-optimal fashion). The step-size could be further optimised over the non-linear cost: this may yield faster convergence (see, e.g., [36]), but will be the subject of a future improvement of BC-IHT. 1 . 2 We III. E MPIRICAL P HASE T RANSITION We here propose an extensive experimental assessment of the phase transition of BC-IHT. We explore the effect of the problem dimensions in (1) on the successful recovery of both the signal and the gains, by varying n = {29 , 210 }, k = 5 5 {25 , 26 , 27 }, p = d{2, 2 4 , . . . , 25 }e and m = d{2, 2 4 , . . . , 25 } · ke, while generating 144 random instances of the problem for each of the configurations. In detail, x ∼i.i.d. N n (0, 1) is drawn as a standard Gaussian random vector3 ; g is drawn uniformly at random on Gρ for ρ = 21 ; Al ∼i.i.d. N m×n (0, 1) are drawn as i.i.d. Gaussian random matrices. We let the algorithm run given y l and Al , l ∈ [p] up to a relative change of 10−7 in the signal and gain updates. Then, we measure the probability of successful recovery h n o i 2 kx̂−xk2 Pζ (n, k, m, p) := P max kĝ−gk , < ζ kgk2 kxk2 on the trials, with ζ = −60 dB (this corresponds to an early termination of the algorithm: when convergent, it will reach the exact solution, provided we let it run for a sufficient number 3 The convention N m×n (µ, σ 2 ) indicates the generation of an m × n matrix (or vector) with i.i.d. Gaussian entries having mean µ and variance σ2 . (a) True signal x, n = 256 × 256 px (b) Recovery x̂ provided by IHT, RSNRx,x̂ = 17.83 dB 100 1.4 (c) Recovery x̂ provided by BCIHT, RSNRx,x̂ = 153.16 dB 100 1.4 75 1.2 75 1.2 50 1 50 1 0.8 25 0.8 25 0.6 1 1 25 50 75 100 (d) True gains g, m = 103 × 103 px 0.6 1 1 25 50 75 (e) Recovery ĝ provided RSNRg,ĝ = 122.76 dB 100 by BC-IHT, Figure 2. A numerical example of blind calibration for compressive imaging; the test image is a detail of “Tous les jours”, René Magritte, 1966, c Charly Herscovici, with his kind authorization - c/o SABAM-ADAGP, 2011. The artwork was retrieved at wikiart.org and is intended for fair use. A comparison of the original and retrieved signal and gains (ρ = 12 ) is reported in a-c and d-e, respectively. of iterations). The results are reported in Fig. 1 in terms of the contour levels of Pζ , as a function of log2 m k and log2 p. While a theoretical sample complexity result that grants provable convergence is still under study, we can already appreciate that the effect of increasing n for fixed sparsity levels has a mild effect on the region in which Pζ > 0.95, while it does sharpen the transition region as typically observed in standard CS. Moreover, we can appreciate the impact of increasing k on the transition region while keeping the ratios m k fixed: for larger values of k, the region in which the algorithm fails to converge almost surely is rapidly reduced. Moreover, we reported in red the curve that matches mp = C(k + m) k (i.e., log2 p = log2 C(1 + m )) for some C > 0, which roughly follows the contours’ shape in our experiments. We highlight that all the empirical evidence collected in this context correctly suggests that p > 1: this agrees with our previous finding that p & log m (see [9, Proposition 2]), i.e., if no structure is leveraged on the gains g more than one snapshot will always be needed for the algorithm to collect a sufficient amount of information on g. Thus, by interpreting the results, we can expect that if m ' 5k (a widely used rule of thumb in CS), our blind calibration method will converge for most instances of (1) and ρ < 1, once we let p > 4 we will be able to recover both (x, g). If furthermore k is sufficiently low, the total undersampling factor mp n will be below 1. IV. B LIND C ALIBRATION FOR C OMPRESSIVE I MAGING We now proceed to apply BC-IHT in a practical case, in which we process a high-dimensional red-green-blue (RGB) image x of dimension n = 256 × 256 px, which is made sparse w.r.t. a Daubechies-4 orthonormal wavelet basis with only k = 1800 non-zero coefficients. Then x is acquired by means of Gaussian random sensing matrices Al , l ∈ [p]. This experiment could be carried out with other sub-Gaussian matrix ensembles such as Bernoulli sensing matrices, with the results being substantially unaltered. Since the sparsity level of the chosen test image is high, we can simulate its acquisition with a sensor array of m = 103 × 103 px (m ≈ 6k) and use p = 5 snapshots to meet the requirements of our method; thus mp n ≈ 0.8, and once the gains are retrieved this CS scheme could revert to m n ≈ 0.16 while benefiting from the improved model accuracy provided by blind calibration. As for the gains, we set ρ = 12 and draw g uniformly at random from Gρ . We then run BC-IHT on each of the RGB channels separately, until the relative change in the signal and gain estimates falls below 10−7 ; the quality and data reported below are the worst case among the colour channels. This causes the algorithm to run for 884 iterations, achieving a high-quality xk2 estimate having RSNRx,x̂ = −20 log10 kx̂− = 153.16 dB kxk2 gk2 and RSNRg,ĝ = −20 log10 kĝ− = 122.76 dB. The quality kgk2 of the estimates can be observed in Fig. 2c and 2e. To see the beneficial effect of blind calibration, we use the accelerated version of IHT [36] given the exact sparsity level k, the snapshots y l and the corresponding sensing matrices, which form a standard CS model when concatenated vertically. Hence, accelerated IHT attempts to recover an estimate x̂ while neglecting the model error. The algorithm converges in only 29 iterations to a local minimiser x̂, whose RSNRx,x̂ = 17.83 dB. Such modest performances can be seen directly in Fig. 2b. No comparison with other blind calibration algorithms is here explored, since the choice of using a single sparse input and multiple snapshots is specific to our framework. Nevertheless, we note that (i) the computational complexity of our algorithm is competitively low, as it amounts to that of IHT plus an additional projected gradient step in the gain domain per iteration; (ii) just as a proof of convergence for IHT to a local minimiser has been devised, we expect to have provable convergence results in the same fashion, which will lead to a bound on the sample complexity that ensures the retrieval of the exact solution. V. C ONCLUSION We proposed a novel approach to blind calibration based on the use of snapshots with multiple draws of the random sensing operator, and on a greedy algorithm which enforces sparsity on the steps resulting from gradient descent on a nonconvex objective. Our approach is capable of achieving, within a few snapshots, perfect recovery of the signal and gains in a computationally efficient fashion. Hence, we conclude that when sensor calibration is a cause of concern in a sensing scheme, introducing a modality that follows (1) and using our method could be a viable option to cope with model errors. We envision that our method may be used both for blind calibration of imaging sensors, as well as distributed sensor arrays or networks if suitably modified to allow for compressive sensing. While we presented empirical evidence on the phase transition of our algorithm, a more rigorous convergence guarantee is the subject of our current study and will be presented in a future communication. R EFERENCES [1] D. L. Donoho, “Compressed sensing,” IEEE Trans. Inf. Theory, vol. 52, no. 4, pp. 1289–1306, 2006. [2] M. A. Herman and T. Strohmer, “General deviants: An analysis of perturbations in compressed sensing,” IEEE J. Sel. Top. Signal Process., vol. 4, no. 2, pp. 342–349, 2010. [3] J. Romberg, “Compressive sensing by random convolution,” SIAM J. Imag. Sci., vol. 2, no. 4, pp. 1098–1128, 2009. [4] T. Bjorklund and E. Magli, “A parallel compressive imaging architecture for one-shot acquisition,” in 2013 IEEE Picture Coding Symposium (PCS), 2013, pp. 65–68. [5] A. Liutkus, D. Martina, S. Popoff, G. Chardon, O. Katz, G. Lerosey, S. Gigan, L. Daudet, and I. Carron, “Imaging with nature: Compressive imaging using a multiply scattering medium,” Sci. Rep., vol. 4, 2014. [6] S. Bahmani and J. Romberg, “Compressive deconvolution in random mask imaging,” IEEE Trans. Comput. Imaging, vol. 1, no. 4, pp. 236– 246, 2015. [7] J. P. Dumas, M. A. Lodhi, W. U. Bajwa, and M. C. Pierce, “Computational imaging with a highly parallel image-plane-coded architecture: challenges and solutions,” Opt. Express, vol. 24, no. 6, pp. 6145–6155, Mar. 2016. [8] M. M. Hayat, S. N. Torres, E. Armstrong, S. C. Cain, and B. Yasuda, “Statistical algorithm for nonuniformity correction in focal-plane arrays,” Appl. Opt., vol. 38, no. 5, pp. 772–780, 1999. [9] V. Cambareri and L. Jacques, “A non-convex blind calibration method for randomised sensing strategies,” in 2016 4th International Workshop on Compressed Sensing Theory and its Applications to Radar, Sonar and Remote Sensing (CoSeRa), Sep. 2016, pp. 16–20. [10] ——, “Through the Haze: A Non-Convex Approach to Blind Calibration for Linear Random Sensing Models,” arXiv preprint arXiv:1610.09028, 2016, submitted to Information and Inference: A Journal of the IMA. [11] R. Vershynin, “Introduction to the non-asymptotic analysis of random matrices,” in Compressed Sensing: Theory and Applications. Cambridge University Press, 2012, pp. 210–268. [12] L. Balzano and R. Nowak, “Blind calibration of networks of sensors: Theory and algorithms,” in Networked Sensing Information and Control. Springer, 2008, pp. 9–37. [13] J. Lipor and L. Balzano, “Robust blind calibration via total least squares,” in 2014 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2014, pp. 4244–4248. [14] A. Repetti, J. Birdi, A. Dabbech, and Y. Wiaux, “A non-convex optimization algorithm for joint DDE calibration and imaging in radio interferometry,” arXiv preprint arXiv:1701.03689, 2017. [15] H. Zhu, G. Leus, and G. B. Giannakis, “Sparsity-cognizant total leastsquares for perturbed compressive sampling,” IEEE Trans. Signal Process., vol. 59, no. 5, pp. 2002–2016, 2011. [16] J. Parker, V. Cevher, and P. Schniter, “Compressive sensing under matrix uncertainties: An Approximate Message Passing approach,” in 2011 45th Asilomar Conference on Signals, Systems and Computers, Nov. 2011, pp. 804–808. [17] C. Bilen, G. Puy, R. Gribonval, and L. Daudet, “Convex Optimization Approaches for Blind Sensor Calibration Using Sparsity,” IEEE Trans. Signal Process., vol. 62, no. 18, pp. 4847–4856, Sep. 2014. [18] B. Friedlander and T. Strohmer, “Bilinear compressed sensing for array self-calibration,” in 2014 48th Asilomar Conference on Signals, Systems and Computers, Nov. 2014, pp. 363–367. [19] C. Schülke, F. Caltagirone, and L. Zdeborová, “Blind sensor calibration using approximate message passing,” J. Stat. Mech: Theory Exp., vol. 2015, no. 11, p. P11013, 2015. [20] S. Ling and T. Strohmer, “Self-calibration and biconvex compressive sensing,” Inverse Prob., vol. 31, no. 11, p. 115002, 2015. [21] A. Ahmed, B. Recht, and J. Romberg, “Blind deconvolution using convex programming,” IEEE Trans. Inf. Theory, vol. 60, no. 3, pp. 1711– 1732, 2014. [22] D. Stöger, P. Jung, and F. Krahmer, “Blind deconvolution and compressed sensing,” in 2016 4th International Workshop on Compressed Sensing Theory and its Applications to Radar, Sonar and Remote Sensing (CoSeRa), 2016, pp. 24–27. [23] E. Candès, X. Li, and M. Soltanolkotabi, “Phase Retrieval via Wirtinger Flow: Theory and Algorithms,” IEEE Trans. Inf. Theory, vol. 61, no. 4, pp. 1985–2007, Apr. 2015. [24] S. Sanghavi, R. Ward, and C. D. White, “The local convexity of solving systems of quadratic equations,” Results Math., pp. 1–40, 2016. [25] J. Sun, Q. Qu, and J. Wright, “A geometric analysis of phase retrieval,” in 2016 IEEE International Symposium on Information Theory (ISIT), Jul. 2016, pp. 2379–2383. [26] X. Li, S. Ling, T. Strohmer, and K. Wei, “Rapid, Robust, and Reliable Blind Deconvolution via Nonconvex Optimization,” arXiv preprint arXiv:1606.04933, 2016. [27] H. Mansour and U. S. Kamilov, “Multipath removal by online blind deconvolution in through-the-wall-imaging,” in 2016 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Mar. 2016, pp. 3106–3110. [28] K. Lee, N. Tian, and J. Romberg, “Fast and guaranteed blind multichannel deconvolution under a bilinear system model,” arXiv preprint arXiv:1610.06469, 2016. [29] K. Lee, Y. Li, M. Junge, and Y. Bresler, “Blind Recovery of Sparse Signals From Subsampled Convolution,” IEEE Trans. Inf. Theory, vol. 63, no. 2, pp. 802–821, Feb. 2017. [30] S. Ling and T. Strohmer, “Self-Calibration via Linear Least Squares,” arXiv preprint arXiv:1611.04196, 2016. [31] S. Choudhary and U. Mitra, “On identifiability in bilinear inverse problems,” in 2013 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2013, pp. 4325–4329. [32] ——, “Sparse blind deconvolution: What cannot be done,” in 2014 IEEE International Symposium on Information Theory (ISIT), Jun. 2014, pp. 3002–3006. [33] Y. Li, K. Lee, and Y. Bresler, “Identifiability in Blind Deconvolution With Subspace or Sparsity Constraints,” IEEE Trans. Inf. Theory, vol. 62, no. 7, pp. 4266–4275, Jul. 2016. [34] ——, “Identifiability in Bilinear Inverse Problems With Applications to Subspace or Sparsity-Constrained Blind Gain and Phase Calibration,” IEEE Trans. Inf. Theory, vol. 63, no. 2, pp. 822–842, Feb. 2017. [35] T. Blumensath and M. E. Davies, “Iterative hard thresholding for compressed sensing,” Appl. Comput. Harmon. Anal., vol. 27, no. 3, pp. 265–274, 2009. [36] T. Blumensath, “Accelerated iterative hard thresholding,” Signal Process., vol. 92, no. 3, pp. 752–756, 2012.
7cs.IT
Data-Efficient Reinforcement Learning with Probabilistic Model Predictive Control arXiv:1706.06491v2 [cs.SY] 22 Feb 2018 Sanket Kamthe Department of Computing Imperial College London Abstract Trial-and-error based reinforcement learning (RL) has seen rapid advancements in recent times, especially with the advent of deep neural networks. However, the majority of autonomous RL algorithms require a large number of interactions with the environment. A large number of interactions may be impractical in many real-world applications, such as robotics, and many practical systems have to obey limitations in the form of state space or control constraints. To reduce the number of system interactions while simultaneously handling constraints, we propose a modelbased RL framework based on probabilistic Model Predictive Control (MPC). In particular, we propose to learn a probabilistic transition model using Gaussian Processes (GPs) to incorporate model uncertainty into longterm predictions, thereby, reducing the impact of model errors. We then use MPC to find a control sequence that minimises the expected long-term cost. We provide theoretical guarantees for first-order optimality in the GP-based transition models with deterministic approximate inference for long-term planning. We demonstrate that our approach does not only achieve state-of-the-art data efficiency, but also is a principled way for RL in constrained environments. 1 Introduction Reinforcement learning (RL) is a principled mathematical framework for experience-based autonomous learnProceedings of the 21st International Conference on Artificial Intelligence and Statistics (AISTATS) 2018, Lanzarote, Spain. PMLR: Volume 84. Copyright 2018 by the author(s). Marc Peter Deisenroth Department of Computing Imperial College London ing of control policies. Its trial-and-error learning process is one of the most distinguishing features of RL [44]. Despite many recent advances in RL [25, 43, 48], a main limitation of current RL algorithms remains its data inefficiency, i.e., the required number of interactions with the environment is impractically high. For example, many RL approaches in problems with low-dimensional state spaces and fairly benign dynamics require thousands of trials to learn. This data inefficiency makes learning in real control/robotic systems without taskspecific priors impractical and prohibits RL approaches in more challenging scenarios. A promising way to increase the data efficiency of RL without inserting task-specific prior knowledge is to learn models of the underlying system dynamics. When a good model is available, it can be used as a faithful proxy for the real environment, i.e., good policies can be obtained from the model without additional interactions with the real system. However, modelling the underlying transition dynamics accurately is challenging and inevitably leads to model errors. To account for model errors, it has been proposed to use probabilistic models [42, 10]. By explicitly taking model uncertainty into account, the number of interactions with the real system can be substantially reduced. For example, in [10, 33, 1, 7], the authors use Gaussian processes (GPs) to model the dynamics of the underlying system. The PILCO algorithm [10] propagates uncertainty through time for long-term planning and learns parameters of a feedback policy by means of gradient-based policy search. It achieves an unprecedented data efficiency for learning control policies for from scratch. While the PILCO algorithm is data efficient, it has few shortcomings: 1) Learning closed-loop feedback policies needs the full planning horizon to stabilise the system, which results in a significant computational burden; 2) It requires us to specify a parametrised policy a priori, often with hundreds of parameters; 3) It cannot handle state constraints; 4) Control constraints are enforced by using a differentiable squashing function that is applied Sanket Kamthe, Marc Peter Deisenroth to the RBF policy. This allows PILCO to explicitly take control constraints into account during planning. However, this kind of constraint handling can produce unreliable predictions near constraint boundaries [41, 26, 22]. In this paper, we develop an RL algorithm that is a) data efficient, b) does not require to look at the full planning horizon, c) handles constraints naturally, d) does not require a parametrised policy, e) is theoretically justified. The key idea is to reformulate the optimal control problem with learned GP models as an equivalent deterministic problem, an idea similar to [27]. This reformulation allows us to exploit Pontryagin’s maximum principle to find optimal control signals while handling constraints in a principled way. We propose probabilistic model predictive control (MPC) with learned GP models, while propagating uncertainty through time. The MPC formulation allows to plan ahead for relatively short horizons, which limits the computational burden and allows for infinite-horizon control applications. Our approach can find optimal trajectories in constrained settings, offers an increased robustness to model errors and an unprecedented data efficiency compared to the state of the art. tions [5, 33]. The AICO model [47] uses approximate inference with (known) locally linear models. The probabilistic trajectories for model-free RL in [40] are obtained by reformulating the stochastic optimal control problem as KL divergence minimisation. We implicitly linearise the transition dynamic via moment matching approximation. Contribution The contributions of this paper are the following: 1) We propose a new ‘deterministic’ formulation for probabilistic MPC with learned GP models and uncertainty propagation for long-term planning. 2) This reformulation allows us to apply Pontryagin’s Maximum Principle (PMP) for the open-loop planning stage of probabilistic MPC with GPs. Using the PMP we can handle control constraints in a principled fashion while still maintaining necessary conditions for optimality. 3) The proposed algorithm is not only theoretically justified by optimal control theory, but also achieves a state-of-the-art data efficiency in RL while maintaining the probabilistic formulation. 4) Our method can handle state and control constraints while preserving its data efficiency and optimality properties. 2 Related Work Model-based RL: A recent survey of model based RL in robotics [35] highlights the importance of models for building adaptable robots. Instead of GP dynamics model with a zero prior mean (as used in this paper) an RBF network and linear mean functions are proposed [7, 3]. This accelerates learning and facilitates transferring a learned model from simulation to a real robot. Even implicit model learning can be beneficial: The UNREAL learner proposed in [17] learns a predictive model for the environment as an auxiliary task, which helps learning. MPC with GP transition models: GP-based predictive control was used for boiler and building control [13, 28], but the model uncertainty was discarded. In [18], the predictive variances were used within a GP-MPC scheme to actively reject periodic disturbances, although not in an RL setting. Similarly, in [31, 32], the authors used a GP prior to model additive noise and model is improved episodically. In [5, 28], the authors considered MPC problems with GP models, where only the GP’s posterior mean was used while ignoring the variance for planning. MPC methods with deterministic models are useful only when model errors and system noise can be neglected in the problem [19, 12]. Optimal Control: The application of optimal control theory for the models based on GP dynamics employs some structure in the transition model, i.e., there is an explicit assumption of control affinity [16, 33, 34, 5] and linearisation via locally quadratic approxima- Controller Learning via Probabilistic MPC We consider a stochastic dynamical system with states x ∈ RD and admissible controls (actions) u ∈ U ⊂ RU , where the state follows Markovian dynamics xt+1 = f (xt , ut ) + w (1) with an (unknown) transition function f and i.i.d. sys2 tem noise w ∼ N (0, Q), where Q = diag(σ12 , . . . , σD ). In this paper, we consider an RL setting where we seek control signals u∗0 , . . . , u∗T −1 that minimise the expected long-term cost J = E[Φ(xT )] + XT −1 t=0 E[`(xt , ut )] , (2) where Φ(xT ) is a terminal cost and `(xt , ut ) the stage cost associated with applying control ut in state xt . We assume that the initial state is Gaussian distributed, i.e., p(x0 ) = N (µ0 , Σ0 ). For data efficiency, we follow a model-based RL strategy, i.e., we learn a model of the unknown transition function f , which we then use to find open-loop1 optimal controls u∗0 , . . . , u∗T −1 that minimise (2). After every application of the control sequence, we update the learned model with the newly acquired experience 1 ‘Open-loop’ refers to the fact that the control signals are independent of the state, i.e., there is no state feedback incorporated. Sanket Kamthe, Marc Peter Deisenroth and re-plan. Section 2.1 summarises the model learning step; Section 2.2 details how to obtain the desired open-loop trajectory. 2.1 Probabilistic Transition Model We learn a probabilistic model of the unknown underlying dynamics f to be robust to model errors [42, 10]. In particular, we use a Gaussian process (GP) as a prior p(f ) over plausible transition functions f . A GP is a probabilistic non-parametric model for regression. In a GP, any finite number of function values is jointly Gaussian distributed [39]. A GP is fully specified by a mean function m(·) and a covariance function (kernel) k(·, ·). The inputs for the dynamics GP are given by tuples et := (xt , ut ), and the corresponding targets are xt+1 . x We denote the collections of training inputs and targets f y, respectively. Furthermore, we assume a Gausby X, sian (RBF, squared exponential) covariance function  ej ) = σf2 exp − 12 (e ej )T L−1 (e ej ) , (3) k(e xi , x xi − x xi − x where σf2 is the signal variance and L = diag(l1 , . . . , lD+U ) is a diagonal matrix of length-scales l1 , . . . , lD+U . The GP is trained via the standard procedure of evidence maximisation [21, 39]. We make the standard assumption that the GPs for each target dimension of the transition function f : RD × U → RD are independent. For given hyperf training targets y and a parameters, training inputs X, e∗ , the GP yields the predictive distribunew test input x f y) = N (f (e tion p(f (e x∗ )|X, x∗ )|m(e x∗ ), Σ(e x∗ )), where m(e x∗ ) = [m1 (e x∗ ), . . . , mD (e x∗ )]T (4) 2 −1 f md (e x∗ ) = kd (e x∗ , X)(K yd d + σd I)  2 Σ(e x∗ ) = diag σ12 (e x∗ ), . . . , σD (e x∗ ) (5) σd2 = σf2d (6) 2 −1 f fx e∗ ) , (7) − kd (e x∗ , X)(K kd (X, d + σd I) for all predictive dimensions d = 1, . . . , D. 2.2 Open-Loop Control To find the desired open-loop control sequence u∗0 , . . . , u∗T −1 , we follow a two-step procedure proposed in [10]. 1) Use the learned GP model to predict the long-term evolution p(x1 ), . . . , p(xT ) of the state for a given control sequence u0 , . . . , uT −1 . 2) Compute the corresponding expected long-term cost (2) and find an open-loop control sequence u∗0 , . . . , u∗T −1 that minimises the expected long-term cost. In the following, we will detail these steps. 2.2.1 Long-term Predictions To obtain the state distributions p(x1 ), . . . , p(xT ) for a given control sequence u0 , . . . , uT −1 , we iteratively predict ZZ p(xt+1 |ut ) = p(xt+1 |xt , ut )p(xt )p(f )df dxt (8) for t = 0, . . . , T − 1 , by making a deterministic Gaussian approximation to p(xt+1 |ut ) using moment matching [12, 37, 10]. This approximation has been shown to work well in practice in RL contexts [10, 1, 7, 2, 3, 33, 34] and can be computed in closed form when using the Gaussian kernel (3). A key property that we exploit is that moment matching allows us to formulate the uncertainty propagation in (8) as a ‘deterministic system function’ zt+1 = fM M (zt , ut ) , zt := [µt , Σt ] , (9) where µt , Σt are the mean and the covariance of p(xt ). For a deterministic control signal ut we further define the moments of the control-augmented distribution p(xt , ut ) as e t ], µ e t = blkdiag[Σt , 0] , (10) et, Σ e t = [µt , ut ], Σ zet := [µ such that (9) can equivalently be written as the deterministic system equation zt+1 = fM M (e zt ) . 2.2.2 (11) Optimal Open-Loop Control Sequence To find the optimal open-loop sequence u∗0 , . . . , u∗T −1 , we first compute the expected long-term cost J in (2) using the Gaussian approximations p(x1 ), . . . , p(xT ) obtained via (8) for a given open-loop control sequence u0 , . . . , uT −1 . Second, we find a control sequence that minimises the expected long-term cost (2). In the following, we detail these steps. Computing the Expected Long-Term Cost To compute the expected long-term cost in (2), we sum up the expected immediate costs Z e t )de et, Σ E[`(xt , ut )] = `(e xt )N (e xt |µ xt (12) for t = 0, . . . , T − 1. We choose `, such that this expectation and the partial derivatives ∂E[`(xt , ut )]/∂xt , ∂E[`(xt , ut )]/∂ut can be computed analytically.2 2 Choices for ` include the standard quadratic (polynomial) cost, but also costs expressed as Fourier series expansions or radial basis function networks with Gaussian basis function. Sanket Kamthe, Marc Peter Deisenroth Similar to (9), this allows us to define deterministic mappings `M M (zt , ut ) = `M M (e zt ) := E[`(xt , ut )] (13) ΦM M (zT ) := E[Φ(xT )] (14) e onto the correthat map the mean and covariance of x sponding expected costs in (2). Remark 1. The open-loop optimisation turns out to be sparse [4]. However, optimisation via the value function or dynamic programming is valid only for unconstrained controls. To address this practical shortcoming, we define Pontryagin’s Maximum Principle that allows us to formulate the constrained problem while maintaining the sparsity. We detail this sparse structure for the constrained GP dynamics problem in section 3. 2.3 Feedback Control with MPC Thus far, we presented a way for efficiently determining an open-loop controller. However, an open-loop controller cannot stabilise the system [22]. Therefore, it is essential to obtain a feedback controller. MPC is a practical framework for this [22, 15]. While interacting with the system MPC determines an H-step open-loop control trajectory u∗0 , . . . , u∗H−1 , starting from the current state xt 3 . Only the first control signal u∗0 is applied to the system. When the system transitions to xt+1 , we update the GP model with the newly available information, and MPC re-plans u∗0 , . . . , u∗H−1 . This procedure turns an open-loop controller into an implicit closedloop (feedback) controller by repeated re-planning H steps ahead from the current state. Typically, H  T , and MPC even allows for T = ∞. In this section, we provided an algorithmic framework for probabilistic MPC with learned GP models for the underlying system dynamics, where we explicitly use the GP’s uncertainty for long-term predictions (8). In the following section, we will justify this using optimal control theory. Additionally, we will discuss how to account for constrained control signals in a principled way without the necessity to warp/squash control signals as in [10]. 3 only depend on variables with neighbouring time index, i.e., ∂J/∂ut depends only variables with index t and t + 1. Furthermore, it allows us to explicitly deal with constraints on states and controls. In the following, we detail how to solve the optimal control problem (OCP) with PMP for learned GP dynamics and deterministic uncertainty propagation. We additionally provide a computationally efficient way to compute derivatives based on the maximum principle. To facilitate our discussion we first define some notation. Practical control signals are often constrained. We formally define a class of admissible controls U that are piecewise continuous functions defined on a compact space U ⊂ RU . This definition is fairly general, and commonly used zero-order-hold or first-order-hold signals satisfy this requirement. Applying admissible controls to the deterministic system dynamics fM M defined in (11) yields a set Z of admissible controlled trajectories. We define the tuple (Z, fM M , U) as our control system. For a single admissible control trajectory u0:H−1 , there will be a unique trajectory z0:H , and the pair (z0:H , u0:H−1 ) is called an admissible controlled trajectory [41]. We now define the control-Hamiltonian [6, 41, 45] for this control system as H(λt+1 , zt , ut ) = `M M (zt , ut ) + λTt+1 fM M (zt , ut ). (15) This formulation of the control-Hamiltonian is the centre piece of the Pontryagin’s approach to the OCP. The vector λt+1 can be viewed as a Lagrange multiplier for dynamics constraints associated with the OCP [6, 41]. To successfully apply PMP we need the system dynamics to have a unique solution for a given control sequence. Traditionally, this is interpreted as the system is ‘deterministic’. This interpretation has been considered a limitation of PMP [45]. In this paper, however, we exploit the fact that the moment-matching approximation (8) is a deterministic operator, similar to the projection used in EP [30, 23]. This yields the ‘deterministic’ system equations (9), (11) that map moments of the state distribution at time t to moments of the state distribution at time t + 1. Theoretical Justification 3.1 Bellman’s optimality principle [1] yields a recursive formulation for calculating the total expected cost (2) and gives a sufficient optimality condition. PMP [36] provides the corresponding necessary optimality condition. PMP allows us to compute gradients ∂J/∂ut of the expected long-term cost w.r.t. the variables that 3 A state distribution p(xt ) would work equivalently in our framework. Existence/Uniqueness of a Local Solution To apply the PMP we need to extend some of the important characteristics of ODEs to our system. In particular, we need to show the existence and uniqueness of a (local) solution to our difference equation (11). For existence of a solution we need to satisfy the difference equation point-wise over the entire horizon and for uniqueness we need the system to have only one Sanket Kamthe, Marc Peter Deisenroth singularity. For our discrete-time system equation (via the moment-matching approximation) in (9) we have the following Lemma 1. The moment matching mapping fM M is Lipschitz continuous for controls defined over a compact set U. The proof is based on bounding the gradient of fM M and detailed in the supplementary material. Existence and uniqueness of the trajectories for the moment matching difference equation are given by Lemma 2. A solution of zt+1 = fM M (zt , ut ) exists and is unique. Proof Sketch Difference equations always yield an answer for a given input. Therefore, a solution trivially exists. Uniqueness directly follows from the PicardLindelöf theorem, which we can apply due to Lemma 1. This theorem requires the discrete-time system function to be deterministic (see Appendix B of [41]). Due to our re-formulation of the system dynamics (9), this follows directly, such that the z1:T for a given control sequence u0:T −1 are unique. 3.2 Pontryagin’s Maximum Principle for GP Dynamics With Lemmas 1 2 and the definition of the controlHamiltonian 15 we can now state PMP for the control system (Z, fM M , U) as follows: Theorem 1. Let (zt∗ , u∗t ), 0 ≤ t ≤ H − 1 be an admissible controlled trajectory defined over the horizon ∗ H. If (z0:H , u∗0:H−1 ) is optimal, then there exists an ad-joint vector λt ∈ RD \ {0} satisfying the following conditions: 1. Ad-joint equation: The ad-joint vector λt is a solution to the discrete difference equation λTt = ∂ ∂fM M (zt , ut ) `M M (zt , ut ) + λTt+1 . ∂zt ∂zt (16) 2. Transversality condition: At the endpoint the adjoint vector λH satisfies λH = ∂ ΦM M (zH ) . ∂zH (17) 3. Minimum Condition: For t = 0, . . . , H − 1, we have For every t = 0, . . . , H − 1 we find optimal controls u∗t ∈ arg minν H(λt+1 , zt∗ , ν). The minimisation problem possesses additional variables λt+1 . These variables can be interpreted as Lagrange multipliers for the optimisation. They capture the impact of the control ut over the whole trajectory and, hence, these variables make the optimisation problem sparse [11]. For the GP dynamics we compute the multipliers λt in closed form, thereby, significantly reducing the computational burden to minimise the expected long-term cost J in (2). We detail this calculation in section 3.3. Remark 3. In the optimal control problem, we aim to find an admissible control trajectory that minimizes the cost subject to possibly additional constraints. PMP gives first-order optimality conditions over these admissible controlled trajectories and can be generalised to handle additional state and control constraints [45, 26, 41]. Remark 4. The Hamiltonian H in (18) is constant for unconstrained controls in time-invariant dynamics and equals 0 everywhere when the final time H is not fixed [41]. Remark 5. For linear dynamics the proposed method is a generalisation of iLQG [46]: The moment matching transition fM M implicitly linearises the transition dynamics at each time step, whereas in iLQG an explicit local linear approximation is made. For a linear fM M and a quadratic cost ` we can write the LQG case as shown in Theorem 1 in [47]. If we iterate with successive corrections to the linear approximations we obtain iLQG. 3.3 Efficient Gradient Computation With the definition of the Hamiltonian H in (15) we can efficiently calculate the gradient of the expected total cost J. For a time horizon H we can write the accumulated cost as the Bellman recursion [1] JH (zH ) := ΦM M (zH ), Jt (zt ) := `M M (zt , ut ) + Jt+1 (zt+1 ) (19) (20) for t = H − 1, . . . , 0. Since the (open-loop) control ut only impacts the future costs via zt+1 = fM M (zt , ut ) the derivative of the total cost with ut is given by ∂Jt ∂`M M (zt , ut ) ∂Jt+1 ∂fM M (zt , ut ) = + . (21) ∂ut ∂ut ∂zt+1 ∂ut (18) Comparing this expression with the definition of the Hamiltonian (15), we see that if we make the substitu∂Jt+1 tion λTt+1 = ∂z we obtain t+1 Remark 2. The minimum condition (18) can be used to find an optimal control. The Hamiltonian is minimised point-wise over the admissible control set U: ∂Jt ∂`M M (zt , ut ) ∂fM M (zt , ut ) H = + λTt+1 = . ∂ut ∂ut ∂ut ∂ut (22) H(λt+1 , zt∗ , u∗t ) = min H(λt+1 , zt∗ , ν) ν for all ν ∈ U. Sanket Kamthe, Marc Peter Deisenroth This implies that the gradient of the expected longterm cost w.r.t. ut can be efficiently computed using the Hamiltonian [45]. Next we show that the substi∂Jt+1 tution λTt+1 = ∂z is valid for the entire horizon H. t+1 For the terminal cost ΦM M (zH ) this is valid by the transversality condition (17). For other time steps we differentiate (19) w.r.t. zt , which yields ∂`M M (zt , ut ) ∂Jt+1 ∂zt+1 ∂Jt = + ∂zt ∂zt ∂zt+1 ∂zt ∂`M M (zt , ut ) ∂fM M (zt , ut ) = + λTt+1 , ∂zt ∂zt (23) (24) which is identical to the ad-joint equation (16). Hence, in our setting, PMP implies that gradient descent on the Hamiltonian H is equivalent to gradient descent on the total cost (2) [41, 11]. Algorithmically, in an RL setting, we find the optimal control sequence u∗0 , . . . , u∗H−1 as follows: 1. For a given initial (random) control sequence u0:H−1 we follow the steps described in section 2.2.1 to determine the corresponding trajectory z1:H . Addition∂Jt+1 ally, we compute Lagrange multipliers λTt+1 = ∂z t+1 during the forward propagation. Note that traditionally ad-joint equations are propagated backward to find the multipliers [6, 41]. 2. Given λt and a cost function `M M we can determine the Hamiltonians H1:H . Then we find a new control sequence u∗0:H−1 via any gradient descent method using (22). 3. Return to 1 or exit when converged. We use Sequential Quadratic Programming (SQP) with BFGS for Hessian updates [29]. The Lagrangian of SQP is a partially separable function [14]. In the PMP, this separation is explicit via the Hamiltonians, i.e., the Ht is a function of variables with index t or t+1. This leads to a block-diagonal Hessian of SQP Lagrangian [14]. The structure can be exploited to approximate the Hessian via block-updates within BFGS [14, 4] 4 Experimental Results We evaluate the quality of our algorithm in two ways: First, we assess whether probabilistic MPC leads to faster learning compared with PILCO, the current state of the art in terms of data efficiency. Second, we assess the impact of state constraints while performing the same task. We consider two RL benchmark problems: the underactuated cart-pole-swing-up and the fully actuated double-pendulum swing-up. In both tasks, PILCO is the most data-efficient RL algorithm to date [1]. u1 u u2 (a) Cart-pole with constraint. (b) Double pendulum with constraint. Figure 1: State constraints in RL benchmarks. (a) The position of the cart is constrained on the left side by a wall. (b) The angle of the inner pendulum cannot enter the grey region. Under-actuated Cart-Pole Swing-Up The cart pole system is an under-actuated system with a freely swinging pendulum of 50 cm mounted on a cart. The swing-up and balancing task cannot be solved using a linear model [38]. The cart-pole system state space consists of the position of the cart x, cart velocity ẋ, the angle θ of the pendulum and the angular velocity θ̇. A horizontal force u ∈ [−10, 10] N can be applied to the cart. Starting in a position where the pendulum hangs downwards, the objective is to automatically learn a controller that swings the pendulum up and balances it in the inverted position in the middle of the track. Constrained Cart-Pole Swing-Up For the statespace constraint experiment we place a wall on the track near the target, see Fig. 1(a). The wall is at -70 cm, which, along with force limitations, requires the system to swing from the right side. Fully-actuated Double-Pendulum The double pendulum system is a two-link robot arm (links lengths: 1 m) with two actuators at each joint. The state space consists of 2 angles and 2 angular velocities [θ1 , θ2 , θ̇1 , θ̇2 ] [1]. The torques u1 and u2 are limited to [−2, 2] Nm. Starting from a position where both links are in a downwards position, the objective is to learn a control strategy that swings the double-pendulum up and balances it in the inverted position. Constrained Double-Pendulum The doublependulum has a constraint on the angle of the inner pendulum, so that it only has a 340◦ motion range, i.e., it cannot spin through, see Fig. 1(b). The constraint blocks all clockwise swing-ups. The system is underpowered, and it has to swing clockwise first for a counter-clockwise swing-up without violating the constraints. Baselines We compare our GP-MPC approach with the following baselines: the PILCO algorithm [10, 1] and a zero-variance GP-MPC algorithm (in the flavour of [28, 5]) for RL, where the GP’s predictive variances are discarded. Due to the lack of exploration, such a zero-variance approach within PILCO (a policy search method) does not learn anything useful as already demonstrated in [1], and we do not include this baseline. We average over 10 independent experiments, where every algorithm is initialised with the same first (random) trajectory. The performance differences of the RL algorithms are therefore due to different approaches to controller learning and the induced exploration. 4.1 Data Efficiency In both benchmark experiments (cart-pole and double pendulum), we use the exact saturating cost from [1], which penalises the Euclidean distance of the tip of the (outer) pendulum from the target position, i.e., we are in a setting in which PILCO performs very well. Fig. 2(a) shows that both our MPC-based controller (blue) and the zero-variance approach successfully4 complete the task in fewer trials than the state-of-theart PILCO method (red). From the repeated trials we see that GP-MPC learns faster and more reliably than PILCO. In particular, GP-MPC and the zerovariance approach can solve the cart-pole task with high probability (90%) after three trials (9 seconds), where the first trial was random. PILCO needs two additional trials. The reason why the zero-variance approach (no model uncertainties) works in an MPC context but not within a policy search setting is that we include every observed state transition immediately in the GP dynamics model, which makes MPC fairly robust to model errors. It even allows for model-based RL with deterministic models in simple settings. Fig. 2(b) highlights that our proposed GP-MPC approach (yellow) requires on average only six trials (18 s) 4 We define ‘success’ if the pendulum tip is closer than 8 cm to the target position for ten consecutive time steps. PILCO GP-MPC Zero-Var Trial # (3 sec per trial) (a) Under-actuated cart-pole swing-up. Success % Trials The general setting is as follows: All RL algorithms start off with a single short random trajectory, which is used for learning the dynamics model. As in [10, 1] the GP is used to predict state differences xt+1 − xt . The learned GP dynamics model is then used to determine a controller based on iterated moment matching (8), which is then applied to the system, starting from x0 ∼ p(x0 ). Model learning, controller learning and application of the controller to the system constitute a ‘trial’. After each trial, the hyper-parameters of the model are updated with the newly acquired experience and learning continues. Success % Sanket Kamthe, Marc Peter Deisenroth PILCO GP-MPC Zero-Var Trial # (3 sec per trial) (b) Fully-actuated double-pendulum swing-up. Figure 2: Performance of RL algorithms. Error bars represent the standard error. (a) Cart-pole; (b) Double pendulum. GP-MPC (blue) consistently outperforms PILCO (red) and the zero-variance MPC approach (yellow) in terms of data efficiency. While the zero-variance MPC approach works well on the cart-pole task, it fails in the double-pendulum task. We attribute this to the inability to explore the state space sufficiently well. of experience to achieve a 90% success rate5 , including the first random trial. PILCO requires four additional trials, whereas the zero-variance MPC approach completely fails in this RL setting. The reason for this failure is that the deterministic predictions with a poor model in this complicated state space do not allow for sufficient exploration. We also observe that GP-MPC is more robust to the variations amongst trials. In both experiments, our proposed GP-MPC requires only 60% of PILCO’s experience, such that we report an unprecedented learning speed for these benchmarks, even with settings for which PILCO performs very well. We identify two key ingredients that are responsible for the success and learning speed of our approach: the ability to (1) immediately react to observed states by adjusting the long-term plan and (2) augment the training set of the GP model on the fly as soon as a new state transition is observed (hyper-parameters are not updated at every time step). These properties turn out to be crucial in the very early stages of learning 5 The tip of outer pendulum is closer than 22 cm to the target. Sanket Kamthe, Marc Peter Deisenroth Success % Experiment PILCO GP-MPC-Mean GP-MPC-Var PILCO GP-MPC-Var GP-MPC-Mean Cart-pole 16/100 21/100 3/100 Double Pendulum 23/100 26/100 11/100 Table 1: State constraint violations. The number of trials that resulted in state constraint violation corresponding to the trial data shown in the the Fig. 3. Trial # (3 sec or less per trial) (a) Cart-pole with constraint. Success % PILCO GP-MPC-Var GP-MPC-Mean Trial # (3 sec or less per trial) (b) Double pendulum with constraint. Figure 3: Performance with state-space constraints. Error bars represent the standard error. (a) Cart-pole; (b) Double pendulum.GP-MPC with chance constraints. GP-MPC-Var (blue) is the only method that is able to consistently solve the problem. Expected violations constraint GP-MPC-Mean (yellow) fails in cart-pole. PILCO (red) violates state constraints and struggles to complete the task. when very little information is available. If we ignored the on-the-fly updates of the GP dynamics model, our approach would still successfully learn, although the learning efficiency would be slightly decreased. 4.2 State Constraints A scenario in which PILCO struggles is a setting with state space constraints. We modify the cart-pole and the double-pendulum tasks to such a setting. Both tasks are symmetric, and we impose state constraints in such a way that only one direction of the swing-up is feasible. For the cart-pole system, we place a wall near the target position of the cart, see Fig. 1(a); the double pendulum has a constraint on the angle of the inner pendulum, so that it only has a 340◦ motion range, i.e., it cannot spin through, see Fig. 1(b). These constraints constitute linear constraints on the state. We use a quadratic cost that penalises the Euclidean distance between the tip of the pendulum and the target. This, along with the ‘implicit’ linearisation, makes the optimal control problem an ‘implicit’ QP. If a rollout violates the state constraint we immediately abort that trial and move on to the next trial. We use the same experimental set-up as data efficiency experiments. The state constraints are implemented as expected violations, i.e., E[xt ] < xlimit and chance constraints p(xt < xlimit ) ≥ 0.95. Fig. 1(a) shows that our MPCbased controller with chance constraint (blue) successfully completes the task with a small acceptable number of violations, see Table 1. The expected violation approach, which only considers the predicted mean (yellow) fails to complete the task due to repeated constraint violations. PILCO uses its saturating cost (there is little hope for learning with quadratic cost [8]) and has partial success in completing the task, but it struggles, especially during initial trials due to repeated state violations. One of the key points we observe from the Table 1 is that the incorporation of uncertainty into planning is again crucial for successful learning. If we use only predicted means to determine whether the constraint is violated, learning is not reliably ‘safe’. Incorporation of the predictive variance, however, results in significantly fewer constraint violations. 5 Conclusion and Discussion We proposed an algorithm for data-efficient RL that is based on probabilistic MPC with learned transition models using Gaussian processes. By exploiting Pontryagin’s maximum principle our algorithm can naturally deal with state and control constraints. Key to this theoretical underpinning of a practical algorithm was the re-formulation of the optimal control problem with uncertainty propagation via moment matching into an deterministic optimal control problem. MPC allows the learned model to be updated immediately, which leads to an increased robustness with respect to model inaccuracies. We provided empirical evidence that our framework is not only theoretically sound, but also extremely data efficient, while being able to learn in settings with hard state constraints. One of the most critical components of our approach is the incorporation of model uncertainty into modelling and planning. In complex environments, model Sanket Kamthe, Marc Peter Deisenroth uncertainty drives targeted exploration. It additionally allows us to account for constraints in a risk-averse way, which is important in the early stages of learning. References [1] R. E. Bellman. Dynamic Programming. Princeton University Press, Princeton, NJ, USA, 1957. [2] B. Bischoff, D. Nguyen-Tuong, T. Koller, H. Markert, and A. Knoll. Learning Throttle Valve Control Using Policy Search. In Proceedings of the European Conference on Machine Learning and Knowledge Discovery in Databases, 2013. [3] B. Bischoff, D. Nguyen-Tuong, H. van Hoof, A. McHutchon, C. E. Rasmussen, A. Knoll, J. Peters, and M. P. Deisenroth. Policy Search for Learning Robot Control using Sparse Data. In Proceedings of the International Conference on Robotics and Automation, 2014. [4] H. G. Bock and K. J. Plitt. A Multiple Shooting Algorithm for Direct Solution of Optimal Control Problems. In Proceedings 9th IFAC World Congress Budapest. Pergamon Press, 1984. [5] J. Boedecker, J. T. Springenberg, J. Wulfing, and M. Riedmiller. Approximate Real-time Optimal Control based on Sparse Gaussian Process Models. In Symposium on Adaptive Dynamic Programming and Reinforcement Learning, 2014. [6] F. H. Clarke. Optimization and Non-Smooth Analysis. Society for Industrial and Applied Mathematics, 1990. [7] M. Cutler and J. P. How. Efficient Reinforcement Learning for Robots using Informative Simulated Priors. In Proceedings of the International Conference on Robotics and Automation, 2015. [8] M. P. Deisenroth Efficient Reinforcement Learning using Gaussian Processes. KIT Scientific Publishing, 2010. [9] M. P. Deisenroth, D. Fox, and C. E. Rasmussen. Gaussian Processes for Data-Efficient Learning in Robotics and Control. Transactions on Pattern Analysis and Machine Intelligence, 37(2):408–23, 2015. [10] M. P. Deisenroth and C. E. Rasmussen. PILCO: A Model-Based and Data-Efficient Approach to Policy Search. In Proceedings of the International Conference on Machine Learning, 2011. [11] M. Diehl. Lecture Notes on Optimal Control and Estimation. 2014. [12] A. Girard, C. E. Rasmussen, J. QuinoneroCandela, and R. Murray-Smith. Gaussian Process Priors with Uncertain Inputs-Application to Multiple-Step Ahead Time Series Forecasting. Advances in Neural Information Processing Systems, 2003. [13] A. Grancharova, J. Kocijan, and T. A. Johansen. Explicit Stochastic Predictive Control of Combustion Plants based on Gaussian Process Models. Automatica, 44(6):1621–1631, 2008. [14] A. Griewank and P. L. Toint. Partitioned Variable Metric Updates for Large Structured Optimization Problems. Numerische Mathematik, 39(1):119–137, 1982. [15] L. Grüne and J. Pannek. Stability and Suboptimality Using Stabilizing Constraints. In Nonlinear Model Predictive Control Theory and Algorithms, pages 87–112. Springer, 2011. [16] P. Hennig. Optimal Reinforcement Learning for Gaussian Systems. In Advances in Neural Information Processing Systems, 2011. [17] M. Jaderberg, V. Mnih, W. M. Czarnecki, T. Schaul, J. Z. Leibo, D. Silver, and K. Kavukcuoglu. Reinforcement Learning with Unsupervised Auxiliary Tasks. In International Conference on Learning Representations, 2016. [18] E. D. Klenske, M. N. Zeilinger, B. Schölkopf, and P. Hennig. Gaussian Process-Based Predictive Control for Periodic Error Correction. Transactions on Control Systems Technology, 24(1):110– 121, 2016. [19] J. Kocijan. Modelling and Control of Dynamic Systems Using Gaussian Process Models. Advances in Industrial Control. Springer International Publishing, 2016. [20] G. Lee, S. S. Srinivasa, and M. T. Mason. GP-ILQG: Data-driven Robust Optimal Control for Uncertain Nonlinear Dynamical Systems. arXiv:1705.05344 2017. [21] D. J. C. MacKay. Introduction to Gaussian Processes. In Neural Networks and Machine Learning, volume 168, pages 133–165. Springer, Berlin, Germany, 1998. [22] D. Q. Mayne, J. B. Rawlings, C. V. Rao, and P. O. Scokaert. Constrained Model Predictive Control: Stability and Optimality. Automatica, 36(6):789–814, 2000. [23] T. P. Minka. A Family of Algorithms for Approximate Bayesian Inference. PhD thesis, Massachusetts Institute of Technology, Cambridge, MA, USA, 2001. [24] T. P. Minka. Expectation Propagation for Approximate Bayesian Inference. In Proceedings of the Conference on Uncertainty in Artificial Intelligence, 2001. Sanket Kamthe, Marc Peter Deisenroth [25] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, S. Petersen, C. Beattie, A. Sadik, I. Antonoglou, H. King, D. Kumaran, D. Wierstra, S. Legg, and D. Hassabis. Human-Level Control through Deep Reinforcement Learning. Nature, 518(7540):529–533, 2015. [26] D. S. D. S. Naidu and R. C. Naidu, Subbaram/Dorf. Optimal Control Systems. CRC Press, 2003. [27] A. Y. Ng and M. I. Jordan. PEGASUS: A Policy Search Method for Large MDPs and POMDPs. Proceedings of the Conference on Uncertainty in Artificial Intelligence, 2000. [28] T. X. Nghiem and C. N. Jones. Data-driven Demand Response Modeling and Control of Buildings with Gaussian Processes. In Proceedings of the American Control Conference, 2017. [29] J. Nocedal and S. J. Wright. Numerical Optimization. Springer, 2006. [30] M. Opper and O. Winther. Tractable Approximations for Probabilistic Models: The Adaptive TAP Mean Field Approach. Physical Review Letters, 86(17):5, 2001. [31] C. Ostafew, A. Schoellig, T. Barfoot, and J. Collier. Learning-based Nonlinear Model Predictive Control to Improve Vision-based Mobile Robot Path Tracking. Journal of Field Robotics, 33(1):133–152, 2015. [32] C. Ostafew, A. Schoellig, T. Barfoot. Robust Constrained Learning-based NMPC enabling reliable mobile robot path tracking. The International Journal of Robotics Research, 35(13):1547-1563, 2016. [33] Y. Pan and E. Theodorou. Probabilistic Differential Dynamic Programming. Advances in Neural Information Processing Systems, 2014. Process Regression. Journal of Machine Learning Research, 6(2):1939–1960, 2005. [38] T. Raiko and M. Tornio. Variational Bayesian Learning of Nonlinear Hidden State-Space Models for Model Predictive Control. Neurocomputing, 72(16–18):3702–3712, 2009. [39] C. E. Rasmussen and C. K. I. Williams. Gaussian Processes for Machine Learning. The MIT Press, Cambridge, MA, USA, 2006. [40] K. Rawlik, M. Toussaint, and S. Vijayakumar. On Stochastic Optimal Control and Reinforcement Learning by Approximate Inference. In Proceedings of Robotics: Science and Systems, 2012. [41] H. Schättler and U. Ledzewicz. Geometric Optimal Control: Theory, Methods and Examples, volume 53. 2012. [42] J. G. Schneider. Exploiting Model Uncertainty Estimates for Safe Dynamic Control Learning. In Advances in Neural Information Processing Systems. 1997. [43] D. Silver, A. Huang, C. J. Maddison, A. Guez, L. Sifre, G. van den Driessche, J. Schrittwieser, I. Antonoglou, V. Panneershelvam, M. Lanctot, S. Dieleman, D. Grewe, J. Nham, N. Kalchbrenner, I. Sutskever, T. Lillicrap, M. Leach, K. Kavukcuoglu, T. Graepel, and D. Hassabis. Mastering the Game of Go with Deep Neural Networks and Tree Search. Nature, 529(7587), 2016. [44] R. S. Sutton and A. G. Barto. Reinforcement Learning: An Introduction. The MIT Press, Cambridge, MA, USA, 1998. [45] E. Todorov. Efficient Computation of Optimal Actions. Proceedings of the National Academy of Sciences of the United States of America, 106(28):11478–83, 2009. [34] Y. Pan, E. Theodorou, and M. Kontitsis. Sample Efficient Path Integral Control under Uncertainty. Advances in Neural Information Processing Systems, 2015. [46] E. Todorov and Weiwei Li. A Generalized Iterative LQG Method for Locally-Optimal Feedback Control of Constrained Nonlinear Stochastic Systems. In Proceedings of the American Control Conference., 2005. [35] A. S. Polydoros and L. Nalpantidis. Survey of Model-Based Reinforcement Learning: Applications on Robotics. Journal of Intelligent and Robotic Systems, 86(2):153–173, 2017. [47] M. Toussaint. Robot Trajectory Optimization using Approximate Inference. In Proceedings of the International Conference on Machine Learning, 2009. [36] L. S. Pontryagin, E. F. Mishchenko, V. G. Boltyanskii, and R. V. Gamkrelidze. The Mathematical Theory of Optimal Processes. Wiley, 1962. [48] A. Yahya, A. Li, M. Kalakrishnan, Y. Chebotar, and S. Levine. Collective Robot Reinforcement Learning with Distributed Asynchronous Guided Policy Search. arXiv:1610.00673, 2016. [37] J. Quiñonero-Candela and C. E. Rasmussen. A Unifying View of Sparse Approximate Gaussian Sanket Kamthe, Marc Peter Deisenroth Appendix Sequential Quadratic Programming Lipschitz Continuity We can use SQP for solving non-linear optimization problems (NLP) of the form, Lemma 3. The moment matching mapping fM M is Lipschitz continuous for controls defined over a compact set U. Proof: Lipschitz continuity requires that the gradient ∂fM M /∂ut is bounded. The gradient is   ∂fM M ∂zt+1 ∂µt+1 ∂Σt+1 = = , . (25) ∂ut ∂ut ∂ut ∂ut h i t+1 ∂Σt+1 The derivatives ∂µ , can be computed ana∂ut ∂ut lytically [1]. We first show that the derivative ∂µt+1 /∂ut is bounded. Defining βd := (Kd + σf2d I)−1 yd , from [1], we obtain for all state dimensions d = 1, . . . , D µdt+1 = XN qdi = σf2d |I i=1 exp βdi qdi , 1 e −2 × + L−1 d Σt | e t )T (Ld − 21 (e xi − µ (26) (27)  e t )−1 (e et) , +Σ xi − µ (28) where N is the size of the training set of the dynamics ei the ith training input. The corresponding GP and x gradient w.r.t. ut is given by the last F elements of min f (x) u s.t. b(x) ≥ 0 c(x) = 0. The Lagrangian L associated with the NLP is L(x, λ, σ) = f (x) − σ T b(x) − λT c(x) (31) where, λ and σ are Lagrange multipliers. Sequential Quadratic Programming (SQP) forms a quadratic (Taylor) approximation of the objective and linear approximation of constraints at each iteration k min f (xk ) + ∇f (xk )T d + 12 dT ∇2xx L(x, λ, σ)d d s.t. b(xk ) + ∇b(xk )T d ≥ 0 c(xk ) + ∇c(xk )T d = 0. (32) The Lagrange multipliers λ associated with the equality constraint are same as the ones defined in the control Hamiltonian H 15. The Hessian matrix ∇2xx can be computed by exploiting the block diagonal structure introduced by the Hamiltonian [14, 4]. 5.1 Moment Matching Approximation [1] XN ∂µdt+1 ∂qdi = βd i (29) Following the law of iterated expectations, for target i=1 et et ∂µ ∂µ dimensions a = 1, . . . , D, we obtain the predictive mean XN e t + Ld )−1 ∈ R1×(D+F ) e t )T (Σ = βdi qdi (e xi − µ i=1 µat = Ex̃t−1 [Efa [fa (x̃t−1 )|x̃t−1 ]] = Ex̃t−1 [mfa (x̃t−1 )] (30) Z  = mfa (x̃t−1 )N x̃t−1 | µ̃t−1 , Σ̃t−1 dx̃t−1 Let us examine the individual terms in the sum on the rhs in (30): For a given trained GP kβd k < ∞ is = βaT qa , (33) constant. The definition of qdi in (28) contains an ex2 −1 βa = (Ka + σwa ) ya (34) ponentiated negative quadratic term, which is bounded e between [0, 1]. Since I + L−1 d Σt is positive definite, the with qa = [qa1 , . . . , qan ]T . The entries of qa ∈ Rn are inverse determinant is defined and bounded. Finally, computed using standard results from multiplying and σf2d < ∞, which makes qdi < ∞. The remaining term integrating over Gaussians and are given by in (30) is a vector-matrix product. The matrix is reguZ  lar and its inverse exists and is bounded (and constant qai = ka (x̃i , x̃t−1 )N x̃t−1 | µ̃t−1 , Σ̃t−1 dx̃t−1 as a function of ut . Since ut ∈ U where U is compact, we can also conclude that the vector difference in (30) (35)  is finite, which overall proves that fM M is (locally) 2 −1 − 12 1 T = σfa |Σ̃t−1 Λa + I| exp − 2 νi (Σ̃t−1 + Λa )−1 νi , Lipschitz continuous and Lemma 3. where we define νi := (x̃i − µ̃t−1 ) (36) is the difference between the training input x̃i and the mean of the test input distribution p(xt−1 , ut−1 ). Sanket Kamthe, Marc Peter Deisenroth Computing the predictive covariance matrix Σt ∈ RD×D requires us to distinguish between diagonal elements and off-diagonal elements: Using the law of total (co-)variance, we obtain for target dimensions a, b = 1, . . . , D   2 σaa = Ex̃t−1 varf [xat |x̃t−1 ] +Ef,x̃t−1 [(xat )2 ]−(µat )2 , (37) 2 σab = Ef,x̃t−1 [xat xbt ]−µat µbt , a 6= b , (38) respectively, where µat is known from (33). The offdiagonal terms do not contain the additional term Ex̃t−1 [covf [xat , xbt |x̃t−1 ]] because of the conditional independence assumption of the GP models. Different target dimensions do not covary for given x̃t−1 . We start the computation of the covariance matrix with the terms that are common to both the diagonal and the off-diagonal entries: With p(x̃t−1 ) =  N x̃t−1 | µ̃t−1 , Σ̃t−1 and the law of iterated expectations, we obtain   Ef,x̃t−1 [xat , xbt ] = Ex̃t−1 Ef [xat |x̃t−1 ] Ef [xbt |x̃t−1 ] Z = maf (x̃t−1 )mbf (x̃t−1 )p(x̃t−1 )dx̃t−1 (39) because of the conditional independence of xat and xbt given x̃t−1 . Using the definition of the mean function, we obtain Ef,x̃t−1 [xat xbt ] = βaT Qβb , (40) Z Q := ka (x̃t−1 , X)T kb (x̃t−1 , X)p(x̃t−1 )dx̃t−1 . (41) Using standard results from Gaussian multiplications and integration, we obtain the entries Qij of Q ∈ Rn×n Qij = ka (x̃i , µ̃t−1 )kb (x̃j , µ̃t−1 ) p exp |R| 1 T −1 zij 2 zij T  (42) where we define −1 R := Σ̃t−1 (Λ−1 a + Λb ) + I , −1 −1 T := Λ−1 a + Λb + Σ̃t−1 , −1 zij := Λ−1 a ν i + Λb ν j , with νi taken from (36). Hence, the off-diagonal entries of Σt are fully determined by (33)–(36), (38), (40), (41), and (42). References [1] M. P. Deisenroth, D. Fox, and C. E. Rasmussen. Gaussian Processes for Data-Efficient Learning in Robotics and Control. Transactions on Pattern Analysis and Machine Intelligence, 37(2):408–23, 2015.
3cs.SY
The MacGyver Test - A Framework for Evaluating Machine Resourcefulness and Creative Problem Solving arXiv:1704.08350v1 [cs.AI] 26 Apr 2017 Vasanth Sarathy Matthias Scheutz Tufts University Medford, MA, USA Abstract Current measures of machine intelligence are either difficult to evaluate or lack the ability to test a robot’s problem-solving capacity in open worlds. We propose a novel evaluation framework based on the formal notion of MacGyver Test which provides a practical way for assessing the resilience and resourcefulness of artificial agents. 1 Introduction Consider a situation when your only suit is covered in lint and you do not own a lint remover. Being resourceful, you reason that a roll of duct tape might be a good substitute. You then solve the problem of lint removal by peeling a full turn’s worth of tape and re-attaching it backwards onto the roll to expose the sticky side all around the roll. By rolling it over your suit, you can now pick up all the lint. This type of everyday creativity and resourcefulness is a hallmark of human intelligence and best embodied in the 1980s television series MacGyver which featured a clever secret service agent who used common objects around him like paper clips and rubber bands in inventive ways to escape difficult life-or-death situations.1 Yet, current proposals for tests of machine intelligence do not measure abilities like resourcefulness or creativity, even though this is exactly what is needed for artificial agents such as space-exploration robots, search-and-rescue agents, or even home and elder-care helpers to be more robust, resilient, and ultimately autonomous. In this paper we thus propose an evaluation framework for machine intelligence and capability consisting of practical tests for inventiveness, resourcefulness, and resilience. Specifically, we introduce the notion of MacGyver Test (MT) as a practical alternative to the Turing Test intended to advance research. 1 As a society, we place a high value on our human ability to solve novel problems and remain resilient while doing so. Beyond the media, our patent system and peer-reviewed publication systems are additional examples of us rewarding creative problem solving and elegance of solution. 2 Background: Turing Test and its Progeny Alan Turing asked whether machines could produce observable behavior (e.g., natural language) that we (humans) would say required thought in people [Turing, 1950]. He suggested that if an interrogator was unable to tell, after having a long free-flowing conversation with a machine whether she was dealing with a machine or a person, then we can conclude that the machine was “thinking”. Turing did not intend for this to be a test, but rather a prediction of sorts [Cooper and Van Leeuwen, 2013]. Nevertheless, since Turing, others have developed tests for machine intelligence that were variations of the so-called Turing Test to address a common criticism that it was easy to deceive the interrogator. Levesque et al. designed a reading comprehension test, entitled the Winograd Schema Challenge, in which the agent is presented a question having some ambiguity in the referent of a pronoun or possessive adjective. The question asks to determine the referent of this ambiguous pronoun or possessive adjective, by selecting one of two choices [Levesque et al., 2012]. Feigenbaum proposed a variation of the Turing Test in which a machine can be tested against a team of subject matter specialists through natural language conversation [Feigenbaum, 2003]. Other tests attempted to study a machine’s ability to produce creative artifacts and solve novel problems [Boden, 2010; Bringsjord et al., 2001; Bringsjord and Sen, 2016; Riedl, 2014]. Extending capabilities beyond linguistic and creative, Harnad’s Total Turing Test (T3) suggested that the range of capabilities must be expanded to a full set of robotic capacities found in embodied systems [Harnad, 1991]. Schweizer extended the T3 to incorporate species evolution and development over time and proposed the Truly Total Turing Test (T4) to test not only individual cognitive systems but whether as a species the candidate cognitive architecture in question is capable of long-term evolutionary achievement [Schweizer, 2012]. Finding that the Turing Test and its above-mentioned variants were not helping guide research and development, many proposed a task-based approach. Specific task-based goals were designed couched as toy problems that were representative of a real-world task [Cohen, 2005]. The research communities benefited greatly from this approach and focused their efforts towards specific machine capabilities like object recognition, automatic scheduling and planning, scene under- standing, localization and mapping, and even game-playing. Many public competitions and challenges emerged that tested the machine’s performance in applying these capabilities – from image recognition contests and machine learning contests. Some of these competitions even tested embodiment and robotic capacities, while combining multiple tasks. For example, the DARPA Robotics Challenge tested a robot’s ability to conduct tasks relevant to remote operation including turning valves, using a tool to break through a concrete panel, opening doors, remove debris blocking entryways. Unfortunately, the Turing Test variants as well as the taskbased challenges are not sufficient as true measures of autonomy in the real-world. Autonomy requires a multi-modal ability and an integrated embodied system to interact with the environment, and achieve goals while solving open-world problems with the limited resources available. None of these tests are interested in measuring this sort of intelligence and capability, the sort that is most relevant from a practical standpoint. 3 The MacGyver Evaluation Framework The proposed evaluation framework, based on the idea of MacGyver-esque creativity, is intended to answer the question whether embodied machines can generate, execute and learn strategies for identifying and solving seeminglyunsolvable real-world problems. The idea is to present an agent with a problem that is unsolvable with the agent’s initial knowledge and observing the agent’s problem solving processes to estimate the probability that the agent is being creative: if the agent can think outside of its current context, take some exploratory actions, and incorporate relevant environmental cues and learned knowledge to make the problem tractable (or at least computable) then the agent has the general ability to solve open-world problems more effectively.2 This type of problem solving framework is typically used in the area of automated planning for describing various sorts of problems and solution plans and is naturally suited for defining a MacGyver-esque problem and a creative solution strategy. We are now ready to formalize various notions of the MacGyver evaluation framework. 3.1 Preliminaries - Classical Planning We define L to be a first order language with predicates p(t1 , . . . , tn ) and their negations ¬p(t1 , . . . , tn ) , where ti represents terms that can be variables or constants. A predicate is grounded if and only if all of its terms are constants. We will use classical planning notions of a planning domain in L that can be represented as Σ = (S, A, γ), where S represents the set of states, A is the set of actions and γ are the transition functions. A classical planning problem is a triple P = (Σ, s0 , g), where s0 is the initial state and g is the goal state. A plan π is any sequence of actions and a plan π is a solution to the planning problem if g ⊆ γ(s0 , π). We also 2 Note that the proposed MT is a subset of Harnad’s T3, but instead of requiring robots to do “everything real people do”, MT is focused on requiring robots to exhibit resourcefulness and resilience. MT is also a subset of Schweizer’s T4 which expands T3 with the notion of species-level intelligence. consider the notion of state reachability and the set of all successor states Γ̂(s), which defines the set of states reachable from s. 3.2 A MacGyver Problem To formalize a MacGyver Problem (MGP), we define a universe and then a world within this universe. The world describes the full set of abilities of an agent and includes those abilities that the agent knows about and those of which it is unaware. We can then define an agent subdomain as representing a proper subset of the world that is within the awareness of the agent. An MGP then becomes a planning problem defined in the world, but outside the agent’s current subdomain. Definition 1 (Universe). We first define a Universe U = (S, A, γ) as a classical planning domain representing all aspects of the physical world perceivable and actionable by any and all agents, regardless of capabilities. This includes all the allowable states, actions and transitions in the physical universe. Definition 2 (World). We define a world Wt = (S t , At , γ t ) as a portion of the Universe U corresponding to those aspects that are perceivable and actionable by a particular species t of agent. Each agent species t ∈ T has a particular set of sensors and actuators allowing agents in that species to perceive a proper subset of states, actions or transition functions. Thus, a world can be defined as follows: Wt = {(S t , At , γ t ) | ((S t ⊆ S) ∨ (At ⊆ A) ∨ (γ t ⊆ γ)) ∧ ¬((S t = S) ∧ (At = A) ∧ (γ t = γ))} Definition 3 (Agent Subdomain). We next define an agent Σti = (Sit , Ati , γit ) of type t, as a planning subdomain corresponding to the agent’s perception and action within its world Wt . In other words, the agent is not fully aware of all of its capabilities at all times, and the agent domain Σti corresponds to the portion of the world that the agent is perceiving and acting at time i. Σti = {(Sit , Ati , γit ) | ((Sit ⊂ S t )∨(Ati ⊂ At )∨(γit ⊂ γ t )) ∧ ¬((Sit = S t ) ∧ (Ati = At ) ∧ (γit = γ t ))} Definition 4 (MacGyver Problem). We define a MacGyver Problem (MGP) with respect to an agent t, as a planning problem in the agent’s world Wt that has a goal state g that is currently unreachable by the agent. Formally, an MGP PM = (Wt , s0 , g), where: • s0 ∈ Sit is the initial state of the agent • g is a set of ground predicates • Sg = {s ∈ S|g ⊆ s} Where g ⊆ s′ , ∀s′ ∈ Γ̂Wt (s0 ) \ Γ̂Σti (s0 ) It naturally follows that in the context of a world Wt , the MGP PM is a classical planning problem which from the agent’s current perspective is unsolvable. We can reformulate the MGP as a language recognition problem to be able to do a brief complexity analysis. Definition 5 (MGP-EXISTENCE). Given a set of statements D of planning problems, let MGP-EXISTENCE(D) be the set of all statements P ∈ D such that P represents a MacGyver Problem PM , without any syntactical restrictions. Theorem 1 MGP-EXISTENCE is decidable. Proof. The proof is simple. The number of possible states in the agent’s subdomain Σti and the agent’s world Wt are finite. So, it is possible to do a brute-force search to see whether a solution exists in the agent’s world but not in the agent’s initial domain.  Theorem 2 MGP-EXISTENCE is EXPSPACE-complete. Proof. (Membership). An MGP amounts to looking to see if the problem is a solvable problem in the agent-domain. Upon concluding it is not solvable, the problem then becomes one of determining if it is a solvable problem in the world corresponding to the agent’s species. Each of these problems are PLAN-EXISTENCE problems, which are in EXPSPACE for the unrestricted case [Ghallab et al., 2004]. Thus, MGPEXISTENCE is in EXPSPACE. (Hardness). We can reduce the classical planning problem P (Σ, s0 , g) to an MGP (PLAN-EXISTENCE ≤pm MGPEXISTENCE), by defining a new world W. To define a new world, we extend the classical domain by one state, defining the new state as a goal state, and adding actions and transitions from every state to the new goal state. We also set the agent domain to be the same as the classical planning domain. Now, P (Σ, s0 , g) ∈ PLAN-EXISTENCE iff P (W, s0 , g) ∈ MGP-EXISTENCE for agent with domain Σ. Thus, MGPEXISTENCE is EXPSPACE-hard.  3.3 Solving a MacGyver Problem From Theorems 1 and 2, we know that, while possible, it is intractable for an agent to know whether a given problem is an MGP. From an agent’s perspective, solving an MGP is like solving any planning problem with the additional requirement to sense or learn some previously unknown state, transition function or action. Specifically, solving an MGP will involve performing some actions in the environment, making observations, extending and contracting the agent’s subdomain and exploring different contexts. Solution Strategies Definition 6 (Agent Domain Modification). A domain modification Σt∗ j involves either a domain extension or a domain contraction3. A domain extension Σt+ of an agent is an j Agent-subdomain at time j that is in the agent’s world Wt but not in the agent’s subdomain Σti in the previous time i, such that Σti  Σtj . The agent extends its subdomain through sensing and perceiving its environment and its own self - e.g., the agent can extend its domain by making an observation, receiving advice or an instruction or performing introspection. Formally, t+ t+ t+ t+ t t Σt+ j = {(Sj , Aj , γj ) | (Sj ⊂ S \ Si ) t+ t t t t ∨ (At+ j ⊂ A \ Ai ) ∨ (γj ⊂ γ \ γi )} 3 In the interest of brevity we will only consider domain extensions for now. The agent subdomain that results from a domain extension is Σtj = Σti ∪ Σt+ j t∗ t∗ A domain modification set ∆Σti = {Σt∗ 1 , Σ2 , . . . , Σn } is t a set of n domain modifications on subdomain Σi . Let Σt∆ be the subdomain resulting from applying ∆Σti on Σti Definition 7 (Strategy and Domain-Modifying Strategy). A strategy is a tuple ω = (π, ∆) of a plan π and a set ∆ of domain modifications. A domain-modifying strategy ω C involves at least one domain modification, i.e., ∆ 6= ∅. Definition 8 (Context). A context is a tuple Ci = (Σi , si ) representing the agent’s subdomain and state at time i. We are now ready to define an insightful strategy as a set of actions and domain modifications that the agent needs to perform to allow for the goal state of the problem to be reachable by the agent. Definition 9 (Insightful Strategy). Let Ci = (Σti , s0 ) be the agent’s current context. Let PM = (Wt , s0 , g) be an MGP for the agent in this context. An insightful strategy is a domain-modifying strategy ω I = (π I , ∆I ) which when applied in Ci results in a context Cj = (Σtj , sj ), where Σtj = Σt∆I such that g ⊆ s′ , ∀s′ ∈ Γ̂Σtj (sj ). Formalizing the insightful strategy in this way is somewhat analogous to the moment of insight that is reached when a problem becomes tractable (or in our definition computable) or when solution plan becomes feasible. Specifically, solving a problem involves some amount of creative exploration and domain extensions and contractions until the point when the agent has all the information it needs within its subdomain to solve the problem as a classical planning problem, and does not need any further domain extensions. We can alternatively define an insightful strategy in terms of when the goal state is not only reachable, but a solution can be discovered in polynomial time. We will next review simple toy examples to illustrate the concepts discussed thus far. 4 Operationalizing a MacGyver Problem We will consider two examples that will help operationalize the formalism presented thus far. The first is a modification of the popular Blocks World planning problem. The second is a more practical task of tightening screws, however, with the caveat that certain common tools are unavailable and the problem solver must improvise. We specifically discuss various capabilities that an agent must possess in order to overcome the challenges posed by the examples. 4.1 Toy Example: Block-and-Towel World Consider an agent tasked with moving a block from one location to another which the agent will not be able to execute without first discovering some new domain information. Let the agent subdomain Σ consist of a set of locations l = {L1, L2, L3}, two objects o = {T, B} a towel and a block, and a function locationOf : o → l representing the location of object o. Suppose the agent is aware of the following predicates and their negations: • at(o, l): an object o is at location l • near(l): the agent is near location l • touching(o): the agent is touching object o • holding(o): the agent is holding the object o We define a set of actions A in the agent domain as follows: • reach(o, l): Move the robot arm to near the object o precond: {at(o, l)} effect: {near(l)} • grasp(o, l): Grasp object o at l precond: {near(l), at(o, l)} effect: {touching(o)} • lift (o, l): Lift object o from l precond: {touching(o), at(o, l)} effect: {holding(o), ¬at(o, l), ¬near(l)} • carryT o(o, l): Carry object o to l precond: {holding(o)} effect: {¬holding(o), at(o, l)} • release(o, l): Release object o at l precond: {touching(o), at(o, l)} effect: {¬touching(o), at(o, l)} Given an agent domain Σ, and a start state s0 as defined below, we can define the agent context C = (Σ, s0 ) as a tuple with the agent domain and the start state. s0 = {at(T, L1), at(B, L2), ¬holding(T ), ¬holding(B), ¬near(L1), ¬near(L2), ¬near(L3), ¬touching(T ), ¬touching(B), locationOf (B) = L2, locationOf (T ) = L1} Consider a simple planning problem for the Block-andTowel World in which the agent must move the block B from location L2 to L3. The agent could execute a simple plan as follows to solve the problem: π1 = {reach(B, locationOf (B)), grasp(B, locationOf (B)), lif t(B, locationOf (B)), carryT o(B, L3), release(B, L3)} During the course of the plan, the agent touches and holds the block as it moves it from location L2 to L3. Using a similar plan, the agent could move the towel to any location, as well. Now, consider a more difficult planning problem in which the agent is asked to move the block from L2 to L3 without touching it. Given the constraints imposed by the problem, the goal state, is not reachable and the agent must discover an alternative way to move the block. To do so, the agent must uncover states in the world Wt that were previously not in its subdomain Σ. For example, the agent may learn that by moving the towel to location L2, the towel “covers” the block, so it might discover a new predicate covered(o1, o2) that would prevent it from touching the block. The agent may also uncover a new action push(o, l1, l2) which would allow it to push the object along the surface. To uncover new predicates and actions, the agent may have to execute an insightful strategy ω I . Once the agent’s domain has been extended, the problem becomes a standard planning problem for which the agent can discover a solution plan for covering the block with the towel and then pushing both the towel and the block from location L2 to L3. In order to autonomously resolve this problem, the agent must be able to recognize when it is stuck, discover new insights, and build new plans. Additionally, the agent must be able to actually execute this operation in the real-world. That is, the agent must have suitable robotic sensory and action mechanisms to locate and grasp and manipulate the objects. 4.2 Practical Example: Makeshift Screwdriver Consider the practical example of attaching or fastening things together, a critical task in many domains, which, depending on the situation, can require resilience to unexpected events and resourcefulness in finding solutions. Suppose an agent must affix two blocks from a set of blocks b = {B1, B2}. In order to do so, the agent has a tool box containing a set of tools t = {screwdriver, plier, hammer} and a set of fasteners f = {screw, nail}. In addition, there are other objects in the agent’s environment o = {towel, coin, mug, ducttape}. Assume the agent can sense the following relations (i.e., predicates and their negations) with respect to the objects 4 : • • • • • • • isAvailable(t): tool t is available to use fastenWith(t, f ): tool t is designed for fastener f grabW ith(t): tool t is designed to grab a fastener f isHolding(t): agent is holding tool t isReachable(t, f ): tool t can reach fastener f isCoupled(t, f ): tool t is coupled to fastener f isAttachedT o(f, b1, b2): fastener f is attached to or inserted into blocks b1 and b2 • isSecured(f, b1, b2): fastener f is tightly secured into blocks b1 and b2. We can also define a set of actions in the agent subdomain as follows: • select(t, f ): select/grasp a tool t to use with fastener f precond: {isAvailable(t), f astenW ith(t, f )} effect: {isHolding(t)} • grab(t, f ): Grab a fastener f with tool t. precond: {isHolding(t), grabW ith(t)} effect: {isCoupled(t, f )} • placeAndAlign(f, b1, b2): Place and align fastener f , and blocks b1 and b2 effect: {isAttachedT o(f, b1, b2)} • reachAndEngage(t, f ): Reach and engage the tool t with fastener f precond: {isHolding(t), f astenW ith(t, f ), isReachable(t, f )} effect: {isCoupled(t, f )} • install(f, t, b1, b2): Install the fastener f with tool t precond: {isCoupled(t, f ), isAttachedT o(f, b1, b2)} effect: {isSecured(f, b1, b2} Now suppose a screw has been loosely inserted into two blocks (isAttachedT o(screw, B1, B2)) and needs 4 Given space limitations, we have not presented the entire domain represented by this example. Nevertheless, our analysis of the MacGyver-esque properties should still hold. to be tightened (¬isSecured(screw, B1, B2)). Tightening a screw would be quite straightforward by performing actions select(), reachAndEngage(), install(). But for some reason the screwdriver has gone missing (¬isAvailable(screwdriver)). This is a MacGyver problem because there is no way for the agent, given its current subdomain of knowledge, to tighten the screw as the goal state of isSecured(screw, B1, B2) is unreachable from the agent’s current context. Hence, the agent must extend its domain. One approach is to consider one of the non-tool objects, e.g., a coin could be used as a screwdriver as well, while a mug or towel might not. The agent must be able to switch around variables in its existing knowledge to expose previously unknown capabilities of tools. For example, by switching grab(t, f ) to grab(t, o) the agent can now explore the possibility of grabbing a coin with a plier. Similarly, by relaxing constraints on variables in other relations, the agent can perform a reachAndEngage(o, f ) action whereby it can couple a makeshift tool, namely the coin, with the screw. What if the screw was in a recessed location and therefore difficult to access without an elongate arm? While the coin might fit on the head of the screw, it does not have the necessary elongation and would not be able to reach the screw. An approach here might be to grab the coin with the plier and use that assembly to tighten the screw, maybe even with some additionally duct tape for extra support. As noted earlier, generally, the agent must be able to relax some of the preexisting constraints and generate new actions. By exploring and hypothesizing and then testing each variation, the agent can expand its domain. This example, while still relatively simple for humans, helps us highlight the complexity of resources needed for an agent to perform the task. Successfully identifying and building a makeshift screwdriver when a standard screwdriver is not available shows a degree of resilience to events and autonomy and resourcefulness that we believe to be an important component of everyday creativity and intelligence. By formulating the notion of resourcefulness in this manner, we can better study the complexity of the cognitive processes and also computationalize these abilities and even formally measure them. Agent Requirements: Intelligence and Physical Embodiment When humans solve problems, particularly creative insight problems, they tend to use various heuristics to simplify the search space and to identify invariants in the environment that may or may not be relevant [Knoblich, 2009]. An agent solving an MGP must possess the ability to execute these types of heuristics and cognitive strategies. Moreover, MGPs are not merely problems in the classical planning sense, but require the ability to discover when a problem is unsolvable from a planning standpoint and then discover, through environmental exploration, relevant aspects of its surroundings in order to extend its domain of knowledge. Both these discoveries in turn are likely to require additional cognitive resources and heuristics that allow the agent to make these discoveries ef- ficiently. Finally, the agent must also be able to remember this knowledge and be able to, more efficiently, solve future instances of similar problems. From a real-world capabilities standpoint, the agent must possess the sensory and action capabilities to be able to execute this exploration and discovery process, including grasping and manipulating unfamiliar objects. These practical capabilities are not trivial, but in combination with intelligent reasoning, will provide a clear demonstration of agent autonomy while solving practical real-world problems. These examples provide a sense for the types of planning problems that might qualify as an MGP. Certain MGPs are more challenging than others and we will next present a theoretical measure for the difficulty of an MGP. 4.3 Optimal Solution and M-Number Generally, we can assume that a solvable MGP has a best solution that involves an agent taking the most effective actions, making the required observations as and when needed and uncovering a solution using the most elegant strategy. We formalize these notions by first defining optimal solutions and then the M-Number, which is the measure of the complexity of an insightful strategy in the optimal solution. Definition 10 (Optimal Solutions). Let PM = (Wt , s0 , g) be an MGP for the agent. Let π̂ be an optimal solution plan to PM . A set of optimal domain modifications is a set of doˆ is the minimum set of domain modimain modifications ∆ fications needed for the inclusion of actions in the optimal solution plan π̂. An optimal solution strategy is a solution ˆ where ∆ ˆ is a set of optimal domain strategy ω̂ = (π̂, ∆), modifications. Definition 11 (M-Number). Let PM = (Wt , s0 , g) be an MGP for the agent. Let Ω̂ = {ω̂1 , . . . , ω̂n } be the set of n optimal solution strategies. For each ω̂i ∈ Ω̂, there exists an insightful strategy ω̂iI ⊆ ω̂i . Let Ω̂I = {ω̂1I , . . . , ω̂nI } be the set of optimal insightful strategies. The set Ω̂I can be represented by a program p on some prefix universal Turing machine capable of listing elements of Ω̂I and halting. We can then use Kolmogorov complexity of the set of these insightful strategies, K(Ω̂I ) := minp∈B∗ {|p| : U(p) computes Ω̂I } [Li and Vitányi, 1997]. We define the intrinsic difficulty of the MGP (M-Number or M) as the Kolmogorov complexity of the set of optimal insightful strategies Ω̂I , M = K(Ω̂I ). As we have shown MGP-EXISTENCE is intractable and measuring the intrinsic difficulty of an MGP is not computable if we use Kolmogorov complexity. Even if we instead choose to use an alternative and computable approximation to Kolmogorov complexity (e.g., Normalized Compression Distance), determining the M-Number is difficult to do as we must consult an oracle to determine the optimal solution. In reality, an agent does not know that the problem it is facing is an MGP and even if it did know this, the agent would have a tough time determining how well it is doing. 4.4 Measuring Progress and Agent Success When we challenge each other with creative problems,we often know if the problem-solver is getting closer (“warmer”) to the solution. We formalize this idea using Solomonoff Induction. To do so, we will first designate a “judge” who, based on a strategy currently executed by the agent, guesses the probability that, in some finite number of steps, the agent is likely to have completed an insightful strategy. Consider an agent performing a strategy ω to attempt to solve an MGP PM and a judge evaluating the performance of the agent. The judge must first attempt to understand what the agent is trying to do. Thus, the judge must first hypothesize an agent model that is capable of generating ω. Let the agent be defined by the probability measure µ(ω | PM , C), where this measure represents the probability that an agent generates a strategy ω given an MGP PM when in a particular context C. The judge does not know µ in advance and the measure could change depending on the type of agent. For example, a random agent could have µ(ω) = 2−|ω| , whereas a MacGyver agent could be represented by a different probability measure. Not knowing the type of agent, we want the judge to be able to evaluate as many different types of agents as possible. There are infinitely many different types of agents and accordingly infinitely many different hypotheses µ for an agent. Thus, we cannot simply take an expected value with respect to a uniform distribution, as some hypotheses must be weighed more heavily than others. Solomonoff devised a universal distribution over a set of computable hypotheses from the perspective of computability theory [Solomonoff, 1960]. The universal prior of a hypothesis was defined: P (µ) ≡ X 2−|p| p:U (p,ω)=µ(ω) The judge applies the principle of Occam’s razor - given many explanations (in our case hypotheses), the simplest is the most likely, and we can approximate P (µ) ≡ 2−K(µ) , where K(µ) is the Kolmogorov complexity of measure µ. To be able to measure the progress of an agent solving an MGP, we must be able to define a performance metric Rµ . In this paper, we do not develop any particular performance metric, but suggest that a performance metric be proportional to the level of resourcefulness and creativity of the agent. Generally, measuring progress may depend on problem scope, control variables, length and elegance of the solution and other factors. Nevertheless, a simple measure of this sort can serve as a placeholder to develop our theory. We are now ready to define the performance or progress of an agent solving an MGP. Definition 12 (Expected Progress). Consider an agent in context C = (Σti , s0 ) solving an MGP PM = (Wt , s0 , g). The agent has executed strategy ω comprising actions and domain modifications. Let U be the space of all programs that compute a measure of agent resourcefulness. Consider a judge observing the agent and fully aware of the agent’s context and knowledge and the MGP itself. Let the judge be prefix universal Turing machine U and let K be the Kolmogorov complexity function. Let the performance metric, which is an interpretation of the cumulative state of the agent resourcefulness in solving the MGP, be Rµ . The expected progress of this agent as adjudicated by the judge is: X M (ω) ≡ 2−K(µ) · Rµ µ∈U Now, we are also interested in seeing whether the agent, given this strategy ω is likely to improve its performance over the next k actions. The judge will need to predict the continuation of this agent’s strategy taking all possible hypotheses of the agent’s behavior into account. Let ω + be a possible continuation and let a represent concatenation. M (ω a ω + ) M (ω) The judge is a Solomonoff predictor such that the predicted finite continuation ω + is likely to be one in which ω a ω + is less complex in the Kolmogorov sense. The judge measures the state of the agent’s attempts at solving the MGP and can also predict how the agent is likely to perform in the future. M (ω a ω + | ω) = 5 Conclusion and Future Work In the Apollo 13 space mission, astronauts together with ground control had to overcome several challenges to bring the team safely back to Earth [Lovell and Kluger, 2006]. One of these challenges was controlling carbon dioxide levels onboard the space craft: “For two days straight [they] had worked on how to jury-rig the Odysseys canisters to the Aquariuss life support system. Now, using materials known to be available onboard the spacecraft – a sock, a plastic bag, the cover of a flight manual, lots of duct tape, and so on – the crew assembled a strange contraption and taped it into place. Carbon dioxide levels immediately began to fall into the safe range.” [Cass, 2005; Team, 1970]. We proposed the MacGyver Test as a practical alternative to the Turing Test and as a formal alternative to robotic and machine learning challenges. The MT does not require any specific internal mechanism for the agent, but instead focuses on observed problem-solving behavior akin to the Apollo 13 team. It is flexible and dynamic allowing for measuring a wide range of agents across various types of problems. It is based on fundamental notions of set theory, automated planning, Turing computation, and complexity theory that allow for a formal measure of task difficulty. Although Kolmogorov complexity and the Solomonoff Induction measures are not computable, they are formally rigorous and can be substituted with computable approximations for practical applications. In future work, we plan to develop more examples of MGPs and also begin to unpack any interesting aspects of the problem’s structure, study its complexity and draw comparisons between problems. We believe that the MT formally captures the concept of practical intelligence and everyday creativity that is quintessentially human and practically helpful when designing autonomous agents. Most importantly, the intent of the MT and the accompanying MGP formalism is to help guide research by providing a set of mathematically formal specifications for measuring AI progress based on an agent’s ability to solve increasingly difficult MGPs. We thus invite researchers to develop MGPs of varying difficulty and design agents that can solve them. References [Boden, 2010] Margaret A. Boden. The Turing test and artistic creativity. Kybernetes, 39(3):409–413, 2010. [Bringsjord and Sen, 2016] Selmer Bringsjord and Atriya Sen. On Creative Self-Driving Cars: Hire the Computational Logicians, Fast. page Forthcoming, 2016. [Bringsjord et al., 2001] Selmer Bringsjord, Paul Bello, and David Ferrucci. Creativity, the Turing test, and the (better) Lovelace Test. Minds and Machines, 11(1):3–27, 2001. [Cass, 2005] Stephen Cass. Apollo 13, we have a solution. IEEE Spectrum On-line, 04, 1, 2005. [Cohen, 2005] Paul R Cohen. If not turing’s test, then what? AI Magazine, 26(4):61, 2005. [Cooper and Van Leeuwen, 2013] S Barry Cooper and Jan Van Leeuwen. Alan Turing: His work and impact. 2013. [Feigenbaum, 2003] Edward A. Feigenbaum. Some challenges and grand challenges for computational intelligence. Journal of the ACM, 50(1):32–40, 2003. [Ghallab et al., 2004] Malik Ghallab, Dana Nau, and Paolo Traverso. Automated Planning: Theory and Practice. 2004. [Harnad, 1991] Stevan Harnad. Other bodies, other minds: A machine incarnation of an old philosophical problem. Minds and Machines, 1(1):43–54, 1991. [Knoblich, 2009] Günther Knoblich. Psychological research on insight problem solving. In Recasting reality, pages 275–300. Springer, 2009. [Levesque et al., 2012] Hector Levesque, Ernest Davis, and Leora Morgenstern. The Winograd Schema Challenge. In Thirteenth International Conference on the Principles of Knowledge Representation and Reasoning, 2012. [Li and Vitányi, 1997] M Li and Paul Vitányi. An introduction to Kolmogorov complexity and its applications. (Second edition). Computers & Mathematics with Applications, 34:137, 1997. [Lovell and Kluger, 2006] Jim Lovell and Jeffrey Kluger. Apollo 13. Houghton Mifflin Harcourt, 2006. [Riedl, 2014] Mark O. Riedl. The Lovelace 2.0 Test of Artificial Creativity and Intelligence. arXiv preprint arXiv:1410.6142v3, page 2, 2014. [Schweizer, 2012] Paul Schweizer. The externalist foundations of a truly total turing test. Minds and Machines, 22(3):191–212, 2012. [Solomonoff, 1960] RJ Solomonoff. A preliminary report on a general theory of inductive inference. Zator Technical Bulletin, (138), 1960. [Team, 1970] Mission Evaluation Team. Mission operations report apollo 13. 1970. [Turing, 1950] Alan M Turing. Computing Machine and Intelligence. MIND, LIX(236):433–460, 1950.
2cs.AI
Synthesizing Dynamic Patterns by Spatial-Temporal Generative ConvNet Jianwen Xie, Song-Chun Zhu, and Ying Nian Wu University of California, Los Angeles (UCLA), USA arXiv:1606.00972v2 [stat.ML] 29 May 2017 [email protected], [email protected], [email protected] Abstract models that can be used for unsupervised learning. In terms of synthesis, various approaches based on the ConvNet have been proposed to synthesize realistic static images [3, 7, 1, 13, 16]. However, there has not been much work in the literature on synthesizing dynamic patterns based on the ConvNet, and this is the focus of the present paper. Specifically, we propose to synthesize dynamic patterns by generalizing the generative ConvNet model recently proposed by [29]. The generative ConvNet can be derived from the discriminative ConvNet. It is a random field model or an energy-based model [15, 20] that is in the form of exponential tilting of a reference distribution such as the Gaussian white noise distribution or the uniform distribution. The exponential tilting is parametrized by a ConvNet that involves multiple layers of linear filters and rectified linear units (ReLU) [12], which seek to capture features or patterns at different scales. The generative ConvNet can be sampled by the Langevin dynamics. The model can be learned by the stochastic gradient algorithm [31]. It is an “analysis by synthesis” scheme that seeks to match the synthesized signals generated by the Langevin dynamics to the observed training signals. Specifically, the learning algorithm iterates the following two steps after initializing the parameters and the synthesized signals. Step 1 updates the synthesized signals by the Langevin dynamics that samples from the currently learned model. Step 2 then updates the parameters based on the difference between the synthesized data and the observed data in order to shift the density of the model from the synthesized data towards the observed data. It is shown by [29] that the learning algorithm can synthesize realistic spatial image patterns such as textures and objects. In this article, we generalize the spatial generative ConvNet by adding the temporal dimension, so that the resulting ConvNet consists of multiple layers of spatial-temporal filters that seek to capture spatial-temporal patterns at various scales. We show that the learning algorithm for training the spatial-temporal generative ConvNet can synthesize realistic dynamic patterns. We also show that it is possible to learn the model from incomplete video sequences with either occluded pixels or missing frames, so that model learning and Video sequences contain rich dynamic patterns, such as dynamic texture patterns that exhibit stationarity in the temporal domain, and action patterns that are non-stationary in either spatial or temporal domain. We show that a spatialtemporal generative ConvNet can be used to model and synthesize dynamic patterns. The model defines a probability distribution on the video sequence, and the log probability is defined by a spatial-temporal ConvNet that consists of multiple layers of spatial-temporal filters to capture spatialtemporal patterns of different scales. The model can be learned from the training video sequences by an “analysis by synthesis” learning algorithm that iterates the following two steps. Step 1 synthesizes video sequences from the currently learned model. Step 2 then updates the model parameters based on the difference between the synthesized video sequences and the observed training sequences. We show that the learning algorithm can synthesize realistic dynamic patterns. 1. Introduction There are a wide variety of dynamic patterns in video sequences, including dynamic textures [2] or textured motions [24] that exhibit statistical stationarity or stochastic repetitiveness in the temporal dimension, and action patterns that are non-stationary in either spatial or temporal domain. Synthesizing and analyzing such dynamic patterns has been an interesting problem. In this paper, we focus on the task of synthesizing dynamic patterns using a generative version of the convolutional neural network (ConvNet or CNN). The ConvNet [14, 12] has proven to be an immensely successful discriminative learning machine. The convolution operation in the ConvNet is particularly suited for signals such as images, videos and sounds that exhibit translation invariance either in the spatial domain or the temporal domain or both. Recently, researchers have become increasingly interested in the generative aspects of ConvNet, for the purpose of visualizing the knowledge learned by the ConvNet, or synthesizing realistic signals, or developing generative 1 pattern completion can be accomplished simultaneously. 2. Related work Our work is a generalization of the generative ConvNet model of [29] by adding the temporal dimension. [29] did not work on dynamic patterns such as those in the video sequences. The spatial-temporal discriminative ConvNet was used by [11] for analyzing video data. The connection between discriminative ConvNet and generative ConvNet was studied by [29]. Dynamic textures or textured motions have been studied by [2, 24, 25, 9]. For instance, [2] proposed a vector auto-regressive model coupled with frame-wise dimension reduction by single value decomposition. It is a linear model with Gaussian innovations. [24] proposed a dynamic model based on sparse linear representation of frames. See [30] for a recent review of dynamic textures. The spatial-temporal generative ConvNet is a non-linear and non-Gaussian model and is expected to be more flexible in capturing complex spatial-temporal patterns in dynamic textures with multiple layers of non-linear spatial-temporal filters. Recently [23] generalized the generative adversarial networks [6] to model dynamic patterns. Our model is an energy-based model and it also has an adversarial interpretation. See section 3.4 for details. For temporal data, a popular model is the recurrent neural network [27, 10]. It is a causal model and it requires a starting frame. In contrast, our model is non-causal, and does not require a starting frame. Compared to the recurrent network, our model is more convenient and direct in capturing temporal patterns at multiple time scales. 3.1. Spatial-temporal filters Nl−1 X X (l,k) wi,y,s i=1 (y,s)∈Sl ! × (l−1) [Fi 3.2. Spatial-temporal generative ConvNet The spatial-temporal generative ConvNet is an energybased model or a random field model defined on the image sequence I = (I(x, t), x ∈ D, t ∈ T ). It is in the form of exponential tilting of a reference distribution q(I): p(I; w) = f (I; w) = To fix notation, let I(x, t) be an image sequence of a video defined on the square (or rectangular) image domain D and the time domain T , where x = (x1 , x2 ) ∈ D indexes the coordinates of pixels, and t ∈ T indexes the frames in the video sequence. We can treat I(x, t) as a three dimensional function defined on D × T . For a spatial-temporal filter F , we let F ∗ I denote the filtered image sequence or feature map, and let [F ∗ I](x, t) denote the filter response or feature at pixel x and time t. The spatial-temporal ConvNet is a composition of multiple layers of linear filtering and ReLU non-linearity, as expressed by the following recursive formula: (l) (l−1) that operates on (Fi ∗ I, i = 1, ..., Nl−1 ). The linear filtering operation is followed by ReLU h(r) = max(0, r). (0) At the bottom layer, [Fk ∗ I](x, t) = Ik (x, t), where k ∈ {R, G, B} indexes the three color channels. Sub(l) sampling may be implemented so that in [Fk ∗ I](x, t), x ∈ Dl ⊂ D, and t ∈ Tl ⊂ T . The spatial-temporal filters at multiple layers are expected to capture the spatial-temporal patterns at multiple scales. It is possible that the top-layer filters are fully connected in the spatial domain as well as the temporal domain (e.g., the feature maps are 1 × 1 in the spatial domain) if the dynamic pattern does not exhibit spatial or temporal stationarity. ∗ I](x + y, t + s) + bl,k , 1 exp [f (I; w)] q(I), Z(w) (2) where the scoring function f (I; w) is 3. Spatial-temporal generative ConvNet [Fk ∗ I](x, t) = h (l) where l ∈ {1, 2, ..., L} indexes the layers. {Fk , k = (l−1) ,i = 1, ..., Nl } are the filters at layer l, and {Fi 1, ..., Nl−1 } are the filters at layer l − 1. k and i are used to index filters at layers l and l − 1 respectively, and Nl and Nl−1 are the numbers of filters at layers l and l − 1 respectively. The filters are locally supported, so the range of (y, s) is within a local support Sl (such as a 7 × 7 × 3 box of image sequence). The weight parameters (l,k) (wi,y,s , (y, s) ∈ Sl , i = 1, ..., Nl−1 ) define a linear filter (1) K X X X (L) [Fk ∗ I](x, t), (3) k=1 x∈DL t∈TL where w consists of all the weight and bias terms that define (L) the filters (Fk , k = 1, ..., K = NL ) at layer L, and q is the Gaussian white noise model, i.e.,   1 1 2 q(I) = ||I|| , (4) exp − 2σ 2 (2πσ 2 )|D×T |/2 where |D × T | counts the number of pixels in the domain D × T . Without loss of generality, we shall assume σ 2 = 1. The scoring function f (I; w) in (3) tilts the Gaussian reference distribution into a non-Gaussian model. In fact, the purpose of f (I; w) is to identify the non-Gaussian spatialtemporal features or patterns. In the definition of f (I; w) in (3), we sum over the filter responses at the top layer L over all the filters, positions and times. The spatial and temporal pooling reflects the fact that we assume the model is stationary in spatial and temporal domains. If the dynamic texture is non-stationary in the spatial or temporal domain, (L) then the top layer filters Fk are fully connected in the spatial or temporal domain, e.g., DL is 1 × 1. A simple but consequential property of the ReLU nonlinearity is that h(r) = max(0, r) = 1(r > 0)r, where 1() is the indicator function, so that 1(r > 0) = 1 if r > 0 and 0 otherwise. As a result, the scoring function f (I; w) is piecewise linear [17], and each linear piece is defined by the multiple  layers of binaryactivation vari(l) (l) ables δk,x,t (I; w) = 1 [Fk ∗ I](x, t) > 0 , which tells us whether a local spatial-temporal pattern represented by the (l) k-th filter at layerl, Fk , is detected at position x and time  (l) t. Let δ(I; w) = δk,x,t (I; w), ∀l, k, x, t be the activation pattern of I. Then δ(I; w) divides the image space into a large number of pieces according to the value of δ(I; w). On each piece of image space with fixed δ(I; w), the scoring function f (I; w) is linear, i.e., f (I; w) = aw,δ(I;w) + hI, Bw,δ(I;w) i, (5) where both a and B are defined by δ(I; w) and w. In fact, B = ∂f (I; w)/∂I, and can be computed by backpropagation, with h0 (r) = 1(r > 0). The back-propagation process defines a top-down deconvolution process [32], where the filters at multiple layers become the basis functions at those layers, and the activation variables at different layers in δ(I; w) become the coefficients of the basis functions in the top-down deconvolution. p(I; w) in (2) is an energy-based model [15, 20], whose energy function is a combination of the `2 norm kIk2 that comes from the reference distribution q(I) and the piecewise linear scoring function f (I; w), i.e., 1 E(I; w) = −f (I; w) + kIk2 2  1 2 = kIk − aw,δ(I;w) + hI, Bw,δ(I;w) i 2 1 = kI − Bw,δ(I;w) k2 + const, 2 (6) where const = −aw,δ(I;w) − kBw,δ(I;w) k2 /2, which is constant on the piece of image space with fixed δ(I; w). Since E(I; w) is a piecewise quadratic function, p(I; w) is piecewise Gaussian. On the piece of image space {I : δ(I; w) = δ}, where δ is a fixed value of δ(I; w), p(I; w) is N(Bw,δ , 1) truncated to {I : δ(I; w) = δ}, where we use 1 to denote the identity matrix. If the mean of this Gaussian piece, Bw,δ , is within {I : δ(I; w) = δ}, then Bw,δ is also a local mode, and this local mode I satisfies a hierarchical autoencoder, with a bottom-up encoding process δ = δ(I; w), and a top-down decoding process I = Bw,δ . In general, for an image sequence I, Bw,δ(I;w) can be considered a reconstruction of I, and this reconstruction is exact if I is a local mode of E(I; w). 3.3. Sampling and learning algorithm One can sample from p(I; w) of model (2) by the Langevin dynamics: Iτ +1 = Iτ −  2  Iτ − Bw,δ(Iτ ;w) + Zτ , 2 (7) where τ indexes the time steps,  is the step size, and Zτ ∼ N(0, 1). The dynamics is driven by the reconstruction error I − Bw,δ(I;w) . The finiteness of the step size  can be corrected by a Metropolis-Hastings acceptance-rejection step. The Langevin dynamics can be extended to Hamiltonian Monte Carlo [18] or more sophisticated versions [5]. The learning of w from training image sequences {Im , m = 1, ..., M } can be accomplished by the maximum PM likelihood. Let L(w) = m=1 log p(I; w)/M , with p(I; w) defined in (2),   M ∂L(w) 1 X ∂ ∂ = f (Im ; w)−Ew f (I; w) . (8) ∂w M m=1 ∂w ∂w The expectation can be approximated by the Monte Carlo samples [31] produced by the Langevin dynamics. See Algorithm 1 for a description of the learning and sampling algorithm. The algorithm keeps synthesizing image sequences from the current model, and updating the model parameters in order to match the synthesized image sequences to the observed image sequences. The learning algorithm keeps shifting the probability density or low energy regions of the model from the synthesized data towards the observed data. In the learning algorithm, the Langevin sampling step involves the computation of ∂f (I; w)/∂I, and the parameter updating step involves the computation of ∂f (I; w)/∂w. Because of the ConvNet structure of f (I; w), both gradients can be computed efficiently by back-propagation, and the two gradients share most of their chain rule computations in back-propagation. In term of MCMC sampling, the Langevin dynamics samples from an evolving distribution because w(t) keeps changing. Thus the learning and sampling algorithm runs non-stationary chains. 3.4. Adversarial interpretation Our model is an energy-based model p(I; w) = 1 exp[−E(I; w)]. Z(w) (9) The update of w is based on L0 (w) which can be approximated by M̃ M 1 X ∂ 1 X ∂ E(Ĩm ; w) − E(Im ; w), M m=1 ∂w M̃ m=1 ∂w (10) where {Ĩm , m = 1, ..., M̃ } are the synthesized image sequences that are generated by the Langevin dynamics. At Algorithm 1 Learning and sampling algorithm Input: (1) training image sequences {Im , m = 1, ..., M } (2) number of synthesized image sequences M̃ (3) number of Langevin steps l (4) number of learning iterations T Output: (1) estimated parameters w (2) synthesized image sequences {Ĩm , m = 1, ..., M̃ } 1: 2: 3: 4: 5: 6: 7: 8: (a) river (0) Let t ← 0, initialize w . Initialize Ĩm , for m = 1, ..., M̃ . repeat For each m, run l steps of Langevin dynamics to update Ĩm , i.e., starting from the current Ĩm , each step follows equationP (7). M ∂ (t) Calculate H obs = m=1 ∂w f (Im ; w )/M , and P M̃ ∂ H syn = m=1 ∂w f (Ĩm ; w(t) )/M̃ . (t+1) Update w ← w(t) + ηt (H obs − H syn ), with step size ηt . Let t ← t + 1 until t = T (b) ocean Figure 1. Synthesizing dynamic textures with both spatial and temporal stationarity. For each category, the first row displays the frames of the observed sequence, and the second and third rows display the corresponding frames of two synthesized sequences generated by the learning algorithm. (a) river. (b) ocean. the zero temperature limit, the Langevin dynamics becomes gradient descent: Ĩτ +1 = Ĩτ − 2 ∂ E(Ĩτ ; w). 2 ∂ Ĩ (11) Consider the value function V (Ĩm , m = 1, ..., M̃ ; w): M̃ M 1 X 1 X E(Ĩm ; w) − E(Im ; w). M m=1 M̃ m=1 (12) The updating of w is to increase V by shifting the low energy regions from the synthesized image sequences {Ĩm } to the observed image sequences {Im }, whereas the updating of {Ĩm , m = 1, ..., M̃ } is to decrease V by moving the synthesized image sequences towards the low energy regions. This is an adversarial interpretation of the learning and sampling algorithm. It can also be considered a generalization of the herding method [26] from exponential family models to general energy-based models. In our work, we let −E(I; w) = f (I; w) − kIk2 /2σ 2 . We can also let −E(I; w) = f (I; w) by assuming a uniform reference distribution q(I). Our experiments show that the model with the uniform q can also synthesize realistic dynamic patterns. The generative adversarial learning [6, 23] has a generator network. Unlike our model which is based on a bottom-up ConvNet f (I; w), the generator network generates I by a top-down ConvNet I = g(X; w̃) where X is a latent vector that follows a known prior distribution, and w̃ collects the parameters of the top-down ConvNet. Recently [8] developed an alternating back-propagation algorithm to train the generator network, without involving an extra network. More recently, [28] developed a cooperative training method that recruits a generator network g(X; w̃) to reconstruct and regenerate the synthesized image sequences {Ĩm } to speed up MCMC sampling. 4. Experiments We learn the spatial-temporal generative ConvNet from video clips collected from DynTex++ dataset of [4] and the Internet. The code in the experiments is based on the MatConvNet of [22] and MexConv3D of [21]. We show the synthesis results by displaying the frames in the video sequences. We have posted the synthesis results on the project page http://www.stat.ucla.edu/ ~jxie/STGConvNet/STGConvNet.html, so that the reader can watch the videos. 4.1. Experiment 1: Generating dynamic textures with both spatial and temporal stationarity We first learn the model from dynamic textures that are stationary in both spatial and temporal domains. We use spatial-temporal filters that are convolutional in both spatial and temporal domains. The first layer has 120 15 × 15 × 15 filters with sub-sampling size of 7 pixels and frames. The (a) flashing lights Figure 3. Comparison on synthesizing dynamic texture of waterfall. From top to bottom: segments of the observed sequence, synthesized sequence by our method, and synthesized sequence by the method of [2]. (b) fountain (c) burning fire heating a pot category from one observed video that is prepared to be of the size 224 × 224 × 50 or 70. The range of intensities is [0, 255]. Mean subtraction is used as pre-processing. We use M̃ = 3 chain for Langevin sampling. The number of Langevin iterations between every two consecutive updates of parameters, l = 20. The number of learning iterations T = 1200, where we add one more layer every 400 iterations. We use layer-specific learning rates, where the learning rate at the higher layer is less than that at the lower layer, in order to obtain stable convergence. 4.2. Experiment 2: Generating dynamic textures with only temporal stationarity (d) spring water Figure 2. Synthesizing dynamic textures with only temporal stationarity. For each category, the first row displays the frames of the observed sequence, and the second row displays the corresponding frames of a synthesized sequence generated by the learning algorithm. (a) flashing lights. (b) fountain. (c) burning fire heating a pot. (d) spring water. second layer has 40 7×7×7 filters with sub-sampling size of 3. The third layer has 20 3 × 3 × 2 filters with sub-sampling size of 2 × 2 × 1. Figure 1 displays 2 results. For each category, the first row displays 7 frames of the observed sequence, while the second and third rows show the corresponding frames of two synthesized sequences generated by the learning algorithm. We use the layer-by-layer learning scheme. Starting from the first layer, we sequentially add the layers one by one. Each time we learn the model and generate the synthesized image sequence using Algorithm 1. While learning the new layer of filters, we refine the lower layers of filters with back-propagation. We learn a spatial-temporal generative ConvNet for each Many dynamic textures have structured background and objects that are not stationary in the spatial domain. In this case, the network used in Experiment 1 may fail. However, we can modify the network in Experiment 1 by using filters that are fully connected in the spatial domain at the second layer. Specifically, the first layer has 120 7 × 7 × 7 filters with sub-sampling size of 3 pixels and frames. The second layer is a spatially fully connected layer, which contains 30 filters that are fully connected in the spatial domain but convolutional in the temporal domain. The temporal size of the filters is 4 frames with sub-sampling size of 2 frames in the temporal dimension. Due to the spatial full connectivity at the second layer, the spatial domain of the feature maps at the third layer is reduced to 1 × 1. The third layer has 5 1 × 1 × 2 filters with sub-sampling size of 1 in the temporal dimension. We use end-to-end learning scheme to learn the above 3-layer spatial-temporal generative ConvNet for dynamic textures. At each iteration, the 3 layers of filters are updated with 3 different layer-specific learning rates. The learning rate at the higher layer is much less than that at the lower layer to avoid the issue of large gradients. We learn a spatial-temporal generative ConvNet for each category from one training video. We synthesize M̃ = 3 observed sequences (a) 21-st frame of 30 observed sequences synthesized sequences (a) running cows (b) 21-st frame of 30 synthesized sequences (c) 2 examples of synthesized sequences Figure 4. Learning from 30 observed fire videos with mini-batch implementation. videos using the Langevin dynamics. Figure 2 displays the results. For each category, the first row shows 6 frames of the observed sequence (224 × 224 × 70), and the second row shows the corresponding frames of a synthesized sequence generated by the learning algorithm. We use the same set of parameters for all the categories without tuning. Figure 3 compares our method to that of [2], which is a linear dynamic system model. The image sequence generated by this model appears more blurred than the sequence generated by our method. The learning of our model can be scaled up. We learn the fire pattern from 30 training videos, with mini-batch implementation. The size of each mini-batch is 10 videos. Each video contains 30 frames (100 × 100 pixels). For each mini-batch, M̃ = 13 parallel chains for Langevin sampling is used. For this experiment, we slightly modify the network by using 120 11 × 11 × 9 filters with sub-sampling size of 5 pixels and 4 frames at the first layer, and 30 spatially fully connected filters with temporal size of 5 frames and sub-sampling size of 2 at the second layer, while keeping the setting of the third layer unchanged. The number of learning iterations T = 1300. Figure 4 shows one frame for each of 30 observed sequences and the corresponding frame of the synthesized sequences. Two examples of synthesized sequences are also displayed. 4.3. Experiment 3: Generating action patterns without spatial or temporal stationarity Experiments 1 and 2 show that the generative spatialtemporal ConvNet can learn from sequences without align- observed sequences synthesized sequences (b) running tigers Figure 5. Synthesizing action patterns. For each action video sequence, 6 continuous frames are shown. (a) running cows. Frames of 2 of 5 training sequences are displayed. The corresponding frames of 2 of 8 synthesized sequences generated by the learning algorithm are displayed. (b) running tigers. Frames of 2 observed training sequences are displayed. The corresponding frames of 2 of 4 synthesized sequences are displayed. ment. We can also specialize it to learning roughly aligned video sequences of action patterns, which are non-stationary in either spatial or temporal domain, by using a single toplayer filter that covers the whole video sequence. We learn a 2-layer spatial-temporal generative ConvNet from video sequences of aligned actions. The first layer has 200 7×7×7 filters with sub-sampling size of 3 pixels and frames. The second layer is a fully connected layer with a single filter that covers the whole sequence. The observed sequences are of the size 100 × 200 × 70. Figure 5 displays two results of modeling and synthesizing actions from roughly aligned video sequences. We learn a model for each category, where the number of training sequences is 5 for the running cow example, and 2 for the running tiger example. The videos are collected from the Internet and each has 70 frames. For each example, Figure 5 displays segments of 2 observed sequences, and segments of 2 synthesized action sequences generated by the learning algorithm. We run M̃ = 8 paralleled chains for the experiment of running cows, and 4 paralleled chains for the experiment of running tigers. The experiments show that our model can capture non-stationary action patterns. One limitation of our model is that it does not involve explicit tracking of the objects and their parts. 4.4. Experiment 4: Learning from incomplete data Our model can learn from video sequences with occluded pixels. The task is inspired by the fact that most of the videos contain occluded objects. Our learning method can be adapted to this task with minimal modification. The modification involves, for each iteration, running k steps of Langevin dynamics to recover the occluded regions of the observed sequences. At each iteration, we use the completed observed sequences and the synthesized sequences to compute the gradient of the log-likelihood and update the model parameters. Our method simultaneously accomplishes the following tasks: (1) recover the occluded pixels of the training video sequences, (2) synthesize new video sequences from the learned model, (3) learn the model by updating the model parameters using the recovered sequences and the synthesized sequences. See Algorithm 2 for the description of the learning, sampling, and recovery algorithm. Table 1. Recovery errors in occlusion experiments (a) salt and pepper masks ours MRF-`1 MRF-`2 flag fountain ocean playing sea world traffic windmill 3.7923 5.5403 3.3739 5.9035 5.3720 7.2029 5.9484 6.6211 8.1904 7.2983 14.3665 10.6127 14.7512 8.9095 10.9216 11.3850 9.6020 15.7735 11.7803 17.6790 12.6487 Avg. 5.3048 10.1071 12.8272 (b) single region masks ours MRF-`1 Algorithm 2 Learning, sampling, and recovery algorithm Input: (1) training image sequences with occluded pixels {Im , m = 1, ..., M } (2) binary masks {Om , m = 1, ..., M } indicating the locations of the occluded pixels in the training image sequences (3) number of synthesized image sequences M̃ (4) number of Langevin steps l for synthesizing image sequences (5) number of Langevin steps k for recovering the occluded pixels (6) number of learning iterations T Output: (1) estimated parameters w (2) synthesized image sequences {Ĩm , m = 1, ..., M̃ } 0 (3) recovered image sequences {Im , m = 1, ..., M } 1: 2: 3: 4: 5: 6: MRF-`2 flag fountain ocean playing sea world traffic windmill 8.1636 6.0323 3.4842 6.1575 5.8850 6.8306 7.8858 10.6586 11.8299 8.7498 15.6296 12.0297 15.3660 11.7355 12.5300 12.1696 9.8078 15.7085 12.2868 16.5787 13.2036 Avg. 6.3484 12.2856 13.1836 (c) 50% missing frames ours MRF-`1 MRF-`2 flag fountain ocean playing sea world traffic windmill 5.5992 8.0531 4.0428 7.6103 5.4348 8.8245 7.5346 10.7171 19.4331 9.0838 22.2827 13.5101 16.6965 13.3364 12.6317 13.2251 9.8913 17.5692 12.9305 17.1830 12.9911 Avg. 6.7285 15.0085 13.7746 We design 3 types of occlusions: (1) Type 1: salt and pepper occlusion, where we randomly place 7 × 7 masks on the 150 × 150 image domain to cover 50% of the pixels of the videos. (2) Type 2: single region mask occlusion, where we randomly place a 60 × 60 mask on the 150 × 150 image 7: 8: 9: 10: Let t ← 0, initialize w(0) . Initialize Ĩm , for m = 1, ..., M̃ . 0 Initialize Im , for m = 1, ..., M . repeat For each m, run k steps of Langevin dynamics to 0 recover the occluded region of Im , i.e., starting from 0 the current Im , each step follows equation (7), but 0 only the occluded pixels in Im are updated in each step. For each m, run l steps of Langevin dynamics to update Ĩm , i.e., starting from the current Ĩm , each step follows equationP (7). 0 M ∂ (t) Calculate H obs = m=1 ∂w f (Im ; w )/M , and P M̃ ∂ H syn = m=1 ∂w f (Ĩm ; w(t) )/M̃ . (t+1) Update w ← w(t) + η(H obs − H syn ), with step size η. Let t ← t + 1 until t = T domain. (3) Type 3: missing frames, where we randomly block 50% of the image frames from each video. Figure 6 displays one example of the recovery result for each type of occlusion. Each video has 70 frames. To quantitatively evaluate the qualities of the recovered videos, we test our method on 7 video sequences, which are collected from DynTex++ dataset of [4], with 3 types of occlusions. We use the same model structure as the one used in Experiment 3. The number of Langevin steps for recovering is set to be equal to the number of Langevin steps for synthesizing, which is 20. For each experiment, we report the recovery errors measured by the average per pixel difference between the original image sequence and the recovered image sequence on the occluded pixels. The range of pixel intensities is [0, 255]. We compare our results (a) 50% salt and pepper masks (a) removing a moving boat in the lake (b) single region masks (b) removing a walking person in front of fountain Figure 7. Background inpainting for videos. For each experiment, the first column displays 2 frames of the original video. The second column shows the corresponding frames with black masks occluding the target to be removed. The third column shows the inpainting result by our algorithm. (a) moving boat. (b) walking person. (c) 50% missing frames Figure 6. Learning from occluded video sequences. For each experiment, the first row shows a segment of the occluded sequence with black masks. The second row shows the corresponding segment of the recovered sequence. (a) type 1: salt and pepper mask. (b) type 2: single region mask. (c) type 3: missing frames. with the results obtained by a generic Markov random field model defined on the video sequence. The model is a 3D (spatial-temporal) Markov random field, whose potentials are pairwise `1 or `2 differences between nearest neighbor pixels, where the nearest neighbors are defined in both the spatial and temporal domains. The image sequences are recovered by sampling the intensities of the occluded pixels conditional on the observed pixels using the Gibbs sampler. Table 1 shows the comparison results for 3 types of occlusions. We can see that our model can recover the incomplete data, while learning from them. 4.5. Experiment 5: Background inpainting If a moving object in the video is occluded in each frame, it turns out that the recovery algorithm will become an algorithm for background inpainting of videos, where the goal is to remove the undesired moving object from the video. We use the same model as the one in Experiment 2 for Figure 2. Figure 7 shows two examples of removals of (a) a moving boat and (b) a walking person respectively. The videos are collected from [19]. For each example, the first column displays 2 frames of the original video. The second column shows the corresponding frames with masks occlud- ing the target to be removed. The third column presents the inpainting result by our algorithm. The video size is 130 × 174 × 150 in example (a) and 130 × 230 × 104 in example (b). The experiment is different from the video inpainting by interpolation. We synthesize image patches to fill in the empty regions of the video by running Langevin dynamics. For both Experiments 4 and 5, we run a single Langevin chain for synthesis. 5. Conclusion In this paper, we propose a spatial-temporal generative ConvNet model for synthesizing dynamic patterns, such as dynamic textures and action patterns. Our experiments show that the model can synthesize realistic dynamic patterns. Moreover, it is possible to learn the model from video sequences with occluded pixels or missing frames. Other experiments, not included in this paper, show that our method can also generate sound patterns. The MCMC sampling of the model can be sped up by learning and sampling the models at multiple scales, or by recruiting the generator network to reconstruct and regenerate the synthesized examples as in cooperative training [28]. Acknowledgments The work is supported by NSF DMS 1310391, DARPA SIMPLEX N66001-15-C-4035, ONR MURI N00014-16-12007, and DARPA ARO W911NF-16-1-0579. References [1] E. L. Denton, S. Chintala, R. Fergus, et al. Deep generative image models using a laplacian pyramid of adversarial networks. In NIPS, pages 1486–1494, 2015. 1 [2] G. Doretto, A. Chiuso, Y. N. Wu, and S. Soatto. Dynamic textures. International Journal of Computer Vision, 51(2):91– 109, 2003. 1, 2, 5, 6 [3] A. Dosovitskiy, J. Tobias Springenberg, and T. Brox. Learning to generate chairs with convolutional neural networks. In CVPR, pages 1538–1546, 2015. 1 [4] B. Ghanem and N. Ahuja. Maximum margin distance learning for dynamic texture recognition. In ECCV, pages 223–236. Springer, 2010. 4, 7 [5] 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. 3 [6] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. WardeFarley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In NIPS, pages 2672–2680, 2014. 2, 4 [7] K. Gregor, I. Danihelka, A. Graves, D. J. Rezende, and D. Wierstra. DRAW: A recurrent neural network for image generation. In ICML, pages 1462–1471, 2015. 1 [8] T. Han, Y. Lu, S.-C. Zhu, and Y. N. Wu. Alternating backpropagation for generator network. In AAAI, 2017. 4 [9] Z. Han, Z. Xu, and S.-C. Zhu. Video primal sketch: A unified middle-level representation for video. Journal of Mathematical Imaging and Vision, 53(2):151–170, 2015. 2 [10] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. 2 [11] S. Ji, W. Xu, M. Yang, and K. Yu. 3d convolutional neural networks for human action recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(1):221–231, 2013. 2 [12] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1097–1105, 2012. 1 [13] T. D. Kulkarni, W. Whitney, P. Kohli, and J. B. Tenenbaum. Deep Convolutional Inverse Graphics Network. ArXiv eprints, 2015. 1 [14] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradientbased learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. 1 [15] Y. LeCun, S. Chopra, R. Hadsell, M. Ranzato, and F. Huang. A tutorial on energy-based learning. Predicting structured data, 1:0, 2006. 1, 3 [16] Y. Lu, S.-C. Zhu, and Y. N. Wu. Learning FRAME models using cnn filters. In AAAI, 2016. 1 [17] G. F. Montufar, R. Pascanu, K. Cho, and Y. Bengio. On the number of linear regions of deep neural networks. In NIPS, pages 2924–2932, 2014. 3 [18] R. M. Neal. Mcmc using hamiltonian dynamics. Handbook of Markov Chain Monte Carlo, 2, 2011. 3 [19] A. Newson, A. Almansa, M. Fradet, Y. Gousseau, and P. Pérez. http://perso.telecom-paristech.fr/ ~gousseau/video_inpainting. 8 [20] J. Ngiam, Z. Chen, P. W. Koh, and A. Y. Ng. Learning deep energy models. In ICML, pages 1105–1112, 2011. 1, 3 [21] P. Sun. https://github.com/pengsun/ MexConv3D. 4 [22] A. Vedaldi and K. Lenc. Matconvnet – convolutional neural networks for matlab. CoRR, abs/1412.4564, 2014. 4 [23] C. Vondrick, H. Pirsiavash, and A. Torralba. Generating videos with scene dynamics. In NIPS, pages 613–621, 2016. 2, 4 [24] Y. Wang and S.-C. Zhu. A generative method for textured motion: Analysis and synthesis. In ECCV, pages 583–598. Springer, 2002. 1, 2 [25] Y. Wang and S.-C. Zhu. Analysis and synthesis of textured motion: Particles and waves. IEEE Transactions on Pattern Analysis and Machine Intelligence, 26(10):1348–1363, 2004. 2 [26] M. Welling. Herding dynamical weights to learn. In ICML, pages 1121–1128. ACM, 2009. 4 [27] R. J. Williams and D. Zipser. A learning algorithm for continually running fully recurrent neural networks. Neural computation, 1(2):270–280, 1989. 2 [28] J. Xie, Y. Lu, R. Gao, S.-C. Zhu, and Y. N. Wu. Cooperative training of descriptor and generator networks. arXiv preprint arXiv:1609.09408, 2016. 4, 8 [29] J. Xie, Y. Lu, S.-C. Zhu, and Y. N. Wu. A theory of generative convnet. In ICML, 2016. 1, 2 [30] X. You, W. Guo, S. Yu, K. Li, J. C. Príncipe, and D. Tao. Kernel learning for dynamic texture synthesis. IEEE Transactions on Image Processing, 25(10):4782–4795, 2016. 2 [31] L. Younes. On the convergence of markovian stochastic algorithms with rapidly decreasing ergodicity rates. Stochastics: An International Journal of Probability and Stochastic Processes, 65(3-4):177–228, 1999. 1, 3 [32] M. D. Zeiler, G. W. Taylor, and R. Fergus. Adaptive deconvolutional networks for mid and high level feature learning. In ICCV, pages 2018–2025, 2011. 3
9cs.NE
Canonical embedded and non-embedded resolution of singularities for excellent two-dimensional schemes arXiv:0905.2191v2 [math.AG] 18 Feb 2013 Vincent Cossart and Uwe Jannsen and Shuji Saito 18th February 2013 0 Introduction 3 1 Basic invariants for singularities 12 2 Permissible blow-ups 30 3 B-Permissible blow-ups - the embedded case 40 4 B-Permissible blow-ups - the non-embedded case 53 5 Main theorems and strategy for their proofs 64 6 (u)-standard bases 86 7 Characteristic polyhedra of J ⊂ R 96 8 Transformation of standard bases under blow-ups 108 9 Termination of the fundamental sequences of B-permissible blowups, and the case ex (X) = 1 118 10 Additional invariants in the case ex (X) = 2 124 11 Proof in the case ex (X) = ex (X) = 2, I: some key lemmas 128 12 Proof in the case ex (X) = ex (X) = 2, II: separable residue extensions 133 13 Proof in the case ex (X) = ex (X) = 2, III: inseparable residue extensions 138 14 Non-existence of maximal contact in dimension 2 1 151 Université de Versailles, laboratoire de mathématiques UMR8100, 45 avenue des États-Unis, F78035 Versailles cedex, France, [email protected] 2 Fakultät für Mathematik, Universität Regensburg, Universitätsstr. 31, 93053 Regensburg, Germany, [email protected] 3 Interactive Research Center of Science, Graduate School of Science and Engineering, Tokyo Institute of Technology, 2-12-1 Ookayama, Meguro, Tokyo 152-8551, Japan [email protected] 1 15 An alternative proof of Theorem 5.17 159 16 Functoriality, locally noetherian schemes, algebraic spaces and stacks 162 2 0 Introduction The principal aim of this paper is to show the following three theorems on the resolution of singularities of an arbitrary reduced excellent noetherian scheme X of dimension at most two. In the following, all schemes will be assumed to be noetherian, but see the end of the introduction and section 16 for locally noetherian schemes. Theorem 0.1 (Canonical controlled resolution) There exists a canonical finite sequence of morphisms π : X ′ = Xn −−−→ . . . −−−→ X1 −−−→ X0 = X such that X ′ is regular and, for each i, Xi+1 → Xi is the blow-up of Xi in a permissible center Di ⊂ Xi which is contained in (Xi )sing , the singular locus of Xi . This sequence is functorial in the sense that it is compatible with automorphisms of X and (Zariski or étale) localizations. We note that this implies that π is an isomorphism over Xreg = X − Xsing , and we recall that a subscheme D ⊂ X is called permissible, if D is regular and X is normally flat along D (see 2.1). The compatibility with automorphisms means that every automorphism of X extends to the sequence in a unique way. The compatibility with the localizations means that the pull-back via a localization U → X is the canonical resolution sequence for U after suppressing the morphisms which become isomorphisms over U. It is well-known that Theorem 0.1 implies: Theorem 0.2 (Canonical embedded resolution) Let i : X ֒→ Z be a closed immersion, where Z is a regular excellent scheme. Then there is a canonical commutative diagram i′ X ′ −−−→   πy i Z′  πZ y X −−−→ Z where X ′ and Z ′ are regular, i′ is a closed immersion, and π and πZ are proper and ∼ surjective morphisms inducing isomorphisms π −1 (X − Xsing ) −→ X − Xsing and πZ−1 (Z − ∼ Xsing ) −→ Z − Xsing . Moreover, the morphisms π and πZ are compatible with automorphisms of (X, Z) and (Zariski or étale) localizations in Z. In fact, starting from Theorem 0.1 one gets a canonical sequence Z ′ = Zn → . . . Z1 → Z0 = Z and closed immersions Xi ֒→ Zi for all i, such that Zi+1 → Zi is the blow-up in Di ⊂ (Xi )sing ⊂ Zi and Xi+1 ⊆ Zi+1 is identified with the strict transform of Xi in the blow-up Zi+1 → Zi . Then Zi+1 → Zi is proper (in fact, projective) and surjective, and Zi+1 is regular since Zi and Di are. For several applications the following refinement is useful: Theorem 0.3 (Canonical embedded resolution with boundary) Let i : X ֒→ Z be a closed immersion into a regular scheme Z, and let B ⊂ Z be a simple normal crossings divisor 3 such that no irreducible component of X is contained in B. Then there is a canonical commutative diagram i′ X ′ −−−→ Z ′ ⊃ B ′     πX y πZ y i X −−−→ Z ⊃ B ′ where i is a closed immersion, πX and πZ are projective, surjective, and isomorphisms outside Xsing ∪ (X ∩ B), and B ′ = πZ−1 (B) ∪ E, where E is the exceptional locus of πZ (which is a closed subscheme such that πZ is an isomorphism over Z − πZ (E)). Moreover, X ′ and Z ′ are regular, B ′ is a simple normal crossings divisor on Z ′ , and X ′ intersects B ′ transversally on Z ′ . Furthermore, πX and πZ are compatible with automorphisms of (Z, X, B) and with (Zariski or étale) localizations in Z. More precisely, we prove the existence of a commutative diagram πB : B ′ = Bm   y Bm−1   y πZ : Z ′ = Zm −−−→ Zm−1 −−−→ x x     ...   y . . . −−−→ x   B1   y B0 = B   y Z1 −−−→ Z0 = Z  x   y  π : X ′ = Xm −−−→ Xm−1 −−−→ . . . −−−→ X1 −−−→ X0 = X where the vertical morphisms are closed immersions and, for each i, Xi+1 = BℓDi (Xi ) → Xi is the blow-up of Xi in a permissible center Di ⊂ (Xi )sing , Zi+1 = BℓDi (Zi ) → Zi is the blow-up of Zi in Di (so that Zi+1 is regular and Xi+1 is identified with the strict transform of Xi in Zi+1 ), and Bi+1 is the complete transform of Bi , i.e., the union of the strict transform of Bi in Zi+1 and the exceptional divisor of the blow-up Zi+1 → Zi . Furthermore, Di is Bi -permissible, i.e., Di ⊂ Xi is permissible, and normal crossing with Bi (see Definition 3.1), which implies that Bi+1 is a simple normal crossings divisor on Zi+1 if this holds for Bi on Zi . In fact, the second main theorem of this paper, Theorem 5.9, states a somewhat more general version, in which B can contain irreducible components of X. Then one can assume that Di is not contained in the strongly Bi -regular locus XBsreg (see Definition 5.1), and one gets that X ′ is normal crossing with B (Definition 3.1). This implies that π is an isomorphism above XBsreg ⊆ Xreg , and, in particular, again over Xreg − B. In addition, this Theorem also treats non-reduced schemes X, in which case (X ′ )red is regular and normal crossing with B and X ′ is normally flat along (X ′ )red . Moreover, we obtain a variant, in which we only consider strict transforms for the normal crossings divisor, i.e., where Bi+1 is the strict transform of Bi . Then we only get the ′ normal crossing of X ′ (or Xred in the non-reduced case) with the strict transform B̃ of B ′ in Z . Theorem 0.1, i.e., the case where we do not assume any embedding for X, will also be proved in a more general version: Our first main theorem, Theorem 5.6, allows a non-reduced scheme X as well as a so-called boundary on X, a notion which is newly 4 introduced in this paper (see section 4). Again this theorem comes in two versions, one with complete transforms and one with strict transforms. Our approach implies that Theorem 5.6 implies Theorem 5.9. In particular, the canonical resolution sequence of Theorem 5.9 for B = ∅ and strict transforms (or of Theorem 0.3 for this variant) coincides with the intrinsic sequence for X from Theorem 0.1. Thus, the readers only interested in Theorems 0.1 and 0.2 can skip sections 3 and 4 and ignore any mentioning of boundaries/normal crossings divisors (by assuming them to be empty). We note the following corollary. Corollary 0.4 Let Z be a regular excellent scheme (of any dimension), and let X ⊂ Z be a reduced closed subscheme of dimension at most two. Then there exists a projective surjective morphism π : Z ′ −→ Z which is an isomorphism over Z −X, such that π −1 (X), with the reduced subscheme structure, is a simple normal crossings divisor on Z ′ . In fact, applying Theorem 0.3 with B = ∅, we get a projective surjective morphism π1 : Z1 −→ Z with regular Z1 , a regular closed subscheme X1 ⊂ Z1 and a simple normal crossings divisor B1 on Z1 such that π1 is an isomorphism over Z − X (in fact, over Z − (Xsing )), and π1−1 (X) = X1 ∪ B1 . Moreover, X1 and B1 intersect transversally. In particular, X1 is normal crossing with B1 in the sense of Definition 3.1. Hence we obtain the wanted situation by composing π1 with π2 : Z ′ −→ Z1 , the blow-up of Z1 in the B1 -permissible (regular) subscheme X1 , and letting X ′ = π2−1 (X1 ∪ B1 ) which is a simple normal crossings divisor, see Lemma 3.2. Moreover we mention that Theorem 0.3 is applied in a paper of the second and third author [JS], to prove a conjecture of Kato and finiteness of certain motivic cohomology groups for varieties over finite fields. This was a main motivation for these authors to work on this subject. To our knowledge, none of the three theorems is known, at least not in the stated generality. Even for dim(X) = 1 we do not know a reference for these results, although they may be well-known. For X integral of dimension 1, Theorem 0.1 can be found in [Be] section 4, and a proof of Theorem 0.3 is written in [Ja]. In 1939 Zariski [Za1] proved Theorem 0.1 (without discussing canonicity or functoriality) for irreducible surfaces over algebraically closed fields of characteristic zero. Five years later, in [Za3], he proved Corollary 0.4 (again without canonicity or functoriality) for surfaces over fields of characteristic zero which are embedded in a non-singular threefold. In 1966, in his book [Ab4], Abhyankar extended this last result to all algebraically closed fields, making heavy use of his papers [Ab3] and [Ab5]. Around the same time, Hironaka [H6] sketched a shorter proof of the same result, over all algebraically closed ground fields, based on a different method. Recently a shorter account of Abhyankar’s results was given by Cutkosky [Cu2]. For all excellent schemes of characteristic zero, i.e., whose residue fields all have characteristic zero, and of arbitrary dimension, Theorems 0.1 and 0.3 were proved by Hironaka in his famous 1964 paper [H1] (Main Theorem 1∗ , p. 138, and Corollary 3, p. 146), so Theorem 0.2 holds as well, except that the approach is not constructive, so it does not give canonicity or functoriality. These issues were addressed and solved in the later literature, especially in the papers by Villamayor, see in particular 5 [Vi], and by Bierstone-Millman, see [BM1], by related, but different approaches. In these references, a scheme with a fixed embedding into a regular scheme is considered, and in [Vi], the process depends on the embedding. The last issue is remedied by a different approach in [EH]. In positive characteristics, canonicity was addressed by Abhyankar in [Ab6]. There are further results on a weaker type of resolution for surfaces, replacing the blowups in regular centers by different techniques. In [Za2] Zariski showed how to resolve a surface over a not necessarily algebraically closed field of characteristic zero by so-called local uniformization which is based on valuation-theoretic methods. Abhyankar [Ab1] extended this to all algebraically closed fields of positive characteristics, and later [Ab2] extended several of the results to more general schemes whose closed points have perfect residue fields. In 1978 Lipman [Li] gave a very simple procedure to obtain resolution of singularities for arbitrary excellent two-dimensional schemes X in the following way: There is a finite sequence Xn → Xn → . . . X1 → X of proper surjective morphisms such that Xn is regular. This sequence is obtained by alternating normalization and blowing up in finitely many isolated singular points. But the processes of uniformization or normalization are not controlled in the sense of Theorem 0.1, i.e., not obtained by permissible blow-ups, and it is not known how to extend them to an ambient regular scheme Z like in Theorem 0.2. Neither is it clear how to get Theorem 0.3 by such a procedure. In particular, these weaker results were not sufficient for the mentioned applications in [JS]. This is even more the case for the weak resolution of singularities proved by de Jong [dJ]. It remains to mention that there are some results on weak resolution of singularities for threefolds over a field k by Zariski [Za3] (char(k) = 0), Abhyankar [Ab4] (k algebraically closed of characteristic 6= 2, 3, 5 – see also [Cu2]), and by Cossart and Piltant [CP1], [CP2] (k arbitrary), but this is not the topic of the present paper. Our approach is roughly based on the strategy of Levi-Zariski used in [Za1], but more precisely follows the approach (still for surfaces) given by Hironaka in the paper [H6] cited above. The general strategy is very common by now: One develops certain invariants which measure the singularities and aims at constructing a sequence of blow-ups for which the invariants are non-increasing, and finally decreasing, so that in the end one concludes one has reached the regular situation. The choices for the centers of the blow-ups are made by considering the strata where the invariants are the same. In fact, one blows up ‘the worst locus’, i.e., the strata where the invariants are maximal, after possibly desingularising these strata. The main point is to show that the invariants do finally decrease. In characteristic zero this is done by a technique introduced by Hironaka in [H1], which is now called the method of maximal contact (see [AHV] and Giraud’s papers [Gi2] and [Gi3] for some theoretic background), and an induction on dimension. But it is known that the theory of maximal contact does not work in positive characteristic. There are some theoretic counterexamples in [Gi3], and some explicit counterexamples for threefolds in characteristic two by Narasimhan [Na1], see also [Co2] for an interpretation in our sense. It is not clear if the counterexamples in [Na2], for threefolds in any positive characteristic, can be used in the same way. But in section 15 of this paper, we show that maximal contact does not even exists for surfaces, in any characteristic, even if maximal contact is considered in the weakest sense. Therefore the strategy of proof has 6 to be different, and we follow the one outlined in [H6], based on certain polyhedra (see below). That paper only considers the case of a hypersurface, but in another paper [H3] Hironaka develops the theory of these polyhedra for ideals with several generators, in terms of certain ‘standard bases’ for them (which also appear in [H1]). The introduction of [H3] expresses the hope that this theory of polyhedra will be useful for the resolution of singularities, at least for surfaces. Our paper can be seen as a fulfilment of this program. In his fundamental paper [H1], Hironaka uses two important invariants for measuring the singularity at a point x of an arbitrary scheme X. The primary is the ν-invariant νx∗ (X) ∈ NN , and the secondary one is the dimension ex (X) ∈ N (with 0 ≤ ex (X) ≤ dim(X)) of the so-called directrix Dirx (X) of X at x. Both only depend on the cone Cx (X) of X at x. Hironaka proves that for a permissible blow-up X ′ → X and a point x′ ∈ X ′ with image x ∈ X the ν-invariant is non-increasing: νx∗′ (X ′ ) ≤ νx∗ (X). If equality holds here (one says x′ is near to x), then the (suitably normalized) e-invariant is non-decreasing. So the main problem is to show that there cannot be an infinite sequence of blow-ups with ‘very near’ points x′ 7→ x (which means that they have the same ν- and e-invariants). To control this, Hironaka in [H3] and [H6] introduces a tertiary, more complex invariant, the polyhedron associated to the singularity, which lies in Re≥0 . It depends not just on Cx (X), but on the local ring OX,x of X at x itself, and also on various choices: a regular local ring R having OX,x as a quotient, a system of regular parameters y1 , . . . , yr , u1 , . . . , ue for R such that u1 , . . . , ue are ‘parameters’ for the directrix Dirx (X), and equations f1 , . . . , fm for OX,x as a quotient of R (more precisely, a (u)-standard base of J = ker(R → OX,x ) ). In the situation of Theorem 0.2, R is naturally given as OZ,x , but in any case, such an R always exists after completion, and the question of ruling out an infinite sequence of very near points only depends on the completion of OX,x as well. In the case considered in section 13, it is not a single strictly decreasing invariant which comes out of these polyhedra, but rather the behavior of their shape which tells in the end that an infinite sequence of very near points cannot exits. This is sufficient for our purpose, but it might be interesting to find a strictly decreasing invariant also in this case. In the particular situation considered in [H6] (a hypersurface over an algebraically closed field), this was done by Hironaka; see also [Ha] for a variant. As a counterpart to this local question, one has to consider a global strategy and the global behavior of the invariants, to understand the choice of permissible centers and the global improvement of regularity. Since the ν-invariants are nice for local computations, but their geometric behavior is not so nice, we use the Hilbert-Samuel invariant HOX,x ∈ NN as an alternative primary invariant here. They were extensively studied by Bennett [Be], who proved similar non-increasing results for permissible blow-ups, which was then somewhat improved by Singh [Si1]. Bennett also defined global Hilbert-Samuel functions HX : X → NN , which, however, only work well and give nice strata in the case of so-called weakly biequidimensional excellent schemes. We introduce a variant (Definition 1.28) which works for arbitrary (finite dimensional) excellent schemes. This solves a question raised by Bennett. The associated Hilbert-Samuel strata X(ν) = {x ∈ X | HX (x) = ν} for ν ∈ NN , are then locally closed, with closures contained in X(≥ ν) = {x ∈ X | HX (x) ≥ ν}. In particular, X(ν) is closed for maximal ν (here µ ≥ ν if µ(n) ≥ ν(n) for all n). 7 Although our main results are for two-dimensional schemes, the major part of this paper is written for schemes of arbitrary dimension, in the hope that this might be useful for further investigations. Only in part of section 5 and in sections 10 through 14 we have to exploit some specific features of the low-dimensional situation. According to our understanding, there are mainly two obstructions against the extension to higher-dimensional schemes: The fact that in Theorem 2.14 (which gives crucial information on the locus of near points) one has to assume char(k(x)) = 0 or char(k(x)) ≥ dim(X)/2 + 1, and the lack of good invariants of the polyhedra for e > 2, or of other suitable tertiary invariants in this case. We have tried to write the paper in such a way that it is well readable for those who are not experts in resolution of singularities (like two of us) but want to understand some results and techniques and apply them in arithmetic or algebraic geometry. This is also a reason why we did not use the notion of idealistic exponents [H7]. This would have given the extra burden to recall this theory, define characteristic polyhedra of idealistic exponents, and rephrase the statements in [H5]. Equipped with this theory, the treatment of the functions defining the scheme and the functions defining the boundary would have looked more symmetric; on the other hand, the global algorithm clearly distinguishes these two. We now briefly discuss the contents of the sections. In section 1 we discuss the primary and secondary invariants (local and global) of singularities mentioned above. In section 2 we discuss permissible blow-ups and the behavior of the introduced invariants for these, based on the fundamental results of Hironaka and Bennett (and Singh). In section 3 we study similar questions in the setting of Theorem 0.3, i.e., in a ‘logsituation’ X ⊂ Z where one has a ‘boundary’: a normal crossings divisor B on Z. We O define a class of log-Hilbert-Samuel functions HX , depending on the choice of a ‘history function’ O : X → { subdivisors of B} characterizing the ‘old components’ of B at x ∈ X. O Then HX (x) = (HX (x), n), where n is the number of old components at x. This gives associated log-Hilbert-Samuel strata O X(e ν ) = {x ∈ X | HX (x) = νe} for νe ∈ NN × N . For a B-permissible blow-up X ′ → X, we relate the two Hilbert-Samuel functions and strata, and study some transversality properties. In section 4 we extend this theory to the situation where we have just an excellent scheme X and no embedding into a regular scheme Z. It turns out that one can also define the notion of a boundary B on X: it is just a tuple (B1 , . . . , Br ) (or rather a multiset, by forgetting the ordering) of locally principal closed subschemes Bi of X. In the embedded situation X ⊂ Z, with a normal crossings divisor B on Z, the associated boundary BX on X is just given by the traces of the components of B on X and we show that they carry all the information which is needed. Moreover, this approach makes evident that the constructions and strategies defined later are intrinsic and do not depend on the embedding. All results in section 3 can be carried over to section 4, and there is a perfect matching (see Lemma 4.21). We could have started with section 4 and derived the embedded situation in section 3 as a special case, but we felt it more illuminating to start with the familiar classical setting; moreover, some of the results in section 4 (and 8 later in the paper) are reduced to the embedded situation, by passing to the local ring and completing (see Remark 4.22, Lemma 4.21 and the applications thereafter). In section 5 we state the Main Theorems 5.6 and 5.9, corresponding to somewhat more general versions of Theorem 0.1 and 0.3, respectively, and we explain the strategy to prove them. Based on an important theorem by Hironaka (see [H2] Theorem (1,B) and the following remark), it suffices to find a succession of permissible blowups for which the Hilbert-Samuel invariants decrease. Although this principle seems to be well-known, and might be obvious for surfaces, we could not find a suitable reference and have provided a precise statement and (short) proof of this fact in any dimension (see Corollaries 5.18 and 5.19 for the case without boundary, and Corollaries 5.26 and 5.27 for the case with boundary). The problem arising is that the set of Hilbert functions is ordered by the total (or product) order (H ≤ H ′ iff H(n) ≤ H(n) for all n), and that with this order there are infinite decreasing sequences in the set NN of all functions ν : N → N. This is overcome by the fact that the subset of Hilbert functions of quotients of a fixed polynomial ring k[x1 , . . . , xn ] is a noetherian ordered set, see Theorem 15.3. After these preparations we define a canonical resolution sequence (see Remark 5.29 for the definition of so-called νe-eliminations, and Corollaries 5.18 and 5.19 for the definition of the whole resolution sequence out of this). We point out that in Remark 5.29, we define these canonical resolution sequences, i.e., an explicit strategy for resolution of singularities for any dimension. It would be interesting to see if this strategy always works. The proof of the finiteness of these resolution sequences for dimension two is reduced to two key theorems, Theorem 5.35 and 5.40, which exclude the possibility of certain infinite chains of blow-ups with near (or O-near) points. The key theorems concern only isolated singularities and hence only the local ring of X at a closed point x, and they hold for X of arbitrary dimension, but with the condition that the ‘geometric’ dimension of the directrix is ≤ 2 (which holds for dim(X) = 2). As mentioned above, for this local situation we may assume that we are in an embedded situation. As a basic tool for various considerations, we study a situation as mentioned above, where a local ring O (of arbitrary dimension) is a quotient R/J of a regular local ring R. In section 6 we discuss suitable systems (y, u) = (y1 , . . . , yn , u1 , . . . , ue ) of regular parameters for R and suitable families f = (f1 , . . . , fm ) of generators for J. A good choice for (y, u) is obtained if u is admissible for J (Definition 6.1) which means that u1 , . . . , ue are affine parameters of the directrix of O (so that e is the e-invariant recalled above). We study valuations associated to (y, u) and initial forms (with respect to these valuations) of elements in J and their behavior under change of the system of parameters. As for f , in the special case that J is generated by one element (case of hypersurface singularities), any choice of f = (f1 ) is good. In general, some choices of f = (f1 , . . . , fm ) are better than the other. A favorable choice is a standard basis of J (Definition 1.17) as introduced in [H1]. In [H3] Hironaka introduced the more general notion of a (u)-standard base of J which is more flexible to work with and plays an important role in our paper. In section 7 we recall, in a slightly different way, Hironaka’s definition [H3] of the polyhedron ∆(f, y, u) associated to a system of parameters (y, u) and a (u)-standard basis f , and the polyhedron ∆(J, u) which is the intersection of all ∆(f, y, u) for all choices of y and f as above (with fixed u). We recall Hironaka’s crucial result from [H3] that 9 ∆(f, y, u) = ∆(J, u) if u is admissible and (f, y, u) is what Hironaka calls well-prepared, namely normalized (Definition 7.12) and not solvable (Definition 7.13) at all vertices. Also, there is a certain process of making a given (f, y, u) normalized (by changing f ) and not solvable (by changing y) at finitely many vertices, and at all vertices, if R is complete. One significance of this result is that it provides a natural way of transforming a (u)-standard base into a standard base under the assumption that u is admissible. As explained above, it is important to study permissible blow-ups X ′ → X and near points x′ ∈ X ′ and x ∈ X. In this situation, to a system (f, y, u) at x we associate certain new systems (f ′ , y ′, u′ ) at x′ . A key result proved in section 8 is that if f is a standard base, then f ′ is a (u′ )-standard base. The next key result is that the chosen u′ is admissible. Hence, by Hironaka’s crucial result mentioned above, we can transform (f ′ , y ′, u′ ) into a system (g ′, z ′ , u′), where g ′ is a standard base. The Key Theorems 5.35 and 5.40 concern certain sequences of permissible blowups, which arise naturally from the canonical resolution sequence. We call them fundamental sequences of B-permissible blowups (Definition 5.34) and fundamental units of permissible blowups (Definition 5.38) and use them as a principal tool. These are sequences of Bpermissible blowups Xm → . . . → X1 → X0 = X , where the first blowup is in a closed point x ∈ X (the initial point), and where the later blowups are in certain maximal B-permissible centers Ci , which map isomorphically onto each other, lie above x, and consist of points near to x. For a fundamental sequence there is still a B-permissible center Cm ⊂ Xm with the same properties; for a fundamental unit there is none, but only a chosen closed point xm ∈ Xm (the terminal point) which is near to x. In section 9 we study some first properties of these fundamental sequences. In particular we show a certain bound for the δ-invariant of the associated polyhedra. This suffices to show the first Key Theorem 5.35 (dealing with the case ex (X) = 1), but is also used in section 14. For the second Key Theorem 5.40 (dealing with the case ex (X) = 2), one needs some more information on the (2-dimensional) polyhedra, in particular, some additional invariants. These are introduced in section 10. Then Theorem 5.40 is proved in the next three sections. It states that there is no infinite sequence . . . → X2 → X1 → X0 of fundamental units of blow-ups such that the closed initial points and terminal points match and are isolated in their Hilbert-Samuel strata. After some preparations in section 11, section 12 treats the case where the residue field extension k(x′ )/k(x) is trivial (or separable). This is very much inspired by [H6], which however only treats the special situation of a hypersurface in a regular threefold over an algebraically closed field and does not contain proofs for all claims. Then section 13 treats the case where there occur inseparable residue field extensions k(x′ )/k(x). This case was basically treated in [Co1] but we give a more detailed account and fill gaps in the original proof, with the aid of the results of section 8, and Giraud’s notion of the ridge [Gi1], [Gi3] (faı̂te in French) a notion which generalizes the directrix. In section 14, we show that maximal contact does not exist for surfaces in positive characteristic p. For each p a counterexample is given which then works for any field of that characteristic. 10 In section 15 we give a more algebro-geometric proof of the fact that it suffices to show how to eliminate the maximal Hilbert-Samuel stratum. Finally, in section 16 we give a re-interpretation of the functoriality we obtain for our resolution, for arbitrary flat morphisms with regular fibers, and we apply this to show resolution for excellent schemes which are only locally noetherian, and for excellent algebraic stacks with atlas of dimension at most two. It will be clear from the above how much we owe to all the earlier work on resolution of singularities, in particular to the work of Hironaka which gave the general strategy but also the important tools used in this paper. Conventions and concluding remarks: All schemes are assumed to be finite dimensional. Regular schemes are always assumed to be locally noetherian. Recall also that excellent schemes are by definition locally noetherian. In this introduction and in sections 1 to 15, the readers should best assume that all schemes are noetherian. At some places we write locally noetherian to indicate that certain definitions make sense and certain results still hold for schemes which are only locally noetherian. Resolution for such schemes is treated in section 16. 11 1 Basic invariants for singularities In this section we introduce some basic invariants for singularities. 1.1 Invariants of graded rings and homogeneous ideals in polynomial rings Let k be a field and S = k[X1 , . . . , Xn ] be a polynomial ring with n variables. Let Sν ⊂ S be the k-subspace of the homogeneous polynomials of degree n (including 0). Fix a homogeneous ideal I ⊆ S. Definition 1.1 For integers i ≥ 1 we define ν i (I) ∈ N ∪ {∞} as the supremum of the ν ∈ N satisfying the condition that there exist homogeneous ϕ1 , . . . , ϕi−1 ∈ I such that Sµ ∩ I = Sµ ∩ < ϕ1 , . . . , ϕi−1 > for all µ < ν. By definition we have ν 1 (I) ≤ ν 2 (I) ≤ . . . . We write ν ∗ (I) = (ν 1 (I), ν 2 (I), . . . , ν m (I), ∞, ∞, . . . ) and call it the ν-invariant of I. We have the following result (cf. [H1] Ch. III §1, Lemma 1). Lemma 1.2 Let I =< ϕ1 , . . . , ϕm > with homogeneous elements ϕi of degree νi such that: (i) ϕi 6∈< ϕ1 , . . . , ϕi−1 > for all i = 1, . . . , m, (ii) ν1 ≤ ν2 ≤ · · · ≤ νm . Then we have i ν (I) =  νi , i ≤ m, ∞ , i > m. Definition 1.3 Let ϕ = (ϕ1 , . . . , ϕm ) be a system of homogeneous elements in S and I ⊂ S be the ideal that it generates. (1) ϕ is weakly normalized if it satisfies the condition (i) of Lemma 1.2. (2) ϕ is a standard base of I if it satisfies the conditions (i) and (ii) of Lemma 1.2. We have the following easy consequence of 1.2. Corollary 1.4 Let I ⊂ S be a homogeneous ideal and let ψ = (ψ1 , . . . , ψj ) be a system of homogeneous elements in I which is weakly normalized. (1) The following conditions are equivalent: (ii) deg ψi = ν i (I) for i = 1, . . . , j. (ii′ ) For all i = 1, . . . , j, ψi has minimal degree in I such that ψi 6∈< ψ1 , . . . , ψi−1 >. (2) If the conditions of (1) are satisfied, then ψ can be extended to a standard base of I. 12 By the lemma a standard base of I and ν ∗ (I) are obtained as follows: Put ν1 := min{ν | ∃ ϕ ∈ Sν ∩ I \ {0}} and pick ϕ1 ∈ Sν1 ∩ I − {0}. Put ν2 := min{ν | ∃ ϕ ∈ (Sν ∩ I) \ (Sν ∩ < ϕ1 >) and pick ϕ2 ∈ (Sν2 ∩ I) \ (Sν2 ∩ < ϕ1 >). Proceed until we get I =< ϕ1 , . . . , ϕm >. Then (ϕ1 , . . . , ϕm ) is a standard base of I and ν ∗ (I) = (ν1 , . . . , νm , ∞, ∞, . . . ). Remark 1.5 Let ψ1 , . . . , ψℓ ∈ I be homogeneous generators of I such that ν1 ≤ ν2 ≤ · · · ≤ νℓ , where νi = deg(ψi ). Then the above considerations show that (ν1 , ν2 , . . . , νℓ , ∞, . . .) ≤ ν ∗ (I) , because a standard base of I is obtained by possibly omitting some of the ψi for i ≥ 2. In what follows, for a k-vector space (or a k-algebra) V and for a field extension K/k we write VK = V ⊗k K. From Lemma 1.2 the following is clear. Lemma 1.6 For the ideal IK ⊆ SK we have ν ∗ (I) = ν ∗ (IK ) . A second invariant is the directrix. By [H1] Ch. II §4, Lemma 10, we have: Lemma 1.7 Let K/k be a field extension. There is a smallest K-subvector space T (I, K) ⊆ (S1 )K = ⊕ni=1 KXi such that (IK ∩ K[T (I, K)]) · SK = IK , where K[T (I, K)] = SymK (T (I, K)) ⊆ SymK ((S1 )K ) = SK . In other words T (I, K) ⊂ (S1 )K is the minimal K-subspace such that IK is generated by elements in K[T (I, K)]. For K = k we simply write T (I) = T (I, k). Recall that C(S/I) = Spec(S/I) is called the cone of the graded ring S/I. Definition 1.8 For any field extension K/k, the closed subscheme DirK (S/I) = Dir(SK /IK ) ⊆ C(SK /IK ) = C(S/I) ×k K defined by the surjection SK /IK ։ SK /T (I, K)SK is called the directrix of S/I in C(S/I) over K. By definition DirK (S/I) ∼ = Spec(SymK ((S1 )K /T (I, K))) . We define e(S/I)K = dim(DirK (S/I)) = dim(S) − dimK (T (I, K)) = n − dimK (T (I, K)) , e(S/I) so that DirK (S/I) ∼ = AK K , and simply write e(S/I) for e(S/I)K with K = k. 13 Remark 1.9 (a) By definition DirK (S/I) is determined by the pair SK ⊇ IK , but indeed it has an intrinsic definition depending on AK for A = S/I only: Let SA = Symk (A1 ), which is a polynomial ring over k. Then the surjection SK → AK factors through the canonical surjection αA,K : SA,K → AK , and the directrix as above is identified with the directrix defined via SA,K and ker(αA,K ). In this way Dir(AK ) is defined for any graded k-algebra A which is generated by elements in degree 1. (b) Similarly, for any standard graded k-algebra A, i.e., any finitely generated graded k-algebra which is generated by A1 , we may define its intrinsic ν-invariant by ν ∗ (A) = ν ∗ (ker(αA )), where αA : Symk (A1 ) ։ A is the canonical epimorphism. In the situation of Definition 1.1 we have ν ∗ (I) = (1, . . . , 1, ν 1 (S/I), ν 2 (S/I), . . .) , with n − t entries of 1 before ν 1 (S/I), where t = dimk (A1 ), and ν 1 (S/I) > 1. (c) If X is a variable, then obviously ν ∗ (A[X]) = ν ∗ (A) and ν ∗ (I[X]) = ν ∗ (I) in the situation of 1.1. On the other hand, DirK (A[X]) ∼ = DirK (A) ×K A1K , i.e., eK (A[X]) = eK (A) + 1. Lemma 1.10 Let the assumptions be as in 1.8. (1) e(S/I)K ≤ dim(S/I). (2) For field extensions k ⊂ K ⊂ L, we have e(S/I)K ≤ e(S/I)L . (3) The equality holds if one of the following conditions holds: (i) L/K is separable (not necessarily algebraic). (ii) e(S/I)K = dim(S/I). In particular it holds if K is a perfect field. Proof The inequality in (1) is trivial, and (2) follows since T (I, K) ⊗ L ⊆ T (I, L), This in turn implies claim (3) for condition (ii). Claim (3) for condition (i) is proved in [H1] II, Lemma 12, p. 223, for arbitrary degree of transcendence. The case of a finite separable extension is easy: It is obviously sufficient to consider the case where L/K is finite Galois with Galois group G. Then, by Hilbert’s theorem 90, for any L-vector space V on which G acts in a semi-linear way the canonical map V G ⊗K L → V is an isomorphism. This ∼ implies that T (I, L)G ⊗K L → T (I, L) and the claim follows.  Finally we recall the Hilbert function (not to be confused with the Hilbert polynomial) of a graded algebra. Let N be the set of the natural numbers (including 0) and let NN be the set of the functions ν : N → N. We endow NN with the product order defined by: (1.1) ν ≥ µ ⇔ ν(n) ≥ µ(n) for any n ∈ N. Definition 1.11 For a finitely generated graded k-algebra A its Hilbert function is the element of NN defined by H (0) (A)(n) = H(A)(n) = dimk (An ) 14 (n ∈ N). For an integer t ≥ 1 we define H (t) (A) inductively by: (t) H (A)(n) = n X H (t−1) (A)(i). i=0 We note H (t−1) (A)(n) = H (t) (A)(n) − H (t) (A)(n − 1) ≤ H (t) (n). Remark 1.12 (a) Obviously, for any field extension K/k we have H (0) (AK ) = H (0) (A) . (b) For a variable X we have H (t) (A[X]) = H (t+1) (A) . (c) For any ν ∈ NN and any t ∈ N define ν (t) inductively by ν (t) (n) = Pn i=0 ν (t−1) (i). In a certain sense, the Hilbert function measures how far A is away from being a polynomial ring: Definition 1.13 Define the function Φ = Φ(0) ∈ NN by Φ(0) P = 1 and Φ(n) = 0 for n > 0. (t) (t) Define Φ for t ∈ N inductively as above, i.e., by Φ (n) = ni=0 Φ(t−1) (i). Then one has (t) Φ (n) = H (0)   n+t−1 for all n ≥ 0. (k[X1 , . . . , Xt ])(n) = n and: Lemma 1.14 Let A be a finitely generated graded algebra of dimension d over a field k, which is generated by elements in degree one (i.e., is a standard graded algebra). (a) Then H (0) (A) ≥ Φ(d) , and equality holds if and only if A ∼ = k[X1 , . . . , Xd ]. (b) For a suitable integer m ≥ 1 one has mΦ(d) ≥ H (0) . (c) If H (0) (A) = Φ(N ) for N ∈ N, then N = d. Proof (a): We may take a base change with an extension field K/k, and therefore may assume that k is infinite. In this case there is a Noether normalization i : S = k[X1 , . . . , Xd ] ֒→ A such that the elements X1 , . . . , Xd are mapped to A1 , the degree one part of A, see [Ku], Chap. II, Theorem 3.1 d). This means that i is a monomorphism of graded k-algebras. But then H (0) (A) ≥ H (0) (k[X1 , . . . , Xd ]) = Φ(d) , and equality holds if and only if i is an isomorphism. (b): Since A is a finitely generated S-module, it also has finitely many homogenous generators a1 , . . . , am of degrees d1 , . . . , dm . This gives a surjective map of graded Smodules ⊕m i=1 S[−di ] ։ A, 15 where S[m] is S with grading S[m]n = Sn+m , and hence H(A)(n) ≤ m X Φ(d) (n − di ) ≤ mΦ(d) (n) . i=1 (c) follows from (a) and (b), because Φ(d) and Φ(N ) have different asymptotics for N 6= d.  We shall need the following property. Theorem 1.15 Let k be a field and for n ∈ N, let HFn ⊂ NN be the set of all Hilbert functions H(A) of all standard graded k-algebras A with H(A)(1) ≤ n. (a) HFn is independent of k. (b) HFn is a noetherian ordered set, i.e., (i) HFn is well-founded, i.e., every strictly descending sequence H1 > H2 > H3 > . . . in HFn is finite. (ii) For every infinite subset M ⊂ HFn there are elements H, H ′ ∈ M with H < H ′ . Proof If A is a standard graded k-algebra, then H(A)(1) ≤ n holds if and only if A is a quotient of Sn = k[X1 , . . . , Xn ], i.e., A = k[X1 , . . . , Xn ]/I for a homogeneous ideal I. On the other hand, it is known that H(Sn /I) = H(Sn /I ′ ) for some monomial ideal I ′ ⊂ Sn , i.e., an ideal generated by monomials in the variables X1 , . . . , Xn (see [CLO] 6 §3, where this is attributed to Macaulay; to wit, one may take for I ′ the ideal of leading terms for I, with respect to the lexicographic order on monomials, loc. cit. Proposition 9). This proves (a). Moreover, for (b) we may assume that all considered Hilbert functions are of the form H(Sn /I) for some monomial ideal I ⊂ Sn . Thus in (b) (ii) we are led to the consideration of an infinite set N of monomial ideals in Sn . But then the main theorem in [Macl] (Theorem 1.1) says that there are I, I ′ ∈ N with I $ I ′ , so that H(Sn /I) > H(Sn /I ′). For (b) (i) we may again assume that all Hi are of the form H(Sn /Ii ) for some monomial ideals Ii ⊂ Sn , and by [Macl] 1.1 that one finds an infinite chain Ii(1) $ Ii(2) $ Ii(3) $ . . . among these ideals, necessarily strictly increasing since the sequence of the Hi(ν) is, which is a contradiction because Sn is noetherian. Remark 1.16 (a) For the functions H (1) (A) instead of the functions H(A) property (b) (i) was shown in [BM2] Theorem 5.2.1. (b) Our proof was modeled on [AP] Corollary 3.6, which is just formulated for monomial ideals. See also [AP] Corollary 1.8 for another argument that the set of monomial ideals in Sn , with respect to the reverse inclusion, is a noetherian ordered set. Finally, in [AH] it is shown, by more sophisticated methods, that even the set HF of all Hilbert functions is noetherian. 1.2 Invariants for local rings For any ring R and any prime ideal p ⊂ R we set M grp (R) = pn /pn+1 , n≥0 16 which is a graded algebra over R/p. In what follows we assume that R is a noetherian regular local ring with maximal ideal m and residue field k = R/m. Moreover, assume that R/p is regular. Then we have  grp (R) = SymR/p gr1p (R) , gr1p (R) = p/p2 . where SymR/p (M) denotes the symmetric algebra of a free R/p-module M. Concretely, let (y1 , . . . , yr , u1 , . . . , ue ) be a system of regular parameters for R such that p = (y1, . . . , yr ). Then grp (R) is identified with a polynomial ring over R/p: grp (R) = (R/p)[Y1 , . . . , Yr ] where Yi = yi mod p2 (1 ≤ i ≤ r). Fix an ideal J ⊂ R. In case J ⊂ p we set M grp (R/J) = (p/J)n /(p/J)n+1 , n≥0 and define an ideal Inp (J) ⊂ grp (R) by the exact sequence 0 → Inp (J) → grp (R) → grp (R/J) → 0. Note Inp (J) = M (J ∩ pn + pn+1 )/pn+1 . n≥0 For f ∈ R and a prime ideal p ⊂ R put  max{ν | f ∈ pν } , f 6= 0, (1.2) vp (f ) = ∞ , f =0 called the order of f at p. For prime ideals p ⊂ q ⊂ R, we have the following semicontinuity result (cf. [H1] Ch.III §3): vp (f ) ≤ vq (f ) (1.3) for ∀f ∈ R. Define the initial form of f at p as inp (f ) := f mod pvp (f )+1 ∈ pvp (f ) /pvp (f )+1 ∈ grp (R). In case J ⊂ p we have Inp (J) = {inp (f ) | f ∈ J}. Definition 1.17 (1) A system (f1 , . . . , fm ) of elements in J is a standard base of J, if (inm (f1 ), . . . , inm (fm )) is a standard base of Inm (J) in the polynomial ring grm (R). (2) We define ν ∗ (J, R) as the ν ∗ -invariant (cf. Definition 1.1) for Inm (J) ⊂ grm (R). (2) The absolute ν ∗ -invariant ν ∗ (O) of a noetherian local ring O with maximal ideal n is defined as the absolute ν ∗ -invariant (cf. Remark 1.9 (b)) ν ∗ (grn O). It is shown in [H3] (2.21.d) that a standard base (f1 , . . . , fm ) of J generates J. Next we define the directrix Dir(O) of any noetherian local ring O. First we introduce some basic notations. 17 Let n be the maximal ideal of O, let x be the corresponding closed point of Spec(O), and let k(x) = O/n be the residue field at x. Define T (O) = Spec(Symk (n/n2 )): the Zariski tangent space of Spec(O) at x, C(O) = Spec(grn (O)) = C(grn (O)): the (tangent) cone of Spec(O) at x. We note that dim C(O) = dim O and that the map Symk (n/n2 ) ։ grn (O) gives rise to a closed immersion C(O) ֒→ T (O). Definition 1.18 Let K/k(x) be a field extension. Then the directrix of O over K, DirK (O) ⊆ C(O) ×k(x) K ⊆ T (O) ×k(x) K is defined as the directrix DirK (grn (O)) ⊆ C(grn (O)) of grn (O) over K (cf. Remark 1.9 (a)). We set e(O)K = dim(DirK (O)) and simply write e(O) for e(O)K with K = k(x). Remark 1.19 By definition, for R regular as above and an ideal J ⊂ m we have DirK (R/J) = Spec(grm (R)K /T (J, K)grm (R)K ) ⊆ Spec(grm (R)K /Inm (J)K ) = C(R/J)K , where T (J, K) = T (Inm (J), K) ⊆ gr1m (R)K is the smallest K-sub vector space such that (Inm (J)K ∩ K[T (J, K)] · grm (R)K = Inm (J)K , i.e., such that Inm (J)K is generated by elements in K[T (J, K)]. Moreover DirK (R/J) ∼ = SymK (gr1m (R)K /T (J, K)) ⊆ T (R)K . For K = k we simply write T (J) = T (J, k). Lemma 1.20 Let the assumptions be as above. (1) e(R/J)K ≤ dim(R/J). (2) For field extensions k ⊂ K ⊂ L, we have e(R/J)K ≤ e(R/J)L . The equality holds if one of the following conditions holds: (i) L/K is separable (not necessarily algebraic). (ii) e(R/J)K = dim(R/J). Proof This follows from Lemma 1.10, because dim(R/J) = dim C(R/J).  18 Definition 1.21 We define e(R/J) = e(R/J)k for an algebraic closure k of k. By Lemma 1.20 we have e(R/J)K ≤ e(R/J) ≤ dim(R/J) for any extension K/k. For later use we note the following immediate consequence of the construction of a standard base below Corollary 1.4. Lemma 1.22 Let T = T (J) be as in Lemma 1.7 . There exists a standard base (f1 , . . . , fm ) of J such that inm (fi ) ∈ k[T ] for for all i. Finally, we define the Hilbert functions of a noetherian local ring O with maximal ideal m and residue field F as those of the associated graded ring: (t) HO (n) = H (t) (grm (O)) . Explicitly, the Hilbert function is the element of NN defined by (0) HO (n) = dimF (mn /mn+1 ) (n ∈ N). (t) For an integer t ≥ 1 we define HO inductively by: (t) HO (n) = n X (t−1) HO (i). i=0 (1) (1) In particular, HO (n) is the length of the O-module O/mn+1 and HO is called the Hilbert(n) Samuel function of O. We will sometimes call all functions of the form HO Hilbert-Samuel functions. The Hilbert function measures how far away O is from being a regular ring: Lemma 1.23 Let O be a noetherian local ring of dimension d, and define Φ(t) as in (0) Definition 1.13. Then HO ≥ Φ(d) , and equality holds if and only if O is regular. Proof (see also [Be] Theorem (2) and [Si2], property (4) on p. 46) Since dim(O) = dim(grm O), where m is the maximal ideal of O, and since O is regular if and only if grm O ∼ = k[X1 , . . . , Xd ] where k = O/m, this follows from Lemma 1.14. For later purpose, we note the following facts. Lemma 1.24 Let the assumptions be as above and let O = O/a be a quotient ring of O. (t) (t) Then HO ≥ HO and the equality holds if and only if O = O. Proof Let m be the maximal ideal of O. The inequality holds since the natural maps (s) (s) mn+1 → mn+1 are surjective. Assume HO = HO for some s ≥ 0. By Definition 1.11 it (t) (t) implies HO = HO for all t ≥ 0, in particular for t = 1. This implies that the natural maps πn : O/mn+1 → O/mn+1 are isomorphisms for all n ≥ 0. Noting Ker(πn ) ≃ a/a ∩ mn+1 , we get a ⊂ ∩ mn+1 = (0) and hence O = O.  n≥0 19 Lemma 1.25 Let O and O′ be noetherian local rings. (a) For all non-negative integers a and e one has dim O ≥ e ⇐⇒ (a) HO ≥ Φ(e+a) . (b) For all non-negative integers a and b one has (a) (b) HO ≥ HO ′ dim O + a ≥ dim O′ + b. =⇒ (a) Proof Let d = dim O. (a): If d ≥ e, then we get HO ≥ Φ(d+a) ≥ Φ(e+a) , by Lemma (a) 1.23. Conversely, assume HO ≥ Φ(e+a) . Then form Lemma 1.14 we get (a) mΦ(d+a) ≥ HO ≥ Φ(e+a) for some integer m ≥ 1. If d < e this is a contradiction, because of the asymptotic behavior of Φ(t) . Hence d ≥ e. (a) (b) For (b) let d′ = dim O′ . If HO ≥ HO′ then (a) (b) ′ HO ≥ HO′ ≥ Φ(d +b) and by (a) we have d ≥ d′ + b − a. (Note: If d′ + b − a < 0, the statement is empty; if e = d′ + b − a ≥ 0, then we can apply (a).) 1.3 Invariants for schemes Let X be a locally noetherian scheme. Definition 1.26 For any point x ∈ X define νx∗ (X) = ν ∗ (OX,x ) and Dirx (X) = Dir(OX,x ) and ex (X) = e(OX,x ) = dimk(x) (Dirx (X)), ex (X) = e(OX,x ), ex (X)K = e(OX,x )K , where K/k(x) is a field extension. If X ⊆ Z is a closed subscheme of a (fixed) regular excellent scheme Z, define νx∗ (X, Z) = ν ∗ (Jx , OZ,x ) , where OX,x = OZ,x /Jx . We also define IDirx (X) ⊂ grmx (OZ,x ) to be the ideal defining Dirx (X) ⊂ Tx (Z) = Spec(grmx (OZ,x )), where mx is the maximal ideal of OZ,x . We note that always Dirx (X) ⊆ Cx (X) ⊆ Tx (X) ( ⊆ Tx (Z) for X ⊂ Z as above ), where Cx (X) = C(OX,x ) is called the tangent cone of X at x and Tx (X) = T (OX,x ) is called the Zariski tangent space of X at x (similarly for Z). 20 Lemma 1.27 Let X be a locally noetherian scheme. (1) Let π : X ′ → X be a morphism with X ′ locally noetherian, and let x′ ∈ X ′ be a point lying over x ∈ X. Assume that π is quasi-étale at x′ in the sense of Bennett [Be] (1.4), i.e., that OX,x → OX ′ ,x′ is flat and mx OX ′ ,x′ = mx′ where mx ⊂ OX,x and mx′ ⊂ OX ′ ,x′ are the respective maximal ideals. (In particular, this holds if π is étale.) Then there is a canonical isomorphism (1.4) Cx′ (X ′ ) ∼ = Cx (X) ×k(x) k(x′ ) so that νx∗′ (X ′ ) = νx∗ (X). If k(x′ )/k(x) is separable, then Dirx′ (X ′ ) ∼ = Dirx (X) ×k(x) k(x′ ), and hence ex′ (X ′ ) = ex (X). Consider in addition that there is a cartesian diagram i X ′ −−−→   πy i Z′  π y Z X −−−→ Z where i and i′ are closed immersions, Z and Z ′ are regular excellent schemes and πZ is quasi-étale at x′ . Then Tx′ (Z) ∼ = Tx (Z) ×k(x) k(x′ ) and νx∗′ (X ′ , Z ′ ) = νx∗ (X, Z) . (2) Let π : X ′ → X be a morphism and let x ∈ X and x′ ∈ X with π(x′ ) = x. Assume that X ′ is locally noetherian, that π is flat and that the fibre Xx′ = X ′ ×X x of π over x is regular at x′ (e.g., assume that π is smooth around x′ ). Then there are non-canonical isomorphisms (1.5) Cx′ (X ′ ) ∼ = Cx (X) ×k(x) Adk(x) , = Cx (X) ×k(x) Cx′ (Xx′ ) ∼ where d = dim(OXx′ ,x′ ) = codimXx′ (x′ ). Hence Dirx′ (X ′ ) ∼ = Dirx (X) ×k(x) Adk(x′ ) , ex′ (X ′ ) = ex (X) + d and νx∗′ (X ′ ) = νx∗ (X) . (3) Let X0 be an excellent scheme, and let f : X → X0 be a morphism with X locally noetherian. Let x0 ∈ X0 and X̂0 = Spec(ÔX0 ,x0 ), X̂ = X ×X0 X̂0 , where ÔX0 ,x0 is the completion of OX0 ,x0 . Then for any x ∈ X and any x̂ ∈ X̂ lying over x, there are non-canonical isomorphisms (1.6) Cx̂ (X̂) ∼ = Cx (X) ×k(x) Adk(x̂) , = Cx (X) ×k(x) Cx̂ (X̂x ) ∼ where X̂x = X̂ ×X x is the fibre over x for the morphism π : X̂ → X and d = dim(OX̂x ,x̂ ) = codimX̂x (x̂). Hence Dirx̂ (X̂) ∼ = Dirx (X) ×k(x) Adk(x̂) , ex̂ (x̂) = ex (X) + d 21 and νx̂∗ (X̂) = νx∗ (X) . Assume further that there is a commutative diagram i (1.7) X −−−→   fy i Z  g y 0 X0 −−− → Z0 where Z0 is a regular excellent scheme, Z is a regular locally noetherian scheme, and i0 and i are closed immersions. Denote Ẑ0 = Spec(ÔZ0 ,x0 ), Ẑ = Z ×Z0 Ẑ0 , where ÔZ0 ,x0 is the completion of OZ0 ,x0 , so that X̂ = X ×Z0 Ẑ = X ×Z Ẑ can be regarded as a closed subscheme of Ẑ. Then Ẑ is regular, and νx̂∗ (X̂, Ẑ) = νx∗ (X, Z) . Proof (1): It suffices to show (1.4). Let (A, mA ) → (B, mB ) be a flat local morphism of local noetherian rings, with mA B = mB . Then we have isomorphisms (1.8) ∼ mnA ⊗A B −→ mnB for all n ≥ 0. In fact, this holds for n = 0, and, by induction and flatness of B over A, n−1 the injection mnA ֒→ mA induces an injection ∼ n−1 n−1 mnA ⊗A B ֒→ mA ⊗A B → mB , whose image is mnA B = mnB . From (1.8) we now deduce isomorphisms for all n ∼ n n+1 ∼ n n+1 (mnA /mn+1 , A ) ⊗kA kB = (mA /mA ) ⊗A B −→ mB /mB where kA = A/mA and kB = B/mB , and hence the claim (1.4). (2): As for (1.6), consider the local rings A = OX,x with maximal ideal m and residue field k = A/m, and A′ = OX ′ ,x′ , with maximal ideal m′ and residue field k ′ = A′ /m′ . By assumption, π is flat and has regular fibers, and hence the same is true for the local morphism A → A′ since it is obtained from π by localization in X and X ′ . A ⊗OX,x ÔX,x . Hence, by [Si2], Lemma (2.2), the closed subscheme Spec(A′ /mA′ ) ֒→ Spec(A′ ) is permissible, i.e. it is regular and grmA′ (A′ ) is flat over A′ /mA′ . By [H1] Ch. II, p. 184, Proposition 1, we get a non-canonical isomorphism grm′ (A′ ) ∼ = (grmA′ (A′ ) ⊗A′ k ′ ) ⊗k′ grm′ /mA′ (A′ /mA′ ) . On the other hand, by flatness of A′ over A we get canonical isomorphisms mn A′ /mn+1 A′ ∼ = (mn /mn+1 ) ⊗A A′ for all n. Hence we get an isomorphism grmA′ (A′ ) ⊗A′ k ′ ∼ = grm (A) ⊗A A′ and the above isomorphism becomes grm′ (A′ ) ∼ = grm (A) ⊗k grm′ /mA′ (A′ /mA′ ) , 22 which is exactly the first isomorphism in (1.6). Since A′ /mA′ = OXx′ ,x′ is regular of dimension d, we have an ismorphism grm′ /mA′ (A′ /mA′ ) ∼ = k ′ [T1 , . . . , Td ], which gives the second isomorphism in (1.6). The statements for the directrix and the ν ∗ -invariant of X ′ at x′ now follow from Remark 1.9 (c). (3): The claims not involving Z0 and Z follow by applying (2) to the morphism π̃ : X̂ = X ×X0 Spec(OX0 ,x0 ) ×Spec(OX,x ) X̂0 → X ×X0 Spec(OX0 ,x0 ) . In fact, since X0 is excellent, the morphism π0 : OX0 ,x0 → ÔX0 ,x0 is flat, with geometrically regular fibers, and so the same is true for π̃, which is a base change of π0 . Now consider the diagram (1.7). The above, applied to Z → Z0 , gives isomorphisms N +d Cx̂ (Ẑ) ∼ = Cx (Z) ×k(x) Cx̂ (Ẑx ) ∼ = Cx (Z) ×k(x) Adk(x̂) ∼ = Ak(x̂) where N = dim(OZ,x ), because Z is regular and Ẑx ∼ = X̂x . By Lemmas 1.23 and 1.14 this implies that Ẑ is regular at x. The final equality in (3) follows from the isomorphism Tx̂ (Ẑ) ∼ = Cx̂ (Ẑ) and Remark 1.9 (c).  Next we introduce Hilbert-Samuel functions for excellent schemes. Recall that an excellent scheme X is catenary so that for any irreducible closed subschemes Y ⊂ Z of X, all maximal chains of irreducible closed subschemes Y = Y0 ⊂ Y1 ⊂ · · · ⊂ Yr = Z have the same finite length r denoted by codimZ (Y ). For any irreducible closed subschemes Y ⊂ Z ⊂ W of X we have codimW (Y ) = codimW (Z) + codimZ (Y ). Definition 1.28 Let X be a locally noetherian catenary scheme (e.g., an excellent scheme), and fix an integer N ≥ dim X. (Recall that all schemes are assumed to be finite dimensional.) (1) For x ∈ X let I(x) be the set of irreducible components Z of X with x ∈ Z. (2) Define the function φX := φN X : X → N by φX (x) = N − ψX (x), where ψX (x) = min {codimZ (x) | Z ∈ I(x)} . N (3) Define HX := HX : X → NN as follows. For x ∈ X let (φ (x)) ∈ NN . and X(ν) := {x ∈ X| HX (x) = ν}. X HX (x) = HOX,x (4) For ν ∈ NN we define X(≥ ν) := {x ∈ X| HX (x) ≥ ν} The set X(ν) is called the Hilbert-Samuel stratum for ν. 23 By sending Z to its generic point η, the set I(x) can be identified with the set of generic points (and hence the set of irreducible components) of the local ring OX,x . Therefore ψX (x) depends only on OX,x , and φX (x) and HX (x) depend only on N and OX,x . Remark 1.29 (a) The choice of N does not matter. For sake of definiteness, we could have taken N = dim X, and the readers are invited to do so, if they prefer. But when dealing with two different schemes X and X ′ , the difference dim X − dim X ′ would always appear. Note that we can even have dim U < dim X for an open subscheme U ⊆ X. In the applications, there will usually be a common bound for the dimensions of the schemes considered, which we can take for N. (b) A more sophisticated way would be to consider the whole array 0 1 2 H X := (HX , HX , HX , . . .) where, for a function ϕ : N → N and possibly negative m ∈ Z, ϕ(m) : N → N is defined inductively by the formulae ϕ (0) =ϕ , ϕ (m+1) (n) = n X ϕ(m) (i) , ϕ(m−1) (n) = ϕ(m) (n) − ϕ(m) (n − 1) . i=0 Then (ϕ(m1 ) )(m2 ) = ϕ(m1 +m2 ) for m1 , m2 ∈ Z, and for a second function ψ : N → N one has ϕ ≤ ψ =⇒ ϕ(1) ≤ ψ (1) , (in the product order (1.1)), but the converse does not hold in general. With these definitions we could use the ordering ϕ  ψ :⇐⇒ ϕ(m) ≤ ψ (m) for all m ≫ 0 (not to be confused with the ordering ϕ(n) ≤ ψ(n) for n ≫ 0 ) in all applications below, and no choice of N appears. Note that ϕ = ψ ⇐⇒ ϕ(m) = ψ (m) , for all m ∈ Z. In the rest of the paper, a choice of N will be assumed and often suppressed in the notations. We shall need the following semi-continuity property of φX . Lemma 1.30 (1) For x, y ∈ X with x ∈ {y} one has I(y) ⊆ I(x) and φX (y) ≤ φX (x) + codim{y} (x) . (2) For y ∈ X, there is a non-empty open subset U ⊆ {y} such that I(x) = I(y) and φX (y) = φX (x) + codim{y} (x) for all x ∈ U. Proof (1): The inclusion I(y) ⊆ I(x) is clear, and for Z ∈ I(y) one has (1.9) codimZ (x) = codimZ (y) + codim{y} (x) . Thus ψX (x) ≤ ψX (y) + codim{y} (x), and the result follows. 24 (2): Let Z1 , . . . , Zr be the irreducible components of X which do not contain y. Then we S may take U = {y} ∩ (X \ ri=1 Zi ). In fact, if x ∈ U, then I(y) = I(x), and from (1.9) we get ψX (x) = ψX (y) + codim{y} (x) . Now we study the Hilbert-Samuel function HX . The analogue of Lemma 1.14 (a) and Lemma 1.23 is the following, where N is as in 1.28. Lemma 1.31 For x ∈ X one has HX (x) ≥ Φ(N ) , and equality holds if and only if x is a regular point. Proof We have (N −ψX (x)) HX (x) = HOX,x ≥ Φ(N −ψX (x)+codimX (x)) ≥ Φ(N ) . Here the first inequality follows from Lemma 1.23, and the second inequality holds because codimX (x) ≥ ψX (x). If HX (x) = Φ(N ) , then all inequalities are equalities, and hence, again by Lemma 1.23, x is a regular point. Conversely, if x is regular, then there is only one irreducible component of X on which x lies, and hence codimX (x) = ψX (x), so that the second inequality is an equality. Moreover, by Lemma 1.23, the first inequality is an equality. Remark 1.32 In particular, X is regular if and only if X(ν) = ∅ for all ν ∈ NN except reg reg for ν = νX , where νX = HX (x) for a regular point x of X which is independent of the choice of a regular point, viz., equal to Φ(N ) . We have the following important upper semi-continuity of the Hilbert-Samuel function. Theorem 1.33 Let X be a locally noetherian catenary scheme. (1) If x ∈ X is a specialization of y ∈ X, i.e., x ∈ {y}, then HX (x) ≥ HX (y). (2) For any y ∈ X, there is a dense open subset U of {y} such that HX (x) = HX (y) for all x ∈ U. (3) The function HX is upper semi-continuous, i.e., for any ν ∈ NN , X(≥ ν) is closed in X. Proof (1): We have (φ (x)) X HX (x) = HOX,x (φX (x)+codim{y} (x)) ≥ HOX,y (φ (y)) X ≥ HOX,y = HX (y) . Here the first inequality holds by results of Bennett ([Be], Theorem (2)), as improved by Singh ([Si1], see p. 202, remark after Theorem 1), and the second holds by Lemma 1.30 (1). (2): First of all, there is a non-empty open set U1 ⊆ {y} such that {y} ⊆ X is permissible (see 2.1) at each x ∈ U1 ([Be] Ch. 0, p. 41, (5.2)). Then (0) (codim{y} (x)) HOX,x = HOX,y 25 for all x ∈ U1 , see [Be] Ch. 0, p. 33, (2.1.2). On the other hand, by Lemma 1.30 (2) there is a non-empty open subset U2 ⊆ {y} such that φX (y) = φX (x) + codim{y} (x) for x ∈ U2 . Thus, for x ∈ U = U1 ∩ U2 we have (φ (x)) X HX (x) = HOX,x (φX (x)+codim{y} (x)) = HOX,y (φ (y)) X = HOX,y = HX (y) . By the following lemma, (3) is equivalent to the conjunction of (1) and (2). Let X be a locally noetherian topological space which is Zariski, i.e., in which every closed irreducible subset admits a generic point. (For example, let X be a locally noetherian scheme.) Recall that a map H : X −→ G into an ordered abelian group (G, ≤) is called upper semi-continuous if the set H X≥ν := X≥ν := {x ∈ X | H(x) ≥ ν} is closed for all ν ∈ G. We note that this property is compatible with restriction to any topological subspace. In particular, if X is a scheme, H is also upper semi-continuous after restricting it to a subscheme or an arbitrary localization. Lemma 1.34 (a) The map H is upper semi-continuous if and only if the following holds. (1) If x, y ∈ X with x ∈ {y}, then H(x) ≥ H(y). (2) For all y ∈ X there is a dense open subset U ⊂ {y} such that H(x) = H(y) for all x ∈ U. (b) Assume H is upper semi-continuous. Then the set Xν = {x ∈ X | H(x) = ν} is locally closed for each ν ∈ G, and its closure is contained in X≥ν . In particular, Xν is closed if ν is a maximal element in G. Moreover the set Xmax = {x ∈ X | x ∈ Xν for some maximal ν ∈ G } is closed. (c) If X is noetherian, then H takes only finitely many values. Proof We may restrict to the case where X is noetherian by taking an open covering (Uα ) by noetherian subspaces. In fact, a subset of X is closed (resp. locally closed) if and only if this holds for the intersection with each Uα . Moreover, in (1), if x ∈ Uα , then y ∈ Uα . In (2) we may take U ⊂ Uα where y ∈ Uα . If X is noetherian, then, by [Be], Ch. III, Lemma (1.1), X≥ν is closed if and only if the following conditions hold. (1’) If y ∈ X≥ν , then every x ∈ {y} is in X≥ν . (2’) If y ∈ / X≥ν , then (X − X≥ν ) ∩ {y} is open in {y}. Obviously, (1) above is equivalent to (1’) for all ν. Assuming (1), and (2’) for all ν, we get (2) by taking the following set for µ = H(y): U = X(µ) ∩ {y} = ∪ν>µ (X − X≥ν ) ∩ {y} . Conversely assume (1) and (2), and let ν ∈ G. By noetherian induction we show that X≥ν is closed. Assume ∅ = 6 Y ⊂ X is a minimal closed subset on which this is wrong. Since Y has only finitely many irreducible components, Y must be irreducible. Let η be 26 the generic point of Y , and let H(η) = µ. By (2) there is a dense open subset U ⊂ Z such that H(x) = µ for all x ∈ U. If ν = µ, then Y≥ν = Y by (1), so it is closed. If ν 6= µ, then Y≥ν ⊂ A, hence is closed in A (minimality of Y ), hence in Y – contradiction! Similarly, we show that H only takes finitely many values on (noetherian) X, which shows (c). Assume that Y 6= ∅ is a minimal closed subset on which this is wrong; again Y is necessarily irreducible. Let η be the generic point of Y , and let U be as in (1), for η. By minimality of Y , H takes only finitely many values on the closed set A = Y − U which is a contradiction. The first claim in (b) follows from the equality Xν = X≥ν − ∪µ>ν Xµ = X≥ν − ∪µ>ν X≥µ , and the other claims follow easily (recall we may assume (c)). Definition 1.35 For X locally noetherian catenary, let ΣX := {HX (x)| x ∈ X} ⊂ NN , and let Σmax be the set of the maximal elements in ΣX . The set X (1.10) Xmax = ∪ X(ν) ν∈Σmax X is called the Hilbert-Samuel locus of X (note that (1.10) is a disjoint union). By definition X(ν) 6= ∅ if and only if ν ∈ ΣX . By Lemma 1.34 we have Lemma 1.36 Let X be a locally noetherian catenary scheme. (a) For each ν ∈ NN the set X(ν) is locally closed in X and its closure in X is contained in the closed set X(≥ ν) = ∪ X(µ). µ≥ν In particular X(ν) is closed in X if ν ∈ Σmax X , and Xmax is closed. (b) If X is noetherian, then ΣX is finite. In the following we will regard the sets X(ν), X(≥ ν) and Xmax as (locally closed) subschemes of X, endowed with the reduced subscheme structure. Lemma 1.37 Let X be a locally noetherian scheme. (1) Let π : X ′ → X be a morphism with X ′ locally noetherian and let x ∈ X and x′ ∈ X ′ with π(x′ ) = x. Assume that π is flat and that the fibre Xx′ = X ′ ×X x of π above x is regular at x′ (e.g., assume that π is smooth around x′ , or that π is quasi-étale at x′ in the sense of Lemma 1.27 (1)). Then one has (1.11) (0) (d) HOX ′ ,x′ = HOX,x and ψX ′ (x′ ) = ψX (x) + d , where d = dim(OXx′ ,x′ ) = codimXx′ (x′ ). Hence, if X and X ′ are catenary, then HX ′ (x′ ) = HX (x). In particular, if π is flat with regular fibers (e.g., assume that π is étale or smooth), then (1.12) π −1 (X(ν)) = X ′ (ν) ∼ = X(ν) ×X X ′ for all ν ∈ NN . Moreover, X is regular at x if and only if X ′ is regular at x′ . 27 (2) Let X0 be an excellent scheme, and let f : X → X0 be a morphism which is locally of finite type. Let x0 ∈ X0 and X̂0 = Spec(ÔX0 ,x0 ), π : X̂ = X ×X0 X̂0 → X , where ÔX0 ,x0 is the completion of OX0 ,x0 . Then for any x ∈ X and any x̂ ∈ X̂ lying over x we have (1.13) (0) HO X̂,x̂ (d) = HOX,x and ψX̂ (x̂) = ψX (x) + d , where d = codimX̂x (x̂), X̂x = X̂ ×X y. In particular, HX̂ (x̂) = HX (x), and (1.14) π −1 (X(ν)) = X̂(ν) ∼ = X(ν) ×X X̂ for all ν ∈ NN . For the proof we shall use the following two lemmas. Lemma 1.38 Let f : W → Z be a flat morphism of locally noetherian schemes and let w ∈ W and z = f (w) ∈ Z. Then we have codimW (w) = codimZ (z) + dim OWz ,w , Wz = W ×Z z. In particular w is a generic point of W if and only if f (w) is a generic point of Z and codimWz (w) = 0. Proof See [EGA IV], 2, (6.1.2). Lemma 1.39 f : W → Z be a quasi-finite morphism of excellent schemes and let w ∈ W and z = f (w) ∈ Z. Assume that W and Z are irreducible. Then we have codimW (w) = codimZ (z). Proof See [EGA IV], 2, (5.6.5). Proof of Lemma 1.37 (1): The first equality in (1.11) follows from Lemma 1.27 (1.6). We show the second equality. We may assume that X is reduced. Since π : X ′ → X is flat, Lemma 1.38 implies that if η ′ is a generic point of X ′ with x′ ∈ {η ′ }, then η = π(η ′ ) is a generic point of X with x ∈ {η}. Moreover, if ξ is a generic point of X with x ∈ Z := {ξ}, then there exists a generic point ξ ′ of X ′ such that x′ ∈ {ξ ′ }. Indeed one can take a generic point ξ ′ of π −1 (Z) such that x′ ∈ {ξ ′ }. Then Lemma 1.38 applied to the flat morphism πZ : X ′ ×X Z → Z implies that π(ξ ′) = ξ and ξ ′ is of codimension 0 in πZ−1 (ξ) = π −1 (ξ) and hence ξ ′ is a generic point of X ′ . This shows that we may consider the case where X is integral, and it suffices show the following. Claim 1.40 Assume X is integral. Let W be an irreducible component of X ′ containing x′ . Then codimW (x′ ) = codimX (x) + d, d = codimXx′ (x′ ). 28 Since the question is local at x, we may assume X = Spec(A) for the local noetherian ring A = OX,x . If A is normal, then by [EGA IV], 2, (6.5.4) the local ring B = OX ′ ,x′ is normal as well, because the fibers of π are regular and hence normal. Therefore both A and B are integral, we have ψX (x) = dim(OX,x ) and ψX ′ (x′ ) = dim(OX ′ ,x′ ), and the claim follows from Lemma 1.38. In general let à be the normalization of A, let X̃ = Spec(Ã) (the normalization of X) and consider the cartesian diagram g′ X̃ ′ −−−→ X ′     π π̃ y y g X̃ −−−→ X in which the vertical morphisms are flat. Since X is excellent, the morphism g is finite and surjective, and so is its base change g ′. We claim that a point ξ ∈ X̃ ′ is generic if and only if η ′ = g ′ (ξ) is a generic point of X ′ . Indeed, by Lemma 1.38, ξ is generic if and only if it maps to the generic point η̃ of X̃ and is of codimension zero in the fibre π̃ −1 (η̃). Since the fibres over η̃ and the generic point η of X are the same, this is the case if and only if η ′ satisfies the corresponding properties for π, i.e., if η ′ is a generic point of X ′ . Now let W be an irreducible component of X ′ containing x′ . By the last claim together with the surjectivity of g ′, there is an irreducible component W̃ of X̃ ′ dominating W . Since g ′ is finite, it is a closed map, and so we have even g ′(W̃ ) = W . Thus there is a point z ′ ∈ W̃ with g ′ (z ′ ) = x′ . If z = π̃(z ′ ), then g(z) = y and (1.15) codimX̃z′ (z ′ ) = codimXx′ (x′ ) = d , where X̃z′ = Xx′ ×x z. We now conclude codimW (x′ ) = codimW ′ (z ′ ) = codimX̃ (z) + d = codimX (x) + d , where the first (resp. the third) equality follows from Lemma 1.39 applied to the finite morphism W̃ → W (resp. X̃ → X) and the second equality follows from (1.15) and the first case of the proof noting that X̃ is normal. This shows Claim 1.40 and completes the proof of (1.11). The next claims, including the first equality in (1.12), are now obvious. To see the isomorphism of schemes in (1.12), note the following. For any morphism f : S ′ → S of schemes and any subscheme T ⊂ S, T ×S S ′ is identified with a subscheme of S ′ , whose underlying topological space is homeomorphic with f −1 (T ). So we have to show that X(ν) ×X X ′ is reduced. But this follows from [EGA IV], 2, (3.3.5) and the flatness of π. The last statement in (1) now follows from Remark 1.32. (See also [EGA IV], 2, (6.5.2) for another proof.) Finally, (2) follows from applying (1) to the morphism X̂ ′ → X ′ ×X Spec(OX,x ) (compare the proof of Lemma 1.27, deduction of (3) from (2)). (i) (i+d(x)) Remark 1.41 Bennett [Be] defined global Hilbert-Samuel functions by HX,x = HOX,x , where d(x) = dim({x}), and showed that these functions have good properties for socalled weakly biequidimensional excellent schemes. By looking at the generic points and the closed points one easily sees that this function coincides with our function HX (x) (for N = dim X) if and only if X is biequidimensional. 29 2 Permissible blow-ups We discuss some fundamental results on the behavior of the ν ∗ -invariants, the e-invariants, and the Hilbert-Samuel functions under permissible blow-ups. Let X be a locally noetherian scheme and let D ⊂ X be a closed reduced subscheme. Let ID ⊂ OX the ideal sheaf of D in X and OD = OX /ID . Put M t t+1 grID (OX ) = ID /ID . t≥0 Definition 2.1 (1) X is normally flat along D at x ∈ D if the stalk grID (OX )x of grID (OX ) at x is a flat OD,x -module. X is normally flat along D if X is normally flat along D at all points of D, i.e., if grID (OX ) is a flat OD -module. (2) D ⊂ X is permissible at x ∈ D if D is regular at x, if X is normally flat along D at x, and if D contains no irreducible component of X containing x. D ⊂ X is permissible if D is permissible at all points of D. (3) The blowup πD : BℓD (X) → X in a permissible center D ⊂ X, is called a permissible blowup. For a closed subscheme D ⊂ X, the normal cone of D ⊂ X is defined as: CD (X) = Spec(grID (OX )) → D. Theorem 2.2 (1) There is a dense open subset U ⊂ D such that X is normally flat along D at all x ∈ U. (2) The following conditions are equivalent: (i) X is normally flat along D at x ∈ D. (ii) Tx (D) ⊂ Dirx (X) and the natural map Cx (X) → CD (X) ×D x induces an ∼ isomorphism Cx (X)/Tx (D) → CD (X) ×D x, where Tx (D) acts on Cx (X) by the addition in Tx (X). Assume that in addition that X is a closed subscheme of a regular locally noetherian scheme Z. Let x ∈ D and set R = OZ,x with the maximal ideal m and k = R/m. Let J ⊂ R (resp. p ⊂ R) be the ideal defining X ⊂ Z (resp. D ⊂ Z). Then the following conditions are equivalent to the conditions (i) and (ii) above. (iii) Let u : grp (R) ⊗R/p k → grm (R) be the natural map. Then Inm (J) is generated in grm (R) by u(Inp (J)). (iv) There exists a standard base f = (f1 , . . . , fm ) of J such that vm (fi ) = vp (fi ) for all i = 1, . . . , m (cf. (1.2)) . (3) Let π : X ′ → X be a morphism, with X ′ locally noetherian, and let D ′ = X ′ ×X D, regarded as a closed subscheme of X ′ . Let x′ ∈ D ′ and x = π(x′ ) ∈ D, and assume that π is flat at x′ and that the fiber Xx′ over x is regular at x′ . Then X ′ is normally flat along D ′ at x′ if and only if X is normally flat along D at x. Moreover, D ′ is regular (resp. permissible) at x′ if and only D is regular (resp. permissible) at x. 30 Proof (1) follows from [H1] Ch. I Theorem 1 on page 188 and (2) from [Gi1], II §2, Theorem 2.2 and 2.2.3 on page II-13 to II-15. (3): Since OX,x → OX ′ ,x′ is flat, one has grD′ (OX ′ )x′ ∼ = grD (OX )x ⊗OD,x OD′ ,x′ . = grD (OX )x ⊗OX,x OX ′ ,x′ ∼ Thus the first claim follows from the following general fact: If A → B is a flat morphism of local rings (hence faithfully flat), and M is an A-module, then M is flat over A if and only if M ⊗A B is flat over B. Since D ′ → D is flat and its fiber over x is the same as for π, hence regular, the next claim (on regularity) follows from 1.37 (1) (or [EGA IV], 2, (6.5.2)). The last claim (on nowhere density) follows from the flatness of π by the arguments used at the beginning of the proof of Lemma 1.37: If η ′ is a generic point of X ′ with x′ ∈ {η ′} ⊂ D ′ = π −1 (D), then η = π(η ′ ) is a generic point of X with x ∈ {η} ⊂ D. Conversely, if start with η as in the latter situation, there is a generic point η ′ of X ′ mapping to η with x′ ∈ {η ′ }. But then η ′ ∈ D ′ . There is a numerical criterion for normal flatness due to Bennett, which we carry over to our setting: Let the assumption be as in the beginning of this section. Assume in addition that X is catenary (e.g., let X be excellent) and let HX (x) be as in Definition 1.28. Theorem 2.3 Assume that D is regular. Let x ∈ D, and let y be the generic point of the component of D which contains x. Then the following conditions are equivalent. (1) X is normally flat along D at x. (0) (codimY (x)) (2) HOX,x = HOX,y , where Y = {y}, the closure of y in X. (3) HX (x) = HX (y). Proof The equivalence of (1) and (2) was proved by Bennett ([Be], Theorem (3)). The rest is a special case of the following lemma. Lemma 2.4 Let x, y ∈ X with x ∈ {y}. Then the following are equivalent. (0) (codim{y} (x)) (1) HOX,x = HOX,y . (2) HX (x) = HX (y). If these conditions hold, then I(x) = I(y) and ψX (x) = ψX (y) + codimY (x). Proof By the definition of the considered functions, for the equivalence of (1) and (2) it suffices to show that either of (1) and (2) implies (2.1) φX (y) = φX (x) + codimY (x) , where Y = {y}. Assume (2). By Lemma 1.25 we have dim OX,x + φX (x) = dim OX,y + φX (y). On the other hand, dim OX,x = codimX (x) ≥ codimY (x) + codimX (y) = codimY (x) + dim OX,y . 31 Thus we get φX (y) = dim OX,x + φX (x) − dim OX,y ≥ φX (x) + codimY (x) , which implies (2.1) by Lemma 1.30. Next assume (1). Let O = OX,x and let p ⊂ O be the prime ideal corresponding to y. It suffices to show that p contains all minimal prime ideals of O. In fact, this means that y is contained in all irreducible components of X which contain x, i.e., that I(y) = I(x). Since, for any irreducible Z ∈ I(y) we have codimZ (x) = codimZ (y) + codimY (x) , we deduce the equality ψX (x) = ψX (y) + codimY (x) and hence (2.1). At the same time we have proved the last claims of the lemma. As for the claim on O and p let (0) = P1 ∩ . . . ∩ Pr be a reduced primary decomposition of the zero ideal of O, and let pi = Rad(Pi ) be the prime ideal associated to Pi . Then the set {p1 , . . . , pr } contains all minimal prime ideals of O, and it suffices to show that p contains all ideals Pi (Note that an ideal a is contained in p if and only if Rad(a) is contained in p). Assume the contrary. We may assume P1 * p. Put O′ = O/Q with Q = P2 ∩ · · · ∩ Pr and let Op (resp. Op′ ) be the localization of O (resp. O′ ) at p (resp. pO′ ). Then Op = Op′ and O/p = O′ /pO′ and (0) (0) (d) (d) HO ≥ HO′ ≥ HOp′ = HOp , where d = codimY (x) = dim O/p = dim O′ /pO′ . The first inequality follows from Lemma (1) 1.24 and the second inequality follows from [Be], Theorem (2). Hence (2) implies HO = (1) HO′ . By Lemma 1.24 this implies O = O′ so that Q = 0, contradicting the assumption that the primary decomposition is reduced.  The above criterion is complemented by the following observation. Lemma 2.5 Let X be connected. If there is an irreducible component Z ⊆ X such that HX (x) = HX (y) for all x, y ∈ Z (i.e., Z ⊆ X(ν) for some ν ∈ NN ), then Z = X. Proof We have to show that X is irreducible. Assume not. Then there exists an x ∈ X which is contained in two different irreducible components. Let O = OX,x be the local ring of X at x, let < 0 > = P1 ∩ . . . ∩ Pr (2.2) be a reduced primary decomposition of the zero ideal of O, and let pi = Rad(Pi ) be the prime ideal associated to Pi . By assumption we have r 6= 1. Then there is an i such that the trace of Z in O is given by pi . Let ηi ∈ Spec(O/Pi ) ⊂ Spec(O) ⊂ X be the generic point of Z (corresponding to pi ). By assumption we have (N ) (N −ψX (x)) HOX,η = HX (ηi ) = HX (x) = HO i 32 where N is as in Definition 1.28, because ψX (ηi ) = 0. On the other hand, we have (2.3) (N −c) (N ) (N −c) H(O/Pi )p ≤ HO/Pi ≤ HO i (N −ψX (x)) ≤ HO , where c := dim(O/Pi ) = dim(O/pi ) = codim{ηi } (x) = codimZ (x). Here the first inequality holds by the results of Bennett/Singh recalled in the proof of Theorem 1.33 (1), the second inequality follows from Lemma 1.24, and the last inequality holds since ψX (x) ≤ c. Now, since pi is a minimal prime ideal and (2.2) is reduced, we have an isomorphism OX,ηi = Opi ∼ = (O/Pi )pi . Therefore we have equalities in (2.3). By the other direction of Lemma 1.24 we conclude that O = O/Pi , i.e., Pi = 0, which is a contradiction if r 6= 1. We now prove a semi-continuity property for ex (X), the dimension of the directrix at x. Theorem 2.6 Let X be an excellent scheme, or a scheme embeddable into a regular scheme, and let x, y ∈ X such that D = {y} is permissible and x ∈ D. Then ey (X) ≤ ex (X) − dim(OD,y ) . The question only depends on the local ring OX,x , and by Lemma 1.27 (3) we may assume that we consider the spectrum of a complete local ring and the closed point x in it. Moreover, by the Cohen structure theory of complete local noetherian rings (see [EGA IV], 1, (0.19.8.8)) every such ring is a quotient of a (complete) regular local ring. Therefore Theorem 2.6 is implied by the following result. Theorem 2.7 Let R be a regular local ring with maximal ideal m. Let J ⊂ R be an ideal. Let p ⊂ R be a prime ideal such that J ⊂ p and that Spec(R/p) ⊂ Spec(R/J) is permissible. Let Rp be the localization of R at p and Jp = JRp . Then e(Rp /Jp ) ≤ e(R/J) − dim(R/p). Proof Set A = R/p and let K be the quotient field of A. Set MK = M ⊗A K for an A-module M. By definition there exists a K-subspace V = IDir(Rp /Jp ) ⊂ gr1p (R)K of dimension s such that dimK (V ) = dim(Rp ) − e(Rp /Jp ) and (2.4) Inp (J)K = (K[V ] ∩ Inp (J)K ) · grp (R)K . Lemma 2.8 Assume that there exist free A-modules T, S ⊂ gr1p (R) such that gr1p (R) = T ⊕ S and V = TK . Let u : grp (R) ⊗R/p k → grm (R) be the natural map. Then u(T ) ⊃ IDir(R/J) ∩ gr1m (R). Note that the assumption of the lemma is satisfied if dim(A) = 1, by the theory of elementary divisors. Theorem 2.6 is a consequence of the conclusion of Lemma 2.8 by noting dimk (u(T )) = dimk (T ⊗A k) = dimK (V ) = dim(Rp ) − e(Rp /Jp ) so that the lemma finishes the proof of the theorem in case dim(R/p) = 1. 33 We show Lemma 2.8. The assumption of the lemma implies grp (R) = SymA (gr1p (R)) = A[T ] ⊗A A[S], (2.5) where A[T ] = SymA (T ) (resp. A[S] = SymA (S)) is the sub A-algebra of grp (R) generated by T (resp. S). Claim 2.9 Inp (J) = (A[T ] ∩ Inp (J)) · grp (R). By Theorem 2.2(2)(iii) the claim implies that Inm (J) is generated by u(A[T ]) ∩ Inm (J), which implies Lemma 2.8. Thus it suffices to show the claim. Note (K[V ] ∩ Inp (J)K ) ∩ grp (R) = (A[T ] ∩ Inp (J))K ∩ grp (R) = A[T ] ∩ Inp (J). (2.6) Indeed (2.5) implies K[V ] ∩ grp (R) = A[T ] and the flatness of grp (R/J) = grp (R)/Inp (J) implies Inp (J)K ∩ grp (R) = Inp (J). Take any φ ∈ Inp (J). By (2.4) and (2.6) there exists c ∈ A such that X cφ = ai ψi , ψi ∈ A[T ] ∩ Inp (J), ai ∈ grp (R), 1≤i≤m Choosing a basis Z1 , . . . , Zr of the A-module S, (2.5) allows us to identify grp (R) with the polynomial ring A[T ][Z] = A[T ][Z1 , . . . , Zr ] over A[T ]. Then, expanding X X Z B ai,B , with φB ∈ A[T ], ai,B ∈ A[T ], Z B φB , ai = φ= B∈Zr≥0 B∈Zr≥0 we get cφB = Since P X ai,B ψi for any B ∈ Zr≥0 . 1≤i≤m ai,B ψi ∈ A[T ] ∩ Inp (J), this implies φB ∈ A[T ] ∩ Inp (J) by (2.6) so that 1≤i≤m φ ∈ (A[T ] ∩ Inp (J)) · grp (R). This completes the proof of the claim. To finish the proof of Theorem 2.6, it suffices to reduce it to the case dim(R/p) = 1 as remarked below Lemma 2.8. Assume dim(R/p) > 1 and take a prime ideal q ⊃ p such that R/q is regular of dimension 1. Let Rq be the localization of R at q and Jq = JRq . Noting grpRq (Rq /Jq ) ≃ grp (R/J) ⊗R/p Rq /pRq , the assumption implies that Spec(Rq /pRq ) ⊂ Spec(Rq /JRq ) is permissible. By the induction on dim(R), we have e(Rp /Jp ) ≤ e(Rq /Jq ) − dim(Rq /pRq ) = e(Rq /Jq ) − (dim(R/p) − 1) (Note that any regular local ring is catenary [EGA IV], 1, (0.16.5.12)). Hence we are reduced to show e(Rq /Jq ) ≤ e(R/J) − dim(R/q) = e(Rq /Jq ) ≤ e(R/J) − 1. This completes the proof of Theorem 2.6. Bennett and Hironaka proved results about the behavior of Hilbert-Samuel functions in permissible blow-ups which are fundamental in resolution of singularities. We recall these results (as well as some improvements by Singh) and carry them over to our setting. 34 Theorem 2.10 Let X be an excellent scheme, or a scheme which is embeddable in a regular scheme. Let D ⊂ X be a permissible closed subscheme, and let πX : X ′ = BℓD (X) → X and −1 be the blowup with center D. Take any points x ∈ D and x′ ∈ πX (x) and let δ = δx′ /x := ′ trdegk(x) (k(x )). Then: (δ) (0) (1) HOX ′,x′ ≤ HOX,x and φX ′ (x′ ) ≤ φX (x) + δ and HX ′ (x′ ) ≤ HX (x). (2) HX ′ (x′ ) = HX (x) ⇔ (δ) (0) HOX ′,x′ = HOX,x . (3) If the equalities in (2) hold, then φX ′ (x′ ) = φX (x) + δ, the morphism OX,x → OX ′ ,x′ is injective, and I(x′ ) = {Z ′ | Z ∈ I(x)} where Z ′ denotes the strict transform of Z ∈ I(x). (4) If the equalities in (2) hold, then, for any field extension K/k(x′ ) one has ex′ (X ′ )K ≤ ex (X)K − δx′ /x . Assume in addition that X ֒→ Z is a closed immersion into a regular scheme Z, and let πZ : Z ′ = BℓD (Z) → Z be the blowup with center D. Then: (5) νx∗′ (X ′ , Z ′ ) ≤ νx∗ (X, Z) in the lexicographic order. (δ) (0) (6) HOX ′,x′ = HOX,x ⇔ νx∗′ (X ′ , Z ′ ) = νx∗ (X, Z). (1+δ) (1) Proof In a slightly weaker form, viz., HOX ′,x′ ≤ HOX,x , the first inequality in (1) was proved by Bennett ([Be] Theorem (2)), and Hironaka gave a simplified proof ([H4] Theorem I). In the stronger form above it was proved by Singh ([Si1], Remark after Theorem 1). For the second inequality, since dim(X) = dim(X ′ ), it suffices to show (2.7) ψX (x) ≤ ψX ′ (x′ ) + δ. Note that X is universally catenary by assumption (because excellent schemes and closed subschemes of regular schemes are universally catenary (by definition and by [EGA IV], 2, (5.6.4), respectively). Let Y1 , . . . , Yr be the irreducible components of X and let Yi′ be the strict transform of Yi under πX . Then Y1′ , . . . , Yr′ are the irreducible components of X ′ . If x′ ∈ Yi′ , then x ∈ Yi and [EGA IV], 2, (5.6.1) implies (note that OYi ,x is universally catenary since X is) (2.8) codimYi (x) = codimYi′ (x′ ) + δ. (2.7) follows immediately from this. 35 The last inequality in (1) now follows: (2.9) (φ (x′ )) HX ′ (x′ ) = HOXX′′,x′ (φ (x)+δ) ≤ HOXX′ ,x′ (φ (x)) X ≤ HOX,x = HX (x). Claims (5) and (6) were proved by Hironaka in [H4] Theorems II and III, hence it remains to show (2), (3) and (4). As for (2), assume HX ′ (x′ ) = HX (x), i.e., that equality holds everywhere in (2.9). To (δ) (0) show HOX ′ ,x′ = HOX,x , it suffices to show that φX ′ (x′ ) = φX (x) + δ . (2.10) Let d = dim(OX,x ) and d′ = dim(OX ′ ,x′ ). By Lemma 1.25(b) the assumption implies d′ + φX ′ (x′ ) = d + φX (x) . (2.11) (δ) (0) On the other hand, by Lemma 1.25(b), the inequality HOX ′,x′ ≤ HOX,x from (1) implies d′ + δ ≤ d . (2.12) From (2.11) and (2.12) we deduce φX (x) + δ ≤ φX ′ (x′ ) , which implies (2.10), in view of (1). (δ) (0) Conversely assume HOX ′ ,x′ = HOX,x . To show HX ′ (x′ ) = HX (x), it again suffices to show (2.10). We have to show (2.13) ψX (x) = ψX ′ (x′ ) + δ . In view of (2.8) and with the notations there, it suffices to show that x′ ∈ Yi′ if x ∈ Yi , i.e., the third claim of (3). For this, by the lemma below, it suffices to show the injectivity of O = OX,x → OX ′ ,x′ = O′ , i.e., the second claim of (3). Lemma 2.11 Let f : A → B be a homomorphism of noetherian rings. Assume that there is a minimal prime ideal of A, which does not lie in the image of Spec(B) → Spec(A). Then f is not injective. Proof Let (0) = P1 ∩ . . . ∩ Pr be a primary decomposition of the zero ideal in B, and let pi = Rad(Pi ), which is a prime ideal. Assume A → B is injective. Then, with Qi = Pi ∩ A, (0) = Q1 , ∩ . . . ∩ Qr is a primary decomposition in A. Therefore {q, . . . , qr }, with qi = Rad(Qi ) = pi ∩A, is the set of all associated prime ideals of A and hence contains all minimal prime ideals of A, see [Ku] VI Theorems 2.18 and 2.9. This contradicts the assumption. Before we go on, we note the following consequence of Lemmas 1.27 and 1.37: For all claims of Theorem 2.10, we may, via base change, assume that X = Spec(OX,x ), and that OX,x is a quotient of a regular local ring R. In fact, the last property holds either by assumption, or X is excellent and we may base change with the completion Ô of O = OX,x which then is a quotient of a regular ring by Cohen’s structure theorem. It also suffices to check the injectivity of O → O′ after this base change, because O → Ô is faithfully flat. 36 Now we use the results of Hironaka in [H4]. First consider the case k(x′ ) = k(x), where δ = 0. Let p ⊂ O = OX,x be the prime ideal corresponding to D, let A = grp(OX,x ) ⊗O/p k(x), −1 and let F = πX (x) ⊂ X ′ be the scheme theoretic fibre of πX : X ′ → X over x. Then F = Proj(A), and by [H4] (4.1) we have inequalities (2.14) (1+δ) (2+δ+s) HOX ′ ,x′ ≤ HOF,x′ (1+s) (1) ≤ HCX,D,x = HOX,x , where s = dim OD,x and CX,D,x = Spec(A). By our assumption, these are all equalities. Moreover, if O = R/J for a regular local ring R with maximal ideal m, then there is a system of regular parameters (x0 , . . . , xr , y1 , . . . , ys ) of R such that the ideal P of D in R is generated by x0 , . . . , xr . If X0 , . . . , Xr , Y1 , . . . , Ys are the initial forms of x0 , . . . , xr , y1, . . . , ys (with respect to m), then the fiber E over x in the blowup Z ′ of Z = Spec(R) in the center D is isomorphic to Proj(k[X.]) for k = k(x) and the polynomial ring k[X.] = k[X0 , . . . , Xr ], and there is a homogeneous ideal I ⊂ k[X.] such that A = k[X.]/I and F ⊂ E identifies with the canonical immersion Proj(k[X.]/I) ⊂ Proj(k[X.]). We may assume that x′ ∈ F ⊂ E lies in the standard open subset D+ (X0 ) ⊂ Proj(k[X.]) = E. If furthermore k(x′ ) = k(x) = k as we assume, then δ = 0, and by equality in the middle of (2.14) and the proof of lemma 8 in [H4] there is a graded k-algebra B and an isomorphism of graded k[X0 ]-algebras A ∼ = B[X0 ]. On the other hand, let n be the maximal ideal of O, and let z1 , . . . , zs ∈ n be elements whose images Z1 , . . . , Zs ∈ n/n2 form a basis of n/p + n2 . Then one has an isomorphism of graded algebras A[Z1 , . . . , Zs ] ∼ = grn (O) induced by the canonical map A → grn (O), because p ⊂ O is permissible ([H1] II 1. Proposition 1). This shows that the image of X0 in n/n2 , is not zero and not a zero divisor in grn (O). Therefore the image of x0 ∈ R in O is not zero and not a zero divisor in O. Now we claim that every element in the kernel of O → O′ is annihilated by a power of x0 , which then gives a contradiction if this kernel is non-zero. Let R′ = OZ ′ ,x′ be the monoidal transform of R with center P corresponding to x′ ∈ Z ′ , where p = P/J, and let J ′ ⊂ R′ be the strict transform of J, so that O′ := OX ′ ,x′ = R′ /J ′ . Then, since x x R′ = R[ x1 , . . . , xr ]< xx1 ,..., xxr > 0 0 0 and P R′ = x0 R′ , 0 it follows from [H1] III Lemma 6, p. 216 that there are generators f1 , . . . , fm of J and natural numbers n1 , . . . , nm such that J ′ is generated by f1 /xn0 1 , . . . , fm /xn0 m . Evidently this implies that every element in the kernel of O → O′ is annihilated by a power of x0 . Now consider the case that the residue field extension k(x′ )/k(x) is arbitrary. We reduce to the residually rational case (k(x′ ) = k(x)) by the same technique as in [H4]. As there, one may replace X by SpecOX,x , and consider a cartesian diagram x′   y x i′ X ′ ←−−−   πX y i X̃ ′  π y X̃ X ←−−− X̃ 37 x̃′   y x̃ , where i is a faithfully flat monogenic map which is either finite or the projection X̃ = A1X → X, and f˜ is the blow-up of D̃ = i−1 (D), which is again permissible. Moreover, x̃ ∈ X̃ is the generic point of i−1 (x) such that k(x̃) is a monogenic field extension of k(x), and there is a point x̃′ ∈ X̃ ′ which maps to x′ ∈ X ′ and x̃ ∈ X̃ and satisfies k(x̃′ ) = k(x′ ). Furthermore one has the inequalities (1+δ) (1+δ̃) HOX ′ ,x′ ≤ HO X̃ ′ ,x̃′ (1) ≤ HO X̃,x̃ (1) = HOX,x , where δ̃ = tr.deg(k(x̃′ )/k(x̃)) (= δ if k(x̃)/k(x) is algebraic, and δ − 1 otherwise). By our assumption all inequalities become in fact equalities, and by induction on the number of generators of k(x′ ) over k(x) (starting with the residually rational case proved above), we may assume that OX̃,x̃ → OX̃ ′ ,x̃′ is injective. Since OX,x → OX̃,x̃ is injective, we obtained the injectivity of OX,x → OX ′ ,x′ . This completes the proof of (2), and while doing it, we also proved the claims in (3). Finally we prove (4). Still under the assumption that X is embedded in a regular scheme Z, Hironaka proved in [H2] Theorem (1,A), that the equality νx∗′ (X ′ , Z ′) = νx∗ (X, Z) implies the inequality in (4). Together with (2) and (6) this implies (4) and finishes the proof of Theorem 2.10.  Corollary 2.12 For ν ∈ Σmax (cf. Definition 1.35), either ν 6∈ ΣX ′ or ν ∈ Σmax X X ′ . We have [ −1 −1 X ′ (ν) ⊂ πX (X(ν)) and πX (X(ν)) ⊂ X ′ (µ). µ≤ν Definition 2.13 Let the assumption be as in Theorem 2.10 and put k ′ = k(x′ ). −1 (1) x′ ∈ πX (x) is near to x if HX ′ (x′ ) = HX (x). (2) x′ is very near to x if it is near to x and ex′ (X ′ ) + δx′ /x = ex (X)k′ = ex (X). We recall another result of Hironaka, as improved by Mizutani, which plays a crucial role in this paper. Let again X be an excellent scheme or a scheme embeddable in a regular scheme. Let D ⊂ X be a permissible closed subscheme, and let πX : X ′ = BℓD (X) → X and −1 be the blowup with center D. Take any points x ∈ D and x′ ∈ πX (x). Theorem 2.14 Assume that x′ is near to x. Assume further that char(k(x)) = 0, or char(k(x)) ≥ dim(X)/2 + 1, where k(x) is the residue field of x. Then −1 x′ ∈ P(Dirx (X)/Tx (D)) ⊂ πX (x) , where P(V ) is the projective space associated to a vector space V . Proof First we note that the inclusion above is induced by the inclusion of cones (i.e., spectra of graded algebras) Dirx (X)/Tx (D) ⊂ Cx (X)/Tx (D) and the isomorphism Cx (X)/Tx (D) ∼ = CD (X)x of cones from Theorem 2.2 (2)(ii). More precisely, it is induced by applying the Proj-construction to the surjection of graded k(x)-algebras AD = grnx (OX,x )/Sym(Tx (D)) ։ Sym(Dirx (X))/Sym(Tx (D)) = BD 38 where we identify affine spaces with the associated vector spaces and note that Proj(AD ) = −1 πX (x). Since the claim is local, we may pass to the local ring O = OX,x of X at x. Further, as in the proof of Theorem 2.10, we may assume that X is embedded into a regular scheme Z. If πZ : Z ′ = BℓD (Z) → Z denotes the blowup of Z in D, we have a further inclusion −1 P(Cx (X)/Tx (D)) = πX (x) ⊂ P(Tx (Z)/Tx (D)) = πZ−1 (x) . Therefore the claim that x′ ∈ P(Dirx (X)/Tx (D)) follows from [H4], Theorem IV, [H5], Theorem 2, and [Miz]. In fact, by the second reference there is a certain canonical subgroup scheme BP,x′ ⊂ V = Tx (Z)/Tx (D) just depending on x′ ∈ P = P(V), which has the following properties. It is defined by homogeneous equations in the coordinates of V, hence is a subcone of V, and the associated subspace P(BP,x′ ) contains x′ . Moreover, by the first reference it is a vector subspace of V if char(k(x)) = 0, or char(k(x)) = p > 0 with p ≥ dim(BP,x′ ), and in [Miz] this was improved to the (sharp) bound p ≥ dim(BP,x′ )/2+1. On the other hand, by the first reference, the action of BP,x′ on V respects Cx (X)/Tx (D) if x′ is near to x. Since 0 ∈ Cx (X), we conclude that BP,x′ is contained in Cx (X)/Tx (D), and hence has dimension at most d = dim(X) − dim(D) ≤ dim(X). Therefore, by the assumption p ≥ dim(X)/2 + 1, BP,x′ is a vector subspace of Cx (X)/Tx (D) and is thus contained in the biggest such subspace - which is Dirx (X)/Tx (D). Therefore x′ ∈ P(BP,x′ ) ⊂ P(Dirx (X)/Tx (D)). ′ Lemma 2.15 Consider X(ν) for ν ∈ Σmax X . Let π : X = BℓD (X) → X be the blowup with permissible center D contained in X(ν). Let Y ⊂ X(ν) be an irreducible closed subset which contains D as a proper subset. Then: (1) Y ′ ⊂ X ′ (ν), where Y ′ ⊂ X ′ be the proper transform. (2) Assume char(k(x)) = 0, or char(k(x)) ≥ dim(X)/2 + 1. Then we have ex (X) ≥ 1 for any x ∈ D and ex′ (X ′ ) ≥ 1 for any x′ ∈ π −1 (D) ∩ Y ′ . Proof Let η (resp. η ′ ) be the generic point of Y (resp. Y ′ ). Take points x ∈ D and x′ ∈ π −1 (x) ∩ Y ′ . Then we have HX (x) ≥ HX ′ (x′ ) ≥ HX ′ (η ′ ) = HX (η), where the first inequality follows from Theorem 2.10(1), the second from theorem 1.33, and the last equality follow from the fact OX,η ∼ = OX ′ ,η′ . Since Y ⊂ X(ν), we have HX (x) = HX (η) = ν so that the above inequalities are equalities. This implies Y ′ ⊂ X ′ (ν), which proves (1). Next we show (2). If ex (X) = 0 for x ∈ D, then there is no point of Bℓx (X) which is near to x by Theorem 2.14. Thus (1) implies ex (X) ≥ 1. To show ex′ (X ′ ) ≥ 1 for x′ ∈ π −1 (D) ∩ Y ′ , let W ⊂ X ′ be the closure of x′ in X ′ . By assumption W is a proper closed subset of Y ′ . Since ex′ (X ′ ) is a local invariant of OX ′ ,x′ , we may localize X ′ at x′ to assume W is regular. Then, by Theorem 2.3, W ′ ⊂ X ′ is permissible. Now the assertion follows from the previous assertion applied to BℓW (X ′ ) → X ′ .  39 3 B-Permissible blow-ups - the embedded case Let Z be a regular scheme and let B ⊂ Z be a simple normal crossing divisor on Z. For each x ∈ Z, let B(x) be the subdivisor of B which is the union of the irreducible components of B containing x. Definition 3.1 Let D ⊂ Z be a regular subscheme and x ∈ D. We say D is normal crossing (n.c.) with B at x if there exists a system z1 , . . . , zd of regular parameters of R := OZ,x satisfying the following conditions: (1) D ×Z Spec(R) = Spec(R/hz1 , . . . , zr i) for some 1 ≤ r ≤ d. Q (2) B(x) ×Z Spec(R) = Spec(R/h zj i) for some J ⊂ {1, . . . , d}. j∈J We say D is transversal with B at x if in addition the parameters can be chosen such that J ⊂ {r + 1, . . . , d}. We say D is n.c. (resp. transversal) with B if D is n.c. (resp. transversal) with B at any point x ∈ D. Note that D is n.c. with B if and only if D is transversal with the intersection of any set of irreducible components of B which do not contain D. πZ e = BℓD× B (B) ⊂ Z ′ Let D ⊂ Z be n.c. with B. Consider Z ′ = BℓD (Z) −→ Z. Let B Z be the strict transform of B in Z ′ , let E := πZ−1 (D) be the exceptional divisor, and let e ∪ E be the complete transform of B in Z ′ . We easily see the following: B′ = B e and B′ are simple normal crossing divisors on Z ′ . Lemma 3.2 B For the following, and for the comparison with the next section, it will be more convenient to consider the set B = C(B) of irreducible components of B. Definition 3.3 A simple normal crossings boundary on Z is a set B = {B1 , . . . , Bn } of regular divisors on Z such that the associated divisor div(B) = B1 ∪ . . . ∪ Bn is a (simple) normal crossings divisor. For x ∈ Z let B(x) = {B ∈ B | x ∈ B}. Often the elements of B are also called components of B. An equivalent condition is that the Bi intersect transversally, i.e., that for each subset {i1 , . . . , ir } ⊂ {1, . . . , n} the intersection Bi1 ×Z . . . ×Z Bir is regular of pure codimension r in Z. The associations (3.1) B 7→ B = C(B) , B 7→ B = div(B) give mutual inverse bijections between the set of simple normal crossing (s.n.c.) divisors on Z and the set of simple normal crossing (s.n.c.) boundaries on Z, and we will now use the second language. Via (3.1) the above definitions correspond to the following in the setting of boundaries. Definition 3.4 (a) A regular subscheme D ⊂ Z is transversal with a s.n.c. boundary B at x if for B(x) = {B1 , . . . , Br } it intersects all multiple intersections Bi1 ×Z . . . ×Z Bis transversally at x, and D is normal crossing (n.c.) with B at x if it is transversal with B(x) − B(x, D) at x, where B(x, D) = {B ∈ B(x) | D ⊂ B}. D is transversal (resp. n.c.) with B, if it is transversal (resp. n.c.) with B at all points x ∈ D. 40 π Z Z is the blow-up of D, then the strict and (b) If D is n.c. with B, and Z ′ = BℓD (Z) −→ the complete transform of B are defined as Be := {B̃ | B ∈ B} , B′ := Be ∪ {E} respectively, where B̃ = BℓD×Z B (B) is the strict transform of B in Z, and E = πZ−1 (D) is the exceptional divisor. (Note that Be and B′ are s.n.c. boundaries on Z ′ by Lemma 3.2.) In the following, consider a regular scheme Z and a simple normal crossing boundary B on Z. Moreover let X ⊂ Z be a closed subscheme. Definition 3.5 Let D ⊂ X be a regular closed subscheme and x ∈ D. We say D is B-permissible at x if D ⊂ X is permissible at x and D is n.c. with B at x. We say D ⊂ X is B-permissible if D ⊂ X is permissible at all x ∈ D. Definition 3.6 A history function for B on X is a function (3.2) O : X → {subsets of B} ; x → O(x), which satisfies the following conditions: (O1) For any x ∈ X, O(x) ⊂ B(x). (O2) For any x, y ∈ X such that x ∈ {y} and HX (x) = HX (y), we have O(y) ⊂ O(x). (O3) For any y ∈ X, there exists a non-empty open subset U ⊂ {y} such that O(x) = O(y) for all x ∈ U such that HX (x) = HX (y). For such a function, we put for x ∈ X, N(x) = B(x) − O(x). A component of B is called old (resp. new) for x if it is a component of O(x) (resp. N(x)). A basic example of a history function for B on X is given by the following: Lemma 3.7 The function O(x) = B(x) (x ∈ X), is a history function for B on X. In fact it satisfies 3.6 (O2) and (O3) without the condition HX (x) = HX (y). Proof Left to the readers. Define the Hilbert-Samuel function of (X, O) as: O HX : X → NN × N ; x → (HX (x), | O(x) |), where | O(x) | is the cardinality of O(x). We endow NN × N with the lexicographic order: (ν, µ) ≥ (ν ′ , µ′) ⇔ ν > ν ′ or ν = ν ′ and µ ≥ µ′ . Theorem 1.33 and the conditions in 3.6 immediately imply the following: Theorem 3.8 Let the assumption be as above. 41 O O (1) If x ∈ X is a specialization of y ∈ X, then HX (x) ≥ HX (y). O O (2) For any y ∈ X, there is a dense open subset U of {y} such that HX (y) = HX (x) for any x ∈ U. O In other words (see Lemma 1.34 (a)), the function HX is upper semi-continuous on X. Let O N ΣO X := {HX (x)| x ∈ X} ⊂ N × N , and let ΣO,max be the set of of the maximal elements in ΣO X. X Definition 3.9 (1) For νe ∈ ΣO X we define and and we call (3.3) O X(e ν ) = X O (e ν ) = {x ∈ X | HX (x) = νe} O X(≥ νe) = X O (≥ νe) = {x ∈ X | HX (x) ≥ νe} , O Xmax = ∪ νe∈ΣO,max X X(e ν) . the O-Hilbert-Samuel locus of X. (2) We define \ DirO Tx (B) ⊂ Tx (Z). x (X) := Dirx (X) ∩ B∈O(x) O eO x (X) = dimk(x) (Dirx (X)). By Lemma 1.34, X(e ν ) is locally closed, with closure contained in X(≥ νe). Moreover, O is a closed subset of X, X(e ν ) is closed for νe ∈ ΣO,max , the union in (3.3) is disjoint, Xmax X and ΣO is finite if X is noetherian. Theorems 2.2 and 2.3 imply the following: X Theorem 3.10 Let D ⊂ X be a regular closed subscheme and x ∈ D. Then the following conditions are equivalent: (1) D ⊂ X is permissible at x and there is an open neighborhood U of x in Z such that D ∩ U ⊂ B for every B ∈ O(x). O O (2) HX (x) = HX (y) for any y ∈ D such that x is a specialization of y. Under the above conditions, we have (3.4) Tx (D) ⊂ DirO x (X). Definition 3.11 A closed subscheme D ⊂ X is called O-permissible at x, if it satisfies the equivalent conditions in Theorem 3.10, and it is called O-permissible, if it is O-permissible at all x ∈ D. Remark 3.12 Note that D ⊂ X is B-permissible at x if and only if D is O-permissible at x and n.c with N(x) at x. 42 Theorem 3.13 Let the assumption be as in Theorem 3.10 and assume that D is irreducible. Assume: (1) D ⊂ X is O-permissible at x. (2) eη (X) = ex (X) − dim(OD,x ) (cf. Theorem 2.6), where η is the generic point of D. Then we have O eO η (X) ≤ ex (X) − dim(OD,x ). Proof First we claim that (1) and (2) hold after replacing x by any point y ∈ D such that x ∈ {y} and {y} is regular at x. Indeed the claim follows from the inequalities: O O O HX (η) ≤ HX (y) ≤ HX (x), eη (X) ≤ ey (X) − dim(OD,y )  ≤ ex (X) − dim(O{y},x ) − dim(OD,y ) = ex (X) − dim(OD,x ), which follows from Theorems 3.8 and 2.6. By the claim we are reduced to the case where dim(OD,x ) = 1 by the same argument as in the proof of Theorem 2.6. Let R = OZ,x and let J ⊂ p ⊂ R be the ideals defining X ⊂ Z and D ⊂ Z, respectively. Let Rp is the localization of R at p and Jp = JRp . By Lemma 2.8 (2) implies that there exists a part of a system of regular parameters y = (y1, . . . , yr ) of R such that y ⊂ p and that IDir(Rp /Jp ) = hinp (y1 ), . . . , inp (yr )i ⊂ grp (Rp ), IDir(R/J) = hinm (y1 ), . . . , inm (yr )i ⊂ grm (R), We can take θ1 , . . . , θs ∈ R such that (y1 , . . . , yr , θ1 , . . . , θs ) is a part of a system of regular parameters of R and that there exists an irreducible component Bi of O(x) for each i = 1, . . . , s such that Bi ×Z Spec(R) = Spec(R/hθi i) and IDirO (R/J) = hinm (y1 ), . . . , inm (yr ), inm (θ1 ), . . . , inm (θs )i, where IDirO (R/J) ⊂ grm (R) is the ideal defining DirO x (X) ⊂ Tx (Z). Now (1) implies O(x) = O(η) so that D ⊂ Bi and θi ∈ p for all i = 1, . . . , s. Hence (y1 , . . . , yr , θ1 , . . . , θs ) is a part of a system of regular parameters of Rp and IDirO (Rp /Jp ) ⊃ hinp (y1 ), . . . , inp (yr ), inp (θ1 ), . . . , inp (θs )i, which implies the conclusion of Theorem 3.13.  Let D ⊂ X be a B-permissible closed subscheme. Consider the diagram i′ (3.5) X ′ = BℓD (X) −−−→ BℓD (Z) = Z ′    π πX y y Z X i −−−→ 43 Z , and let B′ and Be be the complete and strict transform of B in Z ′ , respectively. For a e : X ′ → {subsets of B′ } given history function O(x) (x ∈ X), we define functions O ′ , O as follows: Let x′ ∈ X ′ and x = πX (x′ ) ∈ X. Then define ( ] ∩ B′ (x′ ) if HX ′ (x′ ) = HX (x) O(x) ′ ′ (3.6) O (x ) = otherwise, B′ (x′ ) ] is the strict transform of O(x) in Z ′ , and where O(x) ( ] ∩ B′ (x′ ) if HX ′ (x′ ) = HX (x) O(x) ′ e (3.7) O(x ) = e ′) otherwise. B(x ] ∩ B(x e ′ ) = O(x) e ′ ) if x′ is near to x. Note that O ′ (x′ ) = O(x e ′ ) are history functions for B′ on X. Lemma 3.14 The functions x′ → O ′(x′ ), x′ → O(x The proof of Lemma 3.14 will be given later. e O) e the complete and strict transform of (B, O) Definition 3.15 We call (B′ , O ′) and (B, in Z ′ , respectively. e ′ −1 ′ O ′ O O Theorem 3.16 Take points x ∈ D and x′ ∈ πX (x). Then HX ′ (x ) ≤ HX ′ (x ) ≤ HX (x). In particular we have O′ ′ −1 πX (X O (e ν )) ⊂ ∪ X ′ (e µ) µ e≤e ν e in place of O ′ . and the same holds for O for νe ∈ Σmax X , Proof This follows immediately from Theorem 2.10, (3.6) and (3.7). In the following we mostly use the complete transform (B′ , O ′) and, for ease of notation, O,max ′ O′ O′ ′ O O etc., we often write HX ′ (x ) and ΣX ′ instead of HX ′ (x ) and ΣX ′ , similarly for ΣX ′ because everything just depends on O. −1 Definition 3.17 We say that x′ ∈ πX (x) is O-near to x if the following equivalent conditions hold: O ′ O (1) HX ′ (x ) = HX (x) e ′ O ′ O ′ O O ( ⇔ HX ′ (x ) = HX (x) ⇔ HX ′ (x ) = HX (x) ). (2) x′ is near to x and contained in the strict transforms of all B ∈ O(x). ′ O Call x′ very O-near to x if x′ is O-near and very near to x and eO x′ (X ) = ex (X) − δx′ /x . The following result is an immediate consequence of Theorem 2.14 and Definition 3.3 (2). Theorem 3.18 Assume that x′ ∈ X ′ is O-near to x = πZ (x′ ) ∈ X. Assume further that char(k(x)) = 0, or char(k(x)) ≥ dim(X)/2 + 1, where k(x) is the residue field of x. Then −1 x′ ∈ P(DirO x (X)/Tx (D)) ⊂ P(Tx (Z)/Tx (D)) = πZ (x) 44 Proof of Lemma 3.14: Take y ′, x′ ∈ X ′ such that x′ ∈ {y ′} and HX ′ (x′ ) = HX ′ (y ′ ). We want to show O ′ (y ′) ⊂ O ′(x′ ). Put x = πX (x′ ), y = πX (y ′) ∈ X. We have x ∈ {y}. By Theorems 1.33 and 2.10 HX ′ (y ′) ≤ HX (y) ≤ HX (x) ≥ HX ′ (x′ ) = HX ′ (y ′). First assume HX (x) ≥ HX ′ (x′ ), which implies HX ′ (y ′) = HX (y) = HX (x). By 3.6 (O2) and (3.6) we get ] ∩ B′ (y ′) ⊂ O(x) ] ∩ B′ (x′ ) = O ′ (x′ ). O ′ (y ′) = O(y) Next assume HX (x) > HX ′ (x′ ). Then, by Lemma 3.7 and (3.6), we get O ′(y ′) ⊂ B′ (y ′) ⊂ B′ (x′ ) = O ′(x′ ). Next we show that for y ′ ∈ X ′ , there exists a non-empty open subset U ′ ⊂ {y ′} such that HX ′ (x′ ) = HX ′ (y ′) and O ′ (x′ ) = O ′(y ′ ) for all x′ ∈ U ′ . Put y = πX (y ′). By Lemma 3.7 and 3.6 (O3), there exists a non-empty open subset U ⊂ {y} such that HX (x) = HX (y), B(x) = B(y) and O(x) = O(y) for all x ∈ U. By Theorem 1.33(3) and Lemma 3.7, −1 there exists a non-empty open subset U ′ ⊂ {y ′} ∩ πX (U) such that HX ′ (x′ ) = HX ′ (y ′ ) and B′ (x′ ) = B′ (y ′ ) for all x′ ∈ U ′ . We now show U ′ satisfies the desired property. Take x′ ∈ U ′ and put x = πX (x′ ). By the assumption we have HX ′ (x′ ) = HX ′ (y ′) and HX (x) = HX (y). First assume HX ′ (x′ ) = HX (x), which implies HX ′ (y ′) = HX (y). By (3.6) we get ] ∩ B′ (y ′) = O(x) ] ∩ B′ (x′ ) = O ′ (x′ ). O ′ (y ′) = O(y) Next assume HX ′ (x′ ) < HX (x), which implies HX ′ (y ′) < HX (y). By (3.6) we get O ′ (y ′) = B′ (y ′) = B′ (x′ ) = O ′ (x′ ). e O) e is similar.  This completes the proof of Lemma 3.14 for (B′ , O ′). The proof for (B, For x′ ∈ X ′ let N ′ (x′ ) = B′ (x′ ) − O ′ (x′ ) be the set of the new components of (B′ , O ′) for x′ . If x′ is near to x = πX (x′ ) ∈ D, i.e., HX ′ (x′ ) = HX (x), then (3.8) ] ∩ B′ (x′ )) ∪ {E} N ′ (x′ ) = (N(x) with E = πZ−1 (D) ] is the strict transform of N(x) in X ′ . If x′ is not near to x, then N ′ (x′ ) = ∅. where N(x) ] B(x e (x′ ) = B(x e ′ )− O(x e ′ ) = N(x)∩ e ′ ) ⊂ N ′ (x′ ) if x′ is near to x, and N e (x′ ) = ∅, Similarly, N otherwise. We study the transversality of N ′ (x′ ) with a certain regular subscheme of E. Definition 3.19 For a k(x)-linear subspace T ⊂ Tx (Z), we say that T is transversal with N(x) (notation: T ⋔ N(x)) if  dimk(x) T ∩ ∩ Tx (B) = dimk(x) (T )− | N(x) | . B∈N (x) Lemma 3.20 Let πZ : Z ′ = BℓD (Z) → Z be as in (3.5). Assume D = x and T ⋔ N(x). e (x′ ) at each Then the closed subscheme P(T ) ⊂ E = P(Tx (Z)) is n.c. with N ′ (x′ ) and N −1 x′ ∈ πX (x). 45 Proof Let R = OZ,x with the maximal ideal m. For each B ∈ N(x), take hB ∈ R such that B ×Z Spec(R) = Spec(R/hhB i). Put HB = inm (hB ) ∈ gr1m (R). In view of (3.8) the lemma follows from the following facts: The ideal hHB i ⊂ grm (R) defines the subschemes Tx (B) ⊂ Tx (Z) = Spec(grm (R)) and E ×Z ′ B̃ ⊂ E = Proj(grm (R)), where B̃ is the strict transform of B in Z ′ .  Lemma 3.21 Let πZ : Z ′ = BℓD (Z) → Z be as in (3.5). Assume T ⋔ N(x) and Tx (D) ⊂ T and dimk(x) (T /Tx (D)) = 1. Consider {x′ } = P(T /Tx (D)) ⊂ P(Tx (Z)/Tx (D)) = πZ−1 (x). Let D ′ ⊂ E be any closed subscheme such that x′ ∈ D ′ and πZ induces an isomorphism e (x′ ) at x′ . D ′ ≃ D. Then D ′ is n.c. with N ′ (x′ ) and N Proof It suffices to consider N ′ (x′ ). For B ∈ B(x, D) we have Tx (D) ⊂ Tx (B) so that the assumptions of the lemma imply Tx (B) ∩ T = Tx (D). By the argument of the last part of the proof of Lemma 3.20, this implies {x′ } = P(T /Tx (D)) * B̃. Thus we are reduced to showing D ′ is n.c. with N ′ (x′ ) ∩ (B(x) − B(x, D))′ (x′ ), which follows from: Lemma 3.22 Let Z be a regular scheme and D, W ⊂ Z be regular closed subschemes f be the such that D and W intersect transversally. Let π : Z ′ = BℓD (Z) → Z and let W ′ ′ −1 strict transform of W in Z . Suppose D ⊂ E := π (D) is a closed subscheme such that ∼ f intersect transversally. π induces an isomorphism D ′ → D. Then D ′ and W f = BℓD∩W (W ). The transversality of D and W implies BℓD∩W (W ) ≃ Proof By definition, W ′ BℓD (Z) ×Z W = Z ×Z W . Thus Hence we get f ≃ E ×Z ′ (Z ′ ×Z W ) = E ×Z W = E ×D (D ×Z W ). E ×Z ′ W f = D ′ ×E (E ×Z ′ W f ) ≃ D ′ ×E (E ×D (D ×Z W )) = D ′ ×D (D ×Z W ) ≃ W ×Z D, D ′ ×Z ′ W ∼ where the last isomorphism follows from the assumption D ′ → D. This completes the proof of the lemma.  −1 Theorem 3.23 Let πZ : Z ′ = BℓD (Z) → Z be as in (3.5). Take x ∈ X and x′ ∈ πX (x). Assume char(k(x)) = 0, or char(k(x)) ≥ dim(X)/2 + 1. ′ O (1) If x′ is O-near and very near to x, then eO x′ (X ) ≤ ex (X) − δx′ /x . O ′ ′ ′ (2) Assume x′ is very O-near and N(x) ⋔ DirO x (X). Then N (x ) ⋔ Dirx′ (X ). Proof We first show (1). Assume that x′ is O-near and very near to x. For the sake of the later proof of (2), we also assume N(x) ⋔ DirO x (X). By doing this, we do not lose generality for the proof of (1) since we may take N(x) = ∅. Put R = OZ,x (resp. R′ = OZ ′ ,x′ ) with 46 the maximal ideal m (resp. m′ ) and k = k(x) = R/m (resp. k ′ = k(x′ ) = R′ /m′ ). By the assumptions and Theorem 3.18 there exists a system of regular parameters of R (y1 , . . . , yr , θ1 , . . . , θq , u1 , . . . , ua , ua+1 , . . . , ua+b , v1 , . . . , vs , vs+1, . . . , vs+t ) satisfying the following conditions: Fixing the identification: grm (R) = k[Y, Θ, U, V ] = k[Y1 , . . . , Yr , Θ1 , . . . , Θq , U1 , . . . , Ua+b , V1 , . . . , Vs+t ], (Yi = inm (yi ), Θi = inm (θi ), Ui = inm (ui ), Vi = inm (vi ) ∈ gr1m (R)) we have (i) D ×Z Spec(R) = Spec(R/hy1, . . . , yr , , u1 , . . . , ua+bi). (ii) IDirx (X) = hY1 , . . . , Yr i ⊂ grm (R) (cf. Definition 1.26), (i) (iii) For 1 ≤ i ≤ q, there exists B ∈ O(x) such that B ×Z Spec(R) = Bθ , where (i) Bθ := Spec(R/hθi i), and we have (i) DirO x (X) = Dirx (X) ∩ ∩ Tx (Bθ ). 1≤i≤q (iv) N(x) ×Z Spec(R) = S (a+i) Bu 1≤i≤b (i) (j) ∪ S (s+j) Bv . 1≤j≤t Here Bu = Spec(R/hui i), Bv = Spec(R/hvj i). Let Bθ′ (i) (resp. Bu′ (i) , resp. Bv′ (i) ) be the (i) (i) (i) strict transform of Bθ (resp. Bu , resp. Bv ) in Spec(R′ ). Let (i) Ξ = {i ∈ [a + 1, a + b] | x′ ∈ Bu′ }. By Theorem 3.16 there exists i0 ∈ [1, a + b] − Ξ such that (y1′ , . . . , yr′ , θ1′ , . . . , θq′ , w, u′j (j ∈ Ξ), v1 , . . . , vs+t ), where w = ui0 , yi′ = yi /w, θi′ = θ/w, u′j = uj /w, is a part of a system of regular parameters of R′ so that the polynomial ring: k ′ [Y1′ , . . . , Yr′ , Θ′1 , . . . , Θ′q , W, Uj′ (j ∈ Ξ), V1 , . . . , Vs+t ], where Yi′ = inm′ (yi′ ), Θ′i = inm′ (θi′ ), W = inm′ (w), Uj′ = inm′ (u′j ), is a subring of grm′ (R′ ). It also implies [ [ (i) [ (i) (i+s) N ′ (x′ ) := B′ = E ∪ Bu′ ∪ Bv′ , i∈N ′ (x′ ) i∈Ξ 1≤j≤t where E = πZ−1 (D) and E ×Z Spec(R) = Spec(R/hwi). Note Tx′ (E) ⊂ Tx′ (Z ′ ) = Spec(grm′ (R′ )) is defined by hW i ⊂ grm′ (R′ ). Moreover (j) Tx′ (Bθ′ ) ⊂ Tx′ (Z ′ ) is defined by hΘj i ⊂ grm′ (R′ ). (i) Tx′ (Bu′ ) ⊂ Tx′ (Z ′ ) is defined by hUi′ i ⊂ grm′ (R′ ) for i ∈ Ξ. (j) Tx′ (Bv′ ) ⊂ Tx′ (Z ′ ) is defined by hVj i ⊂ grm′ (R′ ). 47 On the other hand, by Theorem 8.3 the assumption that x′ is very near to x implies that there exist λ1 , . . . , λr ∈ k ′ such that IDirx′ (X ′ ) = hY1′ + λ1 W, . . . , Yr′ + λr W i ⊂ grm′ (R′ ). so that (3.9) ′ ′ ′ IDirO x′ (X ) ⊃ hY1 + λ1 W, . . . , Yr + λr W, Θ1 , . . . , Θq i. This clearly implies the assertion of (1). If x′ is very O-near, the inclusion in (3.9) is ′ equality and then it implies N ′ (x′ ) ⋔ DirO x′ (X ). Thus the proof of Theorem 3.23 is complete.  Corollary 3.24 Let πZ : Z ′ = BℓD (Z) → Z be as in (3.5) and take closed points x ∈ D −1 and x′ ∈ πX (x) such that x′ is O-near to x. Assume char(k(x)) = 0, or char(k(x)) ≥ dim(X)/2 + 1. Assume further that there is an integer e ≥ 0 for which the following hold: (1) ex (X)k(x′ ) ≤ e, and either e ≤ 2 or k(x′ ) is separable over k(x). O (2) N(x) ⋔ DirO x (X) or ex (X) ≤ e − 1. ′ ′ O Then N ′ (x′ ) ⋔ DirO x′ (X ) or ex′ (X ) ≤ e − 1. Proof We claim ′ O O ′ ′ ′ If eO x′ (X ) ≥ e, then ex (X) = e = ex′ (X ) and ex (X) = e = ex′ (X ), so that x is very O-near to x. First we show the first equality which implies x′ is very near to x. Indeed the assumption implies by Lemma 1.20 and Theorem 2.10 ′ ′ e ≤ eO x′ (X ) ≤ ex′ (X ) ≤ ex (X)k(x′ ) ≤ e. Hence ex′ (X ′ ) = ex (X)k(x′ ) = e. It remains to show ex (X) = e. If k(x′ ) is separable over k(x), this follows from Lemma 1.20 (2). Assume e ≤ 2 and ex (X) < ex (X)k(x′ ) = 2. Then Theorem 2.14 implies that k(x′ ) = k(x) so that ex (X) = ex (X)k(x′ ) , which is a contradiction. Since x′ is very near to x, Theorem 3.23 (1) implies O e ≤ eO x′ (X) ≤ ex (X) ≤ ex (X) ≤ e, which shows the second equality and the claim is proved. O ′ By the claim, if eO x (X) ≤ e − 1, we must have ex′ (X ) ≤ e − 1. Hence it suffices to O O ′ show N ′ (x′ ) ⋔ Dirx′ (X ′ ) assuming N(x) ⋔ Dirx (X) and eO x′ (X ) ≥ e. By the claim the ′ second assumption implies that x is very O-near to x. Therefore the assertion follows from Theorem 3.23 (2).  Definition 3.25 Call (B, O) admissible at x ∈ X, if N(x) ⋔ Tx (X), and call (B, O) admissible if it is admissible at all x ∈ X. We note that admissibility of (B, O) at x implies Bin (x) ⊆ O(x), where Bin (x) is defined as follows. 48 Definition 3.26 Call B ∈ B inessential at x ∈ X, if it contains all irreducible components of X which contain x. Let Bin (x) = {B ∈ B | Z ⊆ B for all Z ∈ I(x)} be the set of inessential boundary components at x, where I(x) is the set of the irreducible components of X containing x. Definition 3.27 Call x ∈ X O-regular (or X O-regular at x), if (3.10) reg O HX (x) = (νX , |Bin (x)|) , reg where νX is as in Remark 1.32. Call X O-regular, if it is O-regular at all x ∈ X. Lemma 3.28 If (B, O) is admissible at x and X is O-regular at x, then X is regular and normal crossing with B at x. Proof The first claim follows from Lemma 1.31. Since x is regular, the assumption N(x) ⋔ Tx (X) means that N(x) is transversal to X at x. On the other hand, for the (unique) connected component W on which x lies we have W ⊂ B for all B ∈ Bin (x) = O(x) where the last equality holds by assumption. Thus X is n.c. with B at x.  We have the following transition property. Lemma 3.29 Let πX : X ′ = BℓD (X) → X be as in (3.5). If (B, O) admissible at x ∈ X, e O) e are admissible at any x′ ∈ π −1 (x′ ). then (B′ , O ′ ) and (B, X Proof The proof is somewhat similar to that of Theorem 3.23: If x′ is not near to x, then N ′ (x′ ) is empty by definition. Therefore we may consider the case where x′ is near to x. Look at the surjection R = OZ,x → OX,x with kernel J, and let R = OZ,x → OX,x be the corresponding surjection for the local rings of the blowups at x′ , with kernel J ′ . Then there is a system of regular parameters for R (f1 , . . . , fm , u1, . . . , ua+b , v1 , . . . , vr+s ) satisfying the following conditions: (i) J has a standard basis (f1 , . . . , fm , fm+1 , . . . , fn ) with f1 , . . . , fm ∈ n − n2 and fm+1 , . . . , fn ∈ n2 for the maximal ideal n ⊂ R, so that the initial forms of f1 , . . . , fm define Tx (X) inside Tx (Z). (ii) D ×Z Spec(R) = Spec(R/hf1 , . . . , fm , u1 , . . . , ua+b i). (iii) N(x) ×Z Spec(R) is given by div(ua+1 ), . . . , div(ua+b ), div(vs+1 ), . . . , div(vs+t ). Let Ξ = {i ∈ [a + 1, a + b] | x′ ∈ div(ui )′ }. Then there exists i0 ∈ [1, a + b] − Ξ such that ′ (f1′ , . . . , fm , w, u′j (j ∈ Ξ), v1 , . . . , vs+t ), 49 where w = ui0 , fi′ = fi /w, u′j = uj /w, is a part of a system of regular parameters (δ) (0) of R′ . Since x′ is near to x, we have HOX ′ ,x′ = HOX,x by Theorem 2.10, where δ = trdegk(x) (k(x′ ))). Evaluating at 1, we get dim Tx′ (X ′ ) + δ = dim Tx (X). Similarly we get dim Tx′ (Z ′ ) + δ = dim Tx (Z), and hence dim Tx′ (Z ′ ) − dim Tx′ (X ′ ) = dim Tx (Z) − ′ dim Tx (X). It follows that the initial forms of f1′ , . . . , fm already define Tx′ (X ′ ) inside Tx′ (Z ′ ). This shows that N ′ (x′ ) ⋔ Tx′ (X ′ ), because N ′ (x′ ) is defined by w, u′j (j ∈ Ξ), vs+1 , . . . , vs+t .  Finally we give the following functoriality for the objects we have introduced above. Lemma 3.30 Consider a cartesian diagram i∗ X ∗ −−−→   ϕy i Z∗  φ y X −−−→ Z , in which Z is a regular scheme, i (and hence i∗ ) is a closed immersion, and φ (and hence ϕ) is a flat morphism with regular fibers. Let B ⊂ Z be a simple normal crossing divisor, let O be a history function for B (i.e., for the associated boundary B), and let B∗ = B ×Z Z ∗ . (1) Z ∗ is regular, and B∗ is a simple normal crossing divisor on Z ∗ . (2) Let B∗ be the boundary associated to B∗ , let x∗ ∈ X ∗ and x = ϕ(x∗ ). The map ∗ φxx : B(x) → B∗ (x∗ ) which maps B ∈ B(x) to φ−1 (B)∩B∗ (x∗ ), the unique component of B∗ containing x∗ , is a bijection; its inverse maps B ∗ ∈ B∗ (x∗ ) to φ(B ∗ ) (with the reduced subscheme structure). (3) The function O ∗ := φ−1 O : X ∗ → { subsets of B∗ } ; ∗ x∗ 7→ φxx (O(ϕ(x∗ ))) is a history function for B∗ on X ∗ , and one has (3.11) ∗ O ∗ O HX ∗ (x ) = HX (x) for any x∗ ∈ X ∗ and x = ϕ(x∗ ) ∈ X. In particular, for any νe ∈ ΣO X we have (3.12) φ−1 (X(e ν )) = X ∗ (e ν) ∼ ν ) ×X X ∗ . = X(e (4) Let D be a closed subscheme of X, and let D ∗ = D ×X X ∗ = D ×Z Z ∗ , regarded as a closed subscheme of X ∗ . Let x∗ ∈ D ∗ and x = ϕ(x∗ ) ∈ D. Then D ∗ is transversal with B∗ (resp. normal crossing with B∗ , resp. B∗ -permissible, resp. O ∗-permissible) at x∗ if and only if D is transversal with B (resp. normal crossing with B, resp. B-permissible, resp. O-permissible) at x. 50 (5) There are unique morphisms ϕ′ and φ′ making the diagrams ϕ′ (X ∗ )′ = BℓD∗ (X ∗ ) −−−→ BℓD (X) = X ′    πX πX ∗ y y X∗ ϕ −−−→ X φ′ (Z ∗ )′ = BℓD∗ (Z ∗ ) −−−→ BℓD (Z) = Z ′    π πZ ∗ y y Z Z∗ φ −−−→ Z commutative. Moreover, the diagrams are cartesian, and the morphism i : X ֒→ Z induces a morphism between the diagrams. (6) The diagrams in (5) identify (B∗ )∼ with (B∼ ) ×Z ′ (Z ∗ )′ and (B∗ )′ with B′ ×Z ′ (Z ∗ )′ , as well as (O ∗ )∼ with (O ∼ )∗ := (φ′ )−1 (O ∼ ) and (O ∗)′ with (O ′ )∗ := (φ′ )−1 (O ′). Proof (1): In view of the remarks after Definition 3.3, it suffices to show: If Y ⊂ Z is a regular closed subscheme which is of pure codimension c, then Y ∗ := Y ×Z Z ∗ ⊂ Z ∗ is regular and of pure codimension c as well. But the first property is clear from Lemma 1.37 (1), and the second one follows from Lemma 1.38: If η ∗ is a generic point of Y ∗ , then its image η in Z is a generic point of Y , and the codimension of η ∗ in the fiber over η is zero. The latter fiber is the same for Z ∗ → Z and Y ∗ → Z. Thus Lemma 1.38 implies that codimZ ∗ (η ∗ ) = codimZ (η). (2): In particular, for B ∈ B(x), its preimage φ−1 (B) = B ×Z Z ∗ is regular. Since B∗ → B is flat, it follows as well that each generic point of B∗ maps to a generic point of B. Thus φ−1 (B) is the disjoint union of those irreducible components of B∗ whose generic points ∗ lie above B. There is exactly one component which contains x∗ ; this is φxx (B). (3): Condition (O1) of Definition 3.6 holds by construction. As for (O2) let x∗ , y ∗ ∈ X ∗ with x∗ ∈ {y ∗ } and HX ∗ (x∗ ) = HX ∗ (y ∗ ). Let x = ϕ(x∗ ) and y = ϕ(y ∗ ). Then x ∈ {y}, and HX (x) = HX (y) by Lemma 1.37 (1). So we have O(y) ⊂ O(x) by property (O2) for O. If B ∗ ∈ O ∗(y ∗ ), then y ∗ ∈ B ∗ and φ(B ∗ ) ∈ O(y) ⊂ O(x). Hence x∗ ∈ B ∗ and B ∗ ∈ O ∗ (x∗ ), which shows (O2) for O ∗ . Now we show (O3) for O ∗. If y ∗ ∈ X ∗ , and y = ϕ(y ∗ ), there exists an open subset U ⊂ {y} such that O(x) = O(y) for all x ∈ U with HX (x) = HX (y). Now ϕ maps {y ∗} into {y}, and we let U ∗ be the preimage of U in {y ∗ }. Now let x∗ ∈ U ∗ with HX ∗ (x∗ ) = HX ∗ (y ∗ ). Then x = ϕ(x∗ ) ∈ U, and HX (x) = HX (y) so that O(x) = O(y). By the above we already know that O ∗ (y ∗) ⊂ O ∗ (x∗ ). On the other hand, if B ∗ ∈ O ∗ (x∗ ), and B = φ(B ∗ ), then φ−1 (B) is a disjoint union of irreducible components, and B ∗ is the unique component containing x∗ . Since x ∈ U, we have O(x) = O(y), so that y ∈ B. Hence there is a unique component B ∗∗ of π −1 (B) containing y ∗. Since x∗ ∈ {y ∗}, it must equal to B ∗ . Hence B ∗ ∈ O ∗ (y ∗), and we have shown O ∗(x∗ ) = O ∗ (y ∗ ) and hence (O3) for O ∗ . The equation (3.11) follows from Lemma 1.37 (1) and the bijection between O ∗ (x∗ ) and O(x), and the equality in (3.12) follows from this. The isomorphism in (3.12) follows as in the proof of (1.12). (4): This follows via the same arguments as used for (1). (5): The first claim for X follows from the universal property of blow-ups. In fact, if I ⊂ OX is the ideal sheaf of D ⊂ X, then ϕ∗ (I) is the ideal sheaf of D ∗ ⊂ X ∗ , and this coincides with the image ideal sheaf ϕ−1 OX ∗ by the flatness of ϕ. On the other hand, since the ideal sheaf of D ∗ is ϕ−1 OX ∗ , it follows from [EGA II] (3.5.3) that the left diagram is cartesian. Letting X = Z we get the same for φ′ . Finally, the universal property of blow-ups for the closed immersions X ֒→ Z and X ∗ ֒→ Z ∗ give the last claim. 51 (6): The first claim follows by by applying (5) to B∗ → B and D ×Z B ⊂ B (for (B)∼ = BℓD×B (B)), and by taking the base change of the first diagram in (5) with D ֒→ X (to treat the exceptional divisor in (B)′ ). For the remaining claim let y ∈ (X ∗ )′ with images x∗ , x′ (O ′ )∗ ′ ∗ O O∗ ′ and x in X ∗ , X ′ and X, respectively. Then HX ∗ (x ) = HX (x) and H (X ′ )∗ (y) = HX (x ) by (3), and φ and φ′ induce bijections O ∗(x∗ ) ∼ = O(x) and (O ′)∗ (y) ∼ = O ′(x′ ). The second ∗ ] . ∗ (x∗ ) ∼ claim follows from this and the first claim, which also gives a bijection O^ = O(x) 52 4 B-Permissible blow-ups - the non-embedded case Let X be a locally noetherian scheme. We start with the following definition. Definition 4.1 A boundary on X is a multiset B = {{B1 , . . . , Br }} of locally principal closed subschemes of X. Recall that multisets are ‘sets with multiplicities’; more precisely a multiset of r elements is an r-tuple in which one forgets the ordering. One can also think of sets in which an element can appear several times. This then makes clear how one can define elements, cardinalities, inclusions, intersections and unions of multisets. Note also that the locally principal subschemes need not be divisors; e.g., they could be X itself. Both this and the use of multisets is convenient for questions of functoriality, see below. In the following, let X be a locally noetherian scheme and let B = {{B1 , . . . , Bn }} be a boundary on X. Sometimes, we also call the elements of B components of B, although they are neither irreducible nor connected in general. For each x ∈ X, let B(x) ⊂ B be the submultiset given by the components containing x. We note that this definition is compatible with arbitrary localization in X. For any morphism f : Y → X we have a pull-back (4.1) BY := B ×X Y := {{BY := B ×X Y | B ∈ B}} . We also write f −1 (B). Note that, even if we start with a true set of locally principal divisors on X, the pull-back will be a multiset if there are Bi 6= Bj in B with (Bi )Y = (Bj )Y . Also, some (Bi )Y might not be a divisor. For x ∈ X we let Bx = f −1 (B) with f : Spec(OX,x ) → X, which is a boundary on Xx = Spec(OX,x ). Definition 4.2 Let D ⊂ X be a regular subscheme and let x ∈ D. We say D is transversal with B at x if for each submultiset {{Bi1 , . . . , Bir }} ⊆ B(x), the scheme-theoretic intersection D ×X Bi1 ×X Bi2 ×X . . . ×X Bir is regular and of codimension r in D at x. (So this can only hold if B(x) is a true set.) We say D is normal crossing (n.c.) with B at x if D is transversal with B(x) − B(x, D) at x where B(x, D) = {B ∈ B(x) | D ⊂ B} . We say that D is transversal (resp. normal crossing) with B, if D is transversal (resp. n.c.) with B at every x ∈ D. Remark 4.3 Obviously, D is transversal (resp. normal crossing) with B at x if and only if the pull-back B(x)D (resp. (B(x) − B(x, D))D ) is a true set and a simple normal crossings boundary on the regular scheme D (see Definition 3.3), i.e., defines a divisor with normal crossings on D. Definition 4.4 Let D ⊂ X be a regular closed subscheme and x ∈ D. We say D ⊂ X is B-permissible at x if D ⊂ X is permissible at x and D is n.c. with B at x. We say D ⊂ X is B-permissible if D ⊂ X is B-permissible at all x ∈ D. 53 Let D ⊂ X be any locally integral closed subscheme and let B be a locally principal (closed) subscheme of X. We now define a canonical locally principal subscheme B ′ on πX X, the blow-up of X in D. Locally we have X = Spec(A) for a ring X ′ = BℓD (X) −→ A, D is given by a prime ideal p, and B is given by a principal ideal f A, f ∈ A. In this situation, BℓD (X) = Proj(A(p)) for the graded A-algebra A(p) = ⊕n≥0 pn . Define the homogenous element ( f ∈ A(p)0 = A if f ∈ /p (4.2) fh = f ∈ A(p)1 = p if f ∈ p, Then the graded principal ideal A(p, B) := f h A(p) only depends on B and not on the equation f , because it does not change if f is multiplied by a unit. Thus (4.3) B ′ := Proj(A(p)/A(p, B)) ⊂ Proj(A(p)) = X ′ gives a well-defined locally principal subscheme, which is a divisor if B is. To show that the definition glues on a general X and gives a well-defined locally principal subscheme B ′ on X ′ , we have to show that the above is compatible with localization. So let g ∈ A and consider pg ⊂ Ag . If f ∈ p then f ∈ pg and there is nothing to show. The same holds if f ∈ / pg , so that f ∈ / p. So we have to consider the case where f ∈ / p but m n f ∈ pg . Then f = a/g for some a ∈ p and some m > 0, so that g f ∈ p for some n > 0, and hence g ∈ p since f ∈ / p and p is a prime ideal. Consider any h ∈ p and the associated chart D+ (h) ⊂ Proj(A(p)), which is the spectrum of the subring A(p)(h) ⊂ Ah which is the union of the sets pn hn for all n ≥ 0. By definition (and the assumption f ∈ / p), the trace of B ′ on this chart is defined by the ideal given by the union of the sets f pn , hn and the pull-back to Ag is defined by the union of the sets (4.4) f pn hn g s for all n, s ≥ 0. On the other hand, the pull-back of D+ (h) to Ag is also the spectrum of the ring which is the union of the sets png hn for n > 0, and by definition (4.2) (and the assumption f ∈ pg ), the ideal of B ′ for this ring is the union of the sets (4.5) [ f pn−1 [ f gpn−1 f pgn−1 = = hn hn g s hn g s+1 s≥0 s≥0 for all n ≥ 0. But the union of the sets (4.4) and (4.5) is the same, because g ∈ p. 54 Definition 4.5 The locally principal subscheme B ′ defined above is called the principal strict transform of B in X ′ . In the following, we will always use these principal strict transforms and will call them simply transforms. Remark 4.6 (a) There is always a commutative diagram of natural proper morphisms B̃ ❄ ❄❄ ❄❄ ❄ πB̃ ❄❄  i B / B′ ⑦ ⑦ ⑦⑦ ⑦⑦πB′ ⑦ ~⑦ where B̃ = BℓD×X B (B) is the scheme-theoretic strict transform of B in X ′ . All morphisms are isomorphisms over B\D, and i : B̃ → B ′ is a closed immersion. However, it is not in general an isomorphism, and B̃ need not be a locally principal subscheme. In fact, with the notations above, B̃ is locally given by the graded ideal ( if f ∈ /p ⊕n f pn ^ (4.6) A(p, B) := ⊕n f A ∩ pn ⊃ A(p, B) = n−1 if f ∈ p, ⊕n f p and the indicated inclusion need not be an equality (or give an isomorphism after taking Proj). (b) If X and D are regular, and B is a regular divisor, then B̃ = B ′ . In fact, with the notations above, p is a regular prime ideal, and locally we have f A ∩ pn = f pn−vp(f ) for the discrete valuation vp associated to p, because vp (f a) = vp (f ) + vp (a). Moreover, vp (f ) ∈ {0, 1} by assumption. (c) If i : X ֒→ Z is a closed immersion into a regular scheme Z and B is a simple normal crossings divisor on Z, then the set B = C(B) = {B1 , . . . , Br } of irreducible components is a simple normal crossings boundary on Z. In particular, it is a boundary in the sense of Definition 4.1, and BX = i−1 (B), its pull-back to X, is a boundary on X (which may be a multiset). This construction connects the present section with the previous one. (See also Lemma 4.21 below.) Now let B = {{B1 , . . . , Bn }} be a boundary on X. Let Bi′ be the (principal strict) transform of Bi in X ′ , i = 1, . . . , n, and let E = D ×X X ′ be the exceptional divisor. Definition 4.7 Call Be = {{B1′ , . . . , Bn′ }} the strict transform and B′ = {{B1′ , . . . , Bn′ , E}} the complete transform of B in X ′ . We note that E is always a locally principal divisor, so that Be and B′ are boundaries on X. Moreover, we note the following useful functorialities. Lemma 4.8 (a) Let Y ֒→ X be a closed immersion, and assume that D ⊂ Y is a nowhere dense, locally integral closed subscheme. Then for the closed immersion Y ′ = BℓD (Y ) ֒→ BℓD (X) = X ′ one has (BY )′ = (B′ )Y ′ and 55 fY = (B) e Y′ . B (b) Let ϕ : X ∗ → X be a flat morphism with regular fibers, let D ⊂ X be a closed subscheme, and let D ∗ = D ×X X ∗ , regarded as a closed subscheme of X ∗ . Then D ∗ is regular if and only D is regular, and in this case one has (BX ∗ )′ = (B′ )(X ∗ )′ and e g B X ∗ = (B)(X ∗ )′ , where (X ∗ )′ = BℓD∗ (X ∗ ) → BℓD (X) = X ′ is the canonical morphism. Proof The question is local on X, so we may assume that X = Spec(A) is affine, and take up the notations of (4.2). (a): Here Y = Spec(A/b) for an ideal b ⊂ p ⊂ A, and for B = Spec(A/f A) ∈ B, B ×X Y ∈ BY is given by (f A + b)/b. Thus the case distinction in (4.2) is the same for f and f = f + b, and the claim follows from the equality f (p/b)n = (f pn + b)/b in the first case and the equality f (p/b)n−1 = (f pn−1 + b)/b in the second case. For the exceptional divisor EX = D ×X X ′ on X ′ one has EX ×X ′ Y ′ = D ×X Y ′ = D ×Y Y ′ = EY , the exceptional divisor on Y ′ . (b): Since D ∗ → D is flat with regular fibers, the first claim follows from 1.37 (1). For the following we may assume that X ∗ = Spec(A∗ ) for a flat A-algebra A∗ . Then for B = Spec(A/f A) ∈ B, BX ∗ equals Spec(A∗ /f A∗ ), and D ∗ is defined by the ideal pA∗ . Now A/p is integral and the map A/p → A∗ ⊗A A/p = A∗ /pA∗ is flat, hence this map is also injective. Thus the case distinction in (4.2) is the same for f and p on the one hand, and for f and pA∗ on the other. Hence A(pA∗ , BX ∗ ) = A(p, B) ⊗A A∗ , and hence (BX ∗ )′ = (B ′ )(X ∗ )′ as claimed.  Definition 4.9 (1) A history function for a boundary B on X is a function (4.7) O : X → {submultisets of B} ; x → O(x), which satisfies the following conditions: (O1) For any x ∈ X, O(x) ⊂ B(x). (O2) For any x, y ∈ X such that x ∈ {y} and HX (x) = HX (y), we have O(y) ⊂ O(x). (O3) For any y ∈ X, there exists a non-empty open subset U ⊂ {y} such that O(x) = O(y) for all x ∈ U such that HX (x) = HX (y). For such a function, we put for x ∈ X, N(x) = B(x) − O(x). A divisor B ∈ B is called old (resp. new) for O at x if it is a component of O(x) (resp. N(x)). (2) A boundary with history on X is a pair (B, O), where B is a boundary on X and O is a history function for B. A basic example of a history function for B on X is given by the following: Lemma 4.10 The function O(x) = B(x) (x ∈ X), is a history function for B on X. In fact it satisfies 4.9 (O2) and (O3) without the condition HX (x) = HX (y). Proof Left to the readers.  56 Define a function: O HX : X → NN × N ; x → (HX (x), | O(x) |), where | O(x) | is the cardinality of O(x). We endow NN × N with the lexicographic order: (ν, µ) ≥ (ν ′ , µ′) ⇔ ν > ν ′ or ν = ν ′ and µ ≥ µ′ . The conditions in 4.9 and Theorem 1.33 immediately imply the following: Theorem 4.11 Let the assumption be as above. O O (1) If x ∈ X is a specialization of y ∈ X, then HX (x) ≥ HX (y). O O (2) For any y ∈ X, there is a dense open subset U of {y} such that HX (y) = HX (x) for any x ∈ U. O In other words (see Lemma 1.34), the function HX is upper semi-continuous on X. By noetherian induction Theorem 4.11 implies O N ΣO X := {HX (x)| x ∈ X} ⊂ N × N is finite. We define ΣO,max to be the set of of the maximal elements in ΣO X. X Definition 4.12 (1) For νe ∈ ΣO X we define and and we call (4.8) O X(e ν ) = X O (e ν ) = {x ∈ X | HX (x) = νe} O X(≥ νe) = X O (≥ νe) = {x ∈ X | HX (x) ≥ νe} , O Xmax = ∪ νe∈ΣO,max X X(e ν) . the O-Hilbert-Samuel locus of X. (2) We define \ DirO (X) := Dir (X) ∩ Tx (B) ⊂ Tx (Z). x x B∈O(x) O eO x (X) = dimk(x) (Dirx (X)). By Theorem 4.11 and Lemma 1.34, X(e ν ) is locally closed, with closure contained in X(≥ νe). In particular, X(e ν ) is closed for νe ∈ ΣO,max , the union in Definition 4.8 is X O disjoint and Xmax is a closed subset of X. Theorems 2.2 and 2.3 imply the following: Theorem 4.13 Let D ⊂ X be a regular closed subscheme and x ∈ D. Then the following conditions are equivalent: (1) D ⊂ X is permissible at x and there is an open neighborhood U of x in Z such that D ∩ U ⊂ B for every B ∈ O(x). O O (2) HX (x) = HX (y) for any y ∈ D such that x is a specialization of y. 57 Under the above conditions, we have Tx (D) ⊂ DirO x (X). (4.9) Definition 4.14 A closed subscheme D ⊂ X is called O-permissible at x, if it satisfies the equivalent conditions in Theorem 4.13, and it is called O-permissible, if it is O-permissible at every x ∈ D. Remark 4.15 Note that D ⊂ X is B-permissible at x if and only if D is O-permissible and n.c with N(x) at x. Let D ⊂ X be a B-permissible closed subscheme. Consider the blow-up π X X ′ = BℓD (X) −→ X (4.10) of X in D, and let B′ be the complete transform of B in X ′ . For a given history function e : X ′ → {subsets of B′ } as follows: Let x′ ∈ X ′ O for B on X, we define functions O ′ , O and x = πX (x′ ) ∈ X. Then define ( ] ∩ B′ (x′ ) if HX ′ (x′ ) = HX (x) O(x) (4.11) O ′ (x′ ) = otherwise, B′ (x′ ) ] is the strict transform of O(x) in X ′ and where O(x) ( ] ∩ B′ (x′ ) if HX ′ (x′ ) = HX (x) O(x) ′ e (4.12) O(x ) = e ′) otherwise. B(x ] ∩ B(x e ′ ) = O(x) e ′ ) if x′ is near to x. Note that O ′ (x′ ) = O(x The proof of the following lemma is identical with that of Lemma 3.14. Lemma 4.16 The function X ′ → {subsets of B′ } ; x′ → O ′(x′ ) is a history function. e O) e the complete and strict transform of (B, O) Definition 4.17 We call (B′ , O ′) and (B, ′ in X , respectively. Results from the previous section (embedded case) have their companions in the nonembedded situation. We start with the following theorem analogous to Theorem 3.16. e ′ −1 ′ O O ′ O Theorem 4.18 Take points x ∈ D and x′ ∈ πX (x). Then HX ′ (x ) ≤ HX ′ (x ) ≤ HX (x). In particular we have O′ ′ −1 πX µ) ν )) ⊂ ∪ X ′ (e (X O (e µ e≤e ν e in place of O ′ . and the same holds for O for νe ∈ Σmax X , Proof This follows immediately from Theorem 2.10, (4.11) and (4.12).  58 In the following we mostly use the complete transform (B′ , O ′) and, for ease of notation, O,max ′ O′ O′ ′ O O etc., we often write HX ′ (x ) and ΣX ′ instead of HX ′ (x ) and ΣX ′ , similarly for ΣX ′ because everything just depends on O. −1 Definition 4.19 We say that x′ ∈ πX (x) is O-near to x if the following equivalent conditions hold: O ′ O (1) HX ′ (x ) = HX (x) e ′ O ′ O ′ O O ( ⇔ HX ′ (x ) = HX (x) ⇔ HX ′ (x ) = HX (x) ). (2) x′ is near to x and contained in the strict transforms of B for all B ∈ O(x). ′ O Call x′ is very O-near to x if x′ is O-near and very near to x and eO x′ (X ) = ex (X) − δx′ /x . The following result, the non-embedded analogue of Theorem 3.18, is an immediate consequence of Theorem 2.14 and Definition 4.12(2). Theorem 4.20 Assume that x′ ∈ X ′ is O-near to x = π(x′ ) ∈ X. Assume further that char(k(x)) = 0, or char(k(x)) ≥ dim(X)/2 + 1, where k(x) is the residue field of x. Then −1 x′ ∈ P(DirO x (X)/Tx (D)) ⊂ P(Cx (X)/Tx (D)) = πX (x) Next we show the compatibility of the notions for the non-embedded case in the present section with the corresponding notions for the embedded situation in the previous section. Lemma 4.21 Let i : X ֒→ Z be an embedding into a regular excellent scheme Z, let B be a simple normal crossings boundary on Z, and let BX = i−1 (B) be its pull-back to X. (1) For a closed regular subscheme D ⊂ X and x ∈ D, D is transversal (resp. normal crossing) with B at x in the sense of Definition 3.1 if and only if it is transversal (resp. normal crossing) with BX in the sense of Definition 4.2 (which is an intrinsic condition on (X, BX )). (2) Let O be a history function for B in the sense of Definition 3.6, and define the function OX : X → {submultisets of BX } , OX (x) = {{BX | B ∈ O(x)}} . Then OX is a history function for BX in the sense of Definition 4.9, and one has OX O HX (x) = HX (x) O X DirO x (X) = Dirx (X) and O X (and hence eO x (X) = ex (X)) for all x ∈ X. Also, for a k(x)-linear subspace T ⊂ Tx (X), the two notions for the transversality T ⋔ N(x) (Definition 3.19 for B and Definition 4.24 for BX ) are equivalent. (3) A regular closed subscheme D ⊂ X is BX -permissible in the sense of Definition 4.4 if and only if it is B-permissible in the sense of Definition 3.5. Moreover, it is OX permissible in the sense of Definition 4.14 if and only if it is O-permissible in the sense of Definition 3.11. (4) Let D ⊂ X be B-permissible, let πX : X ′ = BℓD (X) → X and πZ : Z ′ = BℓD (Z) → Z be the respective blowups in D and i′ : X ′ ֒→ Z ′ the closed immersion. Moreover let O a history function for B. Then we have the equalities ((BX )′ , (OX )′ ) = ((B′ )X ′ , (O ′)X ′ ) and e f e (Bf X , OX ) = ((B)X ′ , (O)X ′ ) for the complete transforms and strict transforms, respectively. 59 Proof The claims in (1), (2) and (3) easily follow from the definitions. For the claim on the directrix in (2) note that Tx (BX ) = Tx (B) ∩ Tx (X) (in Tx (Z)). The claim in (4) follows from Lemma 4.8.  Results in the non-embedded case which depend only on the local ring at a point (of the base scheme) can often be reduced to the embedded case. This relies on Lemma 4.21 and the following two observations. Remark 4.22 Let X be an excellent scheme, let B be a boundary on X, and let x ∈ X. Assume a property concerning (X, B, x) can be shown by passing to the local ring O = OX,x , and its completion Ô. Then the following construction is useful. The ring Ô is the quotient of a regular excellent ring R. Let B(x) = {{B1 , . . . , Br }}, and let f1 , . . . , fr be the local functions defining them in OX,x (so we can have fi = fj for i 6= j). Then we get a surjection R[X1 , . . . , Xr ] ։ OX,x mapping Xi to fi , and the functions Xi define a simple normal crossings boundary on Z = Spec(R[X1 , . . . , Xr ]), such that B(x) is its pull-back under Spec(OX,x ) ֒→ Z. We may thus assume that X can be embedded in a regular excellent scheme Z with simple normal crossings boundary BZ , and that B is the pull-back of BZ to X. Now we apply Remark 4.22 and Lemma 4.21. Theorem 4.23 Let D ⊆ X be an irreducible subscheme. Assume: (1) D ⊂ X is O-permissible at x. (2) eη (X) = ex (X) − dim(OD,x ) (cf. Theorem 2.6), where η is the generic point of D. Then we have O eO η (X) ≤ ex (X) − dim(OD,x ). Proof The question is local around x, and we may pass to OX,x and then to its completion, since X is excellent. By 4.22 and 4.21 we may assume that we are in an embedded situation. Thus the claim follows from the corresponding result in the embedded case (Theorem 3.13).  Let πX : X ′ = BℓD (X) → X be as in (4.10). For x′ ∈ X ′ let N ′ (x′ ) = B′ (x′ ) − O ′ (x′ ) be the set of the new components of (B′ , O ′ ) for x′ . If x′ is near to x = πX (x′ ) ∈ D, i.e., HX ′ (x′ ) = HX (x), then (4.13) ] ∩ B′ (x′ )) ∪ {E} N ′ (x′ ) = (N(x) with E = πZ−1 (D) ] is the strict transform of N(x) in X ′ . If x′ is not near to x, then N ′ (x′ ) = ∅. where N(x) ] B(x e (x′ ) = B(x e ′ )− O(x e ′ ) = N(x)∩ e ′ ) ⊂ N ′ (x′ ) if x′ is near to x, and N e (x′ ) = ∅, Similarly, N ′ ′ otherwise. We study the transversality of N (x ) with a certain regular subscheme of E. Definition 4.24 For a k(x)-linear subspace T ⊂ Tx (X), we say that T is transversal with N(x) (notation: T ⋔ N(x)) if  dimk(x) T ∩ ∩ Tx (B) = dimk(x) (T )− | N(x) | . B∈N (x) 60 Lemma 4.25 Assume D = x, T ⊂ Dirx (X) and T ⋔ N(x). Then the closed subscheme e ′ )) at x′ . P(T ) ⊂ Ex = P(Cx (X)) is n.c. with N ′ (x′ ) (and hence also N(x Proof In the same way as above, we this claim follows from the corresponding result in the embedded case (Lemma 3.20).  Lemma 4.26 Let πX : X ′ = BℓD (X) → X be as (4.10). Assume T ⋔ N(x) and Tx (D) ⊂ T ⊂ Dirx (X) and dimk(x) (T /Tx (D)) = 1. Consider −1 x′ = P(T /Tx (D)) ⊂ P(Cx (X)/Tx (D)) = πX (x). −1 Let D ′ ⊂ E = πX (D) be any closed subscheme such that x′ ∈ D ′ and πX induces an isomorphism D ′ ≃ D. Then D ′ is n.c. with N ′ (x′ ) at x′ . Proof In the same way as above, this follows from the corresponding result in the embedded case (Lemma 3.21).  Theorem 4.27 Let πX : X ′ = BℓD (X) → X be as in (4.10). Take x ∈ X and x′ ∈ −1 πX (x). Assume char(k(x)) = 0, or char(k(x)) ≥ dim(X)/2 + 1. ′ O (1) If x′ is O-near and very near to x, then eO x′ (X ) ≤ ex (X) − δx′ /x . O ′ ′ ′ (2) Assume x′ is very O-near and N(x) ⋔ DirO x (X). Then N (x ) ⋔ Dirx′ (X ). Proof Reduction to the embedded case (Theorem 3.23).  Corollary 4.28 Let πX : X ′ = BℓD (X) → X be as in (4.10) and take closed points x ∈ D −1 and x′ ∈ πX (x) such that x′ is O-near to x. Assume char(k(x)) = 0, or char(k(x)) ≥ dim(X)/2 + 1. Assume further that there is an integer e ≥ 0 for which the following hold: (1) ex (X)k(x′ ) ≤ e, and either e ≤ 2 or k(x′ ) is separable over k(x). O (2) N(x) ⋔ DirO x (X) or ex (X) ≤ e − 1. ′ ′ O Then N ′ (x′ ) ⋔ DirO x′ (X ) or ex′ (X ) ≤ e − 1. This follows from Theorem 4.27 like Corollary 3.24 follows from Theorem 3.23. Definition 4.29 Call (B, O) admissible at x ∈ X, if N(x) ⋔ Tx (X), and call (B, O) admissible if it is admissible at all x ∈ X. We note that admissibility of (B, O) at x implies Bin (x) ⊆ O(x), where Bin (x) is defined as follows. Definition 4.30 Call B ∈ B inessential at x ∈ X, if it contains all irreducible components of X which contain x. Let Bin (x) = {B ∈ B | Z ⊆ B for all Z ∈ I(x)} be the set of inessential boundary components at x, where I(x) is the set of the irreducible components of X containing x. 61 Definition 4.31 Call x ∈ X O-regular (or X O-regular at x), if (4.14) reg O HX (x) = (νX , |Bin (x)|) . Call X O-regular, if it is O-regular at all x ∈ X. Lemma 4.32 If (B, O) is admissible at x and X is O-regular at x, then X is regular and normal crossing with B at x. Proof The proof is identical with that of Lemma 3.28.  Lemma 4.33 Let π : X ′ = BℓD (X) → X be as (4.10). If (B, O) admissible at x ∈ X, e O) e are admissible at any x′ ∈ X ′ with x = π(x′ ). then (B′ , O ′ ) and (B, Proof In the same way as in the proof of Lemma 4.23, this is reduced to the embedded case (Theorem 3.29).  Later we shall need the following comparison for a closed immersion. Lemma 4.34 Let i : Y ֒→ X be a closed immersion of excellent schemes, let B be a boundary on X, and let BY = i−1 (B) be its pull-back to Y . (1) For a closed regular subscheme D ⊂ Y and x ∈ D, D is transversal (resp. normal crossing) with B at x if and only if it is transversal (resp. normal crossing) with BY . (2) Let O be a history function for B, and define the function OY : Y → {submultisets of BY } OY (x) = {{BY | B ∈ O(x)}} . , Then OY is a history function for BY . If x ∈ Y and (BY , OY ) is admissible at x, then (B, O) is admissible at x. (The converse does not always hold.) (3) Let D ⊂ Y be a regular closed subscheme which is permissible for Y and X. Then D is BY -permissible if and only if it is B-permissible. Moreover, it is OY -permissible if and only if it is O-permissible. (4) Let D ⊂ Y be BY -permissible and BX -permissible, let πY : Y ′ = BℓD (Y ) → Y and πX : X ′ = BℓD (X) → X be the respective blowups in D and i′ : Y ′ ֒→ X ′ the closed immersion. Moreover let O a history function for B. Then we have the equality ((BY )′ , (OY )′ ) = ((B′ )Y ′ , (O ′ )Y ′ ) and for the complete and strict transforms, respectively. e Y ′) fY , O fY ) = ((B) e Y ′ , (O) (B The proofs are along the same lines as for Lemma 4.21. For (2) note that Tx (Y ) ⊂ Tx (X) and that for subspaces T1 ⊂ T2 ⊂ Tx (X) one has N(x) ⋔ T1 =⇒ N(x) ⋔ T2 . Remark 4.35 Since a regular subscheme of a regular scheme is always permissible, Lemma 4.21 can be seen as a special case of Lemma 4.34. The following is the non-embedded analogue of Lemma 3.30. 62 Lemma 4.36 Let ϕ : X ∗ → X be a flat morphism with regular fibers of locally noetherian schemes, let B be a boundary on X, and let O be a history function for B on X. (1) Let B∗ = ϕ−1 (B) = BX ∗ be the pull-back to X ∗ , let x∗ ∈ X ∗ and x = ϕ(x∗ ). The map ∗ ϕxx : B(x) → B∗ (x∗ ) which maps B ∈ B(x) to B ∗ = B ×X X ∗ is a bijection. (2) The function O ∗ := ϕ−1 (O) : X ∗ → { subsets of B∗ } ; ∗ x∗ 7→ ϕxϕ(x∗ ) (O(ϕ(x∗ ))) is a history function for B∗ on X ∗ , and one has ∗ O ∗ O HX ∗ (x ) = HX (x) (4.15) for any x∗ ∈ X ∗ and x = ϕ(x∗ ) ∈ X. In particular, for any νe ∈ ΣO X we have (4.16) ν ) ×X X ∗ . ϕ−1 (X(e ν )) = X ∗ (e ν) ∼ = X(e (3) Let D be a closed subscheme of X, and let D ∗ = D ×X X ∗ = D ×Z Z ∗ , regarded as a closed subscheme of X ∗ . Let x∗ ∈ D ∗ and x = ϕ(x∗ ) ∈ D. Then D ∗ is transversal with B∗ (resp. normal crossing with B∗ , resp. B∗ -permissible, resp. O ∗ -permissible) at x∗ if and only if D is transversal with B (resp. normal crossing with B, resp. B-permissible, resp. O-permissible) at x. (4) There is a unique morphism ϕ′ making the following diagram ϕ′ (X ∗ )′ = BℓD∗ (X ∗ ) −−−→ BℓD (X) = X ′   πX  πX ∗ y y X∗ ϕ −−−→ X commutative, where πX and πX ∗ is the structural morphisms. Moreover the diagram is cartesian, and it identifies (B∗ )∼ with (B∼ )∗ := (ϕ′ )−1 (B∼ ) and (B∗ )′ with (B′ )∗ := (ϕ′ )−1 (B′ ), as well as (O ∗)∼ with (O ∼ )∗ := (ϕ′ )−1 (O ∼ ) and (O ∗)′ with (O ′)∗ := (ϕ′ )−1 (O ′ ). Proof (1) is trivial, and in (2), the conditions for a history function are easily checked. Since we have a bijection between O ∗ (x∗ ) and O(x), equation (4.15) follows from Lemma 1.37 (1). By Remark 4.3, the first three cases in (3) follow from Lemma 3.30 (1). The last claim follows from (4.15). In (4) the first two claims are shown like in the proof of Lemma 3.30 (5). The last four claims follow by applying the first two claims to every B ∈ B. 63 5 Main theorems and strategy for their proofs We will treat the following two situations in a parallel way: (E) (embedded case) X is an excellent noetherian scheme, i : X ֒→ Z is a closed immersion into an excellent regular noetherian scheme Z, and B is a simple normal crossings boundary on Z (Definition 3.3). (NE) (non-embedded case) X is an excellent noetherian scheme, and B is a boundary on X (Definition 4.1). In this section, all schemes will be assumed to be noetherian. Definition 5.1 (1) A point x ∈ X is called B-regular if X is regular at x (i.e. OX,x is regular) and normal crossing with B at x. Call X B-regular, if every x ∈ X is B-regular, i.e., if X is regular and B is normal crossing with X. (2) Call x strongly B-regular if X is regular at x and for every B ∈ B(x), B contains the (unique) irreducible component on which x lies. (This amounts to the equation B(x) = Bin (x) where Bin (x) is the (multi)set of inessential boundary components at x, see Definitions 3.26 (Case (E)) and 4.30 (Case (NE)).) Denote by Xreg (resp. XBreg , resp. XBsreg ) the set of the regular (resp. B-regular, resp. strongly B-regular) points of X. These are open subsets of X, and dense in X if X is reduced. Call XBsing = X − XBreg the B-singular locus of X. We introduce the following definition for the case of non-reduced schemes. Definition 5.2 (1) Call x ∈ X quasi-regular, if Xred is regular at x and X is normally flat along Xred at x. Call X quasi-regular if it is quasi-regular at all x ∈ X, i.e., if Xred is regular and X is normally flat along Xred . (Compare Definition 2.1, but we have reserved the name ‘permissible’ for subschemes not containing any irreducible component of X.) (2) Call x ∈ X quasi-B-regular, if Xred is B-regular at x and X is normally flat along Xred at x. Call X quasi-B-regular, if X is quasi-B-regular at all x ∈ X, i.e., if Xred is B-regular and X is normally flat along Xred . (Similar remark on comparison with B-permissibility.) (3) Call x ∈ X strongly quasi-B-regular, if Xred is strongly B-regular at x and X is normally flat along Xred at x. Note that X is regular if and only if X is quasi-regular and reduced. Similarly, X is B-regular if and only if X is quasi-B-regular and reduced. Finally, x ∈ X is strongly B-regular if and only if x is strongly quasi-B-regular and OX,x is reduced. Denote by Xqreg , XBqreg and XBsqreg the sets of quasi-regular, quasi-B-regular and strongly quasi-B-regular points of X, respectively. By Theorem 2.2 these are dense open subsets of X. Moreover, we have inclusions Xqreg ⊃ XBqreg ⊃ XBsqreg ⊃ Xqreg \ (Xqreg ∩ B) ∪ ∪ ∪ ∪ Xreg ⊃ XBreg ⊃ XBsreg ⊃ Xreg \ (Xreg ∩ B) where the last inclusions of both rows are equalities if no B ∈ B contains any irreducible component of X and the vertical inclusions are equalities if X is reduced. 64 Lemma 5.3 Let X be a connected excellent scheme. (a) For ν ∈ Σmax one has X(ν) ∩ Xqreg 6= ∅ if and only if X = X(ν). Thus HX is not X constant on X if and only if X(ν) ⊂ X − Xqreg for all ν ∈ Σmax X . (b) Let (B, O) be an admissible boundary with history on X. For νe ∈ ΣO,max one has X O O O X (e ν ) ∩ XBsqreg 6= ∅ if and only if X = X (e ν ). Thus HX is not constant on X if and O,max O only if X (e ν ) ⊆ X − XBsqreg for all νe ∈ ΣX . Proof (a): Let x ∈ X(ν) ∩ Xqreg , let Z be an irreducible component of X containing x, and let η be the generic point of Z. Since Xqreg is open and dense in X, and is quasiregular, η is contained in Xqreg and HX is constant on Xqreg by Theorem 2.3. Therefore ν = HX (x) = HX (η), i.e., η ∈ X(ν). Since ν ∈ Σmax X , X(ν) is closed, and we conclude that Z = {η} ⊂ X(ν). By Lemma 2.5 we conclude that X = X(ν) = Z. This proves the first claim (the other direction is trivial). The second claim is an obvious consequence. (b): For the non-trivial direction of the first claim let νe = (ν, m), with ν ∈ NN and m ≥ 0. Then ν ∈ Σmax and X O (e ν ) ⊆ X(ν). Consequently, if X O (e ν )∩XBsqreg 6= ∅, then X = X(ν) X by (a), and X is irreducible. If η is the generic point of X, then we conclude as above that η ∈ X O (e ν ), and hence X = X O (e ν ), since the latter set is closed. Again the second claim follows immediately. Now we study blow-ups. Lemma 3.2 implies: Lemma 5.4 If π : X ′ = BℓD (X) → X is the blow-up of X in a B-permissible subscheme D, and B′ is the complete transform of B, then π −1 (XBsreg ) ⊂ XB′ ′ sreg and π −1 (XBsqreg ) ⊂ XB′ ′ sqreg . We first consider the case (NE). Definition 5.5 (Case (NE)) A sequence of complete (resp. strict) B-permissible blowups over X is a diagram B= (5.1) B0 B1 π B2 Bn−1 π Bn ··· π n 1 2 X = X0 ←− X1 ←− X2 ← . . . ← Xn−1 ←− Xn ← · · · where for any n ≥ 0, Bn is a boundary on Xn , and πn+1 Xn+1 = BℓDn (Xn ) −→ Xn is the blow-up in a Bn -permissible center Dn ⊂ Xn , and Bn+1 = Bn′ is the complete fn is the strict transform of Bn ). transform of Bn (resp. Bn+1 = B Call a sequence as in (5.1) contracted if none of the morphisms πn is an isomorphism. For a given sequence of B-permissible blowups, define the associated contracted sequence by suppressing all isomorphisms in the sequence and renumbering as in (5.1) again. π1 We abbreviate (5.1) as (X, B) = (X0 , B0 ) ←− (X1 , B1 ) ← . . . , for short. We will prove Theorem 0.1 in the following, more general form. 65 Theorem 5.6 Let (X, B) be as in (NE), with X dimension at most two. (a) There is a canonical finite contracted sequence S(X, B) of complete B-permissible blow-ups over X π π π 1 2 n (X, B) = (X0 , B0 ) ←− (X1 , B1 ) ←− . . . ←− (Xn , Bn ) such that πi+1 is an isomorphism over (Xi )Bi sqreg , 0 ≤ i < n, and Xn is quasi-B-regular. In particular, the morphism Xn → X is an isomorphism over XBsqreg . Moreover the following functoriality holds: (F1) (equivariance) The action of the automorphism group of (X, B) extends to the sequence in a unique way. (F2) (localization) The sequence is compatible with passing to open subschemes U ⊆ X, arbitrary localizations U of X and étale morphisms U → X in the following sense: If S(X, B)×X U denotes the pullback of S(X, B) to U, then the associated contracted sequence (S(X, B) ×X U)contr coincides with S(U, BU ). (b) There is also a canonical finite contracted sequence S0 (X, B) of strict B-permissible blowups with the same properties (except that now each Bn+1 is the strict transform of Bn ). If X is reduced, then every Xi is reduced, so that Xn is regular and Bn is normal crossing with Xn ; moreover XBsqreg = XBsreg . In particular, Theorem 0.1 can be obtained as the case (b) for B = ∅ (where XBsreg = Xreg and Bn = ∅ for all n), i.e., as the sequence S0 (X, ∅). If we apply (a) for reduced X and B = ∅, we have XBsreg = Xreg as well, but then, for the sequence S(X, ∅), Bn is not empty for n > 0, and we obtain the extra information that the collection of the strict transforms of all created exceptional divisors is a simple normal crossing divisor on Xn . Definition 5.7 Let C be a category of schemes which is closed under localization. Say that canonical, functorial resolution with boundaries holds for C, if the statements in Theorem 5.6 (a) hold for all schemes in C and all boundaries on them. Say that canonical, functorial resolution holds for C, if the statements of Theorem 0.1 (i.e., of Theorem 5.6 (b) with B = ∅) hold for all schemes in C. Now we will consider the case (E). Definition 5.8 (Case (E)) A sequence of complete (resp. strict) B-permissible blowups over (X, Z) is a sequence of blowups: B= (5.2) B0 B1 π B2 Bn−1 π Bn . . . π 1 2 n Z = Z0 ←− Z1 ←− Z2 ← . . . ← Zn−1 ←− Zn . . . ∪ ∪ ∪ ∪ ∪ π1 π2 πn X = X0 ←− X1 ←− X2 ← . . . ← Xn−1 ←− Xn . . . where for any i ≥ 0 πi+1 Zi+1 = BℓDi (Zi ) −→ Zi ∪ ∪ πi+1 Xi+1 = BℓDi (Xi ) −→ Xi 66 are the blow-ups in a center Di ⊂ Xi which is permissible and n.c. with Bi , and where Bi+1 = Bi′ is the complete transform of Bi (resp. Bi+1 = Bei is the strict transform of Bi ). Call a sequence as in (5.2) contracted if none of the morphisms πn is an isomorphism. For a given sequence of B-permissible blowups, define the associated contracted sequence by suppressing all isomorphisms in the sequence and renumbering as in (5.2) again. π1 We abbreviate (5.2) as (X, Z, B) = (X0 , Z0 , B0 ) ←− (X1 , Z1 , B1 ) ← . . . , for short. We will prove Theorem 0.3 in the following form. Theorem 5.9 Let (X, Z, B) be as in (E), with X of dimension at most two. (a) There is a canonical finite contracted sequence S(X, Z, B) of complete B-permissible blow-ups over X π π π 1 2 n (X, Z, B) = (X0 , Z0 , B0 ) ←− (X1 , Z1 , B1 ) ←− . . . ←− (Xn , Zn , Bn ) such that πi+1 is an isomorphism over (Z −X)∪(Xi )Bi sqreg , 0 ≤ i < n and Xn is quasi-Bn regular. In particular, the morphism Zn → Z is an isomorphism over (Z − X) ∪ XBsqreg . Moreover the following functoriality holds: (F1) (equivariance) The action of the automorphism group of (Z, X, B) (those automorphisms of Z which respect B and X) extends to the sequence in a unique way. (F2) (localization) The sequence is compatible with passing to open subschemes U ⊆ Z, arbitrary localizations U of Z and étale morphisms U → Z in the following sense: If S(X, Z, B) ×Z U denotes the pullback of S(X, Z, B) to U, then the associated contracted sequence (S(X, Z, B) ×Z U)contr coincides with S(X ×Z U, U, BU ). (b) There is also a canonical finite contracted sequence S0 (X, Z, B) of strict B-permissible blowups over (X, Z) with the same properties (except that now each Bn+1 is the strict transform of Bn ). Again, for reduced X all Xi are reduced, XBsqreg = XBsreg , and Xn is regular and normal crossing with the simple normal crossings divisor Bn . Definition 5.10 Let C be a category of schemes which is closed under localization. Say that canonical, functorial embedded resolution with boundaries holds for C, if the statements in Theorem 5.9 (a) hold for all triples (X, Z, B) where Z is a regular excellent scheme, B is a simple normal crossing divisor on Z and X is a closed subscheme of X which is in C. Remark 5.11 It follows from Lemma 4.21 that Theorem 5.6 implies Theorem 5.9, in the following way: If S(X, BX ) is constructed, one obtains S(X, Z, B) by consecutively blowing up Zi in the same center as Xi , and identifying Xi+1 with the strict transform of Xi in Zi+1 . Conversely, the restriction of S(X, Z, B) to X is S(X, BX ). More generally, by the same approach, canonical, functorial embedded resolution with boundaries holds for a category C of schemes as in Definition 5.10 if canonical, functorial resolution with boundaries holds for C. We set up the strategy of proof for the above theorems in a more general setting. Let X be an excellent scheme, and recall that we only consider noetherian schemes here. 67 Definition 5.12 Call an excellent (noetherian) scheme Y equisingular, if HY is constant on Y . Call Y locally equisingular if all connected components are equisingular. As we will see below, our strategy will be to make X locally equisingular. Remark 5.13 (a) For U ⊆ X open and x ∈ U one has HU (x) = HX (x). Hence U is equisingular if and only if U ⊆ X(ν) for some ν ∈ ΣX . (b) By Lemma 5.3 (a) there are two possibilities for a connected component U ⊆ X: Either U is equisingular (and irreducible), or Umax is nowhere dense in U. In the first case, it follows from Theorem 1.33 (1) and Theorem 2.10 (1) that, for any permissible blow-up π : X ′ → X, π −1 (U) is equisingular as well (viz., π −1 (U) ⊂ X ′ (ν) if U ⊂ X(ν)), because by definition, permissible centers are nowhere dense in X. (c) If X is reduced, then a connected component U ⊂ X is equisingular if and only if U is regular (cf. Remark 1.32). Hence X is locally equisingular iff it is equisingular iff it is regular. (d) By way of example, the following situation can occur for non-reduced schemes: X is the disjoint union of three irreducible components U1 , U2 and U2 , where ΣU1 = {ν1 }, ΣU2 = {ν1 , ν2 } and ΣU3 = {ν3 }, such that ν1 < ν2 < ν3 . By just blowing up in Xmax we cannot make X locally equisingular. Motivated by the remarks above, we define: Definition 5.14 Let X be connected and not equisingular. For ν ∈ Σmax X , a ν-elimination ′ for X is a morphism ρ : X → X that is the composite of a sequence of morphisms: X = X0 ← X1 ← · · · ← Xn = X ′ such that for 0 ≤ i < n, πi : Xi+1 → Xi is a blowup in a permissible center Di ⊆ Xi (ν) and Xn (ν) = ∅. Let ν1 , . . . , νr be the elements of Σmax and assume given a νi -elimination ρi : Xi → X X of X for each i ∈ {1, . . . , r}. Noting that ρi is an isomorphism over X − X(νi ) and that X(νi ) ∩ X(νj ) = ∅ if 1 ≤ i 6= j ≤ r, we can glue the ρi over X – which is a composition of permissible blow-ups again – to get a morphism ρ : X ′ → X which is a Σmax -elimination where we define: Definition 5.15 Let X be connected and not equisingular. A morphism ρ : X ′ −→ X is called a Σmax -elimination for X if the following conditions hold: (ME1) ρ is the composition of permissible blowups and an isomorphism over X − Xmax . = ∅. (ME2) ΣX ′ ∩ Σmax X Note that, by Theorem 2.10 (1), (ME1) and (ME2) imply: with µ < ν. (ME3) For each µ ∈ ΣX ′ there exists a ν ∈ Σmax X Definition 5.16 For any excellent scheme X, a morphism ρ : X ′ → X is called a Σmax elimination, if it is a Σmax -elimination after restriction to each connected component which is not equisingular, and an isomorphism on the other connected components. 68 Theorem 5.17 Let X be an excellent (noetherian) scheme, and let X = X0 ← X1 ← · · · be a sequence of morphisms such that πn : Xn+1 → Xn is a Σmax -elimination for each n. Then there is an N ∈ N such that XN is locally equisingular. (So πn is an isomorphism for n ≥ N.) Proof (See also Theorem 15.3 for an alternative, more self-contained proof of Theorem 5.17.) Suppose there exists an infinite sequence X = X0 ← X1 ← . . . of Σmax -eliminations such that no Xn is locally equisingular. For each n ≥ 0 let Xn0 ⊆ Xn be the union of those connected components of Xn which are not equisingular, and let Σn = ΣXn0 For each n, choose an element νn ∈ Σmax . It follows from the and Σmax = Σmax 0 . n n Xn finiteness of ΣX0 and Theorem 2.10 that there is an m ∈ N such that all Hilbert-Samuel functions occurring on the Xi are contained in the set HFm of all Hilbert functions H (of standard graded algebras) with H(1) ≤ m. Thus it follows from Theorem 1.15, i.e., the noetherianess of HFm , that νi ≤ νj for some i < j (see [AP] Proposition 1.3 for several equivalent conditions characterizing noetherian ordered sets). Choose xi ∈ Xi0 and xj ∈ Xj0 with νi = HXi (xi ) and νj = HXj (xj ), and for i ≤ k ≤ j, let yk be the 0 image of xj in Xk . By Remark 5.13 (b) the morphism Xn+1 → Xn maps Xn+1 to Xn0 , so 0 we have yk ∈ Xk , and by Theorem 2.10 and Remark 5.13 we have νj ≤ µk := HXk (yk ). Since νi ∈ Σmax ⊂ Σi , we conclude that the inequalities νi ≤ νj ≤ µk are all equalities. i Therefore νi = µi+1 ∈ Σi+1 , contradicting the assumption that Xi+1 → Xi is a Σmax elimination. Corollary 5.18 To prove (canonical, functorial) resolution of singularities for all excellent reduced schemes of dimension ≤ d, it suffices to prove that for every connected non-regular excellent reduced scheme X of dimension ≤ d there exists a (canonical functorial) Σmax -elimination X ′ → X. Equivalently, it suffices to show that for every such scheme and every ν ∈ Σmax X , there is a (canonical functorial) ν-elimination for X. Here functoriality means that the analogues of the properties (F1) and (F2) in Theorem 5.6 hold for the Σmax - and ν-eliminations, respectively, where the analogue of property (F2) for a ν-elimination is the following: Either U(ν) = ∅, or ν ∈ Σmax and the pullback of the U sequence to U is the canonical ν-elimination on U, after passing to the associated reduced sequence. In fact, under these assumptions one gets a (canonical, functorial) sequence X ← X1 ← . . . of Σmax -eliminations, and by Theorem 5.17 some Xn is locally equisingular, which means that Xn is regular (Remark 5.13 (c)). Now we consider the non-reduced case. Corollary 5.19 To prove (canonical, functorial) resolution of singularities for all excellent schemes of dimension ≤ d, it suffices to prove that there exists a (canonical, functorial) Σmax -elimination X ′ → X for every connected excellent scheme X of dimension ≤ d which is not equi-singular. Equivalently, it suffices to show that for every such scheme and every ν ∈ Σmax X , there is a (canonical, functorial) ν-elimination for X. Here functoriality is defined as in Corollary 5.18. In fact, here we first get a (canonical, functorial) sequence X ← X1 ← . . . ← Xm of Σmax eliminations such that Xm is locally equisingular. By Corollary 5.18 we get a similar 69 ′ sequence (Xm )red ← Xm+1 ← . . . ← Xn′ such that Xn′ is regular. Blowing up in the same centers we get a sequence of blow-ups Xm ← Xm+1 ← . . . ← Xn , where Xi′ is identified ′ ′ with (Xi )red , and Xi+1 with the strict transform of Xi′ in Xi+1 (since Di ⊆ (Xi )red , Xi+1 is reduced, and homeomorphic to Xi+1 ). For each i ≥ m, Xi is again equisingular (see Remark 5.13), and by Theorem 2.3 the blow-up Xi+1 → Xi is permissible. It follows that (Xn )red is regular and Xn is normally flat along (Xn )red . Now assume that the first sequence and the sequence (Xm )red ← . . . are functorial. Then it is immediate that the sequence X ← . . . ← Xn is functorial for localizations as well. As for automorphisms, it follows inductively via localization that the automorphisms of Xi (i ≥ m) respect the center of the blow-up Xi+1 → Xi and therefore extend to Xi+1 in a unique way. Remark 5.20 We point out the choice of strategy here. It might be tempting to start with desingularizing Xred . But if D ⊂ Xred is permissible in Xred , D will not in general be permissible in X. However, once X is made equi-singular (by the first series of blow-ups), the arguments above show that we get permissible blow-ups both for Xred and X, and can achieve that Xred becomes regular and X equi-singular at the same time, so that X is normally flat along Xred . We now consider a variant of the above for schemes with boundary. Let X be an excellent scheme, and let B be a boundary for X, i.e., a boundary on X (case (NE)) or on Z (case (E)). In the following we only consider complete transforms for the boundaries, i.e., sequences of complete B-permissible blow-ups, and we will simply speak of sequences of B-permissible blow-ups. It is easy to see that the analogous results also hold for the case of strict transforms, i.e., sequences of strict B-permissible blow-ups. O Definition 5.21 Call X O-equisingular if HX is constant on X, and locally O-equisingular, if every connected component is O-equisingular. Remark 5.22 (a) It follows from Lemma 5.3 (b) that a connected component U ⊆ X is O either O-equisingular, or Umax is nowhere dense in U. In the first case U ⊆ X O (e ν ) for O ′ −1 some νe ∈ ΣX , and for every B-permissible blow-up π : X → X one has π (U) ⊆ X ′ (e ν ). (b) If X is reduced, then X is locally O-equisingular if and only if X is O-regular. (c) Even for a regular scheme X it can obviously happen that X is the union of three irrereg reg reg O ducible components U1 , U2 and U3 such that ΣO U1 = {(νX , 1)}, ΣU2 = {(νX , 1), (νX , 2)} reg O O and ΣU3 = {(νX , 3)}, so that X cannot be made O-equisingular by blowing up in Xmax . Definition 5.23 Let O be a history function for B such that (B, O) is admissible, and let (5.3) π π 1 n X = X0 ←− X1 ← . . . ← Xn−1 ←− Xn be a sequence of B-permissible blow-ups (where we have not written the boundaries Bi , and neither the regular schemes Zi in case (E)). For each i = 0, . . . , n − 1 let (Bi+1 , Oi+1 ) be the complete transform of (Bi , Oi ) (where (B0 , O0) = (B, O)). Let Di be the center of πi+1 the blow-up Xi ←− Xi+1 , and ρ = πn ◦ . . . ◦ π1 : Xn → X. (1) If X is connected and not O-equisingular, and νe ∈ ΣO,max , then (5.3) or ρ is called a X νe-elimination, if Di ⊆ Xi (e ν ) for i = 1, . . . , n − 1 and Xn (e ν ) = ∅. (2) If X is connected and not O-equisingular, then (5.3) or ρ is called a ΣO,max -elimination O,max O for (X, B, O), if Di ⊆ (Xi )O = ∅. max for i = 0, . . . , n − 1 and ΣXn ∩ ΣX 70 (3) If X is arbitrary, then (5.3) or ρ is called a ΣO,max -elimination for (X, B, O), if it is a ΣO,max -elimination after restriction to each connected component of X which is not O-equisingular, and an isomorphism after restriction to the connected components which are O-singular. (4) Call the sequence (5.3) contracted, if none of the morphisms is an isomorphism, and in general define the associated contracted sequence by omitting the isomorphisms and renumbering (so the final index n may decrease). Remark 5.24 By glueing, one gets a (canonical, functorial) ΣO,max -elimination for a connected, not O-equisingular X, if one has (canonical, functorial) νe-eliminations for all νe ∈ ΣO,max , and a (canonical, functorial) ΣO,max -elimination for a non-connected X, if X one has this for all connected components. Here functoriality is defined as in Theorem 5.6. In a similar way as in Theorem 5.17 one proves: Theorem 5.25 For any infinite sequence X = X0 ← X1 ← X2 ← . . . of ΣO,max eliminations there is an n such that (Xn , Bn , On ) is O-equisingular. The following result is now obtained both in the embedded and the non-embedded case. Corollary 5.26 Case (NE): To show (canonical, functorial) resolution of singularities with boundaries for all (noetherian) reduced excellent schemes of dimension ≤ d it suffices to show the existence of (canonical, functorial) ΣO,max -eliminations for all connected reduced excellent schemes X of dimension ≤ d and all admissible boundaries with history (B, O) for X, for which X is not O-regular. (Here ‘functorial’ in the last statement means that the obvious analogues of the conditions (F1) and (F2) in Theorem 5.6 hold for the sequences considered here.) Case (E): The obvious analogous statement holds. In fact, if (X, B) is given, we start with the history function O(x) = B(x). Then X is O-regular if and only if X is strongly B-regular at all x ∈ X. If this holds, we are done. If not, then by assumption there is a (canonical, functorial) ΣO,max -elimination X1 → X, and we let (B1 , O1 ) be the strict transform of (B, O) in X1 (which is obtained by successive transforms for the sequence of B-permissible blowups whose composition is X1 → X). Then (B1 , O1 ) is admissible by Lemma 4.33. If X1 is O1 -regular, we are done by Lemma 3.28. If not we repeat the process, this time with (X1 , B1 , O1), and iterate if necessary. By Theorem 5.25, after finitely many steps this process obtains an Xn which is On -regular and hence achieves the resolution of X by Lemma 3.28 (case (E)) and Lemma 4.32 (case (NE)). In the non-reduced case we obtain: Corollary 5.27 Case (NE): To show (canonical, functorial) resolution of singularities with boundaries for all excellent (noetherian) schemes of dimension ≤ d it suffices to show the existence of (canonical, functorial) ΣO,max -eliminations for all connected excellent schemes X of dimension ≤ d and all admissible boundaries with history (B, O) for X, O for which HX is not constant. (Here ‘functorial’ in the last statement means that the obvious analogues of the conditions (F1) and (F2) in Theorem 5.6 hold for the sequences considered here.) Case (E): The obvious analogous statement holds. 71 This follows from Corollary 5.26 in a similar way as Corollary 5.19 follows from 5.18: First we get a (canonical, functorial) sequence of B-permissible blow-ups X ← X1 ← . . . ← Xm such that Xm is locally O-equisingular. Then we look at the (canonical, functorial) ′ resolution sequence (Xm )red ← Xm+1 ← . . . ← Xn′ from Corollary 5.26 such that Xn′ is Bn′ -regular, where Bn′ comes from B via complete transforms. By blowing up in the same centers we obtain a sequence of B-permissible blow-ups Xm ← Xm+1 ← . . . ← Xn such that (Xn )red identifies with Xn′ and thus is Bn′ -regular; moreover, Xn is normally flat along O is constant on all connected components. (Xn )red , because HX n We now prove Theorem 5.6. Then, by Remark 5.11, Theorem 5.9 follows as well. By Corollary 5.27, it suffices to produce canonical, functorial ΣO,max -eliminations for all connected excellent (noetherian) schemes X of dimension at most two and all admissiO ble boundaries with history (B, O) on X such that HX is not constant on X. By the remarks after Definition 5.23 it suffices to produce canonical functorial νe-eliminations for all νe ∈ ΣO,max . We will slightly modify this procedure and deduce Theorem 5.6 from the X following, partly weaker and partly more general result. Theorem 5.28 (Case (NE)) Let X be an excellent connected (noetherian) scheme, let O (B, O) be an admissible boundary with history on X such that HX is not constant on X, and let νe ∈ ΣO,max . Assume the following: X (1) char(k(x)) = 0, or char(k(x)) ≥ dim(X)/2 + 1 for any x ∈ X(e ν ), (2) dim(X(e ν )) ≤ 1, and there is an integer e with 0 ≤ e ≤ 2 such that for any closed point x ∈ X(e ν ), (3e) ex (X) ≤ e, O (4e) either N(x) ⋔ DirO x (X) or ex (X) ≤ e − 1. Then there exists a canonical reduced νe-elimination S(X, νe) (X, B) = (X0 , B0 ) ← (X1 , B1 ) ← . . . ← (Xn , Bn ) for (X, B). It satisfies the analogues of properties (F1) and (F2) from Theorem 5.6, where the analogue of (F2) is the following: Either U(e ν ) = ∅, or else νe ∈ ΣO,max and the reduced U sequence associated to the pullback of the sequence to U is the canonical νe-elimination for (U, BU ). Theorem 5.6 follows from this: If the conditions of Theorem 5.28 hold for X, and X ′ → X is a blowup in a B-permissible center D ⊆ X(e ν ), the conditions hold for X ′ as well, with the same e. In fact, (1) holds for X ′ since dim(X ′ ) = dim(X), condition (3e) holds for X ′ by Theorem 2.10, and condition (4e) holds for X ′ by Corollary 4.28. Moreover, condition (2) holds for X ′ as we will see in the proof of Theorem 5.28. Now assume that X is of dimension d ≤ 2. Then condition (1) holds, and condition (3e) holds O with e = d. If moreover HX is not constant on X, then condition (2) holds by Lemma ′ 5.3, and (2) holds for X as well. On the other hand, in the presence of condition (1) it suffices to consider admissible boundaries with history (B, O) which satisfy condition 72 (4e). In fact, in the procedure outlined in the proof of Corollary 5.27, property (4e) is trivially fulfilled in the beginning where O(x) = B(x), i.e., N(x) = ∅, and as remarked a few lines above, it is also fulfilled in a sequence of B-permissible blowups. Therefore we can keep all assumptions of Theorem 5.28 in a sequence of B-permissible blowups, and the arguments for Corollaries 5.26 and 5.27 apply in this modified setting. Remark 5.29 (1) Before we start with the proof of Theorem 5.28, we outline the strategy which works under the conditions (1) to (4) of Theorem 5.28, but can be stated more generally. It would be interesting to see if it also works for higher-dimensional schemes. Let X be an excellent connected noetherian scheme, let (B, O) be an admissible boundary O with history on X such that HX is not constant on X, and let νe ∈ ΣO,max . We construct X a canonical contracted sequence S(X, νe) X = X0 ← X1 ← X2 ← X3 ← . . . (5.4) of B-permissible blowups over X as follows. We introduce some notations. If Xn has been constructed, then let Yn = Xn (e ν ). Give labels (or ‘years’) to the irreducible components of Yn in an inductive way as follows. The irreducible components of Y0 all have label 0. If an irreducible component of Yn dominates an irreducible component of Yn−1, it inherits its label. Otherwise it gets the label n. Then we can write Xn (e ν ) = Yn = Yn(0) ∪ Yn(1) ∪ . . . ∪ Yn(n−1) ∪ Yn(n) , (5.5) (i) where Yn is the union of irreducible components of Yn with label i. Now we start the actual definition of (5.4). We have dim(Y0 ) < dim(X). By induction on dimension we have a canonical resolution sequence Y0 := Y0,0 ← Y0,1 ← Y0,2 ← . . . ← Y0,m0 for (Y0 , BY0 ), i.e., a sequence of B-permissible blowups, so that Y0,m0 is B-regular. By successively blowing up X in the same centers – which are also permissible for the (Xi , Bi ) by Lemma 4.34 (3), we obtain a sequence of B-permissible blowups X0 ← X1 ← X2 ← . . . ← Xm0 (0) (0) in which Y0,i is the strict transform of Y0,i−1 and, moreover, Y0,i = Yi so that Ym0 = Y0,m0 is B-regular. (0) Then we blow up Ym0 to get Xm0 +1 . We call the obtained sequence (from X0 to Xm0 +1 ) (0) of B-permissible blow-ups the first (resolution) cycle. If Ym0 +1 is non-empty and not B-regular, we proceed as above and have a canonical resolution sequence (0) Ym0 +1 = Y0,m0 +1 ← Y0,m0 +2 ← . . . ← Y0,m1 such that Y0,m1 is B-regular. Then we get a sequence Xm0 +1 ← Xm0 +2 ← . . . ← Xm1 (0) of B-permissible blow-ups by blowing up in the same centers, for which Y0,j = Yj , and (0) (0) Ym1 = Y0,m1 is B-regular. Then we blow up Ym1 to get Xm1 +1 . We call the sequence 73 from Xm0 +1 to Xm1 +1 the second cycle. Repeating this process finitely many times, i.e., (0) producing further cycles, we get Xmℓ = Xn1 for which Yn1 is empty (in our situation, (1) (0) which is a non-trivial fact). Then we proceed with Yn1 as we did before with Y0 , in (1) (2) several cycles, until we reach Xn2 for which Yn2 is empty, and proceed with Yn2 , etc. This procedure ends, i.e., there is an nr such that Ynr is empty (in our situation, which is a non-trivial fact), so that we have eliminated the νe-locus. (i) (2) In the situation of Theorem 5.28, we will see that Yn n ≥ m0 and i ≥ 0. is already B-regular for all (3) We will see below in Proposition 5.31 that the sequence constructed in (1) is functorial for automorphisms and morphisms with geometrically regular fibers. (4) By (3), Remark 5.24 and Corollaries 5.26 and 5.27 we have: If the procedure in (1) is always finite, i.e., gives νe-eliminations for ΣO,max -eliminations, then we have a canonical, functorial resolution with boundaries as formulated in 5.26 and 5.27. Proof of Theorem 5.28 Let X ′ → X be a blowup in a B-permissible center D ⊂ X(e ν ). As we have seen above, conditions (1), (3e) and (4e) hold for X ′ and the complete transform (B′ , O ′) of (B, O) as well. Now we will show the same for condition (2). We may assume that D is irreducible. By (2) D is a closed point or a regular irreducible curve. Step 1 Let x be any closed point in X(e ν ) and consider π : X ′ := Bℓx (X) → X. Note that x ֒→ X is B-permissible for trivial reasons. By Theorem 4.20 we have (5.6) t D ′ := X ′ (e ν ) ∩ π −1 (x) ⊂ P(DirO x (X)) ≃ Pk(x) , t where t = eO x (X) − 1 ≤ ex (X) − 1 ≤ e − 1 ≤ 1 (by convention Pk(x) = ∅ if t < 0). Hence condition (2) is also satisfied for X ′ . Moreover, if dim(D ′) ≥ 1, then D ′ = P(DirO x (X)), so (X), so that that D ′ is O ′ -permissible, and condition (3e) implies e = 2 and N(x) ⋔ DirO x ′ ′ ′ D is n.c. with N by Lemma 4.25. Hence D is a union of closed points or a projective line over k(x), and in both cases it is B′ -permissible. Step 2 Now let D ⊂ X(e ν ) be regular irreducible of dimension 1 and n.c. with B. By Theorem 4.13, D ⊂ X is B-permissible. Let η be the generic point of D. Consider π : X ′ := BℓD (X) → X. Let x ∈ D be a closed point. By Theorem 4.20, we have s X ′ (e ν ) ∩ π −1 (x) ⊂ P(DirO x (X)/Tx (D)) ≃ Pk(x) , where s = eO x (X) − 2 ≤ ex (X) − 2 ≤ e − 2 ≤ 0 by (3e) for X. Hence there is at most one ′ point in X (e ν ) ∩ π −1 (x) so that dim(X ′ (e ν ) ∩ π −1 (D)) ≤ 1 and condition (2) is satisfied ′ for X . Similarly we have r X ′ (e ν ) ∩ π −1 (η) ⊂ P(DirO η (X)) ≃ Pk(η) , ′ −1 where r = eO η (X)−1 ≤ eη (X)−1 ≤ ex (X)−2 ≤ 0 by Theorem 2.6. Hence, if X (ν)∩π (η) ′ ′ is not empty, then it consists of a unique point η , and one has k(η) ≃ k(η ). This implies ∼ that π induces an isomorphism D ′ → D where D ′ = X ′ (e ν ) ∩ π −1 (D). Thus D ′ is regular, and O ′-permissible by Theorem 4.13. Moreover, ex (X) = 2 in this case so that condition 74 (3e) for X implies e = 2 and N(x) ⋔ Dirx (X). By Lemma 4.26, D ′ is n.c. with N ′ , hence with B′ . Hence D ′ is a collection of closed points or a regular irreducible curve, and in both cases it is B′ -permissible. Step 3 Consider the special case where dim(X) = 1. Here dim X(e ν ) = 0, so every point x ∈ X(e ν ) is isolated in X(e ν ), and moreover we have ex (X) ≤ dim(X) = 1. The canonical νe-elimination sequence as defined in Remark 5.29 consists of blowing up all points in X(e ν) and repeating this process as long as X(e ν ) 6= ∅. By Theorem 5.35 below this process stops after finitely many steps. So Theorem 5.28 holds. As noticed after Theorem 5.28, this shows that Theorem 5.6 holds for dim(X) = 1, i.e., there exists a canonical, functorial resolution sequence for (X, B). Step 4 Now we consider the general case and construct a canonical reduced sequence S(X, νe) π π n 1 X = X0 ←− X1 ← . . . ← Xn−1 ←− Xn . . . (5.7) of B-permissible blowups over X as follows. Let Y0 = X0 (e ν ). If Xn has been constructed, then let Yn = Xn (e ν ). Give labels to the irreducible components of Yn in an inductive way as follows. The irreducible components of Y0 all have label 0. If an irreducible component of Yn dominates an irreducible component of Yn−1 , it inherits its label. Otherwise it gets the label n. Then we can write Yn = Yn(0) ∪ Yn(1) ∪ . . . ∪ Yn(n−1) ∪ Yn(n) , (5.8) (i) where Yn is the union of irreducible components of Yn with label i. Step 5 By assumption, dim(Y0 ) ≤ 1. Let BYo = B ×X Y0 be the pull-back, and let Y0 = Y0,0 ← Y0,1 ← . . . Y0,m−1 ← Y0,m be the canonical resolution sequence of Theorem 5.6 for (Y0 , BY0 ) (which exists and is finite by Step 3), so that Y0,m is regular and normal crossing with B0,m , where we write B0,i for the boundary obtained on Y0,i . Let π π m 1 X = X0 ←− X1 ← . . . ← Xm−1 ←− Xm (5.9) be the sequence of blow-ups obtained inductively by blowing up Xi in the center Di of the blowup Y0,i+1 → Y0,i and identifying Y0,i+1 with the strict transform of Y0,i in Xi+1 . Di is a collection of closed points and hence Bi -permissible, where we write Bi for the boundary obtained on Xi . Therefore (5.9) is a sequence of B-permissible blow-ups. (We could also use Lemma 4.34 (3) as in Remark 5.29.) By Lemma 4.34 (4) we have B0,i = (Bi )Y0,i . Since each Di is a nowhere dense subscheme of Y0,i , each Y0,j is contained in Xj (e ν ) = Yj , and (0) is in fact equal to the label 0 part Yj of Yj as defined above. This is the first stage of (5.7). (i) Claim 1 For m as above, and all i ≥ 0, the subschemes Ym are regular, of dimension at most 1, and Bm -permissible. (0) In fact, for Ym this holds by construction. Moreover, from the statements in Step 1 we (i) conclude that, for 0 < i ≤ m, all schemes Yi are disjoint unions of closed points and 75 projective lines and hence regular, moreover they are Bi -permissible. Let [Yj ]0 be the union of the 0-dimensional components of Yj . Since Xj+1 → Xj is a blow-up in closed (0) (0) (i) points of Yj , and Yj ∩ [Yj ]0 = ∅ for i > 0 (no closed point can dominate the curve (0) (i) (i) (i) Yj−1), the morphism Yj → Yi is an isomorphism for j = i, . . . , m. Hence Yj is regular, (i) and normal crossing with Bj (direct check, or application of Lemma 3.2). Since Yj is regular and contained in Xj (e ν ), we conclude it is Bj -permissible. (0) Step 6 Next we blow up the subscheme Ym , which is regular and Bm -permissible, and obtain Xm+1 . (i) Claim 2 For all i ≥ 0, the subschemes Ym+1 are regular, of dimension at most 1, and (m+1) (i) Bm+1 -permissible. Moreover, the intersection of Ym+1 with Ym+1 is empty for all i ∈ {0, . . . , m}. (0) The first part follows by similar arguments as above. In fact, for Ym+1 the arguments (i) (i) are exactly the same as above. For Ym+1 with i > 0 we have to be careful, since Ym+1 (i) consists of irreducible components of the strict transform of Ym , i.e., the blowup of (0) (i) (i) Ym in Ym ×Xm Ym , which is a zero-dimensional scheme with a possibly non-reduced (i) (0) (i) structure. But since Ym is regular of dimension at most 1 and Ym ∩ [Ym ]0 = ∅ for i > 0, (i) (i) (m+1) Ym+1 → Ym is an isomorphism . As for the second part, Ym+1 consists of finitely many j) closed points which, by definition, are not contained in Ym+1 for j ≤ m. (0) (1) Step 7 Next we blow up Xm+1 in Ym+1 if this is non-empty, and in Ym+1 , otherwise, and (j) obtain Xm+2 . We proceed in this way for n > m, blowing up Xn in Yn where j ≥ 0 (j) is the smallest number with Yn 6= ∅, to obtain Xn+1 . This is well-defined, because we always have: (i) Claim 3 For all n ≥ m and i ≥ 0, the subschemes Yn are regular, of dimension at most (i) (j) 1, and Bn -permissible. For i ≥ m + 1, the intersection of Yn with Yn is empty for j 6= i. The first part follows as for n = m+1. For i = n the second part follows as in claim 2. For (i) (j) m + 1 ≤ i < n, we may assume by induction that Yn−1 ∩ Yn−1 = ∅ for all j = 0, . . . , n − 1 (j) (j) with j 6= i. By definition, for all j = 0, . . . , n − 1, π(Yn ) ⊂ Yn−1 where π : Xn → Xn−1 . (i) (j) This implies Yn ∩ Yn = ∅ for all i ∈ {m + 1, . . . , n − 1} and all j = 0, . . . , n − 1 with j 6= i, which proves the desired assertion. Step 8 Thus we have defined the wanted canonical sequence S(X, νe), which is reduced by construction. Now we show the finiteness of this sequence. We have Lemma 5.30 Let X = X0 be a scheme satisfying the assumptions of Theorem 5.28. Let C = C0 be an irreducible regular curve in X(e ν ). Let π1 : X1 = BℓC (X0 ) → X0 , and let −1 C1 = X1 (e ν ) ∩ π0 (C0 ). By Step 2, dim C1 ≤ 1 and if dim C1 = 1, then C1 is regular, C1 ⊂ X1 is B-permissible and C1 ≃ C0 . In this case we put X2 = BℓC1 (X1 ). Repeat this procedure to get a sequence π (5.10) π π 1 2 m X = X0 ←− X1 ←− X2 ← . . . ← Xm−1 ←− Xm . . . ∪ ∪ ∪ ∪ ∪ ∼ ∼ ∼ ∼ ∼ C = C0 ←− C1 ←− C2 ←− . . . ←− Cm−1 ←− Cm . . . 76 such that πi : Xi = BℓCi−1 (Xi−1 ) → Xi−1 is the blow-up morphism, and Ci = Xi (e ν) ∩ πi−1 (Ci−1 ). ∼ ∼ Then the process stops after finitely many steps, i.e., there is an m ≥ 0 with C0 ← C1 ← ∼ . . . ← Cm and dim(Cm+1 ) ≤ 0. Proof Let η be the generic point of C. As remarked in Step 2, we have eO η (X) ≤ 1. If O eO (X) = 0, then C = ∅ so that r = 1. If e (X) = 1, we get a longer sequence, which 1 η η however must be finite by Theorem 5.35/Corollary 5.37 below, applied to the localization Xη = Spec(OX,η ) of X at η, and the point η in it, for which (Xη )O max = {η}. Note that O O eη (Xη ) = eη (X) by definition. (i) (j) By this result, there is an N ≥ 0 such that Yn ∩ Yn = ∅ for all i, j ∈ {0, . . . , m} with (i) (j) (i) i 6= j, for all n ≥ N, because [Ym ]0 ∩ Ym = ∅ for all i 6= j, where [Ym ]0 is the set of (i) zero-dimensional components in Yn . Note that all schemes Xn satisfy the conditions in Theorem 5.28. Therefore we have shown: Claim 4 There is an N > 0 such that Yn = Xn (e ν ) is regular for all n ≥ N. It is clear that the resolution sequence at each step Xn has the following property, because the centers of the blowups always lie in the subscheme Yn : Let Yn,1, . . . , Yn,s be the connected components of Yn , and for each i ∈ {1, . . . , s}, let Vn,i ⊂ Xn be an open subscheme containing Yn,i but not meeting Yn,j for j 6= i. Then the resolution sequence for X is obtained by glueing the resolution sequences for the subsets Vn,i . To show finiteness of the resolution sequence we may thus assume that Yn is regular and irreducible. Applying Lemma 5.30 again, we may assume that Yn is a collection of finitely many closed points which are isolated in their O-Hilbert-Samuel stratum. Moreover, it is clear that in this case the remaining part of the resolution sequence Xn ← Xn+1 ← . . . is just the canonical resolution sequence S(Xn , νe) for Xn . Step 9 Thus we have reduced to the case of an isolated point x ∈ X(e ν ); in fact, we may assume that X(e ν ) just consists of x. The first step of the canonical sequence then is to form the blowup X1 = Bℓx (X) → X. If eO ν ) = ∅ and we x (X) = 0, then X1 (e O are done. If ex (X) = 1, then X1 (e ν ) is empty or consists of a unique point x1 lying above x. In the latter case we have k(x1 ) = k(x), and therefore ex1 (X1 ) ≤ ex (X) by Theorem 2.10 (4). If ex1 (X1 ) = 1, then eO x1 (X1 ) ≤ ex1 (X1 ) ≤ 1. Otherwise we must have O ex1 (X1 ) = ex (X) = 2 by assumption (3e). Then eO x1 (X1 ) ≤ ex (X) = 1 by Theorem 4.27 (1). Thus we obtain a sequence of blow-ups X = X0 ← X1 ← . . . in points xi ∈ Xi (e ν) ν ) = ∅ and the sequence stops, or we such that either exn (Xn ) = 0 for some n so that Xn+1 (e have a sequence where exi (Xi ) = 1 for all i. But this sequence must be finite by Theorem 5.35/Corollary 5.37 below. It remains the case where eO x (X) = ex (X) = ex (X) = 2. This follows from Theorem 5.40 below. Step 10 As a last step we show the functoriality, i.e., the properties (F1) and (F2) in Theorem 5.28. Property (F1) is of course an easier special case of (F2), and was only written for reference. We show more generally: Proposition 5.31 The canonical sequence defined in Remark 5.29 is functorial for arbitrary flat morphisms with geometrically regular fibers α : X ∗ → X, in the following sense: Let νe ∈ ΣO,max , and let X = (Xn , Bn , On , Yn , Dn ) be the sequence S(X, νe) as defined in X Remark 5.29, so that Yn = Xn (e ν) and Xn+1 = BℓDn (Xn ) . 77 ∗ ,max If X ∗ (e ν ) 6= ∅, then νe ∈ ΣO , where O ∗ is the natural history function induced on X∗ X ∗ , see Lemma 4.36, and we let X ∗ = (Xn∗ , Bn∗ , On∗ , Yn∗ , Dn∗ ) be the analogous sequence S(X ∗ , νe) for X ∗ and νe. If X ∗ (e ν ) = ∅, let X ∗ = (X ∗ , B∗ , O ∗, ∅, ∅) (sequence consisting of ∗ ∗ one term), where B and O are obtained by pull-back of O and B to X ∗ (notations as in Lemma 4.36). For any closed subscheme Z ⊆ Xn , let Z∗ = X ∗ ×X Z be its base change with X ∗ → X. (Note that all Xn are X-schemes in a canonical way.) In particular let X∗ = (Xn,∗ , Bn,∗ , On,∗, Yn,∗, Dn,∗ ) be the base change of X with X ∗ → X, so that Xn,∗ = X ∗ ×X Xn , Yn,∗ = X ∗ ×X Yn etc.. Then X ∗ is canonically isomorphic to the associated contracted sequence (X∗ )contr (obtained by omitting the isomorphisms). More precisely we claim the following. ∼ (i) There is a canonical isomorphism X ∗ (e ν ) −→ X(e ν )∗ . Define the function ϕ : N → N inductively by ϕ(0) = 0 and the following property for all n ≥ 1: ( ϕ(n − 1) if Dn,∗ = ∅ (5.11) ϕ(n) = ϕ(n − 1) + 1 otherwise. Then the following holds: (a) There are canonical isomorphisms Xn+1,∗ ∼ = BℓDn,∗ (Xn,∗ ). (b) Let β0 : X0∗ = X ∗ → X ∗ ×X X = X0,∗ be the canonical isomorphism induced by α : X ∗ → X. For all n ≥ 1 there are unique morphisms βn : (X ∗ )ϕ(n) → Xn,∗ such that all diagrams βn (5.12) ∗ Xϕ(n) −−−→ Xn,∗     y y βn−1 ∗ −−−→ Xn−1,∗ Xϕ(n−1) are commutative. Moreover all βn are isomorphisms. Here the left hand morphism is the identity for ϕ(n) = ϕ(n − 1), and the morphism occurring in X ∗ for ϕ(n) = ϕ(n − 1) + 1. The right hand morphism is the base change of Xn → Xn−1 with X ∗ → X. (c) The morphism βn induces isomorphisms (5.13) ∼ ∗ −→ Yn,∗ Yϕ(n) and (5.14) ∼ ∗ (Yϕ(n) )(ϕ(j)) −→ X ∗ ×X Yn(j) = (Yn(j) )∗ (j) if (Yn )∗ 6= ∅ and (5.15) ∼ ∗ −→ Dn,∗ Dϕ(n) if Dn,∗ 6= ∅. 78 (ii) The analogous statement holds, if the νe-elimination sequence of Remark 5.29 is replaced by the ΣO,max -elimination sequence deduced from these νe-eliminations by gluing, and for the canonical resolution sequences outlined in the proof of Corollary 5.26 or Corollary 5.27 using the mentioned max-eliminations. Proof We prove both claims by induction on dimension. It is quite clear how to deduce (ii) from (i) once the dimension is fixed, and both claims are trivial for dimension zero. Therefore it suffices to prove (i) when (ii) is assumed for smaller dimension. Since X ∗ → X = X0 is flat with regular fibers, the morphism (5.16) X ∗ (e ν ) → X ∗ ×X X(e ν ) = Y0,∗ is an isomorphism by Lemma 4.36 (2), and property (a) follows since Xn+1 = BℓDn (Xn ), and X ∗ → X is flat (compare the proof of Lemma 4.36 (4)). For the other claims we use induction on n. (b) is empty for n = 0, and we show (c) for n = 0. The isomorphism (5.13) follows (0) immediately from (5.16), since Y0∗ = X ∗ (e ν ) by definition. Moreover, Y0 = Y0 and Y0∗ = (Y0∗ )(0) so that (5.14) follows trivially for n = 0. Now we show (5.15) for n = 0. By the strategy of Remark 5.29, the following holds. If Y0 is B-regular, then the first resolution cycle is already completed, and we have to blow up in Y0 , so that D0 = Y0 . Since Y0∗ → Y0 is flat with geometrically regular fibers, we conclude that Y0∗ is regular as well, and D0∗ = Y0∗ , so that (5.15) follows from (5.13). If Y0 is not B-regular, then D0 is determined as the first center of the canonical resolution sequence for (Y0 , BY0 ), so O ∗ that D0 = Ymax . Similarly, D0∗ = (Y ∗ )O → Y is flat max . Now we note again that Y ∗ ∗ with regular fibers and that D0,∗ = X ×X D0 = Y ×Y D0 . Hence, if D0,∗ 6= ∅, then ∗ O (Y ∗ )O max = Y ×Y Ymax by Lemma 4.36 (2), which shows (5.15) for n = 0. For n ≥ 1 suppose we have already constructed the morphisms βm for m ≤ n − 1 and proved (b) and (c) for them. For m ≤ n − 1 define the morphisms βm pr2 ∗ αm : Xϕ(m) −→ Xm,∗ = X ∗ ×X Xm −→ Xm as the composition of the isomorphism βm with the canonical projection. Then αm is flat with regular fibers, because this holds for pr2 . ∼ If Dn−1,∗ = ∅, then Xn,∗ −→ Xn−1,∗ is an isomorphism by (a), we have ϕ(n) = ϕ(n − 1), and there is a unique morphism βn , necessarily an isomorphism, making the diagram in (c) commutative, and trivially cartesian. Define αn as the composition of βn with the projection to Xn . If Dn−1,∗ 6= ∅, then ϕ(n) = ϕ(n − 1) + 1, and βn−1 induces an isomorphism ∼ ∗ ∗ Dϕ(n−1) −→ Dn−1,∗ = X ∗ ×X Dn−1 ∼ ×Xn−1 Dn−1 , = Xϕ(n−1) by induction. As αn−1 is flat, there is a unique morphism αn making the diagram α (5.17) n ∗ ∗ ∗ (Xϕ(n−1) ) = Xϕ(n) BℓDn−1 −−− → Xn = BℓDn−1 (Xn−1 )     y y ∗ Xϕ(n−1) αn−1 −−−→ 79 Xn−1 commutative, and the diagram is cartesian (see Lemma 4.36 (4)). By base change of the right column with X ∗ over X we obtain a diagram as wanted in (b). By flatness of αn and regularity of its fibers, and by Lemma 4.36 (2), we have the isomorphism ∼ ∗ ∗ Yϕ(n) = X ∗ (e ν ) −→ Xn−1 ×Xn−1 Yn ∼ = X ∗ ×X Yn = Yn,∗ (5.18) in (5.13) in both cases (Dn−1,∗ empty or non-empty). We note that we have a cartesian diagram α n ∗ Yϕ(n) −−− →   π∗ y (5.19) Yn  π y αn−1 ∗ −−−→ Yn−1 . Yϕ(n−1) In fact, we have ∗ ∗ . Yϕ(n−1) ×Yn−1 Yn ∼ = Yϕ(n) = X ∗ ×X Yn ∼ = (X ∗ ×X Yn−1 ) ×Yn−1 Yn ∼ Now we show (5.14) for n, i.e., that the isomorphism (5.18) induces isomorphisms (5.20) ∼ ∗ ∗ (Yϕ(n) )(ϕ(j)) −→ Xϕ(n−1) ×Xn−1 Yn(j) ∼ = X ∗ ×X Yn(j) for all j ≤ n. By the factorization pr2 ∼ ∗ αn−1 : Yϕ(n−1) −→ X ∗ ×X Yn−1 −→ Yn−1 , (j) ∗ condition (5.14) for n − 1 means that (αn−1 )−1 (Yn−1) = (Yϕ(n−1) )(ϕ(j)) for all j ≤ n − 1, or, (j) ∗ )(ϕ(j)) map to generic points of Yn−1 , and equivalently, that all generic points of (Yϕ(n−1) we have to show the corresponding property for n in place of n − 1, where we can assume ∗ that Dn−1,∗ 6= ∅. Since αn−1 and αn are flat, the generic points of Yϕ(n−1) are those points which lie over generic points η of Yn−1 and are generic points in the fiber over η, and the analogous statement holds for n in place of n − 1. ∗ )(ϕ(j)) . If ϕ(j) ≤ Let ϕ(j) ≤ ϕ(n) = ϕ(n − 1) + 1, and let ηn∗ be a generic point of (Yϕ(n) ∗ ∗ )(ϕ(j)) which in turn maps to a ϕ(n − 1), then ηn∗ maps to a generic point ηn−1 of (Yϕ(n−1) (j) generic point ηn−1 of Yn−1 . Let ηn be the image of ηn∗ in Yn . Then ηn is a generic point of (j) Yn and lies in Yn since it maps to ηn−1 . Note that in (5.18) the fibers of π ∗ are obtained from those of π by base change with a field extension. If ϕ(j) = ϕ(n − 1) + 1(= ϕ(n)), ∗ ∗ then ηn is still a generic point of Yn , but ηn−1 is not a generic point of Yn−1 . By (5.19), the fiber Fn of αn over ηn is flat over the fiber Fn−1 of αn−1 over ηn−1 , because it is obtained by base change with the residue field extension k(ηn )/k(ηn−1 ). Therefore ηn∗ is a generic point of the fiber over ηn . This implies that ηn−1 is not a generic point of Yn−1 , and hence (n) that ηn lies in Yn . Finally we show that αn induces an isomorphism ∼ ∗ ∗ Dϕ(n) −→ Dn,∗ = X ∗ ×X Dn ∼ ×Xn Dn , = Xϕ(n) provided that Dn,∗ 6= ∅. Suppose that (5.21) Dn ⊂ Yn(j) . 80 (j−1) By the prescription in Remark 5.29 this means that either j = 0 or that j > 0 and Yn = ∗ ∅. In the first case we have ϕ(0) = 0, and in the second case we have (Yϕ(n) )(ϕ(j−1)) = ∅ ∗ by (5.20). As ϕ(j) − 1 ≤ ϕ(j − 1), we then also have (Yϕ(n) )(ϕ(j)−1) = ∅. By (5.21) we (j) ∗ get Yn 6= ∅ and hence also (Yϕ(n) )(ϕ(j)) 6= ∅ by (5.20). Therefore in both cases we have Dn∗ ⊂ (Yn∗ )(ϕ(j)) by our strategy. (j) (j) If Yn is regular, then Dn = Yn by our strategy, and (Yn∗ )(ϕ(j)) is regular, too, because (j) (Yn∗ )(ϕ(j)) → Yn is flat with regular fibers by (5.14). Then also Dn∗ = (Yn∗ )(ϕ(j)) , and the claim follows from (5.20). (j) (j) If Yn is not regular, then Dn lies in the singular locus of Yn by our strategy, and we are (j) (j) in one of the resolution cycles for Y? . Suppose this cycle has started with Yr (r ≤ n). (j) Then we obtain the centers from the canonical resolution sequence for Yr . First assume that r = 0. Then j = 0, and we start a resolution cycle with Y0∗ = (Y0∗ )(0) as well. By induction on dimension we can apply (ii) to Y = Y0 , and we have a canonical commutative diagram with cartesian squares Yn → Yn−1 → . . . → Y1 → Y0 = Y ↑ ↑ ... ↑ ↑ ∗ ∗ ∗ Yψ(n) → Yψ(n−1) → . . . → Yψ(1) → Y0∗ = Y ∗ where the upper line is part of the canonical resolution sequence for Y , the Ym∗ in the lower line come from the canonical resolution sequence of Y0∗ , and the function ψ is defined in an analogous way as ϕ in (5.11), but using Y ∗ → Y and the Di−1 ⊆ Yi−1 for all i ≤ n instead of X ∗ → X and the Di−1 ⊆ Xi−1 : Note that, by definition of the resolution cycle, the center of the blow-up Yi → Yi−1 is the same center Di−1 as for the blow-up Xi → Xi−1 . ∼ Again by induction the vertical morphisms induce isomorphisms Dψ(i) −→ Y ∗ ×Y Di for ∗ → Di all i ≤ n if the last scheme is non-empty. We claim that ψ(i) = ϕ(i), and that Dϕ(i) ∗ coincides with the morphism induced by αi : Xϕ(i) → Xi , for all i ≤ n, which then proves the claim, since Y ∗ ×Y Di = X ∗ ×X Di . The claim is true for i = 0, and we assume it is true up to some i ≤ n − 1. But then we have Y ∗ ×Y Di = X ∗ ×X Di = Di,∗ , and hence the first scheme is empty if and only if the last one is, which shows ψ(i + 1) = ϕ(i + 1) since ψ(i) = ϕ(i). Moreover the existence ∗ and uniqueness of the morphisms Yϕ(i+1) → Y∗,i+1 induced by the above diagram and by αi implies the remaining claim. (j) (j) If r > 0, then Yr−1 is regular, Dr−1 = Yr−1 and Xr = BℓDr−1 (Xr−1 ), and by induction and (j) ∗ ∗ (5.14), (Yϕ(r−1) )(ϕ(j)) is regular as well (note that r ≤ n and that (Yϕ(r−1) )(ϕ(j)) → Yr−1 ∗ is flat with regular fibers). Hence, by our strategy, with (Yϕ(r) )(ϕ(j)) we start a resolution ∗ cycle for X as well. Now the proof is the same as for the cycle starting with Y0 , up to some renumbering.  Corollary 5.32 If in the situation of Proposition 5.31 the νe-elimination sequence (resp. the ΣO,max -elimination sequence, resp. the resolution sequence) is finite for X, then it is also finite for X ∗ . 81 We now turn to the two key theorems used in the proof above. Let X be an excellent scheme, and let (B, O) be a boundary with history on X. Let x ∈ X and assume that (F 1) char(k(x)) = 0 or char(k(x)) ≥ dim(X)/2 + 1. (F 2) N(x) ⋔ DirO x (X). (F 3) eO x (X) ≤ 1 or ex (X) = ex (X). Consider π1 : X1 = Bℓx (X) → X, C1 := P(DirO x (X)) ⊂ P(Dirx (X)) ⊂ X1 . O Let η1 be the generic point of C1 . We note C1 ≃ Pt−1 k , where t = ex (X). By Theorem 4.20, any point of X1 which is O-near to x, lies in C1 . Lemma 5.33 (1) If η1 is O-near to x, then so is any point of C1 . (2) If η1 is very O-near to x, then so is any point of C1 . Proof Take any point y ∈ C1 . By Theorems 4.11 and 4.18, we have O O O HX ′ (η1 ) ≤ HX ′ (y) ≤ HX (x). (1) follows from this. By Theorems 2.6 and 2.10, we have eη1 (X ′ ) ≤ ey (X ′ ) − dim(OC1 ,y ) ≤ ex (X) − δy/x − dim(OC1 ,y ) = ex (X) − δη1 /x , where we used (F 3) for the second inequality. In fact, if eO x (X) ≤ 1 then k(y) = k(x), so in both cases of (F 3) we can apply 2.10 (4). Hence the assumption of (2) implies that y is very near to x. Then, by Theorems 4.23 and 4.18, we get ′ O ′ O O eO η1 (X ) ≤ ey (X ) − dim(OC1 ,y ) ≤ ex (X) − δy/x − dim(OC1 ,y ) = ex (X) − δη1 /x , which implies the conclusion of (2).  We now assume that t ≥ 1 and η1 is very O-near to x. This implies (5.22) O eO η1 (X1 ) = ex (X) − dim(C1 ) = 1. By (F 2), Lemma 4.25 and Remark 4.15, C1 is B-permissible with respect to the complete transform (B1 , O1 ) of (B, O) for X1 . Consider the blow-up π2 : X2 = BℓC1 (X1 ) → X1 and the complete transform (B2 , O2 ) of (B1 , O1) for X2 . By (5.22) and Theorem 4.20, there is at most one point η2 ∈ X2 which is O-near to η1 . If it exists, let C2 be the closure of η2 in X2 . Then k(η1 ) = k(η2 ), π2 induces an isomorphism C2 ∼ = C1 , and C2 is O2 -permissible. By Lemma 5.33 and Theorem 4.27, (F 2) implies N(y) ⋔ Diry (X1 ) for any point y ∈ C1 . By Lemma 4.26, C2 is n.c. with NB2 (y ′) = B2 (y ′ ) − O2 (y ′ ) at the unique point y ′ ∈ C2 above y, so that C2 is B2 -permissible. Consider π3 : X3 = BℓC2 (X2 ) → X2 and proceed in the same way as before. This construction (which occurred in the proof of Theorem 5.28 for t = 1, 2) leads us to the following: 82 Definition 5.34 Assume eO x (X) ≥ 1 and let m be a non-negative integer or ∞. The fundamental sequence of B-permissible blowups over x of length m is the canonical (possibly infinite) sequence of permissible blowups: B= (5.23) B0 B1 π B2 Bn−1 π Bn π 1 2 n X = X0 ←− X1 ←− X2 ← . . . ← Xn−1 ←− Xn ← . . . ↑ ∪ ∪ ∪ ∪ ∼ ∼ ∼ ∼ x ← C1 ← C2 ← . . . ← Cn−1 ← Cn ← . . . which satisfies the following conditions: (i) X1 = Bℓx (X) and ∼ t−1 C1 = P(DirO x (X)) = Pk(x) (t = eO x (X)) . (ii) For 1 ≤ q < m, O O Cq = {ξ ∈ φ−1 q (x)| HXq (ξ) = HX (x)} with φq : Xq → X . Let ηq be the generic point of Cq . ∼ (iii) For 2 ≤ q < m, Xq = BℓCq−1 (Xq−1 ) and πq : Cq → Cq−1 is an isomorphism. (iv) If m = 1, then the generic point of C1 is not O-near to x. If 1 < m < ∞, then Xm = BℓCm−1 (Xm−1 ) and there is no point in Xm which is near to ηm−1 . If m = ∞, then the sequence is infinite. Here (Bq , Oq ) is the complete transform of (Bq−1 , Oq−1). The proof of the following first key theorem will be given in §9. Theorem 5.35 Assume that there is no regular closed subscheme O O D ⊆ {ξ ∈ Spec(OX,x ) | HX (ξ) ≥ HX (x)} of dimension eO x (X). Then, for the sequence (5.23), we have m < ∞, i.e., it stops in finitely many steps. Remark 5.36 We note that the assumption of the theorem holds in particular, if  O O (5.24) dim {ξ ∈ Spec(OX,x ) | HX (ξ) ≥ HX (x)} < eO x (X). Thus a special case of Theorem 5.35 is the following. Corollary 5.37 If x is isolated in the O-Hilbert-Samuel locus of X and eO x (X) = 1, then the fundamental sequence (5.23) consists of a sequence of blowups in closed points and is finite. 83 In particular, if dim(X) = 2, we obtain the canonical sequences constructed in steps 8 and 9 of the proof of Theorem 5.28. Hence we obtain their finiteness as needed in that proof. Now we consider the fundamental sequence of B-permissible blowups over x as in Definition 5.34 for the second case needed in the proof of Theorem 5.28, namely where x is isolated in X(e ν ) and eO x (X) = ex (X) = ex (X) = 2. Here we have Cq ∼ = P1 for 1 ≤ q < m. Again by Theorem 5.35 (and Remark 5.36 (a)) k(x) we deduce that the fundamental sequence (5.23) is finite, i.e., there exists an m < ∞ such O that there is no point in Xm which is O-near to ηm−1 . Let νe = HX (x). If Xm (e ν ) is nonempty, all its points lie above Xm−1 (e ν ) (by maximality of νe), and the image in Xm−1 (e ν) consists of finitely many closed points (since it does not contain the generic point of in Xm−1 (e ν )). By the argument used in Step 2 of the proof of Theorem 5.28, each of these points has at most one point in Xm (e ν ) above it, so that the latter set consist of finitely many closed points as well. Pick one such point y. Since we already treated the case O where y is isolated with eO y (Xm ) = 1, and we always have ey (Xm ) ≤ 2, we are led to the following definition. Definition 5.38 A sequence of B-permissible blowups (X , B): B= B0 B1 π B2 Bm−1 π Bm π 1 2 m X = X0 ←− X1 ←− X2 ← . . . ← Xm−1 ←− Xm ↑ ∪ ∪ ∪ ↑ ∼ ∼ ∼ x ← C1 ← C2 ← . . . ← Cm−1 ← xm is called a fundamental unit of B-permissible blowups of length m if the following conditions are satisfied: (i) x is a closed point of X such that eO x (X) = ex (X) = ex (X) = 2. (ii) X1 = Bℓx (X) and ∼ 1 C1 = P(DirO x (X)) = Pk(x) . O (iii) For 2 ≤ q ≤ m, Cq = φ−1 ν ) and Xq = BℓCq−1 (Xq−1 ), where νe = HX (x) q (x) ∩ Xq (e and φq : Xq → X is the natural morphism . (iv) For 2 ≤ q < m, πq induces an isomorphism Cq ∼ = Cq−1 . (v) πm : Cm → Cm−1 is not surjective. (vi) xm is a closed point of Xm above x such that O O (xm ) = HX (x) HX m and eO xm (Xm ) = exm (Xm ) = exm (Xm ) = 2. O is considered for the successive complete transform (Bq , Oq ) of (B, O) for Xq . Here HX q 84 By convention, a fundamental unit of B-permissible blowups of length 1 is a sequence of B-permissible blowups such as B = B0 B1 π X = X0 ←1 X1 = Bℓx (X) ↑ ↑ ↑ x = x0 ← x1 where x ∈ X is as in (i) and x1 is as in (vi) with m = 1. We call (x, X, B) (resp. (xm , Xm , Bm )) the initial (resp. terminal) part of (X , B). We remark that, in this definition, we have not assumed that x (resp. xm ) is isolated in O O Xmax (resp. (Xm )max ). Definition 5.39 A chain of fundamental units of B-permissible blowups is a sequence of B-permissible blowups: X1 ← X2 ← X3 ← . . . where Xi = (Xi , Bi ) is a fundamental unit of B-permissible blowups such that the terminal part of Xi coincides with initial part of Xi+1 for ∀ i ≥ 1. The finiteness of the canonical νe-elimination S(X, νe) for the case where X(e ν ) = {x} O and ex (X) = ex (X) = ex (X) = 2, as needed in the proof of Theorem 5.28, is now a consequence of the following second key theorem whose proof will be given in §12 and §13. Theorem 5.40 Let X1 ← X2 ← X3 ← . . . be a chain of fundamental units of Bpermissible blowups. Let (x(i) , X (i) , B (i) ) be the initial part of (Xi ) for i ≥ 0. Assume that, for each i, there is no regular closed subscheme C ⊆ (X (i) )O max of dimension 1 with x(i) ∈ C (which holds if x(i) is isolated in (X (i) )O ). Then the chain must stop after max finitely many steps. In fact, to show the finiteness of S(X, νe) in the considered case, we have to show that there is no infinite sequence of closed points xn ∈ Xn (e ν ) such that x0 = x and xn+1 lies (X ) = 2 (= e above xn . This can only happen if eO n xn (Xn ) = exn (Xn )) for all n, and by xn construction, the canonical sequence S(X, νe) would then give rise to an infinite chain of fundamental units. We remark that the claims on the fundamental sequences, fundamental units and chains of fundamental units depend only on the localization Xx = Spec(OX,x ) of X at x. Moreover, by the results in Lemma 1.27 and Lemma 1.37 we may assume that X = Spec(O) for a complete local ring. Thus we assume that there is an embedding X ֒→ Z into a regular excellent scheme Z, and moreover, by Lemma 4.21, that there is a simple normal crossings boundary BZ on Z whose pull-back to X is B. Thus we may consider an embedded version of the constructions above, where each blowup Xn+1 = BℓCn (Xn ) → Xn (where C0 = {x}) can be embedded into a diagram πm+1 Zm+1 = BℓCm (Zm ) −→ Zm ∪ ∪ πm+1 Xm+1 = BℓCm (Xm ) −→ Xm . In the proofs of Theorems 5.35 and 5.40, this situation will be assumed. 85 6 (u)-standard bases Let R be a regular noetherian local ring with maximal ideal m and residue field k = R/m, and let J ⊆ m be an ideal. It turns out that the directrix Dir(R/J) is an important invariant of the singularity of X = Spec(R/J), and that it is useful to consider a system (y1 , . . . , yr , u1 , . . . , ue ) of regular parameters for R such that: (6.1) IDir(R/J) = hY1, . . . , Yr i ⊂ grm (R), where Yi := inm (yi ) ∈ gr1m (R). Then (U1 , . . . , Ue ) with Uj := inm (uj ) form coordinates of the affine space Dir(R/J) ∼ = Aek . Consequently, it will be useful to distinguish the Y - and U-coordinates in grm (R) = k[Y, U]. This observation leads us to the following: Definition 6.1 (1) A system (y, u) = (y1 , . . . , yr , u1 , . . . , ue ) of regular parameters for R is called strictly admissible for J if it satisfies the above condition (6.1). (2) A sequence u = (u1 , . . . , ue ) of elements in m ⊆ R is called admissible (for J), if it can be extended to a strictly admissible system (y, u) for J. (3) Let (y, u) be strictly admissible for J, and let f = (f1 , . . . , fm ) be a system of elements in J. Then (f, y, u) is called admissible if inm (fi ) ∈ k[Y ] for all i = 1, . . . , m. Let T1 , . . . , Te be a tuple of new variables over k. Note that (u) = (u1 , . . . , ue ) is admissible if and only if we have an isomorphism of k-algebras ∼ k[T1 , . . . , Te ] → grm (R)/IDir(R/J) ; Ti → inm (ui ) mod IDir(R/J). The map induces the following isomorphism which we will use later. (6.2) ∼ ψ(u) : P(Dir(R/J)) → Proj(k[T1 , . . . , Te ]) = Pke−1 The admissibility will play an essential role in the next section. For the moment we shall work in the following general setup: Setup A: Let J ⊂ m ⊂ R be as above. Let (u) = (u1 , . . . , ue ) be a system of elements in m such that (u) can be extended to a system of regular parameters (y, u) for some y = (y1 , . . . , yr ). In what follows we fix u and work with various choices of y as above. Such a choice induces an identification grm (R) = k[Y, U] = k[Y1 . . . , Yr , U1 , . . . , Ue ]. (Yi = inm (yi ), Uj = inm (uj )). Let R̃ = R/hui and m̃ = m/hui where hui = hu1 , . . . , ue i ⊂ R. For f ∈ R − {0} put n(u) (f ) = vm̃ (f˜) with f˜ = f mod hui ∈ R̃. Note n(u) (f ) ≥ vm (f ) and n(u) (f ) = ∞ if and only if f ∈ hui. Let f ∈ R − {0} and write an expansion in the m-adic completion R̂ of R: X (6.3) f= CA,B y B uA with CA,B ∈ R× ∪ {0} (A,B) 86 where for A = (a1 , . . . , ae ) ∈ Ze≥0 and B = (b1 , . . . , br ) ∈ Zr≥0 , y B = y1b1 . . . yrbr uA = ua11 . . . uae e . and If n(u) (f ) < ∞, then we define the 0-initial form of f by: (6.4) X in0 (f ) = in0 (f )(y,u) = C 0,B Y B ∈ k[Y ], B |B|=n(u) (f ) where CA,B = CA,B mod m ∈ k = R/m. If n(u) (f ) = ∞, we define in0 (f )(y,u) = 0. It is easy to see that in0 (f ) depends only on (y, u), not on the presentation (6.3). We will need to make the expansion (6.3) uniquely determined by f . By [EGA IV] Ch. 0 Th. (19.8.8), we can choose a ring S of coefficients of R̂: S is a subring of R̂ which is a complete local ring with the maximal ideal pS where p = char(k) such that m ∩ S = pS and S/pS = R/m. We choose a set Γ ⊂ S of representatives of k. Note that S ≃ k and Γ = k if char(k) = char(K) where K is the quotient field of R. Back in the general situation each f ∈ R is expanded in R̂ in a unique way as: X (6.5) f= CA,B y B uA with CA,B ∈ Γ. (A,B) We will use the following map of sets (6.6) ω = ω(y,u,Γ) : k[[Y, U]] → R̂ ; X cA,B Y B U A → (A,B) X CA,B y B uA , (A,B) where CA,B ∈ Γ is the representative of cA,B ∈ k. For F, G ∈ k[[Y, U]] we have (6.7) ω(F + G) − ω(F ) − ω(G) ∈ pR̂ and ω(F · G) − ω(F ) · ω(G) ∈ pR̂. We now introduce the notion of a (u)-standard base (see Definition 6.7), which generalizes that of a standard base (cf. Definition 1.17). The following facts are crucial: Under a permissible blowup a standard base is not necessarily transformed into a standard base but into a (u)-standard base (see Theorem 8.1), on the other hand there is a standard procedure to transform a (u)-standard base into a standard base (see Theorem 7.26). A linear form L : Re −→ R given by L(A) = e X ci ai with ci ∈ R (A = (ai ) ∈ Re ) i=1 is called positive (resp. semi-positive) if ci > 0 (resp. ci ≥ 0) for all 1 ≤ i ≤ e. Definition 6.2 Let (y, u) be as in Setup A and let L be a non-zero semi-positive linear form L on Re . 87 (1) For f ∈ R̂ − {0} define the L-valuation of f with respect to (y, u) as: vL (f ) = vL (f )(y,u) := min{|B| + L(A) | CA,B 6= 0}, where the CA,B come from a presentation (6.5) and |B| = b1 + · · · br for B = (b1 , . . . , br ). We set vL (f ) = ∞ if f = 0. (2) Fix a representative Γ of k in R̂ as in (6.5). The initial form of f ∈ R̂ − {0} with respect to L, (y, u) and Γ is defined as: X inL (f ) = inL (f )(y,u,Γ) := CA,B Y B U A A,B where A, B range over Ze≥0 × Zr≥0 satisfying |B| + L(A) = vL (f ). We set inL (f ) = 0 if f = 0. (3) For an ideal J ⊂ R, we define c L (J) = In c L (J)(y,u,Γ) = hinL (f )| f ∈ Ji ⊂ k[[U]][Y ]. In In case L is positive we define InL (J) = InL (J)(y,u,Γ) = hinL (f )| f ∈ Ji ⊂ k[U, Y ] = grm (R). It is easy to see that this is well-defined, i.e., one has the following: (i) inL (f ) is an element of k[[U]][Y ], the polynomial ring of Y with coefficients in the formal power series ring k[[U]], (ii) If L is positive, inL (f ) ∈ k[U, Y ] = grm (R), and is independent of the choice of Γ. Remark 6.3 Note that vm (f ) = vL0 (f ) and inm (f ) = inL0 (f ), where L0 (A) = |A| = a1 + · · · + ae for A = (a1 , . . . , ae ). The proofs of the following lemmas 6.4 and 6.6 are easy and left to the readers. Lemma 6.4 Let the assumptions be as in Definition 6.2. (1) vL (f ) is independent of the choice of Γ. We have vL (f g) = vL (f ) + vL (g) and vL (f + g) ≥ min{vL (f ), vL (g)}. m P (2) Assume vL (char(k)) > 0 (which is automatic if L is positive). If f = fi and i=1 P vL (fi ) ≥ vL (f ) for all i = 1, . . . , m, then inL (f ) = inL (fi ), where the sum 1≤i≤m ranges over such i that vL (fi ) = vL (f ). (3) Let z = (z1 , . . . , zr ) ⊂ R be another system of parameters such that (z, u) is a system of regular parameters of R. Assume vL (zi − yi )(z,u) ≥ 1 for all i = 1, . . . , r. Then, for any f ∈ R, we have vL (f )(z,u) ≥ vL (f )(y,u) . 88 Definition 6.5 Let the assumption be as Definition 6.2. Let f = (f1 , . . . .fm ) be a system of elements in R − {0}. A non-zero semi-positive linear form L on Re is called effective for (f, y, u) if inL (fi ) ∈ k[Y ] for all i = 1, . . . , m. Lemma 6.6 Let the assumption be as in Definition 6.5. (1) The following conditions are equivalent: (i) L is effective for (f, y, u). (ii) vL (fi ) = n(u) (fi ) < ∞ and inL (fi ) = in0 (fi ) for all i = 1, . . . , m. (iii) For 1 ≤ i ≤ m write as (6.3) X fi = Ci,A,B y B uA with Ci,A,B ∈ R× ∪ {0} . (A,B) Then, for 1 ≤ i ≤ m and A ∈ Ze≥0 and B ∈ Zr≥0 , we have |B| + L(A) > n(u) (fi ) if |B| < n(u) (fi ) and Ci,A,B 6= 0. (2) There exist a positive linear form L on Re effective for (f, y, u) if and only if fi is not contained in hui ⊂ R for any 1 ≤ i ≤ m. (3) If L is effective for (f, y, u) and Λ is a linear form such that Λ ≥ L, then Λ is effective for (f, y, u). More precisely one has the following for 1 ≤ i ≤ m: vΛ (fi ) = vL (fi ) = n(u) (fi ) and inΛ (fi ) = inL (fi ) = in0 (fi ) Definition 6.7 Let u be as in Setup A. Let f = (f1 , . . . , fm ) ⊂ J be a system of elements in R − {0}. (1) f is called a (u)-effective base of J, if there is a tuple y = (y1 , . . . , yr ) as in Setup A and a positive form L on Re such that L is effective for (f, y, u) and InL (J) = hin0 (f1 ), . . . , in0 (fm )i ⊂ grm (R). (2) f is called a (u)-standard base, if in addition (in0 (f1 ), . . . , in0 (fm )) is a standard base of InL (J). In both cases (1) and (2), (y, L) is called a reference datum for the (u)-effective (or (u)-standard) base (f1 , . . . , fm ). Lemma 6.8 Let u be as in Setup A. (1) Let f = (f1 , . . . , fm ) be a standard base of J such that inm (fi ) ∈ k[Y ] for i = 1, . . . , m. Then f is a (u)-standard base of J with reference datum (y, L0 ), where L0 is as in Remark 6.3. (2) Assume that (u) be admissible for J (cf. Definition 6.1). A standard base f = (f1 , . . . , fm ) of J is a (u)-standard base of J. 89 Proof (1) is an immediate consequence of Definition 6.1(3) and Remark 6.3. We show (2). First we note that ν ∗ (J) = (n1 , . . . , nm , ∞, . . . ) with ni = vm (fi ). and that (inm (f1 ), . . . , inm (fm )) is a standard base of Inm (J). Choose y = (y1 , . . . , yr ) such that (y, u) is strictly admissible for J ⊂ R and identify grm (R) = k[Y, U]. Then there exist ψ1 , . . . , ψm ∈ k[Y ] which form a standard base of Inm (J). Note that ψi is homogeneous of degree ni for i = 1, . . . , m. We have hinm (f1 ), . . . , inm (fm )i = Inm (J) = hψ1 , . . . , ψm i. Writing inm (fi ) = φi + X U A Pi,A , with φi , Pi,A ∈ k[Y ] (i = 1, . . . , m), A∈Ze≥0 −{0} this implies that (φ1 , . . . , φm ) is a standard base of Inm (J). Hence it suffices to show that there exists a positive linear form L : Re → R such that inL (fi ) = φi for all i = 1, . . . , m. We may write X Pi,A = ci,A,B Y B , (ci,A,B ∈ k), B∈Zr≥0 where the sum ranges over B ∈ Zr≥0 such that |B| + |A| = ni := vm (fi ). It is easy to see that there exists a positive linear form L satisfying the following for all A ∈ Ze≥0 − {0}: L(A) > |A| and L( A ) > 1 if ci,A,B 6= 0. ni − |B| Then inL (fi ) = φi and the proof of Lemma 6.8 is complete.  A crucial fact on (u)-standard bases is the following: Theorem 6.9 Let f = (f1 , . . . , fm ) be a (u)-effective (resp. standard) base of J. Then, for any y = (y1 . . . , yr ) as in Setup A and for any positive linear form L on Re effective for (f, y, u), (y, L) is a reference datum for f . Before going to the proof of Theorem 6.9, we deduce the following: Corollary 6.10 Let f = (f1 , . . . , fm ) be a (u)-effective (resp. standard) base of J. Let g = (g1 , . . . , gm ) ⊂ J be such that in0 (gi ) = in0 (fi ) for all i = 1, . . . , m. Then g is a (u)-effective (resp. standard) base of J. Proof The assumption implies that no fi or gi is contained in hui ⊂ R. By Lemma 6.6 (2) and (3) there exists a positive linear form L on Re effective for both (f, y, u) and (g, y, u). By the assumption on f , Theorem 6.9 implies that inL (f1 ), . . . , inL (fm ) generate (resp. form a standard base of) inL (J). By Lemma 6.6 (1)(ii), we get inL (gi ) = in0 (gi ) = in0 (fi ) = inL (fi ) which implies Corollary 6.10.  90 for i = 1, . . . , m, Proof of Theorem 6.9 Let (z, Λ) be a reference datum for f which exists by the assumption. By definition (z, u) is a system of regular parameters of R and Λ is a positive linear form on Re such that inΛ (f1 )(z,u) , . . . , inΛ (fm )(z,u) generate (resp. form a standard base of) inΛ (J)(z,u) . First we assume y = z. Then the theorem follows from Proposition 6.11 below in view of Lemma 6.6 (Note that condition (4) of Proposition 6.11 is always satisfied if L and Λ are both positive). We consider the general case. Since (y, u) and (z, u) are both systems of regular parameters of R, there exists M = (αij ) ∈ GLr (R) such that r X yi = li (z) + di , where li (z) = αij zj and di ∈ hui. j=1 Take any positive linear form L′ on Re such that L′ (A) > |A| for ∀A ∈ Re≥0 − {0}. An easy computation shows that for A ∈ Ze≥0 and B = (b1 , . . . , br ) ∈ Zr≥0 we have y B uA = uA · l1 (z)b1 · · · l1 (z)b1 + w with vL′ (w) > vL′ (y B uA ) = |B| + L′ (A). This implies inL′ (g)(z,u) = φ(inL′ (g)(y,u) ) for g ∈ R − {0}, where φ : k[Y ] ≃ k[Z] ; Yi → r X αij Zj . (Zj = inm (zj ), αij = αij mod m ∈ k) j=1 In view of Lemma 6.6, the proof of Theorem 6.9 is now reduced to the case y = z.  Proposition 6.11 Let (y, u) be as in Setup A, and let f = (f1 , . . . , fm ) ⊂ J. Let Λ and L be semi-positive linear forms on Re . Assume vΛ (char(k)) > 0 (cf. Lemma 6.4) Assume further the following conditions: (1) vΛ (fi ) = vL (fi ) = n(u) (fi ) < ∞ for i = 1, . . . , m. (2) inΛ (fi ) = in0 (fi ) := Fi (Y ) ∈ k[Y ] for i = 1, . . . , m. c Λ (J) = hF1 (Y ), . . . , Fm (Y )i ⊂ k[[U]][Y ]. (3) In Then for any g ∈ J and any M ≥ 0, there exist λ1 , . . . , λm ∈ R̂ such that ! m X vL (λi fi ) ≥ vL (g), vΛ (λi fi ) ≥ vΛ (g), vΛ g − λi fi > M. i=1 If Λ is positive, one can take λi ∈ R for i = 1, . . . , m. Assume further: (4) there exist c > 0 such that L ≥ cΛ. Then we have If L is positive, then c L (J) = hinL (f1 ), . . . , inL (fm )i ⊂ k[[U]][Y ]. In InL (J) = hinL (f1 ), . . . , inL (fm )i ⊂ k[U, Y ]. 91 Proof Let g ∈ J and expand as in (6.5): X g= CA,B y B uA CA,B ∈ Γ. in R̂, A,B Then we have X inΛ (g) = CA,B Y B U A. A,B |B|+Λ(A)=vΛ (g) Put Bmax = Bmax (g, Λ) = max{B | CA,B 6= 0, |B| + Λ(A) = vΛ (g) for some A ∈ Ze≥0 } where the maximum is taken with respect to the lexicographic order. Lemma 6.12 Under the assumption (1) and (2) of Proposition 6.11, there exist λ1 , . . . , λm ∈ R̂ such that: (1) vΛ (λi fi ) = vΛ (g) if λi 6= 0, and vL (λi fi ) ≥ vL (g). (2) vL (g1 ) ≥ vL (g) where g1 = g − m P λi fi . i=1 (3) vΛ (g1 ) ≥ vΛ (g) and Bmax (g1 , Λ) < Bmax (g, Λ) if vΛ (g1 ) = vΛ (g). If Λ is positive, one can take λi ∈ R for i = 1, . . . , m. Proof By the assumptions of Proposition 6.11, we can write X X inΛ (g) = CA,B Y B U A = Hi Fi (Y ) 1≤i≤m A,B |B|+Λ(A)=vΛ (g) for some H1 , . . . , Hm ∈ k[[U]][Y ], where Fi (Y ) ∈ of degree ni := Pk[Y ] is homogeneous A hi,A (Y )U with hi,A (Y ) ∈ k[Y ], this vΛ (fi ) = vL (fi ) for i = 1, . . . , m. Writing Hi = A∈Ze≥0 implies (6.8) X YB = CA,B X hi,A (Y )Fi (Y ) for each A ∈ Ze≥0 . 1≤i≤m B |B|+Λ(A)=vΛ (g) Take any A0 with |Bmax | + Λ(A0) = vΛ (g) and CA0 ,Bmax 6= 0. Looking at the homogeneous part of degree |Bmax | in (6.8) with A = A0 , we get X X CA0 ,B Y B = Si (Y )Fi (Y ) 1≤i≤m B |B|=|Bmax | where Si (Y ) ∈ k[Y ] is the homogenous part of degree |Bmax | − ni of hi,A0 (Y ). Therefore (6.9) Y Bmax − m X Pi (Y )Fi (Y ) = i=1 X |B|=|Bmax | B6=Bmax 92 aB Y B , −1 Si (Y ) ∈ k[Y ] and aB = −(CA0 ,Bmax )−1 CA0 B ∈ k. Now put ( m X P̃i (y)Q̃(u) if Pi (Y ) 6= 0, g1 = g − λi fi with λi = 0 if Pi (Y ) = 0, i=1 where Pi (Y ) = CA0 ,Bmax where P̃i (Y ) ∈ R[Y ] is a lift of Pi (Y ) ∈ k[Y ] and X Q̃(u) = CA,Bmax uA ∈ R̂. A |Bmax |+Λ(A)=vΛ (g) Note that if Λ is positive, then the sum is finite and Q̃(u) ∈ R and λi ∈ R. For 1 ≤ i ≤ m with Pi (Y ) 6= 0, we have vΛ (λi ) = (|Bmax | − ni ) + (vΛ (g) − |Bmax |) = vΛ (g) − ni , vL (λi ) =(|Bmax | − ni ) + vL (Q̃(u)) ≥(|Bmax | − ni ) + vL (g) − |Bmax | = vL (g) − ni , which shows Lemma 6.12 (1) in view of Proposition 6.11 (1). Here the last inequality holds because vL (g) = min{|B| + L(A) | CA,B 6= 0}, vL (Q̃(u)) + |Bmax | = min{|B| + L(A) | CA,B 6= 0, B = Bmax , |Bmax | + Λ(A) = vΛ (g)}. Therefore, by Lemma 6.4 (1) we get vΛ (g1 ) ≥ min{vΛ (g), vΛ (λi fi ) (1 ≤ i ≤ m)} ≥ vΛ (g). If vΛ (g1 ) = vΛ (g), then Lemma 6.4 (2) implies inΛ (g1 ) = inΛ (g) + inΛ = inΛ (g) + X m X i=1 λi fi ! inΛ (λi )inΛ (fi ) 1≤i≤m λi 6=0 = inΛ (g) − Q(U) m X Pi (Y )Fi (Y ), i=1 where Q(U) = X CA,Bmax U A ∈ k[[U]]. A |Bmax |+Λ(A)=vΛ (g) Hence, by (6.9), we get Bmax (g1 , Λ) < Bmax (g, Λ), which proves Lemma 6.12 (3). Finally, vL (g1 ) ≥ min{vL (g), vL (λi fi ) (1 ≤ i ≤ m)} ≥ vL (g), because vL (λi fi ) ≥ vL (g). This proves Lemma 6.12 (2) and the proof of the lemma is complete.  93 We now proceed with the proof of Proposition 6.11. From g = g0 we construct g1 as in Lemma 6.12, and by applying Lemma 6.12 repeatedly, we get a sequence g0 , g1 , g2 , . . . , gℓ , . . . in J such that for all ℓ ≥ 1 we have gℓ = gℓ−1 − m X λℓ,i fi with λℓ,i ∈ R, i=1 vΛ (λℓ,i fi ) ≥ vΛ (gℓ−1 ) ≥ vΛ (g) and vL (λℓ,i fi ) ≥ vL (gℓ−1 ) ≥ vL (g), vL (gℓ ) ≥ vL (gℓ−1 ) and vΛ (gℓ ) ≥ vΛ (gℓ−1 ), Bmax (gℓ , Λ) < Bmax (gℓ−1 , Λ) if vΛ (gℓ ) = vΛ (gℓ−1 ). Then we have gℓ = g − m X µℓ,i fi with µℓ,i = ℓ X λq,i , q=1 i=1 vΛ (µℓ,i fi ) ≥ min {vΛ (λqi fi )} ≥ vΛ (g), (6.10) 1≤q≤ℓ vL (µℓ,i fi ) ≥ min {vL (λqi fi )} ≥ vL (g). 1≤q≤ℓ Note that Bmax (gℓ , Λ) cannot drop forever in the lexicographic order so that we must have vΛ (gℓ ) 6= vΛ (gℓ−1) for infinitely many ℓ. Noting vΛ (R) is a discrete subset of R, this implies that for given M ≥ 0, taking ℓ sufficiently large, vΛ (gℓ ) = vΛ (g − m X µℓ,i fi ) > M. i=1 This shows the first assertion of Proposition 6.11 in view of (6.10). It implies by (4) that for any g ∈ J, there exist λ1 , . . . , λm ∈ R̂ such that vL (λi fi ) ≥ vL (g), vL (g − m X λi fi ) > vL (g), i=1 which implies, by Lemma 6.4 (2), that inL (g) = m P inL (λi )inL (fi ), where the sum ranges i=1 c L (J) = hinL (f1 ), . . . , inL (fm )i, which over all i for which vL (λi fi ) = vL (g). This shows In also implies the last assertion of Proposition 6.11 by the faithful flatness of k[[U]][Y ] over k[U, Y ]. This completes the proof of Proposition 6.11  Lemma 6.13 Let u be as in Setup A and assume that (u) is admissible for J (cf. Definition 6.1). Choose y = (y1 , . . . , yr ) such that (y, u) is strictly admissible for J. (1) If f = (f1 , . . . , fm ) is a (u)-effective base of J, then Inm (J) = hin0 (f1 ), . . . , in0 (fm )i and J = (f1 , . . . , fm ). Here the equality makes sense via the isomorphism grm (R) ≃ k[Y, U] induced by the above choice of (y, u). 94 (2) If f = (f1 , . . . , fm ) is a (u)-standard base, then (in0 (f1 ), . . . , in0 (fm )) is a standard base of Inm (J) and ν ∗ (J) = (n(u) (f1 ), . . . , n(u) (fm ), ∞, ∞, . . . ). Proof (2) follows at once from (1). The second assertion of (1) follows from the first in view of [H3], (2.21.d). We now show the first assertion of (1). Take a positive linear form Λ which is effective for (f, y, u). By Theorem 6.9, (y, Λ) is a reference datum for f . By Definition 6.7 and Lemma 6.6 (1) this implies vΛ (fi ) = n(u) (fi ) < ∞ for i = 1, . . . , m and InΛ (J) = hF1 (Y ), . . . , Fm (Y )i with Fi (Y ) = inΛ (fi ) = in0 (fi ) ∈ k[Y ]. It suffices to show InΛ (J) = Inm (J). By the strict admissibility of (y, u), Lemma 1.22 implies that there exists a standard base g = (g1 , . . . , gs ) which is admissible for (y, u) (cf. Definition 6.1). By Lemma 6.8 (2) this implies vm (gi ) = vL0 (gi ) = n(u) (gi ) < ∞ for i = 1, . . . , s and Inm (J) = InL0 (J) = hG1 (Y ), . . . , Gs (Y )i with Gi (Y ) = inL0 (gi ) ∈ k[Y ]. Take a positive linear form L such that L ≥ Λ and L ≥ L0 . Then Proposition 6.11 and Lemma 6.6 (3) imply InΛ (J) = InL (J) = InL0 (J) = Inm (J). This completes the proof.  95 7 Characteristic polyhedra of J ⊂ R In this section we are always in Setup A (beginning of §6). We introduce a polyhedron ∆(J, u) which plays a crucial role in this paper. It will provide us with useful invariants of singularities of Spec(R/J) (see §10). It also give us a natural way to transform a (u)-standard base of J into a standard base of J (see Corollary 7.26). Definition 7.1 (1) An F -subset ∆ ⊆ Re≥0 is a closed convex subset of Re≥0 such that v ∈ ∆ implies v + Re≥0 ⊆ ∆. The essential boundary ∂∆ of an F -subset ∆ is the subset of ∆ consisting of those v ∈ ∆ such that v ∈ 6 v ′ + Re≥0 with v ′ ∈ ∆ unless v = v ′ . We write ∆+ = ∆ − ∂∆. (2) For a semi-positive positive linear form L : Re → R, put δL (∆) = min{L(v) | v ∈ ∆}. Then EL = ∆ ∩ {v ∈ Re | L(v) = δL (∆)} is called a face of ∆ with slope L. One easily sees that EL is bounded if and only if L is positive. If EL consists of a unique point v, we call v a vertex of ∆. (3) When L = L0 as in Remark 6.3, we call δ(∆) = δL0 (∆) = min{a1 + . . . + ae | (a1 , . . . , ae ) ∈ ∆} the δ-invariant of ∆ and EL0 the δ-face of ∆. Definition 7.2 Let (y, u) be as in Setup A in §6. Let f ∈ m be not contained in hui ⊂ R. Write as in (6.3): X f= CA,B y B uA with CA,B ∈ R× ∪ {0}. (A,B) (1) The polyhedron ∆(f, y, u) ⊆ Re≥0 is defined as the smallest F -subset containing all points of   A CA,B 6= 0, |B| < n(u) (f ) . v= n(u) (f ) − |B| This is in fact a polyhedron in Re≥0 , which depends only on f, y, u, and does not depend on the presentation (6.3). (2) For v ∈ Re − ∆(f, y, u)+, the v-initial of f is defined as inv (f ) = inv (f )(y,u) = in0 (f ) + inv (f )+ ∈ k[Y, U], where writing as (6.3), inv (f )+ = inv (f )+ (y,u) = X C A,B Y B U A ∈ k[Y, U] (A,B) where the sum ranges over such (A, B) that |B| < n(u) (f ) and 96 A = v. n(u) (f ) − |B| (3) For a semi-positive linear form L : Re → R, we write δL (f, y, u) = δL (∆(f, y, u)). By definition   L(A) δL (f, y, u) = min CA,B 6= 0, |B| < n(u) (f ) . n(u) (f ) − |B| and EL = ∆(f, y, u) ∩ {A ∈ Re | L(A) = δL (f, y, u)} is a face of ∆(f, y, u) of slope L. When EL is the δ-face of ∆(f, y, u) (namely L = L0 as in Definition 7.1 (3)), we write simply δ(f, y, u) = δL (f, y, u). (4) Let EL be as in (3). We define the EL -initial of f by X inEL (f ) = inEL (f )(y,u) = in0 (f ) + C A,B Y B U A ∈ k[[U]][Y ] (A,B) where the sum ranges over such (A, B) that |B| < n(u) (f ) and L(A) = δL (f, y, u)(n(u)(f ) − |B|). We note that inEL (f ) is different from inL (f ) in Definition 6.2 (2). When EL is the δ-face of ∆(f, y, u), we write inδ (f ) for inEL (f ). One easily sees the following: Lemma 7.3 Let the notation be as in Definition 7.2. (1) inv (f )(y,u) is independent of the presentation (6.3). (2) If EL is bounded, inEL (f ) ∈ k[U, Y ] and it is independent of the presentation (6.3). Otherwise it may depend on (6.3) (so there is an abuse of notation). (3) If EL is bounded, inEL (f ) = in0 (f ) + X inv (f )+ . v∈EL (4) inv (f ) = in0 (f ) if v 6∈ ∆(f, y, u) and inv (f ) 6= in0 (f ) if v is a vertex of ∆(f, y, u). Lemma 7.4 (1) δ(f, y, u) ≥ 1 if and only if n(u) (f ) = vm (f ). (2) δ(f, y, u) = 1 if and only if inm (f ) = inδ (f ). (3) δ(f, y, u) > 1 if and only if inm (f ) = in0 (f ) ∈ k[Y ]. Proof By definition δ(f, y, u) ≥ 1 is equivalent to the condition: CA,B 6= 0 and |B| < n(u) (f ) ⇒ |A| + |B| ≥ n(u) (f ), which is equivalent to |A| + |B| < n(u) (f ) ⇒ CA,B = 0 or |B| = n(u) (f ). Lemma 7.4 (1) follows easily from this. (2) and (3) follow by a similar argument and the details are omitted.  97 Definition 7.5 Let f = (f1 , . . . , fm ) ⊂ m be a system of elements such that fi 6∈ hui. (1) Define the polyhedron ∆((f1 , . . . , fm ), y, u) = ∆(f, y, u) ⊆ Re≥0 as the smallest F -subset containing ∪ ∆(fi , y, u). 1≤i≤m (2) For v ∈ Re − ∆(f, y, u)+, the v-initial of f is defined as inv (f ) = (inv (f1 ), . . . , inv (fm )) by noting ∆(f, y, u)+ ⊃ ∪ ∆(fi , y, u)+, 1≤i≤m The EL -initial inEL (f ) of f for a face EL of ∆(f, y, u) is defined similarly. (3) For a semi-positive linear form L : Re → R, we put δL (f, y, u) = min{δL (fi , y, u)| 1 ≤ i ≤ m}. (4) We let V (f, y, u) denote the set of vertices of ∆(f, y, u). We put Ve (f, y, u) = {v ∈ Re − ∆(f, y, u)+ | inv (fi ) 6= in0 (fi ) for some 1 ≤ i ≤ m}. We call it the set of the essential points of ∆(f, y, u). By definition ∆(f, y, u) is the smallest F -subset of Re which contains Ve (f, y, u). By Lemma 7.3 we have V (f, y, u) ⊂ Ve (f, y, u) ⊂ ∂∆(f, y, u). The following fact is easily seen: Lemma 7.6 We have 1 Ve (f, y, u) ⊂ Ze≥0 ⊆ Re d! with d = max{n(u) (fi )| 1 ≤ i ≤ m}. In particular Ve (f, y, u) is a finite set. Theorem 7.7 Let the assumption be as in Definition 7.5. The following conditions are equivalent: (1) f is a (u)-standard base of J and δ(f, y, u) > 1. (2) f is a standard base of J and inm (fi ) ∈ k[Y ] for ∀i. If (u) is admissible for J, the conditions imply that (y, u) is strictly admissible for J. Proof The implication (2)⇒(1) follows from Lemma 7.4 in view of Remark 6.3. We show (1)⇒(2). When δ(f, y, u) > 1, L = L0 is effective for (f, y, u) by Lemma 7.4, where L0 (A) = |A| (cf. Remark 6.3). Thus the desired assertion follows from Theorem 6.9. Assume that (u) is admissible for J. By Lemma 6.13, the conditions imply that Inm (J) is generated by polynomials in k[Y ]. Thus we must have IDir(R/J) = hY1 , . . . , Yr i by the assumption that (u) is admissible for J. This proves the last assertion.  98 Definition 7.8 Let the assumption be as in Setup A in §6. The polyhedron ∆(J, u) is the intersection of all ∆(f, y, u) where f = (f1 , . . . , fm ) is a (u)-standard basis with reference datum (y, L) for some y and L. Remark 7.9 (1) This is not the original definition given in [H3], (1.12) (which is formulated more intrinsically), but it follows from [H3], (4.8) that the definitions are equivalent. (2) As a polyhedron, ∆(f, y, u) and ∆(J, u) are defined by equations L1 (A) ≥ d1 , . . . , Lt (A) ≥ dt for different non-zero semi-positive linear forms Li on Re . Another important result of Hironaka provides a certain condition under which we have ∆(J, u) = ∆(f, y, u) (see Theorem 7.16). First we introduce the notion of normalizedness. Definition 7.10 Let S = k[X1 , . . . , Xn ] be a polynomial ring over a field k and I ⊂ S be a homogeneous ideal. We define: E(I) = {LE(ϕ) ∈ Zn≥0 | ϕ ∈ I homogeneous} , where for a homogeneous polynomial ϕ ∈ S, LE(ϕ) is its leading exponent, biggest P i.e., the exponent (in the lexicographic order on Zn≥0 ) occurring in ϕ: For ϕ = cA X A we have LE(ϕ) = max{A | cA 6= 0}. If I is generated by homogeneous elements ϕ1 , . . . , ϕm , we also write E(I) = E(ϕ1 , . . . , ϕm ). We note E(I) + Zn≥0 ⊂ E(I). Definition 7.11 Assume given G1 , . . . , Gm ∈ k[[U]][Y ] = k[[U1 , . . . , Ue ]][Y ]: X Gi = Fi (Y ) + Y B Pi,B (U), (Pi,B (U) ∈ k[U]) |B|<ni where Fi (Y ) ∈ k[Y ] is homogeneous of degree ni and Pi,B (U) 6∈ k − {0}. (1) (F1 , . . . , Fm ) is normalized if writing X Fi (Y ) = Ci,B Y B with Ci,B ∈ k, B Ci,B = 0 if B ∈ E(F1 , . . . , Fi−1 ) for i = 1, . . . , m . (2) (G1 , . . . , Gm ) is normalized if (F1 , . . . , Fm ) is normalized and Pi,B (U) ≡ 0 if B ∈ E(F1 , . . . , Fi−1 ) for i = 1, . . . , m . It is easy to see that if (F1 , . . . , Fm ) is normalized, then it is weakly normalized in the sense of Definition 1.3. There is a way to transform a weakly normalized standard base of a homogeneous ideal I ⊂ k[Y ] into a normalized standard base of I (cf. [H3], Lemma 3.14 and Theorem 7.19 below). Definition 7.12 Let the assumption be as in Definition 7.5. 99 (1) (f, y, u) is weakly normalized if (in0 (f1 ), . . . , in0 (fm )) is weakly normalized. (2) (f, y, u) is 0-normalized if (in0 (f1 ), . . . , in0 (fm )) is normalized in the sense of Definition 7.11 (1). (3) (f, y, u) is normalized at v ∈ Re − ∆(f, y, u)+ if so is (inv (f1 ), . . . , inv (fm )) in the sense of Definition 7.11 (2). (4) (f, y, u) is normalized along a face EL of ∆(f, y, u) if so is (inEL (f1 ), . . . , inEL (fm )) in the sense of Definition 7.11 (2). Now we introduce the notions of (non-) solvability and preparedness. Definition 7.13 Let the assumption be as Definition 7.5. For v ∈ V (f, y, u), (f, y, u) is called solvable at v if there are λ1 , . . . , λr ∈ k[U] such that inv (fi )(y,u) = Fi (Y + λ) with Fi (Y ) = in0 (fi )(y,u) (i = 1, . . . , m) , where Y + λ = (Y1 + λ1 , . . . , Yr + λr ). In this case the tuple λ = (λ1 , . . . , λr ) is called a solution for (f, y, u) at v. Remark 7.14 For v ∈ V (f, y, u), it is not possible that inv (fi ) ∈ k[Y ] for all i = 1, . . . , m (cf. Definition 7.5 (4)); hence λ 6= 0 if v is solvable. Definition 7.15 Let the assumption be as Definition 7.5. (1) Call (f, y, u) prepared at v ∈ V (f, y, u) if (f, y, u) is normalized at v and not solvable at v. (2) Call (f, y, u) prepared along a face EL of ∆(f, y, u) if (f, y, u) is normalized along EL and not solvable at any v ∈ V (f, y, u) ∩ EL . (3) Call (f, y, u) δ-prepared if it is prepared along the δ-face of ∆(f, y, u). (4) Call (f, y, u) well prepared if it is prepared at any v ∈ V (f, y, u). (5) Call (f, y, u) totally prepared if it is well prepared and normalized along all bounded faces of ∆(f, y, u). We can now state Hironaka’s crucial result (cf. [H3], (4.8)). Theorem 7.16 Let the assumption be as in Definition 7.5. Assume that f is a (u)standard base of J and the following condition holds, where R̃ = R/hui, m̃ = m/hui, J˜ = J R̃: (*) There is no proper k-subspace T ( grm̃1 (R̃) such that ˜ ˜ ∩ k[T ]) · grm̃ (R̃) = Inm̃ (J). (Inm̃ (J) Let v be a vertex of ∆(f, y, u) such that (f, y, u) is prepared at v. Then v is a vertex of ∆(J, u). In particular, if (f, y, u) is well-prepared, then ∆(J, u) = ∆(f, y, u). We note that condition (∗) is satisfied if (u) is admissible (Definition 6.1). 100 Corollary 7.17 Let the assumption be as Theorem 7.16. Assume further that (u) is admissible for J. Then the following conditions are equivalent: (1) (f, y, u) is prepared at any v ∈ V (f, y, u) lying in {A ∈ Re | |A| ≤ 1}. (2) δ(f, y, u) > 1. (3) (y, u) is strictly admissible for J and f is a standard base of J admissible for (y, u). The above conditions hold if (f, y, u) is δ-prepared. Proof Clearly (2) implies (1). The equivalence of (2) and (3) follows from Theorem 7.7. It remains to show that (1) implies (2). By Lemma 1.22 we can find a strictly admissible (z, u) and a standard base g of J admissible for (z, u). By Lemma 7.4 we have δ(g, z, u) > 1 and hence ∆(J, u) ⊂ ∆(g, z, u) ⊂ {A ∈ Re | |A| > 1}. By Theorem 7.16 this implies δ(f, y, u) > 1 since (f, y, u) is well-prepared at any vertex v with |v| ≤ 1. Finally, if (f, y, u) is δ-prepared, Theorem 7.16 implies δ(f, y, u) = δ(∆(J, u)) and the same argument as above shows δ(f, y, u) > 1. This completes the proof.  We have the following refinement of Theorem 2.2 (2)(iv). Theorem 7.18 Let the assumption be as in Definition 7.5. Assume that (u) is admissible for J and that (f ) is a (u)-standard base of J. Let X = Spec(R/J) and D = Spec(R/p) for p = (y, u1, . . . , us ) ⊂ m = (y, u1, . . . , ue ). Assume that D ⊂ X is permissible and that there exists a vertex v on the face EL such that (f, y, u) is prepared at v, where X L : Re → R; (a1 , . . . , ae ) → ai , 1≤i≤s Then vp (fi ) = vm (fi ) = n(u) (fi ) for i = 1, . . . , m. In particular we have δ(f, y, u) ≥ 1. Proof of Theorem 7.18 By Theorem 7.16, the last assumption implies (7.1) δL (f, y, u) = δL (∆(J, u)). Let ni = n(u) (fi ) = ν (i) (J) for i = 1, . . . , m. By Lemma 6.13 (2) and (1.3) we have vp (fi ) ≤ vm (fi ) ≤ n(u) (fi ) = ni for i = 1, . . . , m. Thus it suffices to show that (7.1) implies vp (fi ) ≥ ni . Let g = (g1 , . . . , gm ) be a (u)standard base of J. As usual write X gi = Ci,A,B y B uA with Ci,A,B ∈ R× ∪ {0}, A ∈ Ze≥0 , B ∈ Zr≥0 . i,A,B Note that n(u) (gi ) = n(u) (fi ) = ni by Lemma 6.13 (2). We have (7.2) vp (gi ) ≥ ni ⇔|B| + L(A) ≥ ni if Ci,A,B 6= 0 and |B| < ni A ⇔L( ) ≥ 1 if Ci,A,B 6= 0 and |B| < ni . ni − |B| 101 Hence we get the following equivalences for a (u)-standard base g of J: (7.3) δL (g, y, u) ≥ 1 ⇔ vp (gi ) ≥ ν (i) (J) for i = 1, . . . , m ⇔ vp (gi ) = vm (gi ) = n(u) (gi ) = ν (i) (J) for i = 1, . . . , m Noting that any standard base is a (u)-standard base by Lemma 6.8 (2) (here we used the assumption (1)), Theorem 2.2 (2)(iv) implies that there exists a (u)-standard base g which satisfies the conditions of (7.3). Since ∆(g, y, u) ⊃ ∆(J, u), this implies δL (f, y, u) ≥ δL (g, y, u) ≥ 1, which implies the desired assertion by (7.3). Finally the last assertion follows from Lemma 7.4.  We can not expect to get the desirable situation of Theorem 7.16 right away. So we need procedures to attain this situation. This is given by the following results (cf. [H3], (3.10), (3.14) and (3.15)). First we discuss normalizations. Theorem 7.19 Let the assumption be as in Definition 7.5. Assume that (f, y, u) is weakly normalized. For v ∈ V (f, y, u), there exist xij ∈ hui ⊂ R (1 ≤ j < i ≤ m) such that the following hold for h = (h1 , . . . , hm ), where hi = fi − i−1 X xij fj . j=1 (i) ∆(h, y, u) ⊆ ∆(f, y, u). (ii) If v ∈ ∆(h, y, u), then v ∈ V (h, y, u) and (h, u, y) is normalized at v. (iii) V (f, y, u) − {v} ⊂ V (h, y, u). (iv) For v ′ ∈ V (f, y, u) − {v}, we have inv′ (f )(y,u) = inv′ (h)(y,u) . Remark 7.20 In the above situation, the passage from (f, y, u) to (h, y, u) is called a normalization at v. It is easy to see that in0 (hi ) = in0 (fi ) for all i, 1 ≤ i ≤ m. We will need the following slight generalization of Theorem 7.19: Theorem 7.21 Let the assumption be as in Definition 7.5. Let E be a bounded face of ∆(f, y, u). Assume that (f, y, u) is normalized at any v ∈ E ∩ V (f, y, u). Then there exist xij ∈ (u)R (1 ≤ j < i ≤ m) such that putting hi = fi − i−1 X xij fj for 1 ≤ i ≤ m, j=1 ∆(h, y, u) = ∆(f, y, u) and (h, y, u) is normalized along E. Proof Write E = ∆(f, y, u) ∩ {A ∈ Re | L(A) = 1} for a positive linear form L : Re → R. For i = 1, . . . , m, we can write X X inE (fi ) = Fi (Y ) + Y B Pi,B (U) ∈ k[Y, U], Pi,B (U) = ci,A,B U A ∈ k[U], |B|<ni |B|+L(A)=ni 102 where ni = n(u) (fi ) = vL (fi ) and Fi (Y ) = in0 (fi ) ∈ k[Y ] which is homogeneous of degree ni . For each i ≥ 1 put Σ(f1 , . . . , fi ) = {B| Pi,B (U) 6≡ 0, B ∈ E(F1 , . . . , Fi−1 )}. If Σ(f1 , . . . , fi ) = ∅ for all i ≥ 1, there is nothing to be done. Assume the contrary and let j = min{i| Σ(f1 , . . . , fi ) 6= ∅} and Bmax be the maximal element of Σ(f1 , . . . , fj ) with respect to the lexicographic order. Note that { (7.4) A | cj,A,Bmax 6= 0} ⊂ EL \V (f, y, u) nj − |Bmax | by the assumption that (f, y, u) is normalized at any v ∈ EL ∩ V (f, y, u). By the construction there exist Gi (Y ) ∈ k[Y ], homogeneous of degree |Bmax | − ni , for 1 ≤ i ≤ j − 1 such that X H(Y ) := Y Bmax − Gi (Y )Fi (Y ) 1≤i≤j−1 has exponents smaller than Bmax . Note that H(Y ) is homogeneous of degree |Bmax |. For i = 1, . . . , j − 1, take gi ∈ R such that inm (gi ) = Gi (Y ) and take X c̃j,A,Bmax uA ∈ R with cj,A,Bmax = c̃j,A,Bmax mod m. P̃j,Bmax = |Bmax |+L(A)=ni Put hj = fj − P̃j,Bmax X gi fi and hi = fi for 1 ≤ i 6= j ≤ m. 1≤i≤j−1 By (7.4), we have inE (hj ) = inE (fj ) − Pj,Bmax (U)(Y Bmax − H(Y )), inv (hj ) = inv (fj ) for ∀v ∈ V (f, y, u). Hence Σ(h1 , . . . , hi ) = Σ(f1 , . . . , fi ) for all i = 1, . . . , j −1 and all elements of Σ(h1 , . . . , hj ) are smaller than Bmax in the lexicographical order. This proves Theorem 7.21 by induction.  Now we discuss dissolutions. Theorem 7.22 Let the assumption be as in Definition 7.5 and let v ∈ V (f, y, u). (a) Any solution for (f, y, u) at v is of the form λ with λi = ci U v , where ci ∈ k × . In particular, if it exists, a solution is always non-trivial and v ∈ Ze . |v| (b) Let d = (d1 , . . . , dr ) ⊂ R with di ∈ huv i be such that the image of di in grm (R) is λi . Let z = y − d = (y1 − d1 , . . . , yr − dr ). Then (i) ∆(f, z, u) ⊆ ∆(f, y, u). (ii) v 6∈ ∆(f, z, u) and V (f, y, u) − {v} ⊂ V (f, z, u). (iii) For v ′ ∈ V (f, y, u) − {v}, we have inv′ (f )(z,u) = inv′ (f )(y,u) |Y =Z ∈ k[Z, U]. 103 (Z = inm (z) ∈ grm1 (R)) Remark 7.23 In the above situation, the passage from (f, y, u) to (f, z, u) is called the dissolution at v. It is easy to see in0 (fi )(z,u) = in0 (fi )(y,u) |Y =Z for 1 ≤ ∀i ≤ m. We now come to the preparation of (f, y, u): Let the assumption be as in Definition 7.5. We apply to (f, y, u) alternately and repeatedly normalizations and dissolutions at vertices of polyhedra. To be precise we endow Re≥0 with an order defined by v > w ⇔ |v| > |w| or |v| = |w| and v > w in the lexicographical order. Let v ∈ V (f, y, u) be the smallest point and apply the normalization at v from Theorem 7.19 and then the dissolution at v from Theorem 7.22 if v is solvable, to get (g, z, u). Then (g, z, u) is prepared at v. Repeating the process, we arrive at the following conclusion (cf. [H3], (3.17)). Theorem 7.24 Let the assumption be as in Definition 7.5. Assume that (f, y, u) is weakly normalized. For any integer M > 0, there exist xij ∈ hui (1 ≤ j < i ≤ m), dν ∈ hui (ν = 1, . . . , r), such that putting z = (z1 , . . . , zr ) with zν = yν − dν , g = (g1 , . . . , gm ) with gi = fi − i−1 X xij fj , j=1 we have ∆(g, z, u) ⊆ ∆(f, y, u), and (g, z, u) is prepared along all bounded faces contained in {A ∈ Re | |A| ≤ M}. If R is complete, we can obtain the stronger conclusion that (g, z, u) is well-prepared. Remark 7.25 By Theorem 7.21 we can make (g, z, u) in Theorem 7.24 satisfy the additional condition that it is normalized along all bounded faces of the polyhedron contained in {A ∈ Re | |A| ≤ N}. If R is complete, we can make (g, z, u) totally prepared. Corollary 7.26 Let the assumption and notation be as in Theorem 7.24. (1) If f is a (u)-standard base of J, then so is g. (2) If f is a (u)-standard base of J and (u) is admissible (cf. 6.1), then δ(g, z, u) > 1 and (z, u) is strictly admissible and g is a standard base admissible for (z, u). Proof (1) follows from Corollary 6.10. (2) follows from (1) and Theorem 7.17.  At the end of this section we prepare a key result which relates certain localizations of our ring to certain projections for the polyhedra. Let (f, y, u) be as in Definition 7.5. For s = 1, . . . , e, we let ps = hy, u≤si = hy1, . . . , yr , u1 , . . . , us i. 104 Let Rs be the localization of R at ps , let Js = JRs , and ms = ps Rs (the maximal ideal of Rs ). We want to relate ∆(f, y, u) ⊂ Re to ∆(f, y, u≤s) ⊂ Rs , the characteristic polyhedron for Js ⊂ Rs . Assume given a presentation as in (6.3): X (7.5) fi = Pi,A,B y B uA with Pi,A,B ∈ R× ∪ {0} (i = 1, . . . , m). (A,B) (7.5) can be rewritten as: (7.6) fi = X ≤s Pi,C,B y B uC ≤s , (C,B) a1 as where for C = (a1 , . . . , as ) ∈ Zs≥0 , uC ≤s = u1 · · · us and X as+1 ≤s (7.7) Pi,C,B = Pi,A,B us+1 · · · uae e ∈ R̂. A=(a1 ,...,as ,as+1 ,...,ae ) We now introduce some conditions which are naturally verified in the case where Spec(R/hu1i) is the exceptional divisor of a blowup at a closed point (see Lemma 9.4 below). Assume (P 0) J ⊂ p1 and there is a subfield k0 ⊂ R/p1 such that Pi,A,B mod p1 ∈ k0 . By (P 0) we get the following for C = (a1 , . . . , as ) ∈ Zs≥0 : X ≤s as+1 ≤s mod ps = P i,C,B := Pi,C,B P i,A,B us+1 · · · uae e ∈ k0 [[us+1 , . . . , ue ]] ⊂ R̂/ps , A=(a1 ,...,as ,as+1 ,...,ae ) P i,C,B := Pi,A,B mod ps ∈ k0 ֒→ R/ps , uj = uj mod ps ∈ R/ps . Hence we have the following equivalences for C ∈ Zs≥0 (P 1) ≤s Pi,C,B ∈ ps ⇔ Pi,A,B = 0 for all A ∈ Ze≥0 such that πs (A) = C ≤s ⇔ Pi,C,B =0 where πs : Re → Rs ; (a1 , . . . , ae ) → (a1 , . . . , as ). We further assume (P 2) For fixed B and a ∈ Z≥0 , there are only finitely many A such that Pi,A,B 6= 0 and π1 (A) = a. ≤s This condition implies Pi,C,B ∈ R. Theorem 7.27 Let L : Rs → R be a semi-positive linear form and Ls = L ◦ πs . (1) If (P 0) holds, then ∆(f, y, u≤s) = πs (∆(f, y, u)) and δL (f, y, u≤s) = δLs (f, y, u). (2) If (P 0) and (P 2) hold and L(1, 0, . . . , 0) 6= 0, then the initial form along the face EL of ∆(f, y, u≤s) (with respect to the presentation (7.6), cf. Definition 7.2) lies in the polynomial ring R/ps [Y, U≤s ] and we have inEL (f )(y,u≤s ) = inELs (f )(y,u) |Ui =ui (s+1≤i≤e) , considered as an equation in k0 [us+1 , . . . , ue ][Y, U≤s ] ⊂ R/ps [Y, U≤s ] (cf. (P 2)). 105 (3) Assume (P 0) and (P 2) and L(1, 0, . . . , 0) 6= 0. Assume further: L (i) There is no proper k-subspace T ⊂ k · Yi (k = R/m) such that 1≤i≤r Fi (Y ) := in0 (fi ) ∈ k[T ] ⊂ k[Y ] for all j = 1, . . . , m. (ii) (f, y, u) is prepared along the face ELs of ∆(f, y, u). Then (f, y, u≤s) is prepared along the face EL of ∆(f, y, u≤s ). Proof By (P 1) we get L(C) ≤s | |B| < ni , Pi,C,B 6 0} = ni − |B| Ls (A) | |B| < ni , Pi,A,B = 6 0} = δLs (f, y, u) = min{ ni − |B| δL (f, y, u≤s) = min{ and (1) follows from this. To show (2), we use (7.6) to compute X ≤s C P i,C,B Y B U≤s inEL (f )(y,u≤s ) = Fi (Y ) + (7.8) B,C = Fi (Y ) + X a π (A) s+1 P i,A,B us+1 · · · uae e · Y B U≤ss , B,A where the first (resp. second) sum ranges over those B, C (resp. B, A) for which |B| < ni and L(C) = δL (f, y, u≤s)(ni − |B|) (resp. |B| < ni and Ls (A) = δLs (f, y, u)(ni − |B|)). (2) follows easily from this. We now show (3). By (2) the assumption (ii) implies that inEL (f )(y,u≤s ) is normalized. It suffices to show the following: Claim 7.28 Let v be a vertex on EL . Then (f, y, u≤s) is not solvable at v. We prove the claim by descending induction on s (the case s = e is obvious). From (1) we easily see that there exists a vertex w ∈ ∆(f, y, u) such that πs (w) = v and vt := πt (w) is a vertex of ∆(f, y, , u≤t) for all s ≤ t ≤ e. By induction hypothesis, we may assume (∗) (f, y, u≤s+1) is not solvable at vs+1 . Assume (f, y, u≤s) solvable at v. Then v ∈ Zs≥0 and there exist elements λ1 , . . . , λr of the fraction field K of R/ps such that (7.9) v v inv (f )(y,u≤s ) = Fi (Y1 + λ1 U≤s , . . . , Yr + λr U≤s ) for all i = 1, . . . , m. Claim 7.29 λj lies in the localization S of R/ps at ps+1 /ps for all j = 1, . . . , r. ej ∈ Rs+1 , the Admit the claim for the moment. By the claim we can lift λj ∈ S to λ ej uv ∈ Rs+1 ⊂ Rs . Take a positive linear form localization of R at ps+1. Set zj = yj + λ ≤s Lv : Rs → R such that ELv = {v} and hence Lv (v) = δLv (f, y, u≤s). By Theorem 7.22, ∆(f, z, u≤s ) ⊂ ∆(f, y, u≤s) − {v} so that (7.10) δLv (f, z, u≤s ) > δLv (f, y, u≤s). 106 Now we apply (1) to Js+1 ⊂ Rs+1 and (f, z, u≤s+1 ) instead of J ⊂ R and (f, y, u). Note that in the proof of (1) we have used only (P 0) which carries over to the replacement. We get  ∆(f, z, u≤s ) = π ∆(f, z, u≤s+1 ) and δLv ◦π (f, z, u≤s+1 ) = δLv (f, z, u≤s ), where π : Rs+1 → Rs ; (a1 , . . . , as+1 ) → (a1 , . . . , as ). By the assumption, v = π(vs+1 ) and Lv ◦ π(vs+1 ) = Lv (v) = δLv (f, y, u≤s). By Theorem 7.16, (∗) implies vs+1 ∈ ∆(Js+1 , u≤s+1) ⊂ ∆(f, z, u≤s+1 )). (7.11) Thus we get δLv (f, z, u≤s ) = δLv ◦π (f, z, u≤s+1 ) ≤ δLv ◦π (∆(Js+1 , u≤s+1)) ≤ Lv ◦ π(vs+1) = δLv (f, y, u≤s), where the inequalities follow from (7.11). This contradicts (7.10) and the proof of (3) is complete. Now we show Claim 7.29. Note that S is a discrete valuation ring with a prime element π := us+1 mod ps . Thus it suffices to show vπ (λj ) ≥ 0 for j = 1, . . . , r. Assume the contrary. We may assume vπ (λ1 ) = −ǫ < 0, vπ (λ1 ) ≤ vπ (λj ) for j = 1, . . . , r. Set Zj = Y j + µj V v and µj = λj π ǫ ∈ S, where V = U≤s and recall that Fi (Y ) = in0 (fi ) ∈ k0 [Y ] and k0 ⊂ S by (P 0) . Consider Fi (Z) = Fi (Y1 + µ1 V, . . . , Yr + µr V ) ∈ κ[Y, V ], κ := S/hπi = κ(ps+1), where µi = µj mod π ∈ κ. We claim that there is some i for which Fi (Z) 6∈ κ[Y ]. Indeed, by the structure theorem of complete local rings, (P 0) implies R̂/ps+1 ≃ k[[us+2, . . . , ue ]] so that κ is contained in k((us+2 , . . . , ue )) which is a separable extension of k. By (3)(i) and Lemma 1.20 (2), M M T = κ · (Y1 + µj V ) ⊂ κ · Yj ⊕ κ · V 1≤j≤r 1≤j≤r is the smallest κ-subspace such that Fi (Z) ∈ κ[T ] for all i = 1, . . . , m. Thus the claim follows from the fact that µ1 6= 0. For the above i, we expand X Fi (Y1 + λ1 V, . . . , Yr + λr V ) = γB Y B V ni −|B| (γB ∈ K), B and we get Fi (Z) = Fi (Y1 + µi V, . . . , Yr + µi V ) = X γB π ǫ(ni −|B|) · Y B V ni −|B| ∈ S[Y, V ]. B Since Fi (Z) 6∈ κ[Y ], there is some B such that |B| < ni and γB π ǫ(ni −|B|) is a unit of S. Noting ǫ > 0, this implies γB 6∈ S. On the other hand, (7.8) and (7.9) imply γB ∈ S, which is absurd. This completes the proof of Claim 7.29.  107 8 Transformation of standard bases under blow-ups In this section we will study the transformation of a standard base under permissible blow-ups, in particular with respect to near points in the blow-up. We begin by setting up a local description of the situation in Theorem 2.14 in §2. Setup B Let Z be an excellent regular scheme and X ⊂ Z be a closed subscheme and take a closed point x ∈ X. Put R = OZ,x with the maximal ideal m and put k = R/m = k(x). Write X ×Z Spec(R) = Spec(R/J) for an ideal J ⊂ m. Define the integers n1 ≤ n2 ≤ · · · ≤ nm by νx∗ (X, Z) = ν ∗ (J) = (n1 , . . . , nm , ∞, ∞, . . . ). Let D ⊂ X be a closed subscheme permissible at x ∈ D and let J ⊂ p be the prime ideal defining D ⊂ Z. By Theorem 2.2 (2) we have Tx (D) ⊂ Dirx (X) so that we can find a system of regular parameters for R, (y, u, v) = (y1 , . . . , yr , u1, . . . , us , v1 , . . . , vt ) such that p = (y, u) and (y, (u, v)) is strictly admissible for J (cf. Definition 6.1). This gives us an identification grm (R) = k[Y, U, V ] = k[Y1 , . . . , Yr , U1 , . . . , Us , V1 , . . . , Vt ] (k = R/m) where Yi = inm (yi ), Ui = inm (ui ), Vi = inm (vi ) ∈ grm (R). Consider the diagram: BℓD (X) = X ′ ⊂ Z ′ = BℓD (Z) ←֓ πZ−1 (x) = Ex ↓ πX ↓ πZ X ⊂ Z and note that Ex := πZ−1 (x) = P(Tx (Z)/Tx (D)) = Proj(k[Y, U]) ∼ . = Pr+s−1 k We fix a point x′ ∈ Proj(k[U]) ⊂ Proj(k[Y, U]) = Ex . (By Theorem 2.14, if char(k(x)) = 0 or char(k(x)) ≥ dim(X)/2 + 1, any point of X ′ near to x lies in Proj(k[U]). Moreover, if x′ is near to x, Theorem 2.10 implies νx∗′ (X ′ , Z ′ ) = νx∗ (X, Z). Without loss of generality we assume further that x′ lies in the chart {U1 6= 0} ⊂ Ex . Let R′ = OZ ′ ,x′ with the maximal ideal m′ and let J ′ ⊂ m′ be the ideal defining X ′ ⊂ Z ′ at x′ . Put k ′ = k(x′ ) = R′ /m′ . Then mR′ = (u1 , v) = (u1 , v1 , . . . , vt ), and (y ′ , u1, v), with y ′ = (y1′ , . . . , yr′ ), yi′ = yi /u1 , v = (v1 , . . . , vt ) is a part of a system of regular parameters for R′ . Choose any φ2 , . . . , φs′ ∈ m′ such that (y ′ , u1, φ, v), with φ = (φ2 , . . . , φs′ ), is a system of regular parameters for R′ (note s − s′ = trdegk (k(x′ ))). Then grm′ (R′ ) = k ′ [Y ′ , U1 , Φ, V ] = k ′ [Y1′ , . . . , Yr′ , U1 , Φ1 , . . . , Φs′ , V1 , . . . , Vt ], 108 where Yi′ = inm′ (yi′ ), Φi = inm′ (φi ), Vi = inm′ (vi ) ∈ grm′ (R′ ). Assume now given a standard base f = (f1 , . . . , fm ) of J which is admissible for (y, (u, v)). By definition (8.1) Fi (Y ) := inm (fi ) ∈ k[Y ] (i = 1, . . . , m) and Inm (J) = hF1 (Y ), . . . , Fm (Y )i. By Lemma 6.13 (2) we have (8.2) vm (fi ) = n(u,v) (fi ) = ni for i = 1, . . . , m. Finally we assume (8.3) vm (fi ) = vp (fi ) for i = 1, . . . , m. This assumption is satisfied if D = {x} (for trivial reasons) or under the conditions of Theorem 7.18 (for example if (f, y, (u, v)) is well-prepared). The assumptions imply X (8.4) fi = Ci,A,B y B uAu v Av , CA,B ∈ Γ, A = (Au , Av ), Au ∈ Zs≥0 , Av ∈ Zt≥0 , A,B where the sum ranges over Au , Av , B such that |B| + |Au | ≥ ni . (8.5) ′ By [H1] Ch. III.2 p. 216 Lemma 6 we have J ′ = hf1′ , . . . , fm i with X  B |A |+|B|−ni Av (8.6) fi′ = fi /un1 i = CA,B u′Au y ′ u1 u v , A,B ′as 2 u′Au = u′a 2 . . . us for Au = (a1 , . . . , as ) (u′i = ui /u1 ). This implies (8.7) fi′ = F̃i′ mod hu1 , vi = hu1 , v1 , ..., vt i for i = 1, . . . , m, where X B F̃i′ = Ci,0,B y ′ and ni = vm′ (F̃i′) = n(u1 ,φ,v) (fi′ ) |B|=ni so that (8.8) in0 (fi′ )(y′ ,(u1 ,φ,v)) = Fi (Y ′ ) for i = 1, . . . , m For later use, we choose S (resp. S ′ ), a ring of coefficients of R̂ (resp. R̂′ ) (cf. (6.5)). We also choose a set Γ ⊂ S of representatives of k (resp. a set Γ′ ⊂ S ′ of representatives of k ′ ). We note that the choices for R and R′ are independent: We do not demand S ⊂ S ′ nor Γ ⊂ Γ′ . (end of Setup B). 109 We want to compare the properties of (f, y, (u, v)) (downstairs) and (f ′ , y ′, (u1 , φ, v)) (upstairs), especially some properties of the polyhedra and initial forms. Let e = s + t and e′ = s′ + t. For a semi-positive linear form L on Re (downstairs) ′ (resp. on Re (upstairs)), vL and inL (∗) denote the L-valuation of R (resp. R′ ) and the corresponding initial form of ∗ ∈ R (resp. ∗ ∈ R′ ) with respect to (y, (u, v), Γ) (resp. (y ′, (u1 , φ, v), Γ′)). ′ Theorem 8.1 In Setup B, f ′ = (f1′ , . . . , fm ) is a (u1 , φ, v)-effective basis of J ′ . If ′ (f1 , . . . , fm ) is a standard base of J, then (f1′ , . . . , fm ) is a (u1 , φ, v)-standard basis of ′ ′ J . More precisely there exists a positive linear form L on Re (upstairs) such that: inL′ (fi′ ) = Fi (Y ′ ) (1 ≤ i ≤ m) and inL′ (J ′ ) = hF1 (Y ′ ), . . . , Fm (Y ′ )i. First we need to show the following: Lemma 8.2 Let the assumption be as in Setup B. Choose d > 1 and consider the linear ′ forms on Re and Re : 1 L(A) = d Λ′ (A) = X ai + 1≤i≤s t X 1≤j≤t a′j  X  1 a1 + a′j d−1 1≤j≤t (downstairs) (upstairs) respectively, where A = (a1 , . . . , a∗ , a′1 , . . . , a′t ) with ∗ = s (downstairs) and ∗ = s′ (upstairs). Then the following holds for g ∈ R. (1) vΛ′ (g) = d v (g). d−1 L (2) Assuming that g ′ := g/un1 ∈ R′ with vL (g) = n, we have vΛ′ (g ′) = n. Assuming further inL (g) = G(Y ) ∈ k[Y ], we have inΛ′ (g ′) = G(Y ′ ). Proof Let g ∈ R̂ and write g= X CA,B y B uAu v Av A,B b′ we have as in (8.4). Then, in R X  B |A |+|B| Av v , CA,B u′Au y ′ u1 u (8.9) g= A,B where the notation is as in (8.6). Note that b′ /(y ′, u1 , v) ⇐⇒ CA,B = 0 CA,B u′Au = 0 in R 110 because CA,B 6= 0 implies CA,B ∈ R× so that CA,B ∈ (R′ )× . Hence   |B| + |A| CA,B 6= 0 vΛ′ (g) = min |B| + d−1   d d |A| = CA,B 6= 0 = min |B| + vL (g) , d−1 d d−1 which proves (1) of Lemma 8.2. Next assume vL (g) = n and g ′ = g/un1 ∈ R′ . Then vΛ′ (g ′ ) = vΛ′ (g) − vΛ′ (un1 ) = Note that g′ = X A,B |B| + n d vL (g) − = n. d−1 d−1  B |A |+|B|−n Av CA,B u′Au y ′ u1 u v , |A| |A| + |B| − n = n ⇐⇒ |B| + = n. d d−1 Therefore, with (8.9) we see |A| = n and |B| < n d |A| + |B| − n = n and |B| < n ⇐⇒ u′Au CA,B = 0 if |B| + d−1 =⇒ inΛ′ (g ′) ∈ k ′ [Y ′ ]. inL (g) ∈ k[Y ] ⇐⇒ CA,B = 0 if |B| + (Note that the last implication is independent of the choice of a representative Γ′ of k ′ .) Moreover, if these conditions hold, we have X X B inL (g) = C0,B Y B and inΛ′ (g ′) = C0,B Y ′ . B B |B|=vL (g) |B|=vL (g) This completes the proof of Lemma 8.2.  Proof of Theorem 8.1 By (8.1) and Lemma 7.4 we have δ := δ(f, y, (u, v)) > 1. Choose d with 1 < d < δ, and consider the linear forms L on Re (downstairs) and Λ′ on ′ Re (upstairs) on R as in Lemma 8.2. As for the desired positive linear form in Theorem 8.1, we take P P ′ a + aj i (upstairs) (A = ((ai )1≤i≤s′ , (a′j )1≤i≤t ). L′ (A) = d−1 By Lemma 6.6(3) and Proposition 6.11, we have vL (fi ) = vm (fi ) = ni and (8.10) inL (fi ) = inm (fi ) = Fi (Y ), InL (J) = hF1 (Y ), . . . , Fm (Y )i. Clearly L′ ≥ Λ′ , so that by Proposition 6.11 it suffices to show (8.11) inΛ′ (fi′ ) = Fi (Y ′ ) and c Λ′ (J) = hF1 (Y ′ ), . . . , Fm (Y ′ )i. In 111 (Λ′ satisfies the condition vΛ′ (char(k ′ )) > 0 in the proposition since char(k ′ ) = char(k) ∈ mR′ = hu1 , vi). The first part follows from (8.10) and Lemma 8.2 (2) To show the second ′ part, choose any g ′ ∈ J ′ . Take an integer N > 0 such that g := uN 1 g ∈ J. By (8.10), Proposition 6.11 implies that there exist λ1 , . . . , λm ∈ R such that, (8.12) vp (λi fi ) ≥ vp (g) (8.13) vL (λi fi ) ≥ vL (g), vL (g − (8.14) X λi fi ) ≫ N. i where p = (y, u) = (y1 , . . . , yr , u1 , . . . , us ). Here we used the fact that vp = vLp with X Lp (A) = ai (downstairs) (A = ((ai )1≤i≤s , (a′j )1≤i≤t ). 1≤i≤s Let vu1 be the discrete valuation of R′ with respect to the ideal hu1i ⊂ R′ . Because pR′ = hu1 i, (8.12) implies vu1 (λi ) = vp (λi ) ≥ vp (g) − ni = vu1 (g) − ni ≥ N − ni , where ni = vp (fi ) = vm (fi ) (cf. (8.3)). Therefore −ni λ′i := λi /uN ∈ R′ . 1 We calculate vΛ′ (λ′i fi′ ) = vΛ′ (λi fi /uN 1 ) d N = vL (λi fi ) − (by Lemma 8.2(1)) d−1 d−1 N d vL (g) − (by (8.13)) ≥ d−1 d−1 ′ (by Lemma 8.2(1)). = vΛ′ (g/uN 1 ) = vΛ′ (g ) (8.15) (8.14) implies vΛ′ g′ − X 1≤i≤m λ′i fi′ ! g− =vΛ′ X 1≤i≤m ! λi fi /uN 1 X d = vL g − λi fi d−1 1≤i≤m Therefore we may assume (8.16) vΛ′ g′ − X λ′i fi′ i 112 ! > vΛ′ (g ′ ). ! ! − N ≫0. d−1 By Lemma 6.4 (2), (8.15) and (8.16) imply inΛ′ (g ′) = inΛ′ X λ′i fi′ 1≤i≤m ! = X inΛ′ (λ′i )inΛ′ (fi′ ), i where the last sum ranges over all i such that vΛ′ (λ′i fi′ ) = vΛ′ (g ′ ). This proves the second part of (8.11) and the proof of Theorem 8.1 is complete. We keep the assumptions and notations of Setup B and assume that (f1 , . . . , fm ) is a ′ standard base of J. So by Theorem 8.1 f ′ = (f1′ , . . . , fm ) is a (u1 , φ, v)-standard base of ′ ′ J = JR . Then Corollary 7.26 assures that we can form a standard base of J ′ from f ′ by preparation if (u1 , φ, v) is admissible for J ′ . Hence the following result is important. Theorem 8.3 Let k ′ = k(x′ ). If x′ is very near to x (cf. Definition 2.13), there exist linear forms L1 (U1 , V ), . . . , Lr (U1 , V ) ∈ k ′ [U1 , V ] such that IDir(R′ /J ′ ) = hY1′ + L1 (U1 , V ), . . . , Yr′ + Lr (U1 , V )i ⊂ grm′ (R′ ) = k ′ [Y, U1 , Φ, V ]. In particular (u1 , φ, v) is admissible for J ′ . Let K/k ′ be a field extension. Consider the following map ∼ ψ : K[Y ] → K[Y ′ ] ֒→ K[Y ′ , Φ] = grm′ (R′ )K /hU1 , V i, where the first isomorphism maps Yi to Yi′ for i = 1, . . . , r. Recall that IDir(R/J) = hY1 , . . . , Yr i ⊂ grm (R) = k[Y, U, V ], so that (1) IDir(R/J)/K := IDir(R/J)/K ∩ gr1m (R)K ⊂ M K · Yi ⊂ K[Y ]. 1≤i≤r Theorem 8.3 is an immediate consequence of the following more general result. Theorem 8.4 Assume that x′ is near to x. Then we have (1) ψ(IDir(R/J)/K ) ⊂ IDir(R′ /J ′ )/K mod hU1 , V i in grm′ (R′ )K /hU1 , V i. If e(R/J) = e(R/J)K , we have IDir(R′ /J ′ )/K ⊃ hY1′ + L1 (U1 , V ), . . . , Yr′ + Lr (U1 , V )i for some linear forms L1 (U1 , V ), . . . , Lr (U1 , V ) ∈ K[U1 , V ]. For the proof, we need the following. Proposition 8.5 If x′ is near to x, there exist hij ∈ R′ for 1 ≤ j < i ≤ m such that setting i−1 X ′ gi = fi − hij fj′ , j=1 we have the following for i = 1, . . . , m: (8.17) vm′ (gi ) = ni , and inm′ (gi ) ≡ Fi (Y ′ ) mod hU1 , V i in grm′ (R′ ). In particular, (g1 , . . . , gm ) is a standard base of J ′ . 113 Proof First we note that since x′ is near to x, we have ν ∗ (J ′ ) = ν ∗ (J) = (n1 , n2 , . . . , nm , ∞, ∞, . . .) (n1 ≤ n2 ≤ . . . ≤ nm ) (8.18) The last assertion of the proposition follows from (8.17) and (8.18) in view of [H1], Ch. III Lemma 3. Put ′ ′ F̃i,Γ ′ := ω(y ′ ,u1 ,φ,v,Γ′ ) (Fi (Y )) , ω(y′ ,u1 ,φ,v,Γ′ ) : k ′ [[Y ′ , U1 , Φ, V ]] → R̂′ where is the map (6.6) for (y ′, u1 , φ, v) and Γ′ (notations as in Setup B). (8.7) implies (8.19) mod (m′ )ni +1 ′ fi′ ≡ F̃i,Γ ′ + λi with λi ∈ hu1 , vi for i = 1, . . . , m. To prove (8.17), it suffices to show that there are hij ∈ R̂′ for 1 ≤ j < i, ≤ m such that letting gi be as in the proposition, we have (8.20) vm′ (gi ) = ni , and ′ ni +1 ′ ⊂ R̂′ . gi − F̃i,Γ ′ ∈ hu1 , vi + (m ) Indeed (8.17) follows from (8.20) by replacing the hij with elements of R′ sufficiently close to them. (8.19) implies ′ vm′ (fi′ ) ≤ ni = vm′ (F̃i,Γ ′) for i = 1, . . . , m. (8.18) and Corollary 1.4 imply vm′ (f1′ ) = n1 so that one can take g1 = f1′ for (8.20). Let ℓ be the maximal t ∈ {1, . . . , m} for which the following holds. (∗t ) There exist hij ∈ R̂′ for 1 ≤ j < i ≤ t, such that (8.20) holds for i−1 P hij fj′ with i = 1, . . . , t. gi = fi′ − j=1 ′ ) < nℓ+1 since otherwise (8.20) We want to show ℓ = m. Suppose ℓ < m. Then vm′ (fℓ+1 ′ holds for gℓ+1 = fℓ+1 , which contradicts the maximality of ℓ. This implies ′ ) = inm′ (λℓ+1 ) ∈ hU1 , V i ⊂ k ′ [Y ′ , U1 , Φ, V ]. inm′ (fℓ+1 (8.21) By the assumption we have Gi := inm′ (gi ) ≡ Fi (Y ′ ) mod hU1 , V i for i = 1, . . . , ℓ. Since (F1 , . . . , Fm ) ⊂ k[Y ] is normalized (cf. Definition 1.3), (G1 , . . . , Gℓ ) is normalized in grm′ (R′ ). Therefore (8.18) and Corollary 1.4 imply that there exist Hi ∈ grm′ (R′ ) ′ ) − ni for i = 1, . . . , ℓ, such that homogeneous of degree vm′ (fℓ+1 X ′ )= H i Gi . (8.22) inm′ (fℓ+1 1≤i≤ℓ Setting (1) ′ gℓ+1 = fℓ+1 − X H̃i gi with H̃i = ω(y′ ,u1 ,φ,v,Γ′ ) (Hi ), 1≤i≤ℓ we have (8.23) (1) vm′ (gℓ+1 ) ′ ). We claim > vm′ (fℓ+1 (1) gℓ+1 − F̃n′ ℓ+1 ,Γ′ ∈ hu1 , vi + (m′ )nℓ+1 +1 , 114 which completes the proof. Indeed (8.23) implies (1) vm′ (gℓ+1 ) ≤ vm′ (F̃n′ ℓ+1 ,Γ′ ) = nℓ+1 . (1) (1) If vm′ (gℓ+1) = nℓ+1 , (8.20) holds for gℓ+1 , which contradicts the maximality of ℓ. If (1) (1) ′ and find h1 , . . . , hℓ ∈ vm′ (gℓ+1) < nℓ+1 , we apply the same argument to gℓ+1 instead of fℓ+1 ′ R such that setting X (2) (1) gℓ+1 = gℓ+1 − hi gi , we have 1≤i≤ℓ (1) (2) vm′ (gℓ+1 ) < vm′ (gℓ+1 ) ≤ nℓ+1 and (2) gℓ+1 − F̃n′ ℓ+1 ,Γ′ ∈ hu1 , vi + (m′ )nℓ+1 +1 . Repeating the process, we get gℓ+1 for which (8.20) holds, which contradicts the maximality of ℓ. We now show claim (8.23). Noting ′ ni +1 ′ ′ fℓ+1 − F̃n′ ℓ+1 ,Γ′ , gi − F̃i,Γ ′ ∈ hu1 , vi + (m ) it suffices to show X (i = 1, . . . , ℓ), ′ H̃i F̃i,Γ ′ ∈ hu1 , vi. 1≤i≤ℓ For i = 1, . . . , ℓ, write Hi = Hi− + Hi+ , where Hi− ∈ k ′ [Y ′ , Φ] and Hi+ ∈ hU1 , V i and both ′ ) − ni . Similarly we write Gi = Fi (Y ′ ) + G+ are homogeneous of degree vm′ (fℓ+1 i with + Gi ∈ hU1 , V i. Then (8.21) and (8.22) imply X Hi− Fi (Y ′ ) = 0. 1≤i≤ℓ Let H̃i± = ω(y′ ,u1 ,φ,v,Γ′ ) (Hi± ). Noting char(k) ∈ mR′ = hu1 , vi, property (6.7) implies X + + − ′ H̃i− F̃i,Γ ′ , H̃i , H̃i − (H̃i + H̃i ) ∈ hu1 , vi, 1≤i≤ℓ which shows the desired assertion.  Proof of Theorem 8.4 The second assertion follows at once from the first one, and we show the first. By Proposition 8.5 there exist homogeneous G1 , . . . , Gm ∈ grm′ (R′ ) such that (8.24) Gj ≡ Fj′ := Fj (Y ′ ) mod hU1 , V i for all j = 1, . . . , m, ′ Inm′ (J )K = hG1 , . . . , Gm i ⊂ grm′ (R′ )K = K[Y ′ , U1 , Φ, V ]. Let W ′ = IDir(R′ /J ′ )/K ∩ gr1m′ (R′ ), then there exist H1 , . . . , Hn ∈ K[W ′ ] ∩ Inm′ (J ′ )K such that X Gi = hi,j Hj for some homogeneous hi,j ∈ grm′ (R′ ). 1≤j≤n On the other hand, (8.24) implies X Hi = gi,j Gj for some homogeneous gi,j ∈ grm′ (R′ ). 1≤j≤m 115 Regarding everything mod hU1 , V i, we get X X Fi′ = hi,j H j and H i = g i,j Fj′ in K[Y ′ , Φ] = grm′ (R′ )/hU1 , V i. 1≤j≤n 1≤j≤m The second equality implies H i ∈ K[W ′ ] ∩ hF1′ , . . . , Fm′ i ⊂ K[Y ′ , Φ] where W ′ = W ′ mod hU1 , V i, so that the first equality implies  K[W ′ ] ∩ hF1′ , . . . , Fm′ i · K[Y ′ , Φ] = hF1′ , . . . , Fm′ i. L Since W = IDir(R/J)/K ∩ gr1m (R) is the minimal subspace of K · Yi such that (8.25) 1≤i≤r  K[W ] ∩ hF1 (Y ), . . . , Fm (Y )i · K[Y ] = hF1 (Y ), . . . , Fm (Y )i, (8.25) implies ψ(W ) ⊂ W ′ , which is the desired assertion.  We conclude this section with the following useful criteria for the nearness and the very nearness of x′ and x. We keep the assumptions and notations of Setup B. Theorem 8.6 (1) If δ(f ′ , y ′, (u1, φ, v)) ≥ 1, x′ is near to x. The converse holds if ′ (f ′ , y ′, (u1 , φ, v)) is prepared at any vertex lying in {A ∈ Rs +t | |A| ≤ 1}. (2) Assume ex (X) = ex (X)k(x′ ) . If δ(f ′ , y ′, (u1 , φ, v)) > 1, x′ is very near to x. The converse holds under the same assumption as in (1). Proof Write k ′ = k(x′ ). Assume δ(f ′ , y ′, (u1, φ, v)) ≥ 1. By Lemma 7.4 (1) and (8.8), vm′ (fi′ ) = ni and we can write X B Y ′ PB (U1 , Φ, V ), PB (U1 , Φ, V ) ∈ k ′ [U1 , Φ, V ]. inm′ (fi′ ) = F (Y ′ ) + |B|<ni ′ )i ⊂ grm′ (R′ ). We have Put I = hinm′ (f1′ ), . . . , inm′ (fm ν ∗ (J) ≥ ν ∗ (J ′ ) = ν ∗ (Inm′ (J ′ )) ≥ ν ∗ (I), where the first inequality follows from Theorem 2.10 and the last from [H1] Lemma Ch.II Lemma 3. By the assumption (F1 (Y ), . . . , Fm (Y )) is weakly normalized (cf. Definition ′ )) is weakly normalized so that ν ∗ (I) = 1.3), which implies that (inm′ (f1′ ), . . . , inm′ (fm ∗ ∗ ∗ ′ ′ ν (J). Therefore we get ν (J) = ν (J ) and x is near to x. We also get ν ∗ (Inm′ (J ′ )) = ν ∗ (I), which implies Inm′ (J ′ ) = I by loc.cit.. Now assume x′ is near to x. Let g = (g1 , . . . , gm ) be as in Proposition 8.5. By (8.17) we have δ(g, y ′, (u1, φ, v)) ≥ 1. We claim that g is a (u1 , φ, v)-standard basis of J ′ . Indeed f ′ is a (u1 , φ, v)-standard basis of J ′ by Theorem 8.1, so the claim follows from the fact that in0 (f ′ ) = in0 (g) by using Corollary 6.10. By the claim ∆(J ′ , (u1, φ, v)) ⊂ ∆(g, y ′, (u1 , φ, v)) so that there exists no vertex w of ∆(J ′ , (u1 , φ, v)) such that |w| < 1. If ∆(f ′ , y ′, (u1, φ, v)) is prepared at any vertex w with |w| ≤ 1, we obtain δ(f ′ , y ′, (u1 , φ, v)) ≥ 1 from Theorem 7.16. 116 Assume δ(f ′ , y ′, (u1 , φ, v)) > 1. By Lemma 7.4 (1) and (8.8), inm′ (fi′ ) = F (Y ′ ) so that (8.26) inm′ (J ′ ) = I = hF1 (Y ′ ), . . . , Fm (Y ′ )i. By the assumed equality ex (X) = ex (X)k′ , we have IDirk′ (R/J) = hY1, . . . , Yr i (cf. Remark 1.19). Since Inm (J) = hF1 (Y ), . . . , Fm (Y )i, this implies IDir(R′ /J ′ ) = hY1′ , . . . , Yr′ i by (8.26) so that x′ is very near to x. Finally assume x′ very near to x. By Theorem 8.1, f ′ is (u1 , φ, v)-standard basis of J ′ . By Theorem 8.3, (u1 , φ, v) is admissible for J ′ . Thus Corollary 7.17 implies δ(f ′ , y ′, (u1 , φ, v)) > 1. This completes the proof of Theorem 8.6.  Remark 8.7 By the above theorem it is important to compute δ(f ′ , y ′ , (u1, φ, v)) from ∆(f, y, (u, v)). It is also important to see if the well-preparedness of ∆(f, y, (u, v)) implies that of ∆(f ′ , y ′, (u1 , φ, v)). These issues are discussed later in this paper in various situations (e.g., see Lemma 9.3). 117 9 Termination of the fundamental sequences of Bpermissible blowups, and the case ex (X) = 1 In this section we prove the Key Theorem 5.35 in §5, by deducing it from a stronger result, Theorem 9.2 below. Moreover we will give an explicit bound on the length of the fundamental sequence, by the δ-invariant of the polyhedron at the beginning. First we introduce a basic setup. Setup C: Let Z be an excellent regular scheme, let X ⊂ Z be a closed subscheme and take a point x ∈ X. Let R = OZ,x with maximal ideal m and residue field k = R/m = k(x), and write X ×Z Spec(R) = Spec(R/J) with an ideal J ⊂ m. Define the integers n1 ≤ n2 ≤ · · · ≤ nm by νx∗ (X, Z) = ν ∗ (J) = (n1 , . . . , nm , ∞, ∞, . . . ). We also assume given a simple normal crossing boundary B on Z and a history function O : X → {subsets of B} for B on X (Definition 3.6). Note that B may be empty. We introduce some notations. Definition 9.1 (1) A prelabel of (X, Z) at x is (f, y, u) = (f1 . . . , fm , y1 , . . . , yr , u1, . . . , ue ), where (y, u) is a system of regular parameters of R such that (u) is admissible for J (cf. Definition 6.1) and f is a (u)-standard base of J. By Lemma 6.13 we have n(u) (fi ) = ni for i = 1, . . . , N. (2) A prelabel (f, y, u) is a label of (X, Z) at x if δ(f, y, u) > 1. By Corollary 7.17, this means that (y, u) is strictly admissible for J and f is a standard base of J such that (f, y, u) is admissible. By Lemma 6.13 we have vm (fi ) = ni and inm (fi ) = in0 (fi ) for i = 1, . . . , N, hY1 , . . . , Yr i = IDir(R/J) ⊂ grm (R), Inm (J) = hF1 (Y ), . . . , FN (Y )i with Fi (Y ) = in0 (fi ) ∈ k[Y ], where k[Y ] = k[Y1 . . . , Yr ] ⊂ grm (R) with Yi = inm (yi ) ∈ grm (R). (3) A label (f, (y, u)) is well-prepared (resp. totally prepared) if so is (f, y, u) in the sense of Definition 7.15 (resp. Remark 7.25). By Theorem 7.16, for a well-prepared label (f, y, u), we have ∆(J, u) = ∆(f, y, u). For each B ∈ B choose an element lB ∈ R such that B ×Z Spec(R) = Spec(R/hlB i). For a positive linear form L : Re → R let δL (lB , y, u) be as in Definition 7.2 (3). Writing X X bA uA + g (ai , bA ∈ R× ∪ {0}), (9.1) lB = ai yi + 1≤i≤r A∈Ze≥0 118 where g ∈ hy1 , . . . , yr i2 , we have δL (lB , y, u) = min{L(A) | bA 6∈ m}. It is easy to see that δL (lB , y, u) depends only on B and not on the choice of lB . We define δLO (y, u) = min{δL (lB , y, u) | B irreducible component of O(x)}. Theorem 9.2 Assume char(k(x)) = 0 or char(k(x)) ≥ dim(X)/2 + 1, and assume there is a fundamental sequence of length ≥ m starting with (X, BX , O) and x as in (5.23) of Definition 5.34, where m ≥ 1. Let (f, y, u) be a label of (X, Z) at x. In case ex (X) > eO x (X), assume that u = (u1 , . . . , ue ) (e = ex (X)) satisfies the following condition: There exist Bj ∈ O(x) for 2 ≤ j ≤ s := ex (X) − eO x (X) + 1 such that Bj ×Z Spec(R) = Spec(R/huj i) and DirO x (X) = Dirx (X) ∩ ∩ Tx (Bj ). 2≤j≤s Assume further (f, y, u) is prepared along the faces ELq for all q = 0, 1, . . . , m − 1, where Lq : Re → R ; A = (a1 , . . . , ae ) → |A| + q · s X aj . j=2 Then we have (9.2) δLq (f, y, u) ≥ q + 1 and δLOq (y, u) ≥ q + 1 for q = 1, . . . , m − 1. First we show how to deduce Theorem 5.35 from Theorem 9.2. It suffices to show that under the assumption of 5.35, there is no infinite fundamental sequence of BX -permissible blowups over x. Assume the contrary. As in (6.3) write X (9.3) fi = Ci,A,B y B uA with Ci,A,B ∈ R× ∪ {0} . (A,B) Write |A|1 = Ps j=2 aj for A = (a1 , . . . , ae ). By Definition 7.2 (3), we have δLq (f, y, u) > q + 1 ⇔ |A| + q|A|1 ≥ (q + 1)(ni − |B|) if |B| < ni , Ci,A,B 6= 0 |A| − |A|1 ⇔ |B| + |A|1 ≥ ni − if |B| < ni , Ci,A,B 6= 0 . q+1 Hence by (9.2) and the assumption we have the last statement for all q ∈ N, which implies |B| + |A|1 ≥ ni for all A and B such that Ci,A,B 6= 0 in (9.3). Setting q = hy1 , . . . , yr , u2, . . . , us i ∈ Spec(R), this implies J ⊂ q and vq (fi ) = ni = vm (fi ) for all i. By Theorems 2.2 (iv) and 2.3 we conclude HX (ω) = HX (x), where ω ∈ X is the image of q ∈ Spec(R). By a similar argument, the second part of (9.2) implies ω ∈ B for all O O B ∈ O(x) so that HX (ω) = HX (x). This contradicts the assumption of Theorem 5.35 since dim(R/q) = e − s + 1 = eO (X). This completes the proof of Theorem 5.35.  x Now we prepare for the proof of Theorem 9.2. Consider π : Z ′ = Bℓx (Z) → Z and 119 π : X ′ = Bℓx (X) → X. By Theorem 2.14, any point of X ′ near to x is contained in P(Dirx (X)) ⊂ X ′ . We now take a label (f, y, u) of (X, Z) at x as in Definition 9.1 (2). By (6.2) we have the identification determined by (u): ψ(u) : P(Dirx (X)) = Proj(k[T ]) = Pke−1 (9.4) (k[T ] = k[T1 , . . . , Te ]) Let x′ = (1 : 0 : · · · : 0) ∈ P(Dirx (X)). If x′ is near to x, Theorems 2.10 and 2.13 imply νx∗′ (X ′ , Z ′ ) = νx∗ (X, Z) ex′ (X ′ ) ≤ e. and Let R′ = OZ ′ ,x′ with maximal ideal m′ , and let J ′ ⊂ R′ be the ideal defining X ′ ⊂ Z ′ . Note that P(Dirx (X)) ×Z ′ Spec(R′ ) = Spec(R′ /hu1 i), and denote y ′ = (y1′ , . . . , yr′ ), u′ = (u′2, . . . , u′e ), f ′ = (f1′ , . . . , fN′ ) , where yi′ = yi /u1, u′i = ui /u1 , fi′ = fi /un1 i . As is seen in Setup B in §8, (y ′, u1 , u′) is a system of regular parameters of R′ and J ′ = hf1′ , . . . , fN′ i and R′ is the localization of R[y1′ , . . . , yr′ , u′2 , . . . , u′e ] at (y ′, u1 , u′). We will use the usual identifications Yi′ = inm′ (yi′ ), Uj′ = inm′ (u′j ). grm′ (R′ ) = k[Y ′ , U1 , U2′ , . . . , Ue′ ], Moreover we will consider the maps: e e Ψ : R → R ; (a1 , a2 , . . . , ae ) 7→ ( e X ai − 1, a2 , . . . , ae ), i=1 Φ : Re → Re ; (a1 , a2 , . . . , ae ) 7→ ( e X ai , a2 , . . . , ae ). i=1 A semi-positive linear from L : R → R is called monic if L(1, 0, . . . , 0) = 1. e Lemma 9.3 (1) ∆(f ′ , y ′, (u1 , u′)) is the minimal F -subset containing Ψ(∆(f, y, u)). e = L ◦ Φ, we have (2) For any monic semi-positive linear form L : Re → R and L δL (f ′ , y ′, (u1 , u′)) = δL◦Φ (f, y, u) − 1, U1ni · inEL (fi′ )(y′ ,(u1 ,u′ )) = inELe (fi )(y,u) |Y =U 1Y ′ ,U ′ i =U1 Ui (2≤i≤e) , inELe (fi )(y,u) = U1ni · inEL (fi )(y′ ,(u1 ,u′ )) |Y ′ =Y /U1 ,U ′ =Ui /U1 (2≤i≤e) . i ′ ′ ′ If (f, y, u) is prepared along ELe , then (f , y , (u1, u )) is prepared along EL . e0 = L0 ◦ Φ. Then (f ′ , y ′, (u1 , u′)) is (3) Assume (f, y, u) prepared along ELe0 with L δ-prepared and x′ is near (resp. very near) if and only if δLe0 (f, y, u) ≥ 2 (resp. δLe0 (f, y, u) > 2). If (f, y, u) is totally prepared, so is (f ′ , y ′, (u1 , u′)). (4) Assume x′ very near to x. Then (f ′ , y ′, (u1 , u′)) is a prelabel of (X ′ , Z ′) at x′ . Assume further (f, y, u) prepared along ELe0 (resp. totally prepared), then (f ′ , y ′, (u1, u′ )) is a δ-prepared (resp. totally prepared) label of (X ′ , Z ′ ) at x′ . 120 Proof From (9.3) we compute fi′ = fi /un1 i = (9.5) X A |A|+(|B|−ni ) Ci,A,B (y ′)B u′ u1 , (A,B) A a u′ = u′2 2 · · · u′e ae for A = (a1 , a2 , . . . , ae ). (1) follows at once from this. For a semi-positive linear form L : Re → R, we have L(|A| + |B| − ni , a2 , . . . , ae ) | |B| < ni , Ci,A,B 6= 0} ni − |B| L ◦ Φ(A) = min{ − 1 | |B| < ni , Ci,A,B 6= 0} ni − |B| = δL◦Φ (f, y, u) − 1. δL (f ′ , y ′, (u1 , u′)) = min{ From (9.5), we compute inEL (f ′ )(y′ ,(u1 ,u′ )) = Fi (Y ) + X B A |A|+|B|−ni C i,A,B Y ′ U ′ U1 , B,A where the sum ranges over such B, A that |B| < ni and L ◦ Φ(A) = δL◦Φ (ni − |B|). (2) follows easily from this. (3) follows from (2) and Theorem 8.6. The first assertion of (4) follows from Theorem 8.1 and Theorem 8.3. The other assertion of (4) follows from (3) and Corollary 7.17.  We now consider ′ C ′ := P(DirO x (X)) ⊂ P(Dirx (X)) = Proj(k[T1 , . . . , Te ]) ⊆ X . Let η ′ be the generic point of C ′ , and let t := eO x (X) and s = e − t + 1. We assume t ≥ 1 so that 1 ≤ s ≤ e. By making a suitable choice of the coordinate (u) = (u1 , . . . , ue ), we may assume: (9.6) there exists Bj ∈ O(x) for 2 ≤ j ≤ s such that Bj ×Z Spec(R) = Spec(R/huj i) and DirO x (X) = Dirx (X) ∩ ∩ Tx (Bj ). 2≤j≤s Then C ′ ×Z ′ Spec(R′ ) = Spec(R′ /p′ ) with p′ = hy ′, u1, u′2 , . . . , u′s i. Note δk(η′ )/k := trdegk (k(η ′ )) = t − 1. By Theorems 2.13 and 2.6, if η ′ is near x, we have eη′ (X ′ ) ≤ e − δk(η′ )/k = s. It also implies that C ′ ⊂ X ′ is permissible by Theorems 1.33 ′ O and 2.3. By Theorem 3.17, if η ′ is very near x, we have eO η′ (X ) ≤ ex (X) − δk(η′ )/k = 1. Write Rη′ ′ = OZ ′ ,η′ and let m′η′ be its maximal ideal and Jη′ ′ = J ′ Rη′ ′ . Note that Rη′ ′ is the localization of R′ at p′ and (y ′, u1 , u′2 , . . . , u′s ) is a system of regular parameters of Rη′ ′ . Lemma 9.4 Let ∆(f ′ , y ′, (u1, u′2 , . . . , u′s )) be the characteristic polyhedron for Jη′ ′ ⊂ Rη′ ′ . 121 (1) ∆(f ′ , y ′, (u1 , u′2, . . . , u′s )) is the minimal F -subset containing π · Ψ(∆(f, y, u)), where Ψ is as in Lemma 9.3 and π : Re → Rs ; A = (a1 , a2 , . . . , ae ) 7→ (a1 , a2 , . . . , as ). For any monic semi-positive linear form L : Rs → R, we have δL (f ′ , y ′ , (u1, u′2 , . . . , u′s )) = δL◦π◦Φ (f, y, u) − 1. In particular, δ(f ′ , y ′, (u1 , u′2, . . . , u′s )) = δL1 (f, y, u) − 1, X L1 : Re → R ; A 7→ |A| + ai . 2≤i≤s (2) If (f, y, u) is prepared along the face EL1 of ∆(f, y, u), then (f ′, y ′ , (u1, u′2 , . . . , u′s )) is δ-prepared. If (f, y, u) is totally prepared, so is (f ′ , y ′, (u1, u′2 , . . . , u′s )). (3) Assume (f, y, u) is prepared along the face EL1 of ∆(f, y, u). Then η is near x if and only if δL1 (f, y, u) ≥ 2. if this holds, we have vm′η (fi′ ) = vm (fi ) = ni for i = 1, . . . , N. (4) Assume (f, y, u) is prepared along the face EL1 of ∆(f, y, u). Then η is very near x if and only if δL1 (f, y, u) > 2. if this holds, then (f ′ , (y ′, (u1 , u′2, . . . , u′s ))) is a δ-prepared label of (X ′ , Z ′) at η. Proof (1) and (2) follows from Lemma 9.3 and Theorem 7.27 applied to (f ′ , y ′ , (u1, u′ )) and p′ = (u1 , u′2 , . . . , u′s ) and (9.5) in place of (f, y, u) and ps = (u1 , u2 . . . , us ) and (7.5). We need to check the conditions (P 0) and (P 2) as well as Theorem 7.27 (3)(i) and (ii) for the replacement. (P 0) holds since k = R/m ֒→ R′ /hu1i. In view of the presentation (9.5), (P 2) holds by the fact that for fixed B and a ∈ Z, there are only finitely many A ∈ Ze≥0 such that |A| + |B| − ni = a. Theorem 7.27 (3)(i) is a consequence of the assumption that (f, y, u) is a label of (X, Z) at x (cf. Definition 9.1 (2)). Finally Theorem 7.27 (3)(ii) follows from Lemma (9.3)(2). (3) and (4) are consequences of (2) and Theorems 8.6 and 8.1 and 8.3 and Lemma 7.4. This completes the proof of Lemma 9.4.  Proof of Theorem 9.2. Write Z1 = Z ′ , X1 = X ′ , C1 = C ′ and assume π : Z ′ → Z extends to a sequence (5.23). Let (f, y, u) be a label of (X, Z) at x. For 1 ≤ q ≤ m, write Rηq = OZq ,ηq with the maximal ideal mηq , and let Jηq ⊂ Rηq be the ideal defining Xq ⊂ Zq at ηq . Write (q) fi (q) i = fi /uqn 1 , yi (q) = yi /uq1 , ui = ui /uq1 (2 ≤ i ≤ s), u′i = ui /u1 (s + 1 ≤ i ≤ e). Claim 9.5 Let (f, y, u) be a label of (X, Z) at x prepared along the faces ELq for all q = 1, . . . , m − 1. Then, for q = 1, . . . , m, Rηq is the localization of (q) (q) ′ ′ R[y1 , . . . , yr(q) , u2 , . . . , u(q) s , us+1 , . . . , ue ] (q) (q) (q) (q) (q) at hy1 , . . . , yr(q), u1 , u2 , . . . , u(q) s i, (q) and Jηq = hf1 , . . . , fN i, and (f (q) , y (q) , (u1 , u2 , . . . , us )) is δ-prepared and (q) δ(f (q) , y (q) , (u1 , u2 , . . . , u(q) s )) = δLq (f, y, u) − q. (q) (q) For q ≤ m − 1, (f (q) , y (q) , (u1, u2 , . . . , us )) is a δ-prepared label of (Xq , Zq ) at ηq . 122 Proof For q = 1 the claim follows from Lemma 9.4. For q > 1, by induction it follows from loc.cit. applied to Spec(OXq−1 ,ηq−1 ) ← Xq ×Xq−1 Spec(OXq−1 ,ηq−1 ) (q−1) (q−1) and (f (q−1) , y (q−1) , (u1 , u2 , . . . , us )) in place of X ← X1 and (f, y, u) (note that the condition (9.6) is satisfied for Spec(OXq−1 ,ηq−1 ) by Lemma 9.4 (5)).  Recalling now that ηq is near to ηq−1 for 1 ≤ q ≤ m − 1 (η0 = x by convention), we get δLq (f, y, u) − q ≥ 1 for these q by Theorem 8.6 and Claim 9.5. It remains to show δLOq (y, u) ≥ q + 1. For this we rewrite (9.1) in Rηq as follows: X X (q) (q) ′ as PC · uc1 (u2 )a2 · · · (u(q) + u2q ai yi + (9.7) lB = uq1 1 g, s ) C=(c,a2 ,...,as )∈Zs≥0 1≤i≤r (q) 2 (q) where g ′ = g/u2q 1 ∈ hy1 , . . . , yr i and X as+1 a PC = bA · u′ s+1 · · · u′e e , Ω(A)=C for the map Ω : Re → Rs ; A = (a1 , . . . , ae ) → (Lq−1 (A), a2 , . . . , as ). We easily see (q) PC ∈ mηq = hy (q), u1 , u2 , . . . , u(q) s i ⇔ bA ∈ m for all A such that Ω(A) = C , by noting that R → Rηq /mηq factors through R → k = R/m and k[u′s+1 , . . . , u′e ] ֒→ k(ηq ). The strict transform B̃q of B in Spec(Rηq ) is defined by ′ lB = lB /uγ1 with γ = vhu1 i (lB ), where vhu1 i is the valuation of Rηq defined by the ideal hu1 i ⊂ Rηq . From (9.7), we see ′ lB 6∈ mηq ⇔ PC 6∈ mηq and c ≤ q for some C = (c, 0, . . . , 0) ∈ Zs≥0 ⇔ bA 6∈ m and |A| ≤ q for some A = (c′ , 0, . . . , 0) ∈ Zs≥0 . For A ∈ Ze≥0 − {0}, we have X Lq (A) = |A| + aj ≥ q + 1 ⇔ (a2 , . . . , as ) 6= (0, . . . , 0) or |A| ≥ q + 1. 2≤j≤s Hence we get ′ lB 6∈ mηq ⇔ L(A) < q + 1 for some A ∈ Zs≥0 − {0}. ⇔ δLq (lB , y, u) < q + 1. It implies δLOq (y, u) = min{δ(lB , y, u) | B ∈ O(x)} ≥ q + 1 since ηq ∈ B̃q for q ≤ m − 1 by the assumption. This shows the desired assertion and the proof of Theorem 9.2 is complete. Corollary 9.6 Let (f, y, u) be a δ-prepared label of (X, Z) at x. Assume ex (X) = eO x (X) (for example B = ∅), and that the assumptions of Theorem 5.35 hold. Then for the length m of the fundamental unit (Definition 5.34) we have m = xδ(f, y, u)y ( := greatest integer ≤ δ(f, y, u) ) . Proof By Claim 9.5 in case s = 1 and Lq = L0 together with Theorem 8.6 (1) and by the assumption that ηm−1 is near to ηm−2 and ηm is not near to ηm−1 , we have δ(f (m−1) , y (m−1) , u1 ) = δ(f, y, u) − (m − 1) ≥ 1, 123 δ(f (m) , y (m) , u1 ) = δ(f, y, u) − m < 1 . 10 Additional invariants in the case ex(X) = 2 In order to show key Theorem 5.40 in §5, we recall further invariants for singularities, which were defined by Hironaka ([H6]). The definition works for any dimension, as long as the directrix is 2-dimensional. Definition 10.1 For a polyhedron ∆ ⊂ R2≥0 we define α(∆) := inf {v1 | (v1 , v2 ) ∈ ∆} β(∆) := inf {v2 | (α(∆), v2 ) ∈ ∆} δ(∆) := inf {v1 + v2 | (v1 , v2 ) ∈ ∆} + γ (∆) := sup {v2 | (δ(∆) − v2 , v2 ) ∈ ∆} γ − (∆) := inf {v2 | (δ(∆) − v2 , v2 ) ∈ ∆} ǫ(∆) := inf {v2 | (v1 , v2 ) ∈ ∆} ζ(∆) := inf {v1 | (v1 , ǫ(∆)) ∈ ∆} The picture is as follows: a2 δ ∆ = ∆(f, y, u) v β w+ γ+ γ− slope −1 w− ∂∆ ǫ δ − γ− α δ ζ There are three vertices of ∆(f, y, u) which play crucial roles: v := v(∆) :=(α(∆), β(∆)), w := w+ (∆) :=(δ(∆) − γ + (∆), γ + (∆)), w− := w− (∆) :=(δ(∆) − γ − (∆), γ − (∆)). + We have (10.1) β(∆) ≥ γ + (∆) ≥ γ − (∆) . 124 a1 Now let us consider the situation of Setup C in §9 and assume ex (X) = 2. Let (f, y, u) = (f1 , . . . , fN , y1 , . . . , yr , u1 , u2) be a prelabel of (X, Z) at x. Recall n(u) (fi ) = ni for i = 1, . . . , N. Write as (6.3): X fi = Ci,A,B y B uA , with A = (a1 , a2 ), B = (b1 , . . . , br ), Ci,A,B ∈ R× ∪ {0}. A,B For ∗ = α, β, δ, γ ± , v, w± , we write ∗(f, y, u) for ∗(∆(f, y, u)). Then we see   a1 | 1 ≤ i ≤ m, Ci,A,B 6= 0 α(f, y, u) = inf ni − |B|   a2 a1 β(f, y, u) = inf | 1 ≤ i ≤ m, = α(f, y, u), Ci,A,B 6= 0 ni − |B| ni − |B|   |A| δ(f, y, u) = inf | 1 ≤ i ≤ m, Ci,A,B 6= 0 ni − |B|   |A| a2 + | 1 ≤ i ≤ m, = δ, Ci,A,B 6= 0 γ (f, y, u) = sup ni − |B| ni − |B|   a2 |A| − γ (f, y, u) = inf | 1 ≤ i ≤ m, = δ, Ci,A,B 6= 0 ni − |B| ni − |B|   a2 | 1 ≤ i ≤ m, Ci,A,B 6= 0 ǫ(f, y, u) = inf ni − |B| v := v(f, y, u) =(α(f, y, u), β(f, y, u)), w := w+ (f, y, u) =(δ(f, y, u) − γ + (f, y, u), γ +(f, y, u)), w− := w− (f, y, u) =(δ(f, y, u) − γ − (f, y, u), γ −(f, y, u)) . + Definition 10.2 (1) A prelabel (f, y, u) (cf. Definition 9.1) is v-prepared if (f, y, u) is prepared at v(f, y, u). (2) We say that (X, Z) is v-admissible at x if there exists a v-prepared prelabel (f, y, u) of (X, Z) at x. By Theorem 7.24, (X, Z) is v-admissible at x if R = OZ,x is complete. We now extend the above definition to the situation where the old components of B at x are taken into account. We assume (10.2) Spec(R/hui) 6⊂ B for any B ∈ OB(x). Definition 10.3 Let (y, u) be a system of regular parameters of R such that (u) is admissible for J. (1) For each B ∈ O(x), choose lB ∈ R such that B = Spec(R/hlB i) ⊂ Z = Spec(R). (10.2) implies lB 6∈ hui so that ∆(lB , y, u) is well-defined (cf. Definition 7.2). We define ∆O (y, u) = the minimal F -subset containg ∪ ∆(lB , y, u). B∈O(x) It is easy to see that ∆O (y, u) is independent of the choice of lB . For a prelabel (f, y, u) of (X, Z) at x, let ∆O (f, y, u) = the minimal F -subset containg ∆(f, y, u) ∪ ∆O (y, u), 125 ∗O (f, y, u) = ∗(∆O (f, y, u)) for ∗ = v, α, β, γ ± , . . . . Note that (10.3) ∆O (f, y, u) = ∆(f O , y, u) where f O = (f, lB (B ∈ O(x))). (2) Assume that (X, Z) is v-admissible at x. Then we define βxO (X, Z) = β O (J) := min {β O (f, y, u)| (f, y, u) is v-prepared}. (f,y,u) (3) A prelabel (f, y, u) of (X, Z) at x is called O-admissible if (f, y, u) is v-prepared and βxO (X, Z) = β O (f, y, u). Such a prelabel exists if and only if (X, Z) is v-admissible. By Lemma 7.6 and Lemma 6.13 (2), for v-prepared (f, y, u) we have β O (f, y, u) ∈ (10.4) 1 Z≥0 ⊆ R , nN ! Lemma 10.4 (1) Let (f, y, u) be a v-prepared prelable of (X, Z) at x. Then, for a preparation (f, y, u) → (g, z, u) at a vertex v ∈ ∆(f, y, u), we have β O (f, y, u) = β O (g, z, u). (2) Assume that (X, Z) is v-admissible at x. For any integer m ≥ 1, there exists an δprepared and O-admissible label (f, y, u) of (X, Z) at x. Moreover, if R is complete, one can make (f, y, u) totally prepared. Proof (2) is a consequence of (1) in view of Corollary 7.17. We prove (1). Setting vO (y, u) = v(∆O (y, u)) = (αO (y, u), β O (y, u)), we have O O O (10.5) v (f, y, u) = (α (f, y, u), β (f, y, u)) = ( vO (y, u) v(f, y, u) if αO (y, u) ≤ α(f, y, u) if αO (y, u) > α(f, y, u). By the v-preparedness of (f, y, u), any vertex v ∈ ∆(f, y, u) which is not prepared lies in the range {(a1 , a2 ) ∈ R2 | a1 > α(f, y, u)}. Theorem 7.19 implies vO (f, y, u) = vO (g, y, u) for the normalization (f, y, u) → (g, y, u) at such v. Thus it suffices to show vO (f, y, u) = vO (f, z, u) for the dissolution (f, y, u) → (f, z, u) at v. Write v = (a, b). By the above remark, we have a > α(f, y, u). The dissolution is given by a coordinate transformation: y = (y1 , . . . , , yr ) → z = (z1 , . . . , zr ) with zi = yi + λi ua1 ub2 (λi ∈ R) Write α = αO (y, u) for simplicity. For each B ∈ O(x) choose lB ∈ R such that B = Spec(R/hlB i). We may write X cB,i · yi (cB,i , φB ∈ R) lB = ΛB (y) + uα1 φB with ΛB (y) = 1≤i≤r and φB 6= 0 for some B ∈ O(x). Then we get (10.6) lB = ΛB (z) + uα1 φB + ua1 ψB 126 for some ψB ∈ R In case α = αO (y, u) ≤ α(f, y, u), (10.5) implies vO (f, y, u) = vO (y, u) = vO (z, u) = vO (f, z, u), where the second equality follows from (10.6) because a > α(f, y, u) ≥ α, and the third follows from v(f, y, u) = v(f, z, u) by the v-preparedness of (f, y, u). In case α = αO (y, u) > α(f, y, u), (10.5) implies vO (f, y, u) = v(f, y, u) = v(f, z, u) = vO (f, z, u), where the second equality follows from the v-preparedness of (f, y, u). The third equality holds since by (10.6), we have αO (z, u) ≥ a > α(f, y, u) if ψB 6= 0 for some B ∈ O(x), and αO (z, u) = α > α(f, y, u) if ψB = 0 for all B ∈ O(x). This completes the proof of Lemma 10.4.  Lemma 10.5 Let (f, y, u) be a prelabel of (X, Z) at x. Assume that there is no regular O O closed subscheme D ⊆ {ξ ∈ X| HX (ξ) ≥ HX (x)} of dimension 1 with x ∈ D. (In O O particular this holds if x is isolated in {ξ ∈ X| HX (ξ) ≥ HX (x)}.) Then αO (f, y, u) < 1 and ǫO (f, y, u) < 1. Proof By corollary 7.17, we prepare (f, y, u) at the vertices in {A ∈ R2 | |A| ≤ 1} to get a label (g, z, u) of (X, Z) at x. Then αO (g, z, u) ≥ αO (f, y, u) since ∆O (g, z, u) ⊂ ∆O (f, y, u). Thus we may replace (f, y, u) with (g, z, u) to assume that f is a standard base of J. Assume αO (f, y, u) ≥ 1. Then, letting p = (y1 , . . . , yr , u1 ) ⊂ R, we have vp (fj ) ≥ nj for j = 1, . . . , N (cf. (7.2)). Since nj = n(u) (fj ) ≥ vm (fj ) ≥ vp (fj ), this implies vp (fj ) = vm (fj ) for j = 1, . . . , N. This implies by Theorems 2.2 (iv) and 2.3 that η ∈ X and HX (η) = HX (x), where η ∈ Z is the point corresponding to p. By the same arO O gument we prove vp (lB ) = 1 = vm (lB ) for B ∈ O(x) so that HX (η) = HX (x). Thus {η} = Spec(R/p) is O-permissible, which contradicts the assumption of the lemma. The assertion ǫO (f, y, u) < 1 is shown in the same way.  Lemma 10.6 Let (y, u) be a system of regular parameters of R which is strictly admissible for J. Assume  (∗) eO ∩ Tx (B) = 2. x (X) = dimk Dirx (X) ∩ B∈O(x) Then we have δ O (y, u) > 1. Assume in addition that δ(f, y, u) > 1 (so that (f, y, u) is a label). Then we have δ O (f, y, u) > 1. Proof By the assumption on (y, u), we have IDirx (X) = hinm (y1 ), . . . , inm (yr )i. Hence (∗) implies lB ∈ hy1 , . . . , yr i + m2 for B ∈ O(x). We then easily deduce the first assertion of the lemma. The second assertion is an obvious consequence of the first.  127 11 Proof in the case ex(X) = ex(X) = 2, I: some key lemmas In this section we prepare some key lemmas for the proof of Theorem 5.40. Let the assumption be those of Setup C in §9. We assume • char(k(x)) = 0 or char(k(x)) ≥ dim(X)/2 + 1. • eO x (X) = ex (X) = ex (X) = 2. We fix a label (f, y, u) of (X, Z) at x and adopt the notations of Definition 9.1 (1) and (2). We recall Fi (Y ) = inm (fi ) ∈ k[Y ] = k[Y1 , . . . , Yr ] ⊂ grm (R). (Yj = inm (yj )) By Lemma 10.6, the assumption eO x (X) = ex (X) = 2 implies: δ O (f, y, u) > 1. (11.1) It also implies that (10.2) is always satisfied so that ∆O (f, y, u) is well-defined. For each B ∈ O(x), we choose lB ∈ R such that B ×Z Spec(R) = Spec(R/hlB i). We study two cases. Case 1 (point blowup): Consider π : Z ′ = Bℓx (Z) → Z π : X ′ = Bℓx (X) → X. and Note that x ֒→ X is B-permissible for trivial reasons. Let (B′ , O ′) be the complete transform of (B, O) in Z ′ (cf. Definition 3.15). In this case we have B′ = B̃ ∪ {π −1 (x)}, where B̃ = {B̃| B ∈ B} with B̃, the strict transform of B in Z ′ . By Theorem 2.14, any point of X ′ near to x is contained in C ′ := P(Dirx (X)) ⊂ P(Tx (Z)) = πZ−1 (x) ⊂ Z ′ . Let T1 , T2 be a pair of new variables over k and let (11.2) ∼ ψ(u) : C ′ = P(Dir(R/J)) → Proj(k[T1 , T2 ]) = P1k be the isomorphism (6.2) which is determined by (u). Take a closed point x′ ∈ C ′ near to x. By Theorems 2.10 and 2.13, we have νx∗′ (X ′ , Z ′ ) = νx∗ (X, Z) and ex′ (X ′ ) ≤ 2. Put R′ = OZ ′ ,x′ with the maximal ideal m′ . Let J ′ and p′ be the ideals of R′ such that (11.3) X ′ ×Z ′ Spec(R′ ) = Spec(R′ /J ′ ) and C ′ ×Z ′ Spec(R′ ) = Spec(R′ /p′ ). Lemma 11.1 Assume ψ(u) (x′ ) = (1 : 0) ∈ Proj(k[T1 , T2 ]). Let y ′ = (y1′ , . . . , yr′ ) with yi′ = yi /u1 , u′2 = u2 /u1, f ′ = (f1′ , . . . , fN′ ) with fi′ = fi /un1 i . 128 (1) (y ′, u1 , u′2 ) is a system of regular parameters of R′ such that p′ = (y ′, u1 ), and J ′ = hf1′ , . . . , fN′ i. (2) If x′ is very near to x, then (f ′ , y ′, (u1, u′2 )) is a prelabel of (X ′ , Z ′ ) at x′ . (3) ∆(f ′ , y ′, (u1 , u′2)) is the minimal F -subset containg Ψ(∆(f, y, u)), where Ψ : R2 → R2 , (a1 , a2 ) 7→ (a1 + a2 − 1, a2 ) ∆ (f,y,u) β ∆ (f’,y’,u1 ,u’ 2) γ+ − γ α δ −1 for which all vertices move horizontally. We have β(f ′ , y ′, (u1, u′2 )) = γ − (f, y, u) ≤ β(f, y, u). α(f ′ , y ′, (u1 , u′2)) = δ(f, y, u) − 1. (4) If (f, y, u) is prepared at w− (f, y, u), then (f ′ , y ′, (u1 , u′2 )) is v-prepared. If (f, y, u) is prepared along the face EL , then (f ′, y ′ , (u1, u′2 )) is δ-prepared, where L : R2 → R ; (a1 , a2 ) → a1 + 2a2 . If (f, y, u) is totally prepared, so is (f ′ , y ′, (u1 , u′2 )). ′ (5) Assume that x′ is B-near to x. Putting lB = lB /u1 ∈ R′ for B ∈ O(x), we have O ∆O (f ′ , y ′ , (u1, u′2 )) = ∆(f ′ , y, (u1, u′2 )) O ′ with f ′ = (f ′ , lB (B ∈ O(x))). The same assertions as (3) hold replacing ∆ by ∆O and ∗ by ∗OB for ∗ = α, β, γ − , δ. Proof By Definition 9.1, (y, u) is strictly admissible for J and f is a standard base of J which is admissible for (y, u). Hence (1) has been seen in Setup B in §8. (2) follows from Theorem 8.1 and Theorem 8.3. (3) and (4) follow from Lemma 9.3. As for (5), the assumption implies O ′ (x′ ) = {B ′ | B ∈ O(x)} with B ′ , the strict transform of B in Z ′ and we have ′ i) ⊂ Spec(R′ ). B ′ ×Z ′ Spec(R′ ) = Spec(R′ /hlB This implies the first assertion of (5) by (10.3). The second assertion of (5) then follows from the first.  129 The following lemma is shown in the same way as the previous lemma except that the last assertion of (5) follows from Lemma 10.5. Lemma 11.2 Assume ψ(u) (x′ ) = (0 : 1) ∈ Proj(k[T1 , T2 ]) and put ′ z ′ = (z1′ , . . . , zr′ ) with zi′ = yi /u2 , u′1 = u1 /u2 , g ′ = (g1′ , . . . , gN ) with fi′ = fi /un2 i . (1) (z ′ , u′1 , u2) is a system of regular parameters of R′ such that p = (z ′ , u2 ), and J ′ = ′ hg1′ , . . . , gN i. (2) If x′ is very near to x, then (g ′, z ′ , (u′1 , u2)) is a prelabel of (X ′ , Z ′ ) at x′ . (3) ∆(g ′ , z ′ , (u′1 , u2 )) is the minimal F -subset containg Ψ(∆(f, y, u)), where Ψ : R2 → R2 , (a1 , a2 ) 7→ (a1 , a1 + a2 − 1) We have α(g ′, z ′ , (u′1 , u2 )) = α(f, y, u). β(g ′, z ′ , (u′1 , u2 )) ≤ β(f, y, u) + α(f, y, u) − 1. (4) If (f, y, u) is prepared at w+ (f, y, u), then (g ′, z ′ , (u′1 , u2)) is v-prepared. If (f, y, u) is prepared along the face EL′ , then (f ′ , y ′, (u1 , u′2)) is δ-prepared, where L′ : R2 → R ; (a1 , a2 ) → 2a1 + a2 . If (f, y, u) is totally prepared, so is (g ′ , z ′ , (u′1, u2 )). (5) Assume that x′ is B-near to x. Then β O (g ′ , z ′ , (u′1, u2 )) ≤ β O (f, y, u) + αO (f, y, u) − 1. O O If there is no regular closed subscheme D ⊆ {ξ ∈ X| HX (ξ) ≥ HX (x)} of dimension O 1 with x ∈ D, then α (f, y, u) < 1 so that β O (g ′ , z ′ , (u1 , u′2 )) < β O (f, y, u). Now let η ′ be the generic point of C ′ . By Theorem 2.13 and Theorem 2.6, if η ′ is near to x, we have eη′ (X ′ ) ≤ 1. Write Rη′ ′ = OX ′ ,η′ with the maximal ideal m′η′ . Note (y ′, u1 ) = (y1′ , . . . , yr′ , u1 ) is a system of regular parameters of Rη′ ′ . Lemma 11.3 Let ∆(f ′ , y ′, u1) be the characteristic polyhedron for (Rη′ ′ , JRη′ ′ ). (1) ∆(f ′ , y ′, u1 ) = [δ(f, y, u) − 1, ∞) ⊂ R≥0 . Assume (f, y, u) is δ-prepared. (2) ∆(f ′ , y ′, u1 ) is well prepared. (3) η ′ is near to x if and only if δ(f, y, u) ≥ 2. If η ′ is near to x, we have vm′η′ (fi′ ) = vm (fi ) = ni 130 for i = 1, . . . , N. (4) η ′ is very near to x if and only if δ(f, y, u) > 2. If η ′ is very near to x, then (f ′ , (y ′, u1 )) is a well-prepared label of (X ′ , Z ′ ) at η ′ . Proof The lemma is a special case of Lemma 9.4.  Case 2 (curve blowup): Let the assumption be as in the beginning of this section. Assume given a regular curve C ⊂ X containing x which is B-permissible (cf. Definition 3.5) and such that C ×Z Spec(R) = Spec(R/p) with p = (y, u1) = (y1 , . . . , yr , u1 ). By Theorem 2.6, the assumption ex (X) = 2 implies eη (X) ≤ 1 where η is the generic point of C. Consider π : Z ′ = BℓC (Z) → Z π : X ′ = BℓC (X) → X. and Let (B′ , O ′) be the complete transform of (B, OI) in Z ′ (cf. Definition 3.15). In this case we have B′ = B̃ ∪ {π −1 (C)}, where B̃ = {B̃| B ∈ B} with B̃, the strict transform of B in Z ′ . By Theorem 2.14, there is the unique point x′ ∈ π −1 (x) possibly near to x, given by x′ := P(Dirx (X)/Tx (C)) ⊂ Proj(Tx (Z)/Tx (C))) = πZ−1 (x) ⊂ Z ′ . In what follows we assume x′ near to x. By Theorems 2.10 and 2.13, we have νx∗′ (X ′ , Z ′ ) = νx∗ (X, Z) and ex′ (X ′ ) ≤ 2. Let R′ = OZ ′ ,x′ with the maximal ideal m′ , and let J ′ ⊂ R′ be the ideal such that X ′ ×Z ′ Spec(R′ ) = Spec(R′ /J ′ ). As is seen in Setup B in §8, (y ′, u) = (y1′ , . . . , yr′ , u1, u2 ) = (y1 /u1 , . . . , yr /u1, u1 , u2 ) is a system of regular parameters of R′ . Lemma 11.4 (1) If (f, y, u) is v-prepared, then vp (fi ) = vm (fi ) = n(u) (fi ) and J ′ = hf1′ , . . . , fN′ i with fi′ := fi /un1 i ∈ R′ . (2) If x′ is very near to x, then (f ′ , y ′, u) is a prelabel of (X ′ , Z ′ ) at x′ . (3) If (f, y, u) is v-prepared (resp. δ-prepared, resp. totally prepared), so is (f ′ , y ′, u). (4) We have ∆(f ′ , y ′, u) = Ψ(∆(f, y, u)) β(f ′ , y ′, u) = β(f, y, u) with Ψ : R2 → R2 , (a1 , a2 ) 7→ (a1 − 1, a2 ), and α(f ′, y ′, u) = α(f, y, u) − 1. If x′ is B-near to x, the same assertions hold replacing ∆ by ∆O and ∗ by ∗OB for ∗ = α, β. 131 Proof The first assertion of (1) follows from Theorem 7.18 and the second from the first (cf. Setup B in §8). (2) follows from Theorems 8.1 and 8.3. To show (3) and (4), write, as in (6.3): X (11.4) fi = Ci,A,B y B uA with Ci,A,B ∈ R× ∪ {0} (A,B) We compute (11.5) fi′ = fi /un1 i = X a +(|B|−ni ) Ci,A,B (y ′)B u2 a2 u11 with A = (a1 , a2 ). (A,B) This immediately implies the first assertion of (4). Then (3) is shown in the same way as Lemma 9.3 (2). Finally the last assertion of (4) is shown in the same way as Lemma 11.1 (5). This completes the proof of Lemma 11.4.  Lemma 11.5 Assume that (f, (y, u1)) is a well-prepared label of (X, Z) at η (note that this implies eη (X) = 1). Let C ′ = Spec(R′ /p′) with p′ = (y ′, u1 ) ⊂ R′ and let η ′ be the generic point of C ′ . Then C ′ ⊂ X ′ and η ′ is the unique point of X ′ possibly near to η. If η ′ is very near to η, then (f ′ , (y ′, u1 )) is a well-prepared label of (X ′ , Z ′ ) at η ′ . Proof The first assertion is a direct consequence of Theorem 2.14. The second assertion follows from Lemma 9.3 applied to the base change via η → C of the diagram C ′ ֒→ X ′ ֒→ Z ′ ↓ ↓π ↓π C ֒→ X ֒→ Z  132 12 Proof in the case ex (X) = ex(X) = 2, II: separable residue extensions In this section we prove Theorem 12.7 below, which implies Key Theorem 5.40 under the assumption that the residue fields of the initial points of Xn are separably algebraic over that of X1 . The proof is divided into two steps. Step 1 (one fundamental unit): Let the assumptions and notations be as in the beginning of the previous section. Assume given a fundamental unit of B-permissible blowups as in Definition 5.34: B= B0 B1 π (12.1) B2 Bm−1 π Bm π 1 2 m Z = Z0 ←− Z1 ←− Z2 ← . . . ← Zm−1 ←− Zm ∪ ∪ ∪ ∪ ∪ π1 π2 πm X = X0 ←− X1 ←− X2 ← . . . ← Xm−1 ←− Xm ↑ ∪ ∪ ∪ ↑ ∼ ∼ ∼ x = x0 ← C1 ← C2 ← . . . ← Cm−1 ← xm We denoted it by (X , B). For 2 ≤ q ≤ m − 1, let ηq be the generic point of Cq and let xq ∈ Cq be the image of xm . By definition the following conditions hold: • For 1 ≤ q ≤ m, xq is near to xq−1 and k(xq−1 ) ≃ k(xq ). O O • For 1 ≤ q ≤ m − 1, Cq = {ξ ∈ φ−1 q (x)| HXq (ξ) = HX (x)} with φq : Xq → X. O O (xq ) = HX (x) and eO • For 1 ≤ q ≤ m, HX xq (Xq ) = exq (Xq ) = 2. q O O (ηq ) = HX (x). • For 1 ≤ q ≤ m − 1, HX q • For 1 ≤ q ≤ m − 2, eO ηq (Xq ) = eηq (Xq ) = 1. Let Rq = OZq ,xq with the maximal ideal mq , and let Jq and pq be the ideals of Rq such that (12.2) Xq ×Zq Spec(Rq ) = Spec(Rq /Jq ) and Cq ×Zq Spec(Rq ) = Spec(Rq /pq ). Let Rpq be the localization of Rq at pq and Jpq = Jq Rpq . Let T1 , T2 be a pair of new variables over k and consider the isomorphism (11.2): (12.3) ∼ ψ(u) : C1 = P(Dirx (X)) → Proj(k[T1 , T2 ]) = P1k Definition 12.1 (1) A prelabel (resp. label) Λ of (X , B) is a prelabel (resp. label) Λ = (f, y, u) of (X, Z) at x. When x1 is a k-rational point of C1 , the homogeneous coordinates of ψ(u) (x1 ) ∈ Proj(k[T1 , T2 ]) are called the coordinates of (X , Λ). (2) We say that (X , B) is v-admissible if (X, Z) is v-admissible in the sense of Definition 10.2 (2). A prelabel (f, y, u) of (X , B) is O-admissible if it is O-admissible as a prelabel of (X, Z) at x (cf. Definition 10.3 (3)). We remark that the coordinates of (X , B; Λ) depend only on (u), not on (f, y). 133 Lemma 12.2 Let Λ = (f, y, u) be a label of (X , B) which is v-prepared and δ-prepared and prepared along the face EL , where L : R2 → R ; (a1 , a2 ) → a1 + 2a2 . Assume the coordinates of (X , B; Λ) are (1 : 0). Let (q) (q) (q) (q) u′2 = u2 /u1 , y (q) = (y1 , . . . , yr(q) ) (yi = yi /uq1), f (q) = (f1 , . . . , fp(q) ) (fi i = fi /uqn 1 ). For 1 ≤ q ≤ m, the following holds: (1) (f (q) , (y (q) , (u1 , u′2))) is a v-prepared and δ-prepared label of (Xq , Zq ) at xq . (2) ∆O (f (q) , y (q) , (u1 , u′2)) is the minimal F -subset containg Ψq (∆O (f, y, u)), where Ψ q : R2 → R2 , (a1 , a2 ) 7→ (a1 + a2 − q, a2 ) We have β O (f (q) , y (q) , (u1, u′2 )) = γ −O (f, y, u) ≤ β O (f, y, u). αO (f (q) , y (q) , (u1, u′2 )) = δ O (f, y, u) − q. (q) (q) (q) (3) For q ≤ m − 1, pq = (y (q) , u1) = (y1 , . . . , yr , u1) and vpq (fi ) = ni for i = 1, . . . , N. For q ≤ m − 2, (f (q) , y (q) , u1 ) is a well prepared label of (Xq , Zq ) at ηq . Proof By Lemma 11.1, (f (1) , (y (1) , (u1 , u′2 ))) is a label of (X1 , Z1 ) at x1 which is vprepared and δ-prepared. By Lemma 11.3, (f (1) , (y (1) , (u1 , u′2))) is a well prepared label of (X1 , Z1 ) at η1 if η1 is very near to x1 . Then the lemma follows from Lemmas 11.4 and 11.5, applied to Xq ← Xq+1 in place of X ← X ′ .  Definition 12.3 Call x or (X , B) quasi-isolated if there is no regular closed subscheme O O D ⊆ {ξ ∈ X| HX (ξ) ≥ HX (x)} of dimension 1 with x ∈ D. O O We note that this holds in particular if x is isolated in {ξ ∈ X| HX (ξ) ≥ HX (x)}, and especially if x lies in the O-Hilbert-Samuel locus and is isolated in it. Lemma 12.4 Let Λ = (f, (y, u)) be a label of (X , B) which is v-prepared and δ-prepared and prepared along the face EL′ , where L′ : R2 → R ; (a1 , a2 ) → 2a1 + a2 . Assume the coordinates of (X , B; Λ) are (0 : 1). Set (q) (q) u′1 = u1 /u2, z (q) = (z1 , . . . , zr(q) ) (zi (q) (q) (q) = yi /uq2 ), g (q) = (g1 , . . . , gN ) (gi i = fi /uqn 2 ). For 1 ≤ q ≤ m, the following hold: (1) (g (q) , (z (q) , (u′1 , u2 ))) is a v-prepared and δ-prepared label of (Xq , Zq ) at xq . (2) ∆O (g (q) , z (q) , (u′1 , u2 )) is the minimal F -subset containg Φq (∆O (f, y, u)), where Φq : R2 → R2 , (a1 , a2 ) 7→ (a1 , a1 + a2 − q) and we have αO (g (q) , z (q) , (u′1 , u2)) = αO (f, y, u), β O (g (q) , z (q) , (u′1 , u2)) ≤ β O (f, y, u) + αO (f, y, u) − q. 134 (3) If x is quasi-isolated, then αO (f, y, u) < 1 so that β O (g (q) , z (q) , (u′1 , u2)) < β O (f, y, u). Proof This is shown in the same way as Lemma 12.2 using Lemma 11.2 instead of 11.1.  Proposition 12.5 Assume that (X , B) is v-admissible and quasi-isolated, and that k(x) = k(x1 ). Then, for all q = 1, . . . , m, (Xq , Zq ) is v-admissible at xq and βxOq (Xq , Zq ) ≤ βxO (X, Z). Proof By the assumption we can take an O-admissible prelabel Λ = (f, y, u) of (X, Z), and the coordinates of (X , Λ) are either (1 : 0), or (0 : 1), or (1 : λ) for some λ ∈ k. Assume we are in the first case. By Lemma 10.4, after preparation we may assume that (f, y, u) is prepared along the δ-face and the face EL in Lemma 12.2. By Lemmas 12.2 and 12.4, applied to Xq ← Xq+1 for q = 1, . . . , m in place of X ← X ′ , we get a label Λq := (f (q) , (y (q) , (u1, u′2 ))) of (Xq , Zq ) at xq which is v-prepared and δ-prepared and deduce βxOq (Xq , Zq ) ≤ β O (f (q) , y (q) , (u1, u′2 )) = β O (f (1) , y (1) , (u1 , u′2 )) = γ −O (f, y, u) ≤ β O (f, y, u) = βxO (X, Z). where the first inequality comes from v-preparedness of Λq . The case that the coordinates of (X , Λ) are (0 : 1) is shown in the same way by using Lemma 12.4 instead of Lemma 12.2. Now assume that the coordinates of (X , Λ) are (1 : λ). Let ũ2 := u2 − φu1 for some φ ∈ R = OZ,x such that φ mod m = λ. Then (f, y, (u1, ũ2 )) is a prelabel of (X, Z) at x and ψ(u1 ,ũ2 ) (x1 ) = (1 : 0) ∈ Proj(k[T1 , T2 ]) so that the coordinate of (f, y, (u1, ũ2)) is (1 : 0). Hence the proof is reduced to the first case in view of the following lemma. Lemma 12.6 Let ũ2 = u2 − φu1 for φ ∈ R = OZ,x . Then v(f, y, u) = v(f, y, (u1, ũ2 )). For v = v(f, y, u) we have inv (f )(y,(u1 ,ũ2 )) = inv (f )(y,u) |U2 =Ũ2 ∈ k[Y, U1 , Ũ2 ] = grm (R), where Ũ2 = inm (ũ2 ) ∈ grm (R). Hence, if (f, y, u) is v-prepared, then so is (f, y, (u1, ũ2)). We also have vO (f, y, u) = vO (f, y, (u1, ũ2 )) and hence if (f, y, u) is O-admissible, then so is (f, y, (u1, ũ2)). . Proof We compute ua11 ua22 = ua11 (ũ2 + u1 φ)a2 a2  m a2 −m m P a2 φ = ua11 u1 ũ2 m m=0 a2  a1 +m a2 −m m P a2 = ua11 ũa22 + u1 ũ2 φ . m m=1 135 This implies that the vertices on the line {(a1 , a2 )| a1 = α(f, y, u)} together with the initial forms at it, are not affected by the transformation (f, y, u) → (f, y, (u1, ũ2)). Thus the first assertion follows. The last assertion is shown by the same argument applied to f O instead of f (cf. (10.3)) .  Step 2 (a chain of fundamental units): In this step we consider the following situation: Assume given a chain of fundamental units of B-permissible blowups (cf. Definition 5.39): (X0 , B0 ) ← (X1 , B1 ) ← (X2 , B2 ) ← . . . (12.4) where each (Xq , Bq ) is as (12.1). For q ≥ 0, let (x(q) , X (q) , Z (q) , B(q) ) be the initial part of (Xq , Bq ) and mq be the length of Xq . Let Rq = OZ (q) ,x(q) with the maximal ideal mq and X (q) ×Z (q) Spec(Rq ) = Spec(Rq /Jq ) for an ideal Jq ⊂ Rq . Theorem 12.7 Assume that for all q ≥ 0, k(x(q) ) is separably algebraic over k(x(0) ) and xq is quasi-isolated (see Definition 12.3). Then the sequence (12.4) stops after finitely many steps. Proof By Lemmas 1.27 and 1.37, it suffices to show the claim after replacing each Xq by its base changes via Spec(R̂ur ) → Z (0) , where R̂ur is the maximal unramified extension of the completion of R = R0 (here we use that Z is excellent). Thus we may assume that k(x(q) ) = k(x) and that R0 is complete and hence that (X0 , B0 ) is vadmissible. Proposition 12.5 implies that for all q ≥ 0, (Xq , Bq ) is v-admissible so that βq := βxO(q) (X (q) , Z (q) ) is well-defined and βq+1 ≤ βq (12.5) for all q ≥ 0. Note βq ∈ 1/nN ! · Z2 ⊂ R2 , where ν ∗ (J0 ) = ν ∗ (Jq ) = (n1 , . . . , nN , ∞, . . . ) (cf. Lemma 7.6, Lemma 6.13 and Theorem 2.10 (3)). Hence the strict inequality may occur in (12.5) only for finitely many q. Hence we may assume βq = β0 for all q ≥ 0. In what follows, for a prelabel (g, (z, u)) of X0 with g = (g1 , . . . , gN ) and z = (z1 , . . . , zr )) and for q ≥ 0, we write  n (m +···+mq ) gi /u1 i 1 , q ≥ 1, (q) (q) (q) (q) g = (g1 , . . . , gN ) with gi = gi , q = 0. z (q) = (q) (z1 , . . . , zr(q) ) with (q) zi =  m +···+mq−1 zi /u1 0 zi , q ≥ 1, , q = 0. By the completeness of R0 , we can choose a totally prepared and O-admissible label Λ0 = (f, y, u)) of (X0 , B0 ). By the assumption (a), β0 = β1 implies by Lemma 12.4 (2) that the coordinate of (X0 , Λ0 ) must be (1 : −λ0 ) for some λ0 ∈ k. Put v1 = u2 + φ0 u1 for a lift φ0 ∈ R of λ0 and prepare (f, y, (u1, v1 )) to get a totally prepared label Λ′0 = (g, z, (u1, v1 )) of (X0 , B0 ). By Lemma 12.6, Λ′0 is O-admissible and the coordinate of (X0 , Λ′0 ) is (1 : 0). Lemma 12.2 (1) implies that Λ1 = (g (1) , z (1) , (u1 , v1 /u1 )) is a totally prepared label of X1 . By the assumption (a), β0 = β1 = β2 implies by Lemma 12.4 (2) that the coordinate of (X1 , Λ1 ) is (1 : −λ1 ) for some λ1 ∈ k. Put v2 = v1 + φ1 u21 = 136 u2 + φ0 u1 + φ1 u21 for a lift φ1 ∈ R of λ1 . Prepare (f, y, (u1, v2 )) to get a totally prepared label Λ′′0 = (h, w, (u1, v2 )) of (X0 , Λ′0). Then Λ′′0 is O-admissible by Lemma 12.6 and Λ′1 = (h(1) , (w (1) , (u1, v2 /u1))) is a totally prepared label of X1 by Lemma 12.2 (1). Moreover, the coordinate of (X0 , Λ′′0 ) and that of (X1 , Λ′1 ) are both (1 : 0). Lemma 12.2 (1) then implies that Λ2 = (h(2) , w (2) , (u1, v2 /u21)) is a totally prepared label of X2 . The same argument repeats itself to imply the following: Claim 12.8 Assume that the sequence (12.4) proceeds in infinitely many steps and that βq = β0 for all q ≥ 0. Then there exists a sequence φ0 , φ1 , φ2, . . . of elements in R for which the following holds: Recalling that R is complete, set  v = lim u2 + φ0 u1 + φ1 u21 + . . . + φq−1 uq1 ∈ R . q→∞ Prepare (f, y, (u1, v))) to get a totally prepared label (fˆ, ŷ, (u1 , v)) of (X0 , B0 ). Then (fˆ, ŷ, (u1 , v)) is O-admissible and Λ̂q = (fˆ(q) , ŷ (q) , (u1 , v (q) )) is a totally prepared label of (Xq , Bq ) and the coordinate of (Xq , Λ̂q ) is (1 : 0) for all q ≥ 0. Here v (q) = v/uq1 . We now write (f, y, (u1, u2)) for (fˆ, ŷ, (u1 , v)). Lemma 12.2 implies that for all q ≥ 0, (q) (q) (f (q) , y (q), (u1 , u2 )) is a totally prepared label of (Xq , Bq ). Moreover ∆O (f (q) , y (q), (u1 , u2 )) is the minimal F -subset of R2 containing (q−1)) Tq (∆O (f (q−1) , y (q−1) , (u1, u2 ))), Tq : R2 → R2 ; (a1 , a2 ) → (a1 + a2 − mq−1 , a2 ), (q) where mq−1 is the length of Xq−1 . This implies that ǫO (f (q) , y (q) , (u1, u2 )) = ǫO (f, y, u) =: ǫO for all q ≥ 0 (see Definition 10.1), and that (q) (q−1) )) + ǫO − mq−1 (q−1) )) , ζ O (f (q) , y (q) , (u1, u2 )) = ζ O (f (q−1) , y (q−1) , (u1, u2 < ζ O (f (q−1) , y (q−1) , (u1, u2 for all q ≥ 1, because mq−1 ≥ 1, and ǫO < 1 by Lemma 10.5 and the assumption (a) of Theorem 12.7. This implies that the sequence must stop after finitely many steps as claimed. 137 13 Proof in the case ex(X) = ex (X) = 2, III: inseparable residue extensions In this section we complete the proof of key Theorem 5.40 (see Theorem 13.4 below). Let the assumptions and notations be as in the beginning of Case 1 of §11. Let Φ(T1 , T2 ) ∈ k[T1 , T2 ] be an irreducible homogeneous polynomial corresponding to x′ ∈ C = Proj(k[T1 , T2 ]) (cf. (11.2)). We set Φ = Φ(U1 , U2 ) ∈ k[U1 , U2 ] ⊂ k[Y, U1 , U2 ] = grm (R). We assume x′ 6= (0 : 1) so that U1 does not divide Φ. Let d = deg Φ = [k(x′ ) : k(x)]. Choosing a lift Φ̃(U1 , U2 ) ∈ R[U1 , U2 ] of Φ ∈ k[U1 , U2 ], set φ = Φ̃(u1 , u2 ) ∈ R and φ′ = φ/udegΦ ∈ R′ . 1 The following two lemmas are shown in the same way as Lemma 11.1 (1), (2) and (5). Lemma 13.1 Let y ′ = (y1′ , . . . , yr′ ) with yi′ = yi /u1, f ′ = (f1′ , . . . , fN′ ) with fi′ = fi /un1 i . (1) (y ′, (u1 , φ′ )) is a system of regular parameters of R′ such that p = (y ′, u1 ) (cf. (11.3)), and J ′ = hf1′ , . . . , fN′ i. (2) If x′ is very near to x, then (f ′ , y ′, (u1, φ′ )) is a prelabel of (X ′ , Z ′ ) at x′ . ′ Lemma 13.2 Assume x′ is O-near to x. Setting lB = lB /u1 ∈ R′ for B ∈ O(x), we have O ∆O (f ′ , y ′ , (u1, φ′ )) = ∆(f ′ , y, (u1, φ′ )) O ′ with f ′ = (f ′ , lB (B ∈ O(x))). Now we state the main result of this section. Proposition 13.3 Let δ = δ(f, y, u). Assume the following conditions: O (a) d ≥ 2 and there is no regular closed subscheme D ⊆ Xmax of dimension 1 with x ∈ D, (b) (f, y, u) is v-prepared and prepared at w+ (f, y, u), (c) inδ (f )(y,u) is normalized. Then there exists a part of a system of regular parameters z ′ = (z1′ , . . . , zr′ ) ⊂ m′ such that the following holds: (1) (f ′ , z ′ , (u1, φ′ )) is a v-prepared prelabel of (X ′ , Z ′ ) at x′ , (2) β O (f ′ , z ′ , (u1, φ′ )) < β O (f, y, u), α(f ′ , z ′ , (u1, φ′ )) = α(f ′ , y ′, (u1 , φ′)) = δ − 1, 138 (3) z ′ = y ′ unless δ ∈ Z and δ ≥ 2. In the latter case we have zi′ − yi′ ∈ hu1δ−1 i for i = 1, . . . , r. In particular hy ′, u1 i = hz ′ , u1i. Before proving Proposition 13.3, we now complete the proof of Theorem 5.40. In view of Proposition 12.5 and Theorem 12.7 (and its proof), Theorem 5.40 is an obvious consequence of the following. Theorem 13.4 Assume given a fundamental unit of B-permissible blowups (12.1). AsO sume that k(x1 ) 6= k(x) and that there is no regular closed subscheme D ⊆ Xmax of O dimension 1 with x ∈ D. (E.g., this holds if x is isolated in Xmax ). Assume that (X, Z) is v-admissible at x (cf. Definition 10.3 (3)). Then, for q = 1, . . . , m, (Xq , Zq ) is vadmissible at xq and βxOq (Xq , Zq ) < βxO (X, Z). Proof By the assumption we can take an O-admissible prelabel Λ = (f, y, u). By Lemma 10.4, after preparation we may assume that (f, y, u) is v-prepared and δ-prepared. Let (f ′ , y ′, (u1 , φ′)) and (f ′ , z ′ , (u1 , φ′)) be as in Lemma 13.1 and Proposition 13.3, applied to X ← X1 in place of X ← X ′ . By Claim 9.5, we have (cf. (12.2)) pq = hy1′ /u1q−1 , . . . , yr′ /u1q−1, u1 i for q = 1, . . . , m − 1. By Proposition 13.3 (3) and since δ(f, y, u) ≥ m by Corollary 9.6, this implies pq = hz1′ /u1q−1 , . . . , zr′ /u1q−1, u1 i (13.1) for q = 1, . . . , m − 1. We prepare (f ′ , z ′ , (u1 , φ′)) at all vertices and the faces lying in {A ∈ R2 | |A| ≤ |v(f ′, z ′ , (u1 , φ′))|} to get a v-prepared and δ-prepared label (g, w, (u1, φ′ )) of (X1 , Z1 ) at x1 . Note that (13.2) wi − zi′ ∈ huγ1 i (1 ≤ i ≤ r) for γ ∈ Z≥0 , γ > α(f ′ , z ′ , (u1, φ′ )) = δ − 1. By Lemma 10.4, we have β O (g, w, (u1, φ′ )) = β O (f ′ , z ′ , (u1, φ′ )). For q = 1, . . . , m, let (q) (q) (q) g (q) = (g1 , . . . , gN ) (gi n (q−1) = g/u1 i ), (q) (q) (q) (q−1) w (q) = (w1 , . . . , wN ) (wi = w/u1 (q) ). (q) Then (13.1) and (13.2) imply pq = hw1 , . . . , wr , u1 i for q = 1, . . . , m − 1. For q ≥ 1, Lemma 11.4, applied to Xq ← Xq+1 in place of X ← X ′ , implies that Λq := (g (q) , w (q) , (u1 , φ′)) is a label of (Xq , Zq ) at xq which is v-prepared and δ-prepared. Then we get βxOq (Xq , Zq ) ≤ β O (g (q) , w (q) , (u1 , φ′ )) = β O (g, w, (u1, φ′ )) = β O (f ′ , z ′ , (u1, φ′ )) < β O (f, y, u) = βxO (X, Z), where the first inequality (resp. equality) comes from v-preparedness of Λq (resp. Lemma 11.4 (4)). This completes the proof of the theorem.  139 Now we start the proof of Proposition 13.3. We may write X (13.3) inδ (fi )(y,u) = Fi (Y ) + Pi,B (U) · Y B ∈ k[Y, U1 , U2 ], |B|<ni where Pi,B (U) ∈ k[U1 , U2 ], for B ∈ Zr≥0 with |B| < ni , is either 0 or homogeneous of degree δ(ni − |B|). Write Pi,B (U) = Φei (B) · Qi,B (U), (13.4) where ei (B) ∈ Z≥0 and Qi,B (U) ∈ k[U1 , U2 ] is either 0, or homogeneous of degree (δ − d · ei (B))(ni − |B|) and not divisible by Φ. Then we get X (13.5) inδ (fi )(y,u) = Fi (Y ) + Qi,B (U)Y B Φei (B) ∈ k[Y, U1 , U2 ], From this we compute (13.6)   degU2 Pi,B (1, U2 ) γ (f, y, u) = sup | 1 ≤ i ≤ N, Pi,B (U) 6≡ 0 . ni − |B|   d · ei (B) + degU2 Qi,B (1, U2 ) = sup | 1 ≤ i ≤ N, Qi,B (U) 6≡ 0 . ni − |B|   ei (B) | 1 ≤ i ≤ N, Qi,B (U) 6≡ 0 . ≥ d · sup ni − |B| + where degU2 denotes the degree of a polynomial in k[U2 ]. Set qi,B = Q̃i,B (u1 , u2 ) ∈ R and deg Qi,B ′ qi,B = qi,B /u1 ∈ R′ , where Q̃i,B (U1 , U2 ) ∈ R[U1 , U2 ] is a lift of Qi,B (U) ∈ k[U1 , U2 ]. Letting F̃ (Y ) ∈ R[Y ] be a lift of F (Y ) ∈ k[Y ], (13.3) and (13.4) imply X (13.7) fi = F̃i (y) + y B ua11 (φ)ei(B) qi,B + g with vL (g)(y,u) > vL (fi )(y,u) = ni , |B|<ni By Lemma 8.2(2) this implies (13.8) X B (δ−1)(n −|B|) ′ i fi′ = fi /un1 i = F̃i (y ′) + y ′ u1 (φ′ )ei (B) qi,B + g′ with vΛ (g ′ )(y′ ,(u1 ,φ′ )) > ni , |B|<ni where Λ : R2 → R ; (a1 , a2 ) → (13.9) a1 and g ′ = g/un1 i . Noting that δ−1 ′ qi,B ∈ (R′ )× ⇔ Qi,B (U) 6≡ 0 ∈ k[U1 , U2 ], we get (13.10) α′ :=α(f ′ , y ′, u1 , φ′ ) = δ − 1 where δ := δ(f, y, u),   ei (B) ′ ′ ′ ′ β :=β(f , y , u1 , φ ) = inf | 1 ≤ i ≤ N, Qi,B (U) 6≡ 0 . ni − |B| 140 The same argument, applied to lB with B ∈ O(x), shows αO (f ′ , y ′, u1 , φ′) = δ O (f, y, u) − 1. (13.11) Let v ′ = v(f ′ , y ′, (u1, φ′ )). Under the identification grm′ (R′ ) = k ′ [Y ′ , U1 , Φ′ ] we get (13.12) inv′ (fi′ ) = Fi (Y ′ ) +  Yi′ = inm′ (yi′ ), U1 = inm′ (u1), Φ′ = inm′ (φ′ ) , X B ′ β′ ′ qi,B · Y ′ (U1α Φ′ )ni −|B| ∈ k ′ [Y ′ , U1 , Φ′ ] ei (B)=β ′ (ni −|B|) ′ ′ where qi,B ∈ k ′ := k(x′ ) is the residue class of qi,B ∈ R′ . Lemma 13.5 We have β(f, y, u) ≥ γ + (f, y, u) ≥ d · β(f ′, y ′, (u1 , φ′ )), β O (f, y, u) ≥ γ +O (f, y, u) ≥ d · β O (f ′ , y ′, (u1, φ′ )). Proof The first inequality holds in general (cf. the picture below Definition 10.1) and the second follows from (13.10) and (13.6). This proves the first assertion. The second assertion follows by applying the same argument to lB for B ∈ O(x) in view of Lemma 13.2. This completes the proof.  Corollary 13.6 If (f ′ , y ′, (u1 , φ′ )) is not solvable at v ′ , Proposition 13.3 holds. Proof Indeed, it suffices to take z ′ = y ′ in this case. Proposition 13.3 (3) follows from Lemma 11.1 (1). As for (1), Proposition 13.3 (c) implies, in view of (13.5), (13.12), and (13.9), that (f ′ , y ′, (u1, φ′ )) is normalized at v ′ . Hence the assumption implies (f ′ , y ′, (u1, φ′ )) is prepared at v ′ . It remains to show (2). By Lemma 13.5 it suffices to show β O (f, y, u) 6= 0. By (11.1) we have β O (f, y, u) + αO (f, y, u) ≥ δ O (f, y, u) > 1. By the assumption (a) and Lemma 10.5, αO (f, y, u) < 1 and hence β O (f, y, u) > 0.  So for the proof of Proposition 13.3, it remains to treat the case where (f ′ , y ′, (u1 , φ′ )) is solvable at v ′ . Assume that we are now in this case. This implies (13.13) β ′ := β(f ′, y ′, (u1 , φ′ )) ∈ Z≥0 , δ := δ(f, y, u) ∈ Z, δ ≥ 2. Indeed δ ∈ Z since α′ = δ − 1 ∈ Z by (13.10) and δ > 1 by the assumption (d). It also implies that there exist λ1 , . . . , λr ∈ k ′ such that (13.14) ′ inv′ (fi′ ) = Fi (Y ′ + λ · Φβ U1δ−1 ) for i = 1, . . . , N, where λ = (λ1 , . . . , λr ). For 1 ≤ j ≤ r, let Aj (U) = Aj (U1 , U2 ) ∈ k[U1 , U2 ] be homogeneous polynomials such that: (C1) αj := deg Aj < d = deg Φ, 141 (C2) Aj is not divisible by U1 (which implies αj = degU2 Aj (1, U2 ))), (C3) λj ≡ Aj (1, U2 ) mod Φ(1, U2 ) in k ′ = k(x′ ) ∼ = k[U2 ]/hΦ(1, U2 )i. Choose a lift of Ãj (U1 , U2 ) ∈ R[U1 , U2 ] of Aj (U) ∈ k[U1 , U2 ] and set aj = Ãj (u1 , u2 ) ∈ R and α a′j = aj /u1 j ∈ R′ . Then λj ≡ a′j mod m′ . Define (13.15) (13.16) ′ δ−(dβ ′ +αj ) zj := yj + φβ · u1 · aj ∈ R[1/u1], β′ zj′ := zj /u1 = yj′ + φ′ · u1δ−1 · a′j ∈ R′ . Note that zi′ − yi′ ∈ hu1 i for i = 1, . . . , r since δ ≥ 2 as noted in (13.13). Consider the following condition (13.17) γ + := γ + (f, y, u) ≥ d(β ′ + 1) (β ′ := β(f ′ , y ′, (u1, φ′ ))). Lemma 13.7 Assume (13.17) holds. Then the following is true. (1) We have zj ∈ R for j = 1, . . . , r and (z, u) is a system of regular parameters of R which is strictly admissible for J. The conditions (b) and (c) of Proposition 13.3 are satisfied for (z, u) in place of (y, u). (2) w+ (f, z, u) = w+ (f, y, u), v(f, z, u) = v(f, y, u), vO (f, z, u) = vO (f, y, u), δ(f, z, u) = δ(f, y, u). (3) α(f ′ , y ′, (u1, φ′ )) = α(f ′ , z ′ , (u1 , φ′ )), β(f ′, y ′ , u1, φ′ ) < β(f ′ , z ′ , u1 , φ′ ) ≤ γ + (f, y, u) = γ + (f, z, u). By Lemma 13.7, if (13.17) holds for (f, y, u), we may replace (f, y, u) by (f, z, u) to show Proposition 13.3. If (f, z, u) is not solvable at v(f, z, u), then we are done by Corollary 13.6. If (f, z, u) is solvable at v(f, z, u) and (13.17) holds for (f, z, u), then we apply the same procedure to (z, u) to get a new system of regular parameters of R. This process must stop after finitely many steps, by the last inequality in Lemma 13.7 (3). Thus Proposition 13.3 follows from Corollary 13.6, Lemma 13.7 and the following Lemma 13.8. Lemma 13.8 Assume that (13.17) does not hold for (f, y, u) and that (f ′ , y ′, (u1, φ′ )) is solvable at v ′ = v(f ′, y ′, (u1 , φ′ )). Dissolve v ′ as in (13.14) and let zj′ be as in (13.16). Then (f ′ , z ′ , (u1, φ′ )) is v-prepared and we have β O (f ′ , z ′ , (u1, φ′ )) < β O (f, y, u), α(f ′ , z ′ , (u1 , φ′ )) = α(f ′, y ′ , (u1, φ′ )) = δ − 1. Proof of Lemma 13.7. Conditions (13.17) and (C1) imply (13.18) δ − (dβ ′ + αj ) > δ − d(β ′ + 1) ≥ δ − γ + ≥ 0 for j = 1, . . . , r, where the last inequality holds in general (cf. the picture below Definition 10.1). This implies zj ∈ R, and the second assertion of (1) is obvious from (13.15). Let vu2 be the valuation on R with respect to hu2i. By (13.17) and (C1) we have ′ vu2 (φβ aj ) = dβ ′ + αj < dβ ′ + d ≤ γ + . This together with (13.18) implies that the coordinate transformation (13.15) affects only those vertices of ∆(f, y, u) lying in {(a1 , a2 ) ∈ R2 | a1 > δ − γ + , a2 < γ + }. This shows (2), and that condition (b) of Proposition 13.3 holds for (f, z, u). 142 The first assertion of (3) follows from (13.10) and the equality δ(f, y, u) = δ(f, z, u) implied by (2). The first inequality in the second assertion of (3) is a consequence of the first assertion since v(f ′ , y ′, (u1 , φ′)) 6∈ ∆(f ′ , z ′ , (u1 , φ′)). Lemma 13.5 implies γ + (f, z, u) ≥ β(f ′ , z ′ , (u1 , φ′ )) and (2) implies γ + (f, z, u) = γ + (f, y, u), which completes the proof of (3). It remains to show that condition (c) of Proposition 13.3 holds for (f, z, u). Introduce ρ = (ρ1 , . . . , ρr ), a tuple of independent variables over k. For i = 1, . . . , N, write X inδ (fi )(y,u) = Y B Ti,B (U) with Ti,B (U) ∈ k[U] B and substitute Yi = Zi − ρi in inδ (fi )(y,u) ∈ k[Y, U] to get X Gi (Z, U, ρ) = (Z − ρ)B Ti,B (U) ∈ k[Z, U, ρ]. B By (13.3) and (13.15) we have inδ (fi )(z,u) = Gi (Z, U, ρ)|ρ=s, where δ−(dβ ′ +αj ) s = (s1 , . . . , sr ) with si = U1 Write Gi (Z, U, ρ) = ′ Φβ Aj (U1 , U2 ) ∈ k[U1 , U2 ] . X Z C Si,C (U, ρ) (Si,C (U, ρ) ∈ k[U, ρ]) . X CA · Y A ∈ k[Y ] = k[Y1 , . . . , Yr ], C By condition 13.3 (c) for (f, y, u), i.e., the normalizedness of inδ (fi )(y,u) , we have Ti,B (U) ≡ 0 if B ∈ E r (F1 (Y ), . . . , Fi−1 (Y )). By Lemma 13.9 below, this implies Si,C (U, ρ) ≡ 0 for C ∈ E r (F1 (Z), . . . , Fi−1 (Z)), which is the normalizedness of inδ (f )(z,u) , i.e., 13.3 (c) for (f, z, u).  Lemma 13.9 Assume given G(Y ) = A and a subset E ⊂ Zr≥0 such that E + Zr≥0 ⊂ E and that CA = 0 if A ∈ E. Let ρ = (ρ1 , . . . , ρr ) be a tuple of independent variables over k and write X G(Y + ρ) = SK · Y K with SK ∈ k[ρ] . K Then SK ≡ 0 if K ∈ E. Proof We have P  r Q  ρi )  P Ai Ai −ki ρi · Y ki = CA k i i=1 A k" i #    m Q P P Ai ρA−K Y K . CA = k i i=1 K=(k1 ,...,kr ) A∈K+Z≥0 G(Y + ρ) = A CA (Yi + i=1  Ai r Q Q Ai 143 Thus SK = X CA ! m  Y Ai ki i=1 A∈K+Z≤0 · ρA−K . Now, if SK 6≡ 0 for K ∈ E, then there is an A ∈ K + Zr≥0 ⊂ E with CA 6= 0. This completes the proof of the lemma.  Proof of Lemma 13.8. Let F̃i (Y ) ∈ R[Y ] be a lift of Fi (Y ) ∈ k[Y ]. For a tuple of independent variables ρ = (ρ1 , . . . , ρr ) over R, write X Ki,B,D · Y B ρD with Ki,B,D ∈ R, (13.19) F̃i (Y + ρ) = F̃i (Y ) + |B|<ni |B+D|=ni By (13.16) we have z ′ = y ′ + µ, where (13.20) µ = (µ1 , . . . , µr ) ′ with µi = u1δ−1 (φ′ )β · a′i . Hence (13.19) implies: F̃i (z ′ ) = F̃i (y ′) + X B Ki,B,D · y ′ µD with Ki,B,D ∈ R, |B|<ni |B+D|=ni By (13.8) this implies (13.21) X fi′ = F̃i (z ′ ) + (z ′ − µ)B θi,B + g ′ with vΛ (g ′ )(y′ ,(u1 ,φ′ )) > ni , |B|<ni where (δ−1)(ni −|B|) ′ θi,B = (φ′ )ei (B) qi,B u1 − P Ki,B,D · µD |D|=ni −|B| ′ = (φ′ β u1δ−1 )ni −|B| ωi,B . Here we set (13.22) ′ ωi,B = (φ′ )bi (B) qi,B − X Ki,B,D · a′ D (a′ = (a′1 , . . . , a′r )), |D|=ni −|B| bi (B) = ei (B) − (ni − |B|)β ′. By (13.10) we have bi (B) ≥ 0. For each B write (in k[U2 ]) X (13.23) Φ(1, U2 )bi (B) Qi,B (1, U2 ) − K i,B,D A(1, U2 )D = Φ(1, U2 )ci (B) · Ri,B (1, U2 ), |D|=ni −|B|  with A(1, U2 ) = A1 (1, U2 ), . . . , Ar (1, U2 ) , K i,B,D = Ki,B,D mod m ∈ k, where ci (B) ∈ Z≥0 and Ri,B (U1 , U2 ) ∈ k[U1 , U2 ] is either 0 or homogeneous and not divisible by Φ nor by U1 . Choose a lift R̃i,B (U1 , U2 ) ∈ R[U1 , U2 ] of Ri,B (U1 , U2 )) ∈ k[U1 , U2 ] and set deg R ′ ri,B = R̃i,B (u1, u2 ) ∈ R, ri,B = ri,B /u1 i,B ∈ R′ . 144 Then (13.22) implies ′ ωi,B − (φ′ )ci(B) ri,B ∈ mR′ = hu1 i ⊂ R′ so that (13.21) gives (13.24) fi′ = F̃i (z ′ ) + X ′ (ni −|B|)(δ−1) (z ′ − µ)B (φ′ )(ni −|B|)β +ci (B) u1 ′ · ri,B + h′ , |B|<ni where vΛ (h′ )(y′ ,(u1 ,φ′ )) > ni . By Lemma 6.4(3) this implies vΛ (h′ )(z ′ ,(u1 ,φ′ )) > ni by noting zi′ − yi′ ∈ hu1δ−1 i by (13.16). Now we need the following lemma: Lemma 13.10 There exist i ∈ {1, . . . , N} and B with |B| < ni such that Ri,B (U) 6≡ 0 in ′ k[U1 , U2 ] (which is equivalent to ri,B 6∈ m′ ). The proof of Lemma 13.10 will be given later. Using the lemma, we see from (13.24) that there is a vertex of ∆(f ′ , z ′ , (u1, φ′ )) on the line {(a1 , a2 ) ∈ R2 | a1 = δ − 1}. Since ∆(f ′ , z ′ , (u1 , φ′)) ⊂ ∆(f ′ , y ′, (u1 , φ′ )) and v(f ′ , y ′, (u1 , φ′)) ∈ / ∆(f ′ , z ′ , (u1 , φ′)), this implies (13.25) α(f ′ , z ′ , (u1 , φ′ )) = α(f ′, y ′ , (u1, φ′ )) = δ − 1, β ′ := β(f ′, y ′, (u1 , φ′ )) < β(f ′, z ′ , (u1 , φ′)). Moreover there exist 1 ≤ i ≤ N and B such that (13.26) β(f ′ , z ′ , (u1 , φ′ )) = β ′ + ci (B) , ni − |B| where ci (B) is defined by equation (13.23). Lemma 13.11 If condition (13.17) does not hold, ci (B) < ni − |B| for all i = 1, . . . , N. Proof By the assumption we have γ + (f, y, u) < d(β ′ + 1). Then we claim that for all (i, B) such that Qi,B 6≡ 0, d · bi (B) + degU2 Qi,B (1, U2 ) < d · (ni − |B|) . Indeed, recalling bi (B) = ei (B) − (ni − |B|)β ′ , the assertion is equivalent to d · ei (B) + degU2 Qi,B (1, U2 ) < d(β ′ + 1) ni − |B| and this follows from (13.6). On the other hand, in (13.23) we have degU2 A(1, U2 )D ≤ |D| max{degU2 Aj (1, U2 ) | 1 ≤ j ≤ r} < d · (ni − |B|) , because |D| = ni − |B| and degU2 Aj (1, U2 ) = αj < d by (C1). By (13.23), this implies  degU2 Φ(1, U2 )ci (B) Ri,B (1, U2 ) < d · (ni − |B|), which implies ci (B) < ni − |B| since d = degU2 Φ(1, U2 ).  145 By Lemma 13.11, (13.26) and (13.25) imply β ′ < β(f ′ , z ′ , (u1 , φ′ )) < β ′ + 1 . (13.27) By (13.13) we have β ′ ∈ Z so that β(f ′, z ′ , (u1 , φ′)) ∈ / Z. Hence (f ′ , z ′ , (u1 , φ′ )) is not ′ ′ ′ solvable at v(f , z , (u1 , φ )). We now show (f ′ , z ′ , (u1, φ′ )) is normalized at v(f ′ , z ′ , (u1, φ′ )). Let v ′′ = v(f ′ , z ′ , (u1, φ′ )) and β ′′ = β(f ′ , z ′ , (u1, φ′ )). Setting Z ′ = (Z1′ , . . . , Zr′ ) with Zi′ = inm′ (zi′ ), (13.24) implies X n −|B| ′ β ′′ (Z ′ − µ)B Φ′ U1δ−1 i inv′′ (fi′)(z ′ ,(u1 ,φ′ )) = Fi (Z ′ ) + · ri,B , B (13.28) ′ = Fi (Z ) + X C Z ′ Si,C with Si,C ∈ k ′ [U1 , Φ′ ], C where the first sum ranges over such B that |B| < ni and β ′ + ci (B) = β ′′ and ni − |B| ′ µ = (µ1 , . . . , µr ) with µi = U1δ−1 Φβ · a′i , ′ r ′i,B = ri,B mod m′ = Ri,B (1, U2 ) mod Φ(1, U2 ) ∈ k ′ ≃ k[U2 ]/hΦ(1, U2 )i. Let B ∈ E r (F1 , . . . , Fi−1 ). Proposition 13.3 (c) implies Qi,B (U) ≡ 0 (cf. (13.3) and (13.4)). This implies that (F1 , . . . , FN ) is normalized in the sense of Definition 7.11 (1), and Lemma 13.9 implies that Ki,B,D ∈ m for all D in (13.19). Hence Ri,B (1, U2 ) ≡ 0 in (13.23) so that r ′i,B = 0 in (13.28). By Lemma 13.9 this implies that Si,C ≡ 0 if C ∈ E(F1 , . . . , Fi−1 ), which proves the desired assertion. Finally it remains to show (13.29) β O (f ′ , z ′ , (u1, φ′ )) < β O (f, y, u). The proof is divided into the following two cases: Case (1) δ O (f, y, u) = δ(f, y, u), Case (2) δ O (f, y, u) < δ(f, y, u). Note that we always have δ O (f, y, u) ≤ δ(f, y, u) since ∆(f, y, u) ⊂ ∆O (f, y, u). Assume we are in Case (1). We have (13.30) γ + (f, y, u) ≤ γ +O (f, y, u) ≤ β O (f, y, u), where the first inequality holds by the assumption and the second holds in general. By (13.11) and (13.10), the assumption implies αO (f ′ , y ′, (u1, φ′ )) = α(f ′ , y ′, (u1 , φ′)) = δ − 1. Since the coordinate transformation y ′ → z ′ in (13.16) affects only those vertices lying in {(a1 , a2 ) ∈ R2 | a1 ≥ δ − 1}, we have (13.31) αO (f ′ , z ′ , (u1 , φ′)) ≥ αO (f ′ , y ′, (u1 , φ′ )) = α(f ′, y ′ , (u1, φ′ )) = δ − 1. 146 By (13.25) we have α(f ′, y ′ , (u1, φ′ )) = α(f ′ , z ′ , (u1 , φ′ )) ≥ αO (f ′ , z ′ , (u1 , φ′ )), where the inequality holds since ∆(f ′ , z ′ , (u1, φ′ )) ⊂ ∆O (f ′ , z ′ , (u1 , φ′ )). Thus we get (13.32) α(f ′, z ′ , (u1, φ′ )) = αO (f ′ , z ′ , (u1 , φ′ )), β O (f ′ , z ′ , (u1 , φ′ )) ≤ β(f ′ , z ′ , (u1, φ′ )). On the other hand, from Lemma 13.5 and (13.27), we get β ′′ := β(f ′ , z ′ , (u1, φ′ )) < γ + (f, y, u) γ + (f, y, u) +1≤ + 1. d 2 If γ + := γ + (f, y, u) ≥ 2, then β ′′ < γ + , which shows the desired inequality (13.29) thanks to (13.30) and (13.32). If γ + < 2, then Lemma 13.5 implies β ′ := β(f ′ , y ′, (u1, φ′ )) ≤ γ + /2 < 1 so that β ′ = 0 since β ′ ∈ Z as noted in (13.13). Hence (13.32) and (13.27) implies β O (f ′ , z ′ , (u1 , φ′ )) ≤ β(f ′ , z ′ , (u1, φ′ )) < β ′ + 1 = 1. On the other hand we have (13.33) β O (f, y, u) ≥ δ O (f, y, u) − αO (f, y, u) > δ O (f, y, u) − 1 = δ(f, y, u) − 1 ≥ 1. Here the first inequality holds in general, the second inequality holds since αO (f, y, u) < 1 by Lemma 10.5 and the assumption (a), and the last inequality follows from (13.13). This proves the desired inequality (13.29) in Case (1). Assume we are in Case (2). Write δ O = δ O (f, y, u). The assumption implies γ +O := γ +O (f, y, u) = γ +O (y, u). (cf. Definition 10.3) By (13.10) and (13.11) it also implies αO (f ′ , y ′, (u1, φ′ )) = δ O − 1 < α(f ′ , y ′, (u1 , φ′ )) = δ − 1. Since the coordinate transformation y ′ → z ′ in (13.16) affects only those vertices lying in {(a1 , a2 ) ∈ R2 | a1 ≥ δ − 1} and δ O < δ, this implies αO (f ′ , z ′ , (u1 , φ′)) = δ O − 1 < α(f ′, z ′ , (u1 , φ′ )). and hence (13.34) β O (f ′ , z ′ , (u1 , φ′ )) = β O (z ′ , (u1 , φ′)). Recall that the δ-face of ∆O (f, y, u) is ∆O (f, y, u) ∩ {A ∈ R2 | ΛO (A) = 1} with ΛO : R2 → R; (a1 , a2 ) → For B ∈ O(x), the initial form of lB along this face is written as: (13.35) inδ (lB ) = LB (Y ) + Φ(U)sB ΓB (U), 147 a1 + a2 . δO where LB (Y ) ∈ k[Y ] is a linear form, sB ∈ Z≥0 , and ΓB (U) ∈ k[U] is either 0 or homogeneous of degree δ O − d · sB and not divisible by Φ. Note that ΓB (U) 6≡ 0 for some B ∈ O(x). From this we compute  γ +O = γ +O (y, u) = sup degU2 (Φ(1, U2 )sB ΓB (1, U2 )) | B ∈ O(x), ΓB (U) 6≡ 0 (13.36) ≥ d · {sB | B ∈ O(x), ΓB (U) 6≡ 0} . Choose lifts L̃B (Y ) ∈ R[Y ] and Γ˜B (U) ∈ R[U] of LB (Y ) ∈ k[Y ] and ΓB (U) ∈ k[U], respectively, and set γB = ΓB (u1 , u2) ∈ R, and ΓB γB′ = γB /udeg . 1 Note γB′ ∈ m′ if and only if ΓB (U) ≡ 0. (13.35) implies lB = L̃B (y) + φsB γB + ǫ with vΛO (ǫ)(y,u) > vΛO (lB )(y,u) = 1. By Lemma 8.2 (1), this implies O −1 ′ lB = lB /u1 = L̃B (y ′) + uδ1 s φ′ B γB′ + ǫ′ with vΛ′ O (ǫ′ )(y′ ,(u1 ,φ′ )) > 1, O Λ′ : R2 → R ; (a1 , a2 ) → a1 . δO − 1 ′ Substituting y ′ = z ′ − u1δ−1 φ′ β · a′ (cf. (13.16)), we get O −1 ′ lB = L̃B (z ′ ) + uδ1 s φ′ B γB′ + u1δ−1 · h + ǫ′ (h ∈ R′ ). By Lemma 6.4 (3), vΛ′ O (ǫ′ )(y′ ,(u1 ,φ′ )) > 1 implies vΛ′ O (ǫ′ )(z ′ ,(u1 ,φ′ )) > 1 since we have vΛ′ O (zi′ − yi′ )(z ′ ,(u1 ,φ′ )) = δ−1 >1 δO − 1 for i = 1, . . . , r by (13.16). Hence we get β O (f ′ , z ′ , (u1 , φ′)) = β O (z ′ , (u1, φ′ )) = inf {sB | B ∈ O(x), ΓB (U) 6≡ 0} By (13.36) this implies β ′′ := β O (f ′ , z ′ , (u1 , φ′ )) ≤ γ +O γ +O ≤ . d 2 If γ +O 6= 0, this implies β ′′ < γ +O ≤ β O (f, y, u) as desired. If γ +O = 0, then β ′′ = 0. On the other hand, as is seen in (13.33), we have β O (f, y, u) ≥ δ O (f, y, u) − αO (f, y, u) > δ O (f, y, u) − 1 > 0, where the last inequality was noted in (11.1). This proves the desired assertion (13.29) and the proof of Lemma 13.8 is complete, up to the proof of Lemma 13.10.  Proof of Lemma 13.10 Assume the contrary, i.e., that we have Ri,B (U) ≡ 0 in k[U] for all (i, B) with |B| < ni . Then, for all (i, B) we have X (13.37) Φ(1, U2 )bi (B) Qi,B (1, U2 ) = Ki,B,D A(1, U2 )D ∈ k[U2 ] |D|=ni −|B| 148 Write δ−(dβ ′ +αj ) Γj (U1 , U2 ) = U1 Aj (U1 , U2 ) ∈ k[U1 , U2 ][U1−1 ] (n −|B|)(δ−dβ ′ ) (δ − (dβ ′ + αj ) may be negative). Multiplying (13.37) by U1 i X (13.38) Pi,B (U1 , U2 ) = Ki,B,D Γ(U1 , U2 )D , we get |D|=ni −|B| where Γ(U)D = r Q Γj (U)Dj . In fact, for the left hand side we note that bi (B) = ei (B) − j=1 (ni − |B|)β ′ and that Qi,B (U1 , U2 )Φ(U1 , U2 )ei (B) = Pi,B (U1 , U2 ) is either 0 or homogeneous α of degree δ(ni − |B|). For the right hand side recall that Aj (U1 , U2 ) = U1 j Aj (1, U2 ) and that r Y D (δ−dβ ′ −αj ) D ·α |D|(δ−dβ ′ ) U1 = U1 j · U1 j j . j=1 In view of (13.19), equations (13.38) and (13.3) imply X Fi (Y + Γ(U)) =Fi (Y ) + (−1)|D| K i,B,D Y B Γ(U)D (13.39) |B+D|=ni =Fi (Y ) + X Pi,B (U) = inδ (fi ) |B|<ni Now we claim: (13.40) δ ≥ dβ ′ + αj for j = 1, . . . , r, i.e., Γj (U) ∈ k[U] ⊂ k[U][U1−1 ]. Admitting this claim, (13.39) implies that one can dissolve all the vertices of ∆(f, y, u) on the line {A ∈ R2 | L(A) = 1}, which contradicts assumption (b). This completes the proof of Lemma 13.10. It remains to show claim (13.40). We show that Γj (U) ∈ k[U1 .U2 ] ⊂ k[U1 , U2 , U1−1 ]. Recall from (13.39) that in any case (13.41) Fi (Y + Γ(U)) = inδ (fi ) ∈ k[Y, U] . Denote the variables Y1 , . . . , Yr , U1 , U2 by X1 , . . . , Xn (so that n = r + 2), and define derivations DA : k[X] → k for A ∈ Zn≥0 by X G(X + ρ) = DA G · ρA (G(X) ∈ k[X]), A where ρ = (ρ1 , . . . , ρn ) are new variables. We now apply [H5] (1.2) and [Gi3] Lemmas 1.7 and 3.3.4 (the assumptions of the lemmas are satisfied by Lemma 13.9 and the normalizedness of (F1 , . . . , FN ) implied by Proposition 13.3(c)). According to these results, after possibly changing the ordering of X1 , . . . , Xn , we can find: • f , an integer with 0 ≤ f ≤ n, • Pj for 1 ≤ j ≤ f , homogeneous polynomials in the variables XA,i indexed by A ∈ Zn≥0 and 1 ≤ i ≤ N, with coefficients in k, 149 • q1 ≤ q2 ≤ . . . qf , numbers which are powers of the exponential characteristic of k (so that qj = 1 for j = 1, . . . , f if char(k) = 0), q q j • ψj = cj,j+1Xj+1 + . . . cj,r Xnj (cj,ν ∈ k, 1 ≤ j ≤ f, j ≤ ν ≤ n), additive polynomials homogeneous of degree qj , such that for i = 1, . . . , N, we have P1 (DA Fi ) = X1q1 + ψ1 (X2 , . . . , Xn ) q2 P2 (DA Fi ) = X2 + ψ2 (X3 , . . . , Xn ) · · q Pf (DA Fi ) = Xf f + ψf (Xf +1 , . . . , Xn ) . Moreover the equations on the right hand side define the so-called ridge (faı̂te in French) F (Cx (X)) = F (C(R/J)) of the tangent cone Cx (X) = C(R/J) = Spec(grm (R/J)), i.e., the biggest group subscheme of Tx (Z) = Spec(grm (R)) = Spec(k[X1 , . . . , Xn ]) which respects C(R/J) with respect to the additive structure of Tx (Z). Since Dir(R/J) ⊆ F (C(R/J)) and e(R/J) = e(R/J) = 2 (cf. Definition 1.21) by the assumption, all these schemes have dimension 2. Hence we must have f ≥ n − 2 = r. Since Fi (Y ) ∈ k[Y ], the variables U1 and U2 do not occur in the above equations so that f ≤ r = n − 2. Thus we get f = r. Hence, after a permutation of the variables Y1 , . . . , Yr , the equations become P1 (DA Fi (Y )) P2 (DA Fi (Y )) = = .. . Y1q1 Y2q2 q + ψ1 (Y2 , . . . , Yr ) + ψ2 (Y3 , . . . , Yr ) r−1 Pr−1 (DA Fi (Y )) = Yr−1 + qr Pr (DA Fi (Y )) = Yr , ψr−1 (Yr ) This implies Pr (DA Fi (Y + Γ(U))) = Yrqr + Γr (U)qr . q j By (13.41) this gives Γr (U)qr ∈ k[U] and hence Γr (U) ∈ k[U]. Noting ψj = cj,j+1Yj+1 + qj . . . + cj,r Yr , we easily conclude inductively from (13.41) that Γr−1 (U), . . . , Γ1 (U) ∈ k[U]. This completes the proof of claim (13.40).  150 14 Non-existence of maximal contact in dimension 2 Let Z be an excellent regular scheme and let X ⊂ Z be a closed subscheme. Definition 14.1 A closed subscheme W ⊂ Z is said to have maximal contact with X at x ∈ X if the following conditions are satisfied: (1) x ∈ W . (2) Take any sequence of permissible blowups (cf. (5.1)): π π π n 1 2 Z = Z0 ←− Z1 ←− Z2 ← . . . ← Zn−1 ←− Zn ∪ ∪ ∪ ∪ ∪ π1 π2 πn X = X0 ←− X1 ←− X2 ← . . . ← Xn−1 ←− Xn where for any n ≥ 0 ← ··· ← ··· πn+1 Zn+1 = BℓDn (Zn ) −→ Zn ∪ ∪ πn+1 Xn+1 = BℓDn (Xn ) −→ Xn and Dn ⊂ Xn is permissible. Assume that there exists a sequence of points xn ∈ Dn (n = 0, 1, . . . ) such that x0 = x and xn is near to xn−1 for all n ≥ 1. Then Dn ⊂ Wn for all n ≥ 0, where Wn is strict transform W in Zn . Remark 14.2 The above definition is much weaker than Hironaka’s original definition (see [AHV]). In this section we prove the following: Theorem 14.3 Let k be a field of characteristic p > 0 and let y, u1, u2 be three variables over k. Consider Z = A3k = Spec(k[y, u1, u2]) and let X ⊂ Z be the hypersurface defined by the equation: N a b pA f = y p + yuN 1 u2 + u1 u2 (u1 + u2 ) (14.1) where A, a, b, N are integers satisfying the condition: (14.2) 0 < a, b < p, a + b = p, A > p, p 6 |A, N ≥ p2 A. Let x be the origin of Z = A3k and let U ⊂ Z be an open neighborhood of x. Then there is no smooth hypersurface W ⊂ U which has maximal contact with X ×Z U at x. We observe the following consequence of maximal contact, from which we will derive a contradiction. Let x ∈ X ⊂ Z be as in Definition 14.1. Let R = OZ,x with maximal ideal m and residue field k = R/m, and let J ⊂ R be the ideal defining X ×Z Spec(R). Lemma 14.4 Assume Z = Spec(R). Set e = ex (X) and r = dim(R) − e, and assume that e ≥ 1. Let t1 , . . . , tr be a part of a system of regular parameters of R and assume W := Spec(R/ht1 , . . . , tr i) has maximal contact with X at x. Let (f, y, u) be a δ-prepared label of (X, Z) at x (see Definition 9.1). Assume δ(f, y, u) > 2, and let m ≥ 2 be the integer such that (14.3) m < δ(f, y, u) ≤ m + 1. Then the following holds. 151 (1) ht1 . . . , tr i = hy1 . . . , yr i in R/m2 . In particular (t, u) = (t1 , . . . , tr , u1, . . . , ue ) is a system of regular parameters of R. (2) m ≤ δ(f, t, u) ≤ m + 1 so that |δ(f, y, u) − δ(f, t, u)| ≤ 1. Proof Consider the fundamental sequence of permissible blowups as in Definition 5.34 with B = ∅: π π π m 1 2 Z = Z0 ←− Z1 ←− Z2 ← . . . ← Zm−1 ←− Zm ∪ ∪ ∪ ∪ ∪ π1 π2 πm X = X0 ←− X1 ←− X2 ← . . . ← Xm−1 ←− Xm ↑ ∪ ∪ ∪ ∪ ∼ ∼ ∼ ∼ x ← C1 ← C2 ← . . . ← Cm−1 ← Cm By Corollary 9.6 the integer m in (14.3) coincides with the length of the above sequence. Let Wq is the strict transform of W in Zq . By Definition 14.1 we have Cq ⊂ Wq so that Wq+1 ≃ BℓCq (Wq ) for all q = 1, . . . , m − 1. (14.4) For 1 ≤ q ≤ m, let ηq be the generic point of Cq and let Rηq = OZq ,ηq with maximal ideal mηq . Let Jηq ⊂ Rηq be the ideal defining Xq ×Zq Spec(Rηq ). Write (q) fi (q) i = fi /uqn 1 , yi (q) = yi /uq1 , u′i = ui /u1 (2 ≤ i ≤ e), ti = ti /uq1 , . By Claim 9.5, we know (14.5) (f (q) , y (q) , u1 ) is a δ-prepared label of of (Xq , Zq ) at ηq for q ≤ m − 1. (q) (q) Claim 14.5 (t(q) , u1) = (t1 , . . . , tr , u1 ) is a system of regular parameters of Rηq . Proof Condition (14.4) implies (by induction on q) that the strict transform of W in (q) (q) Spec(Rηq ) is defined by ht1 , . . . , tr i. It also implies that Wq is transversal with the exception divisor of Zq → Zq−1 which is defined by hu1 i in Spec(Rηq ). Thus the claim follows.  By claim (14.5) we have hy (q), u1 i = mηq = ht(q) , u1 i ⊂ Rηq . Lemma 14.4 (1) follows easily using this fact for q = 1. By Definition 9.1 (2), (14.5) implies δ(f (q) , y (q) , u1) > 1 so that (q) fj ∈ mnηqj = ht(q) , u1 inj ⊂ Rηq (j = 1, . . . , N) By Definition 7.2 (3) this implies (14.6) δ(f (q) , t(q) , u1 ) ≥ 1 if 1 ≤ q ≤ m − 1. On the other hand, we have (14.7) δ(f (q) , t(q) , u1 ) = δ(f, t, u) − q. Indeed, noting that (t, u) is a system of regular parameters of R by Lemma 14.4 (1), we can write, as in (6.3): X fi = Ci,A,B tB uA with Ci,A,B ∈ R× ∪ {0} (A,B) 152 We compute n (q) = fi /u1 j = fi X Ci,A,B u′ (A,B) A a u′ = u′2 2 · · · u′e ae A |A|+q(|B|−ni ) (t(q) )B u1 , for A = (a1 , a2 , . . . , ae ). Noting that k(ηq ) = Rηq /mηq ≃ k(u′ ) = k(u′1, . . . , u′e ) and that R → Rηq → k(ηq ) factors through R → k (see Claim 9.5), we see |A| + q(|B| − ni ) | |B| < ni , Ci,A,B 6= 0} ni − |B| = δ(f, y, u) − q. δ(f (q) , t(q) , u1) = min{ Now (14.6) and (14.7) give us δ(f, t, u) ≥ m. As (f, y, u) is δ-prepared, Theorem 7.16 implies δ(f, y, u) ≥ δ(f, t, u). Thus we get m ≤ δ(f, t, u) ≤ δ(f, y, u) ≤ m + 1 and Lemma 14.4 (2) is shown.  Now we start the proof of Theorem 14.3. Let x be the origin of Z = A3k and let R = OZ,x with the maximal ideal m. Write u = (u1 , u2 ). Claim 14.6 (f, y, u) is a δ-prepared label of (X, Z) at x and δ(f, y, u) = A + 1. Proof From (14.1) and (14.2) one easily checks that IDirx (X) = hY i with Y = inm (y) and that ∆(f, y, u) ⊂ R2 is the polyhedron with the two vertices a b (A + , ), p p a b ( ,A+ ) p p Since these vertices are not integral points, the polyhedron is δ-prepared. We have δ(f, y, u) = A + 1 > 1 as a + b = p and the claim follows from Definition 9.1 (2).  We will use three sequences of permissible blowups: Sequence I: First consider π : Z ′ = Blx (Z) → Z and the strict transform X ′ ⊂ Z ′ of X. Look at the point x′ ∈ Z ′ of parameters (y ′ , u1, v) = ( y u2 , u1 , 1 + ). u1 u1 Let R′ = OZ ′ ,x′ . Then X ′ ×Z ′ Spec(R′ ) is defined by the equation: f ′ := f ′p ′ 2N −p+1 pA b (v − 1)N + upA p = y + y u1 1 v (v − 1) . u1 Using (14.2), one can check that ∆(f ′ , y ′, (u1 , v)) has the unique vertex (A, A) so that δ(f ′ , y ′, (u1 , v)) = 2A > 1. Hence x′ is very near to x by Theorem 8.6. By Theorems 8.1 and 8.3, f is a (u1 , v)-standard base and (u1 , v) is admissible for J = hf i ⊂ R. On the other hand, (f ′ , y ′, (u1 , v)) is not prepared at the vertex and we dissolve it by the coordinate change A p b z := y ′ + ǫuA 1 v . (ǫ = (−1) ) 153  Setting λ = (v − 1)N ∈ R′ × and µ = v −1 (v − 1)b − ǫp ∈ R′ × , we compute (14.8) pA+1 f ′ = z p + λzu12N −p+1 + µupA − λǫu12N −p+1+A v A . 1 v Using (14.2), we see that ∆(f ′ , z, (u1 , v)) is the polyhedron with three vertices 1 (A, A + ), p ( 2N − p + 1 + A A , ), p p ( 2N − 1, 0) , p−1 and that the δ-face of ∆(f ′ , z, (u1 , v)) is the first vertex. In fact, we have 2N − p + 1 + A A 1 + >A+A+ p p p and 2N 1 −1>A+A+ . p−1 p Since this first vertex is not an integral point, the polyhedron is δ-prepared. We have δ(f ′ , z, (u1 , v)) = 2A + 1p > 1. Hence (f ′ , z, (u1 , v)) is a δ-prepared label of (X ′ , Z ′ ) at x′ by Definition 9.1 (2). We now extend π : Z ′ → Z to the following sequence of permissible blowups: π π πp π 1 2 Z ←− Z ′ ←− Z1 ←− Z2 ← . . . ←− Zp ∪ ∪ ∪ ∪ ∪ πp π1 π2 π ′ X ←− X ←− X1 ←− X2 ← . . . ←− Xp ↑ ↑ ↑ ↑ ↑ ′ x ← x ← x1 ← x2 ← . . . ← xp Here Z1 = Bℓx′ (Z ′ ) and Zq+1 = Bℓxq (Zq ) (q = 1, . . . , p − 1) where xq ∈ Zq is the unique point lying on the strict transform of {z = v = 0} ⊂ Spec(R′ ), and Xq ⊂ Zq is the strict transform of X. For q = 1, . . . , p, write Rq = OZq ,xq and p(q+1) f (q) = f ′ /upq 1 = f /u1 (q) , z (q) = z/uq1 , vi = v/uq1 . By convention we write x0 = x′ . Claim 14.7 For q = 1, . . . , p, xq is very near to xq−1 , (f (q) , z (q) , (u1, v (q) )) is a δ-prepared label of (Xq , Zq ) at xq , and the δ-face of ∆(f (q) , z (q) , (u1 , v (q) )) is the vertex 1 1 (A + q(A − 1 + ), A + ). p p Proof By induction on q, one easily shows that (z (q) , u1, v (q) ) is a system of regular parameters of Rq . From (14.8), one computes 2N −p+1+q(1−p) (14.9) f (q) = (z (q) )p + λz (q) u1 pA+q(pA+1−p) + µu1 (v (q) )pA+1 2N −p+1+A+q(A−p) − λǫu1 (v (q) )A . This implies f (q) ∈ Rq and Xq ×Zq Spec(Rq ) = Spec(Rq /hf (q) i). It also implies the last assertion of the claim by noting (14.2). In fact, for the vertex coming from the second term we have 2N 1 1 − 1 − q > A + q(A − 1 + ) + A + p−1 p p 154 for 0 ≤ q ≤ p (see the worst case q = p), and the case of the last term is even simpler. Since the vertex in the claim is not an integral point, (f (q) , z (q) , (u1, v (q) )) is δ-prepared. Noting A > p, we get a (q) δ(f (q) , y (q), (u1 , u2)) = 1 + A + q( − 1) > 1 + a. p Now the claim follows from Theorems 8.6, 8.1, 8.3 and Corollary 7.17 as before.  Sequence II: We consider the following sequence of permissible blowups: π πp π 1 2 Z = Z0 ←− Z1 ←− Z2 ← . . . ←− Zp ∪ ∪ ∪ ∪ πp π π2 X = X0 ←− X1 ←− X2 ← . . . ←− Xp ↑ ↑ ↑ ↑ x = x0 ← x1 ← x2 ← . . . ← xp Here Zq+1 = Bℓxq (Zq ) (q = 0, . . . , p − 1) where xq ∈ Zq is the unique point lying on the strict transform of {y = u2 = 0} ⊂ Spec(R), and Xq ⊂ Zq is the strict transform of X. For q = 0, . . . , p, write Rq = OZq ,xq and (q) (q) = y/uq2, u1 = u1 /uq2 . f (q) = f /upq 2 , y (q) Claim 14.8 For q = 1, . . . , p, xq is very near to xq−1 , and (f (q) , y (q) , (u1 , u2 )) is a δ(q) prepared label of (Xq , Zq ) at xq , and ∆(f (q) , y (q), (u1 , u2 )) is the polyhedron with the unique vertex a b a ( , + A + q( − 1)). p p p (q) Proof By induction on q, one easily shows that (y (q) , (u1 , u2)) is a system of regular parameters of Rq . From (14.1), one computes (q) N +q(N +1−p) f (q) = (y (q) )p + y (q) (u1 )N u2 (q) b+pA+q(a−p) + (u1 )a u2 (q) u1 u2q−1 + 1)pA . This shows f (q) ∈ Rq and it is an equation for Xq ×Zq Spec(Rq ). The last assertion easily follows by noting (14.2). As p 6 |a, the polyhedron is δ-prepared. Then we get a (q) δ(f (q) , y (q), (u1 , u2)) = 1 + A + q( − 1) > 1 + a. p by noting A > p ≥ q and p = a + b. Now the claim follows from Theorems 8.6, 8.1, 8.3 and Corollary 7.17 as before.  Sequence III: This is the sequence of permissible blowups, which looks the same as the sequence II, except that now xq ∈ Zq is the unique point lying on the strict transform of {y = u1 = 0} ⊂ Spec(R). Now assume that there exists s ∈ m − m2 such that (∗) W := Spec(R/hsi) ⊂ Spec(R) has maximal contact with X ×Z Spec(R) at x. Then we want to deduce a contradiction. Let R̂ = k[[y, u1, u2 ]] be the completion of R. It is easy to see that the assumption (∗) and Claims 14.6, 14.7 and 14.8 hold even after replacing R with R̂. Thus we may work with X̂ := Spec(R̂/hf i) and Ŵ = Spec(R̂/hsi) ⊂ Ẑ = Spec(R̂) which has maximal contact with X̂ at the closed point x ∈ Spec(R̂). 155 Claim 14.9 There exists t ∈ R̂ such that hsi = hti ⊂ R̂ and b t=y+γ ∈R where γ ∈ nA+1 . Here n = hu1, u2 i ⊂ k[[u]] = k[[u1 , u2 ]] ⊂ R̂. Proof By Lemma 14.4 (1) and Claim 14.6, we can write ǫs = y + a with ǫ ∈ k × and a ∈ m2 . Noting R̂ = k[[y, u1, u2 ]] = k[[t, u1 , u2 ]], we can write a=γ+b with γ ∈ n2 , b ∈ sR̂ ∩ m2 R̂. Setting t = ǫs − b, this implies y = t + γ and hsi = hti ∈ R̂. From (14.1) we get N a b pA N f = tp + tuN − γ p − γuN 1 u2 + u1 u2 (u1 + u2 ) 1 u2 . (14.10) From Definition 7.2 (3), this implies δ(f, t, u) ≤ c = max{i| γ ∈ ni }. Since δ(f, y, u) = A + 1 by Claim 14.6, Lemma 14.4 (2) implies A < δ(f, t, u) and hence c ≥ A + 1. This completes the proof of the claim.  To ease the notation, we write R, X, Z for R̂, X̂, Ẑ in what follows. Write γ =Γ+θ with θ ∈ nA+2 and Γ = 0 or Γ ∈ k[u1 , u2 ] homogeneous of degree A + 1, and let C = max{m ∈ N ∪ {∞} | (u1 + u2 )m |Γ}. There are two cases: Case C 6= A: In this case (14.10) implies N pB f = tp + tuN 1 u2 + (u1 + u2 ) H(u1 , u2 ) + φ, where B = min{C, A}, and H(u1, u2 ) ∈ k[u1 , u2 ] is homogeneous of degree p(A + 1 − B) which is not divisible by u1 + u2 , and φ ∈ np(A+2) . Now we consider the sequence I. Let t′ = t/u1 and t(q) = t′ /uq1 . By the same argument as in the proof of Claim 14.5, we can show that (t′ , u1, v) (resp. (t(q) , u1 , v (q) )) is a system of regular parameters for R′ = OZ ′ ,x′ (resp. Rq = OZq ,xq ). We compute p p(A+1) ′ pB f ′ = t′ + λt′ u12N −p+1 + µ′ upA + u1 1 v φ, p(A+2) where λ = (v − 1)N ∈ R′ × , and µ′ = H(1, u2/u1 ) ∈ k[v] ⊂ R′ , and φ′ = φ/u1 ∈ ′ ′× ′ b k[[u1 , u2 ]][v] ⊂ R . Note µ ∈ R since H(u1, u2 ) is not divisible by u1 + u2 . From this we compute 2N −p+1+q(1−p) f (q) = (t(q) )p + λt(q) u1 p(A+q(B−1)) + µ′ u 1 By Definition 7.2 (3), this implies δ(f (q) , t(q) , (u1, v (q) )) ≤ A + q(B − 1) + B. 156 p(A+1−q) ′ (v (q) )pB + u1 φ. A+ faster under blow-ups 1 p true polyhedron ∆(f, z, (u1 , v)) slower B “phantom polyhedron”∆(f, t, (u1 , v)) A Setting σq = δ(f (q) , z (q) , (u1, v (q) )) − δ(f (q) , t(q) , (u1, v (q) )), and noting A ≥ B, we get  q+1 1 1 − A + q(B − 1) + B ≥ , σq ≥ A + q(A − 1 + ) + A + p p p from Claim 14.7. Hence σq > 1 for q = p, which contradicts Lemma 14.4(2) since (f (q) , z (q) , (u1 , v (q) )) is a δ-prepared label of (Xq , Zq ) at xq and the strict transform Wq ⊂ Spec(Rq ) of W has maximal contact with Xq ×Zq Spec(Rq ) at xq by Definition 14.1. Case C = A: There exist c1 , c2 ∈ k with c1 6= c2 and (c1 , c2 ) 6= (0, 0) such that γ = (u1 + u2 )A (c1 u1 + c1 u2 ) + θ with θ ∈ nA+2 ⊂ k[[u1 , u2 ]]. From (14.10) we get  N pA f = tp + tuN ua1 ub2 − (c1 u1 + c2 u2 )p + φ, 1 u2 + (u1 + u2 ) N p(A+2) where φ = −θp − γuN . 1 u2 ∈ n Assume c2 6= 0 and consider the sequence II. Let t(q) = t/uq2 . By the same argument as in (q) the proof of Claim 14.5, we can show that (t(q) , u1 , u2) is a system of regular parameters of Rq = OZq ,xq . We compute (q) N +q(N +1−p) f (q) = (t(q) )p + t(q) (u1 )N u2 p(A+2) where φ′ = φ/u2 (q) p(A+1−q) + ξu2 p(A+2−q) ′ + u1 φ, ∈ Rq and (q) a(q−1) ξ = (u1 u2q−1 + 1)pA (u1 )a u2 (q) − (c1 u1 u2q−1 + c2 )p Here we have used a + b = p. By Definition 7.2 (3), this implies (q) δ(f (q) , t(q) , (u1 , u2 )) ≤ A + 1 − q. 157  ∈ Rq× . Set σq = δ(f (q) , z (q) , (u1, v (q) )) − δ(f (q) , t(q) , (u1, v (q) )). Then Claim 14.8 implies   qa a σq ≥ 1 + A + q( − 1) − A + 1 − q ≥ . p p Hence σq > 1 for q = p, which contradicts Lemma 14.4 (2) by the same reason as in the previous case. It remains to treat the case c1 6= 0. By symmetry, the proof is given by the same argument using the sequence III instead of II. This completes the proof of Theorem 14.3. 158 15 An alternative proof of Theorem 5.17 We give another proof of Theorem 5.17 which uses more classical tools in algebraic geometry. Recall that the Hilbert polynomial P = P (A) of a graded k-algebra A (for a field k) is the unique polynomial in Q[T ] with P (n) = H(A)(n) for n ≫ 0. It is known that the degree of P (A) is dim(A)−1 where, by definition, the zero polynomial has degree −1. The following property is well-known (see [AP] (Corollary 3.2 and following remarks for a proof). Lemma 15.1 A polynomial P (T ) ∈ Q[T ] is the Hilbert polynomial of a standard graded k-algebra A if and only if (15.1)         T + as − s + 1 T + ai − i + 1 T + a2 − 1 T + a1 + ...+ + ...+ + P (T ) = as ai a2 a1 for certain integers a1 ≥ a2 ≥ . . . ≥ as ≥ 0 with s ≥ 0. Moreover, one has deg(P ) = a1 for s 6= 0, and the family a(P ) := (a1 , . . . , as ) is uniquely determined by P . The equality a1 = dim(A) − 1 follows from the fact that   (T + ai − i + 1)(T + ai − i) · · · (T − i + 2) T + ai − i + 1 = ai ai ! has degree ai . The case P (T ) = 0 is obtained as the case where s = 0 and a(P ) is the empty family. The lemma also shows that the set HP of all Hilbert polynomials of standard graded k-algebras does not depend on k. Recall that HP is totally ordered with respect to the ordering (15.2) P (T ) ≥ P ′(T ) ⇐⇒ P (n) ≥ P ′ (n) for n ≫ 0. We shall need the following description of this ordering. Lemma 15.2 For two Hilbert polynomials P, P ′ ∈ HP one has P ≥ P ′ if and only if a(P ) ≥ a(P ′ ) in the lexicographic ordering (where we formally fill up the shorter family with entries −∞ at the right until it has the same length as the longer family). Proof Since P = P ′ ⇐⇒ a(P ) = a(P ′ ), and since both orderings are total orderings, it suffices to show that P > P ′ implies a(P ) > a(P ′). Let a(P ) = (a1 , . . . , as ) and a(P ′ ) = (b1 , . . . , bt ), and assume P > P ′ . We proceed by induction on min(s, t). If min(s, t) = 0, then we must have t = 0 and P 6= 0, so that a(P ) > a(P ′ ). If s, t ≥ 1 and deg(P ) > deg(P ′ ), then a1 > b1 and hence a(P ) > a(P ′ ). If a1 = b1 , then for     T + a1 T + a1 ′ ′ , P1 (T ) = P (T ) − P1 (T ) = P (T ) − a1 a1 the polynomials Q(T ) = P1 (T + 1) and Q′ (T ) = P1′ (T + 1) are again Hilbert polynomials by Lemma 15.1, with associated invariants a(Q) = (a2 , . . . , as ) and a(Q′ ) = (b2 , . . . , bt ), respectively, and P > P ′ implies Q > Q′ , so that a(Q) > a(Q′ ) in the lexicographic ordering by induction. Together with a1 = b1 this implies the claim for P and P ′. 159 Lemma 15.2 immediately implies: Theorem 15.3 In the ordered set HP , every strictly descending sequence P1 > P2 > P3 > . . . is finite. Now let HF ⊂ NN be the set of all Hilbert functions of standard graded k-algebras. For ν ∈ HF , write Pν for the associated Hilbert polynomial. We trivially have (15.3) ν ≥ ν′ =⇒ Pν ≥ Pν ′ . Let X be an excellent scheme. For x ∈ X, let PX (x) be the Hilbert polynomial associated to HX (x) and let P -max ΣX = {ν ∈ ΣX | Pν = PXmax } and XP -max = ∪ P -max ν∈ΣX X(ν), where PXmax = max{PX (x) | x ∈ X}. Theorem 1.33 implies: Lemma 15.4 XP -max is closed in X. P -max P -max In fact, if ν ∈ ΣX and µ ≥ ν, then µ ∈ ΣX by (15.3), so that XP -max is the union of the finitely many closed sets X(≥ ν) for ν ∈ ΣPX-max . Theorem 2.10 (1) and (15.3) imply ≤ PXmax. Lemma 15.5 If π : X ′ −→ X is a permissible blow-up, then PXmax ′ Another proof of Theorem 5.17 Suppose there exists an infinite sequence X = X0 ← X1 ← . . . of Σmax -eliminations such that no Xn is locally equisingular. For each n ≥ 0 let Xn0 ⊆ Xn be the union of those connected components of Xn which are not equisingular, 0 and let Yn = (Xn0 )P -max . Then Xn+1 ⊆ πn−1 (Xn0 ), so by Remark 5.13 (a) and Lemma 15.5 max we have PXmax ≤ PXmax = PXmax for all 0 0 . By Theorem 15.3 we may assume that PX 0 0 n n n+1 n+1 n ≥ 0. By Theorem 2.10 this implies πn (Yn+1 ) ⊂ Yn , and we get an infinite sequence of proper morphisms Y = Y0 ← Y1 ← · · · . By Lemma 15.7 below one can choose a sequence of points xn ∈ Yn for n = 0, 1, . . . such that xn = πn (xn+1 ). By [H2] Theorem (1.B) and Theorem 2.10 (3) we may assume HXn (xn ) = HXn+1 (xn+1 ) for all n ≥ 0, so that there for some n. exists a ν0 ∈ HF such that ν0 ∈ ΣPXn0 for all n ≥ 0. We claim that ν0 ∈ Σmax 0 Xn m 0 Then 5.15 (ME2) contradicts ν0 ∈ ΣXn+1 . Let Sn = {ν ∈ ΣXn0 ax | ν > ν0 }. We want to show Sn = ∅ for some n. Let ν1 , . . . , νr be the elements of S0 and put Λ = {µ ∈ HF | ν0 ≤ µ < νi for some i ∈ [1, r]}. Thus the claim follows from the following: Lemma 15.6 Λ is finite, Sn ⊂ Λ, and Sn ∩ Sm = ∅ if n 6= m ≥ 0. Proof The first claim follows from the assumption that Pνi = Pν so that there exists N > 0 such that ν0 (n) = νi (n) for all n ≥ N and all i = 1, . . . , r. The second and third claim follow from 5.15 (ME3) and (ME2), respectively.  160 π π π 0 1 2 Lemma 15.7 Let Z0 ←− Z1 ←− Z2 ←− · · · be an infinite sequence of proper morphisms of non-empty noetherian schemes. Then there exists a sequence of points xn ∈ Zn (n = 0, 1, 2, . . . ) such that xn = πn (xn+1 ). Proof For m > n ≥ 0, let πn,m : Zm → Zn be the composite of πi for i = n, . . . , m−1 and put Zn,m = πn,m (Zm ). By the properness, Zn,m is non-empty and closed in Zn . Clearly we have Zn ⊃ Zn,n+1 ⊃ Zn,n+2 ⊃ · · · and (15.4) Zn,l = πn,m (Zm,l ) for l > m > n. Put Zn,∞ = ∩ Zn,m . By the Noetherian condition, there exists N(n) > n such that m>n Zn,∞ = Zn,N (n) so that Zn,∞ 6= ∅. Then (15.4) implies Zn,∞ = πn,m (Zm,∞ ) for m > n. Thus we get an infinite sequence of proper surjective morphisms Z0,∞ ← Z1,∞ ← Z2,∞ ← · · · , which inductively gives the desired claim.  161 16 Functoriality, locally noetherian schemes, algebraic spaces and stacks In this section we reformulate the obtained functoriality for our resolution and apply this to obtain resolution of singularities for (two-dimensional) locally noetherian excellent schemes, algebraic spaces and algebraic stacks. Definition 16.1 Let X be a noetherian excellent scheme of dimension at most two. The resolution morphism r = r(X) : X ′ = R(X) −→ X is defined as the composition of the morphisms X ′ = Xn → . . . X1 → X0 = X in the canonical resolution sequence of Theorem 0.1 (or, what amounts to the same, of the morphisms in the canonical resolution sequence S0 (X, ∅) of Theorem 5.6 (b)). Then we can state the functoriality in the mentioned theorems as follows. Theorem 16.2 (a) If α : U → X is an étale morphism, then there is a unique morphism α′ = R(α) : R(U) → R(X) making the diagram R(α) R(U) −−−→ R(X)   r(X)  r(U )y y α U −−−→ X commutative. Moreover, the diagram is cartesian. (b) The same functoriality holds for a boundary B on X and the analogous resolution morphism r(X, B) : X ′′ = R(X, B) → X obtained from Theorem 5.6 by composing the morphisms in S(X, B), and for an embedded situation (X, Z, B) as in the Theorem 5.9 and the resolution morphism r(X, Z, B) : (X ′′′ , Z ′′′ , B′′′ ) → (X, Z, B) obtained by composing the morphisms in the sequence S(X, Z, B) of that theorem. (c) More generally, let X be of arbitrary dimension, let B be a boundary on X, let α : X ∗ → X be a flat morphism with geometrically regular fibers (e.g., a smooth morphism), and let B∗ be the pull-back of B to X ∗ . Assume that the canonical resolution sequence constructed by Remark 5.29 and Corollary 5.27 for (X, B) is finite. Then the corresponding sequence for (X ∗ , B∗ ) is finite as well, and there is a unique morphism α′ = R(α) : R(X ∗ , B∗ ) → R(X, B) making the diagram α′ =R(α) (X ∗ )′ = R(X ∗ , B∗ ) −−−−−→ R(X, B) = X ′   r:=r(X,B)  r ∗ :=r(X ∗ ,B∗ )y y α X∗ −−−→ X commutative, where the vertical morphisms are the compositions of the morphisms in the respective resolution sequences. Moreover, the diagrams are cartesian, and the boundary (B∗ )′ on (X ∗ )′ is the pull-back of the boundary B′ on X ′ . Proof The finiteness of the resolution sequence for (X ∗ , B∗ ), the existence of α′ and the fact that the diagram is cartesian follow from Proposition 5.31 (ii). Since r(X, B) is the composition of a sequence X ′ = Xn → Xn−1 → . . . → X1 → X0 = X of blow-ups, the uniqueness follows from the following Lemma. 162 Lemma 16.3 Consider a cartesian diagram of schemes α′ (Y )′ −−−→   ρy Y α X′  r y −−−→ X , where α is flat and r is a composition of blow-ups. Then α′ is the unique morphism making the diagram commutative. Proof Let β be another morphism making the diagram commutative. Write π as the composition of blow-ups X ′ = Xn → Xn−1 → . . . → X1 → X0 = X. Then we get a commutative diagram with cartesian squares Y′ = αn =α′ −→ Yn ↓ .. . Ym+1 ↓ Ym ↓ .. . Y = ↓ Y0 αm+1 −→ α m −→ α0 =α −→ Xn ↓ .. . = X′ Xm+1 ↓ πm Xm ↓ .. . ↓ X0 = X′ . Since α is flat, all αm are flat as well. Hence, if πm : Xm+1 → Xm is the blow-up in Dn , the morphism Ym+1 → Ym identifies with the blow-up in Ym ×Xm Dm . Write rm : Xn → Xm for the composition in the right column and ρm : Yn → Ym for the composition in the left column. We show inductively that rm β = rm α ′ , (16.1) which gives the claim for m = n, where rn = id. By assumption (16.1) holds for m = 0, since r0 β = rβ = αρ = rα′ = r0 α′ . If equation (16.1) holds for m, then we show it −1 Jm OXm+1 is for m + 1 as follows. If Jm is the ideal sheaf of Dm in Xm , then L1 = πm an invertible sheaf on Xm+1 by the universal property of blow-ups. Since αm+1 is flat, −1 L2 = αm+1 L1 OYm+1 is invertible on Ym+1 . Then L3 = ρ−1 m L2 OYn is invertible on Yn . In ′ fact, for any blow-up morphism f : Z → Z it is obvious that f −1 MOZ ′ is invertible for any invertible ideal sheaf M on Z. Consider the morphism ϕ = rm β = rm α′ = αm ρm = πm αm+1 ρm+1 : Yn −→ Xm . Since we have shown that ϕ−1 Jm OYn is invertible, it follows by the universal property of the blow-up πm : Xm+1 → Xm that there is a unique morphism ψ : Yn → Xm+1 with πm ψ = ϕ. Since πm rm+1 β = rm β = ϕ = rm α′ = πm rm+1 α′ , we get rm+1 β = rm+1 α′ as wanted. First we apply this to obtain resolution of singularities for excellent schemes of dimension ≤ 2 which are only locally noetherian, and not necessarily noetherian. 163 Theorem 16.4 Let X be an excellent scheme of dimension ≤ 2. Then there exists a canonical resolution morphisms r = r(X) : X ′ = R(X) −→ X for X, and r(X, B) : X ′′ = R(X, B) → X for each boundary B on X, and r(X, Z, B) : (X ′′′ , Z ′′′ , B′′′ ) → (X, Z, B) for each embedded situation (X, Z, B) with regular excellent Z and normal crossings divisor B on Z, which satisfy the same properties as the corresponding morphisms in Theorem 16.2. Proof This follows from Theorem 16.2 by looking at an open cover (Ui )i∈I of X by noetherian (excellent) schemes and gluing the corresponding morphisms for the Ui by the uniqueness on the intersections. By the same argument, the uniqueness and functorial properties follow. Finally we apply this to get resolution for algebraic stacks of dimension ≤ 2. Theorem 16.5 Let X be an excellent algebraic stack for a Grothendieck topology whose coverings are flat morphisms with geometrically regular fibers (e.g., a Deligne-Mumford stack or an Artin stack). Assume that there is a representable covering morphism X → X in the chosen topology such that X is an excellent scheme with dim(X) ≤ 2. Then there exists a proper surjective morphism X ′ → X of stacks such that X ′ is regular. Proof This follows from theorem 16.4 and the functoriality obtained in there, in the same way as in [Te] section 5.2: By the assumption one may represent X by a groupoid scheme s R⇒X t (with the usual further structural morphisms m, e and i) such that R and X are excellent schemes and the morphisms s and t are flat with regular fibers. By the functorial resolution for X (which then gives finiteness for the canonical resolution strategy for R as well, by 16.2 (c) and using s, say) one defines the structural morphism s′ by the cartesian diagram s′ R′ −−−→   r(R)y s X  r(X) y R −−−→ X with the vertical resolution morphisms, in the same way one defines t′ from t, and similarly one defines the ‘composition’ structural morphism m′ by the cartesian diagram m′ R′ ×t′ X ′ s′ R′ = (R ×tXs R)′ −−−→   r(R×tXs R)y R ×tXs R 164 m R′  r(R) y −−−→ R with vertical resolution morphisms, since m is flat with regular fibers as well. The further structural morphisms e, i are obtained via base change, and the rules for s′ , t′ , m′ , e′ and i′ follow by the functoriality from those for s, t, m, e and i, because the equalities are checked on flat morphisms with regular fibers. In the special case of an algebraic space one sees that one gets a resolution by an algebraic space again. 165 References [Ab1] S. S. Abhyankar, Local uniformization on algebraic surfaces over ground fields of characteristic p 6= 0, Ann. of Math. (2) 63 (1956), 491–526. [Ab2] S. S. Abhyankhar, Resolution of singularities of arithmetical surfaces. 1965 Arithmetical Algebraic geometry (Proc. Conf. Purdue Univ., 1963) pp. 111– 152 Harper and Row, New York. [Ab3] S. S. Abhyankar, An algorithm on polynomials in one indeterminate with coefficients in a two dimensional regular local domain. Ann. Mat. Pura Appl. (4) 71 1966 25–59. [Ab4] S. S. Abhyankar, Resolution of singularities of embedded algebraic surfaces. Pure and Applied Mathematics, Vol. 24 Academic Press, New York-London 1966 ix+291 pp. [Ab5] S. S. Abhyankar, Nonsplitting of valuations in extensions of two dimensional regular local domains. Math. Ann. 170 1967 87–144. [Ab6] S. S. Abhyankar, Good points of a hypersurface. Adv. in Math. 68 (1988), no. 2, 87–256. [AHV] Aroca, H. Hironaka, J. L. J. Vicente, The theory of the maximal contact. Memorias de Matemática del Instituto “Jorge Juan”, No. 29. [Mathematical Memoirs of the “Jorge Juan” Institute, No. 29] Instituto “Jorge Juan” de Matemáticas, Consejo Superior de Investigaciones Cientificas, Madrid, 1975. 135 pp. [AH] M. Aschenbrenner, R. Hemmecke, Finitenness theorems in stochastic integer programming. Found. Comp. Math. 7 (2007), no. 2, 183–227. [AP] M. Aschenbrenner, W. Y. Pong, Orderings of monomial ideals, Fund. Math. 181 (2004), no. 1, 27–74. [Be] B. Bennett, On the characteristic functions of a local ring, Ann. of Math. 91 (1970), 25–87. [BM1] E. Bierstone, P. D. Milman, Canonical desingularization in characteristic zero by blowing up the maximum strata of a local invariant. (English summary) Invent. Math. 128 (1997), no. 2, 207–302. [BM2] E. Bierstone, P. D. Milman, Uniformization of analytic spaces. J. Amer. Math. Soc. 2 (1989), no. 4, 801–836. [Co1] V. Cossart, Desingularization of embedded excellent surfaces, Tohoku Math. J. 33 (1981), 25–33. [Co2] V. Cossart, Desingularization: a few bad examples in dim. 3, characteristic p > 0, (English summary) Topics in algebraic and noncommutative geometry (Luminy/Annapolis, MD, 2001), 103–108, Contemp. Math., 324, Amer. Math. Soc., Providence, RI, 2003. 166 [CGO] V. Cossart, J. Giraud, U. Orbanz, Resolution of surface singularities. With an appendix by H. Hironaka. Lecture Notes in Mathematics, 1101. SpringerVerlag, Berlin, 1984. [CP1] V. Cossart, O. Piltant, Resolution of singularities of threefolds in positive characteristic. I. Reduction to local uniformization on Artin-Schreier and purely inseparable coverings. (English summary) J. Algebra 320 (2008), no. 3, 1051– 1082. [CP2] V. Cossart, O. Piltant, Resolution of singularities of threefolds in positive characteristic. II. J. Algebra 321 (2009), no. 7, 1836–1976. [CLO] D. Cox, J. Little, D. O’Shea, Ideals, varieties, and algorithms. An introduction to computational algebraic geometry and commutative algebra. Second edition. Undergraduate Texts in Mathematics. Springer-Verlag, New York, 1997.xiv+536pp. [Cu1] S. D. Cutkosky, Resolution of singularities. Graduate Studies in Mathematics, 63. American Mathematical Society, Providence, RI, 2004. viii+186. [Cu2] S. D. Cutkosky, Resolution of singularities for 3-folds in positive charactersitic. preprint, 55 pp. [dJ] A. J. de Jong, Smoothness, semi-stability and alterations. Inst. Hautes tudes Sci. Publ. Math. No. 83 (1996), 51–93. [EH] S. Encinas, H. Hauser, Strong resolution of singularities in characteristic zero. (English summary) Comment. Math. Helv. 77 (2002), no. 4, 821–845. [Gi1] J. Giraud, Etude locale des singularité, Cours de 3e cycle, 1971–1972, Orsay, Publication 26. http://portail.mathdoc.fr/PMO/PDF/G GIRAUD-50.pdf [Gi2] J. Giraud, Sur la théorie du contact maximal. (French) Math. Z. 137 (1974), 285–310. [Gi3] J. Giraud, Contact maximal en caractéristique positive. (French) Ann. Sci. cole Norm. Sup. (4) 8 (1975), no. 2, 201–234. [Ha] H. Hauser, Excellent surfaces and their taut resolution, Resolution of singularities (Obergurgl, 1997), 341–373, Progr. Math., 181, Birkhuser, Basel, 2000. [H1] H. Hironaka, Resolution of singularities of an algebraic variety over a field of characteristic zero: I-II, Ann. of Math. 79 (1964), 109–326. [H2] H. Hironaka, On the characters ν ∗ and τ ∗ of singularities, J. Math. Kyoto Univ. 7 (1967), 19–43. [H3] H. Hironaka, Characteristic polyhedra of singularities, J. Math. Kyoto Univ. 7 (1967), 251–293. [H4] H. Hironaka, Certain numerical characters of singularities, J. Math. Kyoto Univ. 10 (1970), 151–187. 167 [H5] H. Hironaka, Additive groups associated with ponts of a projective space, Ann. of Math. 92 (1970), 327–334. [H6] H. Hironaka, Desingularization of excellent surfaces, Advanced Science Seminar in Algebraic Geometry, (summer 1967 at Bowdoin College), Mimeographed notes by B. Bennet, Appendix to [CGO], 99–132. [H7] H. Hironaka, Idealistic exponents of singularity, Algebraic geometry (J. J. Sylvester Sympos., Johns Hopkins Univ., Baltimore, Md., 1976), pp. 52–125. Johns Hopkins Univ. Press, Baltimore, Md., 1977. [Ja] U. Jannsen, Resolution of singularities for embedded curves. Appendix to [SS]. [JS] U. Jannsen, S. Saito, Kato conjecture and motivic cohomology over finite fields, preprint 2007. [Ku] E. Kunz, Introduction to Commutative Algebra and Algebraic Geometry, Birkhäuser Boston, Inc., Boston, MA, 1985. [Li] J. Lipman, Desingularization of two-dimensional schemes, Ann. Math. (2) 107 (1978), no. 1, 151–207. [Macl] D. Maclagan, Antichains of monomial ideals are finite. Proc. Amer. Math. Soc. 129 (2001), no. 6, 1609–1615 (electronic). [Miz] H. Mizutani, Hironaka’s additive group schemes, Nagoya Math. J. 52 (1973), 8595. [Nag] M. Nagata, A generalization of the imbedding problem of an abstract variety in a complete variety. J. Math. Kyoto Univ. 3 (1963), 89–102. [Na1] R. Narasimhan, Hyperplanarity of the equimultiple locus. Proc. Amer. Math. Soc. 87 (1983), no. 3, 403–408. [Na2] R. Narasimhan, Monomial equimultiple curves in positive characteristic. Proc. Amer. Math. Soc. 89 (1983), no. 3, 402–406. [SS] S. Saito, K. Sato, A finiteness theorem for zero-cycles over p-adic fields, Ann. of Math. (2008), to appear. [Si1] B. Singh, Effect of a permissible blowing-up on the local Hilbert functions, Invent. Math. 26 (1974), 201–212. [Si2] B. Singh, Formal invariance of local characteristic functions, Seminar D. Eisenbud/B. Singh/W. Vogel, Vol. 1, pp. 44–59, Teubner-Texte zur Math., 29, Teubner, Leipzig, 1980. [Te] M. Temkin, Functorial desingularization of quasi-excellent schemes in characteristic zero: the non-embedded case. preprint 2009, arXiv:0904.1592, 30 pages. [Vi] O. Villamayor U., Patching local uniformizations. (English summary) Ann. Sci. École Norm. Sup. (4) 25 (1992), no. 6, 629–677. 168 [Za1] O. Zariski, The reduction of the singularities of an algebraic surface, Ann. of Math. (2) 40, (1939). 639–689. [Za2] O. Zariski, A simplified proof for the resolution of singularities of an algebraic surface, Ann. of Math. (2) 43, (1942). 583–593. [Za3] O. Zariski, Reduction of the singularities of algebraic three dimensional varieties, Ann. of Math. (2) 45, (1944). 472–542. [EGA II] A. Grothendieck, J. Dieudonné, Eléments de géométrie algébrique II, Publ. Math. I.H.E.S. , No. 5 (1961). [EGA IV] A. Grothendieck, J. Dieudonné, Eléments de géométrie algébrique IV, Publ. Math. I.H.E.S. , 1: No. 20 (1964), 2: No. 24 (1965), 3: No. 28 (1966), 4: No. 32 (1967). 169
0math.AC
arXiv:1703.01909v1 [cs.NE] 6 Mar 2017 Neuromorphic Hardware In The Loop: Training a Deep Spiking Network on the BrainScaleS Wafer-Scale System Sebastian Schmitt† Johann Klähn† Guillaume Bellec§ Andreas Grübl† Maurice Güttler† Andreas Hartel† Stephan Hartmann‡ Dan Husmann† Kai Husmann† Sebastian Jeltsch† Vitali Karasenko† Mitja Kleider† Christoph Koke† Alexander Kononov† Christian Mauch† Eric Müller† Paul Müller† Johannes Partzsch‡ Mihai A. Petrovici†k Stefan Schiefer‡ Stefan Scholze‡ Vasilis Thanasoulis‡ Bernhard Vogginger‡ Robert Legenstein§ Wolfgang Maass§ Christian Mayr‡ René Schüffny‡ Johannes Schemmel† Karlheinz Meier† {sschmitt, kljohann, agruebl, gguettle, ahartel, husmann, khusmann, sjeltsch, vkarasen, mkleider, koke, akononov, cmauch, mueller, pmueller, mpedro, schemmel, meierk}@kip.uni-heidelberg.de {stephan.hartmann, johannes.partzsch, stefan.schiefer, stefan.scholze, vasileios.thanasoulis, bernhard.vogginger, christian.mayr, rene.schueffny}@tu-dresden.de {guillaume, robert.legenstein, maass}@igi.tugraz.at † Heidelberg ‡ Technische University, Kirchhoff-Institute for Physics, Im Neuenheimer Feld 227, D-69120 Heidelberg Universität Dresden, Chair for Highly-Parallel VLSI-Systems and Neuromorphic Circuits, D-01062 Dresden § Graz University of Technology, Institute for Theoretical Computer Science, A-8010 Graz k University of Bern, Department of Physiology, Bühlplatz 5, CH-3012 Bern Abstract—Emulating spiking neural networks on analog neuromorphic hardware offers several advantages over simulating them on conventional computers, particularly in terms of speed and energy consumption. However, this usually comes at the cost of reduced control over the dynamics of the emulated networks. In this paper, we demonstrate how iterative training of a hardware-emulated network can compensate for anomalies induced by the analog substrate. We first convert a deep neural network trained in software to a spiking network on the BrainScaleS wafer-scale neuromorphic system, thereby enabling an acceleration factor of 10 000 compared to the biological time domain. This mapping is followed by the in-the-loop training, where in each training step, the network activity is first recorded in hardware and then used to compute the parameter updates in software via backpropagation. An essential finding is that the parameter updates do not have to be precise, but only need to approximately follow the correct gradient, which simplifies the computation of updates. Using this approach, after only several tens of iterations, the spiking network shows an accuracy close to the ideal software-emulated prototype. The presented techniques show that deep spiking networks emulated on analog neuromorphic devices can attain good computational performance despite the inherent variations of the analog substrate. I. I NTRODUCTION Recently, artificial neural networks (ANNs) have emerged as the dominant machine learning paradigm for many pattern recognition problems [1]. Although ANNs are to some extent inspired by the architecture of biological neuronal networks, they differ significantly from their biological counterpart in many respects. First, while the computation in biological neurons is performed through analog voltages in continuous time, ANNs are typically implemented on digital hardware Fig. 1. The BrainScaleS system as it is currently installed consisting of five cabinets, each containing four neuromorphic wafer-scale systems. Upstream connectivity to the control cluster is provided by the prominent red cables, each communicating at Gigabit speed. This enables fast system configuration and high-throughput spike in- and output. An additional rack hosts the support infrastructure comprising power supplies, servers, the control cluster, and network equipment. and thus operate in discretized time. Second, while the communication between neurons in an ANN is based on high-precision arithmetic and computed in discrete time steps, communication in biological neuronal networks is largely based on stereotypically shaped all-or-none voltage events in continuous time. These events are called action F potentials or spikes. In recent years, several large-scale analog G neuromorphic computing platforms have been developed [2] E G that better match these features of biological neural networks. I Due to their low power consumption and speedup compared to simulations run on conventional architectures, these systems are promising precursors for computing devices that can rival D C the computational capabilities and energy efficiency of the B A H human brain. H While spiking neural networks are in principle able to H emulate any ANN [3], it has been unclear whether neuromorphic hardware can be efficiently used to implement (a) (b) contemporary deep ANNs. One obstacle has been the lack of adequate training procedures. ANNs are typically trained by Fig. 2. (a) 3D-schematic of a BrainScaleS wafer module (dimensions: 50 cm × 50 cm × 15 cm) hosting the wafer (A) and 48 FPGAs (B). The positioning backpropagation, a learning algorithm that propagates high- mask (C) is used to align elastomeric connectors that link the wafer to the precision errors through the layers of the network. Recently the large main PCB (D). Support PCBs provide power supply (E & F) for the successful training of neural networks was demonstrated on on-wafer circuits as well as access (G) to analog dynamic variables such as neuron membrane voltages. The connectors for inter-wafer (USB slots) the TrueNorth chip, a fully digital spike-based neuromorphic and off-wafer/host connectivity (Gigabit-Ethernet slots) are distributed over design [4]. More specifically, performance on machine- all four edges (H) of the main PCB. Mechanical stability is provided by an learning benchmarks is not impaired by their hardware aluminum frame (I). (b) Photograph of a fully assembled wafer module. quantization constraints if, at each training step, the errors are computed with quantized parameters and binarized activations, Section III-A, we then describe the mapping of the neural before backpropagating with full precision. This advance network to the hardware, Section III-B. Subsequently, we however left the question open whether a similar strategy could describe the in-the-loop training in detail and demonstrate the be used for analog neuromorphic systems. Since TrueNorth is application of this procedure to a handwritten digit recognition fully digital, an exact software model is available. Therefore, task, Section III-C and Section IV. each parameter, neuron activations, and the corresponding gradients are available or can be appropriately approximated II. T HE B RAIN S CALE S WAFER -S CALE S YSTEM at any point in time during training. In contrast, the neural The BrainScaleS system follows the principle of so-called circuits on analog hardware are not as precisely controllable, “physical modeling”, wherein the dynamics of VLSI circuits making an exact mapping between the hardware and software are designed to emulate the dynamics of their biological domains challenging. archetypes instead of numerically computing them as in the In this work, we demonstrate the successful training of an conventional simulation approach of von Neumann archianalog neuromorphic system configured to implement a deep tectures. Neurons and synapses are implemented by analog neural architecture. The system we used is the BrainScaleS circuits that operate in continuous time, governed by time wafer-scale system, a mixed-signal neuromorphic architecture constants which arise from the properties of the transistors that features analog neuromorphic circuits with digital, event- and capacitors on the microelectronic substrate. In contrast to based communication. We implemented a training procedure real-time neuromorphic devices, see [8], the analog circuits similar to [4], but used only a coarse software model to on our system are designed to operate in a regime where approximate its behavior. We show that, nevertheless, the characteristic time constants (e.g., τ syn , τm ) are much smaller backpropagation algorithm is capable to adapt the synaptic than typical corresponding biological values. This defines our parameters of the neuromorphic network quite effectively intrinsic hardware acceleration factor of 10 000 with respect when running the training with the hardware in the loop. to biological real-time. The system is based on the ideas Similar approaches have already been used, in the context of described in [9] but in the meantime it has advanced from various network architectures, for smaller analog neuromor- a lab prototype to a larger installation comprising 20 wafer phic platforms, such as the HAGEN [5], [6] and Spikey [7] modules, see fig. 1. chips. For the parameter updates, we used the recorded activity A. The Wafer Module of the neuromorphic system, but computed the corresponding At the heart of the BrainScaleS wafer module, see fig. 2, is gradients using the parameters of the ANN. This adaptation a silicon wafer with 384 HICANN (High Input Count Analog was possible in spite of the fact that the algorithm had Neural Network) chips produced in 180 nm CMOS technology. no explicit knowledge about exact parameter values of the It comprises 48 reticles, each containing 8 HICANNs, that neurons and synapses in the BrainScaleS system. are connected in a post-processing step. Each chip hosts 512 The remainder of the article is structured as follows. neurons emulating Adaptive exponential integrate-and-fire In Section II, we describe the BrainScaleS neuromorphic (AdEx) dynamics [10], [11] being able to reproduce most of platform and discuss the extent of parameter variability in this the firing regimes discussed in [12]. When forming logical system. Starting from a simple approximate software model, neurons by combining up to 64 neuron circuits, a maximum 90 TABLE I H ARDWARE UTILIZATION AND POWER RATINGS FOR DIFFERENT NEURAL NETWORK ARCHITECTURES . MaxHW 384 22 445 4 030 000 13.6 Hz 10 000 550 GHz 3.6 nJ 384 196 608 43 253 760 40 Hz 10 000 17.3 THz 0.1 nJ input from 14 080 conductance-based synapses is reached where each circuit contributes with 220 synapses. While the synapse and neuron dynamics are emulated by the analog circuits in continuous time, action potentials are transported as digital data packets [13]. The action potentials, or spikes, are injected asynchronously into circuit-switched routing structures on the chip and can be statically routed to target synapses and transported off-chip as time-stamped digital events via a packet-based network [14], [15]. 48 Xilinx Kintex-7 FPGAs, one per reticle, provide an I/O interface for configuration and spike data. The connection between FPGAs and the control cluster network is established using standard Gigabit and 10-Gigabit-Ethernet. Auxiliary PCBs provide the BrainScaleS wafer-scale system with power, control and analog readout. The specified maximum design power of a single module is 2 kW. This operating point (MaxHW) assumes an average spike rate of 40 Hz applied to all hardware synapses. As there are currently no power management techniques in use, all numbers reported in table I are based on the maximum design power. Table I also provides data regarding hardware utilization for previously published neural network architectures [16]. B. Running Neuronal Network Experiments The BrainScaleS software stack transforms a user-defined abstract neural network description, i.e., network topology, model parameters and input stimuli, to a corresponding hardware-constrained experiment configuration. Descriptions of spiking neural networks are often formulated using dedicated languages. Most are based on either declarative syntax, e.g., NineML [17] or NeuroML [18], or use procedural syntax, e.g., the Python-based API called PyNN [19]. The current BrainScaleS system uses PyNN to describe neural network experiments based on experiences with previous implementations [20]. This design choice enables the use of the versatile software packages developed in the PyNN ecosystem, such as the Connection Set Algebra [21], Elephant [22] or Neo [23]. Starting from the user-defined experiment description in PyNN, the transformation process maps model neurons to hardware circuits, routes connections between neurons to create synapses, and translates the model parameters to hardware settings. This translation of neuron and synapse 80 70 20 60 50 15 # 352 14 375 3 470 000 4.8 Hz 12 000 200 GHz 10 nJ AI synaptic time constant [ms] HICANNs Neurons Synapses Average Rate (Bio) Speedup (Bio → HW) Total Rate (HW) Energy/Synaptic Event L2/3 Network[16] 40 10 30 20 5 10 0 200 300 400 500 600 700 800 900 DAC 0 0 10 101 synaptic time constant [ms] Fig. 3. Example for the calibration of the synaptic time constant. Left: measured synaptic time constants (y-axis) for different neurons as a function of the digital parameter (DAC, x-axis) controlling the responsible analog parameter. Right: measured synaptic time constant with (blue) and without (white) calibration for all neurons of a HICANN (right). 0 membrane potential [mV] Model Model[16] 25 −10 −20 −30 −40 −50 BrainScaleS Simulation 500 1000 1500 time [ms] 2000 2500 Fig. 4. Comparison of a recorded membrane trace to a neuron simulated with NEST. The neuron receives an excitatory Poisson stimulus of 20 Hz followed by inhibitory and then simultaneous excitatory and inhibitory Poisson stimuli of the same frequency. All calibrations are applied and the hardware response is converted to the emulated biological domains. model parameters requires calibration data, see Section II-C, as well as rules for the conversion between the biological and the hardware time and voltage domains. The result of the whole transformation process is a hardware-compatible, abstract experiment description which can be converted into low-level configuration data. After acquiring hardware access using a fair resource scheduling and queuing system based on SLURM [24], the hardware is configured and the experiment is ready to run on the system. Although the BrainScaleS software stack provides a userfriendly modeling interface and hides hardware specifics, all low-level settings are available to the expert user. In particular the experiments presented here make use of this feature, enabling fast iterative modification of synaptic weights and input stimuli. C. Calibration For each neuron, the calibration provides translation rules from target parameters, such as the membrane time constant, to a set of corresponding hardware control parameters. Thereby it accounts for circuit-to-circuit variations caused by the transistor mismatch inherent to the wafer manufacturing process. The data are stored in the hardware domains and two scaling rules are used for the conversion to the biological time and voltage domains. All time constants are scaled with the acceleration factor of 10 000, e.g., 1 µs hardware time corresponds to 10 ms of emulated biological time. Voltages are scaled according to Vhardware = Vbio × α + s, input layer hidden layer 1 label layer 2 3 .. . (1) where α is a unit-free scaling factor and s is an offset. From here on, all units are given in the biological domain if not stated otherwise. Fig. 3 exemplifies the calibration technique for the particular case of the synaptic time constant. For every neuron, the analog parameter controlling the synaptic time constant is varied and the resulting synaptic time constant is determined from a recorded post-synaptic potential. A fit to this data then provides the mapping from the desired synaptic time constant to the value of the control parameter. Calibration reduces the neuron-to-neuron variation significantly, but not perfectly. The remaining variability is mostly caused by the trial-to-trial variation of the analog parameter storage. Fig. 4 shows two membrane time courses comparing a calibrated silicon neuron to a numerical simulation with NEST [25]. In both cases, the same model parameters and input spike trains were used. Despite the overall match, it can be seen that the calibration is not perfect, e.g. for the neuron used in fig. 4, the inhibitory stimulus is weaker compared to the expectation from simulation. Due to the analog nature of the system, variations will always occur to a certain extent, rendering in-the-loop training essential for networks that are sensitive to parameter noise, as we discuss in the following. hidden layer .. . .. . .. . N −2 5 N −1 15 15 N 100 Fig. 5. Topology of the feed-forward neural network with one input layer, two hidden layers and one label layer. The dimension of the input layer is equal to the number of pixels of the input image. The number of label units is equal to the number of image classes the network is trained to recognize. 28 10 10 1.0 21 8 8 0.9 6 6 0.8 4 4 2 2 14 7 0 0 7 14 21 28 0 0 2 4 6 8 10 0 0.7 0.6 0 2 4 6 8 10 0.5 10 10 10 8 8 8 6 6 6 4 4 4 0.2 2 2 2 0.1 0.4 0.3 III. T RAINING A D EEP S PIKING N ETWORK 0 0 0 0.0 0 2 4 6 8 10 0 2 4 6 8 10 0 2 4 6 8 10 In the following, we describe our network model and training setup. Since we are using an abstract network of Fig. 6. Examples of the input data used during training. Original MNIST rectified linear units (ReLUs) and an equivalent spiking image of a “0” (upper left) vs. reduced-resolution image (lower left). Middle and right column: reduced-resolution images from the other four classes (“1”, network of leaky integrate-and-fire (LIF) neurons in parallel, “4”, “6”, “7”). we will first describe the networks structure in abstract terms. Our network is modeled as a feed-forward directed graph as shown in fig. 5. The input layer, consisting of 100 units, B. The resulting weights are converted to synaptic weights is used to represent the input patterns that the network later in an appropriately parametrized LIF network on the learns to classify. Each of these classes is represented by one BrainScaleS hardware. label unit. Between the input and label layers are two 15-unit C. The synaptic weights are further trained in a hardwarehidden layers that learn particular features in the input space. software training loop. The weights of the directed edges are learned during several phases of training, as described farther below. A. Software Model Our network was trained on a modified subset of the MNIST The training of the software model is performed similarly dataset of handwritten digits [26]. First, we decreased the to [27] using the TensorFlow [28] software with the properties resolution from 28 × 28 pixels to 10 × 10 pixels by bicubic detailed in the following. interpolation. To account for the lower dissimilarity of the 1) Input: The grayscale value of the input image pixels reduced resolution images, we restricted the dataset to the is transformed to a number between 0 and 1 and set as the five digit classes “0”, “1”, “4”, “6” and “7”. This results in a activation of the units in the input layer. training set of 30 690 and a test set of 5083 images. 2) Units: The output xk of ReLU unit k is given by The spiking neural network is then trained in three phases: X  A. The software model of the network with rectified linear xk = R Wkl xl , R(a) = max(0, a), (2) units (ReLUs) is trained with classical backpropagation. l TABLE II N EURON PARAMETERS AND TYPICAL POST- CALIBRATION VARIATIONS . Parameter Value Inhibitory Reversal Potential Reset Potential Resting Potential Spike Threshold Excitatory Reversal Potential Inh./Exc. Synaptic Time Constant Membrane Time Constant −80 mV −64 mV −40 mV −37.5 mV 0 mV 5 ms 20 ms Relative Variation 5% 2% 10 % 0.5 % 0.5 % 10 % 10 % where Wkl is the weight of the connection from unit l to unit k, R : R → R is the activation function of a ReLU, and the sum runs over all indices l of units from the previous layer. 3) Weights: The initial weights for layer n containing Nn units are drawn from a normal distribution with a mean of zero and standard deviation 1 , (3) σn = p Nn−1 where weight magnitudes > 2σn are dropped and re-picked. 4) Training: The network is trained by mini-batch gradientdescent with momentum [29] minimizing the cost function X X 2 2 1 C(W ) = 15 (ỹs − ŷs ) + (4) 2 λWkl , s∈S kl where W is the matrix containing all network weights, ŷs the one-hot vector for the true digit, ỹ = N2ndyhidden the scaled activity of the label layer and S the samples in the current batch of 100 samples. The first term in (4) is the euclidean distance between the predicted labels ỹ and the true labels ŷ, rewarding correct and penalizing wrong activity. The second term of (4) regularizes the weights with λ = 0.001, leading to the suppression of large weights to prevent overfitting. Per training step, the weights are updated according to ∆Wkl ← η∇Wkl C(W ) + γ∆Wkl , Wkl ← Wkl − ∆Wkl , (5) (6) where ∆Wkl is the change in weight, η = 0.05 is learning rate, and γ = 0.9 the momentum parameter. In foresight of the hardware implementation, Wkl is clipped to [−1, 1]. B. Neuromorphic Implementation 1) Input: The input image is converted to Poisson spike trains following [30]: cp νp = P · νtot , (7) p cp where νp is the firing rate of the input corresponding to the pth pixel, cp the grayscale value of the pth pixel and νtot is the targeted total firing rate the input layer receives. In our case, we set νtot = 2500 Hz. Each pattern is presented for 0.9 s followed by 0.1 s of silence to allow the activity to decay. 2) Hardware Configuration: The network is mapped to the BrainScaleS hardware using the software stack detailed in Section II-B. Neurons of all layers, including the input layer, are randomly placed on 8 HICANNs. For input and on-wafer routing, 6 additional chips are used. These 14 HICANNs are connected to 5 different FPGAs. For each artificial neuron, four hardware neuron circuits are connected to form one logical neuron to increase the number of possible inputs. Except for the stimulus to the input layer, each pair of neurons in consecutive layers is connected with both an inhibitory and an excitatory synapse. This allows the weights to change sign during learning without having to change the configured topology. Therefore, the hardware-emulated network has a total of 3700 synapses. 3) Neuron parameters: Despite the different input and output domain, the activation functions of ReLUs and LIF neurons share features, i.e., both have a threshold below which the output is zero and a positive gradient for suprathreshold input. Not all neuron features are required to mimic the ReLU behavior, therefore we disable the adaptation and exponential features of the AdEx model. The parameters and the neuron-toneuron variation after calibration, see Section II-C, are listed in table II. To allow a balanced representation of positive and negative weights, the reversal potentials have been chosen as symmetric around the resting potential. The refractory period is set as small as possible to be close to a linear relation of the input to the output activity. Equation (1) is used to convert to hardware units with α = 20 and s = 1800 mV, e.g., the target value of the resting potential on hardware equals 1 V. 4) Weights: The trained weights Wkl of the artificial 0 network are converted to the 4 bit hardware weights Wkl by 0 Wkl = round(|Wkl | × 15). (8) Positive (negative) weights are assigned to excitatory (inhibitory) synapses and the corresponding inhibitory (excitatory) synapse is turned off. C. Hardware In The Loop Section III-B laid out the necessary steps to convert the artificial network to a network of neurons in analog hardware. After conversion it was found that the classification accuracy was significantly reduced compared to the initially trained ANN. To compensate for the reduced classification accuracy, training was continued with the hardware in the loop, see fig. 7. In-the-loop training consists of a series of training steps, each of which is performed as follows. First, the neuron activity is recorded for a batch of training samples. These firing rates are then equated to the ReLU unit response, where we used the following heuristic for the label layer: ỹ = 30yHz . The resulting vector is used to compute the cost function C(W ) defined in (4). The weight updates are then computed using (5) using the ReLU activation function (2) as an approximation of the difficult-to-determine activation functions of the hardwareemulated neurons. For the experiments described here, we used the parameters η = 0.05, γ = 0 and a batch size of 1200 samples. neuromorphic substrates. However, two non-trivial problems exist. First, the input-output relationship of the abstract backpropagation units used in typical deep networks needs to be mapped to spiking neuron dynamics. Second, in case of analog hardware, distortions in these dynamics need to be take into account. The latter is especially problematic because the performance weight updates ReLU activity of the network usually relies on precise parameter training. Here, we have addressed these problems in the context of the BrainScaleS wafer-scale system, an accelerated analog neuromorphic platform that emulates biologically inspired 4 bit weight discretization spikes neuron models. For mapping activities from the abstract domain to spikes, we have used a rate-coding scheme. The translation of the network topology, including connectivity structure and parameters, was described in Section III-B. prediction MNIST BrainScaleS Following this mapping of a pretrained network to the forward pass hardware substrate, the resulting distortions in dynamics and parameters have been compensated by in-the-loop training, Fig. 7. Illustration of our in-the-loop training procedure. In an antecedent as described in Section III-C. step (not shown), a software-trained ReLU network, see fig. 5, is mapped to This two-stage approach was evaluated for a small network an equivalent LIF network on the BrainScaleS hardware. Each iteration of in-the-loop training consists of two passes. In the forward pass, the output trained on handwritten digits. In this exemplary scenario, it firing rates of the LIF network are measured in hardware. In the backward was possible to almost completely restore the performance pass, these rates are used to update the synaptic weights of the LIF network of the software-simulated abstract model in hardware. An by computing the corresponding weight updates in the ReLU network and mapping them back to the hardware. implicit, but essential component of our methodology is the fact that the backpropagation of errors needs not be precise: computing the cost function gradients using a ReLU activation IV. R ESULTS function is sufficient for adapting the weights in the spiking An example for the activity on the neuromorphic hardware network. This circumvents the difficulty of otherwise having during classification after in-the-loop training for one choice to determine an exact derivative of the cost function with of hardware neurons and initial software parameters can be respect to the LIF activation function, which would be further found in fig. 10. The figure shows the spike times of all exacerbated by the diversity of neuronal activation functions neurons in the network for five presented samples of every on the analog substrate. digit. An image is considered to have been classified correctly Here, the mapping-induced distortions in network dynamics if the neuron associated with the input digit shows the highest and configuration parameters have been compensated by activity of all label neurons. After training, all images are additional training. A complementary approach would be correctly classified, except for the first example of digit “6” to modify the network in a way that makes it more robust which was mistaken for a “4”. Comparing the weights before to hardware-induced distortions, as discussed, e.g., in [16]. and after in-the-loop training, see fig. 8, shows that only slight While rate-based approaches such as ours are inherently robust adjustments are needed to compensate for hardware effects. against jitter in the timing of spikes, robust architectures The evolution of the accuracy per training batch for both the become particularly important in single-spike coding schemes, software model and the in-the-loop training of the hardware is as discussed in [31]. shown in fig. 9 for 130 different sets of hardware neurons and The proof-of-principle experiments presented here were initial weights of the software model. The total classification part of the commissioning phase of the BrainScaleS system accuracy is computed as the sum of correctly classified and lay the groundwork for more extensive studies. The patterns divided by the total number of patterns in the test most interesting question to be addressed next is whether set. After 15 000 training steps, the accuracy of the software the results achieved here also hold for larger networks that model is 97 % with a negligible uncertainty arising from the can deal with more complex datasets. Once fully functional, choice of initial weights. Directly after converting the artificial our system will be able to accomodate such large networks network to the network of spiking neurons, the accuracy is without any scaling-induced reduction in processing time due +12 +1 reduced to 72 −10 %. It increases to 95 −2 % at the end of the to its inherently parallel nature. in-the-loop training, being close to the performance of the In the long run, the potentially most rewarding challenge software model with the uncertainty given by the interquartile will be to fully port the training to the hardware as well. range (IQR). To this end, an integrated plasticity processor [32] has been designed that will allow the emulation of different learning V. D ISCUSSION rules at runtime [33]. Learning can then also profit from the For problems involving spatial pattern recognition, deep acceleration that, for now, only benefits the operation of the neural networks have become state of the art. Almost by fully trained network. The use of analog spiking hardware definition, they should lend themselves to implementation in might then not only allow accelerated data processing with backward pass 1.0 15 0.9 before in-the-loop 0.8 0.7 0.6 0 0.5 0.4 0.3 0.2 0.1 -15 -15 0 after in-the-loop 15 -15 0 after in-the-loop 15 -15 0 after in-the-loop 0.0 15 Fig. 8. Correlation of hardware weights before and after in-the-loop training for the projections to the first (left) and second hidden layer (center) and the label layer (right). Weights that are zero before and after training are omitted. The relative frequency is encoded by both grayscale and area of the corresponding square. 1.0 accuracy on training batch 0.9 0.8 0.7 0.6 0.5 0.4 0.3 software model 0.2 0.1 BrainScaleS median, IQR 0 101 102 103 104 training step median, IQR 0 5 10 15 20 25 in-the-loop iteration 30 35 Fig. 9. Classification accuracy per batch as a function of the training step for the software model (left) and the in-the-loop iteration for the hardware implementation (right) for 130 runs. The uncertainty, given by the interquartile range (IQR), expresses the variations when repeating the software model with different initial weights and the in-the-loop training using different initial weights for the ReLU training and different sets of hardware neurons. pre-specified networks, but also facilitate fast training of biologically inspired architectures that can, in certain contexts, even outperform classical machine learning algorithms [34]. ACKNOWLEDGMENT This work has received funding from the European Union Sixth Framework Programme ([FP6/2002-2006]) under grant agreement no 15879 (FACETS), the European Union Seventh Framework Programme ([FP7/2007-2013]) under grant agreement no 604102 (HBP), 269921 (BrainScaleS) and 243914 (Brain-i-Nets) and the Horizon 2020 Framework Programme ([H2020/2014-2020]) under grant agreement no 720270 (HBP) as well as the Manfred Stärk Foundation. The authors wish to thank Simon Friedmann, Matthias Hock, Ioannis Kokkinos, Tobias Nonnenmacher, Lukas Pilz, Moritz Schilling, Dominik Schmidt, Sven Schrader, Simon Ziegler, and Holger Zoglauer for their contributions to the development and commissioning of the system, Würth Elektronik GmbH & Co. KG in Schopfheim for the development and manufacturing of the special wafer-carrier PCB used in the BrainScaleS wafer-scale system, and Fraunhofer-Institut für Zuverlässigkeit und Mikrointegration (IZM), Berlin, Germany for developing the post-processing technique which is required for wafer-wide communication and external connectivity to the wafer. The first two authors contributed equally to this work. R EFERENCES [1] Y. LeCun, Y. Bengio, and G. Hinton, “Deep learning,” Nature, vol. 521, no. 7553, pp. 436–444, May 2015. [2] S. Furber, “Large-scale neuromorphic computing systems,” J Neural Eng, vol. 13, no. 5, p. 051001, 2016. [3] W. Maass, “Fast sigmoidal networks via spiking neurons,” Neural Comput, vol. 9, no. 2, pp. 279–304, 1997. [4] S. K. Esser, P. A. Merolla, J. V. Arthur et al., “Convolutional networks for fast, energy-efficient neuromorphic computing,” Proc. Natl. Acad. Sci. U.S.A., 2016. [5] S. G. Hohmann, J. Fieres, K. Meier et al., “Training fast mixed-signal neural networks for data classification,” in Proc Int Jt Conf Neural Netw, vol. 4. IEEE Press, Jul. 2004, pp. 2647–2652. [6] J. Fieres, J. Schemmel, and K. Meier, “A convolutional neural network tolerant of synaptic faults for low-power analog hardware,” in Proceedings of 2nd IAPR International Workshop on Artificial Neural Networks in Pattern Recognition, ser. Springer Lecture Notes in Artificial Intelligence, vol. 4087. Ulm, Germany: Springer International Publishing, Aug. 2006, pp. 122–132. [7] T. Pfeil, A. Grübl, S. Jeltsch et al., “Six networks on a universal neuromorphic computing substrate,” Frontiers in Neuroscience, vol. 7, p. 11, 2013. X X X X X X 20 X X X X time [s] X 15 X X X X 10 X X X X X 5 X X X X 0 0 10 20 30 40 50 60 input layer 70 80 90 100 105 110 hidden layer 115 120 125 hidden layer 130 131 132 133 134 label layer Fig. 10. Spike raster plot of the neural activity of all layers on the neuromorphic hardware after in-the-loop training. Each horizontal dash denotes the time at which a certain neuron spiked. Five examples per digit are presented where in the plot same digits are denoted by the same background color. Correctly classified images are marked with a green circle. [8] S.-C. Liu, Event-based neuromorphic systems. John Wiley & Sons, 2015. [9] J. Schemmel, D. Brüderle, A. Grübl et al., “A wafer-scale neuromorphic hardware system for large-scale neural modeling,” in IEEE Int Symp Circuits Syst Proc, May 2010, pp. 1947–1950. [10] R. Brette and W. Gerstner, “Adaptive exponential integrate-and-fire model as an effective description of neuronal activity,” J. Neurophysiol., vol. 94, no. 5, pp. 3637–3642, 2005. [11] S. Millner, A. Grübl, K. Meier et al., “A VLSI implementation of the adaptive exponential integrate-and-fire neuron model,” in Adv Neur In, J. Lafferty, C. K. I. Williams, J. Shawe-Taylor et al., Eds., vol. 23, 2010, pp. 1642–1650. [12] R. Naud, N. Marcille, C. Clopath et al., “Firing patterns in the adaptive exponential integrate-and-fire model,” Biological Cybernetics, vol. 99, no. 4, pp. 335–347, Nov 2008. [Online]. Available: http://dx.doi.org/10.1007/s00422-008-0264-7 [13] J. Schemmel, J. Fieres, and K. Meier, “Wafer-scale integration of analog neural networks,” in Proc Int Jt Conf Neural Netw, Hong Kong, Jul. 2008. [14] V. Thanasoulis, B. Vogginger, J. Partzsch et al., “A pulse communication flow ready for accelerated neuromorphic experiments,” in IEEE Int Symp Circuits Syst Proc, Jun. 2014, pp. 265–268. [15] S. Scholze, S. Schiefer, J. Partzsch et al., “VLSI implementation of a 2.8 GEvent/s packet-based AER interface with routing and event sorting functionality,” Front Neurosci, vol. 5, p. 117, 2011. [16] M. A. Petrovici, B. Vogginger, P. Müller et al., “Characterization and compensation of network-level anomalies in mixed-signal neuromorphic modeling platforms,” PLoS ONE, vol. 9, no. 10, p. e108590, 2014. [17] I. Raikov, R. Cannon, R. Clewley et al., “NineML: the network interchange for neuroscience modeling language,” BMC Neuroscience, vol. 12, no. 1, p. P330, 2011. [18] P. Gleeson, S. Crook, R. C. Cannon et al., “NeuroML: A language for describing data driven models of neurons and networks with a high degree of biological detail,” PLoS Comput Biol, vol. 6, no. 6, p. e1000815, Jun. 2010. [19] A. P. Davison, D. Brüderle, J. Eppler et al., “PyNN: a common interface for neuronal network simulators,” Front Neuroinform, vol. 2, no. 11, 2008. [20] D. Brüderle, E. Müller, A. Davison et al., “Establishing a novel modeling tool: A python-based interface for a neuromorphic hardware system,” Front Neuroinform, vol. 3, no. 17, 2009. [21] M. Djurfeldt, “The connection-set algebra—a novel formalism for the representation of connectivity structure in neuronal network models,” Neuroinformatics, vol. 10, no. 3, pp. 287–304, 2012. [22] M. Denker, A. Yegenoglu, D. Holstein et al., “elephant: An open-source tool for the analysis of electrophysiological data.” in Proceedings of the 11th Meeting of the German Neuroscience Society, Neuroforum 2015. German Neuroscience Society, Mar 2015, pp. T27–2B. [23] S. Garcia, D. Guarino, F. Jaillet et al., “Neo: an object model for handling electrophysiology data in multiple formats,” Front Neuroinform, vol. 8:10, February 2014. [24] M. Jette and M. Grondona, “SLURM: Simple linux utility for resource management,” in Proceedings of ClusterWorld Conference and Expo, San Jose, California, 2003. [25] M.-O. Gewaltig and M. Diesmann, “NEST (NEural Simulation Tool),” Scholarpedia, vol. 2, no. 4, p. 1430, 2007. [26] Y. LeCun and C. Cortes, “The MNIST database of handwritten digits,” 1998. [Online]. Available: http://yann.lecun.com/exdb/mnist [27] Y. Cao, Y. Chen, and D. Khosla, “Spiking deep convolutional neural networks for energy-efficient object recognition,” Int J Comput Vis, vol. 113, no. 1, pp. 54–66, 2015. [28] M. Abadi, A. Agarwal, P. Barham et al., “TensorFlow: Large-scale machine learning on heterogeneous systems,” Google Research, Whitepaper, 2015, software available from tensorflow.org. [Online]. Available: http://tensorflow.org/ [29] N. Qian, “On the momentum term in gradient descent learning algorithms,” Neural Netw., vol. 12, no. 1, pp. 145–151, 1999. [30] P. O’Connor, D. Neil, S.-C. Liu et al., “Real-time classification and sensor fusion with a spiking deep belief network,” Front Neurosci, vol. 7, p. 178, 2013. [31] M. A. Petrovici, A. Schroeder, O. Breitwieser et al., “Robustness from structure: fast inference on a neuromorphic device with hierarchical LIF networks,” submitted to IJCNN 2017, 2016. [32] S. Friedmann, “The Nux processor v3.0,” Electronic Vision(s) Group, Kirchhoff-Institute for Physics, Heidelberg University, User Guide, 2015. [Online]. Available: https://github.com/electronicvisions/nux [33] S. Friedmann, J. Schemmel, A. Grübl et al., “Demonstrating hybrid learning in a flexible neuromorphic hardware system,” IEEE Trans. Biomed. Circuits Syst., vol. PP, no. 99, pp. 1–15, 2016. [34] L. Leng, M. A. Petrovici, R. Martel et al., “Spiking neural networks as superior generative and discriminative models,” in Cosyne Abstracts, Salt Lake City USA, February 2016.
9cs.NE
arXiv:1508.00371v3 [math.GR] 24 Aug 2016 Zeta functions of finite Schreier graphs and their zig zag products Asif Shaikh, Hemant Bhate Abstract We investigate the Ihara zeta functions of finite Schreier graphs Γn of the Basilica group. We show that Γ1+n is 2 sheeted unramified normal covering Z . In fact, for any n > 1, r ≥ 1 the of Γn , ∀ n ≥ 1 with Galois group 2Z n graph Γn+r is 2 sheeted unramified, non normal covering of Γr . In order to do this we give the definition of the generalized replacement product of Schreier graphs. We also show the corresponding results in zig zag product of Schreier graphs Γn with a 4 cycle. Mathematics Subject Classification (2010): 05C31, 05C50, 05C76, 20E08 Keywords: Ihara zeta functions, Schreier graphs, zig zag product of graphs, Basilica groups. 1 INTRODUCTION The main aim of this paper is to study the Ihara zeta functions of finite Schreier graphs Γn of the Basilica group as well as Ihara zeta functions of zig zag products of these Schreier graphs with a 4 cycle. The Ihara zeta function is a graph theoretic analogue of the Riemann zeta function ζ(s). It is defined for a connected graph G = (V, E), for t ∈ C, with |t| sufficiently small, by Y ζG (t) = (1 − tν(C) )−1 (1) [C] prime cycle in G where a prime [C] in G is an equivalence class of tailless, backtrackless primitive cycles C in G, length of C is ν(C). See [8]. The connection of ζG (t) with the adjacency matrix A of G is given by Ihara-Bass’s Theorem which says ζG (t)−1 = (1 − t2 )r−1 det(I − At + Qt2 ), 1 (2) where r = |E| − |V | − 1 = rank of fundamental group of G and Q is the diagonal matrix whose j th diagonal entry is Qjj = d(vj ) − 1, where d(vj ) is the degree of the j th vertex of G. The proof of the Ihara-Bass’s theorem can be found in [8]. We e is an unramified covering of a finite graph G if there is a say that finite graph G e covering map π : G → G which is an onto map such that for every vertex u ∈ G e is mapped by π and for every v ∈ π −1 (u), the set of points adjacent to v in G one-to-one, onto the vertices in G which are adjacent to u. A d-sheeted covering e→G e is a normal or Galois covering iff there are d graph automorphisms σ : G e These automorphisms form the Galois group such that π(σ(v)) = π(v), ∀ v ∈ G. e G = Gal(G|G). See [4, 8] for more details. Our motivation comes from a question raised by A. Terras [8] of how zeta functions behave with respect to graph products, in particular, zig zag products. We have been able to prove the following: If n > 1, then Γn+r z C4 is the non normal covering of the graph Γr z C4 . In fact if n = 1 then Γ1+r z C4 is 2 sheeted normal covering of the graph Γr z C4 . Thus ζ(Γr z C4 ) (u)−1 divides ζ(Γn+r z C4 ) (u)−1 , ∀n. In order to prove the above result a new generalized replacement product Γn g Γr has been defined for two Schreier graphs Γn , Γr which gives the resultant graph Γn g Γr is also the Schreier graph Γn+r . Also, If n > 1, then Γn+r is non normal covering of the graph Γr . In fact Γ1+r is 2 sheeted normal covering of the graph Γr and ζΓr (u)−1 divides ζΓn+r (u)−1, ∀n. This paper is organized as follows: In section 2, we define Schreier graphs of the Basilica group and give several examples. This section also contains the definition of generalized replacement product and the computations of Ihara zeta functions of these Schreier graphs using Artin L functions. This section ends with some results which will be needed in the next section. Section 3 starts with the definition of zig zag product of two graphs see [7, 3]. Computations of Ihara zeta functions of zig zag product of Schreier graphs with a 4 cycle are also presented. We also prove the corresponding results in zig zag product of graphs. 2 SCHREIER GRAPHS OF THE BASILICA GROUP Let X = {0, 1} be a binary alphabet. Denote X 0 the set consisting of the empty word and by X n = {w = x1 x2 · · · xn : xi ∈ X} the set of words of length n over the alphabet X, for each n ≥ 1. The Basilica group B acting on X n is the group generated by three state automaton. The states a and b of the automaton are the generators of the group. The action of a and b is given by a(0w) = 0b(w), a(1w) = 1w, b(0w) = 1a(w), b(1w) = 0w, ∀ w ∈ X n . 2 For each n ≥ 1, let Γn be the Schreier graph associated with the action of B on X n with V (Γn ) = X n and two vertices v, v ′ are are connected by an edge labeled by s near v and by s−1 near v ′ if s(v) = v ′ (i.e. s−1 (v ′ ) = v), where s ∈ {a±1 , b±1 }. As the action of B on X n is transitive, the graph Γn is a 4 regular connected graph on 2n vertices and labels near v are given by a±1 , b±1 for every v ∈ X n . We denote s(v) by v s , where v ∈ X n , s ∈ {a±1 , b±1 }. More information about such finite and infinite Schreier graphs of Basilica group a−1 b a 0 b−1 a−1 b b−1 a 1 a−1 b b−1a a−1b b−1 a−1 a b a b −1 10b −1 Γ1 −1 01b 00a 11 a Γ2 −1 a a b a−1 b a b−1 −1 a−1b b−1a 110 b a−1 010 a 100 b−1 b b 000 −1 b 101 b−1 b a−1b a a−1 001 a b−1 011 b−1 a−1 b a 111 a a−1 Γ3 1100 1010 0100 0000 1110 0110 0010 1000 1001 0001 0011 0101 0111 1111 1011 1101 Γ4 Figure 1: The graph Γ1 , Γ2 , Γ3 and Γ4 are the Schreier graphs of the Basilica group over X, X 2 , X 3 and X 4 respectively. can be found in [2, 3]. The complete classification (up to isomorphism) of the 3 limiting case of infinite Schreier graphs associated with the Basilica group acting on the binary tree, in terms of the infinite binary sequence is given by D. D’Angeli, A. Donno, M. Matter and T. Nognibeda[2]. D. D’Angeli, A. Donno and E. SavaHuss[3] have used Schreier graphs of Basilica groups in computations of zig zag product of graphs. The Basilica group belongs to the important class of selfsimilar groups and was introduced by R. Grigorchuk and A. Żuk[5]. Example 2.1. The first four finite Schreier graphs of Basilica group are as in Figure 1. The substitution rules [3, 6] can be used to construct the Schreier graph Γn+1 from the graph Γn . In the next sub section we give the new definition of the product of two Schreier graphs, we call it as generalized replacement product of Schreier graphs. 2.1 Generalized replacement product The replacement product of two graphs is well known in literature. If G1 and G2 are two regular graphs with the regularity d1 and d2 respectively, then their replacement product G1 r G2 is again a regular graph with regularity d2 + 1. The details about this product can be found in [3, 1]. Below is the generalization of this product, in which both G1 and G2 along with the resultant graph have same regularity. The motivation of generalized version is the following: Using any two Schreier graphs of the Basilica group we should be able to produce the resultant graph to be Schreier graph of the Basilica group. Let Γn and Γr be two Schreier graphs of Basilica group. To define their generalized replacement product, we first choose the spanning subgraph Γ′r of the graph Γr such that E(Γ′r ) = E(Γr )\{ea , eb } where ea and eb are the edges of the vertex u0 = 0r ∈ Γr with labels a and b near u0 respectively. Note that the vertex u0 = 0r we mean the word of length r and having all alphabets are 0. Let a(u0 ) = ua0 and b(u0 ) = ub0 be the vertices of Γ′r which are adjacent to u0 in Γr by the edges ea and eb respectively. Thus every vertex from the set X r \{u0 , ua0 , ub0} has degree d = 4 and d(u0 ) = 2, d(ua0 ) = d(ub0) = 3 (4 − d(u0)) + (4 − d(ua0 )) + (4 − d(ub0 )) = 2 + 1 + 1 = 4 Note that in above equation sum of LHS should be the regularity d of the graph. Notice also that in the Schreier graphs Γn of the Basilica group, if e = {v, v ′} 4 is an edge which has color say s near v and s−1 near v ′ , then the rotation map Rot : X n × D → X n × D is defined by RotΓn (v, s) = (v ′ , s−1 ), ∀ v, v ′ ∈ X n , s, s−1 ∈ D = {a±1 , b±1 }. Definition 2.1. The generalized replacement product Γn g Γr is the 4 regular graph with vertex set X n+r = X n × X r , and whose edges are described by the following rotation map: ∀ v ∈ X n  ((v a , ua0 ), a−1 ) if r is even RotΓn g Γr ((v, u0), a) = (3) ((v b, ua0 ), a−1 ) if r is odd  ((v b , ub0 ), b−1 ) if r is even (4) RotΓn g Γr ((v, u0), b) = ((v a , ub0), b−1 ) if r is odd RotΓn g Γr ((v, u), s) = ((v, us), s−1 ), ∀ u ∈ X r \{u0 } s ∈ {a±1 , b±1 } (5) We call edges given in (3) as lifts of the edge ea and in (4) as lifts of the edge eb . One can imagine that the vertex set X n+r of the graph Γn g Γr is partitioned into the sheets, which are indexed by the vertices of Γn , where by definition of the v th sheet, for v ∈ X n , consists of the vertices {(v, u)|u ∈ X r }. Within this construction the idea is to put the copy of Γ′r around each vertex v of Γn , while keeping all the edges of Γ′r as it is and the Γn can be thought of using the above given rotations in the equations (3) and (4). The connectedness of Γ′r and Γn guarantees about the connectedness of the graph Γn g Γr . If an edge e = {v, v ′} in Γn has colors s and s−1 near v and v ′ respectively, then we call the edge e as s-edge. Hence we can say that in the graph Γn , there are two types of edges i.e. a-edges and b-edges. Remark 2.1. In the Figure 2,3 and 4 one can observe that the number of edges in the graph Γn and the number of edges which are lifts of ea and eb in Γn g Γr are the same. If we imagine that the whole sheet as a single vertex along with the lift edges interestingly we get the graph Γn . Hence we say the following: 1. If r is even then the edges which are lifts of ea and eb in Γn g Γr are a and b edges in Γn respectively. 2. If r is odd then the edges which are lifts of ea and eb in Γn g Γr are b and a edges in Γn respectively. 3. The edges which are not lifts of ea and eb in Γn g Γr are edges in Γr , so we call them sheet edges. 5 (0, 100) (0, 010) (0, 110) (0, 111) (0, 011) (0, 001) (0, 101) (0, 000) (1, 100) (1, 111) (1, 011) (1, 001) (1, 101) (1, 000) (1, 010) (1, 110) Γ1 g Γ3 Figure 2: We choose u0 = 110. So the graph Γ1 g Γ3 is still normal 2 sheeted cyclic covering of the graph Γ3 but it is not isomorphic to Γ4 . The 2 sheets of Γ3 are copies of the spanning subgraph Γ′3 (dashed lines). Black continuous lines/loops in Γ1 g Γ3 are lifts of ea or eb . Note that above definition of Γn g Γr depends on the spanning subgraph of the second graph. If a different choice of spanning subgraph is taken, then the graph Γn g Γr need not be Schreier graph of the Basilica group. Example 2.2. If we choose a vertex of Γr other than 0r as u0 and then corresponding spanning subgraph Γ′r with edge set, E(Γr )\{ea , eb } where ea and eb are the edges of the vertex u0 with labels a and b respectively near u0 , then the graph Γn g Γr need not be Schreier graph of the Basilica group. See Figure 2. The following result will show that the graph Γn g Γr is actually a Schreier graph under the action of Basilica group on the set X n+r . Proposition 2.1. Let n, r ≥ 1, then the following holds: 1. The graph Γn+r ≃ Γn g Γr ≃ Γr g Γn is a Schreier graph under the action of Basilica group on the set X n+r . 2. Γn+r is an unramified, 2n sheeted graph covering of Γr . 3. Γn g Γr is non normal covering of the graph Γr if n > 1. 4. Γ1+r is 2 sheeted normal covering of the graph Γr . 6 Proof. Let n, r ≥ 1. 1. Let us define the map f : Γn g Γr → Γr+n by f (v, u) = uv, where v ∈ X n and u ∈ X r . To show f is adjacency preserving map, notice that there are two types of edges in Γn g Γr , first type which contains those edges which are lifts of ea or eb , i.e. edges which are described in the equation (3) or (4) and second type contains edges which are not lifts of ea or eb , i.e. edges which are described in the equation (5). Edges of the first type: Note that lift of ea connect (v, u0) to (v ′ , ua0 ) and lift of eb connect (v, u0 ) to (v ′′ , ub0 ) where  a v if r is even ′ v = v b if r is odd  b v if r is even ′′ v = v a if r is odd Let given edge be a lift of ea . In other words, let (v, u0) be adjacent to (v ′ , ua0 ) in Γn g Γr , i.e. ⇔ RotΓn g Γr ((v, u0), a) = ((v ′ , ua0 ), α−1) Then by action of the Basilica group B on X n+r ,  a a u0 v if r is even ⇔ a(u0 v) = ua0 v b if r is odd  a v if r is even a ′ ′ ⇔ a(u0 v) = u0 v , v = v b if r is odd  a v if r is even a ′ ′ ⇔ RotΓn+r (u0 v, a) = (u0 v ), v = v b if r is odd ⇔ u0v is adjacent to ua0 v ′ in Γn+r which shows that f is adjacency preserving map. The argument is similar if the given edge is a lift of eb . Edges of the second type: The edges of Γn g Γr which are not lifts of ea or eb connect (v, u) to (v, us) where u, us 6= u0 . Suppose given edge is of this type. ⇔ RotΓn g Γr ((v, u), s) = ((v, us), s−1 ), s ∈ {a±1 , b±1 }, u, us 6= u0 . As u 6= u0 = 0r means u has at least one “1” as an alphabet, therefore by definition of Basilica group elements we have s(uv) = s(u)v = us v, s ∈ {a±1 , b±1 } 7 Hence uv is adjacent to us v in Γn+r which gives f is adjacency preserving map. By definition of f it is not difficult to that f is bijection map. Therefore f −1 exists and by reverse implication it shows that f −1 is also adjacency preserving map. As f bijection so as f −1 . Thus f and f −1 both are isomorphisms. 2. By definition 2.1, Γn+r ≃ Γn g Γr contains 2n sheets of the graph Γr . To show that Γn+r is an unramified cover of the graph Γr , we define the map π : Γn+r → Γr by π(uv) = u. We now show that π is a covering map i.e. π is sending neighborhoods of Γn+r one-to-one and onto neighborhoods of Γr . Suppose u0 v is adjacent to us0 v ′ in Γn+r where s ∈ {a, b}. By definition of π, π(u0 v) = u0 and π(us0 v ′ ) = us0 but us0 = s(u0) which means u0 is adjacent to s(u0 ) = us0 in Γr so π(u0 v) is adjacent to π(us0 v ′ ) in Γr . Let −1 −1 NΓn+r (u0 v) = {ua0 v ′ , ub0 v ′′ , ua0 v, ub0 v}, then −1 −1 π(NΓn+r (u0 v)) = π({ua0 v ′ , ub0 v ′′ , ua0 v, ub0 v}) −1 −1 = {ua0 , ub0 , u0a , ub0 } = NΓr (u0 ) Now suppose uv is adjacent to us v in Γn+r where s ∈ {a±1 , b±1 } and u, us 6= u0 . By definition of π, π(uv) = u and π(us v) = us but us = s(u) in Γr gives u is adjacent to us in Γr . Let −1 −1 NΓn+r (uv) = {ua v, ubv, ua v, ub v}, then −1 −1 π(NΓn+r (uv)) = π({ua v, ubv, ua v, ub v}) −1 −1 = {ua, ub , ua , ub } = NΓr (u) =⇒ π is a covering map. Thus Γn+r is an unramified covering of Γr . 3. (Proof by contradiction) Assume that Γn+r is normal covering of Γr , where n > 1. The Galois group G = Gal(Γn+r |Γr ) = Gal(Γn g Γr |Γr ) is generated by permutations corresponding to the Frobenius automorphism σ at ea and eb . See [8] i.e. G = < σ(ea ), σ(eb ) > The permutations σ(ea ) and σ(eb ) arises under the action of Basilica group elements a and b on the (ordered) set X n respectively when we consider 8 Γn+r as unramified covering of Γr . As Γn+r has 2n sheets of Γr , we indexed these sheets by the set {1, 2, · · · , 2n } ∼ X n . If two sheets say ith and j th are connected by the lift of say ea then we write σ(ea )(i) = j similarly we can write the permutation corresponds to σ(eb ). The permutations σ(ea ), σ(eb ) can be written directly using action of Basilica group elements a and b on the set X n respectively i.e. suppose vi , vj ∈ X n , with a(vi ) = vj then we write σ e(ea )(i) = j. By Remark 2.1, σ ≡ σ e. Therefore the product σ(ea ) · σ(eb ) comes from the action of ba on X n . Using induction, it can be shown as in [3] that the action of ba on X n has order 2n . This shows that the Galois group G has an element (σ(ea ) · σ(eb )) which is different from the generators σ(ea ) and σ(eb ) and which has order 2n . Hence Galois group G has order bigger that 2n which is a contradiction. 4. Suppose n = 1, therefore Γ1+r is 2 sheeted covering of Γr so we first show that |G| = 2. Denote two sheets Γ′r of Γ1+r by 1 and 2. Recall that the Galois group G = Gal(Γ1+r |Γr ) = < σ(ea ), σ(eb ) > . See [8]. By the definition of Γ1+n ≃ Γ1 g Γn we have the following: If r is even then σ(ea ) = (1), σ(eb) = (1 2) and if r is odd then σ(ea ) = (1 2), σ(eb ) = (1) Therefore G = < σ = (1 2) >, ∀ r. To show that Γ1+r is 2 sheeted normal covering of Γr it remains to show that π ◦ σ ≡ π where σ ∈ G is the non identity Frobenius automorphism with σ 2 = id. If u is any vertex of Γr so let u0 be any vertex of the first sheet and u1 be any vertex of the second sheet. (π ◦ σ)(u0) = π(σ(u0)) = π(u1) = u (π ◦ σ)(u1) = π(σ(u1)) = π(u0) = u, and π(u1) = u = π(u0), Therefore π ◦ σ ≡ π. Corollary 2.1. The spectrum of Γr is contained in the spectrum of Γ1+r . Moreover The zeta function ζΓr (t)−1 divides ζΓ1+r (t)−1 . 9 Proof. This is direct consequence of the proof of the Proposition 13.10, p.no. 110 given in [8]. Let Ye be the normal covering of Y . The Artin L function associated to the representation ρ of G = Gal(Ye |Y ) can be defined by a product over prime cycles in Y as Y e uν(C) )−1 L(u, ρ, Ye |Y ) = det(I − ρ(F rob(C)) [c] prime in Y e denotes any lift of C to Ye and F rob(C) e denotes the Frobenius automorwhere C phism defined by e = ji−1 , F rob(C) e starts on Ye -sheet labeled by i ∈ G and ends on Ye -sheet labeled by j ∈ G. if C As in Proposition 2.1 of [4], the adjacency matrix of Ye can be block diagonalized where the blocks are of the form X Aρ = A(g) ⊗ ρ(g), (6) g∈G b irreducible representation of G and each taken dρ = degree of ρ times, ρ ∈ G A(g) is defined in following formula: Suppose Y has m vertices. Define the m × m matrix A(g) for g ∈ G by defining i, j entry to be A(g)i,j = the number of edges in Ye between (1, e) to (j, g), (7) L(t, ρ, Ye |Y )−1 = (1 − t2 )(r−1)dρ det(I − Aρ t + Qρ t2 ). (8) where e denotes the identity in G. By setting Qρ = Q ⊗ Idρ , with dρ = deg ρ, we have the following analogue of formula (2): See [8]. Thus we have zeta functions of Ye factors as follows Y L(t, ρ, Ye |Y )dρ ζYe (t) = b ρ∈G See Corollary 18.11 of [8]. The matrices A1 and Aσ are called as the Artinized adjacency matrices. We label the vertices using the Table 1. 10 (9) a−1 b b−1a a−1b b−1 a−1 a b a b −1 10b −1 −1 01b 00a 11 a a−1 b b−1 a 00a b a −1 10 −1 01b Γ′2 Γ2 a−1 b a 0 b−1 a−1 a 1 b b−1 Γ1 a−1 b b−1a a b−1 b 1 2 a−1 a a−1 b b−1 −1 a−1 b a 3 4 b b a b−1 ′ a−1 b−1 4′ a 3 b a−1b b−1 a−1 a b 2′ b−1 a 1′ a−1 Γ1 g Γ2 f −1 a a b a−1 b a b−1 110 b−1a b a−1 010 −1 a−1b a 100 b−1 b b 000 −1 b 101 b−1 b a a−1 001 a−1b a b−1 011 b−1 a−1 b a 111 a a−1 Γ3 Figure 3: The graph Γ1 g Γ2 is a normal 2 sheeted cyclic covering of the graph Γ2 . The 2 sheets of Γ2 are copies of the spanning subgraph Γ′2 (dashed lines). The map f is a graph isomorphism between Γ1 g Γ2 and Γ3 . 11 b−1 a−1 b 11 a Table 1: Vertex labeling for Γ2 label 1 2 3 4 vertex 11 01 00 10 Example 2.3. The covering Γ3 ≃ Γ1 g Γ2 over Γ2 given in the Figure 3 is a normal covering. We obtain spanning subgraph of the Y = Γ2 by cutting edges ea = {3, 2}, eb = {3, 4}. This gives dashed line spanning subgraph Γ′2 of the Γ2 . So we draw the covering graph Ye = Γ3 ≃ Γ1 g Γ2 by placing 2 sheets of spanning subgraph Γ′2 of Y = Γ2 and labeling each sheet given in Table 2. Connections between 2 sheets in the cover graph Ye = Γ3 are given in the Table 3. In this case the representations of cyclic Galois group G = {1, σ} are the trivial representation ρ0 = 1 and the representation ρ defined by ρ(1) = 1, ρ(σ) = −1. So Qρ = 2I4 . There are two cases. Table 2: Notations for sheets Vertex set of Γ1 g Γ2 Vertex set of Γ3 Group element {1, 2, 3, 4} ∼ {(0, 11), (0, 01), (0, 00), (0, 10)} {110, 010, 000, 100} 1 = id ′ ′ ′ ′ {1 , 2 , 3 , 4 } ∼ {(1, 11), (1, 01), (1, 00), (1, 10)} {111, 011, 001, 101} σ 6= id Table 3: Connections between sheet 1 and 2 in Γ3 ≃ Γ1 g Γ2 Vertex adjacent vertices in Γ3 ≃ Γ1 g Γ2 1 1, 2 2 1, 3 3 2, 4, 4′ 4 3, 4, 3′ Case 1 The trivial representation ρ0 = 1 Here A1 = A(1) + A(σ) = AY where    0 2 2 0 0 0 2 0 2 0   A(1) =  0 2 0 1 , A(σ) = 0 0 0 0 1 2 12 0 0 0 0 0 0 0 1  0 0  1 0 and A1 is the adjacency matrix AY . Case 2 The representation ρ  2 2 Aσ = A(1) − A(σ) =  0 0 2 0 2 0 0 2 0 0 Reciprocals of L functions for Γ3 |Γ2 .  0 0  0 2 1) For A1 ζΓ2 (t)−1 = L(t, A1 , Γ3 |Γ2 )−1 = (1−t2 )4 (t−1)(3t−1) 3t2 + 1 2) For Aσ L(t, Aσ , Ye |Y )−1 = (1−t2 )4 3t2 − 2t + 1 By equation (9) we have    9t4 − 2t2 + 1 . 27t6 − 18t5 + 3t4 − 4t3 + t2 − 2t + 1 ζΓ3 (t)−1 = L(t, A1 , Ye |Y )−1 L(t, Aσ , Ye |Y )−1    = (1 − t2 )8 (t − 1)(3t − 1) 3t2 + 1 3t2 − 2t + 1 9t4 − 2t2 + 1  27t6 − 18t5 + 3t4 − 4t3 + t2 − 2t + 1 Example 2.4. The coverings Γ5 ≃ Γ3 g Γ2 over Γ2 given in the Figure 4 is non normal covering. We follow the labeling the vertices given in Table 1. We obtain spanning subgraph of the Γ2 by cutting edges ea = {3, 2}, eb = {3, 4}. This gives dashed line spanning subgraph Γ′2 of the Γ2 . So we draw the covering graph Γ5 ≃ Γ3 g Γ2 by placing 8 sheets of spanning subgraph Γ′2 of Γ2 and labeling each with notations given in Table 4 and connections between first sheet with other sheets are given in Table 5. Here we assume that Γ3 g Γ2 is normal covering of Γ2 . σ(ea ) = (2 3)(6 7), σ(eb) = (1 2)(3 5 6 4)(7 8) and σ(ea ) ◦ σ(eb ) = (1 3 5 7 8 6 4 2) Hence G = Gal(Γ3 g Γ2 |Γ2 ) =< σ(ea ), σ(eb ) > has an element of order 8. Thus |G| > 8 is a contradiction. 13  a−1 b b−1a a−1b b−1 a−1 a b a b −1 10b −1 00a Γ2 −1 01b a 11 a−1 b b−1 a 00a a −1 10 b−1 a−1 b Γ′2 b −1 01b 11 a −1 a a b a−1 b a b−1 −1 a−1b b−1a b 110 a−1 010 a 100 b−1 b b 000 −1 b 101 b−1 a a−1 001 b b−1 a−1 a−1b a b b−1 011 a 111 a a−1 Γ3 1′′′ 2′′′ 1′ 4 1(6) 4′′ 2′ 3 1 2 3 4′ 4′′′ 3′′′ ′′ 2(6) 3 3′ ′′ 2 4(5) 3 (5) 1′′ 2(5) 4(6) (6) 3 2(7) (7) 4(7) 3(8) 2(8) 4(8) 1(7) 1(5) Γ3 g Γ2 ≃ Γ5 Figure 4: The graph Γ3 g Γ2 is a non normal 8 sheeted covering of the graph Γ2 . The 8 sheets of Γ2 are copies of the spanning subgraph Γ′2 (dashed lines). The graph Γ2 g Γ3 is isomorphic to the graph Γ5 . 14 1(8) Table 4: Notations for sheets Vertex set of Γ3 g Γ2 Sheet index {1, 2, 3, 4} ∼ {(110, 11), (110, 01), (110, 00), (110, 10)} 1st {1′ , 2′ , 3′ , 4′} ∼ {(010, 11), (010, 01), (010, 00), (010, 10)} 2nd ′′ ′′ ′′ ′′ {1 , 2 , 3 , 4 } ∼ {(000, 11), (000, 01), (000, 00), (000, 10)} 3rd {1′′′ , 2′′′ , 3′′′ , 4′′′ } ∼ {(100, 11), (100, 01), (100, 00), (100, 10)} 4th {1(5) , 2(5) , 3(5) , 4(5) } ∼ {(101, 11), (101, 01), (101, 00), (101, 10)} 5th (6) (6) (6) (6) {1 , 2 , 3 , 4 } ∼ {(001, 11), (001, 01), (001, 00), (001, 10)} 6th {1(7) , 2(7) , 3(7) , 4(7) } ∼ {(011, 11), (011, 01), (011, 00), (011, 10)} 7th {1(8) , 2(8) , 3(8) , 4(8) } ∼ {(111, 11), (111, 01), (111, 00), (111, 10)} 8th Table 5: Connections between sheet 1 and other sheets in Γ5 ≃ Γ3 g Γ2 Vertex adjacent vertices in Γ5 ≃ Γ3 g Γ2 1 1, 2 2 1, 3 3 2, 4, 4′ 4 3, 4, 3′ =⇒ Γ3 g Γ2 is non normal covering of Γ2 . Proposition 2.2. Let Γn g Γr with n > 1 be the unramified, non normal covering of Γr then following holds: 1. If r is an even and av = v in Γn then the alternate action of a and b−1 on y0 = (v, u0 ) i.e. y2p+1 = ay2p , p = 0, 1, · · · , (2r − 1) y2p+2 = b−1 y2p+1 , p = 0, 1, · · · , (2r − 2) (10) produces spanning path on v th sheet of Γn g Γr which visits every vertex of the v th sheet twice. 2. If r is an odd and av = v in Γn then the alternate action of b and a−1 on y0 = (v, u0 ) i.e. y2p+1 = by2p , p = 0, 1, · · · , (2r − 1) y2p+2 = a−1 y2p+1 , p = 0, 1, · · · , (2r − 2) 15 (11) produces spanning path on v th sheet of Γn g Γr which visits every vertex of the v th sheet twice. 3. Let r be any positive number with av 6= v in Γn , then alternate actions of any of the above type goes outside the v th sheet. Proof. 1. As r is an even and av = v in Γn , then by definition of generalized replacement product, v th sheet in Γn g Γr contains lift of the edge ea which connects (v, u0) to (v, ua0 ) in Γn g Γr . i.e. v th sheet is actually a copy of the graph Γr \{eb }. So we can write RotΓn g Γr ((v, u), a) = ((v, ua), a−1 ), ∀ u ∈ VΓr −1 RotΓn g Γr ((v, u), b ) = ((v, u b−1 ), b), ∀u ∈ VΓr \{ub0} (12) (13) Therefore the simultaneous actions of a and b−1 as stated in (10), produces a path which visits the following vertices. y0 = (v, u0), y1 = ay0 = a(v, u0) = (v, a(u0)) = (v, u1), y2 = b−1 y1 = b−1 (v, u1 ) = (v, b−1 u1 ) = (v, u2), . . . y2r+1−1 = ay2r+1−2 = (v, u2r+1−1 ) (14) One can even prove that (v, u2r+1−1 ) = (v, ub0) i.e. u2r+1−1 = ub0 Using induction it has shown as in [3], that action of b−1 a has order 2r on V (Γr ) = X r . Thus r (b−1 a)2 u0 = u0 i.e. −1 −1 a · · · b−1 a} u0 = u0 |b ab {z 2r times But r −1 u2r+1−1 = a(b−1 a)2 r −1 u0 =⇒ b−1 (u2r+1 −1 ) = b−1 a(b− 1a)2 u0 = u0 This gives, u2r+1 −1 = ub0 =⇒ (v, u2r+1−1 ) = (v, ub0) The right hand side of equation (14), shows that all yi′ s are vertices of v th sheet of the graph Γn g Γr which are counted twice. Hence we get the spanning path on v th sheet of Γn g Γr which visits every vertex of the v th sheet twice. 16 2. As r is an odd number and av = v in Γn , then by definition of generalized replacement product, v th sheet in Γn g Γr contains lift of the edge eb which connects (v, u0) to (v, ub0 ) in Γn g Γr . i.e. v th sheet is actually a copy of the graph Γr \{ea }. So we can write RotΓn g Γr ((v, u), b) = ((v, ub), b−1 ), ∀ u ∈ V (Γr ) RotΓn g Γr ((v, u), a−1) = ((v, u a−1 ), a), ∀ u ∈ V (Γr )\{ua0 } (15) (16) Therefore the simultaneous actions of b and a−1 as stated in (11), produces a path which visits the following vertices. y0 = (v, u0), y1 = by0 = b(v, u0 ) = (v, b(u0 )) = (v, u1), y2 = a−1 y2 = a−1 (v, u1 ) = (v, a−1 u1 ) = (v, u2), . . . y2r+1 −1 = by2r+1 −2 = (v, u2r+1−1 ) = (v, ua0 ) (17) The right hand side of equation (17), shows that all yi′ s are vertices of v th sheet of the graph Γn g Γr which are counted twice. Hence we get the spanning path on v th sheet of Γn g Γr which visits every vertex of the v th sheet twice. 3. Let n > 1 be positive integer, and av 6= v ∈ Γn . The lifts of ea and eb go from v th sheet to another sheets. i.e. These lifts connect (v, u0) to other sheets and hence the v th sheet is actually a copy of the graph Γr \{ea , eb }, therefore we have −1 RotΓn g Γr ((v, u), a−1) = ((v, ua ), a), ∀ u ∈ V (Γr )\{ua0 } −1 RotΓn g Γr ((v, u), b ) = ((v, u b−1 ), b), ∀u ∈ V (Γr )\{ub0} (18) (19) If r is even, the action of a on (v, u0 ) gives the vertex (v a , ua0 ) but v a = a(v) 6= v ∈ Γn . Therefore the action of a on (v, u0) doesn’t remain within the v th sheet. Similarly if r is odd, we can show the action of b on (v, u0) doesn’t remain within the v th sheet. Hence the alternate actions of any of (10) or (11) goes outside the sheet. Proposition 2.3. If r > 0, n > 1 and a(v) 6= v ∈ Γn , then the last n alphabets of the words a(0r v) and b(0r v) are distinct from the word v. Proof. r a(0 v) =  a(0r )a(v) if r is even a(0r )b(v) if r is odd 17 But a(v) 6= v ∈ Γn , ∀ n > 1 and b(v) 6= v, ∀ v ∈ Γn , ∀ n Therefore the last n alphabets of the word a(0r v) are distinct from the word v. Similarly using action of b on 0r v we can prove that the last n alphabets of the word b(0r v) are also distinct from the word v. 3 ZIG ZAG PRODUCT OF GRAPHS The zig zag product of two graphs was introduced by O. Reingold, S. Vadhan and A. Wigderson[7]. Taking a product of a large graph with a small graph, the resulting graph inherits (roughly) its size from the large one, its degree from the small one, and its expansion properties from both graphs. The important property of this product is it is a good expander if both large and small graphs are expander. D. D’Angeli, A. Donno and E. Sava-Huss[3] have provided the sufficient condition for the zig-zag product of two graphs to be connected. Definition 3.1. Let G1 = (V1 , E1 ) be connected d1 regular graph, and let G2 = (V2 , E2 ) be connected d2 regular graph such that |V2 | = d1 . Let RotG1 (resp. RotG2 ) be the rotation map of G1 (resp. G2 ). The zig zag product G1 z G2 is a regular graph of degree d22 with vertex set V1 × V2 , that we identify with the set V1 × [d1 ], and whose edges are described by the rotation map RotG1 z G2 ((v, k), (i, j)) = ((w, l), (j ′, l′ )), for all v ∈ V1 , k ∈ [d1 ], i, j ∈ [d2 ], if : (1) RotG2 (k, i) = (k ′ , i′ ), (2) RotG1 (v, k ′ ) = (w, l′ ), (3) RotG2 (l′ , j) = (l, j ′ ), where w ∈ V1 , l, k ′ , l′ ∈ [d1 ] and i′ , j ′ ∈ [d2 ] and [di ] = {1, 2, · · · , di }, where i = 1, 2 D. D’angeli, A. Donno and E. Seva-Huss have shown in Proposition 6.1 of [3] that the graph Γn z C4 is isomorphic to the double cycle graph DC2n+1 . From the construction of the Schreier graph Γn of Basilica group see Figure 1, we get the natural labeling of Γn , we label the graph C4 as follows: a B B b−1 A A A A a−1 B B 18 b Proposition 3.1. Let Γn , n ≥ 1 be the Schreier graph of the action of the Basilica group on {0, 1}n and C4 be the 4 length cycle graph. Let r ≥ 0. Then the graph Γn+r z C4 is an unramified graph covering of Γr z C4 . Proof. In the Proposition 2.1, we have shown that the map π : Γn+r → Γr is a covering map. Define the map Π : Γn+r z C4 → Γr z C4 as Π(uv, s) = (π(uv), s) = (u, s), uv ∈ V (Γn+r ), s ∈ {a±1 , b±1 } We now show that Π is adjacency preserving map. As, −1 −1 −1 −1 NΓn+r z C4 (uv, a) = {((uv)a , a−1 ), ((uv)a , b−1 ), ((uv)b , a−1 ), ((uv)b , b−1 )} −1 So we consider (uv, a) is adjacent to ((uv)b , b−1 ) and Π(uv, a) = (u, a), −1 −1 −1 Π((uv)b , b−1 ) = Π((u)b v ′ , b−1 ) = ((u)b , b−1 ) ∈ NΓr z C4 (u, a) −1 Hence, Π(uv, a) is adjacent to Π((uv)b , b−1 ). Using a similar argument we can see that other choices of s also gives that Π is adjacency preserving map. Given (u, s) ∈ V (Γr z C4 ), any vertex w ∈ Π−1 (u, s) is of the form w = (uv, s), for some v ∈ V (Γn ). By definition of the zig zag product of graphs, we see that the vertices in V (Γr z C4 ) adjacent to (u, s) if s = a, have the form −1 −1 −1 −1 NΓr z C4 (u, a) = {(ua , a−1 ), (ua , b−1 ), (ub , a−1 ), (ub , b−1 )} and the vertices in V (Γn+r z C4 ) adjacent to w = (uv, s) if s = a, have the form −1 −1 −1 −1 NΓn+r z C4 (uv, a) = {((uv)a , a−1 ), ((uv)a , b−1 ), ((uv)b , a−1 ), ((uv)b , b−1 )} Notice that, any s ∈ {a±1 , b±1 }, (uv)s = s(uv). The length of the word s(uv) is n + r. By the action of the s on uv, the word containing first r alphabets of s(uv) is actually the word s(u) and the remaining n alphabets of s(uv) form some word say v ′ . Thus π((uv)s ) = π(s(uv)) = π(s(u)v ′) = s(u) = us . =⇒ Π(NΓn+r z C4 (uv, a)) = NΓr z C4 (u, a) Hence, Π is sending neighborhoods of Γn+r z C4 one to one and onto neighborhoods of Γr z C4 if s = a. Similar argument one can make in the case of s = b, b−1 and a−1 . Notice that if Y = Γr z C4 , and Y ′ = Γ1+r z C4 , NG (w, a) = NG (w, b), NG (w, a−1 ) = NG (w, b−1), f or G = Y, Y ′ 19 (20) Let T be the spanning subgraph of Y1 , where V (T ) = V (Y ) and E(T ) = E(Y )\{ei |i = 1, 2, 3, 4} where u0 = 0r , and, if r is even, then r −1 u0 , a)}, e2 = {(u0 , a−1 ), (a(b−1 a)2 r −1 u0 , a)}, e4 = {(u0 , b−1 ), (a(b−1 a)2 r −1 u0 , a)}, e2 = {(u0 , a−1 ), (b(a−1 b)2 r −1 u0 , a)}, e4 = {(u0 , b−1 ), (b(a−1 b)2 e1 = {(u0 , a−1 ), (a(b−1 a)2 e3 = {(u0, b−1 ), (a(b−1 a)2 r −1 u0 , b)} r −1 u0 , b)} r −1 u0 , b)} and, if r is odd, then e1 = {(u0, a−1 ), (b(a−1 b)2 e3 = {(u0 , b−1 ), (b(a−1 b)2 r −1 u0 , b)} Corollary 3.1. Γ1+r z C4 is the two fold normal covering of the graph Γr z C4 with Galois group Z Gal(Γ1+r z C4 /Γr z C4 ) ∼ . = 2Z Proof. The adjacency matrices of graphs Γk z C4 , k = 1 + r, r are the circulant matrices, see [3]. Therefore there exists the following order of the vertices of Γ1+r z C4 if r is even: (01+r , a−1 ); (a(01+r ), a); (b−1 a(01+r ), a−1 ); (ab−1 a(01+r ), a); 1+r −1 (b−1 ab−1 a(01+r ), a−1 ); · · · (a(b−1 a)2 (01+r ), a); (21) (01+r , b−1 ); (a(01+r ), b); (b−1 a(01+r ), b−1 ); (ab−1 a(01+r ), b); 1+r −1 (b−1 ab−1 a(01+r ), b−1 ); · · · (a(b−1 a)2 (01+r ), b). (22) In other words we are applying (10) i.e. alternate actions of a and b−1 on the word 01+r , with the alternation of a−1 , a in the second coordinate of the 21+r vertices (the inner cycle of the graph) given in equation (21). Also we are applying same action given in (10) i.e. alternate actions of a and b−1 on the word 01+r , with the alternation of b−1 , b in the second coordinate of 21+r vertices (the outer cycle of the graph) given in equation (22). In the Proposition 2.1, we have also seen that Γn g Γr ≃ Γn+r the isomorphism is f : Γn g Γr → Γn+r defined by f (v, u) = uv and the isomorphism f −1 : Γn+r → Γn g Γr defined by f −1 (uv) = (v, u), hence we are able to write f (0, 0r ) = 01+r or f −1 (01+r ) = (0, 0r ) 20 Thus the vertex (01+r , a−1 ) can be written as ((0, 0r ), a−1 ). But the first coordinate of this vertex i.e. (0, 0r ) is the 0r vertex of the 0th sheet in the graph Γ1 g Γr , and a(0) = 0 ∈ Γ1 . By even case of above Proposition 2.2, we get r −1 (0, 0r ), (0, a(0r )), (0, b−1 a(0r )), · · · (0, a(b−1 a)2 (0r )) = (0, b(0r )) produces spanning path of the 0th sheet. But again by Proposition 2.1, and π is onto map, we have f (0, 0r ) = 01+r f (0, a(0r )) = a(01+r ) f (0, b−1 a(0r )) = b−1 a(01+r ) r r · · · f (0, a(b−1 a)2 −1 (0r )) = f (0, b(0r )) = a(b−1 a)2 −1 (01+r ) = b(01+r ) This gives that the first coordinate of the first 2r vertices of the lists given in equations (21) and (22) contains 0 in the last position i.e. they are vertices of the 0th sheet of Γ1 g Γr . Therefore by definition of zigzag product of graphs, equation (20) and the Proposition 2.2, these vertices forms a (connected) copy of the spanning subgraph T of Y . As the first coordinate of these vertices ends with 0, we denote this copy by T0 . Using similar argument, we can show that first coordinate the next 2r vertices given in (21) and (22) ends with 1 and hence we get the another copy of T which we denote by T1 . Following are the vertices of T0 and T1 . V (T0 ) = {(01+r , a−1 ); (a(01+r ), a); (b−1 a(01+r ), a−1 ); (ab−1 a(01+r ), a); · · · r (a(b−1 a)2 −1 (01+r ), a); r (01+r , b−1 ); (a(01+r ), b); (b−1 a(01+r ), b−1 ); · · · (a(b−1 a)2 −1 (01+r ), b)} = {(u0, s)|u ∈ V (Γr ), s ∈ V (C4 )} r r r V (T1 ) = {((b−1 a)2 01+r , a−1 ); (a(b−1 a)2 (01+r ), a); ((b−1 a)2 +1 (01+r ), a−1 ); · · · r+1 (a(b−1 a)2 −1 (01+r ), a); r r r ((b−1 a)2 01+r , b−1 ); (a(b−1 a)2 (01+r ), b); ((b−1 a)2 +1 (01+r ), b−1 ); r+1 · · · (a(b−1 a)2 −1 (01+r ), b)} and = {(u1, s)|u ∈ V (Γr ), s ∈ V (C4 )} V (Ye1 ) = V (T0 ) ∪ V (T1 ). Define the non identity Frobenius automorphism map Σ as Σ(u1, s) = (σ(u1), s) = (u0, s), and Σ(u0, s) = (σ(u0), s) = (u1, s), ∀ u ∈ V (Γr ), s ∈ V (C4 ), 21 where σ ∈ G(Γ1+r |Γr ). Σ(T0 ) = T1 , Σ(T1 ) = T0 and since σ 2 = id we have Σ 2 = Id. (Π ◦ Σ)(u0, s) = Π(Σ(u0, s)) = Π(σ(u0), s) = Π(u1, s) = (π(u1), s) = (u, s) (Π ◦ Σ)(u1, s) = Π(Σ(u1, s)) = Π(σ(u1), s) = Π(u0, s) = (π(u0), s) = (u, s) and Π(u0, s) = (u, s) = Π(u1, s), =⇒ Π ◦ Σ = Π. Thus Galois group G(Y ′ |Y ) = G(Γ1+r z C4 |Γr z C4 ) contains two elements Σ and Σ 2 = Id. One can make a similar argument for the odd n. Corollary 3.2. If n > 1, then Γn+r z C4 is the non normal covering of the graph Γr z C 4 . Proof of this corollary is given at the end of this paper. To show that Γn+r z C4 is not a Galois covering of Γr z C4 we need the following. By definition of zigzag product of graphs, V (Γn+r z C4 ) = {(uv, s)|uv ∈ V (Γn+r ), s ∈ V (C4 )} Let v0 = 0n , v1 , v2 , · · · , v2n −1 be the vertices of the graph Γn . By Proposition 2.1, Γn+r is 2n sheeted cover of Γr , so we can have following partition, n −1 2[ {uvj |u ∈ V (Γr )} V (Γn+r ) = j=0 Call Svj = {(uvj , s)|u ∈ V (Γr ), s ∈ V (C4 )} Therefore we can have V (Γn+r z C4 ) = n −1 2[ j=0 22 Svj 3.1 Restriction Graph Definition 3.2. Let G = (V, E) be a graph and ∅ = 6 V ′ ( V , we define restriction graph G′ = G|V ′ which is a subgraph of G as G′ = (V ′ , E ′ ) Suppose E ′ = {e = {vl , vm } ∈ E|vl , vm ∈ V ′ }. Ye = Γn+r z C4 , Y = Γr z C4 we find the restriction subgraphs Yej of Ye by taking V (Yej ) = Svj One can see, n −1 2[ V (Ye ) = V (Yej ) j=0 The next result is about connectedness of restriction subgraphs Yej′ s of Ye . Proposition 3.2. If Yej′ s and Ye as above, then following holds 1. If a(vj ) = vj ∈ Γn then the restriction subgraph Yej of Ye is the connected vjth sheet in the graph Ye . 2. If a(vj ) 6= vj ∈ Γn then the restriction subgraph Yej of Ye is the vjth sheet in the graph Ye and this sheet is disconnected. Proof. Recall that T is a spanning subgraph of Y , if r is even, we can write r V (T ) = {(0r , a−1 ); (a0r , a); (b−1 a0r , a−1 ); · · · ; (a(b−1 a)2 −1 0r , a); r (0r , b−1 ); (a0r , b); (b−1 a0r , b−1 ); · · · ; (a(b−1 a)2 −1 0r , b)} 1. We write set Tj , ∀ vj ∈ Γn as r Tj = {(0r vj , a−1 ); ((a(0r ))vj , a); ((b−1 a(0r ))vj , a−1 ); · · · ; ((a(b−1 a)2 −1 (0r ))vj , a); r (0r vj , b−1 ); ((a(0r ))vj , b); ((b−1 a(0r ))vj , b−1 ); · · · ; ((a(b−1 a)2 −1 (0r ))vj , b)} To show that Yej is connected it is enough to show that V (Yej ) = Tj . As (0r vj , a−1 ) = (u0 vj , a−1 ) ∈ Svj = V (Yej ) and action of b−1 a on 0r ∈ X r has order 2r , =⇒ Tj ⊂ V (Yej ), ∀ j But both the sets Tj and V (Yej ) contain 2r elements and Tj ⊂ V (Yej ). Therefore Tj = V (Yej ), ∀ j by Proposition 2.1, and equation (20) elements in Tj forms a copy of the spanning subgraph T of Y in Ye , and therefore Yej is the connected vjth sheet in the graph Ye . 23 2. By Proposition 2.3, a(0r vj ) = a(0r )a(vj ) 6= a(0r )vj and b(0r vj ) 6= b(0r )vj . and NYe (0r vj , a−1 ) = {(a(0r vj ), a), (a(0r vj ), b), (b(0r vj ), a), (b(0r vj ), b)} Therefore NYe (0r vj , a−1 ) ∩ Yej = ∅, which means Yj has more than one components in Ye , so Yej is the vjth sheet in the graph Ye and this sheet is disconnected. Now we can prove the Corollary 3.2 Proof. By contradiction Let Ye be 2n sheeted normal covering of Y . Therefore there exists a Frobenius automorphism Σ ∈ G(Ye |Y ) such that Σ sends vjth sheet in Ye to some say vkth sheet in Ye , where a(vj ) = vj ∈ Γn and a(vk ) 6= vk ∈ Γn . But by above Proposition 2.4 vjth sheet is connected and under a Frobenius automorphism it is mapping to disconnected vkth sheet which is a contradiction. Table 6: Vertex labeling for Γ1 z C4 label 1 2 3 4 5 6 7 8 −1 −1 −1 −1 vertex (0, a ) (1, a) (1, a ) (0, a) (0, b ) (1, b) (1, b ) (0, b) Table 7: Notations for sheets Vertex set {1, 2, · · · , 8} {1′ , 2′ , · · · , 8′} Group element Σ2 = Id Σ Example 3.1. The graph Γ2 z C4 is the normal 2 sheeted cyclic covering of the graph Γ1 z C4 has shown in Figure 5. We label the vertices using the Table 6. We obtain spanning subgraph of the Γ1 z C4 by cutting edges e1 = {1, 4}, e2 = {1, 8}, e3 = {5, 4}, e4 = {5, 8}. This gives the dashed line graph T as shown in Figure 6 In the graph Ye there are 16 vertices of which 8 ends with the alphabet 0 and remaining 8 ends with 1. By Proposition 2.1, these vertices forms connected 24 6 5 6 5 2 1 2 1 3 4 3 4 7 8 7 8 Y = Γ1 z C4 T 7′ 6′ 3′ 8′ 4′ 2′ 5′ e = Γ2 z C4 Y 1′ 4 8 1 5 2 3 6 7 Figure 5: The graph Γ2 z C4 is normal 2 sheeted cyclic covering of the graph Γ1 z C4 . The 2 sheets of Ye = Γ2 z C4 are copies of the spanning subgraph T of Y = Γ1 z C4 (dashed lines). The continuous lines shown in the graph Ye are lifts of the edges e1 , e2 , e3 and e4 , where e1 = {1, 4}, e2 = {1, 8}, e3 = {5, 4} and e4 = {5, 8}. 25 Table 8: Connections between 1-sheet and Σ-sheet in Ye Vertex adjacent vertices in Ye 1 2, 6, 4′, 8′ 2 1, 3, 5, 7 3 2, 4, 6, 8 4 3, 7, 1′, 5′ 5 2, 6, 4′, 8′ 6 1, 3, 5, 7 7 2, 4, 6, 8 8 3, 7, 1′, 5′ sheets which we label in Table 7. The representations of the cyclic Galois group {1, Σ} are the trivial representation ρ0 and the representation defined by ρ(1) = 1, ρ(Σ) = −1. So Qρ = 2I8 . Therefore there are two cases. Case 1 The trivial representation ρ(1) = 1 We use the information given in Table 8 to write the A(1) and A(Σ), hence we have     0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 0  0 0 0 0 0 0 0 0   1 0 1 0 1 0 1 0       0 0 0 0 0 0 0 0   0 1 0 1 0 1 0 1       1 0 0 0 1 0 0 0   0 0 1 0 0 0 1 0     A(1) =   0 1 0 0 0 1 0 0  , A(Σ) =  0 0 0 1 0 0 0 1       0 0 0 0 0 0 0 0   1 0 1 0 1 0 1 0       0 0 0 0 0 0 0 0   0 1 0 1 0 1 0 1  1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 But A1 = A(1) + A(Σ) = AYe (A1 is the adjacency matrix AY of Y.) Case 2 The representation ρ Here we find AΣ = A(1) − A(Σ) 26       AΣ =       0 1 0 −1 0 1 0 −1 1 0 1 0 1 0 1 0  0 −1 0 1 0 −1 1 0 1 0 1 0   0 1 0 1 0 1   1 0 −1 0 1 0   0 −1 0 1 0 −1   1 0 1 0 1 0   0 1 0 1 0 1  1 0 −1 0 1 0 The eigenvalues of A1 and AΣ are given in Table 9. Table 9: Eigenvalues of A1 and AΣ Matrix A1 AΣ Eigenvalues 0, 0, 0,√0, 0 √ 4, −4, √ 0, √ −2 2, −2 2, 2 2, 2 2, 0, 0, 0, 0 So we can write the spectrum of Ye = Γ2 z C4 . See Table 10. Table 10: spectrum of Ye = Γ2 z C4 Eigenvalue Multiplicity ±4 1 0√ 10 ±2 2 2 Reciprocals of L functions for Γ2 z C4 |Γ1 z C4 . 1) For A1 ζΓ1 z C4 (t)−1 = L(t, A1 , Ye |Y )−1 = (1−t2 )8 (t−1)(t+1)(3t−1)(3t+1) 3t2 + 1 2) For AΣ L(t, AΣ , Ye |Y )−1 = (1 − t2 )8 3t2 + 1 By equation (9) we have, 4 9t4 − 2t2 + 1 6 2 ζΓ2 z C4 (t)−1 = L(t, A1 , Ye |Y )−1 L(t, AΣ , Ye |Y )−1 6 4 2 = (1 − t2 )16 (t − 1)(t + 1)(3t − 1)(3t + 1) 3t2 + 1 3t2 + 1 9t4 − 2t2 + 1 27 . Table 11: Notations of sheets Vertex set {1, 2, · · · , 8} {1′ , 2′ , · · · , 8′ } {1′′ , 2′′, · · · , 8′′} {1′′′ , 2′′′ , · · · , 8′′′ } Sheet index 1st 2nd 3rd 4th Example 3.2. Figure 6 contains the example of non normal covering. We obtain spanning subgraph of the Γ1 z C4 by cutting edges e1 = {1, 4}, e2 = {1, 8}, e3 = {5, 4}, e4 = {5, 8}. This gives the dashed line graph T as shown in Figure 6. In the graph Ye there are 16 vertices of which 8 ends with the alphabet 0 and remaining 8 ends with 1. The labeling of vertices is given in Table 11. By Proposition 2.1, these vertices forms connected sheets. The labeling of sheets is given in Table 12. Table 12: Connections between 2nd -sheet in Ye and other sheets Vertex adjacent vertices in Ye 1′ 4, 8, 4′′, 8′′ 2′ 1′′ , 3′ , 5′′, 7′ ′ 3 2′ , 4′ , 6′ , 8′ 4′ 3′ , 7′ , 1, 5 ′ 5 4, 8, 4′′, 8′′ 6′ 1′′ , 3′ , 5′′, 7′ 7′ 2′ , 4′ , 6′ , 8′ ′ 8 3′ , 7′ , 1, 5 Table 13: Vertex labeling for Γ1 z C4 label 1 2 3 4 5 6 7 8 −1 −1 −1 −1 vertex (0, a ) (1, a) (1, a ) (0, a) (0, b ) (1, b) (1, b ) (0, b) From the Table 13 we can easily observe the following, NYe (1′ ) = {4, 8, 4′′, 8′′ } ∩ Ye2 = ∅ 28 5′′ 8′′′ 7′′′ 4 3 6 ′′′ 6′ 1′′ 2 7′ ′ 3′ ′′′ ′′′ 8′ 2′′′ 5′′′ 4′ Γ3 z C4 1′′′ 1 2′′ 6 5 2 ′′ 6 3 ′′ 3 4′′ 7 ′′ 8′′ 4 1′ 7 8 5′ Figure 6: The graph Γ3 z C4 is a non normal 4 sheeted covering of the graph Γ1 z C4 . The 4 sheets of Γ3 z C4 are copies of the spanning subgraph T of Γ1 z C4 (dashed lines). 29 By Corollary 3.2, the graph Γ3 z C4 is non normal 4 sheeted covering of the graph Γ1 z C 4 . We propose the following conjecture on the basis of this study. The work presented in this paper may be the special case of this conjecture. e is normal covering of G with Galois group Gal(G|G) e Conjecture 3.1. If G and e H be some other graph, then G z H is also normal covering of G z H with Galois e z H|G z H) ≃ Gal(G|G). e group Gal(G References [1] A. Abdollahi, & and A. Loghman, On one-factorizations of replacement products, Filomat, 27(1),(2013), 57-63. [2] D. D’Angeli, A. Donno, M. Matter and T. Nagnibeda, Schreier graphs of the basilica group, arXiv preprint arXiv:0911.2915 (2009), Journal of Modern Dynamics, 4(1), (2010), 139-177. [3] D. D’Angeli, A. Donno and E. Sava-Huss, Connectedness and isomorphism properties of the zig-zag product of graphs, arXiv preprint arXiv:1404.4342 (2014). [4] M. DeDeo, . Martı́nez, A. Medrano, M. Minei, H. Stark and A. Terras Michelle, et al, Zeta Functions of Heisenberg Graphs over Finite Rings, Theory and Applications of Special Functions Mourad E. H. Ismail, Erik Koelink,(Editors),Springer(2005), 165-183. [5] R. I. Grigorchuk,, and A. Żuk, On a torsion-free weakly branch group defined by a three state automaton, International Journal of Algebra and Computation, 12(01n02),(2002), 223-246. [6] R. I. Grigorchuk, Some topics in the dynamics of group actions on rooted trees, Proceedings of the Steklov Institute of Mathematics 273.1 (2011), 64175. [7] O. Reingold, and S. Vadhan, & A. Wigderson, Entropy waves, the zig-zag graph product, and new constant-degree expanders, Annals of mathematics, (2002) 157-187. [8] A. Terras, Zeta functions of graphs: a stroll through the garden (Vol. 128). Cambridge University Press, 2010. 30
4math.GR
On Sound Relative Error Bounds for Floating-Point Arithmetic Anastasiia Izycheva and Eva Darulova arXiv:1707.02121v2 [cs.PL] 4 Aug 2017 Max Planck Institute for Software Systems, Saarland Informatics Campus, Germany Email: [email protected], [email protected] Abstract—State-of-the-art static analysis tools for verifying finite-precision code compute worst-case absolute error bounds on numerical errors. These are, however, often not a good estimate of accuracy as they do not take into account the magnitude of the computed values. Relative errors, which compute errors relative to the value’s magnitude, are thus preferable. While today’s tools do report relative error bounds, these are merely computed via absolute errors and thus not necessarily tight or more informative. Furthermore, whenever the computed value is close to zero on part of the domain, the tools do not report any relative error estimate at all. Surprisingly, the quality of relative error bounds computed by today’s tools has not been systematically studied or reported to date. In this paper, we investigate how state-of-the-art static techniques for computing sound absolute error bounds can be used, extended and combined for the computation of relative errors. Our experiments on a standard benchmark set show that computing relative errors directly, as opposed to via absolute errors, is often beneficial and can provide error estimates up to six orders of magnitude tighter, i.e. more accurate. We also show that interval subdivision, another commonly used technique to reduce over-approximations, has less benefit when computing relative errors directly, but it can help to alleviate the effects of the inherent issue of relative error estimates close to zero. I. I NTRODUCTION Numerical software, common in embedded systems or scientific computing, is usually designed in real-valued arithmetic, but has to be implemented in finite precision on digital computers. Finite precision, however, introduces unavoidable roundoff errors which are individually usually small, but which can accumulate and affect the validity of computed results. It is thus important to compute sound worst-case roundoff error bounds to ensure that results are accurate enough - especially for safety-critical applications. Due to the unintuitive nature of finite-precision arithmetic and its discrepancy with continuous real arithmetic, automated tool support is essential. One way to measure worst-case roundoff is absolute error: errabs = max f (x) − fˆ(x̂) x∈I (1) where f and x denote a possibly multivariate real-valued function and variable respectively, and fˆ and x̂ their finiteprecision counter-parts. Note that absolute roundoff errors are only meaningful on a restricted domain, as for unrestricted x the error would be unbounded in general. In this paper, we consider interval constraints on input variables, that is for each input variable x ∈ I = [a, b], a, b ∈ R. Furthermore, we focus on floating-point arithmetic, which is a common choice for many finite-precision programs, and for which several tools now exist that compute absolute errors fully automatically for nonlinear straight-line code [1]–[4]. Absolute errors are, however, not always an adequate measure of result quality. Consider for instance an absolute error of 0.1. Whether this error is small and thus acceptable for a computation depends on the application as well as the magnitude of the result’s value: if |f (x)| ≫ 0.1, then the error may be acceptable, while if |f (x)| ≈ 0.1 we should probably revise the computation or increase its precision. Relative error captures this relationship: errrel = max x∈I f (x) − fˆ(x̂) f (x) (2) Note that the input domain needs to be restricted also for relative errors. Today’s static analysis tools usually report absolute as well as relative errors. The latter is, however, computed via absolute errors. That is, the tools first compute the absolute error and then divide it by the largest function value: errrel_approx = maxx∈I f (x) − fˆ(x̂) minx∈I |f (x)| (3) Clearly, Equation 2 and Equation 3 both compute sound relative error bounds, but errrel_approx is an over-approximation due to the loss of correlation between the nominator and denominator. Whether this loss of correlation leads to coarse error bounds in practice has, perhaps surprisingly, not been studied yet in the context of automated sound error estimation. Beyond curiosity, we are interested in the automated computation of relative errors for several reasons. First, relative errors are more informative and often also more natural for user specifications. Secondly, when computing sound error bounds, we necessarily compute over-approximations. For absolute errors, the over-approximations become bigger for larger input ranges, i.e. the error bounds are less tight. Since relative errors consider the range of the expression, we expect these overapproximations to be smaller, thus making relative errors more suitable for modular verification. One may think that computing relative errors is no more challenging than computing absolute errors; this is not the case for two reasons. First, the complexity of computing relative errors is higher (compare Equation 1 and Equation 2) and due to the division, the expression is now nonlinear even for linear f . Both complexity and nonlinearity have already been challenging for absolute errors computed by automated tools, usually leading to coarser error bounds. Furthermore, whenever the range of f includes zero, we face an inherent division by zero. Indeed, today’s static analysis tools report no relative error for most standard benchmarks for this reason. Today’s static analysis tools employ a variety of different strategies (some orthogonal) for dealing with the overapproximation of worst-case absolute roundoff errors due to nonlinear arithmetic: the tool Rosa uses a forward dataflow analysis with a linear abstract domain combined with a nonlinear decision procedure [3], Fluctuat augments a similar linear analysis with interval subdivision [1], and FPTaylor chooses an optimization-based approach [2] backed by a branch-andbound algorithm. In this paper, we investigate how today’s methods can be used, extended and combined for the computation of relative errors. To the best of our knowledge, this is the first systematic study of fully automated techniques for the computation of relative errors. We mainly focus on the issue of computing tight relative error bounds and for this extend the optimization based approach for computing absolute errors to computing relative errors directly and show experimentally that it often results in tighter error bounds, sometimes by up to six orders of magnitude. We furthermore combine it with interval subdivision (we are not aware of interval subdivision being applied to this approach before), however, we note that, perhaps surprisingly, the benefits are rather modest. We compare this direct error computation to forward analysis which computes relative errors via absolute errors on a standard benchmark set, and note that the latter outperforms direct relative error computation only on a single univariate benchmark. On the other hand, this approach clearly benefits from interval subdivision. We also observe that interval subdivision is beneficial for dealing with the inherent division by zero issue in relative error computations. We propose a practical (and preliminary) solution, which reduces the impact of potential division-by-zero’s to small subdomains, allowing our tool to compute relative errors for the remainder of the domain. We demonstrate on our benchmarks that this approach allows our tool to provide more useful information than state-of-the-art tools. Contributions: • • • • We have implemented all techniques within the tool Daisy [5], which is available at https://github.com/malyzajko/daisy. II. BACKGROUND We first give a brief overview over floating-point arithmetic as well as state-of-the-art techniques for automated sound worst-case absolute roundoff error estimation. A. Floating-Point Arithmetic The error definitions in section I include a finite-precision function fˆ(x̂) which is highly irregular and discontinuous and thus unsuitable for automated analysis. We abstract it following the floating-point IEEE 754 standard [6], by replacing every floating-point variable, constant and operation by: x ⊙ y = (x ◦ y)(1 + e) + d, √ √ ◦x = x(1 + e) + d x̃ = x(1 + e) + d (4) where ⊙ ∈ {⊕, ⊖, ⊗, ⊘} and ◦ ∈ {+, −, ×, /} are floatingpoint and real arithmetic operations, respectively. e is the relative error introduced by rounding at each operation and is bounded by the so-called machine epsilon |e| ≤ ǫM . Denormals (or subnormals) are values with a special representation which provide gradual underflow. For these, the roundoff error is expressed as an absolute error d and is bounded by δM , (for addition and subtraction d = 0). This abstraction is valid in the absence of overflow and invalid operations resulting in Not a Number (NaN) values. These values are detected separately and reported as errors. In this paper, we consider double precision floating-point arithmetic with ǫM = 2−53 and δM = 2−1075 . Our approach is parametric in the precision, and thus applicable to other floating-point types as well. Using this abstraction we replace fˆ(x̂) with a function f˜(x, e, d), where x are the input variables and e and d the roundoff errors introduced for each floating-point operation. In general, x, e and d are vector-valued, but for ease of reading we will write them without vector notation. Note that our floating-point abstraction is real-valued. With this abstraction, we and all state-of-the-art analysis tools approximate absolute errors as: errabs ≤ max x∈I,|ei |≤ǫM ,|di |≤δ f (x) − f˜(x, e, d) (5) B. State-of-the-art in Absolute Error Estimation When reviewing existing automated tools for absolute roundoff error estimation, we focus on their techniques for reducing over-approximations due to nonlinear arithmetic in order to compute tight error bounds. Rosa [3] computes absolute error bounds using a forward data-flow analysis and a combination of abstract domains. Note that the magnitude of the absolute roundoff error at an arithmetic operation depends on the magnitude of the operation’s value (this can easily be seen from Equation 4), and these are in turn determined by the input parameter ranges. Thus, Rosa tracks two values for each intermediate abstract syntax tree node: a sound approximation of the range and the worst-case absolute error. The transfer function for errors We extend an optimization-based approach [2] for bounding absolute errors to relative errors and thus provide the first feasible and fully automated approach for computing relative errors directly. We perform the first experimental comparison of different techniques for automated computation of sound relative error bounds. We show that interval subdivision is beneficial for reducing the over-approximation in absolute error computations, but less so for relative errors computed directly. We demonstrate that interval subdivision provides a practical solution to the division by zero challenge of relative error computations for certain benchmarks. 2 where y1 = e1 , . . . , yk = ek , yk+1 = d1 , . . . , y2k = dk and p ∈ R2k such that |pi | ≤ ǫM for i = 1 . . . k and |pi | ≤ δ for i = k+1 . . . 2k. The remainder term R bounds all higher order terms and ensures soundness of the computed error bounds. The approach is symbolic in the sense that the Taylor approximation is taken wrt. e and d only and x is a symbolic argument. Thus, f (x, 0, 0) represents the function point where all inputs x remain symbolic and no roundoff errors are present, i.e. e = d = 0 and f (x, 0, 0) = f (x). Choosing e = d = 0 as the point at which to perform the Taylor approximation and replacing ei with its upper bound ǫM reduces the initial optimization problem to: uses the ranges to propagate errors from subexpressions and to compute the new roundoff error committed by the arithmetic operation in question. One may think that evaluating an expression in interval arithmetic [7] and interpreting the width of the resulting interval as the error bound would be sufficient. While this is sound, it computes too pessimistic error bounds, especially if we consider relatively large ranges on inputs: we cannot distinguish which part of the interval width is due to the input interval or due to accumulated roundoff errors. Hence, we need to compute ranges and errors separately. Rosa implements different range arithmetics with different accuracy-efficiency tradeoffs for bounding ranges and errors. To compute ranges, Rosa offers a choice between interval arithmetic, affine arithmetic [8] (which tracks linear correlations between variables) and a combination of interval arithmetic with a nonlinear arithmetic decision procedure. The latter procedure first computes the range of an expression in standard interval arithmetic and then refines, i.e. tightens, it using calls to the nlsat [9] decision procedure within the Z3 SMT solver [10]. For tracking errors, Rosa uses affine arithmetic; since roundoff errors are in general small, tracking linear correlations is in general sufficient. Fluctuat [1] is an abstract interpreter which separates errors similarly to Rosa and which uses affine arithmetic for computing both the ranges of variables and for the error bounds. In order to reduce the over-approximations introduced by affine arithmetic for nonlinear operations, Fluctuat uses interval subdivision. The user can designate up to two variables in the program whose input ranges will be subdivided into intervals of equal width. The analysis is performed separately and the overall error is then the maximum error over all subintervals. Interval subdivision increases the runtime of the analysis significantly, especially for multivariate functions, and the choice of which variables to subdivide and by how much is usually not straight-forward. FPTaylor, unlike Daisy and Fluctuat, formulates the roundoff error bounds computation as an optimization problem, where the absolute error expression from Equation 1 is to be maximized, subject to interval constraints on its parameters. Due to the discrete nature of floating-point arithmetic, FPTaylor optimizes the continuous, real-valued abstraction (Equation 5). However, this expression is still too complex and features too many variables for optimization procedures in practice, resulting in bad performance as well as bounds which are too coarse to be useful (see subsection V-A for our own experiments). FPTaylor introduces the Symbolic Taylor approach, where the objective function of Equation 5 is simplified using a first order Taylor approximation with respect to e and d: f˜(x, e, d) = f˜(x, 0, 0) + errabs ≤ ǫM max x∈I k X ∂ f˜ (x, 0, 0) + MR ∂ei i=1 (7) where MR is an upper bound for the error term R(x, e, d) (more details can be found in [2]). FPTaylor uses interval arithmetic to estimate the value of MR as the term is second order and thus small in general. To solve the optimization problem in Equation 7, FPTaylor uses rigorous branch-and-bound optimization. Branch-andbound is also used to compute the resulting real function f (x) range, which is needed for instance to compute relative errors. Real2Float [4], another tool, takes the same optimizationbased approach, but uses semi-definite programming for the optimization itself. III. B OUNDING R ELATIVE E RRORS The main goal of this paper is to investigate how today’s sound approaches for computing absolute errors fare for bounding relative errors and whether it is possible and advantageous to compute relative errors directly (and not via absolute errors). In this section, we first concentrate on obtaining tight bounds in the presence of nonlinear arithmetic, and postpone a discussion of the orthogonal issue of division by zero to the next section. Thus, we assume for now that the range of the function for which we want to bound relative errors does not include zero, i.e. 0 ∈ / f (x) and 0 ∈ / f˜(x̃), for x, x̃ within some given input domain. We furthermore consider f to be a straight-line arithmetic expression. Conditionals and loops have been shown to be challenging [11] even for absolute errors and we thus leave their proper treatment for future work. We consider function calls to be an orthogonal issue; they can be handled by inlining, thus reducing to straight-line code, or require suitable summaries in postconditions, which is also one of the motivations for this work. The forward dataflow analysis approach of Rosa and Fluctuat does not easily generalize to relative errors, as it requires intertwining the range and error computation. Instead, we extend FPTaylor’s approach to computing relative errors directly (subsection III-A). We furthermore implement interval subdivision (subsection III-B), which is an orthogonal measure to reduce over-approximation and experimentally evaluate different combinations of techniques on a set of standard benchmarks (subsection V-A). k X ∂ f˜ (x, 0, 0)ei + R(x, e, d), (6) ∂ei i=1 k 2k X ∂ f˜ 1 X ∂ 2 f˜ (x, p)yi yj + (x, 0, 0)di R(x, e, d) = 2 i,j=1 ∂yi ∂yj ∂di i=1 3 based on a branch-and-bound algorithm and is thus in principle similar to Gelpia’s optimization-based approach. Note that the queries we send to both solvers are (un)satisfiability queries, and not optimization queries. For the nonlinear decision procedure this is necessary as it is not suitable for direct optimization, but the branch-and-bound algorithm in dReal is performing optimization internally. The reason for our roundabout approach for dReal is that while the tool has an optimization interface, it uses a custom input format and is difficult to integrate. We expect this approach to affect mostly performance, however, and not accuracy. A. Bounding Relative Errors Directly The first strategy we explore is to compute relative errors directly, without taking the intermediate step through absolute errors. That is, we extend FPTaylor’s optimization based approach and maximize the relative error expression using the floating-point abstraction from Equation 4: max |g̃(x, e, d)| = max x∈I,|ei |≤ǫM ,|di |≤δ f (x) − f˜(x, e, d) f (x) (8) The hope is to preserve more correlations between variables in the nominator and denominator and thus obtain tighter and more informative relative error bounds. We call the optimization of Equation 8 without simplifications the naive approach. While it has been mentioned previously that this approach does not scale well [2], we include it in our experiments (in subsection V-A) nonetheless, as we are not aware of any concrete results actually being reported. As expected, the naive approach returns error bounds which are so large that they are essentially useless. We thus simplify g̃(x, e, d) by applying the Symbolic Taylor approach introduced by FPTaylor [2]. As before, we take the Taylor approximation around the point (x, 0, 0), so that the first term of the approximation is zero as before: g̃(x, 0, 0) = 0. We obtain the following optimization problem: B. Interval Subdivision The over-approximation committed by static analysis techniques grows in general with the width of the input intervals, and thus with the width of all intermediate ranges. Intuitively, the worst-case error which we consider is usually achieved only for a small part of the domain, over-approximating the error for the remaining inputs. Additionally the domain where worst-case errors are obtained may be different at each arithmetic operation. Thus, by subdividing the input domain we can usually obtain tighter error bounds. Note that interval subdivision can be applied to any error estimation approach. Fluctuat has applied interval subdivision to absolute error estimation, but we are not aware of a combination with the optimization-based approach, nor about a study of its effectiveness for relative errors. We apply subdivision to input variables and thus compute:   max |g̃(x, e, d)| (9) max k X ∂g̃ (x, 0, 0)ei + MR x∈I,|ei |≤ǫM ,|di |≤δ ∂e i i=1 max where MR is an upper bound for the remainder term R(x, e, d). Unlike in Equation 7 we do not pull the factor ei for each term out of the absolute value, as we plan to compute tight bounds for mixed-precision in the future, where the upper bounds on all ei are not all the same (this change does not affect the accuracy for uniform precision computations). Computing Upper Bounds: The second order remainder R is still expected to be small, so that we use interval arithmetic to compute a sound bound on MR (in our experiments R is indeed small for all benchmarks except ‘doppler’). To ∂g̃ we need a sound optimization bound the first order terms ∂e i procedure to maintain overall soundness, which limits the available choices significantly. FPTaylor uses the global optimization tool Gelpia [12], which internally uses a branch-and-bound based algorithm. Unfortunately, we found it difficult to integrate because of its custom interface. Furthermore, we observed unpredictable behavior in our experiments (e.g. nondeterministic crashes and substantially varying running times for repeated runs on the same expression). Instead, we use Rosa’s approach which combines interval arithmetic with a solver-based refinement. Our approach is parametric in the solver and we experiment with Z3 [10] and dReal [13]. Both support the SMT-lib interface, provide rigorous results, but are based on fundamentally different techniques. Z3 implements a complete decision procedure for nonlinear arithmetic [9], whereas dReal implements the framework of δ-complete decision procedures. Internally, it is k∈[1...m] xj ∈Ijk where m is an number of subdivisions for each input interval. That is, for multivariate functions, we subdivide the input interval for each variable and maximize the error over the Cartesian product. Clearly, the analysis running time is exponential in the number of variables. While Fluctuat limits subdivisions to two user-designated variables and a userdefined number of subdivisions each, we choose to limit the total number of analysis runs by a user-specified parameter p. That is, given p, m (the desired number of subdivisions for each variable), and n (number of input variables), the first ⌊logm (p−n)⌋ variables’ domains are subdivided m times, with larger input domains subdivided first. The remaining variable ranges remain undivided. C. Implementation We implement all the described techniques in the tool Daisy [5]. Daisy, a successor of Rosa [3], is a source-to-source compiler which generates floating-point implementations from real-valued specifications given in the following format: def bspline3(u: Real): Real = { require(0 <= u && u <= 1) - u * u * u / 6.0 } Daisy is parametric in the approach (naive, forward dataflow analysis or optimization-based), the solver used (Z3 or dReal) 4 and the number of subdivisions (including none). Any combination of these three orthogonal choices can be run by simply changing Daisy’s input parameters. Furthermore, Daisy simplifies the derivative expressions in the optimization-based approach (x + 0 = x, x × 1 = x, etc.). Unsimplified expressions may affect the running time of the solvers (and thus also the accuracy of the error bounds), as we observed that the solvers do not necessarily perform these otherwise straight-forward simplifications themselves. Finally, to maintain soundness, we need to make sure that we do not introduce internal roundoff errors during the computation of error bounds. For this purpose we implement all internal computations in Daisy using infinite-precision rationals. IV. H ANDLING D IVISION BY error computations, however the running time increases correspondingly. Ideally, we could exclude from the relative error computation only a small domain around the zeros of the function f . While for univariate functions, this approach is straight-forward (zeros can be, for instance, obtained with a nonlinear decision procedure), for multivariate functions this is challenging, as the zeros are not simple points but curves. Secondly, subdivision could only be used for determining which sub-domains exhibit potential division by zero. The actual relative error bound computation can then be performed on the remainder of the input domain without subdividing it. This would lead to performance improvements, even though the ‘guaranteed-no-zero’ domain can still consist of several disconnected parts. Again, for univariate functions this is a straight-forward extension, but non-trivial for multivariate ones. Finally, we could compute Z ERO An important challenge arising while computing relative errors is how to handle potential divisions by zero. Stateof-the-art tools today simply do not report any error at all whenever the function range contains zero. Unfortunately, this is not a rare occurrence; on a standard benchmark set for floating-point verification, many functions exhibit division by zero (see Table IV for our experiments). Note that these divisions by zero are inherent to the expression which we consider and are usually not due to overapproximations in the analysis. Thus, we can only reduce the effect of division by zero, but we cannot eliminate it entirely. Here, we aim to reduce the domain for which we cannot compute relative errors. Similar to how relative and absolute errors are combined in the IEEE 754 floating-point model (Equation 4), we want to identify parts of the input domain on which relative error computation is not possible due to division by zero and compute absolute errors. For the remainder of the input domain, we compute relative errors as before. We use interval subdivision (subsection III-B), attempting to compute relative errors (with one of the methods described before) on every subdomain. Where the computation fails due to (potential) division by zero, we compute the absolute error and report both to the user: max xj ∈Ijk f (x) − f˜(x, e, d) f (x) + ǫ (10) for some small ǫ, which is a standard approach in scientific computing. It is not sound, however, so that we do not consider it here. V. E XPERIMENTAL E VALUATION We compare the different strategies for relative error computation on a set of standard benchmarks with FPTaylor and the forward dataflow analysis approach from Rosa (now implemented in Daisy) as representatives of state-of-the-art tools. We do not compare to Fluctuat directly as the underlying error estimation technique based on forward analysis with affine arithmetic is very similar to Daisy’s. Indeed experiments performed previously [2], [11] show only small differences in computed error bounds. We rather choose to implement interval subdivision within Daisy. All experiments are performed in double floating-point precision (the precision FPTaylor supports), although all techniques in Daisy are parametric in the precision. The experiments were performed on a desktop computer running Debian GNU/Linux 8 64-bit with a 3.40GHz i5 CPU and 7.8GB RAM. The benchmarks bsplines, doppler, jetEngine, rigidBody, sine, sqrt and turbine are nonlinear functions from [3]; invertedPendulum and the traincar benchmarks are linear embedded examples from [14]; and himmilbeau and kepler are nonlinear examples from the Real2Float project [4]. relError: 6.6614143807162e-16 On several sub-intervals relative error cannot be computed. Computing absolute error on these sub-intervals. For intervals (u -> [0.875,1.0]), absError: 9.66746937132909e-19 While the reported relative error bound is only sound for parts of the domain, we believe that this information is nonetheless more informative than either no result at all or only an absolute error bound, which today’s tools report and which may suffer from unnecessary over-approximations. We realize that while this approach provides a practical solution, it is still preliminary and can be improved in several ways. First, a smarter subdivision strategy would be beneficial. Currently, we divide the domain into equal-width intervals, and vary only their number. The more fine-grained the subdivision, the bigger part of the domain can be covered by relative A. Comparing Techniques for Relative Error Bounds To evaluate the accuracy and performance of the different approaches for the case when no division by zero occurs, we modify the standard input domains of the benchmarks whenever necessary such that the function ranges do not contain zero and all tools can thus compute a non-trivial relative error bound. Table I shows the relative error bounds computed with the different techniques and tools, and Table II the corresponding 5 Multivariate Univariate TABLE I R ELATIVE ERROR BOUNDS COMPUTED BY DIFFERENT TECHNIQUES DaisyOPT Z3+subdiv Benchmark Underapprox Daisy FPTaylor Naive approach Daisy + subdiv Z3 dReal bspline0 bspline1 bspline2 bspline3 sine sineOrder3 sqroot 1.46e-15 7.91e-16 2.74e-16 5.49e-16 2.84e-16 3.65e-16 4.01e-16 4.12e-13 2.54e-15 1.11e-15 2.46e-10 8.94e-16 1.04e-15 1.04e-15 4.26e-13 3.32e-15 1.16e-15 3.07e-10 8.27e-16 1.10e-15 1.21e-15 5.11e+02 4.16e-01 5.22e-01 5.12e+05 4.45e-01 1.39e-01 1.02e+00 7.44e-14 5.32e-15 1.61e-15 5.23e-11 1.39e-15 1.99e-15 2.20e-15 3.00e-15 3.22e-15 8.92e-16 6.66e-16 7.66e-16 8.94e-16 1.02e-15 3.00e-15 3.22e-15 9.76e-16 6.66e-16 7.66e-16 8.94e-16 1.02e-15 3.00e-15 3.22e-15 8.92e-16 6.66e-16 7.66e-16 8.94e-16 1.02e-15 3.00e-15 3.22e-15 8.92e-16 6.66e-16 7.66e-16 8.94e-16 1.02e-15 1.06e-15 8.46e-16 3.74e-16 1.45e-15 4.39e-16 7.22e-16 5.28e-16 4.49e-16 5.48e-16 2.72e-15 8.11e-16 5.79e-16 1.03e-15 7.41e-16 2.08e-04 6.55e-13 2.09e-11 9.26e-15 1.31e-12 2.17e-11 4.01e-10 8.77e-11 3.91e-12 2.16e-13 3.44e-13 6.47e-13 5.26e-15 3.52e-13 6.13e-07 7.89e-13 2.48e-11 7.53e-15 1.64e-12 2.59e-11 5.65e-15 1.14e-10 4.73e-12 2.69e-13 4.31e-13 1.48e-13 4.25e-15 7.43e-14 2.09e+08 6.69e+02 1.64e+00 3.87e+00 2.16e+03 7.93e+04 4.09e+05 1.55e+00 5.14e+03 2.91e+02 3.47e+02 4.16e+02 4.81e+00 2.13e+02 2.60e-05 9.81e-15 1.22e-11 1.40e-13 3.63e-12 8.70e-13 1.35e-11 2.50e-11 1.77e-12 2.16e-13 1.91e-13 6.81e-13 1.66e-13 3.91e-13 1.93e-13 6.54e-13 1.21e-15 4.47e-15 3.97e-12 3.80e-11 4.56e-10 9.78e-16 2.21e-15 7.67e-14 3.45e-14 2.06e-15 4.12e-15 1.91e-14 1.94e-13 1.98e-15 1.35e-15 5.12e-15 2.39e-15 1.29e-15 2.42e-15 1.27e-15 2.33e-15 2.72e-13 4.15e-13 3.07e-15 4.30e-15 1.92e-14 1.93e-13 7.05e-15 1.21e-15 6.03e-15 1.63e-15 2.85e-13 8.58e-12 9.78e-16 2.21e-15 7.67e-14 3.45e-14 2.06e-15 4.12e-15 1.91e-14 1.94e-13 1.99e-15 1.52e-15 6.51e-15 2.64e-15 1.71e-15 2.26e-15 1.46e-15 2.96e-15 2.50e-13 2.38e-13 3.90e-15 4.33e-15 1.93e-14 doppler himmilbeau invPendulum jet kepler0 kepler1 kepler2 rigidBody1 rigidBody2 traincar_state8 traincar_state9 turbine1 turbine2 turbine3 dReal+subdiv TABLE II A NALYSIS TIME OF DIFFERENT TECHNIQUES FOR RELATIVE ERRORS ON BENCHMARKS WITHOUT DIVISION BY ZERO DaisyOPT Z3 + subdiv Benchmark Daisy FPTaylor Naive approach Daisy + subdiv Z3 dReal bsplines sines sqroot 6s 5s 3s 13s 8s 6s 13m 25s 13m 45s 6m 4s 0.34s 0.42s 0.15s 20s 1m 4s 14s 25s 1m 21s 12s 27s 1m 8s 14s 30s 1m 9s 14s doppler himmilbeau invPendulum jet kepler rigidBody traincar turbine 5s 9s 3s 20s 37s 11s 10s 11s 2m 11s 4s 5s 17s 39s 8s 42s 28s 2m 14s 5m 30s 1m 31s 19m 35s 14m 41s 10m 4s 8m 15s 17m 25s 1s 0.36s 0.15s 7s 1s 0.39s 1s 2s 1m 59s 1m 50s 7s 30m 40s 3m 27s 30s 1m 1s 5m 29s 2m 35s 1m 16s 37s 32m 24s 16m 29s 1m 18s 10m 43s 11m 28s 2m 58s 6m 15s 25s 45m 31s 12m 20s 1m 26s 4m 7s 12m 30s 7m 28s 8m 5s 3m 54s 2 h 20m 49s 27m 56s 8m 37s 18m 35s 42m 36s total 1m 60s 5m 1s 1h 52m 28s 13s 46m 42s 1h 18m 45s 1h 27m 22s 4h 19m 53s analysis times. Bold marks the best result, i.e. tightest computed error bound, for each benchmark. The column ‘Underapprox’ gives an (unsound) relative error bound obtained with dynamic evaluation on 100000 inputs; these values provide an idea of the true relative errors. The ‘Naive approach’ column confirms that simplifications of the relative error expression are indeed necessary (note the exponents of the computed bounds). The last four columns show the error bounds when relative errors are computed directly using the optimization based approach (denoted ‘DaisyOPT’) from subsection III-A, with the two solvers and with and without subdivisions. For subdivisions, we use m = 2 for univariate benchmarks, m = 8 for multivariate and p = 50 for both as in our experiments these parameters showed a good trade-off between performance and accuracy. For most of the benchmarks we find that direct evaluation of relative errors computes tightest error bounds with dReal + subdiv acceptable analysis times. Furthermore, for most benchmarks Z3, resp. its nonlinear decision procedure, is able to compute slightly tighter error bounds, but for three of our benchmarks dReal performs significantly better, while the running times are comparable. Somewhat surprisingly, we note that interval subdivision has limited effect on accuracy when combined with direct relative error computation, while also increasing the running time significantly. Comparing against state-of-the-art techniques (columns Daisy and FPTaylor), which compute relative errors via absolute errors, we notice that the results are sometimes several orders of magnitude less accurate than direct relative error computation (e.g. six orders of magnitude for the bspline3 and doppler benchmarks). The column ‘Daisy+subdiv’ shows relative errors computed 6 TABLE III R ELATIVE ERROR SCALABILITY WITH RESPECT TO THE SIZE OF THE INPUT DOMAIN Benchmark small via absolute errors large ratio small directly large ratio bspline0 bspline1 bspline2 bspline3 sine sineOrder3 sqroot 6.44e-15 1.57e-15 6.71e-16 3.27e-13 7.44e-16 5.70e-16 6.49e-16 4.12e-13 2.54e-15 1.11e-15 2.46e-10 8.94e-16 1.04e-15 1.04e-15 64 2 2 750.96 1.20 2 1.61 9.99e-16 2.07e-15 6.75e-16 6.66e-16 6.77e-16 4.81e-16 5.65e-16 3.00e-15 3.22e-15 8.92e-16 6.66e-16 7.66e-16 8.94e-16 1.02e-15 3 2 1.32 1 1.13 2 1.81 doppler himmilbeau invPendulum jet kepler0 kepler1 kepler2 rigidBody1 rigidBody2 traincar_state8 traincar_state9 turbine1 turbine2 turbine3 1.48e-11 1.21e-15 2.96e-13 9.05e-15 1.40e-15 1.47e-15 4.28e-15 1.40e-12 2.00e-15 6.93e-15 4.61e-15 4.46e-14 6.94e-16 1.10e-13 2.08e-04 6.55e-13 2.09e-11 9.26e-15 1.31e-12 2.17e-11 4.01e-10 8.77e-11 3.91e-12 2.16e-13 3.44e-13 6.47e-13 5.26e-15 3.52e-13 1.40e+07 541.15 70.74 1.02 934.97 1.47e+04 9.37e+04 62.66 1.95e+03 31.18 74.67 14.50 7.57 3.20 1.26e-15 7.78e-16 1.21e-15 4.60e-15 1.17e-15 3.06e-15 7.42e-15 9.75e-16 1.16e-15 1.64e-15 1.73e-15 1.75e-15 6.91e-16 6.50e-15 1.93e-13 6.54e-13 1.21e-15 4.47e-15 3.97e-12 3.80e-11 4.56e-10 9.78e-16 2.21e-15 7.67e-14 3.45e-14 2.06e-15 4.12e-15 1.91e-14 153.48 841.07 1 0.97 3.39e+03 1.24e+04 6.15e+04 1 1.90 46.85 19.96 1.18 5.96 2.94 Comparing the numbers from the ‘ratio’ columns we notice that for direct computation ratio is significantly smaller than for the computation via absolute errors. This means that the over-approximation committed by the direct computation is smaller than the over-approximation committed by the relative error computation via absolute errors. The most prominent example is the doppler benchmark, where the directly computed error relative grew for the larger domain by two orders of magnitude, while the relative error computed via absolute grew by seven orders of magnitude. Based on these results we conclude that relative errors computed directly scale better than relative errors computed via absolute with respect to the size of the input domain. via absolute errors, using the forward analysis with subdivision (with the same parameters as above). Here we observe that unlike for the directly computed relative errors, interval subdivision is mostly beneficial. B. Scalability of Relative Errors We also evaluate the scalability of the direct computation of relative errors with respect to the size of the input domain, and compare it with the scalability of computation of relative errors via absolute. Since the magnitude of roundoff errors (both absolute and relative) depends on the magnitude of input values, larger input domains cause larger roundoff errors. But also the over- approximation of the errors grows together with the size of input domain. Ideally, we want this overapproximation to grow as slowly as possible. For the experiments in Table I, we use as large input domains as possible without introducing result ranges which include zero. Now for our scalability comparison we also compute relative errors on small input domains. For that we modify the standard input domains of the benchmarks such that the width of input intervals is reduced, while the function ranges still do not contain zero. All experiments are performed with the Z3 solver with a timeout set to 1 second. The relative errors are computed without interval subdivision, since we noticed that it has a limited effect on accuracy while increasing running times. Table III presents relative error bounds computed for smaller and larger input domains. Columns ‘small’ and ‘large’ show relative errors computed on smaller and larger input domains respectively. Column ‘ratio’ presents a relation between the values for the large and small domains. This relation characterizes the scalability of the approach, the smaller, the better. C. Handling Division by Zero To evaluate whether interval subdivision is helpful when dealing with the inherent division by zero challenge, we now consider the standard benchmark set, with standard input domains. Table IV summarizes our results. We first note that division by zero indeed occurs quite often, as the missing results in the Daisy and FPtaylor columns show. The last three columns show our results when using interval subdivision. Note that to obtain results on as many benchmarks as possible we had to change the parameters for subdivision to m = 8 and p = 50 for univariate and m = 4, p = 100 for multivariate benchmarks. The result consists of three values: the first value is the maximum relative error computed over the sub-domains where relative error was possible to compute; in the brackets we report the maximum absolute error for the subdomains where relative error computation is not possible, and the integer is the amount of these sub-domains where absolute errors were computed. We only report a result if the number of sub-domains with division by zero is less than 80% of the 7 total amount of subdomains, as larger numbers would probably be impractical to be used within, e.g. modular verification techniques. Whenever we report ’-’ in the table, this means that division by zero occurred on too many or all subdomains. We observe that while interval subdivision does not provide us with a result for all benchmarks, it nonetheless computes information for more benchmarks than state-of-the-art techniques. Another common theme is to run a higher-precision program alongside the original one to obtain error bounds by testing [29]–[32]. Testing has also been used as a verification method for optimizing mixed-precision computations [33], [34]. These approaches based on testing, however, only consider a limited number of program executions and thus cannot prove sound error bounds. VI. R ELATED WORK We have presented the first experimental investigation into the suitability of different static analysis techniques for sound accurate relative error estimation. Provided that the function range does not include zero, computing relative errors directly usually yields error bounds which are (orders of magnitude) more accurate than if relative errors are computed via absolute errors (as is current state-of-the-art). Surprising to us, while interval subdivision is beneficial for absolute error estimation, when applied to direct relative error computation it most often does not have a significant effect on accuracy. We furthermore note that today’s rigorous optimization tools could be improved in terms of reliability as well as scalability. Finally, while interval subdivision can help to alleviate the effect of the inherent division by zero issue in relative error computation, it still remains an open challenge. VII. C ONCLUSION The goal of this work is an automated and sound static analysis technique for computing tight relative error bounds for floating-point arithmetic. Most related are current static analysis tools for computing absolute roundoff error bounds [1]–[4]. Another closely related tool is Gappa [15], which computes both absolute and relative error bounds in Coq. It appears relative errors can be computed both directly and via absolute errors. The automated error computation in Gappa uses intervals, thus, a computation via absolute errors will be less accurate than Daisy performs. The direct computation amounts to the naive approach, which we have shown to work poorly. The direct relative error computation was also used in the context of verifying computations which mix floating-point arithmetic and bit-level operations [16]. Roundoff errors are computed using an optimization based approach similar to FPTaylor’s. Their approach is targeted to specific low-level operations including only polynomials, and the authors do not use Taylor’s theorem. However, tight error estimates are not the focus of the paper, and the authors only report that they use whichever bound (absolute or relative) is better. we are not aware of any systematic evaluation of different approaches for sound relative error bounds. More broadly related are abstract interpretation-based static analyses which are sound wrt. floating-point arithmetic [17], [18], some of which have been formalized in Coq [19] These domains, however, do not quantify the difference between the real-valued and the finite-precision semantics and can only show the absence of runtime errors such division-by-zero or overflow. Floating-point arithmetic has also been formalized in an SMT-lib [20] theory and solvers exist which include floatingpoint decision procedures [20], [21]. These are, however, not suitable for roundoff error quantification, as a combination with the theory of reals would be at the propositional level only and thus not lead to useful results. Floating-point arithmetic has also been formalized in theorem provers such as Coq [22] and HOL Light [23], and some automation support exists in the form of verification condition generation and reasoning about ranges [24], [25]. Entire numerical programs have been proven correct and accurate within these [26], [27]. While very tight error bounds can be proven for specific computations [28], these verification efforts are to a large part manual and require substantial user expertise in both floating-point arithmetic as well as theorem proving. Our work focuses on a different trade-off between accuracy, automation and generality. R EFERENCES [1] E. Goubault and S. Putot, “Static Analysis of Finite Precision Computations,” in VMCAI, 2011. [2] A. Solovyev, C. Jacobsen, Z. Rakamarić, and G. Gopalakrishnan, “Rigorous Estimation of Floating-Point Round-off Errors with Symbolic Taylor Expansions,” in FM, 2015. [3] E. Darulova and V. Kuncak, “Sound Compilation of Reals,” in POPL, 2014. [4] V. Magron, G. A. Constantinides, and A. F. Donaldson, “Certified Roundoff Error Bounds Using Semidefinite Programming,” CoRR, vol. abs/1507.03331, 2015. [5] MPI-SWS, “Daisy - a framework for accuracy analysis and synthesis of numerical programs,” 2017, https://github.com/malyzajko/daisy. [6] “IEEE Standard for Floating-Point Arithmetic,” IEEE Std 754-2008, Aug 2008. [7] R. Moore, Interval Analysis. Prentice-Hall, 1966. [8] L. H. de Figueiredo and J. Stolfi, “Affine Arithmetic: Concepts and Applications,” Numerical Algorithms, vol. 37, no. 1-4, 2004. [9] D. Jovanović and L. de Moura, “Solving non-linear arithmetic,” in IJCAR, 2012. [10] L. De Moura and N. Bjørner, “Z3: an efficient SMT solver,” in TACAS, 2008. [11] E. Darulova and V. Kuncak, “Towards a Compiler for Reals,” ACM TOPLAS, vol. 39, no. 2, 2017. [12] M. S. Baranowski and I. Briggs, “Gelpia - global extrema locator parallelization for interval arithmetic,” https://github.com/soarlab/gelpia. [13] S. Gao, S. Kong, and E. M. Clarke, “dReal: An SMT Solver for Nonlinear Theories over the Reals,” in CADE, 2013. [14] E. Darulova, V. Kuncak, R. Majumdar, and I. Saha, “Synthesis of Fixedpoint Programs,” in EMSOFT, 2013. [15] M. Daumas and G. Melquiond, “Certification of bounds on expressions involving rounded operators,” ACM Trans. Math. Softw., vol. 37, no. 1, pp. 2:1–2:20, Jan. 2010. [16] W. Lee, R. S. 0001, and A. Aiken, “Verifying Bit-Manipulations of Floating-Point.” PLDI, 2016. [17] L. Chen, A. Miné, and P. Cousot, “A Sound Floating-Point Polyhedra Abstract Domain,” in APLAS, 2008. [18] B. Jeannet and A. Miné, “Apron: A Library of Numerical Abstract Domains for Static Analysis,” in CAV, 2009. [19] J.-H. Jourdan, V. Laporte, S. Blazy, X. Leroy, and D. Pichardie, “A Formally-Verified C Static Analyzer,” in POPL, 2015. 8 TABLE IV R ELATIVE ERROR BOUNDS COMPUTED BY DIFFERENT TECHNIQUES ON STANDARD BENCHMARKS ( WITH POTENTIAL DIVISION BY ZERO ) Daisy + subdiv Benchmark Daisy FPTaylor bspline0 bspline1 bspline2 bspline3 sine sineOrder3 sqroot - 3.32e-15 3.50e-15 - 1.58e-01 2.80e-13 9.20e-16 1.31e-14 1.07e-15 2.29e-15 7.09e-15 1.48e-11 4.35e-15 1.33e-14 6.12e-14 1.52e-13 4.99e-12 4.57e-15 1.17e-14 4.21e-14 1.18e-14 2.21e-14 8.95e-13 3.75e-14 4.94e-15 2.38e-13 2.29e-14 2.65e-12 6.03e-15 5.64e-14 2.77e-14 doppler himmilbeau invPendulum jet kepler0 kepler1 kepler2 rigidBody1 rigidBody2 traincar_state8 traincar_state9 turbine1 turbine2 turbine3 Z3 + subdiv (1.08e-18, 1) (9.67e-19, (2.00e-16, (3.10e-16, (2.83e-14, 1) 2) 2) 3) (1.00e-12, 12) (2.60e-14, 32) (8.08e-14, 49) (2.16e-13, 46) (3.51e-11, 50) (3.65e-14, 25) 3.00e-15 3.22e-15 8.92e-16 6.66e-16 7.02e-16 8.94e-16 1.92e-15 1.26e-15 2.57e-14 2.82e-15 2.16e-15 1.07e-15 1.67e-15 1.75e-15 2.74e-15 6.50e-15 DaisyOPT dReal + subdiv (1.08e-18, 1) (9.67e-19, (2.02e-16, (3.17e-16, (3.11e-14, 1) 2) 2) 3) (1.00e-12, 12) (2.60e-14, 32) (7.92e-14, 49) (2.16e-13, 46) (3.65e-11, 50) (1.20e-13, 25) 3.00e-15 3.22e-15 8.92e-16 6.66e-16 7.02e-16 8.94e-16 1.92e-15 1.35e-15 2.84e-15 3.08e-15 3.88e-15 1.78e-15 3.80e-15 5.21e-15 6.97e-14 6.71e-15 (1.08e-18, 1) (9.67e-19, (2.02e-16, (3.17e-16, (3.11e-14, 1) 2) 2) 3) (1.00e-12, 12) (2.60e-14, 32) (8.32e-14, 49) (2.16e-13, 46) (3.65e-11, 50) (3.90e-14, 25) A PPENDIX E XPERIMENTAL C OMPARISON OF S UBDIVISION PARAMETERS [20] P. R. Martin Brain, Cesare Tinelli and T. Wahl, “An Automatable Formal Semantics for IEEE-754 Floating-Point Arithmetic,” Technical Report, http://smt-lib.org/papers/BTRW15.pdf, 2015. [21] M. Brain, V. D’Silva, A. Griggio, L. Haller, and D. Kroening, “Deciding floating-point logic with abstract conflict driven clause learning,” Formal Methods in System Design, vol. 45, no. 2, pp. 213–245, Dec. 2013. [22] S. Boldo and G. Melquiond, “Flocq: A Unified Library for Proving Floating-Point Algorithms in Coq,” in ARITH, 2011. [23] C. Jacobsen, A. Solovyev, and G. Gopalakrishnan, “A Parameterized Floating-Point Formalizaton in HOL Light,” Electronic Notes in Theoretical Computer Science, vol. 317, pp. 101–107, 2015. [24] M. D. Linderman, M. Ho, D. L. Dill, T. H. Meng, and G. P. Nolan, “Towards program optimization through automated analysis of numerical precision,” in CGO, 2010. [25] A. Ayad and C. Marché, “Multi-prover verification of floating-point programs,” in IJCAR, 2010. [26] S. Boldo, F. Clément, J.-C. Filliâtre, M. Mayero, G. Melquiond, and P. Weis, “Wave Equation Numerical Resolution: A Comprehensive Mechanized Proof of a C Program,” Journal of Automated Reasoning, vol. 50, no. 4, pp. 423–456, 2013. [27] T. Ramananandro, P. Mountcastle, B. Meister, and R. Lethin, “A Unified Coq Framework for Verifying C Programs with Floating-Point Computations,” in CPP, 2016. [28] S. Graillat, V. Lefèvre, and J.-M. Muller, “On the maximum relative error when computing xn in floating-point arithmetic,” Université Pierre et Marie Curie Paris 6 ; CNRS, Research Report, ensl-00945033, 2014. [29] F. Benz, A. Hildebrandt, and S. Hack, “A Dynamic Program Analysis to Find Floating-point Accuracy Problems,” in PLDI, 2012. [30] W.-F. Chiang, G. Gopalakrishnan, Z. Rakamaric, and A. Solovyev, “Efficient Search for Inputs Causing High Floating-point Errors,” in PPoPP, 2014. [31] M. O. Lam, J. K. Hollingsworth, and G. Stewart, “Dynamic Floatingpoint Cancellation Detection,” Parallel Computing, vol. 39, no. 3, 2013. [32] P. Panchekha, A. Sanchez-Stern, J. R. Wilcox, and Z. Tatlock, “Automatically Improving Accuracy for Floating Point Expressions,” in PLDI, 2015. [33] C. Rubio-González, C. Nguyen, H. D. Nguyen, J. Demmel, W. Kahan, K. Sen, D. H. Bailey, C. Iancu, and D. Hough, “Precimonious: Tuning Assistant for Floating-point Precision,” in SC, 2013. [34] M. O. Lam, J. K. Hollingsworth, B. R. de Supinski, and M. P. Legendre, “Automatically Adapting Programs for Mixed-precision Floating-point Computation,” in ICS, 2013. Our subdivision approach is parametric in the amount of subdivisions for each interval m and the total amount of optimizations p. In this appendix, we present our experimental findings of good default configuration for interval subdivision parameters (m and p). We expect that the presence of zeros in the function range might affect the choice of good default configuration. Thus, we perform two separate experimental evaluations: on the input domains where function range does not include zero (subsection A) and on the standard input domains, where function range potentially contains zero (subsection B). A. No Potential Division by Zero To define good defaults for the subdivision parameters for the input domains such that function range does not include zero, we have executed multiple tests. During the experiments we compute relative errors directly for several subdivision values m = 2, 5, 8 in combination with two different values for the limit for the total analysis runs number (p = 50, 100). We used the Z3 solver with a timeout of 1 second for testing all configurations. Table V shows the relative error bounds for different subdivision values, Table VI gives running times for these configurations. The column ’# of vars’ shows the amount of input variables for each benchmark. Columns ’2’, ’5’, ’8’ show the bounds computed with m = 2, 5 and 8 subdivisions for input intervals respectively. We noticed that, perhaps surprisingly, a more fine-grained subdivision does not gain accuracy for most of the bench- 9 Benchmark # of vars m=2 m=5 p = 50 m=8 m=2 m=5 p = 100 m=8 Univariate bspline0 bspline1 bspline2 bspline3 sine sineOrder3 sqroot 1 1 1 1 1 1 1 3.00e-15 3.22e-15 8.92e-16 6.66e-16 7.66e-16 8.94e-16 1.02e-15 3.00e-15 3.22e-15 8.92e-16 6.66e-16 7.66e-16 8.94e-16 1.02e-15 3.00e-15 3.22e-15 8.92e-16 6.66e-16 7.66e-16 8.94e-16 1.02e-15 3.00e-15 3.22e-15 8.92e-16 6.66e-16 7.66e-16 8.94e-16 1.02e-15 3.00e-15 3.22e-15 8.92e-16 6.66e-16 7.66e-16 8.94e-16 1.02e-15 3.00e-15 3.22e-15 8.92e-16 6.66e-16 7.66e-16 8.94e-16 1.02e-15 Multivariate TABLE V C OMPARISON OF DIFFERENT CONFIGURATIONS FOR SUBDIVISION ( NO DIVISION BY ZERO ) doppler himmilbeau invPendulum jet kepler0 kepler1 kepler2 rigidBody1 rigidBody2 traincar_state8 traincar_state9 turbine1 turbine2 turbine3 3 2 4 2 6 4 6 3 3 14 14 3 3 3 1.93e-13 7.83e-14 1.21e-15 4.47e-15 3.66e-13 8.53e-12 9.65e-11 9.78e-16 2.21e-15 7.67e-14 3.45e-14 2.06e-15 4.12e-15 1.91e-14 1.93e-13 1.10e-14 1.21e-15 4.92e-15 6.63e-13 8.10e-13 1.46e-11 9.78e-16 2.21e-15 7.67e-14 3.45e-14 2.06e-15 4.12e-15 1.91e-14 1.93e-13 7.05e-15 1.21e-15 6.03e-15 1.63e-15 2.85e-13 8.58e-12 9.78e-16 2.21e-15 7.67e-14 3.45e-14 2.06e-15 4.12e-15 1.91e-14 1.93e-13 7.83e-14 1.21e-15 4.47e-15 3.80e-13 8.33e-12 9.65e-11 9.78e-16 2.21e-15 7.67e-14 3.45e-14 2.06e-15 4.12e-15 1.91e-14 1.93e-13 1.10e-14 1.21e-15 4.92e-15 7.05e-13 8.10e-13 1.46e-11 9.78e-16 2.21e-15 7.67e-14 3.45e-14 2.06e-15 4.12e-15 1.91e-14 1.93e-13 5.80e-15 1.21e-15 4.47e-15 7.33e-13 4.63e-13 5.61e-12 9.78e-16 2.21e-15 7.67e-14 3.45e-14 2.06e-15 4.31e-15 1.91e-14 TABLE VI C OMPARISON OF RUNNING TIMES FOR DIFFERENT CONFIGURATIONS FOR SUBDIVISION m=2 p = 50 m=5 m=8 m=2 p = 100 m=5 m=8 bspline0 bspline1 bspline2 bspline3 sine sineOrder3 sqroot 6s 8s 10s 2s 1m 3s 5s 14s 12s 16s 18s 6s 1m 13s 10s 24s 18s 24s 26s 8s 1m 26s 15s 36s 7s 9s 11s 3s 1m 19s 5s 15s 12s 16s 18s 5s 1m 14s 10s 25s 17s 24s 27s 9s 1m 41s 15s 35s doppler himmilbeau invPendulum jet kepler0 kepler1 kepler2 rigidBody1 rigidBody2 traincar_state8 traincar_state9 turbine1 turbine2 turbine3 2m 41s 2m 9s 52s 351s 12m 47s 15m 54s 12m 7s 30s 1m 8s 8m 10s 7m 28s 2m 48s 4m 21s 3m 17s 4m 6s 8m 34s 1m 7s 58m 45s 11m 25s 16m 54s 15m 46s 1m 17s 2m 34s 5m 57s 5m 12s 4m 54s 16m 8s 7m 9s 2m 58s 6m 15s 25s 45m 31s 1m 40s 5m 8s 5m 32s 29s 57s 2m 13s 1m 54s 2m 59s 6m 7s 3m 24s 2m 44s 2m 14s 55s 34m 1s 32m 39s 15m 29s 41m 41s 30.74s 1m 7s 15m 39s 14m 20s 2m 27s 3m 52s 2m 57s 4m 7s 8m 30s 1m 6s 47m 57s 11m 49s 17m 15s 1h 16m 50s 1m 16s 2m 35s 5m 57s 5m 26s 4m 59s 15m 4s 7m 14s 7m 17s 14m 59s 2m 40s 1h 22m 35s 21m 34s 43m 8s 430s 2m 55s 5m 57s 14m 52s 13m 33s 153s 31m 57s 14m 34s total 1h 46m 49s 2h 42m 26s 1h 29m 7s 2h 52m 45s 3h 32m 46s 5h 11m 14s Benchmark m is, the larger are the running times. Indeed it is the case when all input intervals are subdivided. Recall that, to limit this effect we introduced the total amount of optimizations p. For the univariate benchmarks the influence of p is not noticeable, since the total amount of optimizations is equal to the amount of subdivisions in this case, and is below the limit p. For multivariate benchmarks we observe that p limits the amount of variables where intervals are subdivided and hence marks. For those benchmarks where we observed different error bounds three out of five tightest bounds (himmilbeau, jet and kepler2) were computed with the configuration m = 8, p = 100. The second best choice in terms of accuracy is m = 8, p = 50, when the bounds for himmilbeau, jet and kepler differ from the tightest computed bounds only insignificantly. One may think that the greater the number of subdivisions 10 TABLE VII C OMPARISON OF DIFFERENT CONFIGURATIONS FOR SUBDIVISION Benchmark # of vars bspline0 bspline1 bspline2 bspline3 sine sineOrder3 sqroot 1 1 1 1 1 1 1 doppler himmilbeau invPendulum jet kepler0 kepler1 kepler2 rigidBody1 rigidBody2 traincar_state8 traincar_state9 turbine1 turbine2 turbine3 3 2 4 2 6 4 6 3 3 14 14 3 3 3 m=4 1 1 0 1 2 (4) (4) (4) (4) (4) 3 (4) 0 (16) 12 (16) 12 (16) 15 (16) 0 (16) 10 (16) 0 (16) p = 50 m=6 1 1 0 1 2 2 2 (6) (6) (6) (6) (6) (6) (6) 1 0 0 1 2 2 3 0 (36) 17 (36) 22 (36) 33 (36) 0 (36) 17 (36) 0 (36) limits runtime. Thus, the configuration with the greatest tested subdivision value 8 has the smallest total running time when p = 50. Keeping in mind the accuracy-performance trade-off, we select the following default configuration: for univariate benchmarks m = 2 and p = 50; for multivariate benchmarks m = 8 and p = 50. m=8 (8) (8) (8) (8) (8) (8) (8) 0 (8) 6 (8) 0 (8) 6 (8) 0 (8) m=4 1 1 0 1 2 (4) (4) (4) (4) (4) 3 (4) 0 (64) 12 (16) 32 (64) 15 (16) 49 (64) 63 (64) 46 (64) 50 (64) 0 (64) 25 (64) 0 (64) p = 100 m=6 1 1 0 1 2 2 2 (6) (6) (6) (6) (6) (6) (6) 0 (36) 17 (36) 22 (36) 33 (36) 0 (36) 17 (36) 0 (36) m=8 1 0 0 1 2 2 3 (8) (8) (8) (8) (8) (8) (8) 0 (64) 15 (64) 34 (64) 56 (64) 0 (64) 25 (64) 0 (64) computation of relative errors failed, the second is the total amount of sub-domains, e.g. 0(4) means that relative error has been successfully computed on all sub-domains. Underline marks the results, for which relative error computation failed (due to division by zero) on more than 80% of sub- domains. We consider such results to be impractical and thus will not report error bounds for these cases. Whenever we report ‘-’ in the table, this means that relative error computations reported division by zero for all sub- domains. For univariate benchmarks we see for almost all benchmarks all configurations provided relative error bounds. Only for sineOrder subdivision of m = 4 sub-intervals is not sufficient to obtain a result. Interestingly, for bspline1 computations reported division by zero for m = 4 and m = 6, but for the more fine-grained subdivision m = 8 no division by zero occurred, and it was possible to compute relative error bound for all sub-domains. Since the configuration m = 8 p = 50 allows to compute relative error for all univariate benchmarks in our set, we choose it as a default for univariate benchmarks. Note that for univariate benchmarks it does not play a role whether we take p = 50 or p = 100, as the amount of subdomains for all tested values of m is lower than 50 and 100. We noticed that for multivariate benchmarks there is one configuration that allowed to compute relative error for most of the benchmarks, that is m = 4, p = 100. That means that for this set of multivariate benchmarks it is beneficial to subdivide each individual interval less, while having intervals for more variables subdivided. We choose this configuration as default for multivariate benchmarks. For some benchmarks, however, independent from the subdivision parameters it was still not possible to compute any estimate of relative error, or the computed error bound is valid for only a small sub-domain (jet and kepler1). B. With Potential Division by Zero To find good default subdivision configuration for relative error computation with potential division by zero, we recall semantic of each parameter. The parameter m regulates how fine-grained the subdivision of each input interval should be, while the parameter p is intended to limit the running time. p bounds not only the total amount of optimization runs, but also regulates for how many variables the input intervals are subdivided. This balance between more subdivisions for one interval and more input intervals being subdivided may change if we have to deal with potential division by zero. Thus, we do not reuse the configuration found in subsection A, and perform the comparison for several values of m and p. We compare results for m = 4, 6 and 8 and p = 50, 100. The focus of this comparison is to find a configuration which computes relative errors for as many benchmarks as possible and for as big part of the input domain as possible. Therefore, for different configurations we compare the amount of subdomains where computations failed because of division by zero. Table VII summarizes our results. Columns m = 4, m = 6 and m = 8 show the amount of sub-domains where division by zero occurred for 4, 6 and 8 subdivisions for each input interval with upper limit for total amount of optimizations p = 50 and 100 respectively. The result consists of two values: the first value is the amount of sub-domains where 11
6cs.PL
arXiv:1503.05743v1 [cs.DC] 19 Mar 2015 Implementation of a Practical Distributed Calculation System with Browsers and JavaScript, and Application to Distributed Deep Learning Ken Miura MIURA @ MI . T. U - TOKYO . AC . JP Tatsuya Harada HARADA @ MI . T. U - TOKYO . AC . JP Machine Intelligence Laboratory, Department of Mechano-Informatics, The University of Tokyo Abstract tional complexity and often require the use of graphics processing units (GPUs) and numerous computers for practical distributed computation. It is difficult to construct a distributed computation environment, and it frequently requires the preparation of certain operating systems and installation of specific software, e.g., Hadoop (Shvachko et al., 2010). For practical application of deep learning algorithms, a new instant distributed calculation environment is eagerly anticipated. Deep learning can achieve outstanding results in various fields. However, it requires so significant computational power that graphics processing units (GPUs) and/or numerous computers are often required for the practical application. We have developed a new distributed calculation framework called ”Sashimi” that allows any computer to be used as a distribution node only by accessing a website. We have also developed a new JavaScript neural network framework called ”Sukiyaki” that uses general purpose GPUs with web browsers. Sukiyaki performs 30 times faster than a conventional JavaScript library for deep convolutional neural networks (deep CNNs) learning. The combination of Sashimi and Sukiyaki, as well as new distribution algorithms, demonstrates the distributed deep learning of deep CNNs only with web browsers on various devices. The libraries that comprise the proposed methods are available under MIT license at http://mil-tokyo.github.io/. 2. Sashimi : Distributed Calculation Framework We have developed a new distributed calculation framework called ”Sashimi.” In a general distributed calculation framework, it is difficult to increase the number of node computers because users must install client software on each node computer. With Sashimi, any computer can become a node computer only by accessing a certain website via a web browser without installing any client software. The proposed system can execute any code written in JavaScript in a distributed manner. 2.1. Implementation 1. Introduction Sashimi consists of two servers, the CalculationFramework and Distributor servers ( Figure 1 ). When a user runs a project that includes distributed processing using the CalculationFramework and accesses the Distributor via web browsers, the processes can be distributed and executed in multiple web browsers. The results processed by the distributed machines can be used as if they were processed by a local machine without being conscious of their differences by using the CalculationFramework. Utilization of big data has recently come to play an increasingly important role in various business fields. Big data is often handled with deep learning algorithms that can achieve outstanding results in various fields. For example, almost all of the teams that participated in the ILSVRC 2014 image recognition competition (Russakovsky et al., 2014) used deep learning algorithms. Such algorithms are also used for speech recognition (Dahl et al., 2012; Hinton et al., 2012) and molecular activity prediction (Kaggle, Inc.). 2.1.1. CalculationFramework CalculationFramework describes calculations that include distributed processing. If a user writes code according to a certain interface, the processes are distributed and computed in multiple web browsers via Distributor. The results computed in the web browsers are then automatically col- However, deep learning algorithms have huge computa- 1 MILJS : Brand New JavaScript Libraries for Matrix Calculation and Machine Learning Sukiyaki browsers. Note that the Distributor consists of two servers, i.e., HTTPServer and TicketDistributor. Distributed Calculation Framework Calculation Framework Execute Heavy Project Distributor HTTPServer TicketDistributor HTTP HTTPServer, which is a web server implemented with Node.js, provides static files that include a basic program and discloses APIs that offer datasets to be used in the distributed calculation. If a user wants to make a browser function as a node, the user only needs to access the basic program provided by HTTPServer via the web browser. The basic program consists of a static HTML file and a JavaScript file. The basic program works as follows. WebSocket Access via Browsers Process Small Tasks User MySQL … Figure 1. Sukiyaki Architecture 1. a connection with TicketDistributor is established using WebSocket lected. This allows the results to be used as if they were processed by the local machine. In this subsection, we introduce PrimeListMakerProject, which finds prime numbers from 1 to 10,000, as an example. 2. a ticket request is sent to TicketDistributor A ”project” is a programming unit of CalculationFramework that has an endpoint from which a process starts. In a project, a user can execute distributed processing by creating a task instance. Note that processes that do not require distributed processing are also supported. 4. a request for required external datasets and files is sent to HTTPServer A ”task” is a process that is distributed and executed in web browsers. If a user writes a task according to a certain interface, the arguments are automatically divided and distributed to web browsers. The processed results are then automatically collected. In PrimeListMakerProject, the task that determines whether an input integer is a prime number is called IsPrimeTask. This task is distributed among web browsers. The task is given arguments generated by the project, and it must return the calculated results using a callback function. Note that the user can use external libraries and datasets. In this example, the task calls is prime function in an external library, which determines whether the input integer is a prime number. 6. the calculated result is returned to TicketDistributor 3. a task request is sent to TicketDistributor if it has not downloaded the task described in the ticket 5. the task with arguments described in the ticket is executed 7. return to Step 2. The task and external data are cached in the browser. If a program runs for a long time, memory usage increases due to the cache. Therefore, we have implemented garbage collection on the basis of the least recently used algorithm. If an error occurs when the task is running, an error report that includes a stack trace is sent to the TicketDistributor. Then, the browser reloads itself. Thus, a task described by the tickets generated by the CalculationFramework can be continuously executed without special maintenance once the user accesses the program. After the project generates the task instance with arguments, the framework generates tickets for each divided argument. The framework sends the codes and the arguments as tickets with the external libraries and datasets to the Distributor via MySQL. The tickets distributed by the Distributor are collected and can be used again by the CalculationFramework via MySQL. Since the project is implemented with server-side JavaScript Node.js and the task is implemented with JavaScript, they can be used without considering whether the code is executed by the server or the browsers. Users can check the progress of a task and tickets via the HTTPServer control console. In this console, users can see the project name, the number of tasks, the number of tickets waiting to be processed, the number of executed tickets, the number of error reports, and the client information for the project. Note that a console that can be used to execute code in web browsers is also provided. With this console, the user can make the browsers reload themselves and redirect to another distributed system. We use responsive web design (RWD) techniques in the user interface (UI) of the basic program and the control console. RWD techniques adapt the UI to the screen size of any PC, tablet, or smartphone, which makes it easy to use any devices for distributed calculation and check of the progress. 2.1.2. Distributor The Distributor distributes tasks and tickets, which are sent from the CalculationFramework via MySQL, to browsers. The Distributor also collects the results calculated in the 2 MILJS : Brand New JavaScript Libraries for Matrix Calculation and Machine Learning The tasks and tickets generated by the CalculationFramework are distributed to browsers via WebSocket by the TicketDistributor. The processed results are also collected by the TicketDistributor. Unlike HTTPServer, the TicketDistributor runs in a single process and communicates with each web browser unitarily and efficiently. Table 1. Specifications of Devices for Distributed MNIST Benchmark Model OS CPU RAM When the TicketDistributor receives a ticket request from the browser, it obtains tickets in ascending order of ”virtual created time” from the MySQL server. Virtual created time is determined as follows. DELL OPTIPLEX DELL OPTIPLEX 8010 Windows 7 Professional Intel Core i7-3770 3.4GHz 16GB Nexus 7 Nexus 7 (2013) Android 4.4.4 Krait 1.50GHz 2GB remarkable when the proposed system was used with the tablet PC because the tablet has lower computational power than the desktop computer and the overhead time required for the distribution becomes relatively shorter. We believe that the proposed distributed computing method will become more effective for other feature extraction methods with high computational costs such as SIFT and deep learning. • the virtual created time is the ticket creation time of undistributed tickets • virtual created time is five minutes after ticket distribution if the tickets have been distributed • virtual created time is five minutes after the last ticket distribution if the ticket has been redistributed 3. Sukiyaki : Deep Neural Network Framework Thus, if the results are not returned within five minutes, the tickets is treated in such a way as to be re-created. Note that tickets are redistributed in ascending order by distribution time if there are no further tickets to be distributed. Thus, if a web browser is terminated after it receives a ticket, and/or if there are clients with low computational capability, another client can execute the task. Therefore, the throughput can be enhanced. The tickets are redistributed at intervals of at least 10 seconds, which prevents the last ticket from being distributed to many clients and prevents the next calculation from being delayed. We implemented this algorithm using SQL, which can quickly select tickets to be distributed. We implemented a learning algorithm for deep neural networks (DNNs) with browsers based on Sashimi. Here, we explain the proposed framework and implementation for DNNs. We also discuss the advantages of the proposed method over an existing library in a stand-alone environment. The distributed computation of DNNs is explained in the next section. We primarily implemented deep convolutional neural networks (deep CNNs) that obtain high classification accuracy in image recognition tasks. ConvNetJS (Karpathy) was implemented as a NN library using JavaScript. However, its computational speed is limited because it runs on only a single thread. Therefore, we developed a deep neural network framework called ”Sukiyaki” that utilizes a fast matrix library called Sushi (Miura et al., 2015). The Sushi matrix library is fast because it is implemented on WebCL and can utilize general purpose GPUs (GPGPUs) efficiently. 2.2. Benchmark 2.2.1. Experiment Condition Using Sashimi, we demonstrate that a task with high computational cost can be computed in parallel efficiently. Here, we compare the time required to classify the MNIST dataset with a nearest neighbor method by changing the number of clients. In this experiment, 1,000 images from the 10,000 MNIST test images were classified by comparing them with 60,000 training images. We used one to four clients on a desktop computer and tablet PCs described in Table 1 . We accessed the Distributor using the Google Chrome web browser on both the desktop and tablet environments. 3.1. Implementation The Sukiyaki DNN framework consists of the Sukiyaki object, which handles procedures for learning and testing in the neural network, and layer objects. In this version, for deep CNNs, we implemented a convolutional layer, a max pooling layer, a fully-connected layer, and an activation layer. Note that we can add other layers if we implement certain methods such as forward, backward, and update. The forward, backward, and update methods in each layer are implemented using the Sushi matrix library; thus, they can be executed in parallel on GPGPUs. 2.2.2. Results The results are shown in Table 2 . In both environments, the calculation time was reduced with the distributed computation. The effect of the distributed computation was We can use AdaGrad (Duchi et al., 2011) as an online parameter leaning method, which can learn parameters 3 MILJS : Brand New JavaScript Libraries for Matrix Calculation and Machine Learning Table 2. Results of Distributed MNIST Benchmark Environment DELL OPTIPLEX Nexus 7 Clients 1 2 3 4 1 2 3 4 Elapsed Time (sec.) 107 62 52 46 768 413 293 255 quickly. The original update rule in AdaGrad is as follows. α θi,t = θi,t−1 − qP t Elapsed Time (ratio) 1 0.58 0.49 0.43 1 0.54 0.38 0.33 Table 3. Specifications of Device for Neural Network Libraries Benchmark gi,t Model OS CPU GPU RAM 2 u=0 gi,u where, α is a scalar learning rate, θi,t is the i-th element of the parameter at time step t and gi,t is the i-th element of the gradient at time step t. However, in this update rule, learning usually becomes unstable because the sum of squared gradients is minuscule early in the learning process. Therefore, we have modified the update rule using a constant β as follows. MacBook Pro (Retina, 13-inch, Late 2013) Mac OS X Yosemite (10.10.1) Intel Core i5-4258U 2.4GHz Intel Iris 8GB Table 4. Numbers of Batches Learned per 1 min. ConvNetJS Node.js Firefox 17.55 2.44 α θi,t = θi,t−1 − q gi,t Pt 2 β + u=0 gi,u Sukiyaki Node.js Firefox 545.39 31.39 that converts 320 input elements to 10 output elements by estimating class probabilities via the softmax function. We designed the Sukiyaki DNN framework to be used with both Node.js and browsers so DNNs can be trained in a distributed manner using the Sashimi distributed calculation framework. For example, a model file wherein the parameters are encoded with base64 is formatted in JSON. Note that although the model file is a platform independent string format, it can be exchanged among machines without rounding errors. We trained the network using Node.js and the Firefox web browser with a MacBook Pro (specs described in Table 3 ) and compared the learning speeds. 3.2.2. Results The results are shown in Table 4 and Figure 3 . As observed, Sukiyaki learned the network faster than ConvNetJS for both Node.js and Firefox. The convergence speed of Sukiyaki was also faster than that of ConvNetJS. Note that Sukiyaki with Node.js learned the network 30 times faster than ConvNetJS. 3.2. Benchmark 3.2.1. Experiment Condition We compared the learning speed of the Sukiyaki DNN framework with that of ConvNetJS, which is an existing JavaScript NN library. 4. Distributed Deep Learning In this experiment, we used the deep CNN model shown in Figure 2 . Fifty images per mini-batch were learned from the 50,000 training images in cifar-10 (Krizhevsky, 2009). Note that cifar-10 consists of 24-bit 32 × 32 color images in 10 classes. The model convolves the input images with 5 × 5 kernels in each convolutional layer and generates three feature maps of size 32 × 32 × 16, 16 × 16 × 20, and 8 × 8 × 20. Each convolutional layer is followed by an activation layer and a max pooling layer, and the size of the output is halved. The fourth layer is a fully-connected layer We ran the Sukiyaki DNN framework on the Sashimi distributed calculation framework and realized distributed learning of deep CNNs. 4.1. Distribution Algorithms Some previous studies have proposed methods for distributed learning of DNNs and deep CNNs. Dean et al. (Dean et al., 2012) proposed DistBelief, which 4 MILJS : Brand New JavaScript Libraries for Matrix Calculation and Machine Learning 20 20 16 3 16 32 8 16 32 32 10 32 Input Image 8 convolutional layer fully-connected layer Figure 2. Deep CNN for the Benchmark of Stand-alone Deep Learning 1.00 allelize the training of deep CNNs using model parallelism and data parallelism efficiently. Generally, deep CNNs consist of many convolutional layers and a few fullyconnected layers. Due to weight sharing, convolutional layers incur significant computational cost relative to the small number of parameters. However, fully-connected layers have many more parameters than convolutional layers and less computational complexity. Krizhevsky (Krizhevsky, 2014) developed an efficient method to parallelize the training of deep CNNs by applying data parallelism in the convolutional layers and model parallelism in the fully-connected layers. However, we focus on distributed computation via the Internet; thus, we must reduce communication costs in the proposed framework. error rate 0.75 0.50 ConvNetJS (Node.js) ConvNetJS (Firefox) Sukiyaki (Ours) (Node.js) Sukiyaki (Ours) (Firefox) 0.25 0.00 0 15 30 45 elapsed time (min.) 60 Figure 3. Error Rate He et al. (He et al., 2015) implemented another effective method for distributed deep learning. They parallelize the training of convolutional layers using data parallelism on multi-GPUs. Then the GPUs are synchronized and the fully-connected layers are trained on a single GPU. The computational complexity for training fully-connected layers is relatively small so that the model parallelism of fullyconnected layers does not necessarily contribute to fast learning. This method of combining parallelized and standalone learning works efficiently and is easy to implement. However, this method has some computational resources stay idle while fully-connected layers are learned on a single GPU and there is still room for improvement. is an efficient distributed computing method for DNNs. In DistBelief, a network is partitioned into some subnetworks, and different machines are responsible for computation of the different subnetworks. The nodes with edges that cross partition boundaries must share their state information between machines. However, since we consider machines connected via the Internet with slow throughput, it is difficult to share the nodes’ state between different machines with the proposed framework. DistBelief focuses on a fully-connected network; thus, it is also difficult to directly apply this approach to convolutional networks that share weights among different nodes. SINGA (Wang et al.) is a distributed deep learning platform. It supports both model partition and data partition, and we can manage them automatically through distributed array data structure without much awareness of the array partition. While SINGA is designed to accelerate deep learning by using MPI, it is unclear whether this approach is appropriate for distributed calculation via the Internet. Meeds et al. (Meeds et al., 2014) developed MLitB, wherein different training data batches are assigned to different clients. The clients compute gradients and send them to the master that computes a weighted average of gradients from all clients and updates the network. The new network weights are sent to the clients, and the clients then restart to compute gradients on the basis of the new weights. This approach is simple and easy to implement; however, it must communicate all network weights and gradients between the master and the clients. Thus, the communication overhead becomes excessively large with a large network. In this study, we have developed a new method, which parallelizes the training of convolutional layers using data parallelism and does not apply model parallelism to fullyconnected layers. The proposed method trains fullyconnected layers on the server while the clients train the convolutional layers. Unlike the method of He et al. (He et al., 2015), convolutional layers and fully-connected lay- Krizhevsky (Krizhevsky, 2014) proposed a method to par5 learning speed (image/sec.) MILJS : Brand New JavaScript Libraries for Matrix Calculation and Machine Learning 50 tion to the number of clients. Furthermore, we developed the Sukiyaki DNN framework, which utilizes GPGPUs and can train deep CNNs 30 times faster than a conventional JavaScript DNN library. By building Sukiyaki on Sashimi, we also developed a parallel computing method for deep CNNs that is suitable for distributed computing via the Internet. We have shown that deep CNNs can be trained in parallel using only web browsers. stand-alone 1 client 2 clients 3 clients 4 clients 37.5 25 12.5 0 fully-connected layer These libraries are available under MIT license at http://mil-tokyo.github.io/. In future, we plan to improve the efficiency of the distribution algorithm by considering clients’ computational capabilities and supporting another network in Sukiyaki. Note that we welcome suggestions for improvements to our code and documentation. It is our hope that many programmers will further develop Sukiyaki and Sashimi to become a high-performance distributed computing platform that anyone can use easily. convolutional layer Figure 5. Learning Speed by Distributed Deep Learning ers are learned concurrently. This method reduces communication cost among machines and utilizes the computational capability of the server while it awaits responses from the clients. 4.2. Benchmark References 4.2.1. Experiment Conditions Dahl, G. E., Yu, D., Deng, L., and Acero, A. ContextDependent Pre-trained Deep Neural Networks for Large Vocabulary Speech Recognition. IEEE Transactions on Audio, Speech, and Language Processing, 20(1):30–42, 2012. In this experiment, we parallelized the training of the deep CNN shown in Figure 4 using the Sukiyaki DNN framework and the Sashimi distributed calculation framework. We used the computer shown in Table 5 as the server and clients. The client machine had four GPU cores; thus, we ran one to four Firefox web browsers on the client machine. The browsers accessed the server running Node.js and began training the network in parallel. We compared the training speeds of both convolution and fully-connected layers by varying the number of clients. Dean, J., Corrado, G., Monga, R., Chen, K., Devin, M., Mao, M., Ranzato, M., Senior, A., Tucker, P., Yang, K., Le, Q. V., and Ng, A. Y. Large Scale Distributed Deep Networks. In Advances in Neural Information Processing Systems, pp. 1223–1231. 2012. Duchi, J., Hazan, E., and Singer, Y. Adaptive subgradient methods for online learning and stochastic optimization. The Journal of Machine Learning Research, 12:2121– 2159, 2011. 4.2.2. Results The results are shown in Figure 5 . The proposed distributed computation method can train fully-connected layers 1.5 times faster than the stand-alone computation method independently of the number of clients because the server can be devoted to training fully-connected layers. The training speed of the convolutional layers becomes faster in proportion to the number of clients. With four clients to train convolutional layers, the proposed method is two times as fast as the stand-alone method. He, K., Zhang, X., Ren, S., and Sun, J. Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification. arXiv:1502.01852, 2015. Hinton, G., Deng, L., Yu, D., Dahl, G. E., Mohamed, A., Jaitly, N., Senior, A., Vanhoucke, V., Nguyen, P., Sainath, T. N., and Kingsbury, B. Deep Neural Networks for Acoustic Modeling in Speech Recognition: The Shared Views of Four Research Groups. IEEE Signal Processing Magazine, 29(6):82–97, 2012. 5. Conclusion and Future Plans In this paper, we have proposed a distributed calculation framework using JavaScript to address the increasing need for computational resources required to process big data. We have developed the Sashimi distributed calculation framework, which can allow any web browser to function as a computation node. By applying Sashimi to an image classification problem, the task can be executed in parallel, and its calculation speed becomes faster in propor- Kaggle, Inc. Merck Molecular Activity Chalhttps://www.kaggle.com/c/ lenge. MerckActivity. Karpathy, A. ConvNetJS. http://cs.stanford. edu/people/karpathy/convnetjs/. 6 MILJS : Brand New JavaScript Libraries for Matrix Calculation and Machine Learning 3 32 28 24 20 16 94 47 Input Image 23 11 5 11 23 47 94 96 10 96 5 convolutional layers Figure 4. Deep CNN for the Distributed Deep Learning Benchmark Table 5. Specifications of Devices for Distributed Deep Learning Model OS CPU GPU RAM Server Mac Pro Mac Pro (Late 2013) Mac OS X Yosemite (10.10.1) Intel Xeon E5 3.5GHz 6-core AMD FirePro D500 32GB Client DELL Alienware DELL Alienware Area-51 Windows 8.1 Intel Core i7-5960X 3.00GHz 8-core NVIDIA GeForce GTX TITAN Z × 2 32GB Krizhevsky, A. Learning Multiple Layers of Features from Tiny Images. Master’s thesis, Department of Computer Science, University of Toronto, 2009. URL http://www.cs.toronto.edu/ ˜kriz/learning-features-2009-TR.pdf. Krizhevsky, A. One weird trick for parallelizing convolutional neural networks. arXiv:1404.5997, 2014. Meeds, E., Hendriks, R., Faraby, S. A., Bruntink, M., and Welling, M. MLitB: Machine Learning in the Browser. arXiv:1412.2432, 2014. Miura, K., Mano, T., Kanehira, A., Tsuchiya, Y., and Harada, T. MILJS : Brand New JavaScript Libraries for Matrix Calculation and Machine Learning. arXiv:1502.06064, 2015. Russakovsky, O., Deng, J., Su, H., Krause, J., Satheesh, S., Ma, S., Huang, Z., Karpathy, A., Khosla, A., Bernstein, M., Berg, A. C., and Fei-Fei, L. ImageNet Large Scale Visual Recognition Challenge, 2014. Shvachko, K., Kuang, H., Radia, S., and Chansler, R. The hadoop distributed file system. In IEEE Symposium on Mass Storage Systems and Technologies, pp. 1–10, 2010. Wang, W., Chen, G., Dinh, T.T.A., Gao, J., Ooi, B.C., and Tan, K.L. SINGA: A Distributed System for Deep Learning. Technical report. http://www.comp. nus.edu.sg/˜dbsystem/singa/. 7 fully-connected layer MILJS : Brand New JavaScript Libraries for Matrix Calculation and Machine Learning Appendix. Sashimi Sample Program Source Code 1. prime list maker project.js var ProjectBase = require('../project_base'); var IsPrimeTask = require('./is_prime_task'); var PrimeListMakerProject = function() { this.name = 'PrimeListMakerProject'; this.run = function(){ var task = this.createTask(IsPrimeTask); var inputs = []; for (var i = 1; i <= 10000; i++) { inputs.push({ candidate : i }); } task.calculate(inputs); task.block(function(results) { for (var i = 0; i < results.length; i++) { if (results[i].output.is_prime) { console.log(i + ' is a prime number.') } } }); }; }; PrimeListMakerProject.prototype = new ProjectBase(); Source Code 2. is prime task.js var TaskBase = require('../task_base'); var IsPrimeTask = function() { this.static_code_files = ['is_prime']; this.run = function(input, output) { if (is_prime(input.candidate)) { output({ is_prime : true }); } else { output({ is_prime : false }); } }; }; IsPrimeTask.prototype = new TaskBase(); Source Code 3. is prime.js function is_prime(candidate) { for (var i = 2; i <= Math.sqrt(candidate); i++) { if (candidate % i === 0) { return false; } } return true; } 8
9cs.NE
Cost-Aware Automatic Program Repair Roopsha Samanta1 , Oswaldo Olivo2 , and E. Allen Emerson2 arXiv:1307.7281v2 [cs.PL] 31 Mar 2014 1 The University of Texas at Austin and IST Austria [email protected] 2 The University of Texas at Austin {olivo,emerson}@cs.utexas.edu Abstract. We present a formal framework for repairing infinite-state, imperative, sequential programs, with (possibly recursive) procedures and multiple assertions; the framework can generate repaired programs by modifying the original erroneous program in multiple program locations, and can ensure the readability of the repaired program using user-defined expression templates; the framework also generates a set of inductive assertions that serve as a proof of correctness of the repaired program. As a step toward integrating programmer intent and intuition in automated program repair, we present a cost-aware formulation — given a cost function associated with permissible statement modifications, the goal is to ensure that the total program modification cost does not exceed a given repair budget. As part of our predicate abstractionbased solution framework, we present a sound and complete algorithm for repair of Boolean programs. We have developed a prototype tool based on SMT solving and used it successfully to repair diverse errors in benchmark C programs. 1 Introduction Program debugging — the process of fault localization and error elimination — is an integral part of ensuring correctness in existing or evolving software. Being essentially manual, program debugging is often a lengthy, expensive part of a program’s development cycle. There is an evident need for improved formalization and mechanization of this process. However, program debugging is hard to formalize — there are multiple types of programming mistakes with diverse manifestations, and multiple ways of eliminating a detected error. Moreover, it is particularly challenging to assimilate and mechanize the expert human intuition involved in the choices made in manual program debugging. In this paper, we present a cost-aware formulation of the automated program debugging problem that addresses the above concerns. Our formulation obviates the need for a separate fault localization phase by directly focusing on error elimination, i.e., program repair. We fix a set U of update schemas that may be applied to program statements for modifying them. An update schema is a compact description of a class of updates that may be applied to a program statement in order to repair it. For instance, the update schema assign 7→ assign permits replacement of the assignment statement x := y with other assignment statements such as x := x + y or y := x + 1, assign 7→ skip permits deletion of an assignment statement, etc. In this paper, U includes deletion of statements, replacement of assignment statements with other assignment statements, and replacement of the guards of conditional and loop statements with other guards. We assume we are given a cost function that assigns some user-defined cost to each application of an update schema to a program statement. Given an erroneous program P, a cost function c and a repair budget δ, the goal of cost-aware automatic program repair is to compute b such that: P b is correct, P b is obtained by modifying P using a program P a set of update schemas from U and the total modification cost does not exceed δ. We postulate that this quantitative formulation [7] is a flexible and convenient way of incorporating user intent and intuition in automatic program debugging. For instance, the user can define appropriate b that differs from P in at most δ statements, cost functions to search for P or to penalize any modification within some trusted program fragment, or to favor the application of a particular update schema over another, and so on. Our approach to cost-aware repair of imperative, sequential programs is based on predicate abstraction [16], which is routinely used by verification tools such as SLAM [6], SLAM2 [3], SATABS [10], etc. for analyzing infinite-state programs. These tools generate Boolean programs which are equivalent in expressive power to pushdown systems and enjoy desirable computational properties such as decidability of reachability [5]. Inevitably, Boolean programs have also been explored for use in automatic repair of sequential programs for partial correctness [17] and total correctness [25]. These papers, however, do not accommodate a quantitative formulation of the repair problem and can only compute repaired programs that differ from the original erroneous program in exactly one expression. Moreover, these papers do not attempt to improve the readb obtained by concretizing a repaired ability of the concrete program P, Boolean program. Our predicate abstraction-based approach to automatic program repair relaxes the above limitations. Besides erroneous P, c, and δ, our framework requires a Boolean program B, obtained from P through iterative predicate abstraction-refinement, such that B exhibits a non-spurious 2 path to an error. We present an algorithm which casts the question of repairability of B, given U , c, and δ, as an SMT query; if the query is satisfiable, the algorithm extracts a correct Boolean program Bb from the b we also extract a set of inductive witness to its satisfiability. Along with B, b assertions from the witness, that constitute a proof of correctness of B. This algorithm for Boolean program repair is sound and complete, relab along with its proof, is tive to U, c, and δ. A repaired Boolean program B, b along with a proof concretized to obtain a repaired concrete program P, of correctness. However, the concretized repairs may not be succinct or readable. Hence, our framework can also accept user-supplied templates b to constrain specifying the desired syntax of the modified expressions in P the concretization. Alternate approaches to automatic repair and synthesis of sequential programs [20, 28–30] that do not rely on abstract interpretations of concrete programs, also often encode the repair/synthesis problem as a constraint-solving problem whose solution can be extracted using SAT or SMT solvers. Except for [30], these approaches, due to their bounded semantics, are imprecise and cannot handle total correctness3 . The authors in [20] use SMT reasoning to search for repairs satisfying user-defined templates; the templates are needed not only for ensuring readability of the generated repairs, but also for ensuring tractability of their inherently undecidable repair generation query. They also include a notion of minimal diagnoses, which is subsumed by our more general cost-aware formulation. Given user-defined constraints specifying the space of desired programs and associated proof objects, the scaffold-based program synthesis approach of [30] attempts to synthesizes a program, along with a proof of total correctness consisting of program invariants and ranking functions for loops. In contrast to [30], our framework only interacts with a user for improving the readability of the generated repairs and for the cost function; all predicates involved in the generation of the repaired Boolean program and its proof are discovered automatically. Besides the above, there have been proposals for program repair based on computing repairs as winning strategies in games [18], abstraction interpretation [21], mutations [12], genetic algorithms [2, 15], using contracts [31], and focusing on data structure manipulations [27, 32]. There are also customized program repair engines for grading and feedback generation for programming assignments, cf. [26]. Finally, a multitude of algorithms [4, 9, 19, 33] have been proposed for fault localization, based on analyzing error traces. 3 Our framework can be extended to handle total correctness by synthesizing ranking functions along with inductive assertions. 3 Some of these techniques can be used as a preprocessing step to improve the efficiency of our algorithm, at the cost of giving up on the completeness of the Boolean program repair module. Summary of contributions: We define a new cost-aware formulation of automatic program repair that can incorporate programmer intuition and intent (Sec. 3). We present a formal solution framework (Sec. 4 and Sec. 5) that can repair infinite-state, imperative, sequential programs with (possibly recursive) procedures and multiple assertions. Our method can modify the original erroneous program in multiple program locations and can ensure the readability of the repaired program using user-defined expression templates. If our method succeeds in generating a repaired program b it generates a proof of P’s b correctness, consisting of inductive asserP, tions, that guarantees satisfaction of all the assertions in the original program P. As part of our predicate abstraction-based solution, we present a sound and complete algorithm for repair of Boolean programs. Finally, we present experimental results for repairing diverse errors in benchmark C programs using a prototype implementation (Sec. 6). 2 Background Review: Predicate Abstraction. Predicate abstraction [5, 16] is an effective approach for model checking infinite-state imperative programs with respect to safety properties. This technique computes a finite-state, conservative abstraction of a concrete program P by partitioning P’s state space based on the valuation of a finite set P red = {φ1 , . . . , φr } of predicates. The resulting abstract program is termed a Boolean program B (see Fig. 1a and Fig. 1b): the control-flow of B is the same as that of P and the set V = {b1 , . . . , br } of variables of B are Boolean variables, where for each i ∈ [1, r], the Boolean variable bi represents the predicate φi . Given a concrete program P, the overall counterexample-guided abstraction refinement method proceeds as follows. In step one, an initial Boolean program B is computed and in step two, B is model-checked with respect to its specification. If B is found to be correct, the method concludes that P is correct. Otherwise, an abstract counterexample path leading to some violated assertion in B is computed and examined for feasibility in P. If found feasible, the method terminates, reporting an error in P. If found infeasible, in step three, B is refined into a new Boolean program B 0 that eliminates the spurious counterexample. Thereafter, steps two and three are repeated, as needed. Note that the overall method is 4 incomplete - it may not always be able to possible to compute a suitable refinement that eliminates a spurious counterexample or to check if an abstract counterexample is indeed spurious. main() { int x; `1 : if (x ≤ 0) `2 : while (x < 0){ `3 : x := x + 2; `4 : skip; } else `5 : if (x == 1) `6 : x := x − 1; `7 : assert (x > 1); } main() { / ∗ γ(b0 ) = x ≤ 1, γ(b1 ) = x == 1, γ(b2 ) = x ≤ 0 ∗ / Bool b0 , b1 , b2 := ∗, ∗, ∗; `1 : if (¬b2 ) then goto `5 ; `2 : if (∗) then goto `0 ; `3 : b0 , b1 , b2 := ∗, ∗, ∗; `4 : goto `1 ; `0 : goto `7 ; `5 : if (¬b1 ) then goto `7 ; `6 : b0 , b1 , b2 := ∗, ∗, ∗; `7 : assert (¬b0 ); } (a) P (b) B `1 assume (b2 ) `2 assume (true) ass ume assume (¬b2 ) `5 (tr ue) `0 `3 m ¬b e( as su b0 , b1 , b2 := ∗, ∗, ∗ ) 1 assume (b1 ) `6 b0 , b1 , b2 := ∗, ∗, ∗ `7 `4 err exit (c) G(B) Fig. 1: An example concrete program P, a corresponding Boolean program B and B’s transition graph In our work, the interesting case is when the method terminates reporting an error. Henceforth, we fix a concrete program P, and a corresponding Boolean program B that exhibits a non-spurious counterexample path. Let {φ1 , . . . , φr } denote the set of predicates used in the abstraction of P into B, where each predicate is a quantifier-free first 5 order expression over the variables of P. Let {b1 , . . . , br } denote the corresponding Boolean variables of B. Let γ denote the mapping of Boolean variables to their respective predicates: for each i ∈ [1, r], γ(bi ) = φi . The mapping γ can be extended in a standard way to expressions over the Boolean variables in V . Program Syntax. For our technical presentation, we fix a common, simplified syntax for sequential concrete and abstract programs. A partial definition of this syntax is shown in Fig. 2. In the syntax, v denotes a variable, htypei denotes the type of a variable, F denotes a procedure, ` denotes a statement label or location, hexpri denotes a well-typed expression, and hbexpri denotes a Boolean-valued expression. hpgmi hvardecli hproclisti hproci hstmtseqi hlabstmti hstmti ::= ::= ::= ::= ::= ::= ::= hvardecli hproclisti decl v : htypei; | hvardecli hvardecli hproci hproclisti | hproci F (v1 , . . . , vk ) begin hvardecli hstmtseqi end hlabstmti ; hstmtseqi hstmti | ` : hstmti skip | v1 , . . . , vm := hexpr1 i, . . . , hexprm i | if (hbexpri) then hstmtseqi else hstmtseqi fi | while (hexpri) do hstmti od | assume (hbexpri) | call F (hexpr1 i, . . . , hexprk i) | return | goto `1 or . . . or `n | assert (hbexpri) Fig. 2: Programming language syntax Thus, a concrete or an abstract (Boolean) program consists of a declaration of global variables, followed by a list of procedure definitions; a procedure definition consists of a declarations of local variables, followed by a sequence of labeled statements; a statement is a skip, (parallel) assignment, conditional, loop, assume, (call-by-value) procedure call, return, goto or assert statement. We make the following assumptions: (a) there is a distinguished initial procedure main, which is not called from any other procedure, (b) all variable and formal parameter names are globally unique, (c) the number of actual parameters in a procedure call matches the number of formal parameters in the procedure definition, (d) goto statements are not used arbitrarily; they are used only to simulate the flow of control in structured programs, (e) the last statement in the loop body of every while statement is a skip statement, and (f) htypei includes integers and Booleans. 6 In addition, for Boolean programs, we assume: (a) all variables and formal parameters are of htypei Boolean and (b) all expressions - hexpri, hbexpri - are Boolean expressions defined as follows: hbexpri ::= ∗ | hdetbexpri hdetbexpri ::= true | false | b | ¬hdetbexpri | hdetbexpri ⇒ hdetbexpri | hdetbexpri ∨ hdetbexpri | hdetbexpri ∧ hdetbexpri | hdetbexpri = hdetbexpri | hdetbexpri = 6 hdetbexpri, where b is a Boolean variable. Thus, a Boolean expression is either a deterministic Boolean expression or the expression ∗, which nondeterministically evaluates to true or false4 . We assume that ∗ expresses a fair nondeterministic choice, i.e., ∗ does not permanently evaluate to the same value. We assume that Boolean expressions in assume (hbexpri) and assert (hbexpri) statements are always deterministic. Thus, a concrete program contains no nondeterministic expressions, and a Boolean program contains nondeterministic expressions only in the RHS of assignment statements. Note that the above syntax does not permit return values from procedures. However, return values can be easily modeled using extra global variables. Hence, this syntax simplification does not affect the expressivity of the programming language. Indeed, the above syntax is quite general. Notation. Let us fix some notation before we proceed. For program P, let {F0 , . . . , Ft } be its set of procedures with F0 being the main procedure, and let GV (P) denote the set of global variables. For procedure Fi , let Si and Li denote the sets of statements and locations, respectively, and let F Vi and LVi denote the sets of formal parametersSand local variables, respectively, with F Vi ⊆ LVi . Let VS(P) = GV (P) ∪ ti=1 LVi denote the set of variables of P, and L(P) = ti=1 Li denote the set of locations of P. For a location ` within a procedure Fi , let inscope(`) = GV (P) ∪ LVi denote the set of all variables in P whose scope includes l. We denote by stmt(`), f ormal(`) and local(`) the statement at ` and the sets of formal parameters and local variables of the procedure containing `, respectively. We denote by entryi ∈ Li the location of the first statement in Fi . When 4 In practice, a nondeterministic Boolean expression is any Boolean expression containing ∗ or the expression choose(e1 , e2 ), with e1 , e2 being deterministic Boolean expressions (if e1 is true, choose(e1 , e2 ) evaluates to true, else if e2 is true, choose(e1 , e2 ) evaluates to false, else choose(e1 , e2 ) evaluates to ∗). While we handle arbitrary nondeterministic Boolean expressions in our prototype tool (see Sec. 6), we only consider ∗ expressions in our exposition for simplicity. 7 the context is clear, we simply use V , L instead of V (P), L(P) etc. Transition Graphs. In addition to a textual representation, we will often find it convenient to use a transition graph representation of programs. The transition graph representation of P, denoted G(P), comprises a set of labeled, rooted, directed graphs G0 , . . . , Gt , which have exactly one node, err, in common. Informally, the ith graph Gi captures the flow of control in procedure Fi with its nodes and edges labeled by locations and corresponding statements of Fi , respectively. To be more precise, Gi = (Ni , Labi , Ei ), where the set of nodes Ni , given by Li ∪ exiti ∪ err, includes a unique entry node entryi , a unique exit node exiti and the error node err, the set of labeled edges Ei ⊆ Ni × Labi × Ni is defined as follows: for all `, `0 ∈ Ni , (`, ς, `0 ) ∈ Ei iff: - stmt(`) is an assignment, assume (g) or call F (e1 , . . . , ek ) statement, `0 is the next sequential location5 in Fi after ` and ς = stmt(`), or, - stmt(`) is a skip statement and either (a) stmt(`) is the last statement in the loop body of a statement `0 : while (g) and ς is the empty label, or, (b) `0 is the next sequential location in Fi after ` and ς is the empty label, or, - stmt(`) is if (g), and either (a) `0 , denoted T succ(`), is the location of the first statement in the then branch and ς = assume (g), or, (b) `0 , denoted F succ(`), is the location of the first statement in the else branch and ς = assume (¬g), or, - stmt(`) is while (g), and either (a) `0 , denoted T succ(`), is the location of the first statement in the while loop body and ς = assume (g), or, (b) `0 , denoted F succ(`), is the next sequential location in Fi after the end of the while loop body and ς = assume (¬g), or, - stmt(`) is assert (g), and either `0 , denoted T succ(`), is the next sequential location in Fi after ` and ς is the empty label, or, (b) `0 , denoted F succ(`), is the node err and ς is the empty label, or, - stmt(`) is a goto statement that includes the label `0 , and ς is the empty label, or, - stmt(`) is a return statement, `0 = exiti and ς = return. Let succ(`) denote the set {`0 : (`, ς, `0 ) ∈ Ei } for some i ∈ [0, t]. A path π in Gi is a sequence of labeled connected edges; with some overloading of notation, we denote the sequence of statements labeling the edges in 5 The next sequential location of the last statement in the then or else branch of a conditional statement is the location following the conditional statement. The next sequential location of the last statement in the main procedure is exit0 . 8 π as stmt(π). Not that every node in Gi is on some path between entryi and exiti . The transition graph of Boolean programs can be defined similarly (see Fig. 1c). The main modification is as follows. In defining the set of labeled edges Ei of graph Gi = (Ni , Labi , Ei ) in the transition graph representation G(B) of B, for ` ∈ Ni with stmt(`) given by if (∗) or while (∗), T succ(`), F succ(`) are defined as above, but the labels ς1 , ς2 in (`, ς1 , T succ(`)), (`, ς2 , F succ(`)) are each set to assume (true). Program Semantics and Correctness. Given a set Vs ⊆ V of variables, a valuation Ω of Vs is a function that maps each variable in Vs to an appropriate value of its type. Ω can be naturally extended to map well-typed expressions over variables to values. An operational semantics can be defined for our programs by formalizing the effect of each type of program statement on a program configuration. A configuration η of a program P is a tuple of the form (`, Ω, ζ), St where where ` ∈ i=0 Ni , Ω is a valuation of the variables in inscope(`)6 , e Ω), e and ζ is a stack of elements. Each element of ζ is of the form (`, e e e where ` ∈ Li for some i and Ω is a valuation of the variables in local(`). A program state is a pair of the form (`, Ω), where ` and Ω are as defined above; thus a program state excludes the stack contents. A configuration (`, Ω, ζ) of P is called an initial configuration if ` = entry0 is the entry node of the main procedure and ζ is the empty stack. We use η η0 to denote that P can transition from configuration η = (`, Ω, ζ) to configuration η 0 = (`0 , Ω 0 , ζ 0 ); the transitions rules for each type of program statement at ` and for exit nodes of procedures are presented in Fig. 3. Let us take a closer look at the last two transition rules in Fig. 3 - the only transition rules that affect the stack contents. Upon execution of the statement call Fj (e1 , . . . , ek ) in program configuration (`, Ω, ζ), control moves to the entry node of the called procedure Fj ; the new valuation Ω 0 of program variables is constrained to agree with Ω on the values of all global variables, and maps the formal parameters of Fj to the values of the actual arguments according to Ω; finally, the element (succ(`), ∆) is pushed onto the stack, where succ(`) is the location to which control returns after Fj completes execution and ∆ is a valuation of all local variables of the calling procedure, as recorded in Ω. The last transition rule in Fig. 3 captures the return of control to the calling procedure, say Fi , after completion of execution of a called procedure, say Fj ; the top of the stack element (`ret , ∆) is removed and is used to retrieve the location 6 For ` = exiti , inscope(`) = GV ∪ LVi , and for ` = err, inscope(`) is undefined. 9 Cases skip return goto `1 or . . . or `n stmt(`): assume g if g while g assert g v1 , . . . , vm := e1 , . . . , em call Fj (e1 , . . . , ek ) `: exitj (`, Ω, ζ) (`0 , Ω 0 , ζ 0 ) if: `0 = succ(`), Ω 0 = Ω and ζ 0 = ζ `0 ∈ succ(`), Ω 0 = Ω and ζ 0 = ζ Ω(g) = true, `0 = succ(`), Ω 0 = Ω and ζ 0 = ζ either Ω(g) = true, `0 = T succ(`), Ω 0 = Ω and ζ 0 = ζ, or, Ω(g) = false, `0 = F succ(`), Ω 0 = Ω and ζ 0 = ζ either Ω(g) = true, `0 = T succ(`), Ω 0 = Ω and ζ 0 = ζ, or, Ω(g) = false and `0 = F succ(`) = err `0 = succ(`), ∀i ∈ [1, m] : Ω 0 (vi ) = Ω(ei ), ∀v 6∈ {v1 , . . . , vm } : Ω 0 (v) = Ω(v) and ζ0 = ζ `0 = entryj , ∀vi ∈ f ormal(`0 ) : Ω 0 (vi ) = Ω(ei ), ∀v ∈ GV (P) : Ω 0 (v) = Ω(v) and ζ 0 = (succ(`), ∆).ζ, where ∀v ∈ local(`) : ∆(v) = Ω(v) `0 = `ret , ∀v ∈ local(`0 ) : Ω 0 (v) = ∆(v), ∀v ∈ GV (P) : Ω 0 (v) = Ω(v) and ζ = (`ret , ∆).ζ 0 Fig. 3: Transition rules for (`, Ω, ζ) (`0 , Ω 0 , ζ 0 ). `ret of Fi to which control must return as well the valuation ∆ of the local variables of Fi ; the new valuation Ω 0 of program variables is constrained to agree with Ω on the values of all global variables, and to agree with ∆ on the values of all local variables of Fi . An execution path of program P is a sequence of configurations, η η0 η 00 . . ., obtained by repeated application of the transition rules from Fig. 3, starting from an initial configuration η. Note that an execution path may be finite or infinite. The last configuration (`, Ω, ζ) of a finite execution path may either be a terminating configuration with ` = exit0 , or an error configuration with ` = err, or a stuck configuration with ` 6= exit0 . An execution path ends in a stuck configuration η if none of the transition rules from Fig. 3 are applicable to η. In particular, notice that notice that a transition from configuration (`, Ω, ζ) with stmt(`) being assume (g) is defined only when Ω(g) = true. The operational semantics of Boolean programs can be defined similarly. The main modifications are as follows. For stmt(`) given by if (∗) or while (∗), we say (`, Ω, ζ) (`0 , Ω 0 , ζ 0 ) if `0 ∈ succ(`), Ω 0 = Ω and ζ 0 = ζ. For stmt(`) given by the assignment statement b1 , . . . , bj , . . . , bm := e1 , . . . , ∗, . . . , em , we say (`, Ω, ζ) (`0 , Ω 0 , ζ 0 ) if `0 = succ(`), ζ 0 = ζ, 0 ∀i ∈ {1, . . . , j − 1, j + 1, . . . , m] : Ω (bi ) = Ω(ei ), ∀v 6∈ {b1 , . . . , bm } : 10 Ω 0 (v) = Ω(v), and either Ω 0 (bj ) = true or Ω 0 (bj ) = false. This transition rule can be extended to handle other scenarios such as assignment statements with multiple ∗ expressions in the RHS, and call statements with ∗ expressions in the actual arguments. An assertion in program P, is a statement of the form ` : assert (g), with g being a quantifier-free, first order expression representing the expected values of the program variables in inscope(`) at `. We will use the term assertion to denote both the statement ` : assert (g) as well as the expression g. We say a program configuration (`, Ω, ζ) satisfies an assertion, if the embedded variable valuation Ω satisfies the same. Given a program P annotated with a set of assertions, P is partially correct iff every finite execution path of P ends in a terminating configuration. We say P is totally correct iff every execution path is finite and ends in a terminating configuration. In what follows, we assume that all programs are annotated with a set of assertions. In specifying correctness for Boolean programs, we interpret the nondeterminism in them as Dijkstra’s demonic nondeterminism [13]. Given a program B annotated with a set of assertions, B is partially correct iff every finite execution path of B ends in a terminating configuration for all nondeterministic choices that B might make. B is totally correct iff every execution path is finite and ends in a terminating configuration, for all nondeterministic choices that B might make. Unless otherwise specified, an incorrect program is one that is not partially correct. Remark: While we found it convenient to define Boolean programs as we did above, it is worth noting that formalisms such as pushdown systems [8] and recursive state machines [1] are equivalent to Boolean programs. 3 3.1 Cost-aware Program Repair The Problem Let Σ denote the set of statement types in program P. As can be seen from Fig. 1c, it suffices to consider the set of statement types given by Σ = {skip, assign, assume, assert, call, return, goto}. Given a statement ς, let τ (ς) be an element of Σ denoting the statement type of ς. Let U = {u0 , u1 , . . . , ud } be a set of permissible, statement-level update schemas: u0 = id is the identity update schema that maps every statement to itself, and ui , i ∈ [1, m], is a function σ 7→ σ b, σ, σ b ∈ Σ \ {assert}, that maps a statement type to a statement type. For each update schema u, given by σ 7→ σ b, we say u can be applied to statement ς to get statement ςb if 11 τ (ς) = σ; τ (b ς ) is then given by σ b. For example, u, given by assign 7→ assign, can be applied to the assignment statement ` : x := y to get other assignment statements such ` : x := x + y, ` : y := x + 1 etc. Notice that update schemas in U do not affect the label of a statement, and that we do not permit any modification of an assert statement. In this paper, we fix the following set of permissible update schemas for programs: U = {id, assign 7→ assign, assign 7→ skip, assume 7→ assume, (1) call 7→ call, call 7→ skip}. We extend the notion of a statement-level update to a program-level b let the respective sets of locations update as follows. For programs P, P, be L, Lb and let stmt(`), s[ tmt(`) denote the respective statements at location `. Let RU ,L : L 7→ U be a function that maps each location of P b is a RU ,L -update of P iff L = Lb and to an update schema in U. We say P for each ` ∈ L, s[ tmt(`) is obtained by applying RU ,L (`) on stmt(`). Let cU ,L : U ×L → N be a cost function that maps a tuple, consisting of a statement-level update schema u and a location ` of P, to a certain cost. Thus, cU ,L (u, `) is the cost of applying update schema u to the stmt(`). We impose an obvious restriction on cU ,L : ∀` ∈ L : cU ,L (id, `) = 0. Since we have already fixed the set U and the set L of locations of program P (or equivalently, of Boolean program B), we henceforth use c, R instead of cU ,L , RU ,L , respectively, P The total cost, Costc (R), of performing a Rupdate of P is given by `∈L c(R(`), `). Given an incorrect concrete program P annotated with assertions, a cost function c and a repair budget δ, the goal of cost-aware program b such that: repair is to compute P b is totally correct, and, 1. P 2. there exists R: b is some R-update of P, and (a) P (b) Costc (R) ≤ δ. b we say P b is a (U, c, δ)-repair of P. If there exists such a P, In addition to the above problem, we propose another problem as follows. Let T = {T1 , . . . , Th } be a set of templates or grammars, each b representing a syntactical restriction for the modified expressions in P. The syntax of an example template, say T1 , defining Boolean-valued linear arithmetic expressions over the program variables, denoted hblaexpri, is shown below: 12 hblaexpri ::= atom | ( hblaexpri ) | ¬hblaexpri | hblaexpri ∧ hblaexpri hatomi ::= hlatermi hcmpi hlatermi hlatermi ::= const | var | const × var | hlatermi + hlatermi hcmpi ::= = | < | ≤. In the above, const and var denote integer-valued or real-valued constants and program variables, respectively. Expressions such as v1 + 2 × v2 ≤ v3 , (v1 < v2 ) ∧ (v3 = 3) etc., that satisfy the syntactical requirements of the template T1 , are said to belong to the language of the template, denoted L(T1 ). Let ET ,L : L → T , be a function that maps each location of P to a template in T . Let E(stmt(`)) denote a set that includes all expressions in certain statement types and be defined as follows: if stmt(`) is v1 , . . . , vm := e1 , . . . , em , E(stmt(`)) = {e1 , . . . , em }, else if stmt(`) is call Fj (e1 , . . . , ek ), E(stmt(`)) = {e1 , . . . , ek }, else if stmt(`) is assume (g), E(stmt(`)) = {g} else, E(stmt(`)) is the empty set. Given ET ,L , along with (incorrect) P, c and δ, the goal of templateb such that: based, cost-aware program repair is to compute P b is correct, and, 1. P 2. there exists R: b is some R-update of P, (a) P (b) Costc (R) ≤ δ, and (c) for each location `: R(`) 6= id ⇒ ∀e ∈ E(s[ tmt(`)) : e ∈ L(ET ,L (`)). We conjecture that an insightful choice for the cost function c can help prune the search space for repaired programs and help incorporate expert user intuition and intent in automatic program repair. Exploration of suitable cost-functions is beyond the scope of this dissertation. For now, we would only like to emphasize that our cost-function is quite flexible, b in diverse ways. For and can be used to constrain the computation of P b example, the user can choose to search for P that differs from P in at most δ statements by defining c as: ∀` ∈ L, u ∈ U : u 6= id ⇒ cU ,L ((id, `)) = 1. b that does not modify any stateOr, the user can choose to search for P ment within a trusted procedure Pi by defining c as: ∀` ∈ L, u ∈ U : u 6= id ∧ ` ∈ Li ⇒ cU ,L ((u, `)) = N and u 6= id ∧ ` 6∈ Li ⇒ cU ,L ((u, `)) = 1, 13 where N is some prohibitively large number. Or, the user can choose to favor the application of a particular update schema, say u1 , over others by defining c as: ∀` ∈ L, u ∈ U : u 6= id and u 6= u1 ⇒ cU ,L ((u, `)) = N and u = u1 ⇒ cU ,L ((u, `)) = 1, where N is some prohibitively large number, and so on. Similarly, insightful templates choices can help guide the search for repairs based on user input. 3.2 Solution Overview We present a predicate abstraction-based framework for cost-aware program repair. Recall that we had fixed a Boolean program B in Sec. 2 such that B is obtained from P via iterative predicate abstraction-refinement and B exhibits a non-spurious counterexample path. In addition to P, cU ,L and δ, our framework requires: the Boolean program B and the corresponding function γ that maps Boolean variables to their respective b involves predicates. The computation of a suitable repaired program P two main steps: b and 1. Cost-aware repair of B to obtain B, b 2. Concretization of Bb to obtain P. The problem of cost-aware repair of a Boolean program B can be defined in a manner identical to cost-aware repair of concrete program P. Concretization of Bb involves mapping each statement of Bb that has been modified by RU ,L into a corresponding statement of P, using the function γ. For template-based repair of P, the concretization needs to ensure that the modified expressions of P meet the syntactic requirements of the corresponding templates. In the following sections, we describe these two steps in detail. 4 Cost-aware Repair of Boolean Programs Our solution to cost-aware repair of a Boolean program B relies on autob that matically computing inductive assertions, along with a suitable B, b In what follows, we explain together certify the partial correctness of B. our adaptation of the method of inductive assertions [14,22] for cost-aware program repair. 14 Cut-set. Let N = N0 ∪. . .∪Nt be the set of nodes in G(B), the transition graph representation of B. We define a cut-set Λ ⊆ N as a set of nodes, called cut-points, such that for every i ∈ [0, t]: (a) entryi , exiti ∈ Λ, (b) for every edge (`, ς, `0 ) ∈ Ei where ς is a procedure call, `, `0 ∈ Λ, (c) for every edge (`, ς, `0 ) ∈ Ei where ς is an assert statement, `, `0 ∈ Λ, and (d) every cycle in Gi contains at least one node in Λ. A pair of cut-points `, `0 in some Gi is said to be adjacent if every path from ` to `0 in Gi contains no other cut-point. A verification path is any path from a cut-point to an adjacent cut-point; note that there can be more than one verification path between two adjacent cut-points. Example: The set {`1 , `2 , `7 , exit} is a valid cut-set for Boolean program B in Fig. 1. The verification paths in G(B) corresponding to this cut-set are as follows: assume (b2 ) 1. `1 −−−−−−−→ `2 assume (T) b0 ,b1 ,b2 := ∗,∗,∗ 2. `2 −−−−−−→ `3 −−−−−−−−−→ `4 → − `2 assume (T) 3. `2 −−−−−−→ `0 → − `7 assume (¬b2 ) assume (¬b1 ) assume (¬b2 ) assume (b1 ) 4. `1 −−−−−−−−→ `5 −−−−−−−−→ `7 b1 ,b1 ,b2 := ∗,∗,∗ 5. `1 −−−−−−−−→ `5 −−−−−−−→ `6 −−−−−−−−−→ `7 assert (¬b0 ) 6. `7 −−−−−−−−→ exit7 Inductive assertions. We denote an inductive assertion associated with cut-point ` in Λ by I` . Informally, an inductive assertion I` has the property that whenever control reaches ` in any program execution, I` must be true for the current values of the variables in scope. Thus, for a Boolean program, an inductive assertion I` is in general a Boolean formula over the variables whose scope includes `. To be precise, I` is a Boolean formula over Vs [`], where Vs [`] denotes an `th copy of the subset Vs of the program variables, with Vs = GV ∪ f ormal(`) if ` ∈ {exit1 , . . . , exitt }, and Vs = inscope(`) otherwise. Thus, except for the main procedure, the inductive assertions at the exit nodes of all procedures exclude the local variables declared in the procedure. Let IΛ denote the set of inductive assertions associated with all the cut-points in Λ. 7 Labeling this edge with assert (¬b0 ) is a slight abuse of the semantics of an assert statement. Our justification is that the constraints formulated later in this section require that the assertion is true whenever control reaches location `7 in an execution path. 15 Verification conditions. A popular approach to verification of sequential, imperative programs is to compute IΛ such that IΛ satisfies a set of constraints called verification conditions. Let π be a verification path in Gi , from cut-point ` to adjacent cut-point `0 . The verification condition corresponding to π, denoted V C(π), is essentially the Hoare triple hI` i stmt(π) hI`0 i, where stmt(π) is the sequence of statements labeling π. When I` , I`0 are unknown, V C(π) can be seen as a constraint encoding all possible solutions for I` , I`0 such that: every program execution along path π, starting from a set of variable valuations satisfying I` , terminates in a set of variable valuations satisfying I`0 . Note that the definitions of cut-sets and adjacent cut-points ensure that we do not have to worry about non-termination along verification paths. The Hoare triple hI` i stmt(π) hI`0 i can be defined using weakest preconditions or strongest postconditions. In this paper, as we will see shortly, we find it convenient to use strongest postconditions. Program verification using the inductive assertions method. Given a program B annotated with assertions, and a set Λ of cut-points, B is partially correct if one can compute a set IΛ of inductive assertions such that: for every verification path π between every pair `, `0 of adjacent cutpoints in G, V C(π) is valid. Cost-aware repairability conditions for partial correctness. Let S C : ti=0 Ni → N be a function mapping locations to costs. We find it convenient to use C` to denote the value C(`) at location `. We set Ientry0 = true and C` = 0 if ` ∈ {entry0 , . . . , entryt }. Informally, C` with ` ∈ Ni can be seen as recording the cumulative cost of applying a sequence of update schemas to the statements in procedure Fi from location entryi to `. Thus, for a specific update function R with cost function c, Cexit0 records the total cost Costc (R) of performing an R-update of the program. Given a verification path π in Gi , from cut-point ` to adjacent cut-point `0 , we extend the definition of V C(π) to define the cost-aware repairability condition corresponding to π, denoted CRC(π). CRC(π) can be seen as a constraint encoding all possible solutions for inductive assertions I` , I`0 and update functions RU ,L , along with associated functions C, such that: every program execution that proceeds along path π via statements modified by applying the update schemas in RU ,L , starting from a set of variable valuations satisfying I` , terminates in a set of variable valuations satisfying I`0 , for all nondeterministic choices that the program might make along π. 16 Before we proceed, recall that I` is a Boolean formula over Vs [`], with Vs = GV ∪ f ormal(`) if ` ∈ {exit1 , . . . , exitt }, and Vs = inscope(`) otherwise. Thus, for all locations λ 6= `0 in verification path π from ` to `0 , Vs = inscope(λ). In what follows, the notation JuK(stmt(λ)) represents the class of statements that may be obtained by applying update schema u on stmt(λ), and is defined for our permissible update schemas in Fig. 4. Here, f, f1 , f2 etc. denote unknown Boolean expressions8 , over the variables in inscope(λ). Note that the update schema assign 7→ assign, modifies any assignment statement, to one that assigns unknown Boolean expressions to all variables in Vs . u id assign 7→ skip assume 7→ skip call 7→ skip assign 7→ assign assume 7→ assume call 7→ call JuK(stmt(λ)) stmt(λ) skip skip skip b1 , . . . , b|Vs | := f1 , . . . , f|Vs | assume f call Fj (f1 , . . . , fk ), where stmt(λ): call Fj (e1 , . . . , ek ) Fig. 4: Definition of JuK(stmt(λ)) We now define CRC(π). There are three cases to consider. 1. stmt(π) does not contain a procedure call or assert statement: Let Aλ denote an assertion associated with location λ in π. CRC(π) is given by the (conjunction of the) following set of constraints: A` = I` A`0 ⇒ I`0 ^ ^ (2) R(λ) = u ⇒ Cλ0 = Cλ + c(u, λ) ∧ `λ≺`0 u∈Ustmt(λ) Aλ0 = sp(JuK(stmt(λ)), Aλ ). In the above, ≺ denotes the natural ordering over the sequence of locations in π with λ, λ0 being consecutive locations, i.e., λ0 ∈ succ(λ). 8 To keep our exposition simple, we assume that these unknown Boolean expressions are deterministic. However, in our prototype tool (see Sec. 6), we also have the ability to compute modified statements with nondeterministic expressions such as ∗ or choose(f1 , f2 ). 17 The notation Ustmt(λ) ⊆ U denotes the set of all update schemas in U which may be applied to stmt(λ). The notation sp(JuK(stmt(λ)), Aλ ) denotes the strongest postcondition of the assertion Aλ over the class of statements JuK(stmt(λ)). We define the strongest postcondition using multiple variable copies - a copy Vs [λ] for each location λ in π. Let us assume that Aλ is a Boolean formula of the form9 : ^ b[λ] = ξ[λ̀], (3) Aλ = ρ[`, λ̀] ∧ b∈Vs where λ̀, λ are consecutive locations in π with λ ∈ succ(λ̀), ρ[`, λ̀] is a Boolean expression over all copies Vs [µ], `  µ  λ̀, representing the path condition imposed by the program control-flow, and ξ[`] is a Boolean expression over Vs [λ̀] representing the λth copy of each variable b in terms of the λ̀th copy of the program variables. Note that A` = I` is of the form ρ[`]. JuK(stmt(λ)) skip goto sp(JuK(stmt(λ)), Aλ ) V ρ[`, λ̀] ∧ b∈Vs b[λ0 ] = b[λ] assume g g[λ] ∧ ρ[`, λ̀] ∧ V assume f f [λ] ∧ ρ[`, λ̀] ∧ V b1 , . . . , bm := e1 , . . . , em ρ[`, λ̀] ∧ b1 , . . . , b|Vs | := f1 , . . . , f|Vs | ρ[`, λ̀] ∧ b∈Vs b∈Vs b[λ0 ] = b[λ] b[λ0 ] = b[λ] V b [λ0 ] = ei [λ] ∧ Vbi ∈Vs ,i∈[1,m] i 0 bi ∈Vs ,i6∈[1,m] bi [λ ] = bi [λ] V bi ∈Vs bi [λ0 ] = fi [λ] Fig. 5: Definition of sp(JuK(stmt(λ)), Aλ ) Given Aλ of the form in (3), sp(JuK(stmt(λ)), Aλ ) is defined in Fig. 5. Observe that sp(JuK(stmt(λ)), Aλ ) is a Boolean formula of the same form as (3), over variable copies from Vs [`] to Vs [λ0 ]. For the entries assume g and b1 , . . . , bm := e1 , . . . , em , the expressions g, e1 , . . . , em 9 In general, Aλ is a disjunction over Boolean formulas of this form; sp(JuK(stmt(λ)), Aλ ) can then be obtained by computing a disjunction over the strongest postconditions obtained by propagating each such Boolean formula through JuK(stmt(λ) using the rules in Fig. 5. 18 are known beforehand (these entries correspond to u = id). For the entries assume f and b1 , . . . , b|Vs | := f1 , . . . , f|Vs | , the expressions f , f1 , . . ., f|Vs | are unknown (these entries correspond to u = assume 7→ assume and u = assign 7→ assign, respectively). Notation such as f [λ] denotes that f is an unknown Boolean expression over Vs [λ]. For nondeterministic expressions in the RHS of an assignment statement b1 , . . . , bm := e1 , . . . , em , the strongest postcondition is computed as the disjunction of the strongest postconditions over all possible assignment statements obtained by substituting each ∗ expression with either false or true. Thus, to summarize, the set of constraints in (2) encodes all I` , C` , I`0 , C`0 and RU ,L such that: if RU ,L is applied to the sequence of statements stmt(π) to get some modified sequence of statements, say s[ tmt(π), and program execution proceeds along s[ tmt(π), then I`0 is the strongest postcondition sp(s[ tmt(π), I` ), and C`0 equals the cumulative modification cost, counting up from C` . 2. stmt(π) contains a procedure call, say call Fj (e1 , . . . , ek ): The path π, given by (`, call Fj (e1 , . . . , ek ), `0 ), is a verification path of length 1. Suppose the formal parameters of Fj are b1 , . . . , bk . CRC(π) is then given by the following set of constraints: R = id ⇒ C`0 = C` + Cexitj ∧ ^ I` ⇒ Ientryj [ bi [entryj ]/ei [`]] ∧ i∈[1,k] Iexitj [ ^ bi [exitj ]/ei [`0 ]] ⇒ I`0 i∈[1,k] R = call 7→ skip ⇒ C`0 = C` + c(call 7→ skip, `) ∧ ^ I`0 = I` [ bi [`]/bi [`0 ]] (4) i∈[1,k] R = call 7→ call ⇒ C`0 = C` + Cexitj + c(call 7→ call, `) ∧ ^ I` ⇒ Ientryj [ bi [entryj ]/fi [`]] ∧ i∈[1,k] Iexitj [ ^ bi [exitj ]/fi [`0 ]] ⇒ I`0 i∈[1,k] For R = id, the constraints involve replacing the entryjth , exitth j copies of the formal parameters in Ientryj , Iexitj with the corresponding actual parameters e1 , . . . , ek expressed over the `th , `0 th copies of the 19 program variables, respectively. For R = call 7→ call, a similar substitution is performed, except the actual parameters are unknown expressions f1 , . . . , fk . Finally, for R = call 7→ skip, the inductive assertion essentially stays the same, with variable copies appropriately adjusted. C`0 is in general the sum of C` , the cumulative modification cost Cexitj of procedure Fj , and the cost of applying the update schema in question. 3. stmt(π) contains an assert statement, say assert g: Again, π, given by (`, assert g, `0 ), is a verification path of length 1, and CRC(π) is given by the following set of constraints: ^ ^ I` [ bi [`]/bi [tmp]] ⇒ g[ bi /bi [tmp]] i∈[1,|Vs |] I` [ ^ i∈[1,|Vs |] bi [`]/bi [tmp]] ⇒ I`0 [ i∈[1,|Vs |] ^ bi [`0 ]/bi [tmp]] i∈[1,|Vs |] C`0 = C` . In the above, we uniformly convert the expressions I` , g and I`0 into expressions over some temporary copy of the program variables to enable checking the implications (informally, these implications are I` ⇒ g and I` ⇒ I`0 ). Cost-aware Boolean program repair. Given a cut-set Λ of G(B), let ΠΛ be the set of all verification paths between every pair of adjacent cut-points in Λ. Given incorrect program B annotated with assertions, the set U, cost function c and repair budget δ, we say B is repairable within budget δ if given a cut-set Λ in G, one can compute a set IΛ of inductive assertions, an update function R, along with models for all unknown expressions associated with applications of update schemas in R, and the valuations of a cumulative-cost-recording function C such that: Cexit0 ≤ δ, for every verification path π ∈ ΠΛ , CRC(π) is valid and some other constraints are met. Mathematically, B is repairable within budget δ if the following formula is true: ^ ∃U nknown ∀V ar : Cexit0 ≤ δ ∧ CRC(π) ∧ AssumeConstraints, π∈ΠΛ (5) where U nknown is the set of all unknowns and V ar is the set of all Boolean program variables and their copies used in encoding each constraint CRC(π). The set of unknowns includes the inductive assertions 20 in IΛ , update function R, unknown expressions f, f1 etc. associated with applying the update schemas in R and valuations at each program location of the function C. Finally, AssumeConstraints ensures that any modifications to the guards of assume statements corresponding to the same conditional statement are consistent. Thus, for every pair of updated assume (f1 ), assume (f2 ) statements labeling edges starting from the same node in the transition graph, the uninterpreted functions f1 , f2 are constrained to satisfy f1 = ¬f2 . If the above formula is true, then we can extract models for all the unknowns from V the witness to the satisfiability of the formula: ∀V ar : Cexit0 ≤ δ ∧ π∈ΠΛ CRC(π) ∧ AssumeConstraints. In particular, we can extract an R and the corresponding modified statements to yield a b The following theorem states the correctness correct Boolean program B. and completeness of the above algorithm for repairing Boolean programs for partial correctness. Theorem 41 Given the set U specified in (1), and given an incorrect Boolean program B annotated with assertions, cost function c and repair budget δ, 1. if there exists a (U, c, δ)-repair of B, the above method finds a (U, c, δ)repair of B, b then Bb is a (U, c, δ)-repair of B. 2. if the above method finds a B, Proof. Note that the formula (5) is a ∃∀ formula over Boolean variables (Boolean program variables and their copies), unknown Boolean expressions over these Boolean variables (inductive assertions and expressions in modified program statements), sequences of update schemas (update functions) and corresponding sequences of integer costs (valuations of C). The number of Boolean variables is finite and hence, the number of unknown Boolean expressions over them is finite. There are a finite number of update functions drawn from finite sequences of update schemas in the finite set U, and a corresponding finite number of C functions, with Centry0 set to 0. Besides these (5) includes Boolean operators, the + operator and a finite number of integer constants (corresponding to the cost function c). Clearly, the truth of the formula in (5) is decidable. In particular, the formula has a finite number of models. Given the set U specified in (1), the completeness of our method follows from the completeness of Floyd’s inductive assertions method and the decidability of the formula in (5). The soundness of our method follows from the soundness of Floyd’s inductive assertions method. 21 Example: For the Boolean program in Fig. 1b, our tool modifies two statements: (1) the guard for stmt(`1 ) is changed from b2 to b0 ∨ b1 ∨ ¬b2 and (2) the guard for stmt(`2 ) is changed from ∗ to b0 ∨ b1 ∨ b2. 5 Concretization We now present the second step in our framework for computing a conb In what follows, we assume that we have alcrete repaired program P. ready extracted models for Bb and IΛ . Recall that γ denotes the mapping of Boolean variables to their respective predicates: for each i ∈ [1, |V (B)|], γ(bi ) = φi . The mapping γ can be extended in a standard way to map expressions over the Boolean variables in V (B) to expressions over the concrete program variables in V (P). b The goal of concretization of a repaired Boolean Concretization of B. b b program B is to compute a corresponding repaired concrete program P. This involves computing a mapping, denoted Γ , from each modified statement of Bb into a corresponding modified statement in the concrete program. In what follows, we define Γ for each type of modified statement b Let us fix our attention on a statement at location `, with Vs (B), in B. Vs (P) denoting the set of concrete, abstract program variables, respectively, whose scope includes `. Let r = |Vs (B)| and q = |Vs (P)|. 1. 2. 3. 4. Γ (skip) = skip Γ (assume (g)) = assume (γ(g)) Γ (call Fj (e1 , . . . , ek ) = call Fj (γ(e)1 , . . . , γ(e)k ) The definition of Γ for an assignment statement is non-trivial. In fact, in this case, Γ may be the empty set, or may contain multiple concrete assignment statements. We say that an assignment statement b1 , . . . , br := e1 , . . . , er in B is concretizable if one can compute expressions f1 , . . . , fq over Vs (P), of the same type as the concrete program variables v1 , . . . , vq in Vs (P), respectively, such that a certain set of constraints is valid. To be precise, b1 , . . . , br := e1 , . . . , er in B is concretizable if the following formula is true: ∃f1 , . . . , fq ∀v1 , . . . , vq : r ^ γ(bi )[v1 /f1 , . . . , vq /fq ] = γ(ei ) (6) i=1 Each quantifier-free constraint γ(bi )[v1 /f1 , . . . , vq /fq ] = γ(ei ) above essentially expresses the concretization of the abstract assignment bi = 22 ei . The substitutions v1 /f1 , . . . , vq /fq reflect the new values of the concrete program variables after the concrete assignment v1 , . . . , vq := f1 , . . . , fq . If the above formula is true, we can extract models expr1 , . . . , exprq for f1 , . . . , fq , respectively, from the witness to the satisfiability of the inner ∀-formula. We then say: v1 , . . . , vq := expr1 , . . . , exprq ∈ Γ (b1 , . . . , br := e1 , . . . , er ). Note that, in practice, for some i ∈ [1, q], expri may be equivalent to vi , thereby generating a redundant assignment vi := vi . The parallel assignment can then be compressed by eliminating each redundant assignment. In fact, it may be possible to infer some such vi without using (6) by analyzing the dependencies of concrete program variables on the predicates in {φ1 , . . . , φr } that are actually affected by the Boolean assignment in question; this exercise is beyond the current scope of this work. b Recall that ET ,L (`), associated Template-based concretization of B. with location `, denotes a user-supplied template from T , specifying the desired syntax of the expressions in any concrete modified statement at `. Henceforth, we use the shorthand E(`) for ET ,L (`). We find it helpful to illustrate template-based concretization using an example template. Let us assume that for each concrete program variable v ∈ V (P), v ∈ N ∪ R. We fix E(`) to (Boolean-valued) linear arithmetic expressions over q the program variables, of the form c0 + Σp=1 cp ∗ vp ≤ 0, for assume and call statements, and (integer or real-valued) linear arithmetic terms q cp ∗ vp , for assignment over the program variables, of the form c0 + Σp=1 statements. Let us assume that the parameters c0 , c1 , . . . , cq ∈ R. Given E(`), let ΓE(`) denote the mapping of abstract statements into concrete statements compatible with E(`). We can define ΓE(`) for each type of modified statement in Bb as shown below. The basic idea is to compute suitable values for the template parameters c0 , . . . , cq that satisfy certain constraints. Note that, in general, ΓE(`) may be the empty set, or may contain multiple concrete statements. 1. ΓE(`) (skip) = skip 2. The statement assume (g) is concretizable if the following formula is true: q ∃c, . . . , cq ∀v1 , . . . , vq : (c0 + Σp=1 cp ∗ vp ≤ 0) = γ(g). 23 (7) If the above formula is true, we extract values from the witness to the satisfiability of the inner ∀-formula, and say, q c0 + Σp=1 cp ∗ vp ≤ 0 ∈ ΓE(`) (assume (g)). 3. Similarly, the statement call Fj (e1 , . . . , ek ) is concretizable if the following formula is true: ∃c1,0 , . . . , ck,q ∀v1 , . . . , vq : k ^ q ((ci,0 + Σp=1 ci,p ∗ vp ≤ 0) = γ(ei )). i=1 If the above formula is true, we can extract values from the witness to the satisfiability of the inner ∀-formula to generate a concrete call statement in ΓE(`) (call Pj (e1 , . . . , ek )). 4. The statement b1 , . . . , br := e1 , . . . , er is concretizable if the formula in q cj,p ∗ vp , for j ∈ [1, q]. (8) is true. For convenience, let hj = cj,0 + Σp=1 ∃c1,0 , . . . , cr,q ∀v1 , . . . , vq : r ^ γ(bi )[v1 /h1 , . . . , vq /hq ] = γ(ei ). (8) i=1 If the above formula is true, we can extract values from the witness to the satisfiability of the inner ∀-formula to generate a concrete assignment statement in ΓE(`) (b1 , . . . , br := e1 , . . . , er ). Example: For our example in Fig. 1, the modified guards, b0∨b1∨¬b2 and b respectively are concretized b0 ∨ b1 ∨ b2, in stmt(`1 ) and stmt(`2 ) of B, into true and x ≤ 1, respectively using γ. Concretization of inductive assertions. The concretization of each inductive assertion I` ∈ IΛ is simply γ(I` ). 6 Experiments with a Prototype Tool We have built a prototype tool for repairing Boolean programs. The tool accepts Boolean programs generated by the predicate abstraction tool SATABS (version 3.2) [10] from sequential C programs. In our experience, we found that for C programs with multiple procedures, SATABS generates (single procedure) Boolean programs with all procedure calls inlined within the calling procedure. Hence, we only perform intraprocedural analysis in this version of our tool. The set of update schemas handled currently is {id, assign → assign, assume → assume}; we do 24 handmade1 : int main() { int x; `1 : while (x < 0) `2 : x := x + 1; `3 : assert (x > 0); } Boolean program vars/predicates: 1. γ(b0) = x ≤ 0 Boolean program repair: 1. Change guard for stmt(`1 ) from ∗ to b0 Concrete program repair: 1. Change guard for stmt(`1 ) to x ≤ 0 Fig. 6: Repairing program handmade1 not permit statement deletions. We set the costs c(assign → assign, `) and c(assume → assume, `) to some large number for every location ` where we wish to disallow statement modifications, and to 1 for all other locations. We initialize the tool with a repair budget of 1. We also provide the tool with a cut-set of locations for its Boolean program input. Given the above, the tool automatically generates an SMT query corresponding to the inner ∀-formula in (5). When generating this repairability query, for update schemas involving expression modifications, we stipulate every deterministic Boolean expression g be modified into an unknown deterministic Boolean expression f (as described in Fig. 4), and every nondeterministic Boolean expression be modified into an unknown nondeterministic expression of the form choose(f1 , f2 ). The SMT query is then fed to the SMT-solver Z3 (version 4.3.1) [23]. The solver either declares the formula to be satisfiable, and provides models for all the unknowns, or declares the formula to be unsatisfiable. In the latter case, we can choose to increase the repair budget by 1, and repeat the process. Once the solver provides models for all the unknowns, we can extract a repaired Boolean program. Currently, the next step — concretization — is only partly automated. For assignment statements, we manually formulate SMT queries corresponding to the inner ∀-formula in (6), and 25 handmade2 : int main() { int x; `1 : if (x ≤ 0) `2 : while (x < 0){ `3 : x := x + 2; `4 : skip; } else `5 : if (x == 1) `6 : x := x − 1; `7 : assert (x > 1); } Boolean program vars/predicates: 1. γ(b0) = x ≤ 1 2. γ(b1) = x == 1 3. γ(b2) = x ≤ 0 Boolean program repair: 1. Change guard for stmt(`1 ) from b2 to b0 ∨ b1 ∨ ¬b2 2. Change guard for stmt(`2 ) from ∗ to b0 ∨ b1 ∨ b2 Concrete program repair: 1. Change guard for stmt(`1 ) to true 2. Change guard for stmt(`2 ) to x ≤ 1 Fig. 7: Repairing program handmade2 feed these queries to Z3. If the relevant queries are found to be satisfiable, we can obtain a repaired C program. If the queries are unsatisfiable, we attempt template-based concretization using linear-arithmetic templates. We manually formulate SMT queries corresponding to the inner ∀-formulas in (7) and (8), and call Z3. In some of our experiments, we allowed ourselves a degree of flexibility in guiding the solver to choose the right template parameters. In Fig. 6, Fig. 7, Fig. 8 and Fig. 9, we present some of the details of repairing four C programs. The first two programs are handmade, with the second one being the same as the one shown in Fig. 1. The next two programs are mutations of two programs drawn from the NEC Laboratories Static Analysis Benchmarks [24]. 26 necex6 : int x, y; int foo(int ∗ptr) { `4 : if (ptr == &x) `5 : ∗ptr := 0; `6 : if (ptr == &y) `7 : ∗ptr := 1; return 1; } int main() { `1 : foo (&x); `2 : foo (&y); `3 : assert (x > y); } Boolean program vars/predicates: 1. γ(b0) = y < x 2. γ(b1) = &y == ptr 3. γ(b2) = &x == ptr Boolean program repair: 1. Change stmt(`7 ) from b0 := ∗ to b0 := b0 ∨ b1 ∨ b2 Concrete program repair: 1. Change stmt(`7 ) to ∗ptr := − 1 Fig. 8: Repairing program necex6 We emphasize that the repairs for the respective Boolean programs (not shown here due to lack of space) are obtained automatically. The concretization of the repaired Boolean program in Fig. 6 was trivial – it only involved concretizing the guard b0 corresponding to the statement at location `1 . Concretization of the repaired Boolean program in Fig. 7 involved concretizing two different guards, b0 ∨ b1 ∨ ¬b2 and b0 ∨ b1 ∨ b2, corresponding to the statements at locations `1 and `2 , respectively. We manually simplified the concretized guards to obtain the concrete guards true and x ≤ 1, respectively. Concretization of the repaired Boolean program in Fig. 8 involved concretizing the assignment statement at location `7 . We manually formulated an SMT query corresponding to the 27 necex14 : int main() { int x, y; int a[10]; `1 : x := 1U ; `2 : while (x ≤ 10U ) { `3 : y := 11 − x; `4 : assert (y ≥ 0 ∧ y < 10); `5 : a[y] := − 1; `6 : x := x + 1; } } Boolean program vars/predicates: 1. γ(b0) = y < 0 2. γ(b1) = y < 10 Boolean program repair: 1. Change stmt(`3 ) from b0, b1 := ∗, ∗ to b0, b1 := F, T Concrete program repair: 1. Change stmt(`3 ) to y := 10 − x Fig. 9: Repairing program necex14 formula in (6), after simplifying γ(b0 ∨ b1 ∨ b2 ) to y < x and restricting the LHS of stmt(`7 ) in the concrete program to remain unchanged. The query was found to be satisfiable, and yielded −1 as the RHS of the assignment statement in the concrete program. We repeated the above exercise to concretize the assignment statement at location `3 in Fig. 9, and obtained y := 0 as the repair for the concrete program. Unsatisfied by this repair, we formulated another SMT query corresponding to the formula in (8), restricting the RHS of stmt(`3 ) to the template −x + c, where c is unknown. The query was found to be satisfiable, and yielded c = 10. In Table 1, we present the results of repairing the above four programs and some benchmark programs from the 2014 Competition on Software Verification [11]. The complexity of the programs from [11] stems from nondeterministic assignments and function invocations within loops. All 28 experiments were run on the same machine, an Intel Dual Core 2.13GHz Unix desktop with 4 GB of RAM. We enumerate the time taken for each individual step involved in generating a repaired Boolean program. The columns labeled LoC(P) and LoC(B) enumerate the number of lines of code in the original C program and the Boolean program generated by SATABS, respectively. The column labeled V (B) enumerates the number of variables in each Boolean program. The column B-time enumerates the time taken by SATABS to generate each Boolean program, the column Que-time enumerates the time taken by our tool to generate each repairability query and the column Sol-time enumerates the time taken by Z3 to solve the query. The columns # Asg and # Asm count the number of assign → assign and assume → assume update schemas applied, respectively, to obtain the final correct program. Notice that our implementation either produces a repaired program very quickly, or fails to do so in reasonable time whenever there is a significant increase in the number of Boolean variables, as was the case for example, in veris.c NetBSD-libc loop true. This is because the SMT solver might need to search over simultaneous non-deterministic assignments to all the Boolean variables for every assignment statement in B in order to solve the repairability query. For the last two programs, SATABS was the main bottleneck, with SATABS failing to generate a Boolean program with a non-spurious counterexample after 10 minutes. In particular, we experienced issues while using SATABS on programs that relied heavily on character manipulation. We emphasize that when successful, our tool can repair a diverse set of errors in programs containing loops, multiple procedures and pointer and array variables. In our benchmarks, we were able to repair operators (e.g., an incorrect conditional statement x < 0 was repaired to x > 0) and array indices (e.g., an incorrect assignment x:=a[0] was repaired to x:=a[j]), and modify constants into program variables (e.g. an incorrect assignment x:=0 was repaired to x:=d, where d was a program variable). Also, note that for many benchmarks, the repaired programs required multiple statement modifications. 7 Discussion While the algorithm presented in this paper separates the computation b this of a repaired Boolean program Bb from its concretization to obtain P, separation is not necessary. In fact, the separation may be sub-optimal - it 29 Table 1: Experimental results Name LoC(P) LoC(B) V (B) B-time Que-time Sol-time # Asg # Asm handmade1 6 58 1 0.180s 0.009s 0.012s 0 1 handmade2 16 53 3 0.304s 0.040s 0.076s 0 2 necex6 24 66 3 0.288s 0.004s 0.148s 1 0 necex14 13 60 2 0.212s 0.004s 0.032s 1 0 while infinite loop 1 true 5 33 1 0.196s 0.002s 0.008s 0 1 array true 23 57 4 0.384s 0.004s 0.116s 1 1 n.c11 true 27 50 2 0.204s 0.002s 0.024s 1 0 terminator 03 true 22 38 2 0.224s 0.004s 0.036s 1 1 trex03 true 23 58 3 0.224s 0.036s 0.540s 1 1 trex04 true 29 36 1 0.200s 0.004s 0.004s 2 0 veris.c NetBSD − libc loop true 30 144 23 3.856s vogal true 41 - > 10m count up down true 18 - > 10m - may not be possible to concretize all modified statements of a computed b while there may indeed exist some other concretizable B. b The solution B, b is to directly search for B such that all modified statements of Bb are concretizable. This can be done by combining the constraints presented in Sec. 5 with the one in (5). In particular, the set U nknown in (5) can be modified to include unknown expressions/template parameters needed in the formulas in Sec. 5, and CRC(π) can be modified to include the inner quantifier-free constraints in the formulas in Sec. 5. As noted in Sec. 1, we can target total correctness of the repaired programs by associating ranking functions along with inductive assertions with each cut-point in Λ, and including termination conditions as part of the constraints. Finally, we wish to explore ways to ensure that the repaired program does not unnecessarily restrict correct behaviors of the original program. We conjecture that this can be done by computing the weakest possible b set of inductive assertions and a least restrictive B. References 1. Alur, R., Benedikt, M., Etessami, K., Godefroid, P., Reps, T., Yannakakis, M.: Analysis of Recursive State Machines. ACM Trans. Program. Lang. Syst. 27(4), 786–818 (2005) 2. Arcuri, A.: On the Automation of Fixing Software Bugs. In: International Conference on Software Engineering (ICSE). pp. 1003–1006. ACM (2008) 3. Ball, T., Bounimova, E., Kumar, R., Levin, V.: SLAM2: Static Driver Verification with under 4% False Alarms. In: Formal Methods in Computer Aided Design (FMCAD). pp. 35–42 (2010) 30 4. Ball, T., Naik, M., Rajamani, S.K.: From Symptom to Cause: Localizing Errors in Counterexample Traces. In: Principles of Programming Languages (POPL). pp. 97–105. ACM (2003) 5. Ball, T., Rajamani, S.K.: Boolean Programs: A Model and Process for Software Analysis. Tech. Rep. 2000-14, MSR (2000) 6. Ball, T., Rajamani, S.K.: Automatically Validating Temporal Safety Properties of Interfaces. In: International Workshop on Model Checking of Software (SPIN). pp. 103–122. Springer-Verlag (2001) 7. Bloem, R., Chatterjee, K., Henzinger, T.A., Jobstmann, B.: Better Quality in Synthesis through Quantitative Objectives. In: Computer Aided Verification (CAV). pp. 140–156. Springer (2009) 8. Bouajjani, A., Esparza, J., Maler, O.: Reachability Analysis of Pushdown Automata: Application to Model-Checking. In: International Conference on Concurrency Theory (CONCUR). pp. 135–150. Springer-Verlag (1997) 9. Chandra, S., Torlak, E., Barman, S., Bodik, R.: Angelic Debugging. In: International Conference on Software Engineering (ICSE). pp. 121–130. ACM (2011) 10. Clarke, E., Kroening, D., Sharygina, N., Yorav, K.: SATABS: SAT-based Predicate Abstraction for ANSI-C. In: Tools and Algorithms for the Construction and Analysis of Systems (TACAS). pp. 570–574. Springer Verlag (2005) 11. Competition on Software Verification (SV-COMP): Loops Benchmarks. http:// sv-comp.sosy-lab.org/2014/benchmarks.php (2014) 12. Debroy, V., Wong, W.E.: Using Mutation to Automatically Suggest Fixes for Faulty Programs. In: Software Testing, Verification and Validation (ICST). pp. 65–74 (2010) 13. Dijkstra, E.W.: A Discipline of Programming. Prentice Hall (1976) 14. Floyd, R.W.: Assigning Meanings to Programs. In: Mathematical Aspects of Computer Science. pp. 19–32. American Mathematical Society (1967) 15. Goues, C.L., Dewey-Vogt, M., Forrest, S., Weimer, W.: A Systematic Study of Automated Program Repair: Fixing 55 out of 105 Bugs for $8 Each. In: International Conference on Software Engineering (ICSE). pp. 3–13. IEEE Press (2012) 16. Graf, S., Saı̈di, H.: Construction of Abstract State Graphs with PVS. In: Computer Aided Verification (CAV). pp. 72–83. Springer Verlag (1997) 17. Griesmayer, A., Bloem, R., Cook, B.: Repair of Boolean Programs with an Application to C. In: Computer Aided Verification (CAV). pp. 358–371 (2006) 18. Jobstmann, B., Griesmayer, A., Bloem, R.: Program Repair as a Game. In: Computer Aided Verification (CAV). pp. 226–238. Springer-Verlag (2005) 19. Jose, M., Majumdar, R.: Cause Clue Clauses: Error Localization using Maximum Satisfiability. In: Programming Language Design and Implementation (PLDI). pp. 437–446. ACM (2011) 20. Könighofer, R., Bloem, R.: Automated Error Localization and Correction for Imperative Programs. In: Formal Methods in Computer Aided Design (FMCAD). pp. 91–100 (2011) 21. Logozzo, F., Ball, T.: Modular and Verified Automatic Program Repair. In: Object Oriented Programming Systems Languages and Applications (OOPSLA). pp. 133– 146. ACM (2012) 22. Manna, Z.: Introduction to Mathematical Theory of Computation. McGraw-Hill, Inc. (1974) 23. Moura, L.D., Bjørner, N.: Z3: An Efficient SMT Solver. In: Proceedings of Tools and Algorithms for the Construction and Analysis of Systems (TACAS). pp. 337– 340. Springer-Verlag (2008) 31 24. NEC: NECLA Static Analysis Benchmarks. http://www.nec-labs.com/ research/system/systems_SAV-website/benchmarks.php 25. Samanta, R., Deshmukh, J.V., Emerson, E.A.: Automatic Generation of Local Repairs for Boolean Programs. In: Formal Methods in Computer Aided Design (FMCAD). pp. 1–10 (2008) 26. Singh, R., Gulwani, S., Solar-Lezama, A.: Automatic Feedback Generation for Introductory Programming Assignments. In: Programming Language Design and Implementation (PLDI) (2013) 27. Singh, R., Solar-Lezma, A.: Synthesizing Data-Structure Manipulations from Storyboards. In: Foundations of Software Engineering (FSE). pp. 289–299 (2011) 28. Solar-Lezama, A., Rabbah, R., Bodik, R., Ebcioglu, K.: Programming by Sketching for Bit-streaming Programs. In: Programming Language Design and Implementation (PLDI). pp. 281–294. ACM (2005) 29. Solar-Lezama, A., Tancau, L., Bodik, R., Seshia, S., Saraswat, V.: Combinatorial Sketching for Finite Programs. In: Architectural Support for Programming Languages and Operating Systems (ASPLOS). pp. 404–415. ACM (2006) 30. Srivastava, S., Gulwani, S., Foster, J.S.: From Program Verification to Program Synthesis. In: Principles of Programming Languages (POPL). pp. 313–326. ACM (2010) 31. Wei, Y., Pei, Y., Furia, C.A., Silva, L.S., Buchholz, S., Meyer, B., Zeller, A.: Automated Fixing of Programs with Contracts. In: International Symposium on Software Testing and Analysis (ISSTA). pp. 61–72. ACM (2010) 32. Zaeem, R.N., Gopinath, D., Khurshid, S., McKinley, K.S.: History-Aware Data Structure Repair using SAT. In: Tools and Algorithms for the Construction and Analysis of Systems (TACAS). pp. 2–17. Springer-Verlag (2012) 33. Zeller, A., Hilebrandt, R.: Simplifying and Isolating Failure-Inducing Input. IEEE Trans. Softw. Eng. 28(2), 183–200 (2002) 32
6cs.PL
Learning Complex Swarm Behaviors by Exploiting Local Communication Protocols with Deep Reinforcement Learning arXiv:1709.07224v1 [cs.MA] 21 Sep 2017 Maximilian Hüttenrauch1 and Adrian Šošić2 and Gerhard Neumann1 Abstract— Swarm systems constitute a challenging problem for reinforcement learning (RL) as the algorithm needs to learn decentralized control policies that can cope with limited local sensing and communication abilities of the agents. Although there have been recent advances of deep RL algorithms applied to multi-agent systems, learning communication protocols while simultaneously learning the behavior of the agents is still beyond the reach of deep RL algorithms. However, while it is often difficult to directly define the behavior of the agents, simple communication protocols can be defined more easily using prior knowledge about the given task. In this paper, we propose a number of simple communication protocols that can be exploited by deep reinforcement learning to find decentralized control policies in a multi-robot swarm environment. The protocols are based on histograms that encode the local neighborhood relations of the agents and can also transmit task-specific information, such as the shortest distance and direction to a desired target. In our framework, we use an adaptation of Trust Region Policy Optimization to learn complex collaborative tasks, such as formation building, building a communication link, and pushing an intruder. We evaluate our findings in a simulated 2D-physics environment, and compare the implications of different communication protocols. I. INTRODUCTION Nature provides many examples where the performance of a collective of limited beings exceeds the capabilities of one individual. Ants transport prey of the size no single ant could carry, termites build nests of up to nine meters in height, and bees are able to regulate the temperature of a hive. Common to all these phenomena is the fact that each individual has only basic and local sensing of its environment and limited communication capabilities to its neighbors. Inspired by these biological processes, swarm robotics [1], [2], [5] tries to emulate such complex behavior with a collective of rather simple entities. Typically, these robots have limited movement and communication capabilities and can sense only a local neighborhood of their environment, such as distances and bearings to neighbored agents. Moreover, these agents have limited memory systems, such that the agents can only access a short horizon of their perception. As a consequence, the design of control policies that are capable of solving complex cooperative tasks becomes a non-trivial problem. A common approach to program these systems is by extracting rules from the observed behavior Calculations for this research were conducted on the Lichtenberg high performance computer of the TU Darmstadt. 1 Maximilian Hüttenrauch and Gerhard Neumann are with the School of Computer Science, University of Lincoln, Lincoln, UK {mhuettenrauch,gneumann}@lincoln.ac.uk 2 Adrian Šošić is with the neering, Technische Universität Department of Electrical EngiDarmstadt, Darmstadt, Germany [email protected] their natural counterparts. Kube et al [13], for example, investigate the cooperative prey retrieval of ants to infer rules on how a swarm of robots can fulfill the task of cooperative box-pushing. Similar work can be found e.g. in [16], [12], [19]. However, extracting these rules can be tedious and the complexity of the tasks that we can solve via explicit programming is limited. In this paper, we want to learn complex swarm behavior using deep reinforcement learning [17], [22], [23], [10] based on the locally sensed information of the agents such that the desired behavior can be defined by a reward function instead of hand-tuning simple controllers of the agents. Swarm systems constitute a challenging problem for reinforcement learning as the algorithm needs to learn decentralized control policies that can cope with limited local sensing and communication abilities of the agents. Most collective tasks require some form of active cooperation between the agents. For efficient cooperation, the agents need to implement basic communication protocols such that they can transmit their local sensory information to neighbored agents. Learning such communication protocols simultaneously to learning the behavior of the agents seems to be out of reach of current reinforcement learning algorithms, which explains the limited success of deep reinforcement learning for such swarm systems. However, using prior knowledge about the given task, simple communication protocols can be defined much more easily than directly defining the behavior. In this paper, we propose and evaluate several simple communication protocols that can be exploited by deep reinforcement learning to find decentralized control policies in a multi robot swarm environment. Our communication protocols are based on local histograms that encode the neighborhood relation of an agent to other agents and can also transmit task-specific information such as the shortest distance and direction to a desired target. The histograms can deal with the varying number of neighbors that can be sensed by a single agent depending on its current neighborhood configuration. These protocols are used to generate high dimensional observations for the individual agents that is in turn exploited by deep reinforcement learning to efficiently learn complex swarm behavior. We base our algorithm on Trust Region Policy Optimization (TRPO) [21], a state-of-the-art deep reinforcement learning algorithm. The resulting algorithm provides an integrated learning framework that is specifically tailored to the swarm setting. Our approach is able to learn decentralized control policies in an end-to-end fashion, as mappings from local sensory input to actions, without the need for complex feature engineering. In summary, our method addresses the emerging challenges of decentralized swarm control in the following way: 1) Homogeneity: explicit sharing of policy parameters between the agents 2) Partial observability: efficient processing of actionobservation histories through windowing and parameter sharing 3) Communication: usage of histogram-based communication protocols over simple features To demonstrate our framework, we formulate three cooperative learning tasks in a simulated swarm environment. The environment is inspired by the Colias robot [3] (see Figure 1), a modular platform with two wheel motor-driven movement and various sensing systems. Fig. 1: A Colias robot. This platform provides the basis for our simulation experiments. II. BACKGROUND that are fitted to the monte-carlo returns. The objective is to be maximized subject to a fixed constraint on the Kullback-Leibler (KL) divergence of the policy before and after the parameter update, which ensures the updates to the new policy’s parameters θ are bounded, in order to avoid divergence of the learning process. The overall optimization problem is summarized as   πθ Â(s, a) maximize E πθold (1) θ subject to E[DKL (πθold ||πθ )] ≤ δ. In this section, we provide a short summary of Trust Region Policy Optimization and formalize our learning problem domain. The problem is approximately solved using the conjugate gradient optimizer after linearizing the objective and quadratizing the constraint. A. Trust Region Policy Optimization B. Problem Domain Trust Region Policy Optimization (TRPO) is an algorithm to optimize control policies in single-agent reinforcement learning problems [21]. These problems are formulated as Markov decision processes (MDP) which are compactly written as a tuple hS, A, P, R, γi. In an MDP, an agent chooses an action a ∈ A via some policy π(a | s), based on its current state s ∈ S, and progresses to state s0 ∈ S according to a transition function P (s0 | s, a). After each step, the agent is assigned a reward r = R(s, a), provided by a reward function R which judges the quality of its decision. The goal of the agent is to find a policy which maximizes the cumulative reward achieved over a certain period of time. In TRPO, the policy is parametrized by a parameter vector θ containing weights and biases of a neural network. In the following, we denote this parameterized policy as πθ . The reinforcement learning objective is expressed as finding a new policy that maximizes the expected advantage function of the current policy, i.e.,   πθ Â(s, a) , J TRPO = E πθold Building upon the theory of single-agent reinforcement learning, we can now formulate the problem domain for our swarm environments. Instead of considering only one single agent, we consider multiple agents of the same type, which interact in the same environment. Because of their limited sensory input, each agent can only obtain a local observation o from the vicinity of its environment and is, hence, only partially informed about the global system state s ∈ E. The global system state is in this case comprised of the local states of all agents and additional attributes of the environment. In order to cope with this limitation, the agents need to make use of their observation histories to successfully solve a global collaborative task [20]. Considering a homogeneous system, we assume that all agents execute the same distributed policy, now defined as a mapping of histories h of past actions a and observations o within some finite horizon η. The global task of the agents is encoded in the reward function R(s, a), where we from now on write a to denote the joint action vector of the whole swarm. where  is an estimate of the advantage function of the current policy πold which is defined as Â(s, a) = Qπold (s, a) − π Vold (s). Herein, state-action value function Qπold (s, a) is typically estimated by a single trajectory rollout while for the value function V πold (s) rather simple baselines are used Currently, the majority of the deep reinforcement learning literature focuses on the single-agent scenario and there are only few approaches tackling the multi-agent problem. One of these approaches can be found in [15], where the authors use a variation of the deep deterministic policy gradient Paper Outline: In Section II, we review the concepts of TRPO and describe our problem domain. In Section III, we show in detail how we tackle the challenges of modeling observations and the policy in the partially observable swarm context, and how to adapt TRPO to our setup. In Section IV, we present the model and parameters of our agents and introduce three tasks on which we evaluate our proposed observation models and policies. C. Related Work (b) range histogram (c) bearing histogram (d) joint histogram (a) local agent configuration Fig. 2: Schematic illustration of the histogram-based observation model. algorithm [14] to learn a centralized Q-function for each policy. While this accounts for some reasoning about the other agents behavior, the linear increase in dimensionality of joint observation and action spaces makes scaling this algorithm to many agents very hard. Another algorithm, tackling the credit assignment problem, can be found in [8]. Here, a baseline of other agents’ behavior is subtracted from a centralized critic to reason about the quality of a single agent’s behavior. However, this approach is only possible in scenarios with discrete action spaces since it requires marginalization over the agents’ action space. Finally, a different line of work concerning the learning of communication models between agents can be found in [7]. A good example of rule based behavior is found in [5] where a group of swarming robots transports an object to a goal. Further comparable work can be found in [6] for aggregation, [18] for flocking, or [9] for foraging. III. M ULTI -AGENT L EARNING WITH L OCAL C OMMUNICATION P ROTOCOLS In this section, we briefly discuss the used model and state representation of a single agent. Subsequently, we introduce different communication protocols based on neighborhood histograms that can be used in combination to solve complex swarm behaviors. Our algorithm relies on deep neural network policies of special architecture that can exploit the structure of the high-dimensional observation histories. We present this network model and subsequently discuss small adaptations we had to make to the TRPO algorithm in order to apply it to this cooperative multi-agent setting. A. Single Agent Model The local state of a single agent is modeled by its 2D position and orientation, i.e., si = [xi , y i , φi ] ∈ S = {[x, y, φ] ∈ R3 : 0 ≤ x ≤ xmax , 0 ≤ y ≤ ymax , 0 ≤ φ ≤ 2π}. The robot can only control the speed of its wheels. Therefore, we apply a force to the left and right side of the agent, similarly to the wheels of the real robot. Our model of a single agent is inspired by the Colias robot, but the underlying principles can be straightforwardly applied to other swarm settings with limited observations. B. Communication Protocols Our communication protocols are based on histograms that can either encode neighborhood relations or distance relations to different points of interest. 1) Neighborhood Histograms: The individual agents can observe distance and bearing to neighbored agents if they communicate with this agent. We assume that the agents are constantly sending a signal, such that neighbored agents can localize the sources. The arising neighborhood configuration is an important source of information and can be used as observations of the individual agents. One of the arising difficulties in this case is to handle changing number of neighbors which would result in a variable length of the observation vector. Most policy representations, such as neural networks, expect a fixed input dimension. One possible solution to this problem is to allocate a fixed number of neighbor relations for each agent. If an agent experiences less neighborhood relations, standard values could be used such as a very high distance and 0 bearing. However, such an approach comes with several drawbacks. First of all, the size of the resulting representation scales linearly with the number of agents in the system and so does the number of parameters to be learned. Second, the execution of the learned policy will be limited to scenarios with the exact same number of agents as present during training. Third, a fixed allocation of the neighbor relation inevitably destroys the homogeneity of the swarm, since the agents are no longer treated interchangeably. In particular, using a fixed allocation rule requires that the agents must be able to discriminate between their neighbors, which might not even be possible in the first place. To solve these problems, we propose to use histograms over observed neighborhood relations, e.g., distances and bearing angles. Such a representation inherently respects the agent homogeneity and naturally comes with a fixed dimensionality. Hence, it is the canonical choice for the swarm setting. For our experiments, we consider two different types of representations: 1) concatenated one-dimensional histograms of distance and bearing and 2) multidimensional histograms. Both types are illustrated in Figure 2. The one-dimensional representation has the advantage of scalability, as it grows linearly with the number of features. The downside is that potential dependencies between the features are completely ignored. 2) Shortest Path Partitions: In many applications, it is important to transmit the location of a point of interest to neighbored agents that can currently not observe this point due to their limited sensing ability. We assume that an agent can observe bearing and distance to a point of interest if it is within its communication radius. The agent then transmits the observed distance to other agents. Agents that can not see the point of interest might in this case observe a message from another agent containing the distance to the point of interest. The distance of the sending agent is added to the received distance to obtain the distance to the point of interest if we would use the sending agent as a via point. Each agent might now compute several of such distances and transmits the minimum distance it has computed to indicate the length of the shortest path it has seen. The location of neighbored agents including their distance of the shortest path information is important knowledge for the policy, e.g. for navigating to the point of interest. Hence, we adapt the histogram representation. Each partition now contains the minimum received shortest path distance of an agent that is located in this position. C. Weight Sharing for Policy Networks The policy maps sequences of past actions and observations to a new action. We use histories of a fixed length as input to our policy and a feed-forward deep neural network as architecture. This architecture was chosen because initial experiments with recurrent neural networks have led to poor results and because small history lengths are often sufficient for swarm behaviors if the communication protocols provide enough useful information. As a single observation can be constituted of multiple histograms or partitions, our observation space can already be quite high dimensional. Using a history of observations further adds to the dimensionality of the input to the network. To cope with such high input dimensionality, we propose a weight sharing approach. Each action-observation pair in an agent’s history is first processed independently with a network using the same weights. After this initial reduction in dimensionality, the hidden states are concatenated in a subsequent layer and finally mapped to an output. The independent layers can formally be described as li,k = f (Wi li−1,k + bi ) with k ∈ {1, 2, . . . , η}, i ∈ {1, 2, . . . , I}, where {Wi } and {bi } are weight matrices and bias vectors, f (·) is an activation function, and I is the number of independent hidden layers. The input to the first layer is defined as l0,k = ak−1 ⊕ ok , where ⊕ denotes concatenation of vectors. Note, that W1 , b1 to WI , bI are shared for the whole length of the history, reducing the number of parameters necessary to process the history. Let m0 = lI,0 ⊕ lI,1 ⊕ · · · ⊕ lI,η be the concatenation of independent hidden states, then the combining layers of our at−η , ot−η+1 at−η+1 , ot−η+2 at−1 , ot l0,η l0,2 l0,1 128 128 l1,1 ... 128 ... 16 l1,2 16 16 l2,1 l1,η l2,2 l2,η m0 16 × η m1 2 m2 action Fig. 3: This diagram shows a model of our proposed policy with I = 2 and J = 1. The numbers inside the boxes denote the dimensionalities of the hidden layers. The plus sign denotes concatenation of vectors. policy model are given by mj = f (WI+j mj−1 + bI+j ) with j ∈ {1, 2, . . . , J}, where J is the number of combined hidden layers. The output mJ at the last layer is used as the action vector for the agent. The homogeneity of agents is achieved by using the same set of parameters for all policies. A diagram of the architecture is shown in Figure 3. D. Adaptations to TRPO In order to apply TRPO to our multi-agent setup, some small changes to the original algorithm have to be made, similar to the formulation of [11]. First, since we assume homogeneous agents, we can have one set of parameters of the policy shared by all agents. Since the agents cannot rely on the global state, the advantage function is redefined as A(h, a). In order to estimate this function, each agent is assigned the same global reward r in each time step and all transitions are treated as if they were executed by a single agent. IV. EXPERIMENTAL SETUP In this section, we describe our three experimental setups and the underlying robot model that has been used in our simulation. A. Colias The Colias robot consists of a base module housing a motion controller for two wheel-driven movement and three shortrange IR bump sensors, and several extension modules, e.g. a long-range IR module with six IR sensors, a camera module and Bluetooth communication. Furthermore, it has an ambient light sensor. For this work, we rely solely on the data of short and long range IR sensors and the ambient light sensor. The agents are able to move with a maximum speed of approximately 35 cm/s. In case of active object detection, the short range IR sensors have a range of 3 cm and the long 1.0 1.0 1.0 0.8 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 0.2 0.2 0.2 0.0 0.0 0.0 0.2 0.4 0.6 (a) edge task 0.8 1.0 0.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 (b) link task 0.2 0.4 0.6 0.8 1.0 (c) push task Fig. 4: Illustration of the three cooperative tasks used in this paper. The green dots represent the agents, where the green ring segments located next to the agents indicate the short range IR front sensors. The outer green circles illustrate the maximum range in which distances / bearings to other agents can be observed, depending on the used observation model. (a) Edge task: The red rings show the penalty zones where the agents are punished, the outer green rings indicate the zones where legal edges are formed. (b) Link task: The red dots correspond to the two points that need to be connected by the agents. (c) Push task: The red dot represents the intruder, who tries to reach the point marked by the black dot (a simulated light source), while the agents try to push it as far away as possible. range IR sensors have a range of 10 cm. Signals transmitted by other agents can be received and reliably processed (in terms of distance and bearing estimation) up to a distance of 20 cm. The platform itself is still under development and, thus, we have not been able to deploy the learned policies, yet. Generally, our observation model is comprised of the raw sensor readings of the short and long range IR sensors (later denoted as ’sensor’ in the evaluations). Furthermore, we augment this observation representation with the communication protocols developed in Section 3. Our model also accounts for noise in the estimation since no precise positions are provided to the agents. We consider the following dimensionality of observations: • Short range IR: 3 • Long range IR: 6 • Ambient light sensor: 1 • 1D histogram over distances: 7 • 1D histogram over bearing: 8 • 2D histogram/partition over distances and bearing: 56 (7 × 8) Discretizing in this way leads to a resolution of 3 cm in distance and π/4 in angle in the histogram representation. Note, that either 1D or 2D histograms are used, not both at the same time. Additional features are added depending on the task and will be explained in the experiments section. Our simulation is running a realistic 2D physics engine (Box2D), allowing for correct physical interaction of the bodies of the agents. B. Policy Architecture We decided for a policy model with three hidden layers, i.e. I = 2 and J = 2. The first two layers process the observation-action pairs (ak−1 , ok ) of each timestep in a history individually and map it into hidden layers of size 128 and 16. The output of the second layer is then concatenated to form the input of the third hidden layer which eventually maps to the two actions for the left and right motor. For example in the case of an observation representation using a 2D histogram with dimensionality 56 and 8 previous timesteps instead of having to process an input vector of size 8 × 56 = 544 we can map the 56 dimensions of a single timestep into a 16 dimensional space and concatenate this representation to a 128 dimensional representation. C. Tasks The focus of our experiments is on tasks where agents need to collaborate to achieve a common goal. For this purpose, we designed the following three scenarios: Task 1: Building a Graph In the first task, the goal of the agents is to find and maintain a certain distance to each other. This kind of behavior is required, for example, in surveillance tasks, where a group of autonomous agents needs to maximize the coverage of a target area while maintaining their communication links. We formulate the task as a graph problem, where the agents (i.e. the nodes) try to maximize the number of active edges in the graph. Herein, an edge is considered active whenever the distance between the corresponding agent lies in certain range. The setting is visualized in Figure 4a. In our experiment, we provide a positive reward for each edge in a range between 10 cm and 16 cm, and further give negative feedback for distances smaller than 7 cm. Accordingly, the reward function is R(s, a) = M X M X i=1 m>i 1[0.1,0.16] (dim ) − 5 M X M X i=1 m>i 1[0,0.07] (dim ), 8,000 6,000 6,000 Average Returns Average Return 8,000 4,000 2,000 η=2.0 η=4.0 η=8.0 0 0 200 400 600 TRPO Iterations 800 4,000 2D 1D d + b d b sensor 2,000 0 1000 (a) Comparison of different history lengths η. (2D histogram) 0 200 400 600 TRPO Iterations 800 1000 (b) Comparison of different observation models. (η = 2) Fig. 5: Learning curves for the edge task. The curves show the mean values plus / minus one standard deviation, computed from eight learning trials. Legend: 2D: two-dimensional histogram over distances and bearings, 1D: two independent histograms over distances and bearing, d: distance only histogram, b: bearing only histogram, sensor: no histogram. p (xi − xm )2 + (yi − ym )2 denotes the Euwhere dim = clidean distance between the centres of agent i and agent m and ( 1 if x ∈ [a, b], 1[a,b] (x) = 0 else is an indicator function. Note that we omit the dependence of dim on the system state s to keep the notion simple. Task 2: Establishing a Communication Link The second task adds another layer of difficulty. While maintaining a network, the agents have to locate and connect two randomly placed points in the state space. A link is only established successfully if there are communicating agents connecting the two points. Figure 4c shows an example with an active link spanned by three agents between the two points. The task resembles the problem of establishing a connection between two nodes in a wireless ad hoc network [4], [24]. In our experiments, the distance of the two points is chosen to be larger than 75 cm, requiring at least three agents to bridge the gap in between. The reward is determined by the length of the shortest distance between the two points dopt (i.e. a straight line) and the length of the shortest active link dsp spanned by the agents, (d opt R(s, a) = dsp 0 if link is established otherwise. In this task, we use the shortest path partitions as communication protocol. Each agent communicates the shortest path it knows to both points of interests, resulting in two 2-D partitions that are used as observation input for a single time step. Task 3: Pushing an Intruder In the third task, a group of Colias robots (the defenders) shall prevent another Colias robot (the intruder) from reaching a specified target position. The task is similar to the box-pushing in [Kube1998] problem but more challenging because the intruder adds additional dynamics to the problem. The target position is indicated by a light source which allows the intruder to determine its Euclidean distance to the target via the ambient light sensor. The defenders however are only informed about the distance of the intruder to the light position when they are within its communication range, the light position itself is not part of the agents’ observation. The policy of the intruder is modeled by a phototaxis behavior and is not part of the learning process. The reward is computed based on the current distance of the intruder to the target position. The distance is given by p dlp = (xp − xl )2 + (yp − yl )2 where the position by the light is given by a point (xl , yl ) and the intruder’s position by (xp , yp ), the reward function is R(s, a) = dlp . In addition to the standard sensor readings, we give the agents the ability to distinguish the intruder from other agents. This additional information is encoded in two extra dimensions for range and bearing in the observation representation. For this task, we tested different observation protocols, i.e. the neighborhood histograms as well as the shortest path partitions, where the intruder’s position was used as point of interest. V. RESULTS We evaluate each task in a standardized environment of size 1 m × 1 m where we initialize ten agents randomly in the scene. Of special interest is how the amount of information provided to the agents affects the overall system 2DSP 2D 1D sensor 300 Average Returns Average Returns 400 200 100 0 2DSP 2D 1D sensor 100 50 0 0 200 400 600 TRPO Iterations 800 1000 0 (a) link task 200 400 600 TRPO Iterations 800 1000 (b) push task Fig. 6: Learning curves for (a) the link task and (b) the push task, obtained for different observation models and a fixed history length of η = 2. The curves show the mean values plus / minus one standard deviation based on eight learning trials. Legend: 2DSP: two dimensional histogram over shortest paths, 2D: two-dimensional histogram over distances and bearings, 1D: two independent histograms over distances and bearing, sensor: no histogram. performance. Herein, we have to keep in mind the general information-complexity trade-off, i.e., high-dimensional local observations generally provide more information about the global system state but, at the same time, result in a more complex learning task. Recall that the information content is mostly influenced by two factors: • the length of the history, • the composition of the observation. A. Edge Task First, we evaluate how the history length η affects the system performance. Figure 5a shows an evaluation for η = {2, 4, 8} and a weight sharing policy using a two-dimensional histogram over distances and bearings. Interestingly, we observe that longer observation histories do not show an increase in the performance. Either the increase in information could not counter the effect of increased learning complexity, or a history length of η = 2 is already sufficient to solve the task. We use these findings and set the history length to η = 2 for the remainder of the experiments. Next, we analyze the impact of the observation model. Figure 5b shows the results of the learning process for different observation modalities. The first observation is that, irrespective of the used mode, the agents are able to establish a certain number of edges. Naturally, a complete information of distances and bearing yields the best performance. However, the independent histogram representation yields comparable results two the two dimensional histogram. Again, this is due to the aforementioned complexity trade-off where a higher amount of information makes the learning process more difficult. B. Link Task We evaluate the link task with raw sensor measurements, count based histograms over distance and bearing, and the more advanced shortest path histograms over distance and bearing. Based on the findings of the edge task we keep the history length at η = 2. Figure 6a shows the results of the learning process where each observation model was again tested and averaged over 8 trials. Since at least three agents are necessary to establish a link between the two points, the models without shortest path information struggle to reliably establish the connection. Their only chance is to spread as wide as possible and, thus, cover the area between both points. Again, it is interesting to see that independent histograms over counts seem to be favorable over the 2D histogram. However, both versions are surpassed by the 2D histogram over shortest paths which yields information about the current state of the whole network of agents, currently connected to each of the points. C. Push Task The push task turned out to be the hardest challenge. Given only the information about the current distance and bearing to neighboring agents, the defenders were unable to find a strategy to prevent the intruder from reaching the light position. Only when agents have access to the shortest path to the intruder, they are able to push him away from its goal. However, we would like to further investigate how to improve the agents’ behavior to successfully execute the task. VI. CONCLUSIONS AND FUTURE WORK In this paper, we demonstrated that histograms over simple local features can be an effective way for processing information in robot swarms. The central aspect of this new model is its ability to handle arbitrary system sizes without discriminating between agents, which makes it perfectly suitable to the swarm setting where all agents are identical and the number of agents in the neighborhood varies with time. We use these protocols and an adaptation of TRPO for the swarm setup to learn cooperative decentralized control policies for a number of challenging cooperative task. The evaluation of our approach showed that this histogram-based model leads the agents to reliably fulfill the tasks. Interesting future directions include, for example, the learning of an explicit communication protocol. Furthermore, we expect that assigning credit to agents taking useful actions should speedup our learning algorithm. R EFERENCES [1] A review of swarm robotics tasks. Neurocomputing, 172(C):292 – 321, 2016. [2] J. Alonso-Mora, E. Montijano, M. Schwager, and D. Rus. Distributed multi-robot formation control among obstacles: A geometric and optimization approach with consensus. In Proceedings of the IEEE International Conference on Robotics and Automation, pages 5356– 5363, 2016. [3] F. Arvin, J. Murray, C. Zhang, and S. Yue. Colias: An autonomous micro robot for swarm robotic applications. International Journal of Advanced Robotic Systems, 11(7):113, 2014. [4] P. Basu and J. Redi. Movement control algorithms for realization of fault-tolerant ad hoc robot networks. IEEE Network, 18(4):36–44, 2004. [5] J. Chen, M. Gauci, and R. Groß. A strategy for transporting tall objects with a swarm of miniature mobile robots. In Proceedings of the IEEE International Conference on Robotics and Automation, pages 863–869, 2013. [6] N. Correll and A. Martinoli. Modeling and designing self-organized aggregation in a swarm of miniature robots. The International Journal of Robotics Research, 30(5):615–626, 2011. [7] J. Foerster, Y. M. Assael, N. de Freitas, and S. Whiteson. Learning to communicate with deep multi-agent reinforcement learning. In Advances in Neural Information Processing Systems 29, pages 2137– 2145. 2016. [8] J. Foerster, G. Farquhar, T. Afouras, N. Nardelli, and S. Whiteson. Counterfactual multi-agent policy gradients. arXiv:1705.08926, 2017. [9] D. Goldberg and M. J. Mataric. Robust behavior-based control for distributed multi-robot collection tasks. Technical report, University of Southern California Los Angeles United States, 2000. [10] S. Gu, T. Lillicrap, Z. Ghahramani, R. E. Turner, and S. Levine. Q-prop: Sample-efficient policy gradient with an off-policy critic. In Proceedings of the 5th International Conference on Learning Representations, 2017. [11] J. K. Gupta, M. Egorov, and M. Kochenderfer. Cooperative multiagent control using deep reinforcement learning. In Proceedings of the Adaptive and Learning Agents Workshop, 2017. [12] N. R. Hoff, A. Sagoff, R. J. Wood, and R. Nagpal. Two foraging algorithms for robot swarms using only local communication. In Proceedings of the IEEE International Conference on Robotics and Biomimetics, pages 123–130, 2010. [13] C. Kube and E. Bonabeau. Cooperative transport by ants and robots. Robotics and Autonomous Systems, 30(1):85 – 101, 2000. [14] T. P. Lillicrap, J. J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra. Continuous control with deep reinforcement learning. arXiv:1509.02971, 2015. [15] R. Lowe, Y. Wu, A. Tamar, J. Harb, P. Abbeel, and I. Mordatch. Multiagent actor-critic for mixed cooperative-competitive environments. arXiv:1706.02275, 2017. [16] A. Martinoli, K. Easton, and W. Agassounon. Modeling swarm robotic systems: a case study in collaborative distributed manipulation. The International Journal of Robotics Research, 23(4-5):415–436, 2004. [17] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. [18] C. Moeslinger, T. Schmickl, and K. Crailsheim. Emergent flocking with low-end swarm robots, pages 424–431. 2010. [19] S. Nouyan, R. Gross, M. Bonani, F. Mondada, and M. Dorigo. Teamwork in self-organized robot colonies. IEEE Transactions on Evolutionary Computation, 13(4):695–711, 2009. [20] F. A. Oliehoek. Decentralized POMDPs, pages 471–503. Springer Berlin Heidelberg, 2012. [21] J. Schulman, S. Levine, P. Moritz, M. Jordan, and P. Abbeel. Trust region policy optimization. In Proceedings of the 32nd International Conference on Machine Learning, pages 1889–1897, 2015. [22] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov. Proximal policy optimization algorithms. arXiv:1707.06347, 2017. [23] Y. W. Teh, V. Bapst, W. M. Czarnecki, J. Quan, J. Kirkpatrick, R. Hadsell, N. Heess, and R. Pascanu. Distral: robust multitask reinforcement learning. arXiv:1707.04175, 2017. [24] U. Witkowski, M. A. M. El Habbal, S. Herbrechtsmeier, A. Tanoto, J. Penders, L. Alboul, and V. Gazi. Ad-hoc network communication infrastructure for multi-robot systems in disaster scenarios. In Proceedings of the IARP/EURON Workshop on Robotics for Risky Interventions and Environmental Surveillance, 2008.
2cs.AI
TRUTH VALIDATION WITH EVIDENCE Papis Wongchaisuwat and Diego Klabjan Department of Industrial Engineering and Management Sciences, Northwestern University, Evanston, IL Abstract In the modern era, abundant information is easily accessible from various sources, however only a few of these sources are reliable as they mostly contain unverified contents. We develop a system to validate the truthfulness of a given statement together with underlying evidence. The proposed system provides supporting evidence when the statement is tagged as false. Our work relies on an inference method on a knowledge graph (KG) to identify the truthfulness of statements. In order to extract the evidence of falseness, the proposed algorithm takes into account combined knowledge from KG and ontologies. The system shows very good results as it provides valid and concise evidence. The quality of KG plays a role in the performance of the inference method which explicitly affects the performance of our evidence-extracting algorithm. 1.INTRODUCTION Accessing information online is expanding tremendously in various domains as reported in a study by the Pew Internet Project’s research (Anderson and Perrin, 2016). According to the study, offline 1 population in the U.S. has declined significantly since 2000 to the extent that in 2016 only 13% of U.S. adults did not use the internet. Internet usage gives people an opportunity to extensively seek information online; however, posted contents available on web pages are not necessarily reliable. As online information spreads rapidly, its quality is considerably crucial. Misinformation potentially leads to serious consequences significantly affecting internet users. The main motivation of our study is to validate the truthfulness of textual information obtained from various sources as well as to provide supporting evidence. Humans can identify the truthfulness of a statement particularly for common fact cases. Nevertheless, manually inspecting statements is a time-consuming process that becomes impossible for large-scale data. Determining the truthfulness of each statement in an automated fashion is a promising alternative solution. This problem is highly challenging due to the lack of an encompassing and comprehensive corpora of all true statements. Despite of its challenges, it draws a lot of attention from prior studies to develop truthfulness-validating systems. The previously proposed systems mainly rely on web search engines to verify whether statements are true or false. Additional information regarding sources which statements are extracted from is also taken into account in most algorithms. In comparison to these truthfulness-validating systems, our work relies on knowledge from reliable sources rather than web search engines. Statements gathered from reliable sources have various length and may be verbose and thus we represent each of these statements as triplets consisting of a subject entity, an object entity, and their relation. These triplets capture the main contents embedded within statements. A Knowledge Graph (KG) is then constructed from these triplets where nodes are entities and arcs represent the relationships between nodes. In our algorithm, a relation extraction method is used to extract triplets from the statement we aim to 2 verify the truthfulness of. We call this statement and its corresponding triplets as “a lay statement” and “lay triplets.” The truthfulness of each lay triplet is verified based on an inference method corresponding to KG constructed from reliable sources. After identifying the truthfulness of lay triplets, our algorithm additionally provides supporting evidence. Determining evidence for true triplets is relatively straightforward compared to identifying the evidence of falseness. Considering a true triplet, a supporting evidence is a set of paths between the subject and object entities inferred from KG associated with reliable sources. On the other hand, it is unclear how to obtain evidence for false triplets. Reasonable evidence for each false triplet should be a collection of relevant triplets extracted from KG under a specific condition. We explain our key idea with an example. Consider the false triplet (“property”, “has_a”, “space rocket”). We find in KG all triplets (“property”, “has_a”, 𝑜̅ ). In this case, a set of all possible candidates 𝑜̅ denoted as 𝑂̅ can be {“bedroom,” “kitchen,” “bathroom,” “roof,” “garden,” “shed,” “swimming pool”}. A long proof of evidence can be this candidate evidence set and the fact that “space rocket” ∉ 𝑂̅. The drawback here is that the size of 𝑂̅ can be very large. Summarizing the candidate collection into a concise but meaningful evidence set is challenging especially when the size of the collection is large. In order to overcome this difficulty, we develop a novel algorithm to extract supporting evidence from concepts in ontologies. For any false triplet, we rely on the idea of representing each candidate with its broader concepts in ontologies given that the false triplet concept is not part of these broader concepts. Considering our example, an ontology could provide us with the fact that the first four terms in 𝑂̅ are related to “house” and the remaining terms correspond to “backyard.” Finally, as an evidence we provide (“property”, “has_a”, “house”) and (“property”, 3 “has_a”, “backyard”) and the facts “space rocket” is not “house,” “space rocket” is not “backyard.” Given the false triplet and its candidates, matching concepts in ontologies are considered. Then, we gather a set of potential evidence which includes candidate concepts and their broader concepts (satisfying some conditions). Evidence of various levels of granularity is constructed by a graph based algorithm on the subsumption tree of the ontology. We select an optimal collection of evidence from the potential evidence set. The optimized set of evidence is the smallest subcollection of the potential evidence set under the assumption that all candidates 𝑜̅ have to be covered by themselves or their broader concepts which leads to a set covering problem. In the rest of the paper, we consider the following running example. Given a false triplet (“Google”, “OfficeLocationInUS”, “Minneapolis”), we generate the evidence of falseness based on its relevant triplets from KG. The relevant triplets retrieved from KG have the “OfficeLocationInUS” relation associated with the “Google” or “Minneapolis” entity. In particular, we first find locations of Google’s offices such as “Atlanta,” “Chicago,” “Los Angeles,” “Miami,” “Mountain View,” etc. Also, companies whose office is located in Minneapolis such as “Target Corporation,” “U.S. Bancorp,” “Xcel Energy” are considered. These retrieved entities are used as the falseness evidence as we claim that “Minneapolis” is not part of all retrieved locations and similarly “Google” is not part of the set of retrieved companies. We rely on knowledge from ontologies to generate a concise set of evidence. For example, an ontology about geography is used to state that “Google” has offices in many states across U.S. while “Minneapolis” is located in Minnesota which is not one of these states. Our main contribution is to provide supporting evidence for a given lay triplet after its truthfulness has been identified. If the triplet is true, then paths in KG provide evidence, however if false, then it is much more challenging to come up with the concept of evidence. To the best of 4 our knowledge, no prior work provided supporting evidence of any given false lay statement by taking into account KG and ontologies. Our proposed system which combines knowledge from ontologies with predicate triplets from a KG contributes in this space. We specifically focus on selecting a complete set of falseness evidence to be as concise as possible. Also, our system relies mainly on both KG and ontologies which are constructed from reliable sources instead of knowledge from unverified web pages. Our algorithm to provide supporting evidence along with the truthfulness of the lay triplet is applicable in various domains such as politics, sciences, news, and health care. Our work focuses on the health care domain as a case study mainly because of abundant health-related information available online and the importance of information quality. Specifically, a large number of medically related web sites are easily accessible online but only half of these sites have content reviewed by professionals (Gottleb, 2000). In addition, distorted information related to health conditions potentially causes devastating effects. We summarize the literature in Section 2. In Section 3, we describe relevant background information, problem definitions, and thoroughly discuss our main algorithm. Data preparation and results of the algorithm based on our case study are reported in Section 4 while further discussions are provided in Section 5. Conclusion and future work are stated in Section 6. 2.RELATED WORK Our algorithm verifies the truthfulness of any lay statement based on a KG thus we survey prior work in truth discovery-related fields. Substantial work exists in truth discovery for determining 5 the veracity of multi-source data. In particular, the truth discovery problem aims to identify whether assertions claimed by multiple sources are true or false. Reliability of sources is also determined. Waguih and Berti (Waguih and Berti-Equille, 2014) provide an extensive review and an in-depth evaluation of 12 truth discovery algorithms. Additional truth discovery methods are proposed varying in many aspects to jointly estimate source reliability and truth statements (Li et al., 2014; Ma et al., 2015; Meng et al., 2015; Mukherjee et al., 2014; Xiao et al., 2016; Zhao et al., 2014; Zhi et al., 2015). These methods rely on a common assumption that information provided by a reliable source tends to be more trustworthy and the source providing trustworthy information is likely to be more reliable. TruthOrRumor, a web-based truth judgment system, determines the truth based on results from a search engine (Liu et al., 2014). It considers reliability of data sources based on historical records and the copying relationship. Also, it implements currency determination techniques to take into account out-of-date statements. Wang et al. (2013) propose an algorithm to determine the truthfulness of a given statement based on a combination of a support score and credibility ranking value. While the support score measures how a web search result supports the statement, the credibility ranking computes the reliability of web pages. The t-verifier system (Li et al., 2011) requires users to pre-determine specific parts of statements to be verified. These systems take into account additional information of a data set or its source when determining the truthfulness of the statement. Yin and Tan aim to distinguish true from false statements given a small set of ground truth facts (Yin and Tan, 2011). A graph optimization method is used in (Yin and Tan, 2011) where each node in the graph represents a statement and each edge connects a pair of relevant statements. Statements in the set of ground truth facts are labeled as 1. The algorithm assigns a truthfulness 6 score ranging from -1 to 1 to each unlabeled statement. The scores of unlabeled statements not directly related to any labeled statements are possibly close to 0. This implies that the truthfulness of these statements remains undefined. Yamamoto and Tanaka propose a system to determine the credibility of a lay statement and extract aspects necessary to verify the factual validity from web pages (Yamamoto and Tanaka, 2009) whenever the statement is true. In order to estimate validity of a lay statement, the system collects comparative fact candidates using a web search engine. Fact candidates are sentences retrieved from the search engine that match a pattern specified by the lay statement. Then the validity of each candidate is computed based on the relation between the pattern and the entity contained in the candidate. In comparison to the previous work, a focus of our algorithm is to provide concise but reliable supporting evidence in addition to identifying the truthfulness of a lay statement. The algorithm proposed by Yamamoto and Tanaka is similar to our system when the statement is true. In particular, both (Yamamoto and Tanaka, 2009) and our work use comparative candidate facts in order to assess the credibility of any lay statement. Instead of using web search engines, we rely on an inference method with respect to a KG to collect candidate triplets. A truthfulness score for the lay triplet is computed and compared against scores from those candidate triplets in order to determine whether the lay triplet is true or false. None of these works provide evidence of false statements which is the main contribution of our work. 3.METHODOLOGY Content commonly found in textual documents especially online texts can be unreliable. In this study, we aim to identify whether a given lay statement is true or false and provide supporting 7 evidence. We collect lay statements from many web pages publicly available online. We use a relation extraction algorithm (Rindflesch and Fiszman, 2003) to extract triplets consisting of subject entity 𝑠, object entity 𝑜 and their relation 𝑟(𝑠, 𝑜) embedded within lay statements. Our problem is scoped down to identifying the truthfulness of triplets representing the original lay statements. Knowledge obtained from reliable sources is an important factor in determining the trustworthiness of the lay triplets. We assure that the reliable resources are structured in a form of triplets (𝑠, 𝑟, 𝑜) which are used to construct a knowledge graph. Nodes and edges in KG represent entities and their relations, respectively. We write (𝑠, 𝑟, 𝑜) ∈ KG to mean that 𝑠, 𝑜 are nodes in KG and 𝑟 corresponds to an edge between them. An evidence of falseness is obtained based on knowledge from various ontologies in related domains. In order to properly discuss falseness evidence and the main algorithm, we first provide a brief overview of a knowledge base (KB) or ontology and relevant background information. According to terminological knowledge, elementary descriptions are concept names (atomic concepts) and role names (atomic roles). Concept descriptions are built from concept and role names with concept and role constructors. All concept names and concept descriptions are generally considered as concepts. A deeper knowledge of ontologies can be obtained from (Franz et al., 2003). Let KB = (𝒯, 𝒜) be a knowledge base with 𝒯 being a TBox and 𝒜 an ABox as defined in (Franz et al., 2003). An interpretation ℐ = (∆ ℐ ,∙ ℐ ) is a model of KB corresponding to an ontology. We assume that KB is consistent. We assume that for each (𝑠, 𝑟, 𝑜) ∈ KG there are concepts 𝐷, 𝐸 in KB such that 𝑠 = 𝐷 ℐ , 𝑜 = 𝐸 ℐ . We denote 𝑠 = 𝐷 ℐ if and only if 𝐷 = 𝐶(𝑠), where 𝐷 is a concept, i.e., given entity 𝑠 ∈ KG, 𝐶(𝑠) is the corresponding concept. We define special concepts T and ⊥ 8 as top (universal) and bottom (empty) concepts. Concept constructors such as an intersection ⊓, a union ⊔, and a negation ¬ combined with concept names are used to construct other concepts. Let 𝑉𝐶 be the set of all concept names. We also define 𝑎 ⋢ 𝑏 for concepts 𝑎 and 𝑏 if and only if ∃𝑦, 𝑦 ≠ ⊥ where y is a concept such that 𝑦 ⊑ 𝑎 ⊓ ¬𝑏 . A KB classification algorithm computes a partial order ≤ on a set of concept names with respect to the subsumption relationship, that is, 𝐴 ≤ 𝐵 ⟺ 𝐴 ⊑ 𝐵 (𝐴 sub-concept of 𝐵) for concept names 𝐴 and 𝐵. The classification algorithm incrementally constructs a graph representation in a form of a direct acyclic graph, called the subsumption tree, of the partial order induced by KB (Baader et al., 1994). Note that in this paper we use the term “tree” to use the term consistent with past literature. The underlying structure is actually an acyclic graph. Given 𝑋 as a set of concepts, computing the representation of this order is equivalent to identifying the precedence relation ≺ on 𝑋, i.e., 𝑎 ≺ 𝑏 for 𝑎, 𝑏 ∈ 𝑋 if and only if 𝑎 ⊑ 𝑏 and if there exists 𝑧 ∈ 𝑋 such that 𝑎 ⊑ 𝑧 ⊑ 𝑏, then 𝑧 = 𝑎 or 𝑧 = 𝑏. Given the precedence relation ≺𝑖 for 𝑋𝑖 ⊆ 𝑋, the incremental method defined in (Baader et al., 1994) computes ≺𝑖+1 on 𝑋𝑖+1 = 𝑋𝑖 ∪ {c} for some element c ∈ 𝑋 \ 𝑋𝑖 . The method consists of two main parts which are a top and a bottom search. The top and the bottom search identify sets 𝑋𝑖 ↓ 𝑐 = {𝑥 ∈ 𝑋𝑖 | 𝑐 ⊑ 𝑥 and 𝑐 ⋢ 𝑦 for all 𝑦 ≺𝑖 𝑥, 𝑦 ∈ 𝑋𝑖 } and 𝑋𝑖 ↑ 𝑐 = {𝑥 ∈ 𝑋𝑖 | 𝑥 ⊑ 𝑐 and 𝑦 ⋢ 𝑐 for all 𝑥 ≺𝑖 𝑦, 𝑦 ∈ 𝑋𝑖 }. At the 𝑖 𝑡ℎ iteration, arcs corresponding to ≺ between 𝑐 and each element in 𝑋𝑖 ↓ 𝑐 as well as 𝑐 and each element in 𝑋𝑖 ↑ 𝑐 are added. Also, some existing arcs between elements in 𝑋𝑖 ↓ 𝑐 and 𝑋𝑖 ↑ 𝑐 are eliminated. At the end we have 𝑎 ≺ 𝑏 if and only if there is an arc in the constructed subsumption tree. 9 Our proposed system is built as a pipeline involving two main steps. We denote by (𝑠, 𝑟, 𝑜) the lay statement triplet that requires evidence. 1. Determining the truthfulness of the triplets: We rely mainly on the inference method called the Path Ranking Algorithm (PRA) introduced by Lao et. al. (2011) to verify whether each triplet (𝑠̅, 𝑟̅ , 𝑜̅ ) in KG is true or false. The PRA produces 𝑠𝑐𝑜𝑟𝑒𝑃𝑅𝐴 for every pair of nodes. A PRA model is trained at each relation level. Particularly, the PRA model for a relation type 𝑟̅ is trained to retrieve other nodes which potentially have a relation 𝑟̅ (s̅ , ∙) given node 𝑠̅. We retrieve 𝑜̃ related to (s̅ , 𝑟̅ , 𝑜̃) with 𝑠𝑐𝑜𝑟𝑒𝑃𝑅𝐴 (𝑜̃; s̅ ) ≥ 𝜀1. All such object candidates 𝑜̃ are denoted by 𝑂̅ = 𝑜̅ (s̅ ). A subject candidate set 𝑆̅ is extracted in a similar way. The triplet (𝑠, 𝑟, 𝑜) is labeled as “True” if 𝑠𝑐𝑜𝑟𝑒𝑃𝑅𝐴 (s; o) ≥ 𝜀2 or 𝑠𝑐𝑜𝑟𝑒𝑃𝑅𝐴 (o; s) ≥ 𝜀2 , and “False” otherwise. In addition, paths corresponding to high PRA scores are provided as supporting evidences of truthfulness if (𝑠, 𝑟, 𝑜) is true. 2. Extracting the evidence of falseness: We now assume that (𝑠, 𝑟, 𝑜) has been labeled as False in step 1, and either 𝑠 ∉ 𝑆̅ for extracting a subject evidence of falseness or 𝑜 ∉ 𝑂̅ for extracting an object evidence of falseness. Set 𝑂̅ is the set of all objects that verify 𝑠 and 𝑟. If (𝑠, 𝑟, 𝑜) is false, then it has to be the case that 𝑜 ∉ 𝑂̅ as otherwise (𝑠, 𝑟, 𝑜) would be true. Same holds for 𝑆̅. We only discuss in detail the object evidence while the subject evidence is defined similarly. Our validation for false statements do not rely on PRA, i.e. any inference algorithm on KG can be used. We found PRA to work best on our data. We next formally define evidence for false triplets. Recall that 𝑂̅ is the set of all objects 𝑜̅ for which (𝑠, 𝑟, 𝑜̅ ) ∈ KG. It is important that these are all. In essence as a proof of falseness we can provide 𝑂̅ together with the fact o ∉ 𝑂̅ . However, 10 this in many cases would provide a very long evidence since |𝑂̅| is typically large. Instead we want to “aggregate” 𝑂̅ into some smaller set 𝛼 and still claim that o ∉ 𝛼. Wrapping these intuitions in the ontology formalism yields the following definition. Definition 1: An object evidence of falseness is a collection 𝛼 = {𝛼1 , 𝛼2 , … , 𝛼𝑘 } of concept names in KB such that 1) for each 𝑜̅ ∈ 𝑂̅ there exists 𝑖 ∈ {1, … , 𝑘} such that 𝐶(𝑜̅ ) ⊑ 𝛼𝑖 , 2) there exists a concept 𝑦, 𝑦 ≠⊥ such that 𝑦 ⊑ 𝐶(𝑜) ⊓ ¬(∐𝑖 𝛼𝑖 ) for all 𝑖 = 1, … , 𝑘. The second condition can be rewritten as 𝐶(𝑜) ⋢ 𝛼1 ⊔ … ⊔ 𝛼𝑘 which in turn is equivalent to 𝐶(𝑜) ⋢ 𝛼1 and…and 𝐶(𝑜) ⋢ 𝛼𝑘 . In words, the second condition is equivalent to the requirement that 𝐶(𝑜) is not part of any element in the evidence set 𝛼. The collection 𝛼 is considered as an aggregated set of 𝑂̅. We further define “potential evidence” 𝛼𝑖 if there exist object evidence of falseness 𝛼 such that 𝛼𝑖 ∈ 𝛼. From the definition, 𝑂̅ is a set of object candidates having a relation 𝑟(s, 𝑜̅ ) for the given triplet (𝑠, 𝑟, 𝑜). The first requirement in Definition 1 assures that each candidate 𝐶(𝑜̅ ) has to be subsumed by at least one potential evidence 𝛼𝑖 (𝛼 is an aggregation of all elements in 𝑂̅). As an example, letting 𝛼 = 𝑂̅ satisfies the first requirement as each 𝐶(𝑜̅ ) for 𝑜̅ ∈ 𝑂̅ is always subsumed by itself. According to the second requirement, concept 𝐶(𝑜) is not subsumed by any potential evidence 𝛼𝑖 . This ensures that concept 𝐶(𝑜) obtained from the false triplet (𝑠, 𝑟, 𝑜) does not belong to the evidence collection 𝛼 (it mimics o ∉ 𝛼). Among all collections 𝛼 we want to find the smallest one which is formalized later. Referring to the false triplet example (“Google”, “OfficeLocationInUS”, “Minneapolis”), we let 𝑂̅ be all object candidates retrieved from KG which have the relation 11 “OfficeLocationInUS” associated with subject “Google.” Given 𝑂̅ = {“Ann Arbor,” “Atlanta,” “Austin,” “Birmingham,” “Boulder,” “Cambridge,” “Chapel Hill,” “Chicago,” “Irvine,” “Kirkland,” “Los Angeles,” “Miami,” “Mountain View,” “New York,” “Pittsburgh,” “Playa Vista,” “Reston,” “San Bruno,” “San Francisco,” “Seattle,” “Sunnyvale,” “Washington DC”}, selecting 𝛼 = 𝑂̅ satisfies both requirements in Definition 1. The second requirement is satisfied as 𝐶(𝑜) associated with 𝑜 = “Minneapolis” is not subsumed by any element in the evidence collection 𝛼. Moreover, the collection {"West region,” “Northeast region,” “South region,” “Michigan,” “Illinois”} is an example of a smaller evidence set which satisfies both requirements. We propose Algorithm 1 to extract the evidence of falseness as defined in Definition 1. It is based on the subsumption tree (originally defined only for concept names 𝑉𝐶 ) which is expanded with negation concepts 𝑉𝑁𝐶 and specific concepts 𝑉𝐹 . The set 𝑉𝑁𝐶 is formally defined as 𝑉𝑁𝐶 = { ¬𝑣 | 𝑣 ∈ 𝑉𝐶 }. Recall that we define 𝑎 ⋢ 𝑏 for concepts 𝑎 and 𝑏 if and only if ∃𝑦, 𝑦 ≠⊥ where y is a concept such that 𝑦 ⊑ 𝑎 ⊓ ¬𝑏 which involves ¬𝑏 and mandates 𝑉𝑁𝐶 . Even though infinitely many concepts can be constructed from concept names and concept constructors, we only focus on specific concepts 𝑉𝐹 which ensure the second requirement in Definition 1. A concept 𝑓 ∈ 𝑉𝐹 corresponds to 𝑓 = 𝑥 ⊓ ¬𝑐 for 𝑐 ∈ 𝑉𝐶 , 𝑥 ∈ 𝑉𝐶 and no proper concept name or concept name negation between ⊥ and 𝑓. Algorithm 1 extracts potential evidence by considering nodes along paths in the tree which satisfy both requirements in Definition 1. In order for Algorithm 1 to check the satisfiability of the requirements, not only 𝑉𝐶 but also both 𝑉𝑁𝐶 and 𝑉𝐹 have to be included in the subsumption tree. Hence, the standard tree consisting of concept names 𝑉𝐶 only has to be expanded. An algorithm to add 𝑉𝑁𝐶 and 𝑉𝐹 to the existing standard tree is provided in Appendix A. The subsumption tree used in Algorithm 1 is of the form 𝒢 = (𝑉𝐶 ∪ 𝑉𝑁𝐶 ∪ 𝑉𝐹 , 𝐴) where 𝒢 is a 12 directed acyclic graph with root T (top concept). We also define paths and nodes associated with the subsumption tree used in Algorithm 1 as follows. Definition 2: 𝑃𝑎𝑡ℎ𝑖𝑗 is a set of all possible paths from node 𝑗 to node 𝑖 in the subsumption tree. For 𝑝𝑎𝑡ℎ 𝑃 ∈ 𝑃𝑎𝑡ℎ𝑖 T we denote by 𝑃𝑚 the 𝑚𝑡ℎ node in 𝑃 starting from T. Let 𝑁𝑜𝑑𝑒𝑖𝑗 be the set of all nodes along all paths in 𝑃𝑎𝑡ℎ𝑖𝑗 . Algorithm 1 (𝑜, 𝑂̅) with 𝒢 = (𝑉𝐶 ∪ 𝑉𝑁𝐶 ∪ 𝑉𝐹 , 𝐴): 1 Set 𝑠𝑢𝑝𝐶(𝑜) = ∅ 2 For each 𝑜̅ ∈ 𝑂̅: 3 Set 𝑠𝑢𝑝𝐶(𝑜̅ ) = ∅ 4 For each 𝑝𝑎𝑡ℎ 𝑃 ∈ 𝑃𝑎𝑡ℎ𝐶(𝑜̅) T : 5 6 For 𝑚 = 𝑙𝑒𝑛𝑔𝑡ℎ(𝑃) to 1: If 𝑃𝑚 ∈ 𝑉𝐶 : 7 Ω𝑚,𝑃 = {𝑦 ∈ 𝑉𝐶 ∪ 𝑉𝑁𝐶 | 𝑦 ∈ 𝑁𝑜𝑑𝑒⊥𝐶(𝑜) ∩ 𝑁𝑜𝑑𝑒⊥¬𝑃𝑚 , 𝑦 ≠⊥} 8 If Ω𝑚,𝑃 ≠ ∅: Add 𝑃𝑚 to 𝑠𝑢𝑝𝐶(𝑜̅) 9 10 Else: 11 12 Break 𝑠𝑢𝑝𝐶(𝑜) = 𝑠𝑢𝑝𝐶(𝑜) ∪ 𝑠𝑢𝑝𝐶(𝑜̅) 13 Remove duplicate nodes in 𝑠𝑢𝑝𝐶(𝑜) 14 Return 𝛼 = SetCover (𝑠𝑢𝑝𝐶(𝑜) ) In Algorithm1, we assume that ∃𝑦 ∈ 𝑉𝐶 ∪ 𝑉𝑁𝐶 , 𝑦 ≠⊥ such that 𝑦 ⊑ 𝐶(𝑜) ⊓ ¬𝐶(𝑜̅ ) for all 𝑜̅ ∈ 𝑂̅ and 𝑜 in KB. This assumption implies that 𝐶(𝑜) cannot be part of 𝐶(𝑜̅ ) for an element in 13 𝑂̅. If 𝐶(𝑜) ⊑ 𝐶(𝑜̅ ) for an 𝑜̅ ∈ 𝑂̅, then the statement is true. It assures that 𝑠𝑢𝑝𝐶(𝑜̅) incremented in step 9 for each 𝑜̅ ∈ 𝑂̅ is not empty. Algorithm 1 repeats steps 3-11 to compute potential evidence 𝛼i ′𝑠 for each 𝑜̅ ∈ 𝑂̅ and stores them in 𝑠𝑢𝑝𝐶(𝑜) . All 𝑠𝑢𝑝𝐶(𝑜̅) ′𝑠 are combined in 𝑠𝑢𝑝𝐶(o) according to step 12. The set 𝑠𝑢𝑝𝐶(o) is equivalent to the set of all potential evidences. Note that for every 𝑎 ∈ 𝑠𝑢𝑝𝐶(𝑜) there is 𝑜̅ such that 𝑃 ∈ 𝑃𝑎𝑡ℎ𝐶(𝑜̅) T contains 𝑎 due to steps 2-12. Algorithm 1 is specifically constructed to ensure that every element in 𝑠𝑢𝑝𝐶(o) is one of nodes along at least one path from 𝐶(𝑜̅ ) to the root. This implies that elements in 𝑠𝑢𝑝𝐶(o) can be considered as broader concepts of candidate evidence 𝑜̅ ∈ 𝑂̅. The first requirement in Definition 1 requires that any 𝑜̅ ∈ 𝑂̅ has at least one corresponding 𝛼i that subsumes 𝐶(𝑜̅ ). Hence, the algorithm considers nodes along all possible paths from 𝐶(𝑜̅ ) to the root (top concept T) for every 𝑜̅ ∈ 𝑂̅ in order to extract potential evidence 𝛼i . The second requirement in Definition 1 is directly associated with Ω computed and verified in steps 7 and 8. Both 𝑉𝑁𝐶 and 𝑉𝐹 in the subsumption tree used in Algorithm 1 are necessary to compute Ω, i.e., 𝑉𝑁𝐶 and 𝑉𝐹 guarantee that 𝑦 ∈ 𝑉𝐶 ∪ 𝑉𝑁𝐶 ∪ 𝑉𝐹 . Particularly, Ω𝑚,𝑃 ≠ ∅ implies that 𝐶(𝑜) ⋢ 𝑃m ; therefore, 𝑃m in this case can be considered as potential evidence 𝛼i . Algorithm 1 then computes Ω𝑚,𝑃 for each node 𝑃𝑚 ∈ 𝑉𝐶 in path 𝑃 ∈ 𝑃𝑎𝑡ℎ𝐶(𝑜̅)T corresponding to each 𝑜̅ ∈ 𝑂̅. If Ω𝑚,𝑃 is not empty, 𝑃𝑚 (considered as potential evidence 𝛼i ) is added to 𝑠𝑢𝑝𝐶(𝑜̅) in step 9. Elements in 𝑠𝑢𝑝𝐶(𝑜̅) correspond to nodes in 𝑉𝐶 and thus to concept names. They also correspond to potential evidence 𝛼i ′𝑠. Each Ω𝑚,𝑃 computed in Algorithm 1 considers concept names and negation of concept names but Definition 1 considers any concept. Algorithm 1 consequently provides an approximate evidence set while an exact algorithm is discussed later. 14 Figure 1 illustrates Algorithm 1. The path from 𝐶(𝑜) to the root T is highlighted in blue. Nodes along red paths are collected as potential evidence 𝛼i ′𝑠 as 𝐶(𝑜) is not subsumed by these nodes (Ω corresponding to these nodes are not empty). Figure 1: Illustration of Algorithm 1 Regarding the run time analysis, the proposed algorithm consists of nested loops in steps 2, 4 and 5. Let 𝑁 be the number of nodes in 𝒢 and 𝑀 the maximum number of paths between any node and the root T. The most outer loop in step 2 considers each element 𝑜̅ ∈ 𝑂̅ which is O(𝑁) while the middle loop in step 4 processes each path 𝑃 ∈ 𝑃𝑎𝑡ℎ𝐶(𝑜̅) T corresponding to 𝑜̅ in step 2, i.e., O(𝑀). Also, each node along all paths from 𝐶(𝑜̅ ) to the root is considered in the most inner loop in step 5, which is O(𝑁). Computing Ω𝑚,𝑃 for each node 𝑃𝑚 requires O(𝑁 2 ). Hence, the computational complexity of Algorithm 1 is O(𝑁 4 ∙ 𝑀). Algorithm 1 can be sped up by using bisection. The more efficient version is provided in Appendix B. Referring to the running example, we let 𝑜 = “Minneapolis” and consider 𝑜̅ = “Mountain View.” We consider paths from 𝐶(“Mountain View”) to the root as well as all nodes along these 15 paths. Node 𝑃𝑚 = 𝐶(“Mountain View”) is added to 𝑠𝑢𝑝𝐶(𝑜̅) as 𝑁𝑜𝑑𝑒⊥𝐶("Minneapolis") ∩ 𝑁𝑜𝑑𝑒⊥¬𝐶("Mountain View") is not empty. Particularly, there exists a node which belongs to both sets, i.e., 𝐶("Minneapolis") ∈ 𝑁𝑜𝑑𝑒⊥𝐶("Minneapolis") and 𝐶("Minneapolis") ∈ 𝑁𝑜𝑑𝑒⊥¬𝐶("Mountain View") . According to a natural geography ontology associated with the example, 𝑠𝑢𝑝𝐶(𝑜̅) = {𝐶(“Mountain View”), 𝐶(“Santa Clara”), 𝐶(“California”), 𝐶(“West region”)} is retrieved. Note that 𝐶(“USA”) is not in 𝑠𝑢𝑝𝐶(𝑜̅) since 𝑁𝑜𝑑𝑒⊥𝐶("Minneapolis") ∩ 𝑁𝑜𝑑𝑒⊥¬𝐶("USA") is empty. Intuitively, “Minneapolis” is a location in “USA” (“Minneapolis” is part of “USA”) and therefore, “USA” cannot be counted as an evidence of falseness. After obtaining the set of all potential 𝛼 across all possible evidences, we aim to compute an optimal set of evidence with the smallest cardinality. We formally define the object evidence of falseness problem 𝐸𝑃 as 𝑍𝐸𝑃 = min 𝛼 object evidence of falseness |𝛼|. A set covering problem is proposed to find an optimal set of evidence. We later give a condition when it solves it optimally. The set covering problem is formulated as follows. SetCover(𝑠𝑢𝑝𝐶(𝑜) ): Universe 𝑈 = {𝑜̅1 , 𝑜̅2 ,…, 𝑜̅ |𝑂̅|} For any node 𝑎 ∈ 𝑠𝑢𝑝𝐶(𝑜) , we define 𝑇𝑎 = {𝑜̅ ∈ 𝑈|𝑎 ∈ 𝑃 where 𝑃 ∈ 𝑃𝑎𝑡ℎ𝐶(𝑜̅) T} The set covering problem 𝑆𝐶 reads 𝑍𝑆𝐶 = min |𝐼| subject to ⋃𝑖∈𝐼 𝑇𝑖 = 𝑈. For any node 𝑎 ∈ 𝑠𝑢𝑝𝐶(𝑜) , we know that 𝑇𝑎 ⊆ 𝑈 which is necessary for the feasibility of 𝑆𝐶. The set covering problem aims to find a minimum number of set 𝑇𝑎 ′𝑠 for 𝑎 ∈ 𝑠𝑢𝑝𝐶(𝑜) so that selected sets contain all elements in the universe 𝑈, i.e. they cover 𝑂̅. A feasible solution to the set covering problem satisfies the first requirement of Definition 1. The set 𝑇𝑎 for each 𝑎 ∈ 𝑠𝑢𝑝𝐶(𝑜) is specifically 16 constructed based on 𝑠𝑢𝑝𝐶(𝑜) . Note that the set 𝑇𝑎 ≠ ∅ because of the fact that for every 𝑎 ∈ 𝑠𝑢𝑝𝐶(𝑜) there is 𝑜̅ such that 𝑃 ∈ 𝑃𝑎𝑡ℎ𝐶(𝑜̅) T contains 𝑎 and the construction of 𝑇𝑎 . All elements in 𝑠𝑢𝑝𝐶(𝑜) added in Algorithm 1 are guaranteed to satisfy the second requirement of Definition 1. According to the false triplet (“Google”, “OfficeLocationInUS”, “Minneapolis”) example, we consider 𝑜 = “Minneapolis” and the set 𝑂̅ given previously. A set of generated 𝑇𝑎 ′𝑠 which yields a feasible solution to the set covering problem is given in Table 1. The left column lists 5 elements from 𝑠𝑢𝑝𝐶(𝑜) . Table 1. An example of feasible 𝑇𝑎 ′𝑠 sets for the set covering problem 𝑇𝐶("West region") “Boulder,” “Irvine,” “Kirkland,” “Los Angeles,” “Mountain View,” “Playa Vista,” “San Bruno,” “San Francisco,” “Seattle,” “Sunnyvale” 𝑇𝐶("Northeast region") “Cambridge,” “New York,” “Pittsburgh” 𝑇𝐶("South region") “Atlanta,” “Austin,” “Chapel Hill,” “Miami,” “Reston,” “Washington DC” 𝑇𝐶("Michigan") “Ann Arbor,” “Birmingham” 𝑇𝐶("Illinois") “Chicago” Propositions 1 and 2 stated next establish the relationship between 𝐸𝑃 and 𝑆𝐶. Proofs of Propositions 1 and 2 are provided in Appendix C. Proposition 1: 𝑆𝐶 is feasible and a feasible solution to 𝑆𝐶 yields a feasible solution to 𝐸𝑃 of same or smaller cardinality. 17 This implies that 𝑍𝑆𝐶 ≥ 𝑍𝐸𝑃 . Due to Proposition 1, a solution to 𝑆𝐶 is always a feasible solution to 𝐸𝑃 and thus an object evidence of falseness obtained from 𝑆𝐶 can be used as a representative of the evidence set from 𝐸𝑃. We consider either concept names or negation of concept names when Ω𝑚,𝑃 is computed in Algorithm 1. An exact algorithm replaces Ω𝑚,𝑃 defined in step 7 of Algorithm 1 with Ω′𝑚,𝑃 = {concept 𝑦 |𝑦 ⊑ 𝐶(𝑜) ⊓ ¬𝑃𝑖 , 𝑦 ≠⊥}. All concepts constructed from concept names and concept constructors are considered in Ω′𝑚,𝑃 . We also observe that checking Ω′𝑚,𝑃 ≠ ∅ is equivalent to checking satisfiability of the concept 𝐶(𝑜) ⊓ ¬𝑃𝑚 , i.e. if 𝐶(𝑜) ⊓ ¬𝑃𝑚 is satisfiable, then Ω′𝑚,𝑃 ≠ ∅ as stated in (Baader, 2003). Proposition 2: If Ω𝑚,𝑃 in step 7 of Algorithm 1 is substituted with Ω′𝑚,𝑃 , then 𝑍𝑆𝐶 = 𝑍𝐸𝑃 . In the proof for Proposition 2, we show that a feasible solution to 𝐸𝑃 is also a feasible solution to 𝑆𝐶 when replacing Ω𝑚,𝑃 with Ω′𝑚,𝑃 . This implies that 𝑍𝐸𝑃 ≥ 𝑍𝑆𝐶 and combined with Proposition 1 it yields 𝑍𝑆𝐶 = 𝑍𝐸𝑃 . We define a subject evidence 𝛽 = {𝛽1 , 𝛽2 , … , 𝛽𝑘 } in the same way. In order to identify the subject evidence of falseness 𝛽, Algorithm 1 is applied where all definitions and propositions are defined similarly with respect to (𝑠̅, 𝑟, o). A domain under consideration can have multiple ontologies. In such a case, we implement the proposed algorithms to identify the evidence of falseness for each ontology. The minimum cardinality of subject/object evidence is selected across all ontologies. Finally, the problem to identify the evidence of falseness for each triplet (𝑠, 𝑟, 𝑜) is 18 formulated min { by min considering ( min both 𝑜𝑛𝑡 ∈ ontologies 𝛼 object evidence in 𝑜𝑛𝑡 subject |𝛼|) , min and object ( min evidence 𝑜𝑛𝑡 𝑜𝑛𝑡 ∈ ontologies 𝛽 subject evidence in o𝑛𝑡 sets |𝛽|) as }. 𝑜𝑛𝑡 4. CASE STUDY We apply the proposed algorithm to the health care domain as a case study. A reliable source in our case is obtained from biomedical publications stored in the MEDLINE database. In order to construct KG, SemRep (Rindflesch and Fiszman, 2003) is used to extract semantic predicate triplets from biomedical texts. SemRep matches subject and object entities in triplets with concepts from the UMLS Metathesaurus and matches relationship with respect to the UMLS Semantic Network. It also takes into account a syntactic analysis, a structured domain knowledge, and hypernymic propositions extensively. The data contains both the extracted triplet and the corresponding sentence from MEDLINE. We first train the PRA model based on KG constructed from SemRep. We further compare its performance with the evaluation metrics reported in (Lao et al., 2011) where PRA has been trained on the NELL data set. The average mean reciprocal rank (MRR) across different relation types reported in (Lao et al., 2011) is 0.516 while the average MRR of PRA on SemRep is 0.25. The MRR is computed based on the rank of the first correctly retrieved triplet; however we aim to correctly retrieve all triplets that are in KG. As a result, we additionally compute the mean average precision (MAP) which considers the rank position of each triplet in KG. The MAP based on our trained PRA model is 0.1. This implies that on average every 10th retrieved result is correct. We then manually inspect the original statements and their corresponding predicate triplets extracted from SemRep. Even though a preliminary evaluation of SemRep reported in (Rindflesch and 19 Fiszman, 2003) states 83% precision, extracted predicate triplets in KG contain many errors based on our manual observation. Examples of predicate triplets incorrectly extracted from original statements are provided in Appendix D. The issue is that the sentences are clearly correct but the extracted triplets are often wrong. Hence, we pre-process KG by verifying each extracted predicate triplet with the PRA model and additional relation extraction systems. Detailed explanations are provided in the following data preparation section. 4.1 Data Preparation We aim to re-construct KG containing only triplets with high precision. After manually observing results from the trained PRA model, triplets with high PRA scores tend to be more accurate than those with low PRA scores. Hence, PRA is one of models used to verify triplets in KG. We further employ other relation extraction systems to filter out incorrect triplets from the original KG. Ollie (Mausam et al., 2012) is an open information extraction software which aims to extract binary relationships from sentences. According to open information extraction, a schema of relations does not need to be pre-specified. In addition, we train a recurrent neural network model called LSTMER proposed by Miwa and Bansal (Miwa and Bansal, 2016) on a publicly available training data set having gold standard labels. Each instance in the training data consists of a statement and its predicate triplet. The training data set used to train the LSTM-ER model includes the ADE corpus (Gurulingappa et al., 2012), SemEval-2010 (Hendrickx et al., 2010), BioNLP (Kim et al., 2011), and the SemRep Gold standard annotation (Kilicoglu et al., 2011). 20 In order to pre-process the original KG, we propose a strategy to combine triplets with high PRA scores and triplets matching with the Ollie or LSTM-ER models. A flow diagram of the proposed strategy in order to construct an adjusted KG is depicted in Figure 2. Figure 2: The flow diagram of the strategy to pre-process KG According to the proposed strategy, we infer the trained PRA model on KG and rank the results from high to low PRA scores. The triplets positioned in the top 10 percent of the ranked PRA scores are retrieved. Additionally, we collect all possible matches between triplets in KG and results from Ollie. We also use the trained LSTM-ER model to infer possible relations from statements associated with triplets in the original KG. Each triplet from KG is collected if its relation matches with the relation inferred from the LSTM-ER model. We conduct a preliminary experiment by extracting matched triplets using Ollie, and the LSTM-ER model based on 10,000 randomly selected triplets. Based on the experiment, we observe a small proportion of matching 21 triplets among different relation extraction models. A detailed discussion of the experiment is provided in Appendix E. Additionally, we observe that many statements in the original KG involve studies with nonhuman subjects such as “Effects of acetylcholine, histamine, and serotonin infusion on venous return in dogs.” In order to filter out these statements, we consider the UMLS semantic type, a categorization of concepts represented in the UMLS Metathesaurus, tagged in the statements. In particular, we eliminate statements which contain “Amphibian,” “Animal,” “Bird,” “Fish,” “Mammal,” “Reptile,” and “Vertebrate” semantic types. We provide the number of nodes and edges in the original KG and in the adjusted KG in Table 2. The average MRR and the average MAP based on the PRA model on the adjusted KG are 0.44 and 0.29, respectively Table 2: Number of nodes and edges in the original KG and the adjusted KG The original KG The adjusted KG Number of nodes 229,063 161,930 Number of edges 15,700,435 4,107,296 4.2 Results We run the whole pipeline of Algorithm 1 to validate the truthfulness and provide supporting evidence of lay triplets with the adjusted KG. Based on 2,084 lay triplets consisting of 20 relation types collected from health-related web pages, we identify the truthfulness of each triplet and extract evidence candidates as summarized in Appendix F. Across all relation types, there are 501 false triplets which account for 24 percent of all lay triplets. 22 Instead of directly specifying thresholds 𝜀1 and 𝜀2 in step 1 of the process, we identify the rank threshold 𝑟𝑎𝑛𝑘𝜀1 and 𝑟𝑎𝑛𝑘𝜀2 based on the ordered PRA scores. To identify 𝑟𝑎𝑛𝑘𝜀1 corresponding to subject entity 𝑠 and relation type 𝑟, we retrieve a set of all object entities which have relation 𝑟(s,∙) identified by the PRA model. This set is denoted as 𝑂𝑎𝑙𝑙 . The set 𝑂𝐾𝐺 = {𝑜̃ |(𝑠, 𝑟, 𝑜̃) ∈ 𝐾𝐺} is |𝑂 also retrieved. | 𝐾𝐺 𝟏|𝑂𝐾𝐺 |>0 𝑚𝑒𝑑𝑖𝑎𝑛(𝑃𝑅𝐴 𝑠𝑐𝑜𝑟𝑒𝑠 𝑜𝑓 𝑂 𝑟𝑎𝑛𝑘𝜀1 𝐾𝐺 ) A parameter 𝑥 which is defined as 𝑥= is used to specify the rank threshold 𝑟𝑎𝑛𝑘𝜀1 as follows: 5 10 ={ 15 20 if 𝑥 ≤ 0.25 |𝑂𝑎𝑙𝑙 | if 0.25 < 𝑥 ≤ 0.5 } + 5 − 10000 . if 0.5 < 𝑥 ≤ 0.75 if 𝑥 > 0.75 The parameter 𝑥 captures how well the PRA model gives high ranks to triplets in KG. The higher the value of 𝑥 is, the better the PRA model performs. This implies that 𝑟𝑎𝑛𝑘𝜀1 should vary proportionally to 𝑥. The middle term is a hyper parameter calibrated in the experiment in order to obtain the best performance. The last term in the 𝑟𝑎𝑛𝑘𝜀1 formula takes into account how |𝑂𝑎𝑙𝑙 | affects 𝑟𝑎𝑛𝑘𝜀1 . Having high |𝑂𝑎𝑙𝑙 | indicates that many object entities are predicted to have 𝑟(s,∙) with respect to subject s. Therefore, it is more challenging for the PRA model to correctly rank retrieved object entities. This implies that high |𝑂𝑎𝑙𝑙 | leads to low value of the threshold 𝑟𝑎𝑛𝑘𝜀1 as expressed in the formula. We extract entity 𝑜̅ whose rank based on PRA score is higher than 𝑟𝑎𝑛𝑘𝜀1 as candidates in 𝑂̅. Moreover, we specify 𝑟𝑎𝑛𝑘𝜀2 as max( 𝑟𝑎𝑛𝑘𝜀1 , 0.005 ∗ 𝑂𝑎𝑙𝑙 ) to identify the truthfulness of (𝑠, 𝑟, 𝑜). If the rank of 𝑠𝑐𝑜𝑟𝑒𝑃𝑅𝐴 (o; s) is higher than 𝑟𝑎𝑛𝑘𝜀2 , we specify (𝑠, 𝑟, 𝑜) as true. Among 501 false lay triplets, we first eliminate triplets whose object 𝑜 does not match with concepts in ontologies. Candidates are then used to compute the evidence set based on the remaining 395 triplets by using Algorithm 1. We only perform evaluations on object candidates 23 while subject candidates can be done similarly. The average cardinality of object candidates ̅| and the average cardinality of their corresponding evidence sets |𝛼| across all relation types |𝑂 are 11.65 and 2.24, respectively. A histogram of the produced object evidence |𝛼| of all relation ̅ is provided in Figure 3. types based on candidates 𝑂 |α| distribution 300 Frequency 250 200 150 100 50 0 0 1 2 3 4 5 6 7 8 9 10 16 |α| Figure 3: A histogram of object evidence |𝛼| In order to evaluate the performance of the proposed algorithm, we choose 3 relation types representing high, medium and low MAP computed from the PRA model which are “TREATS,” “DIAGNOSES,” and “CAUSES,” respectively. For each relation type, we select 5 cases to compare the evidence sets resulting from the algorithm (denoted as “Al”) against the evidence sets constructed manually (denoted as “Ma”) as illustrated in Table 3. A complete comparison of elements in evidence sets “Al” and “Ma” is provided in Appendix G. 24 Table 3: Evidence sets obtained from the algorithm and the evidence sets constructed manually |Al| |Ma| |Al ∩ Ma| |Al\Ma| |Ma\Al| Heparin TREATS Fever 1 1 1 0 0 Amiodarone TREATS Hepatitis C 1 1 1 0 0 Stress management TREATS Mitral 1 1 1 0 0 Capoten TREATS Coughing 1 1 1 0 0 Losartan TREATS Varicose Ulcer 3 2 1 2 1 1.4 1.2 1.0 0.4 0.2 1 1 1 0 0 Platelet Size DIAGNOSES Anemia 1 2 1 0 1 Esophageal pH Monitoring 5 3 3 2 0 5 2 2 3 0 1 1 1 0 0 2.6 1.8 1.6 1.0 0.2 Caffeine CAUSES Gout 1 3 1 0 2 hypercholesterolemia CAUSES 2 2 2 0 0 Leukemia CAUSES Gout 2 2 2 0 0 Harpin CAUSES Cardiomegaly 2 1 1 1 0 False triplets Relation type: TREATS Valve Prolapse Average of TREATS Relation type: DIAGNOSES Echocardiography DIAGNOSES Hyperlipidemia DIAGNOSES Malignant breast neoplasm Cholesterol measurement test DIANOSES Malignant breast neoplasm Electrocardiogram DIAGNOSES Muscle strain Average of DIAGNOSES Relation type: CAUSES Neuropathy 25 Ascorbic Acid CAUSES Senile 2 2 1 1 1 Average of CAUSES 1.8 2.0 1.4 0.4 0.6 Average across 3 relation types 1.9 1.7 1.3 0.6 0.3 Plaques 5.CONCLUSIONS AND FUTURE WORK In this work, we develop a system to validate the truthfulness of lay triplets and provide supporting evidence. Our system employs the PRA algorithm inferred on KG re-constructed from reliable sources to identify whether a lay triplet is true or false. In our experiment, we train the PRA model based on KG constructed from biomedical literature. The original KG contains incorrect triplets due to the relation extraction process. We attempt to re-construct KG consisting of more accurate triplets by verifying each triplet in the original KG with additional relation extraction algorithms. The trained PRA model on the adjusted KG yields 0.44 MRR and 0.29 MAP averaged across all relation types. The performance of the PRA model based on the adjusted KG is improved. However, the adjusted KG still contains errors due to the challenge of complicated biomedical text and limited resources in training additional relation extraction algorithms. We use a combination of knowledge from ontologies and triplets in the adjusted KG to extract a concise supporting evidence set. Specifically, Algorithm 1 aims to find the supporting evidence set which does not overlap with an entity in a lay triplet. The evidence set is aggregated from candidates obtained from triplets in the adjust KG by using knowledge of ontologies. We apply Algorithm 1 to extract evidence sets based on each ontology and repeatedly consider all possible ontologies. It is reasonable to select the ontology which yields the minimum cardinality of evidence sets. According to our algorithm, we first match object (subject) entity in a lay triplet 26 with concepts within all ontologies. Non-matching ontologies are not taken into a consideration when object (subject) candidates are paired with concepts in ontologies. We assume that candidates that cannot be matched with concepts in the same ontology as the lay triplet’s are disregarded. ̅| extracted from the PRA model and compare it We consider the number of candidates |𝑂 ̅| is against the cardinality of the evidence set |𝛼| resulted from the algorithm. The average of |𝑂 larger than the average of |𝛼| by a factor of 5 across all relation types. This implies that our proposed algorithm provides valid and concise evidence sets. To evaluate the performance of our algorithm, we compare the evidence set extracted from our proposed algorithm with a manuallyconstructed evidence set. The average number of overlap between the evidence set from the algorithm and the manually constructed set is 74% across the 3 relation types. Our proposed algorithm performs very well especially with some specific relation types such as “TREATS” with the overlap of 87%. The problem is challenging due to limited resources to construct a complete and accurate KG. An imperfect KG plays a significant role in the inferior performance of the PRA model which directly impacts the performance of Algorithm 1 to extract evidence sets. A better quality of KG would lead to a higher performance of the proposed system. Hence, future work should focus on improving relation extraction algorithms to construct KG. We believe that this is of utmost importance, not just for our work, but all systems that rely on SemRep. 27 REFERENCES Anderson M. and Perrin A. 2016. 13% of Americans don't use the internet. Who are they? Retrieved from http://pewrsr.ch/2caqLi3 website Baader F. 2003. The description logic handbook: Theory, implementation and applications. Cambridge University press, Cambridge, UK. Baader F., Hollunder B., Nebel B., Profitlich H.-J., and Franconi E. 1994. An empirical analysis of optimization techniques for terminological representation systems. Applied Intelligence, 4(2): 109-132. https://doi.org/10.1007/bf00872105 Franz B., Diego C., Deborah L. M., Daniele N., and Peter F. 2003. The description logic handbook: theory, implementation, and applications. Cambridge University Press, Cambridge, UK Gottleb S. 2000. Health information on internet is often unreliable. British Medical Journal, 321(7254): 136. Gurulingappa H., Rajput A. M., Roberts A., Fluck J., Hofmann-Apitius M., and Toldo L. 2012. Development of a benchmark corpus to support the automatic extraction of drug-related adverse effects from medical case reports. Journal of Biomedical Informatics, 45(5): 885892. https://doi.org/10.1016/j.jbi.2012.04.008 Hendrickx I., Kim S. N., Kozareva Z., Nakov P., Seaghdha D., Pado S., Pennacchiotti M., Romano L, and Szpakowicz, S. 2010. SemEval-2010 task 8: Multi-way classification of semantic relations between pairs of nominals. In Proceedings of the 5th International Workshop on Semantic Evaluation. Association for Computational Linguistics, pages 3338. 28 Kilicoglu H., Rosemblat G., Fiszman M., and Rindflesch T. C. 2011. Constructing a semantic predication gold standard from the biomedical literature. BMC Bioinformatics, 12(1): 486. https://doi.org/10.1186/1471-2105-12-486 Kim J., Pyysalo S., Ohta T., Bossy R., Nguyen N., and Tsujii J. i. 2011. Overview of BioNLP shared task 2011. In Proceedings of the BioNLP Shared Task 2011 Workshop. Association for Computational Linguistics, pages 1-6. Lao N., Mitchell T., and Cohen W. W. 2011. Random walk inference and learning in a large scale knowledge base. In Proceedings of the Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, pages 529539. Li Q., Li Y., Gao J., Su L., Zhao B., Demirbas M., Fan W., and Han J. 2014. A confidence-aware approach for truth discovery on long-tail data. Proceedings Very Large Data Base Endowment, 8(4): 425-436. https://doi.org/10.14778/2735496.2735505 Li X., Meng W., and Yu C. 2011. T-verifier: Verifying truthfulness of fact statements. In Proceedings of the 2011 IEEE 27th International Conference on Data Engineering, Institute of Electrical and Electronics Engineers, pages 63-74. Liu G., Wang H., Chen C., and Gao H. 2014. TruthOrRumor: Truth judgment from web. In Proceedings of Web Technologies and Applications: 16th Asia-Pacific Web Conference, APWeb 2014. Springer International Publishing, pages 674-678. Ma F., Li Y., Li Q., Qiu M., Gao J., Zhi S., Su L., Zhao B., Ji H., and Han J. 2015. FaitCrowd: Fine grained truth discovery for crowdsourced data aggregation. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. Association for Commputing Machinery, pages 745-754. 29 Mausam Schmitz M., Bart R., Soderland S., and Etzioni O. 2012. Open language learning for information extraction. In Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning. Association for Computational Linguistics, pages 523-534. Meng C., Jiang W., Li Y., Gao J., Su L., Ding H., and Cheng Y. 2015. Truth discovery on crowd sensing of correlated entities. In Proceedings of the 13th ACM Conference on Embedded Networked Sensor Systems. Association for Commputing Machinery, pages 169-182. Miwa M., and Bansal M. 2016. End-to-end relation extraction using lstms on sequences and tree structures. arXiv preprint arXiv:1601.00770. Mukherjee S., Weikum G., and Danescu-Niculescu-Mizil C. 2014. People on drugs: Credibility of user statements in health communities. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining. Association for Commputing Machinery, pages 65-74. Rindflesch T. C., and Fiszman M. 2003. The interaction of domain knowledge and linguistic structure in natural language processing: Interpreting hypernymic propositions in biomedical text. Journal of Biomedical Informatics, 36(6): 462-477. https://doi.org/10.1016/j.jbi.2003.11.003 Waguih D. A., and Berti-Equille L. 2014. Truth discovery algorithms: An experimental evaluation. arXiv preprint arXiv:1409.6428. Wang T., Zhu Q., and Wang S. 2013. Multi-verifier: A novel method for fact statement verification. In Proceedings of the Web Technologies and Applications: 15th Asia-Pacific Web Conference, APWeb 2013. Springer Berlin Heidelberg, pages 526-537. 30 Xiao H., Gao J., Li Q., Ma F., Su L., Feng Y., and Zhang A. 2016. Towards confidence in the truth: A bootstrapping based truth discovery approach. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. Association for Commputing Machinery, pages 1935-1944. Yamamoto Y., and Tanaka K. 2009. Finding comparative facts and aspects for Judging the credibility of uncertain facts. In Proceedings of the Web Information Systems Engineering - WISE 2009: 10th International Conference. Springer Berlin Heidelberg, pages. 291-305. Yin X., and Tan W. 2011. Semi-supervised truth discovery. In Proceedings of the 20th international conference on world wide web. Association for Commputing Machinery, pages 217-226. Zhao Z., Cheng J., and Ng W. 2014. Truth discovery in data streams: A single-pass probabilistic approach. In Proceedings of the 23rd ACM International Conference on Conference on Information and Knowledge Management. Association for Commputing Machinery, pages 1589-1598. Zhi S., Zhao B., Tong W., Gao J., Yu D., Ji H., and Han J. 2015. Modeling truth existence in truth discovery. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. Association for Commputing Machinery, pages 1543-1552. 31 Appendix A Algorithm A1 presented next adds negation nodes 𝑉𝑁𝐶 to the existing subsumption tree by implementing the incremental methods defined in (Baader et al., 1994). An augmented tree is of the form 𝒢 = (𝑉𝐶 ∪ 𝑉𝑁𝐶 ∪ 𝑉𝐹 , 𝐴) where nodes 𝑣 ∈ 𝑉𝐶 are concept names, nodes 𝑣 ∈ 𝑉𝑁𝐶 are negation concepts of concept names and nodes 𝑣 ∈ 𝑉𝐹 are specific concepts which ensure the second requirement in Definition 1. Arc (𝑏, 𝑎) ∈ 𝐴 between node 𝑎 and 𝑏 has the following properties. 1. 𝑎 ∈ 𝑉𝐶 ∪ 𝑉𝑁𝐶 and 𝑏 ∈ 𝑉𝐶 ∪ 𝑉𝑁𝐶 => 𝑎 ≺ 𝑏, i.e. 𝑎 ≤ 𝑏 and if there exists 𝑧 ∈ 𝑉𝐶 ∪ 𝑉𝑁𝐶 such that 𝑎 ≤ 𝑧 ≤ 𝑏, then 𝑧 = 𝑎 or 𝑧 = 𝑏 2. 𝑎 ∈ 𝑉𝐹 and 𝑏 ∈ 𝑉𝐶 ∪ 𝑉𝑁𝐶 => 𝑎 ≤ 𝑏 Concept names and concept constructors are combined in order to construct concepts. This consequently yields a significant number of concepts. Nodes in 𝑉𝐹 may have ≤ relation with many concepts which are not added to the subsumption tree. Note that we only add necessary concepts required for Algorithm 1. Therefore, the first property only takes 𝑉𝐶 ∪ 𝑉𝑁𝐶 into a consideration, i.e., we are not able to assume ≺ relation between nodes in 𝑉𝐶 ∪ 𝑉𝑁𝐶 and nodes in 𝑉𝐹 . Algorithm A1 to generate 𝒢 = (𝑉𝐶 ∪ 𝑉𝑁𝐶 ∪ 𝑉𝐹 , 𝐴): 1 Initially set 𝑋 = 𝑉𝐶 2 For each concept name 𝑣 ∈ 𝑉𝐶 : 3 create node 𝑐 = ¬𝑣 4 compute set 𝑋 ↓ 𝑐 = {𝑥 ∈ 𝑋| 𝑐 ≤ 𝑥 and 𝑐 ≰ 𝑦 for all 𝑦 ≺ 𝑥, 𝑦 ∈ 𝑋} 5 compute set 𝑋 ↑ 𝑐 = {𝑥 ∈ 𝑋| 𝑥 ≤ 𝑐 and 𝑦 ≰ 𝑐 for all 𝑥 ≺ 𝑦, 𝑦 ∈ 𝑋} 32 6 add arcs between 𝑐 and each element of 𝑋 ↓ 𝑐, and between 𝑐 and each element of 𝑋 ↑ 𝑐 7 remove all arcs between elements of 𝑋 ↑ 𝑐 and 𝑋 ↓ 𝑐 8 compute set 𝑋 𝑉𝐶 ∥ 𝑐 = {𝑥 ∈ 𝑋, 𝒙 ∈ 𝑉𝐶 | ⊥ ≤ 𝑐 ⊓ 𝑥 } 9 For each element 𝑑 ∈ 𝑋 𝑉𝐶 ∥ 𝑐 ∶ 10 create artificial node 𝑎𝑑 = 𝑐 ⊓ 𝑑 and add an arc (𝑎𝑑 , ⊥) connecting ⊥ to 𝑎𝑑 11 add an arc (𝑑, 𝑎𝑑 ) connecting 𝑎𝑑 to 𝑑 and (𝑐, 𝑎𝑑 ) connecting 𝑎𝑑 to 𝑐 𝑋 = 𝑋 ⋃ {𝑐} 12 To extract the evidence set, Algorithm 1 computes Ω′s in order to ensure the second requirement in Definition 1. Any set Ω𝑚,𝑃 depends on an overlap between two set of nodes corresponding to 𝐶(𝑜) and ¬𝑃𝑚 . To verify the overlap of these two sets, both 𝑉𝑁𝐶 and 𝑉𝐹 are necessary. Algorithm A1 adds 𝑉𝑁𝐶 and 𝑉𝐹 to the standard subsumption tree which only includes concept names 𝑉𝐶 . It relies mainly on an incremental method involving the top and bottom search computed in steps 4 and 5. As arcs in the tree only represent the subsumption relationship, steps 8-11 further take into account an overlap case which involves nodes in 𝑉𝐹 . Appendix B As a more efficient version of Algorithm 1, we propose Algorithm B1 using a bisection method based on Ω𝑚,𝑃 as of follows. Algorithm B1 (𝑜, 𝑂̅ ) with 𝒢 = (𝑉𝐶 ∪ 𝑉𝑁𝐶 ∪ 𝑉𝐹 , 𝐴): 1 Set 𝑠𝑢𝑝𝐶(𝑜) = ∅ 2 For each 𝑜̅ ∈ 𝑂̅: 3 Set 𝑠𝑢𝑝𝐶(𝑜̅ ) = ∅ 33 4 For each 𝑝𝑎𝑡ℎ 𝑃 ∈ 𝑃𝑎𝑡ℎ𝐶(𝑜̅) T : 𝑙𝑒𝑛𝑔𝑡ℎ(𝑃) ⌋ 2 5 𝑚=⌊ 6 While True: 7 Ω𝑚,𝑃 = {𝑦 ∈ 𝑉𝐶 ∪ 𝑉𝑁𝐶 | 𝑦 ∈ 𝑁𝑜𝑑𝑒⊥𝐶(𝑜) ∩ 𝑁𝑜𝑑𝑒⊥¬𝑃𝑚 , 𝑦 ≠⊥} 8 If Ω𝑚,𝑃 ≠ ∅: 9 Ω𝑚−1,𝑃 = {𝑦 ∈ 𝑉𝐶 ∪ 𝑉𝑁𝐶 | 𝑦 ∈ 𝑁𝑜𝑑𝑒⊥𝐶(𝑜) ∩ 𝑁𝑜𝑑𝑒⊥¬𝑃𝑚−1 , 𝑦 ≠⊥} 10 If Ω𝑚−1,𝑃 = ∅: For 𝑚′ = 𝑚 to 𝑙𝑒𝑛𝑔𝑡ℎ(𝑃): 11 Add 𝑃𝑚′ to 𝑠𝑢𝑝𝐶(𝑜̅) 12 13 Break 14 Else: 𝑚 𝑚=⌊ ⌋ 2 15 Else: 16 𝑚 𝑚 = 𝑚+⌊ ⌋ 2 17 18 𝑠𝑢𝑝𝐶(𝑜) = 𝑠𝑢𝑝𝐶(𝑜) ∪ 𝑠𝑢𝑝𝐶(𝑜̅) 19 Remove duplicate nodes in 𝑠𝑢𝑝𝐶(𝑜) 20 Return 𝛼 = SetCover(𝑠𝑢𝑝𝐶(𝑜) ) Note that as in Algorithm 1 ∀𝑎 ∈ 𝑠𝑢𝑝𝐶(𝑜) there is 𝑜̅ such that 𝑃 ∈ 𝑃𝑎𝑡ℎ𝐶(𝑜̅) T contains 𝑎 due to steps 2-18. For any 𝑜̅𝑖 ∈ 𝑂̅, Algorithm B1 identifies the 𝑚𝑡ℎ position in each path 𝑃 ∈ 𝑃𝑎𝑡ℎ𝐶(𝑜̅𝑖 ) T such that Ω𝑚,𝑃 ≠ ∅ and Ω𝑚−1,𝑃 = ∅ by the bisection search method. We know that 𝑃𝑚 ⊑ 𝑃𝑚−1 ⇔ ¬𝑃𝑚−1 ⊑ ¬𝑃𝑚 for any concepts 𝑃𝑚 and 𝑃𝑚−1 . Hence, Ω𝑚−1,𝑃 ≠ ∅ implies that Ω𝑚,𝑃 ≠ ∅. Step 12 adds all nodes which are subsumed by 𝑃𝑚 to 𝑠𝑢𝑝𝐶(𝑜̅𝑖 ) if conditions in steps 8 and 10 are satisfied 34 As in the run time analysis of Algorithm 1, we let 𝑁 be the number of nodes in 𝒢 and 𝑀 the maximum number of paths between any node and the root T. Similarly to Algorithm 1, the most outer loop in step 2 is O(𝑁) while the middle loop in step 4 is considered as O(𝑀). Algorithm B1 relies on the bisection search which is accounted for O(log 2 𝑁). Computing Ω𝑚,𝑃 for each node 𝑃𝑚 requires O(𝑁 2 ). Therefore, the computational complexity of Algorithm B1 is O(log 2 𝑁 ∙ 𝑁 3 ∙ 𝑀) compared to O(𝑁 4 ∙ 𝑀) corresponding to Algorithm 1. Appendix C Proof of Proposition 1: We first argue that 𝑆𝐶 is feasible. For any path 𝑃 ∈ 𝑃𝑎𝑡ℎ𝐶(𝑜̅𝑖 ) T of 𝑜̅𝑖 ∈ 𝑂̅, 𝑃𝑙𝑒𝑛𝑔𝑡ℎ(𝑃) = 𝐶(𝑜̅𝑖 ) ∈ 𝑉𝐶 . According to the assumption that ∃𝑦 ∈ 𝑉𝐶 ∪ 𝑉𝑁𝐶 , 𝑦 ≠⊥ such that 𝑦 ⊑ 𝐶(𝑜) ⊓ ¬𝐶(𝑜̅ ) for all 𝑜̅ ∈ 𝑂̅ and 𝑜 in KB, there exists node 𝑦 in 𝒢 which yields paths from ¬𝐶(𝑜̅𝑖 ) to 𝑦 and 𝐶(o) to 𝑦 for any 𝑜̅𝑖 ∈ 𝑂̅. This implies that 𝑁𝑜𝑑𝑒⊥𝐶(𝑜) ∩ 𝑁𝑜𝑑𝑒⊥¬𝐶(𝑜̅𝑖 ) ≠ ∅ which corresponds to nonempty Ω 𝑚,𝑃 of 𝐶(𝑜̅𝑖 ) for any 𝑜̅𝑖 ∈ 𝑂̅ and any path 𝑃 for an 𝑚. Hence, 𝑇𝐶(𝑜̅𝑖 ) is a set in 𝑆𝐶 for every 𝑜̅𝑖 ∈ 𝑂̅. This implies that 𝑆𝐶 is feasible. Let 𝑇𝛼1 , 𝑇𝛼2 , … , 𝑇𝛼𝑘 be a feasible solution to 𝑆𝐶. We know that ⋃𝑖 𝑇𝛼𝑖 = 𝑈 and 𝛼𝑖 ∈ 𝑠𝑢𝑝𝐶(𝑜) . For each 𝑜̅𝑖 , there exists 𝑗(𝑖) such that 𝑜̅𝑖 ∈ 𝑇𝛼𝑗(𝑖) . Let 𝛼 = {𝛼𝑗(𝑖) } 𝑛𝑖=1 . We next argue that 𝛼 is an object evidence of falseness. The definition implies that 𝛼𝑗(𝑖) ∈ 𝑃 where 𝑃 ∈ 𝑃𝑎𝑡ℎ𝐶(𝑜̅𝑖 ) T which implies that 𝐶(𝑜̅𝑖 ) ⊑ 𝛼𝑗(𝑖) . The first requirement in Definition 1 is therefore satisfied. 35 We next show the second property in Definition 1. Each 𝛼𝑗(𝑖) ∈ 𝑠𝑢𝑝𝐶(𝑜) which is added in step 9 has to satisfy conditions in steps 6 and 8 according to Algorithm 1. For any path 𝑃 ∈ 𝑃𝑎𝑡ℎ𝐶(𝑜̅𝑖 ) T , Ω 𝛼𝑗(𝑖) ,𝑃 ≠ ∅ implies that ∃𝑦 ∈ 𝑉𝐶 ∪ 𝑉𝑁𝐶 , 𝑦 ≠⊥ such that there is a path from 𝐶(𝑜) to 𝑦 and a path from ¬𝛼𝑗(𝑖) to 𝑦. Hence, ∃𝑦 ∈ 𝑉𝐶 ∪ 𝑉𝑁𝐶 , 𝑦 ≠⊥ such that 𝑦 ⊑ 𝐶(𝑜) and 𝑦 ⊑ ¬𝛼𝑗(𝑖) which is equivalent to 𝐶(𝑜) ⋢ 𝛼𝑗(𝑖) . As 𝐶(𝑜) ⋢ 𝛼𝑗(𝑖) is assured for all 𝑗(𝑖), the second requirement in Definition 1 is satisfied. It is clear by construction that 𝑘 ≥ |𝛼|. Proof of Proposition 2: Let 𝛼 = {𝛼1 , 𝛼2 , … , 𝛼𝑘 } be feasible to 𝐸𝑃. By requirement 1 of 𝐸𝑃, for every 𝑜̅𝑖 ∈ 𝑂̅ there exists 𝛼𝑖 such that 𝐶(𝑜̅𝑖 ) ⊑ 𝛼𝑖 . From TBox classification which is used to construct the subsumption tree, we know that 𝑎 ⊑ 𝑏 if and only if there is a path from 𝑏 to 𝑎 for 𝑎, 𝑏 ∈ 𝑉𝐶 . Hence, a path 𝑃 ∈ 𝑃𝑎𝑡ℎ𝐶(𝑜̅𝑖 ) T is one of the paths in step 4. The requirement 2 of 𝐸𝑃 corresponds to Ω′ computed and substituted to step 7 in Algorithm 1. If Ω′𝑚,𝑃 ≠ ∅ which is verified (by checking satisfiability of the concept 𝐶(𝑜) ⊓ ¬𝑃𝑚 ) in Step 8, 𝑃𝑚 considered as evidence 𝛼𝑖 is added to 𝑠𝑢𝑝𝐶(𝑜̅𝑖 ) in step 9. By step 12 in Algorithm 1, 𝛼𝑖 ∈ 𝑠𝑢𝑝𝐶(𝑜̅𝑖 ) and thus 𝛼𝑖 ∈ 𝑠𝑢𝑝𝐶(𝑜) . Hence, there exists 𝑇𝛼𝑖 for each 𝛼𝑖 ∈ 𝑠𝑢𝑝𝐶(𝑜) . Since 𝛼𝑖 ∈ 𝑃 where 𝑃 ∈ 𝑃𝑎𝑡ℎ𝐶(𝑜̅𝑖 ) T, 𝐶(𝑜̅𝑖 ) ∈ 𝑇𝛼𝑖 . We have ⋃𝑖 𝑇𝛼𝑖 ⊇ ⋃𝑖 𝐶(𝑜̅𝑖 ) = 𝑂̅ = 𝑈. This implies that 𝛼 is feasible to 𝑆𝐶. Since a feasible solution to 𝐸𝑃 yields a feasible solution to 𝑆𝐶, it implies that 𝑍𝑆𝐶 ≤ 𝑍𝐸𝑃 . As 𝑍𝑆𝐶 ≤ 𝑍𝐸𝑃 and 𝑍𝑆𝐶 ≥ 𝑍𝐸𝑃 (from Proposition 1), 𝑍𝑆𝐶 = 𝑍𝐸𝑃 is directly followed. Appendix D We manually observe extracted triplets in KG and compare them with their original statements. Based on our manual observation, incorrectly extracted triplets are provided in Table D1. 36 Table D1: Examples of incorrectly extracted triplets in KG based on SemRep Original statements Extracted triplets Six additional imino derivatives of pyridoxal (Pyridoxal ; same as ; Prolactin Release- have been studied, but none of these new Inhibiting Hormone | PEE1) compounds was as effective as PIH. There was no significant different in the (Glucose-6-phosphate dehydrogenase levels of G6PD activity in subjects with GdA measurement, quantitative ; USES ; GDA) or GdB. Two methods for the removal of erythrocytes (Erythrocytes ; PRODUCES ; human from buffy coats for the production of human leukocyte interferon) leukocyte interferon. Appendix E According to the experiment, we observe matches among KG, Ollie and LSTM-ER models. Table E1 illustrates the number of matches among the different models. Table E1: Number of matches among KG, Ollie and LSTM-ER models based on 10,000 triplets Number of triplets 160 160 525 1500 KG Ollie LSTM-ER × × × × × × × × × Appendix F 37 We first identify the truthfulness of a lay triplet based on the PRA model for each relation type. A proportion of false triplets which is equivalent to the number of false triplets divided by total number of triplets is computed. Object candidates are computed for false triplets only. The total number of triplets, the false triplet proportion and the average number of object candidates for each relation types are summarized in Table F1. Table F1: Statistics of truthfulness and object candidates obtained from the PRA model Number of triplets False triplets proportion ̅| 𝑨𝒗𝒈 |𝑶 LOCATION_OF 378 0.15 12.19 ISA 319 0.07 10.43 PREDISPOSES 292 0.33 8.68 TREATS 207 0.26 10.80 CAUSES 179 0.39 11.50 AFFECTS 116 0.41 14.69 COEXISTS_WITH 114 0.30 17.29 PREVENTS 110 0.25 7.86 PART_OF 69 0.25 7.65 INTERACTS_WITH 46 0.30 3.79 INHIBITS 45 0.20 7.67 ASSOCIATED_WITH 37 0.22 8.63 AUGMENTS 35 0.46 11.75 USES 35 0.09 7.67 PRODUCES 30 0.17 8.20 DIAGNOSES 22 0.14 14.00 DISRUPTS 21 0.48 9.70 PRECEDES 16 0.25 17.25 METHOD_OF 13 0.38 19.2 Relation type 38 Appendix G We compare the cardinality of candidates, the cardinality of evidence, and all elements in the set corresponding to “Al” and “Ma” in Table G1. Table G1: A complete comparison of elements in evidence sets “Al” and “Ma” Al False Triplets Heparin TREATS Fever Amiodarone TREATS Hepatitis C Stress management TREATS Mitral Valve Prolapse Capoten TREATS Coughing Losartan TREATS Varicose Ulcer Echocardiography DIAGNOSES Hyperlipidemia Platelet Size DIAGNOSES Anemia Esophageal pH Monitoring DIAGNOSES Malignant breast neoplasm Ma ̅| |𝑶 |𝛂| ̅| |𝑶 |𝛂| 2 1 5 1 'hemic system symptom' 'disease of anatomical entity' 3 1 9 1 1 'nervous system disease' 2 2 1 12 1 'Disease, Disorder or Finding' 9 1 9 2 4 1 5 2 8 3 5 3 4 1 4 11 1 5 𝛂 'insulin resistance', ‘hypertrophy', ‘disease' 'disease of anatomical entity' 'Cardiovascular Diseases' 'Biological Process', ‘Finding', ‘Non-Neoplastic Disorder', ‘Neoplasm by Morphology', ‘Digestive System Disorder' 39 𝛂 'hemic system symptom' 'disease of anatomical entity' 'nervous system disease' 'Disease, Disorder or Finding' 'ischemia', ‘disease' 'disease of anatomical entity' 'Blood Platelet Disorders', ‘Cardiovascular Diseases' ‘Finding', ‘NonNeoplastic Disorder', ‘Neoplasm by Morphology' Cholesterol measurement test DIANOSES Malignant breast neoplasm Electrocardiogram DIAGNOSES Muscle strain 15 5 1 1 Caffeine CAUSES Gout Leukemia CAUSES Gout 'Non-Neoplastic Disorder by Site', ‘Finding' 4 2 1 1 'Cell Physiological Phenomena' 2 hypercholesterolemia CAUSES Neuropathy 'Biological Process', ‘Mouse Disorder by Site', ‘Finding', ‘NonNeoplastic Disorder', ‘Dependence' 'cardiac disorder AE' 1 7 2 3 2 Harpin CAUSES Cardiomegaly 7 2 Ascorbic Acid CAUSES Senile Plaques 2 'Finding', ‘NonNeoplastic Disorder' 'genetic disease', ‘neoplasm (disease)' 'Pathologic Processes', ‘Phenomena and Processes Category' 'Atherosclerosis', 'Abnormality of the cerebral ventricles' 2 8 3 6 2 2 2 2 1 4 40 2 'cardiac disorder AE' 'Phenomena and Processes Category', ‘Behavior and Behavior Mechanisms', ‘Signs and Symptoms, Digestive' 'Finding', ‘NonNeoplastic Disorder' 'genetic disease', ‘neoplasm (disease)' 'Cell Death' 'Abnormality of digestive system physiology', 'Abnormality of nervous system physiology'
2cs.AI
arXiv:1310.2315v1 [math.AC] 9 Oct 2013 REGULAR CW-COMPLEXES AND POSET RESOLUTIONS OF MONOMIAL IDEALS TIMOTHY B.P. CLARK AND ALEXANDRE TCHERNEV Abstract. We use the natural homeomorphism between a regular CW-complex X and its face poset PX to establish a canonical isomorphism between the cellular chain complex of X and the result of applying the poset construction of [Cla10] to PX . For a monomial ideal whose free resolution is supported on a regular CW-complex, this isomorphism allows the free resolution of the ideal to be realized as a CW-poset resolution. Conversely, any CW-poset resolution of a monomial ideal gives rise to a resolution supported on a regular CW-complex. Introduction A plethora of commutative algebra research has centered on the search for combinatorial and topological objects whose structure can be exploited to give explicit constructions of free resolutions. Many approaches take advantage of the combinatorial data inherent in the Zn grading of a monomial ideal N and produce a resolution of the module R/N. In particular, the search for regular CW-complexes which support resolutions has been quite active, due to the well-behaved nature and variety of construction methods for these topological spaces. For example, Diana Taylor’s resolution [Tay66] may be viewed as a resolution supported on the full simplex whose vertices are labeled with the minimal generators of N. Bayer, Peeva, and Sturmfels [BPS95] take an approach which resolves a specific class of ideals using a canonical subcomplex of the same full simplex. More generally, a criterion for using regular CW-complexes to support resolutions is developed in [BS98]. More recently, these techniques were connected to discrete Morse theory in [BW02], where a topological approach for reducing the length of regular CW resolutions is discussed. Furthermore, the individual techniques of Visscher [Vis06], Sinefakopolous [Sin08], and Mermin [Mer10] each use the framework of regular CW-complexes to describe resolutions of individual classes of ideals. Despite the richness of these results, Velasco [Vel08] showed that there exist minimal free Date: April 2, 2018. 1 2 TIMOTHY B.P. CLARK AND ALEXANDRE TCHERNEV resolutions of monomial ideals which cannot be supported on any CWcomplex. Velasco’s result makes it clear that the structural framework provided by CW-complexes is too restrictive to encompass the entire spectrum of structures needed for supporting minimal free resolutions of monomial ideals, and thus a more flexible structural framework is needed. The main goal of this paper is to provide an additional argument that the framework based on posets introduced in [Cla10] (and refered to as the poset construction) provides the necessary flexibility. Our main result, Theorem 1.6, is that the poset construction, when applied to the face poset of a regular CW-complex X recovers the cellular chain complex of X. As demonstrated in [Cla10] this provides a very useful criterion for checking if a given monomial ideal is supported on a regular CW-complex. The final evidence that the poset construction is the right tool to study the structure of minimal free resolutions of monomial ideals is given in [CT], where it is shown that for every monomial ideal I there is a poset such that our poset construction applied to that poset supports the minimal free resoluton of I. The paper is organized as follows. In Section 1 we extend the connection between the combinatorics and topology of regular CWcomplexes into the category of complexes of vector spaces. The underlying combinatorial structure of regular CW-complexes was established by Björner [Bjö84] as a way to classify those spaces whose poset of cellular incidences reflects the topology of the space itself. The first evidence that extending Björner’s correspondence will be very useful was described by the first author in [Cla12]. Mermin’s result is recovered there, using poset combinatorics and the correspondence of Theorem 1.6. Each of the constructions mentioned above [Tay66, BPS95, BS98, BW02, Vis06, Sin08, Mer10, OY] describe a topological structure for a resolution without explicitly using the combinatorial interpretation described in this paper. In Section 2, we use Theorem 1.6 to reinterpret a variety of constructions for free resolutions of monomial ideals. There, we realize any cellular resolution as a CW-poset resolution. Lastly, we show that the general framework of poset resolutions serves as a common construction method for many classes of monomial ideals whose minimal resolutions have each been constructed using topological means. The value in using the combinatorial side of Björner’s correspondence lies in the ability to use CW-posets to classify ideals which admit cellular (minimal) resolutions. Indeed, determining whether a resolution is supported on a regular CW-complex now amounts to determining whether the resolution is supported on a CW-poset. More generally, REGULAR CW-COMPLEXES AND POSET RESOLUTIONS 3 the result of Velasco makes clear the limitations of a purely topological perspective when constructing minimal resolutions. As such, we propose a shift in focus toward the more general notions of poset combinatorics when constructing resolutions, since many of the benefits of a topological approach appear naturally in the poset construction of [Cla10]. Throughout the paper, the notions of a poset, its order complex, and that of an algebraic chain complex are assumed to be familiar to the reader. When describing a topological property of a poset, we are implicitly describing the property of the order complex of the poset. For a poset P , we write ∆(P ) for its order complex. When X is a regular CW-complex, we write PX for its face poset. 1. The complexes C(X) and D(PX ) Recall that a CW-complex X is said to be regular if the attaching maps which define the incidence structure of X are homeomorphisms. The class of regular CW-complexes is studied by Björner in [Bjö84], who introduces and investigates the following related class of posets. Definition 1.1. A poset P is called a CW-poset if (1) P has a least element 0̂, (2) P is nontrivial (has more than one element), (3) For all x ∈ P r {0̂}, the open interval (0̂, x) is homeomorphic to a sphere. Björner gives the following characterization of CW-posets, providing a connection between poset combinatorics and the class of regular CWcomplexes. Proposition 1.2. [Bjö84, Proposition 3.1] A poset P is a CW-poset if and only if it is isomorphic to the face poset of a regular CW-complex. Remark 1.3. Recall that a ranked poset P has the property that for every x ∈ P , all maximal chains with x as greatest element have the same finite length. Ranked posets admit a rank function and in the case of a CW-poset, the rank function rk : PX → Z takes the form rk(σ) = dim(σ) + 1. Note that the i-dimensional cells of a regular CWcomplex X correspond bijectively to poset elements of rank i + 1 in its face poset PX . A two-dimensional example of this correspondence is given in Figure 1. Remark 1.4. Björner’s result arises from the natural (see Lundell and Weingram [LW69]) CW-isomorphism (we will refer to it in the 4 TIMOTHY B.P. CLARK AND ALEXANDRE TCHERNEV 123 1234 4 12 13 23 14 24 3 1 1 2 3 4 ∅ 2 Figure 1. A two-dimensional regular CW-complex and the Hasse diagram of its face poset sequel as Björner’s correspondence) between a regular CW-complex X with collection of closed cells {σ} and the regular CW-complex ∆(PX ) whose set of closed cells is {∆(0̂, σ]}. Alternately, the space ∆(PX ) may be viewed as a simplicial complex whose vertices are indexed by the cells of X. In fact, ∆(PX ) is the abstract barycentric subdivision of X. Furthermore, the simplicial and cellular homology groups of ∆(PX ) (and those of subcomplexes corresponding to open intervals of the form (0̂, σ)) are isomorphic by applying the Acyclic Carrier Theorem (c.f. Theorem 13.4 of [Mun84]) to the subdivision map X → ∆(PX ). We now describe the algebraic objects that provide the setting for the results of this paper. Throughout, X will denote a a non-empty, finite-dimensional regular CW-complex. As is standard, we write X i for the collection of cells of X of dimension ≤ i (the i-skeleton) and C(X) for the cellular chain complex of X with coefficients in the field k. Precisely, ∂ ∂ ∂ 1 0 i C(X) : 0 → Cp · · · → Ci −→ Ci−1 → · · · → C1 −→ C0 −→ C−1 with Ci = Hi (X i , X i−1 , k), the relative homology group in dimension i ≥ 0. Since X is nonempty, the (−1)-skeleton of X consists only of the empty cell and by convention, we consider C−1 to be a onedimensional vector space over k. More generally, the basis elements of the vector spaces appearing in the chain complex C(X) are in one-toone correspondence with the cells of X. Furthermore, when σ is a cell REGULAR CW-COMPLEXES AND POSET RESOLUTIONS 5 of X, the differential of C(X) takes the form X ∂(σ) = cσ,τ · τ τ ⊂σ dim(σ)=dim(τ )+1 where the coefficients cσ,τ ∈ {−1, 0, 1} are the so-called incidence numbers and are determined by the chosen orientations of the cells of X. See Chapter IV of [Mas80] for details. Let (P, <) be a poset with minimum element 0̂. For p < q ∈ P where there is no r ∈ P such that p < r < q, we say that q covers p and write p ⋖ q. We briefly recall the construction of D(P ), a sequence of vector spaces and vector space maps, which owes its structure to the partial ordering and homology of open intervals in P ; see [Cla10] for a full description of this poset construction. In general, D(P ) is not necessarily a complex of vector spaces, and in the case when D(P ) is indeed is a complex, it need not be exact. For the remainder of the paper, we restrict discussion of the details of this construction as applied to the CW-poset PX . The sequence ϕi ϕ1 D(PX ) : 0 → Dp+1 → · · · → Di −→ Di−1 → · · · → D1 −→ D0 is constructed using the homology of the order complexes of spherical open intervals of the form (0̂, α) in PX . Let α be an element of the CW-poset PX and write ∆α as the order complex of the open interval (0̂, α). For i ≥ 1, the vector spaces in D(PX ) take the form M M e i−2 (∆α , k) = e i−2 (∆α , k) H H Di = α∈PX rk(α)=i e −1 ({∅}, k), (since each ∆α is a sphere of dimension rk(α)−2), and D0 = H a one-dimensional k-vector space. In order to describe the maps ϕi for i ≥ 2, write Dλ for the order complex of a half-closed interval (0̂, λ] ⊆ PX and take advantage of the decomposition [ Dλ . ∆α = λ⋖α Next, appeal to the Mayer-Vietoris sequence in reduced homology of the triple   [   (1.5) Dβ , ∆α  . Dλ , β⋖α λ6=β 6 TIMOTHY B.P. CLARK AND ALEXANDRE TCHERNEV For notational simplicity when λ ⋖ α, let   [  ∆α,λ = Dλ ∩  Dβ  . β⋖α λ6=β e i−3 (∆α,λ , k) → H e i−3 (∆λ , k) for the map in homology induced Write ι : H by inclusion and α,λ e i−2 (∆α , k) → H e i−3 (∆α,λ , k) δi−2 :H for the connecting homomorphism from the Mayer-Vietoris homology sequence of (1.5). The map ϕi : Di → Di−1 is defined componentwise as X α,λ ϕi ϕi |Di,α = λ⋖α α,λ where ϕα,λ : Di,α → Di−1,λ is the composition ϕα,λ = ι ◦ δi−2 . In the i i border case, the map ϕ1 : D1 → D0 is defined componentwise as ϕ1 |D1,α = idHe−1 ({∅},k) . We now state the main result of this paper. Theorem 1.6. Björner’s correspondence induces a canonical isomorphism between the cellular chain complex C(X) and the sequence D(PX ). Proof. Since all homology is taken with coefficients in the field k, we will omit it from the notation. By definition of the cellular chain complex we have Ci= Hi (X i , X i−1 ). Furthermore, Hi (X i , X i−1 ) =  e i )/C(X e i−1 ) through the realization of the relative homology Hi C(X of (X i , X i−1 ) as the homology of the quotient of the cellular chain complex of X i relative to the cellular chain complex of X i−1 . The CW isomorphism between (X, {σ}) and (PX , {(0̂, σ]}) induces the isomorphism     M ei  e i C(X e i )/C(X e i−1 ) ∼ e α )/C(∆ e α ) . H C(D =H rk(α)=i The equality  ei  H M rk(α)=i  e α )/C(∆ e α ) = C(D M rk(α)=i e i (Dα , ∆α ) H REGULAR CW-COMPLEXES AND POSET RESOLUTIONS 7 realizes the relative homology of a direct sum of quotients of chain complexes as the appropriate direct sum of relative homology groups. Lastly, we have the isomorphism M rk(α)=i e i (Dα , ∆α ) ∼ H = M rk(α)=i e i−1 (∆α ) = Di+1 , H which is given by the connecting map in the long exact sequence in relative homology and is referred to as reindexing in the Appendix of [Cla10]. Thus, for every i ≥ 0, we have the following sequence of canonical isomorphisms: Ci = Hi (X i , X i−1 )   e i )/C(X e i−1 ) = Hi C(X   M ∼ e α )/C(∆ e α ) C(D = Hi  rk(α)=i ∼ = M rk(α)=i ∼ = M rk(α)=i ∼ = M rk(α)=i Hi  e α )/C(∆ e α) C(D  e i (Dα , ∆α ) H e i−1 (∆α ) = Di+1 . H The vector spaces C−1 and D0 are each one-dimensional and are canonically isomorphic. Therefore, the isomorphism between the vector spaces appearing in the two chain complexes is established. It remains to show that this composition of isomorphisms commutes with the differentials of the sequences under consideration. Precisely, we must show that the following is a commutative diagram. 8 TIMOTHY B.P. CLARK AND ALEXANDRE TCHERNEV (1.7) ∂ e i (X i , X i−1 ) e i−1 (X i−1 , X i−2) = Ci−1 Ci = H −−−i→ H     y y     ∂i i i−1 i−1 i−2 e e e e e e Hi C(X )/C(X ) −−−→ Hi−1 C(X )/C(X )     y y     M M ei  e α )/C(∆ e α ) −−∂−i→ H e i−1  e β )/C(∆ e β ) H C(D C(D rk(α)=i M rk(α)=i rk(β)=i−1   y   P ∂α α i e α )/C(∆ e α ) −−− Hi C(D −→ M rk(α)=i Di+1   y e i (Dα , ∆α ) H P ∂α α i −−− −→   reindexy M e i−1 (∆α ) = H M rk(β)=i−1   y   e β )/C(∆ e β) Hi−1 C(D M rk(β)=i−1 ϕi+1 −−−→ rk(α)=i M rk(β)=i−1   y e i−1 (Dβ , ∆β ) H   yreindex e i−2 (∆β ) = Di H The commutativity of the bottom square above is immediate from Lemma 1.9, which is a general fact about poset homology. The commutativity of the remaining squares of (1.7) is a straightforward verification.  Turning to the machinery necessary for Lemma 1.9, let j ≥ 0 and write [ [ ∆(j) = D = Dγ γ α γ≤α rk(γ)=rk(α)−j γ⋖j α where, to simplify notation, we write γ ⋖j α when γ ≤ α and rk(γ) = (1) rk(α)−j. Note that ∆α = ∆α . Next, consider the long exact sequence in relative homology (1.8) µ D e e i (∆(j) , ∆(j+2) , k) → e i (∆(j) , ∆(j+1) , k) → ··· → H H Hi−1 (∆(j+1) , ∆(j+2) , k) → · · · α α α α α α REGULAR CW-COMPLEXES AND POSET RESOLUTIONS 9 induced by the inclusions ∆(j+2) ⊂ ∆(j+1) ⊂ ∆(j) α α α . Lemma 1.9. Let P be a ranked poset. For each i ≥ 1 and α ∈ P the diagram D (j+1) e i (∆(j) H , k) α , ∆α / reindex reindex M rk(β)=rk(α)−j is commutative. (j+2) e i−1 (∆(j+1) H , ∆α , k) α M ϕi+1 e i−1 (∆(1) , k) H β / rk(γ)=rk(α)−j−1 e i−2 (∆(1) H γ , k) (j) Proof. Orient each face σ = {aσ0 , · · · , aσi } ∈ ∆α using the ordering in the chain aσ0 < · · · < aσi ∈ P . Next, suppose that [w̄] isa representative  (j) (j+1) e for the homology class generated by the image w̄ ∈ Ci ∆α , ∆α of the relative cycle X X wβ w= cσ · σ = of  aσ i ⋖j α β⋖j α  X (j) (j+1) ∆α , ∆α , where cσ ∈ k, and wβ = cσ · σ. Since w is a aσ i =β relative cycle, we must have X cσ · d(σ̂) = 0 aσ i =β where σ̂ = σ r {aσi } = {aσ0 , · · · , aσi−1 } and d is the simplicial bound(j) (j+1) ary map. Therefore, each wβ is a relative cycle for (∆β , ∆β ) and X reindexing the class [w̄] = [w̄β ] yields β)⋖j α X β⋖j α where [d(wβ )] = X [vβ ], β⋖j α vβ = d(wβ ) = (−1)i X cσ · σ̂ aσ i =β (1) is a cycle in ∆β . Next, choose for each β ≤ α with rkβ = rkα − j, a partition  G Pβ,γ 0̂, β = γ⋖β 10 TIMOTHY B.P. CLARK AND ALEXANDRE TCHERNEV with the property that λ ≤ γ for each λ ∈ Pβ,γ . This choice allows us to write X X vβ = wβ,γ where wβ,γ = (−1)i cσ · σ̂. aσ i =β σ ai−1 ∈Pβ,γ γ⋖β Therefore, for each δ < α with rk(δ) = rk(α) − j − 1 the component of   X [vβ ] ϕi+1  β⋖j α e i−2 (∆(1) , k) is given by in H δ X ϕβ,δ i+1 ([vβ ]) = X δ⋖β⋖j α δ⋖β⋖j α ϕβ,δ i+1 " X wβ,γ γ⋖β #! = X [d(wβ,δ )] . δ⋖β⋖j α On the other hand, since vβ is a cycle, each wβ,γ is a relative cycle for (j+1) (j+2) (∆α , ∆α ). As D is the connecting map in a long exact sequence in homology, we have   " # h i X X X D([w]) = d(w) =  v̄β  = wβ,γ , β⋖j α β⋖j α γ⋖β which upon reindexing becomes    X X d  wβ,γ  . γ⋖j+1 α γ⋖β⋖j α e i−2 (∆(1) , k) Therefore, for δ < α with rk(δ) = rk(α)−j−1, the image in H δ is equal to    X X d  wβ,δ  = [d(wβ,δ )], δ⋖β⋖j α δ⋖β⋖j α the desired conclusion.  2. Free resolutions of monomial ideals Let R = k[x1 , . . . , xn ], considered with its usual Zn -grading (multigrading) and suppose that N is a monomial ideal in R. A CW-complex X on r vertices inherits a Zn -grading from the r minimal generators of N through the following correspondence. Let σ be a non-empty cell of X, and identify σ by its set of vertices Vσ . Set mσ = lcm(mj | j ∈ Vσ ), REGULAR CW-COMPLEXES AND POSET RESOLUTIONS 11 so that the multidegree of σ is defined as the multidegree of the monomial mσ . Clearly, the multigrading of X induces a multigrading on the face poset PX . When X is Zn -graded, the cellular chain complex C(X) is homogenized in the usual way to produce a Zn -graded chain complex of Rmodules. Precisely, for any cell σ ∈ X, let Rσ be a rank one free Rn module which Mhas multidgree mσ . The complex FX is the Z -graded R-module Rσ with differential ∅6=σ∈X X ∂(σ) = cσ,τ τ ⊂σ dim(σ)=dim(τ )+1 mσ τ. mτ For b ∈ Zn , write Xb for the collection of cells in X whose multidegrees are comparable to b. Bayer and Sturmfels give the following characterization of CW-complexes which support free resolutions. Proposition 2.1. [BS98, Proposition 1.2] The complex FX is a free resolution of N if and only if Xb is acyclic over k for all multidegrees b. We now give details of the homogenization of the sequence D(PX ). First, consider the map η : PX −→ Zn for the map induced by the multigrading on X. Next, define ∂ ∂ t 1 F (η) : · · · −→ Ft −→ Ft−1 −→ · · · −→ F1 −→ F0 , a sequence of free multigraded R-modules and multigraded R-module homomorphisms. For i ≥ 1, we have M M R ⊗k Di,λ Fi,λ = Fi = 0̂6=λ∈P 0̂6=λ∈P where the multigrading of xa ⊗ v is defined as a + η(λ) for any element e i−2 (∆λ , k). v ∈ Di,λ = H The differential ∂i : Fi −→ Fi−1 in this sequence of multigraded modules is defined on the component Fi,α as X α,λ ∂i |Fi,α = ∂i λ⋖α ∂iα,λ where : Fi,α −→ Fi−1,λ takes the form ∂iα,λ = xη(α)−η(λ) ⊗ ϕα,λ for i λ ⋖ α. Set F0 = R ⊗k D0 and define the multigrading of xa ⊗ v as a for each v ∈ D0 . The differential ∂1α,λ : F1,α −→ F0,λ is defined componentwise as ∂1 |F1,λ = xη(λ) ⊗ ϕ1 |D1,λ . 12 TIMOTHY B.P. CLARK AND ALEXANDRE TCHERNEV Having established a commutative algebra interpretation for the objects of Section 1, we now state the motivating result of this paper. Theorem 2.2. Let N be a monomial ideal and suppose that F is a resolution of N. The resolution F is supported on a regular CW-complex X if and only if F is a poset resolution supported on the CW-poset PX . Proof. By Theorem 1.6, the homogenizations of D(PX ) and C(X) both produce the same chain complex.  Remark 2.3. Using the language of Peeva and Velasco [PV11], the chain complexes D(PX ) and C(X) are isomorphic frames for the resolution F . We now apply Theorem 2.2 to several well-studied resolutions of monomial ideals. Corollary 2.4. The Taylor, Scarf, and Lyubeznik resolutions are CWposet resolutions. Proof. Each of these resolutions are supported on a simplicial complex, as described by Mermin in [Mer12]. Hence, applying Theorem 2.2 to the face poset of the associated simplicial complex in each case recovers the desired CW-poset resolution.  Recall that a monomial ideal N is said to be stable if for every monomial m ∈ N, the monomial m · xi /xr ∈ N for each 1 ≤ i < r, where r = max{k : xk divides m}. Eliahou and Kervaire [EK90] first gave a construction for the minimal free resolution of a stable ideal, which Mermin [Mer10] reinterpreted as a resolution supported on a regular CW-complex. By using Björner’s correspondence along with Theorem 2.2, we recover Mermin’s result. Corollary 2.5. The Eliahou-Kervaire resolution is supported on a regular CW-complex. Proof. The main result of [Cla12] establishes that the Eliahou-Kervaire resolution is supported on an EL-shellable CW-poset (of admissible symbols). Theorem 2.2 therefore applies, and the minimal resolution is supported on the regular CW-complex whose face poset is isomorphic to this poset of admissible symbols.  Another well-studied combinatorial object which can be associated to a monomial ideal also serves as a source for CW-posets which support minimal free resolutions. Recall that the lcm-lattice of a monomial ideal N is the set LN of least common multiples of the minimal generators of N, along with 1 (considered to be the least common multiple of REGULAR CW-COMPLEXES AND POSET RESOLUTIONS 13 the empty set). Ordering in the lcm-lattice is given by m′ < m if and only if m′ divides m. The homological importance of LN was established by Gasharov, Peeva, and Welker in [GPW99]. Motivated by their work, the class of lattice-linear ideals was studied by the first author in [Cla10]. Definition 2.6. Let F be a minimal multigraded free resolution of R/N. The monomial ideal N is lattice-linear if multigraded bases Bk of the free modules in F can be fixed for all k so that for any i ≥ 1 and any em ∈ Bi the differential X ∂ F (em ) = cm,m′ · em′ em′ ∈Bi−1 has the property that if the coefficient cm,m′ 6= 0 then m′ ⋖ m ∈ LN . With the extension of Björner’s correspondence complete, the notion of lattice-linearity may be viewed topologically when the lcm-lattice exhibits a precise enough combinatorial structure. Corollary 2.7. If the lcm-lattice of a monomial ideal is a CW-poset then the ideal is lattice-linear. Furthermore, such an ideal has a minimal cellular resolution. Proof. Write N for a monomial ideal and LN for the CW-poset which is its lcm-lattice. Since LN is a CW-poset, the open interval (1, m) is homeomorphic to a sphere for every m ∈ LN . Theorem 2.1 of [GPW99] therefore guarantees that each monomial of LN corresponds to exactly one free module in the minimal free resolution of N. Aiming for a contradiction, suppose that N is not lattice-linear. Hence, there exists a basis element em ∈ Bi for some i and a basis element em′ ∈ Bi−1 for which the coefficient cm,m′ 6= 0 in the expansion of the differential X cm,m′ · em′ , ∂ F (em ) = em′ ∈Bi−1 but m′ is not covered by m in LN . Hence, there must exist ℓ ∈ LN for which m′ < ℓ < m. However, the interval (1, m) is homeomorphic to an (i − 2)-sphere, and the interval (1, m′ ) is homeomorphic to an (i − 3)-sphere. Since LN is a CW-poset, the open interval (1, ℓ) also is homeomorphic to a sphere. However, (1, ℓ) cannot be homeomorphic to a sphere of dimension i − 2, nor can it be homeomorphic to a sphere of dimension i − 3. Indeed, the order complex of (1, ℓ) is a proper subcomplex of the (i − 2)-dimensional sphere (1, m). Moreover, it contains the (i − 3)-dimensional complex (1, m′ ) as a proper subcomplex. 14 TIMOTHY B.P. CLARK AND ALEXANDRE TCHERNEV Hence, (1, ℓ) must be a j-dimensional sphere where i − 3 < j < i − 2, a contradiction. Therefore, such a monomial ℓ cannot exist, which means that N is indeed lattice-linear. Write XN for the regular CW-complex whose face poset is isomorphic to the lcm-lattice LN . The cells of XN inherit their multidegree directly from the corresponding monomial in the lcm-lattice. Note that since LN is a lattice, then XN is a regular CW-complex with unique cell of top dimension, which has the property that any pair of cells intersect in a cell. Such a CW-complex is said to have the intersection property. Applying Theorem 2.2, the minimal CW-poset resolution supported on LN may be reinterpreted as a minimal cellular resolution supported on XN .  Remark 2.8. In fact, more can be said about monomial ideals whose lcm-lattice is a CW-poset. Indeed, such ideals are rigid in the sense of [CM13]. In general, a rigid ideal has a minimal free resolution with unique multigraded basis. In the case when the lcm-lattice is a CWposet, there is a unique regular CW-complex which supports the minimal multigraded resolution. The edge ideals of complete bipartite graphs studied by Visscher [Vis06] are a class of ideals whose lcm-lattice is a CW-poset. In closing, we note that the property of an lcm-lattice being a CWposet is not a necessary condition for lattice-linearity or rigidity. The ideal given by Velasco, whose resolution is not supported on any CWcomplex [Vel08] is a lattice-linear, rigid monomial ideal and hence, admits a minimal poset resolution. There are many lattice-linear ideals whose lcm-lattice is not a CW-poset. The failure of topological methods to completely encode the structure of free resolutions allows us to consider the following natural questions, which are the subject of ongoing research. Question 2.9. Which CW resolutions supported on a non-regular CWcomplex can be realized as poset resolutions? Can every resolution be realized as a poset resolution? A positive answer to each of these two questions is given respectively in Wood [Woo] and Clark and Tchernev [CT]. References [Bjö84] [BPS95] Anders Björner, Posets, regular CW-complexes and Bruhat order, European J. Combin. 5 (1984), 7–16. Dave Bayer, Irena Peeva, and Bernd Sturmfels, Monomial resolutions, Math. Res. Lett. 5-6 (1995), 31–46. REGULAR CW-COMPLEXES AND POSET RESOLUTIONS [BS98] 15 Dave Bayer and Bernd Sturmfels, Cellular resolutions, J. Reine Agnew. Math. 502 (1998), 123–140. [BW02] Ekkehard Batzies and Volkmar Welker, Discrete Morse theory for cellular resolutions, J. Reine Angew. Math. 543 (2002), 147–168. [Cla10] Timothy B.P. Clark, Poset resolutions and lattice-linear monomial ideals, J. Algebra 323 (2010), 899–919. , A minimal poset resolution of stable ideals, Progress in Commu[Cla12] tative Algebra 1: Combinatorics and Homology (Christopher Francisco, Lee C. Klingler, Sean Sather-Wagstaff, and Janet C. Vassilev, eds.), De Gruyter, 2012, pp. 143–166. [CM13] Timothy B.P. Clark and Sonja Mapes, Rigid monomial ideals, to appear in J. Commut. Algebra. (2013). [CT] Timothy B.P. Clark and Alexandre Tchernev, Monomial ideals and posets of minimal support, In progress. [EK90] Shalom Eliahou and Michel Kervaire, Minimal resolutions of some monomial ideals, J. Algebra 129 (1990), 1–25. [GPW99] Vesselin Gasharov, Irena Peeva, and Volkmar Welker, The lcm-lattice in monomial resolutions, Math. Res. Lett. 5-6 (1999), 521–532. [LW69] Albert T. Lundell and Stephen Weingram, The Topology of CW Complexes, Van Nostrand, 1969. [Mas80] William S. Massey, Singular homology theory, Graduate Texts in Mathematics, vol. 70, Springer-Verlag, New York, 1980. [Mer10] Jeffrey Mermin, The Eliahou-Kervaire resolution is cellular, J. Commut. Algebra 2 (2010), no. 1, 55–78. [Mer12] Jeff Mermin, Three simplicial resolutions, Progress in Commutative Algebra 1: Combinatorics and Homology (Christopher Francisco, Lee C. Klingler, Sean Sather-Wagstaff, and Janet C. Vassilev, eds.), De Gruyter, 2012, pp. 127–141. [Mun84] James Munkres, Elements of Algebraic Topology, Perseus Books, 1984. [OY] Ryota Okazaki and Kohji Yanagawa, On CW complexes supporting Eliahou-Kervaire type resolutions of Borel fixed ideals. [PV11] Irena Peeva and Mauricio Velasco, Frames and degenerations of monomial ideals, Trans. of the Amer. Math. Soc. 363 (2011), no. 4, 2029–2046. [Sin08] Achilleas Sinefakopoulos, On Borel fixed ideals generated in one degree, J. Algebra 319 (2008), 2739–2760. [Tay66] Diana Taylor, Ideals generated by monomials in an R-sequence, Ph.D. thesis, University of Chicago, 1966. [Vel08] Mauricio Velasco, Minimal free resolutions that are not supported by a CW-complex, J. Algebra 319 (2008), 102–114. [Vis06] Daniel Visscher, Minimal free resolutions of complete bipartite graph ideals, Comm. Algebra 34 (2006), no. 10, 3761–3766. [Woo] Daniel Wood, Ph.D. thesis, University at Albany.
0math.AC
Finding small-width connected path decompositions in polynomial time Dariusz Dereniowski∗ Dorota Osula∗ Paweł Rzążewski† arXiv:1802.05501v1 [cs.DS] 15 Feb 2018 Abstract A connected path decomposition of a simple graph G is a path decomposition (X1 , . . . , Xl ) such that the subgraph of G induced by X1 ∪ · · · ∪ Xi is connected for each i ∈ {1, . . . , l}. The connected pathwidth of G is then the minimum width over all connected path decompositions of G. We prove that for each fixed k, the connected pathwidth of any input graph can be computed in polynomial-time. This answers an open question raised by Fedor V. Fomin during the GRASTA 2017 workshop, since connected pathwidth is equivalent to the connected (monotone) node search game. Keywords: connected graph searching, connected pathwidth, graph searching, pathwidth 1 Introduction Since the famous ‘graph minor’ project by Robertson and Seymour that started with [31], the notions of treewidth and pathwidth received growing interest and a vast amount of results has been obtained. The pathwidth, informally speaking, allows us to say how closely an arbitrary graph resembles a path. This concept proved to be useful in designing algorithms for various graph problems, especially in the case when the pathwidth of an input graph is small (e.g. fixed), in which case quite often a variant of well-known dynamic programming enumeration that progresses along a path decomposition of input graph turns out to be successful. Several modifications to pathwidth have been proposed and in this work we are interested in the connected variant in which one requires that a path decomposition (X1 , . . . , Xl ) of a graph G satisfies: the vertices X1 ∪ · · · ∪ Xi induce a connected subgraph in G for each i ∈ {1, . . . , l}. This version of the classical pathwidth problem is motivated by several pursuit-evasion games, including, but not limited to, edge search, node search or mixed search. More precisely, computing the minimum number of searchers needed to clean a given graph G in the node search game (i.e., computing the node search number of G) is equivalent to computing the connected pathwidth of G. Moreover, a connected path decomposition can be easily translated into the corresponding node search strategy that cleans G and vice versa. For further references that provide more details on correspondences between connected path decomposition and different variants of the search games see e.g. [2, 15, 22, 20]. 1.1 Related work A lot of research has been done in the direction of obtaining FPT algorithms for pathwidth, parametrized by the pathwidth k. One of the early polynomial-time algorithm had running time 2 O(n2k +4k+2 ) [16], and the first FPT (non-constructive) algorithm, with running time O(n2 ), is due to [32]. A number of constructive FPT algorithms have been developed [7, 10, 24, 30]. In these algorithms, in order to produce an optimal solution, an approximate path- or tree-decomposition is pre-computed. It is thus of interest to have good approximations for these problems. Numerous works have been published in this direction [1, 17, 27, 30], leading to the currently fastest algorithm for constant-factor approximation for treewidth, working in time 2O(k) n [8], that is, single exponential in the treewidth k. There exist exact algorithms for computing pathwidth, whose running times are exponential in the order of input graph. Pathwidth can be computed in O∗ (2n )-time (in O∗ (2n ) space) or in O∗ (4n )-time with the use of polynomial space, using a simple algorithm from [9]. There is also a ∗ Faculty † Faculty of Electronics, Telecommunications and Informatics, Gdańsk University of Technology, Gdańsk, Poland of Mathematics and Information Science, Warsaw University of Technology, Warsaw, Poland 1 faster algorithm with running time O∗ (1.9657n ) [34], which has been further improved very recently to O∗ (1.89n ) [26]. See [5, 12, 13] for some experimental approaches to pathwidth computation. For pathwidth, it is known due to [33] that the set of minimal forbidden minors (i.e., the obstruction set) is finite for each fixed pathwidth k. However, a significant difference between pathwidth and connected pathwidth is that the latter one is not closed under taking minors and hence it is not known if the set of minimal forbidden minors for connected pathwidth is finite [4]. We also point out that a number of results have been obtained for connected pathwidth or the closely related connected graph (edge) search, including algorithmic and computational ones [2, 14, 15, 21, 22, 28], monotonicity [23, 35], structural properties [3] or distributed algorithms [11, 18, 25]. 1.2 Motivation The connectivity constraint for pathwidth is natural and useful in graph searching games [2, 18, 22]. The connectivity is in some cases implied by potential applications (e.g., security constraints may enforce the clean, or safe, area to be connected) or it is a necessity, like in distributed or online versions of the problem [6, 11, 25, 29]. Our second motivation comes from connections between pathwidth and connected pathwidth. More specifically, [15] implies that for any graph G, these parameters differ multiplicatively only by a small constant. This implies that an approximation algorithm for connected pathwidth immediately provides an approximation algorithm for pathwidth with asymptotically the same approximation ratio. This may potentially lead to obtaining better approximations for pathwidth since, informally speaking, the algorithmic search space for connected pathwidth is for some graphs much smaller than that for pathwidth. On the other hand, we do not know any algorithm computing the connected pathwidth in time O∗ ((2 − )n ), for any  > 0. Thus, despite this smaller algorithmic search space, it is not clear how these two problems algorithmically differ in the context of designing exact algorithms. During the GRASTA 2017 workshop, Fedor V. Fomin [19] raised an open question, whether we can verify in polynomial time, if the connected pathwidth of the given graph is at most k, for a fixed constant k. In this paper we answer this question in the affirmative. 1.3 Outline In the next section we recall a definition of connected pathwidth and related terms used in this work. Section 3 provides a polynomial-time algorithm for determining whether the connected pathwidth of an arbitrary input graph G is at most k, where k is a fixed integer. Then, Section 4 contains the analysis of the algorithm (its correctness and running time). We finish with some open problems in Section 5. 2 Definitions For a simple graph G = (V (G), E(G)) and a set Y ⊆ V (G), the subgraph with vertex set Y and edge set {{u, v} ∈ E(G) u, v ∈ Y } is denoted by G[Y ] and is called the subgraph induced by Y . For Y ⊆ V (G), we write NG (Y ) to denote the neighborhood of Y in G, defined as NG (Y ) = {v ∈ V (G) \ Y ∃u ∈ Y s.t. {u, v} ∈ E(G)}. Definition 1. A path decomposition of a simple graph G = (V (G), E(G)) is a sequence P = (X1 , . . . , Xl ), where Xi ⊆ V (G) for each i ∈ {1, . . . , l}, and Sl (i) i=1 Xi = V (G), (ii) for each {u, v} ∈ E(G) there exists i ∈ {1, . . . , l} such that u, v ∈ Xi , (iii) for each i, j, k with 1 ≤ i ≤ j ≤ k ≤ l it holds that Xi ∩ Xk ⊆ Xj . The width of a path decomposition P is width(P) = maxi∈{1,...,l} |Xi | − 1. The pathwidth of G, denoted by pw(G), is the minimum width over all path decompositions of G. We say that a path decomposition P = (X1 , . . . , Xl ) is connected if the subgraph G[X1 ∪· · ·∪Xi ] is connected for each i ∈ {1, . . . , l}. A connected pathwidth of a graph G, denoted by cpw(G), is the minimum width taken over all connected path decompositions of G. 2 Finally, a connected partial path decomposition of a graph G is a connected path decomposition (X1 , . . . , Xi ) of some subgraph H of G, where NG (V (G) \ V (H)) ⊆ Xi . In other words, in the latter condition we require that each vertex of H that has a neighbor outside H belongs to the last bag Xi . Intuitively, a connected partial path decomposition of G can be potentially a prefix of some connected path decomposition of G. Also note that if (X1 , . . . , Xl ) is a connected path decomposition, then for each i ∈ {1, . . . , l}, (X1 , . . . , Xi ) is a connected partial path decomposition of G, where H = G[X1 ∪ · · · ∪ Xi ]. 3 The algorithm We say that a path decomposition P of G starts with I ⊆ V (G) if the first bag of P is a single vertex that belongs to I. We will present an algorithm deciding whether, for an input graph G and I ⊆ V (G), there exists a path decomposition of width k − 1 that starts with I. This generalization in which we consider the ‘starting bag’ of a decomposition is dictated by the fact that our algorithm is recursive and on subsequent levels of the recursion the content of the first bag cannot be arbitrary in connected path decompositions (as opposed to just path decompositions). Observe that if we are interested in finding any connected path decomposition of G, it is enough to take I = V (G). This follows from a simple observation that for any connected path decomposition P = (X1 , X2 , . . . , Xl ) of G, the sequence P 0 = (X0 , X1 , . . . , Xl ), where X0 = {v} for some v ∈ X1 , is also a connected path decomposition of G, which starts with I = V (G). In the following by G we denote the input graph with n vertices, I ⊆ V (G) and k are also fixed. In the rest of the work, k refers to the maximum bag size of the connected path decomposition to be computed (thus, the algorithm checks whether cpw(G) ≤ k − 1 for the input graph G). For any S ⊆ V (G), we say that a subgraph H of G is an S-branch if H is a connected component of G − S and NG (V (H)) = S. For any S ⊆ V (G), define B(S) to be the set of all S-branches. A set S is called a bottleneck if the number of S-branches is at least 2k + 1. Observe that each connected component of G − X, for any X ⊆ V (G), is an S-branch for exactly one non-empty subset S of X. 3.1 States By a potential state we mean a triple (X, {BS }S⊆X , {fSB }S⊆X ), consisting of: • a non-empty set X ⊆ V (G) with |X| ≤ k, • a subset BS ⊆ B(S) with cardinality at most 2k, chosen for every non-empty S ⊆ X, • a function fSB : B(S) → {0, 1}, chosen for every non-empty S ⊆ X. We additionally require that if H, H 0 ∈ B(S) \ BS , then fSB (H) = fSB (H 0 ). Observe that the set X may be chosen in at most k · nk ways and the number of choices of S is at most 2k . For every S, the number of S-branches is at most n, so BS can be chosen in at most 2k · n2k ways. The function fSB can be chosen in at most 2|BS | · 2 ≤ 22k+1 ways. Therefore the k k k number of potential states is at most k · nk · (22k+1 )2 · (2k · n2k )2 = O(n3k·2 ), i.e., polynomial in n. With a potential state v = (X, {BS }S⊆X , {fSB }S⊆X ) we associate the following notions. By bag(v) we denote the set X. By cover(v) we denote the set of vertices   [ [  X∪ V (H) . S⊆X,S6=∅ H∈B(S) : fSB (H)=1 By Gv we denote the subgraph of G induced by cover(v). We say that two states u, v are indistinguishable if cover(u) = cover(v) and bag(u) = bag(v). Otherwise states are distinguishable. We note that for such two distinguishable states it may hold that cover(u) = cover(v) but bag(u) 6= bag(v). Let x be a vertex from cover(v) which has a neighbor y ∈ / cover(v). We argue that x ∈ bag(v). Otherwise, if x ∈ / bag(v), then both x and y belong to the same S-branch for some S ⊆ bag(v). Thus, they are either both in cover(v), or outside it. From this it follows that every vertex x ∈ cover(v), which has a neighbor y ∈ / cover(v), must belong to bag(v). Let us denote the set of such vertices x by border(v). We have proved: 3 Observation 1. For each potential state v it holds that border(v) ⊆ bag(v). We say that a potential state v is a state if Gv is connected. We introduce a boolean table T ab, indexed by all states. For a state v, the value of T ab[v] will be set to true by our algorithm if and only if there exists some connected path decomposition P = (X1 , X2 , . . . , Xl ) of Gv , such that width(P) is at most k − 1, P starts with I and Xl = bag(v). We will use a dynamic programming to fill out the table T ab. Then, we will conclude cpw(G) ≤ k−1 (with the additional constraint concerning I) if and only if T ab[v] = true for some state v with cover(v) = V (G). Observe that such a final state exists, since for v = (X, {BS }S , {fsB }S ), we have cover(v) = V (G) if and only if fSB (H) = 1 for every S and H. However, the astute reader may notice that in our representation we might have not included some connected partial path decompositions and it could be possible that we do not find a solution, even though it exists. We will show that if cpw(G) ≤ k − 1, then there exists a special type of a connected path decomposition with width at most k − 1, called a structured path decomposition (defined later), which can be found using our algorithm because, as we will argue, our table T ab does not ‘omit’ any structured path decompositions. We initialize T ab by setting T ab[v] = true for every state v, such that cover(v) = bag(v) = {x}, for some x ∈ I, while for the remaining states v we initialize T ab[v] to be f alse. 3.2 Extension rules Let us introduce a total ordering ≺s on the set of states. We say that u ≺s v if |cover(u)| < |cover(v)|, or |cover(u)| = |cover(v)| and |bag(u)| > |bag(v)|. If |cover(u)| = |cover(v)| and |bag(u)| = |bag(v)|, then we resolve such a tie arbitrarily. In our dynamic programming, we process states according to the ordering ≺s and fill the table T ab using two extension rules: step extension and jump extension. step extension for distinguishable states u, v with |cover(v)| > 1: if T ab[u] = true and (S1) each connected component of G[bag(v)] either contains a vertex from bag(u), or a neighbor of a vertex from bag(u), (S2) border(u) ⊆ bag(v), (S3) cover(v) = cover(u) ∪ bag(v), (S4) bag(v) ∩ cover(u) ⊆ bag(u), then set T ab[v] to true, jump extension for distinguishable states u = (X, {BS }S⊆X , {fSB }S ) and v = (X, {BS }S⊆X , {gSB }S ) with |cover(v)| > 1: if T ab[u] = true and there exists a a bottleneck set S 0 ⊆ X, such that (J1) (J2) (J3) (J4) fSB0 (H) = 0 and gSB0 (H) = 1 for every H ∈ B(S 0 ) \ BS 0 , fSB0 (H) = gSB0 (H) for every H ∈ BS 0 , fSB (H) = gSB (H) for every non-empty S 6= S 0 , S ⊆ X, and H ∈ B(S), for each H ∈ B(S 0 ) \ BS 0 there exists a connected path decomposition PH of H with width at most k − |X| − 1 that starts with NG (S 0 ) ∩ V (H), then set T ab[v] to true. Let us present some intuitions behind these extension rules. In step extension, if u corresponds to some connected partial path decomposition P = (X1 , X2 , . . . , Xl = bag(u)), then v corresponds to a connected partial path decomposition P 0 = (X1 , X2 , . . . , Xl , Xl+1 = bag(v)) (we extend P by adding a single bag, namely bag(v)). In jump extension, if the state u corresponds to some connected partial path decomposition P = (X1 , X2 , . . . , Xl ), then the state v corresponds to a connected partial path decomposition P 0 = (X1 , X2 , . . . , Xl , Xl+1 , Xl+2 , . . . , Xl+l0 ), where Tl+l0 • i=l Xi = Xl = Xl+l0 , • P 00 := (Xl+1 \ Xl , Xl+2 \ Xl , . . . , Xl+l0 \ Xl ) is a path decomposition of the graph induced by S 0 -branches, for some S 0 ⊆ Xl . These are the S 0 -branches H in (J1) and P 00 is obtained by ‘concatenating’ path decompositions from (J4). 4 4 The analysis Let us start by introducing some more definitions and additional notation. Let P = (X1 , X2 , . . . , Xl ) be a path decomposition of G. We say that a connected subgraph H of G is contained in an interval [i, j] of P for some 1 ≤ i ≤ j ≤ l, if V (H) ∩ Xt 6= ∅ if and only if t ∈ {i, . . . , j}. Note that this definition is valid since it follows that for a connected H, the subset of indices t such that V (H) ∩ Xt 6= ∅ is indeed an interval. If H is contained in [i, j], then we denote these endpoints of the interval as i = α(H, P) and j = β(H, P). If P is clear from the context, we will often write shortly α(H) := α(H, P) and β(H) := β(H, P). For a set S and a connected path decomposition P = (X1 , X2 , . . . , Xl ), we say that an S-branch H is an in-branch if S ⊆ Xα(H) and S ⊆ Xβ(H) . The lemma below gives us a lower bound for number of in-branches of S. Lemma 1. For every set S and path decomposition P = (X1 , X2 , . . . , Xl ), at most 2k S-branches are not in-branches. Proof. Consider an S-branch H, which is not an in-branch. This means that S 6⊆ Xα(H) or S 6⊆ Xβ(H) . First, consider H, such that S 6⊆ Xα(H) . Let t be the minimum index i, such that S ⊆ X1 ∪ X2 ∪ · · · ∪ Xi . Let v ∈ S be a vertex in Xt \ (X1 ∪ X2 ∪ · · · ∪ Xt−1 ), it exists by the definition of t. Recall that v is a neighbor of some vertex w of H, so, since P is a path decomposition, there must be a bag Xi containing both v and w. Since Xt is the first bag, where v appears, we observe that i ≥ t and thus β(H) ≥ t. Suppose now that α(H) > t. Note that since S 6⊆ Xα(H) , there is some u ∈ S \ Xα(H) . Recall that u is a neighbor of some vertex from H. However, since u ∈ X1 ∪ X2 ∪ · · · ∪ Xt and u∈ / Xα(H) , the vertex u does no appear in any bag containing a vertex of H, so P cannot be a path decomposition of G. Thus α(H) ≤ t. Therefore, the bag Xt contains at least one vertex from H. Since S-branches are vertex-disjoint and |Xt | ≤ k, we observe that there are at most k S-branches H, such that S 6⊆ Xα(H) . Now consider an S-branch H, such that S ⊆ Xα(H) and S 6⊆ Xβ(H) . Let t0 be the maximum index i, such that S ⊆ Xi ∪ · · · ∪ Xl . Analogously to the previous case, we observe that α(H) ≤ t0 (by the maximality of t0 ) and β(H) ≥ t0 , because S 6⊆ Xβ(H) . Thus the bag Xt0 contains at least one vertex from H, which shows that the number of S-branches H, such that S ⊆ Xα(H) and S 6⊆ Xβ(H) , is at most k. Therefore the total number of S-branches, that are not in-branches is at most 2k, which completes the proof. Recall that a non-empty set S is a bottleneck if |B(S)| > 2k. Thus Lemma 1 implies the following: Corollary 1. If P = (X1 , . . . , Xl ) is a path decomposition and S is a bottleneck, then the following properties hold: 1. S has at least one in-branch, 2. there is i, such that S ⊆ Xi , 3. |S| ≤ k. These properties justify the following definition. Definition 2. For a bottleneck S ⊆ V (G), let t1 (S, P) (respectively t2 (S, P)) be the minimum (respectively maximum) index i such that i = α(H, P) (i = β(H, P), respectively) for some Sbranch H, which is an in-branch. Note that the definition of an in-branch implies that S ⊆ Xt1 (S,P) ∩ Xt2 (S,P) . The interval I(S, P) = [t1 (S, P), t2 (S, P)] is called the interval of S. Again, we will often write shortly t1 (S), t2 (S), and I(S), if P is clear from the context. For a bottleneck S we can refine the classification of S-branches, which are not in-branches. We say that an S-branch H, which is not an in-branch, is • a pre-branch if α(H) < t1 (S), 5 • a post-branch if α(H) ≥ t1 (S) and β(H) > t2 (S). By B x (S, P) we denote the set of all x-branches for S, where x ∈ {pre, in, post}. Again, if P is clear from the context, we will write B x (S) instead of B x (S, P). By C(S) we denote the set of all connected components of G − S, that are not S-branches. Example. The graph G in Figure 1 illustrates the above concepts. The sequence X1 , X2 , . . . , X16 forms a connected path decomposition of G. The only bottleneck set S consists of two vertices denoted by circles. (In this example we take k = 3.) There are 13 S-branches: one pre-branch (G[X1 ∪ X2 \ S]), eleven in-branches (G[Xi \ S] for i = 4, 5, . . . , 14), and one post-branch (G[X15 ∪ X16 \ S]). The interval of S is equal to I(S, P) = [4, 14] and the component G[X3 \ S] is not an S-branch, because some vertices in S do not have a neighbor in this component. X3 X4 X5 X2 X1 S X14 X15 X16 Figure 1: An illustration of two-vertex bottleneck set S and the corresponding S-branches. For a subgraph H of G, we say that H waits in an interval [i, j] of P if V (H) ∩ Xi = V (H) ∩ Xi+1 = · · · = V (H) ∩ Xj . We say that a path decomposition P is S-structured if each S-branch that is not contained in I(S, P) waits in I(S, P), and each component from C(S) waits in I(S, P). The main technical tool in our approach is the following result concerning the structure of connected path decompositions. Lemma 2. If there exists a connected path decomposition P that starts with I, then there is also a connected path decomposition P 0 of width at most width(P) that starts with I, and P 0 is S-structured for every bottleneck S. We define cmin (S, P) as the minimum index i ∈ I(S, P), for which the size of the set   [ Xi ∩  V (H) H∈Bpre (S)∪Bpost (S)∪C(S) S  is minimum. Also, set X ∗ := H∈Bpre (S)∪Bpost (S)∪C(S) V (H) ∩Xcmin (S,P) to be this minimum-size set. Let Γ be the set of all connected path decompositions of G and S be the set of all bottlenecks of G. We will define a function F : S × Γ → Γ, which for given S ∈ S and P ∈ Γ transforms P into an S-structured connected path decomposition of width at most width(P). For simplicity of notation, from now on t1 = t1 (S, P), t2 = t2 (S, P), and cmin = cmin (S, P), whenever S and P are clear from the context. Let B in (S, P) = {H1 , . . . , Hlin }, where the in-branches are ordered according to their first occurrences in P, that is, α(H1 ) ≤ · · · ≤ α(Hlin ). Let X d= (β(H) − α(H) + 1) . H∈Bin (S) In other words, d is the sum of lengths of intervals in which the in-branches H are contained in the path decomposition P = (X1 , X2 , . . . , Xl ). 6 For each in-branch Hi , for i ∈ {1, . . . , lin }, we define the following sequence:  Pi := Xα(Hi ) ∩ V (Hi ), . . . , Xβ(Hi ) ∩ V (Hi ) . Since P is a connected path decomposition of G, it is straightforward to observe that Pi is a connected path decomposition of Hi . We will denote the elements of Pi by   i Pi = X1i , . . . , Xβ(H . i )−α(Hi )+1 Then, let us define a sequence P ∗ as follows: P ∗ := lin Y Pi , i=1 Q where denotes the concatenation of sequences. Observe that the length of P ∗ is exactly d. We will denote the elements of P ∗ by P ∗ = (X1∗ , . . . , Xd∗ ). S Define B in to be the set of vertices of in-branches of S, i.e., B in := H∈Bin (S,P) V (H). Now,  0 we define a path decomposition F (S, P) = X10 , . . . , Xl+d+1 as follows:  Xi for i ∈ {1, . . . , t1 − 1}; (1)     in  Xi \ B for i ∈ {t1 , . . . , cmin − 1}; (2)     in  for i = cmin ; (3)   Xcmin \ B ∗ X ∗ ∪ Xi−c ∪ S for i ∈ {c + 1, . . . , c + d}; (4) Xi0 = min min min    Xc \ B in  for i = c + d + 1; (5) min min    in   X \B for i ∈ {cmin + d + 2, . . . , t2 + d + 1}; (6)   i−d−1  Xi−d−1 i ∈ {t2 + d + 2, . . . , l + d + 1}. (7) Observe that F (S, P) is obtained from P by a modification of the interval [t1 , t2 ] of P. The prefix (X1 , X2 , . . . , Xt1 −1 ) and the suffix (Xt2 +1 , Xt2 +2 , . . . , Xl ) of P are just copied into F (S, P) without any changes (see conditions (1) and (7)). All components of G − S, apart from the in-branches, are covered by bags on positions up to cmin − 1, see (2), and after position cmin + d + 1, see (6), and they wait for d + 2 steps in the interval [cmin , cmin + d + 1] of F (S, P) — see (3)–(5). The interval [cmin + 1, cmin + d] is used in (4) to cover all in-branches, one by one, in the order of their appearance in P. Additional two bags without any vertices of in-branches are added on positions cmin and cmin + d + 1 to ensure that for any other bottleneck S 0 , such that I(S, P) ( I(S 0 , P), we have that cmin (S 0 , P) 6∈ I(S, P), see (3) and (5). See Figure 2 that illustrates the conversion from P to F (S, P) for a bottleneck S. Notice that the interval of S in P 0 is given by t1 (S, P 0 ) = cmin + 1 and t2 (S, P 0 ) = cmin + d, and it is possibly different than [t1 , t2 ]. In the next lemma we show that F (S, P) has all necessary properties. Lemma 3. For any connected path decomposition P that starts with I and a bottleneck S, P 0 = F (S, P) is a connected path decomposition with width(P 0 ) ≤ width(P) that starts with I. Proof. Let us recall the notation: P := (X1 , . . . , Xl ), P 0 = F (S, P) = (X10 , . . . , Xl00 ), t1 = t1 (S, P) S in and t2 = t2 (S, P), B := H∈Bin (S,P) V (H). Moreover, define  B not-in :=   [ V (H) . H∈Bpre (S,P)∪Bpost (S,P)∪C(S) Also, recall that Xi0 = Xi , 1 ≤ i < t1 and Xi0 = Xi−d−1 , for all t2 + d + 2 ≤ i ≤ l0 . First, we want to show that P 0 satisfies conditions in Definition 1. Let {u, v} be an edge of G. Since P is a path decomposition, u, v ∈ Xi for some i. If i < t1 , 0 then u, v ∈ Xi0 = Xi . If i > t2 , then u, v ∈ Xi+d+1 = Xi . So suppose that u, v ∈ Xi for i ∈ [t1 , t2 ]. Note that this means that u, v ∈ B in ∪ S or u, v ∈ B not-in ∪ S. If u, v ∈ B not-in ∪ S, then we have (i) u, v ∈ Xi0 , if i ≤ cmin ; 7 C3 C1 C2 H2pre H3pre H1pre H1post H2post H2in H1in H3in t1 (S, P) cmin t2 (S, P ) (a) S-branches for a path decomposition P before transformation. cmin + d + 1 cmin C3 C1 C2 H2pre H3pre H1post H1pre H2post H1in t1 (S, P) H2in H3in t2 (S, P 0 ) t1 (S, P 0 ) t2 (S, P) + d + 2 (b) New bags are inserted into P in which all components apart from in-branches wait in the interval of S in P 0 , i.e., C2 , C3 , H2pre wait in [t1 (S, P 0 ), t2 (S, P 0 )]. Figure 2: Illustration of the conversion from P to P 0 = F (S, P) for a bottleneck S. For simplification, S is assumed to only have 8 S-branches and 3 components, which are denoted by letters H and C, respectively, with appropriate indices. 0 , otherwise. (ii) u, v ∈ Xi+d+1 Finally, consider the case that, say, u ∈ B in and v ∈ B in ∪ S (if both u, v ∈ S, then we are at the previous case). This means that u is a vertex of some in-branch Hs ∈ B in (S, P), so it appears in some bag of Ps and thus of P ∗ . This implies that u, v ∈ Xj0 for some j ∈ [cmin + 1, cmin + d]. This implies that P 0 satisfies conditions (i) and (ii) from Definition 1. Now let us verify that the condition (iii) is also satisfied, i.e., for every vertex v and indices i < s < j, such that v ∈ Xi0 ∩ Xj0 we have v ∈ Xs0 . Clearly the condition is satisfied for every v and j < t1 or i > t2 , since these parts of P 0 are just copied from P without any modifications. The situation is very similar if i ≤ t2 and j ≥ t1 and v ∈ S ∪ B not-in \ X ∗ . If v ∈ X ∗ , then v is included in all bags Xs0 for s ∈ [cmin , cmin + d + 1], so the condition (iii) follows from the correctness of P. Finally, if v is a vertex of some Ha ∈ B in (S, P), then the condition (iii) follows from the correctness of Pa . Observe that we can show that the path decomposition P 0 is connected in the analogous way. Next thing to show is that width(P 0 ) ≤ width(P). Let c1 = |X ∗ | and c2 = max B in ∩ Xi , and i=t1 ,...,t2 let k = width(P) + 1 = max |Xi |. Observe that each Xi0 for i ∈ / {t1 , . . . , t2 + d + 1} is an exact i=1,...,l copy of some Xj , so |Xi0 | ≤ k. Moreover, each Xi0 for i ∈ {t1 , . . . , cmin }∪{cmin +d+1, . . . , t2 +d+1} was obtained from some Xj by removal of vertices of B in , so again we have |Xi | ≤ k. Finally, for i ∈ {cmin + 1, . . . , cmin + d} we have ∗ |Xi0 | = |S| + |X ∗ | + Xi−c ≤ |S| + c1 + c2 . min However, by the definition of P ∗ , we observe that |S| + c1 + c2 ≤ |Xj | for some j ∈ {t1 , . . . , t2 }. Therefore, width(P 0 ) ≤ width(P). Finally, recall that P starts with I, i.e., X1 is a one-element subset of I. Observe that Xt1 (S,P) contains whole S and at least one vertex from an S-branch (an in-branch, to be more specific). Since S 6= ∅, we conclude that Xt1 (S,P) cannot be X1 , so X10 = X1 and therefore P 0 starts with I too. 8 Observe that every connected component H of G − S is either contained in I(S, P 0 ) (which means that H is an in-branch) or waits in I(S, P 0 ) (for all other H). Observation 2. For any P and bottleneck S, the path decomposition P 0 = F (S, P) is S-structured. Now we want to define a series of transformations, which start at an arbitrary connected path decomposition P and transform it into a connected path decomposition with no larger width, which is S-structured for every S ∈ S. For this, we will apply the F -transformations for all bottlenecks. In order to do this we need some technical lemmas about the structure of bottlenecks and their branches. Lemma S 0 be any bottlenecks, such that S 0 ( S. There exists an S 0 -branch H such S 4. Let S and 0 that H 0 ∈B(S) V (H ) ∪ S \ S 0 ⊆ V (H) and every S 0 -branch H 0 , different than H, is a non-branch connected component of G − S. Proof. Let S, S 0 ∈ S such that S 0 ( S. Note that for each s ∈ S \ S 0 and each S-branch H 0 , there is a vertex v of H 0 , which is adjacent to s. Thus, all vertices in (S \ S 0 ) ∪ V (H 0 ) belong to the same 0 0 connected component H of G − S 0 . But since this is true for every S S-branch H , and S \ S may be contained in just one connected component, we conclude that H 0 ∈B(S) V (H 0 ) ∪ S \ S 0 ⊆ V (H). To see that H is an S 0 -branch, consider a vertex s0 ∈ S 0 . By assumption, S 0 ⊆ S and hence s0 is also a vertex of S. Thus, s0 has a neighbor in every S-branch H 0 , and thus in H. Now consider an S 0 -branch H 00 6= H. If every vertex of S \ S 0 is adjacent to some vertex of H 00 , then H 00 is an S-branch, a contradiction. Thus, H 00 is a connected component of G − S, which is not an S-branch. See Figure 3 for an illustration. C(S) B(S) S 0 -branch H S S0 0 B(S ) \ {H} C(S 0 ) C(S) Figure 3: Illustration for Lemma 4; S and S 0 are bottlenecks, such that S 0 ( S. All S-branches are subgraphs of an S 0 -branch H and every S 0 -branch, different than H, is a connected component of G − S, which is not an S-branch. Lemma 5. For any bottlenecks S, S 0 , if S 0 * S, then there exists exactly one connected component H of G − S such that S 0 ⊆ S ∪ V (H). Proof. Let S, S 0 ∈ S such that S 0 * S. Clearly S 0 intersects some connected component of G − S. Suppose that S 0 has a non-empty intersection with two connected components H and H 0 of G − S. Thus, since every S 0 -branch H 00 is connected and NG (V (H 00 )) = S 0 , we observe that H 00 contains a vertex of S. Since S 0 -branches are vertex-disjoint, this implies that the number of such S 0 -branches is at most |S|, which is in turn at most k by Corollary 1. However, this contradicts the assumption that S 0 is a bottleneck. Next remark is a straightforward consequence of Lemma 4 and Lemma 5. Remark 1. Let S, S 0 be bottlenecks such that S 0 * S and S * S 0 . Let H be the connected component of G − S,Ssuch that S 0 ⊆ S ∪ V (H). There exists exactly one connected component C of G − S 0 such that H 0 ∈B(S)\H V (H 0 ) ∪ S \ S 0 ⊆ V (C). Moreover, all S 0 -branches but possibly C are subgraphs of H. 9 C(S) C(S) B(S) B(S) S S C C S0 B(S 0 ) H 0 H S0 C(S ) B(S 0 ) (a) S \ S 0 6= ∅ and S ∩ S 0 6= ∅. S0 C(S 0 ) (b) S ∩ S 0 = ∅. Figure 4: Illustration of two cases for Lemma 5 and Remark 1; S and S 0 are bottlenecks. All S-branches (apart from H, which is a connected component of G − S, which may or may be not an S-branch) are subgraphs of C and S 0 ⊆ S ∪ V (H). See Figure 4 for the illustration for Lemma 5 and Remark 1. We say two bottlenecks S, S 0 are well-nested in P if (i) I(S 0 , P) ( I(S, P) or (ii) I(S, P) ⊆ I(S 0 , P) or (iii) I(S, P) ∩ I(S 0 , P) = ∅. Observe that the ordering of S, S 0 in the definition above matters. Lemma 6. For any connected path decomposition P and bottlenecks S, S 0 , if P is S 0 -structured, then S and S 0 are well-nested in P. Moreover, if S ( S 0 , then either I(S, P) ∩ I(S 0 , P) = ∅ or I(S 0 , P) ⊆ I(S, P). Proof. Let P = (X1 , . . . , Xl ) be a connected path decomposition of G and let S, S 0 ∈ S. Suppose P is S 0 -structured. Let us assume that I(S 0 , P) ∩ I(S, P) 6= ∅, we will show that either I(S 0 , P) ( I(S, P) or I(S, P) ⊆ I(S 0 , P). Case A: S 0 ( S. By Lemma 4, there exists an S 0 -branch H such that for every S-branch H 0 it holds that S \ S 0 ∪ V (H 0 ) ⊆ V (H), and thus [α(H 0 ), β(H 0 )] ⊆ [α(H), β(H)]. Recall that t1 (S) = α(H10 ) and t2 (S) = β(H20 ) for some in-branches H10 , H20 ∈ B(S), so I(S, P) = [t1 (S), t2 (S)] ⊆ [α(H), β(H)]. Consider two subcases. Subcase A1: α(H) ∈ I(S 0 , P). Since P is S 0 -structured, we observe that H is an in-branch for S 0 , which implies that I(S, P) ⊆ [α(H), β(H)] ⊆ I(S 0 , P). Subcase A2: α(H) ∈ / I(S 0 , P). First, observe that if α(H) > t2 (S 0 ), then t1 (S) > t2 (S 0 ) 0 and thus I(S, P) ∩ I(S , P) = ∅, which contradicts our assumption. Analogously, if β(H) < t1 (S 0 ), we again obtain that I(S, P) ∩ I(S 0 , P) = ∅. Therefore assume that α(H) < t1 (S 0 ) ≤ β(H). Observe that this implies that H is a pre-branch for S 0 and, since P is S 0 -structured, H waits in I(S 0 , P). In particular (S \ S 0 ) ∩ Xt1 (S 0 ) = (S \ S 0 ) ∩ Xt1 (S 0 )+1 = . . . = (S \ S 0 ) ∩ Xt2 (S 0 ) . Since I(S 0 , P) ∩ I(S, P) 6= ∅, it is necessary that t1 (S) ≤ t1 (S 0 ) (otherwise t1 (S) > t2 (S 0 )). Thus, t1 (S) ≤ t1 (S 0 ) ≤ t2 (S 0 ) ≤ t2 (S) (recall H waits in I(S 0 , P)). Summing up, if S 0 ( S, then either I(S 0 , P) ( I(S, P) or I(S, P) ⊆ I(S 0 , P), which completes the proof for this case. 10 Case B: S 0 * S. By Lemma 5, there exists exactly one connected component H of G − S such that S 0 ⊆ S ∪ V (H). Since S 0 * S, we observe that V (H) ∩ S 0 6= ∅. If H is an S-branch that is an in-branch in P, then I(S 0 , P) ⊆ [α(H, P), β(H, P)] ⊆ I(S, P). We observe that I(S 0 , P) ⊆ I(S, P) is equivalent to I(S 0 , P) ( I(S, P) or I(S 0 , P) = I(S, P), thus S and S 0 are well-nested in P. So assume that H is a connected component of G − S, that is not an in-branch for S (it may still be a pre- or a post-branch). We consider now two subcases. Subcase B1: S ( S 0 . By Lemma 4, all S-branches possibly except for H are non-branch components of G − S 0 and all S 0 -branches are subgraphs of H. Because P is S 0 -structured, every S-branch but possibly H waits in I(S 0 , P). In particular, every in-branch H 00 for S does wait in I(S 0 , P). Thus, for every such an in-branch H 00 it holds that I(S 0 , P) ⊆ [α(H 00 ), β(H 00 )] or I(S 0 , P) ∩ [α(H 00 ), β(H 00 )] = ∅. Note that the second condition implies that I(S 0 , P) ∩ I(S, P) = ∅, which contradicts our assumption. Therefore we obtain that I(S 0 , P) ⊆ [α(H 00 ), β(H 00 )] ⊆ I(S, P). Note that this shows the second claim of the lemma. 0 0 S Subcase B2:0 S \ S 6=0 ∅. Let C be the connected component of G − S , for which it holds H 0 ∈B(S)\H V (H ) ∪ S \ S ⊆ V (C), whose existence is guaranteed by Remark 1. If C is an in-branch for S 0 , we observe that I(S, P) ⊆ [α(C), β(C)] ⊆ I(S 0 , P), because P is 0 S -structured. On the other hand, if C is not an in-branch for S 0 , then all in-branches of S wait in I(S 0 , P). This is because all subgraphs but in-branches of S 0 wait in I(S 0 , P), and every in-branch for S is vertex-disjoint with every in-branch for H, since they are all contained in V (C) ∪ S 0 . Thus, since I(S, P) ∩ I(S 0 , P) 6= ∅, we conclude that I(S 0 , P) ⊆ I(S, P), which completes the proof. In the next lemma, we show that we can apply a series of F -transformations, one for each bottleneck, so that the structure obtained in previous F -transformations is not ’destroyed’ during the subsequent F -transformations. Lemma 7. Let S, S 0 be bottlenecks and let P be an S-structured connected path decomposition. Let P 0 = F (S 0 , P). 1. If I(S 0 , P) ⊆ I(S, P), then P 0 is S-structured and I(S 0 , P 0 ) ⊆ I(S, P 0 ). 2. If t2 (S, P) < t1 (S 0 , P), then P 0 is S-structured and t2 (S, P 0 ) < t1 (S 0 , P 0 ). 3. If t2 (S 0 , P) < t1 (S, P), then P 0 is S-structured and t2 (S 0 , P 0 ) < t1 (S, P 0 ). Proof. Let P = (X1 , . . . , Xl ) be a connected path decomposition of G, let S, S 0 ∈ S and P 0 = F (S 0 , P). Moreover, assume that P is S-structured. First, let us prove case 1, i.e. we assume that I(S 0 , P) ⊆ I(S, P). Observe that by Lemma 6 we obtain that S 0 * S. By Lemma 5, there exists exactly one connected component H of G − S such that S 0 ⊆ S ∪ V (H). We observe that H is an in-branch for S, otherwise H would wait in I(S, P), which contradicts the assumption that I(S 0 , P) ⊆ I(S, P) and that P is S-structured. We are going to show now that every S 0 -branch H 0 , which is an in-branch, is a subgraph of H. If S ( S 0 , then we obtain it immediately from Lemma 4, so let S \S 0 6= ∅. Let C be a connected component of S 0 G − S , such that H 0 ∈B(S)\H V (H 0 ) ∪ S \ S 0 ⊆ V (C), whose existence is guaranteed by Remark 1. Recall that C might or might not be an S 0 -branch, but for sure it is not an in-branch for S 0 , because then I(S, P) ( I(S 0 , P), which is a contradiction. Thus, by Remark 1, every in-branch for S 0 is a subgraph of H. Because every in-branch for S 0 is a subgraph of H, we conclude that I(S 0 , P) ⊆ [α(H, P), β(H, P)] and the only changes made by the transformation F (S 0 , P) concern the vertices of H ∈ B in (S). Every connected component of G − S 0 , apart from in-branches (for S 0 ), waits in I(S 0 , P 0 ), so F (S 0 , P) is S-structured and I(S 0 , P 0 ) ⊆ [α(H, P 0 ), β(H, P 0 )] ⊆ I(S, P 0 ). To see that cases 2 and 3 hold as well, notice that the prefix (X1 , X2 , . . . , Xt1 (S 0 ,P)−1 ) and suffix (Xt2 (S 0 ,P)+1 , Xt2 (S 0 ,P)+2 , . . . , Xl ) of P are just copied into P 0 without any changes. In the following lemma it is crucial that the path decomposition P is not only S-structured but has been obtained by by applying the transformation described in (1)-(7) to P0 . In particular, the bags added in (3) and (5) will play a crucial role in ensuring that the path decomposition returned by F (S 0 , P) remains S-structured. 11 Lemma 8. Let S, S 0 be bottlenecks and let P0 be any connected path decomposition. Let P = F (S, P0 ) and P 0 = F (S 0 , P). If I(S, P) ( I(S 0 , P), then P 0 is S-structured and I(S, P 0 ) ⊆ I(S 0 , P 0 ) or I(S, P 0 ) ∩ I(S 0 , P 0 ) = ∅. Proof. Let P = (X1 , . . . , Xl ) be a connected path decomposition of G, let S, S 0 ∈ S and P 0 = F (S 0 , P). Moreover, assume that P = F (S, P0 ) for some connected path decomposition P0 . In particular, this implies that P is S-structured. Finally, assume that I(S, P) ( I(S 0 , P). S Case A: S 0 ( S. By Lemma 4 there exists an S 0 -branch H such that H 0 ∈B(S) V (H 0 ) ∪ S \ S 0 ⊆ V (H). If H is an in-branch for S 0 then I(S, P) ⊆ [α(H, P), β(H, P)] ( I(S 0 , P). However, recall that F -transformation applied to S 0 and P does not change the structure of the bags restricted to H (or any other in-branch of S 0 ). Therefore we conclude that I(S, P 0 ) ⊆ [α(H, P 0 ), β(H, P 0 )] ( I(S 0 , P 0 ) and P 0 is S-structured. Now assume that H is a pre-branch or a post-branch for S 0 . From the construction of P we have that cmin (S 0 , P) 6∈ I(S, P). Because every in-branch H 0 for S 0 either waits in I(S, P) or [α(H 0 , P), β(H 0 , P)] ∩ I(S, P) = ∅, we obtain that I(S, P 0 ) ∩ I(S 0 , P 0 ) = ∅ and P 0 is S-structured. Case B: S 0 * S and S * S 0 . By Lemma 5 there exists exactly one connected component H of G−S such that S 0 ⊆ S ∪V (H). Because V (H)∩S 0 6= ∅ we have that I(S 0 , P) ⊆ [α(H, P), β(H, P)]. We observe that H cannot be an in-branch for S, otherwise I(S 0 , P) ⊆ [α(H, P), β(H, P)] ⊆ I(S, P), which contradicts the assumption that I(S, P) ( I(S 0 , P). Thus, H 6∈ B in (S). From the facts that P is S-structured and I(S 0 , P) ⊆ [α(H, P), β(H, P)], we observe that H waits in I(S, P). By Remark 1 there exists a connected component C of G − S 0 such that S 0 0 H 0 ∈B(S)\H V (H ) ∪ S \ S ⊆ V (C). Because H is not an in-branch for S, all in-branches of S are subgraphs of C. If C is an in-branch for S 0 then I(S, P) ⊆ [α(C, P), β(C, P)] ( I(S 0 , P). Because F -transformation does not change bags inside one in-branch, we have that I(S, P 0 ) ⊆ [α(C, P 0 ), β(C, P 0 )] ( I(S 0 , P 0 ) and P 0 is S-structured. On the other hand, assume that C is not an in-branch for S 0 . From construction of P we have that cmin (S 0 , P) 6∈ I(S, P) Because every in-branch H 0 for S 0 either waits in I(S, P) or [α(H 0 , P), β(H 0 , P)] ∩ I(S, P) = ∅, we obtain that I(S, P 0 ) ∩ I(S 0 , P 0 ) = ∅ and P 0 is S-structured. S Case C: S ( S 0 . From Lemma 4 there exists an S-branch H such that H 0 ∈B(S 0 ) V (H 0 ) ∪ S 0 \ S ⊆ V (H), i.e., I(S 0 , P) ⊆ [α(H, P), β(H, P)]. We observe that H cannot be an in-branch for S, otherwise I(S 0 , P) ⊆ [α(H, P), β(H, P)] ⊆ I(S, P), which contradicts the assumption that I(S, P) ( I(S 0 , P). Let then H be a pre-branch or a post-branch for S, which means that H waits in I(S, P) (notice that it is impossible that [α(H, P), β(H, P)] ∩ I(S, P) = ∅, because then I(S 0 , P) ∩ I(S, P) = ∅). From construction of P we have that cmin (S 0 , P) 6∈ I(S, P). Because every in-branch H 0 for S 0 either waits in I(S, P) or [α(H 0 , P), β(H 0 , P)] ∩ I(S, P) = ∅, we obtain that I(S, P 0 ) ∩ I(S 0 , P 0 ) = ∅ and P 0 is S-structured. Now we are ready to prove Lemma 2. Proof of Lemma 2. Let P be a connected path decomposition that starts with I. Let S = {S1 , S2 , . . . , Sn0 } be the set of all bottlenecks. We define a path decomposition P 0 := Pn0 in the following, recursive way: P0 = P; Pi = F (Si , Pi−1 ), for i ∈ {1, . . . , n0 }. We are going to prove now that Pq is Sj -structured and Si , Sj are well-nested in Pq for every 1 ≤ j ≤ q ≤ n0 and 1 ≤ i ≤ n0 . Induction on q. If q = 1, then obviously j = 1 and thesis holds for every 1 ≤ i ≤ n0 from Lemma 6. So assume that q > 1 and the claim holds for q − 1. Let j ∈ {1, . . . , q − 1}. For every Sj we have, by the induction assumption, that Sq , Sj are well-nested in Pq−1 and Pq−1 is Sj -structured. By Lemma 8, if I(Sj , Pq−1 ) ( I(Sq , Pq−1 ), then Pq = F (Sq , Pq−1 ) is Sj -structured. By Lemma 7, if I(Sq , Pq−1 ) ⊆ I(Sj , Pq−1 ) or I(Sj , Pq−1 ) ∩ I(Sq , Pq−1 ) = ∅, then Pq = F (Sq , Pq−1 ) is Sj -structured. 12 Because Pq is Sj -structured, then from Lemma 6 for any i ∈ {1, . . . , n0 } we have that Si , Sj are well-nested in Pq . So P 0 is S-structured for every bottleneck S ∈ S. Note that Lemma 3 ensures that P 0 is a connected path decomposition of width at most width(P), that starts with I, which finishes the proof. Now we are ready to show the correctness of our algorithm. We will prove it in two steps. Lemma 9. If G has a connected path decomposition of width at most k − 1 that starts in I, then T ab[v] = true for some state v with cover(v) = V (G). Proof. Suppose that G has a connected path decomposition of width k − 1 that starts with I. By Lemma 2, there exists a connected path decomposition P = (X1 , . . . , Xl ) that has width k − 1, starts with I, and is S-structured for each bottleneck S. By Lemma 6, the set S of all bottlenecks with relation S ≺ S 0 if and only if I(S, P) ⊆ I(S 0 , P) forms a partial order (a assuming that any ties, i.e., when I(S, P) = I(S 0 , P) are resolved arbitrarily). Let S1 , . . . , St be the maximal elements with respect to this partial order. Note that for i 6= j, I(Si , P) ∩ I(Sj , P) = ∅ and for any bottleneck S 0 ∈ / {S1 , . . . , St } we have I(S 0 , P) ⊆ I(Si , P) for some i ∈ {1, . . . , t}. Assume without loss of generality that the ‘maximal’ bottlenecks are ordered according to the left endpoints of their intervals, t1 (S1 ) ≤ t1 (S2 ) ≤ · · · ≤ t1 (St ). We show how to arrive at the desired state v. To that end we argue, by induction on j, that for each k [ {t1 (Si ), . . . , t2 (Si ) − 1} j ∈ J := {1, . . . , l} \ i=1 there exists a state vj such that cover(vj ) = G[X1 ∪ · · · ∪ Xj ], bag(vj ) = Xj and T ab[vj ] = true. Since P starts with I, this clearly holds for j = 1 so take j > 1 and assume that the claim is true for each j 0 ∈ J ∩ {1, . . . , j − 1}. We consider two cases. In the first case suppose that j∈ / I(Si , P) for each i ∈ {1, . . . , t}. Hence we have j − 1 ∈ J. This implies, according to Lemma 1, that for each bottleneck S, either there are at most 2k S-branches H such that α(H) ≤ j, or there are at most 2k S-branches such that j ≤ β(H). Thus, there exists a state vj such that cover(vj ) = G[X1 ∪ · · · ∪ Xj ] and bag(vj ) = Xj . The step extension rule and T ab[vj−1 ] = true, which holds by the induction hypothesis, imply T ab[vj ] = true as required. In the second case we have j ∈ I(Si , P) for some bottleneck Si . By the definition of the set J, j = t2 (Si ). Hence, the preceding index of j in the set J is j 0 = t1 (Si ) − 1. Again, by the definition of I(Si , P), Lemma 1, and the maximality of Si with respect to the partial order, we have that for each bottleneck set S either at most 2k S-branches H satisfy α(H) ≤ j 0 , or at least |B(Si0 )| − 2k S-branches H are contained in [1, j 0 ], i.e., satisfy β(H) ≤ j 0 , depending whether t2 (S) ≤ j 0 or t1 (S) > j 0 . Thus, there exists a state vj such that cover(vj ) = G[X1 ∪ · · · ∪ Xj ] and bag(vj ) = Xj . Consider the jump extension rule constructed for S 0 = Si . For the set BS 0 in (J1) and (J2) take all S 0 -branches that are in-branches, i.e., those that are covered in [j 0 + 1, j] in P. Note that each S-branch of each bottleneck S 6= Si such that S ⊆ Xj 0 waits in the interval I(Si , P) because P is Si -structured, which ensures the condition (J3). Condition (J4) holds because the decomposition PH in (J4) exist which is certified by the decomposition P, namely PH = (Xα(H) ∩ V (H), . . . , Xβ(H) ∩ V (H)). Thus, T ab[j 0 ] = true (which holds by the induction hypothesis) ensures that T ab[j] = true. Finally observe that l ∈ J, cover(vl ) = G[X1 ∪ · · · ∪ Xl ] = V (G) and T ab[vl ] = true. Thus, v = vl is the required state. Lemma 10. For any state v, if T ab[v] = true, then Gv has a connected path decomposition with width at most k − 1 that starts with I. Proof. Proof by induction on the position of v in the ordering ≺s . First, let cover(v) = {x} for some x ∈ V (G) (notice that such states are smallest, according to ≺s ). If x ∈ I, then T ab[v] was set true in the initialization step. This is justified by considering connected path decomposition consisting of a single bag {x}, which is a proper connected path decomposition of the single-vertex graph ({x}, ∅). On the other hand, if x ∈ / I, then T ab[v] is f alse, as the extension rules apply 13 only to states with |cover(v)| > 1. This is also correct, as no decomposition of Gv may start with a vertex from I. Now suppose that |cover(v)| ≥ 2, and the Lemma holds for all states u ≺s v. Since T ab[v] = true, its value must have been set by one of the extension rules. Consider two cases. Case 1: T ab[v] was set by step extension. Consider the state u. If bag(v) 6⊆ bag(u), then since by (S4), bag(v) ∩ cover(u) ⊆ bag(u), we have that bag(v) 6⊆ cover(u). Therefore, cover(v) = cover(u) ∪ bag(v) implies that |cover(v)| > |cover(u)|, which means that u ≺s v. On the other hand, if bag(v) ⊆ bag(u), we have cover(v) = cover(u) due to (S3). However, since v and u, are distinguishable, we have bag(v) ( bag(u), so |bag(v)| < |bag(u)| and thus u ≺s v. So, by the inductive assumption, T ab[u] was set properly and there exists a connected path decomposition P = (X1 , X2 , . . . , Xl ) of Gu that starts with I and has width at most k − 1, where Xl = bag(u). Let Xl+1 := bag(v) and let P 0 := (X1 , X2 , . . . , Xl , Xl+1 ). Sl Sl+1 We claim that P 0 is a connected path decomposition of Gv . Indeed, i=1 Xi = i=1 Xi ∪Xl+1 = cover(u) ∪ bag(v) = cover(v). Now, consider an edge xy of Gv . If both x, y belong to cover(u), they appear in some Xi for i ≤ l (by the inductive assumption). If both x, y belong to bag(v), we are done too. Finally, if x ∈ cover(u) and y ∈ bag(v) \ cover(u), we know from (S2) that x ∈ border(u) ⊆ bag(v), so we are again in the previous case. Now suppose for a contradiction that there are some 1 ≤ i < j ≤ l, such that Xi ∩ Xl+1 6⊆ Xj . This means that bag(v) = Xl+1 contains a vertex of cover(u) \ bag(u), which is a contradiction with (S4). Moreover, since width(P) ≤ k −1 and |bag(v)| ≤ k, we have width(P 0 ) ≤ k −1. Finally, since P is connected and (according to (S1)) every connected component of Xl+1 either contains a vertex of Xl , or is adjacent to one, we observe that P 0 is also connected. Finally, we immediately obtain from induction hypothesis that P 0 starts with I. This justifies setting T ab[v] = true. Case 2: T ab[v] was set by jump extension. Let u = (X, {BS }S , {fSB }S ), v = (X, {BS }S , {gSB }S ) and let S 0 ⊆ X be defined as in the definition of the jump extension. To simplify the notation, set B 0 := B(S 0 ) \ BS 0 = {H1 , H2 , . . . , Hm }. Observe that since S 0 is a bottleneck, we have |B(S 0 )| ≥ 4k + 1, thus there is at least one H ∈ B 0 . Since V (H) 6⊆ cover(u) and V (H) ⊆ cover(v) by (J1), we have |cover(u)| < |cover(v)| and thus u ≺s v. So, by the inductive assumption, T ab[u] was set properly to be true and there exists a connected path decomposition P = (X1 , X2 , . . . , Xl ) of Gu with width at most k − 1, where Xl = X = bag(u). By (J4), for every H ∈ B 0 there is a H connected path decomposition PH = (X1H , X2H , . . . , Xl(H) ) of width at most k − |X| − 1, such that H 0 X1 contains a neighbor of S . We claim that   m l(H Y Yi ) P0 = P ◦  (Xl ∪ XjHi ) ◦ Xl , i=1 j=1 Q where both ◦ and denote concatenation of appropriate sequences, is a connected path decomposition of Gv , with width at most k − 1. S First, observe that cover(v) = cover(u) ∪ H∈B0 V (H) due to (J2) and (J3). By the definition of P and decompositions PH for H ∈ B 0 , we observe that P 0 covers exactly cover(v). Now consider an edge xy of Gv . If both vertices x, y belong to cover(u), or to V (H) for some H ∈ B 0 , then, by the definition of P and PH , both x and y appear in some bag of the decomposition P 0 . If x ∈ cover(u) and y ∈ V (H) for some H ∈ B 0 , then we know that x ∈ border(u) and therefore x ∈ Xl , so both vertices appear in every bag containing y. Finally, we observe that there are no edges joining vertices from different S 0 -branches. The third condition of the definition of path decomposition follows directly from the definition of P and PH and the fact that subgraphs H are S 0 -branches. Observe that |Xi | ≤ k − 1 for i ≤ l (by the definition of P), and since |XjH | ≤ k − |X| − 1 for every H and j, we have |X ∪ XjH | ≤ k − 1, so width(P 0 ) ≤ k − 1. Since P starts with I according to the induction hypothesis, so does P 0 . Finally, P 0 is connected, since P is connected, each PH is connected, and for each H ∈ B 0 , the set X1H contains a neighbor of S 0 ⊆ X. This completes the proof. Combining Lemmas 9 and 10, we obtain the following corollary. 14 Corollary 2. The algorithm is correct, i.e., the value of T ab[v] is true for some state v with cover(v) = V (G) if and only if cpw(G) ≤ k − 1. Now let us prove the main result of the paper. Theorem 1. For every fixed k ≥ 1, there is an algorithm determining if cpw(G) ≤ k − 1 in time f (k) · nO(g(k))) , for some functions f, g depending on k only, i.e., in time polynomial in n. Proof. We do induction on k. First, observe that for a connected graph G, cpw(G) = 0 if and only if G is a single-vertex graph, and cpw(G) = 1 if and only if G is a caterpillar, and this can be checked in polynomial time. So assume that k ≥ 2 and that the claim holds for all k 0 ≤ k − 1. We run the dynamic programming algorithm that we described in Section 3 for I = V (G). The correctness of the algorithm follows from Corollary 2. Now let us estimate its computational complexity. Recall that k k the total number of states is O(n3k·2 ), so the total number of pairs of states is O(n6k·2 ). For each pair of states we check if one of the extension rules can be applied. Observe that for each state v, we can compute cover(v), bag(v) and border(v) in polynomial time. Thus checking if the step extension can be applied can also be done in polynomial time. Now consider the possible jump extension from a state u to a state v. Verifying first three conditions can be clearly done in polynomial time. We check in (J4) if the appropriate path decomposition PH of each S 0 -branch H exists by calling the algorithm recursively with the initial set NG (S 0 ) ∩ V (H). By the inductive assumption, this can be done in total time bounded by 0 k nO(1) · f 0 (k − 1)ng (k−1) , for some functions f 0 , g 0 . This gives total time complexity nO(1) · n6k·2 · 0 f 0 (k − 1) · ng (k−1) = f (k) · ng(k) for some functions f, g. Observe that the function g(k) in Theorem 1 is large, in particular, it is exponential in k. We did not try to optimize this, as we were only interested in obtaining a polynomial-time algorithm for every fixed k. 5 Open problems As pointed out, both pathwidth and connected pathwidth are asymptotically the same for an arbitrary graph G, namely cpw(G)/pw(G) ≤ 2 + o(1). However, there are several open questions regarding the complexity of exact algorithms for connected pathwidth. One such immediate question that is a natural next step in the context of our work is whether connected pathwidth is FPT with respect to this parameter? Also, it is not known if connected pathwidth can be computed faster than in time O∗ (2n ) for an arbitrary n-vertex graph (recall that this is possible for pathwidth). The notion of connected pathwidth appeared in the context of pursuit-evasion games called node search, edge search or mixed search. A challenging and long-standing open question related to those games is whether their connected variants belong to NP? See [2] for more details regarding this question. Acknowledgements This research has been partially supported by National Science Centre (Poland) grant number 2015/17/B/ST6/01887. References [1] Eyal Amir. Approximation algorithms for treewidth. Algorithmica, 56(4):448–479, 2010. [2] L. Barrière, P. Flocchini, F.V. Fomin, P. Fraigniaud, N. Nisse, N. Santoro, and D.M. Thilikos. Connected graph searching. Inf. Comput., 219:1–16, 2012. [3] L. Barrière, P. Fraigniaud, N. Santoro, and D.M. Thilikos. Connected and internal graph searching. Technical report, Technical Report, UPC Barcelona, 2002. 15 [4] Micah J. Best, Arvind Gupta, Dimitrios M. Thilikos, and Dimitris Zoros. Contraction obstructions for connected graph searching. Discrete Applied Mathematics, 209:27–47, 2016. [5] Therese C. Biedl, Thomas Bläsius, Benjamin Niedermann, Martin Nöllenburg, Roman Prutkin, and Ignaz Rutter. Using ILP/SAT to determine pathwidth, visibility representations, and other grid-based graph drawings. In Graph Drawing - 21st International Symposium, GD 2013, Bordeaux, France, September 23-25, 2013, Revised Selected Papers, pages 460–471, 2013. [6] L. Blin, P. Fraigniaud, N. Nisse, and S. Vial. Distributed chasing of network intruders. Theor. Comput. Sci., 399(1-2):12–37, 2008. [7] Hans L. Bodlaender. A linear-time algorithm for finding tree-decompositions of small treewidth. SIAM J. Comput., 25(6):1305–1317, 1996. [8] Hans L. Bodlaender, Pål Grønås Drange, Markus S. Dregi, Fedor V. Fomin, Daniel Lokshtanov, and Michal Pilipczuk. A ck n 5-approximation algorithm for treewidth. SIAM J. Comput., 45(2):317–378, 2016. [9] Hans L. Bodlaender, Fedor V. Fomin, Arie M. C. A. Koster, Dieter Kratsch, and Dimitrios M. Thilikos. A note on exact algorithms for vertex ordering problems on graphs. Theory Comput. Syst., 50(3):420–432, 2012. [10] Hans L. Bodlaender and Ton Kloks. Efficient and constructive algorithms for the pathwidth and treewidth of graphs. J. Algorithms, 21(2):358–402, 1996. [11] P. Borowiecki, D. Dereniowski, and L. Kuszner. Distributed graph searching with a sense of direction. Distributed Computing, 28(3):155–170, 2015. [12] David Coudert. A note on integer linear programming formulations for linear ordering problems on graphs. Technical report, Inria; I3S; Universite Nice Sophia Antipolis; CNRS., 2016. [13] David Coudert, Dorian Mazauric, and Nicolas Nisse. Experimental evaluation of a branchand-bound algorithm for computing pathwidth and directed pathwidth. ACM Journal of Experimental Algorithmics, 21(1):1.3:1–1.3:23, 2016. [14] D. Dereniowski. Connected searching of weighted trees. Theor. Comp. Sci., 412:5700–5713, 2011. [15] D. Dereniowski. From pathwidth to connected pathwidth. 26(4):1709–1732, 2012. SIAM J. Discrete Math., [16] Jonathan A. Ellis, Ivan Hal Sudborough, and Jonathan S. Turner. Graph separation and search number. In Proc. of the 21st Allerton Conference on Communication Control and Computing, 1983. [17] Uriel Feige, MohammadTaghi Hajiaghayi, and James R. Lee. Improved approximation algorithms for minimum weight vertex separators. SIAM J. Comput., 38(2):629–657, 2008. [18] P. Flocchini, M.J. Huang, and F.L. Luccio. Contiguous search in the hypercube for capturing an intruder. In IPDPS ’05: Proc. of the 19th IEEE Inter. Parallel and Distributed Processing Symposium, page 62, Washington, DC, USA, 2005. IEEE Computer Society. [19] Fedor V. Fomin. Complexity of connected search when the number of searchers is small. Open problems of GRASTA 2017: the 6th Workshop on GRAph Searching, Theory and Applications, 2017. [20] Fedor V. Fomin and Dimitrios M. Thilikos. An annotated bibliography on guaranteed graph searching. Theor. Comput. Sci., 399(3):236–245, 2008. [21] F.V. Fomin, D.M. Thilikos, and I. Todinca. Connected graph searching in outerplanar graphs. Electronic Notes in Disc. Math., 22:213–216, 2005. [22] P. Fraigniaud and N. Nisse. Connected treewidth and connected graph searching. In LATIN’06: Proc. of the 7th Latin American Symposium on Theoretical Informatics, pages 479–490, Valdivia, Chile, 2006. 16 [23] P. Fraigniaud and N. Nisse. Monotony properties of connected visible graph searching. Inf. Comput., 206(12):1383–1393, 2008. [24] Martin Fürer. Faster computation of path-width. In Combinatorial Algorithms - 27th International Workshop, IWOCA 2016, Helsinki, Finland, August 17-19, 2016, Proceedings, pages 385–396, 2016. [25] D. Ilcinkas, N. Nisse, and D. Soguet. The cost of monotonicity in distributed graph searching. Distributed Computing, 22(2):117–127, 2009. [26] Kenta Kitsunai, Yasuaki Kobayashi, Keita Komuro, Hisao Tamaki, and Toshihiro Tano. Computing directed pathwidth in o(1.89n ) time. In Parameterized and Exact Computation - 7th International Symposium, IPEC 2012, Ljubljana, Slovenia, September 12-14, 2012. Proceedings, pages 182–193, 2012. [27] Jens Lagergren. Efficient parallel algorithms for graphs of bounded tree-width. J. Algorithms, 20(1):20–44, 1996. [28] N. Nisse. Connected graph searching in chordal graphs. Discrete Applied Math., 157(12):2603– 2610, 2008. [29] N. Nisse and D. Soguet. Graph searching with advice. Theor. Comput. Sci., 410(14):1307– 1318, 2009. [30] Bruce A. Reed. Finding approximate separators and computing tree width quickly. In Proceedings of the 24th Annual ACM Symposium on Theory of Computing, May 4-6, 1992, Victoria, British Columbia, Canada, pages 221–228, 1992. [31] Neil Robertson and Paul D. Seymour. Graph minors. I. Excluding a forest. J. Comb. Theory, Ser. B, 35(1):39–61, 1983. [32] Neil Robertson and Paul D. Seymour. Graph minors. XIII. The disjoint paths problem. J. Comb. Theory, Ser. B, 63(1):65–110, 1995. [33] Neil Robertson and Paul D. Seymour. Graph minors. XX. Wagner’s conjecture. J. Comb. Theory, Ser. B, 92(2):325–357, 2004. [34] Karol Suchan and Yngve Villanger. Computing pathwidth faster than 2n . In Parameterized and Exact Computation, 4th International Workshop, IWPEC 2009, Copenhagen, Denmark, September 10-11, 2009, Revised Selected Papers, pages 324–335, 2009. [35] B. Yang, D. Dyer, and B. Alspach. Sweeping graphs with large clique number. Discrete Mathematics, 309(18):5770–5780, 2009. 17
8cs.DS
arXiv:1602.01132v3 [stat.ML] 16 Jun 2016 Interactive Algorithms: from Pool to Stream Sivan Sabato and Tom Hess Department of Computer Science Ben-Gurion University of the Negev Abstract We consider interactive algorithms in the pool-based setting, and in the streambased setting. Interactive algorithms observe suggested elements (representing actions or queries), and interactively select some of them and receive responses. Pool-based algorithms can select elements at any order, while stream-based algorithms observe elements in sequence, and can only select elements immediately after observing them. We assume that the suggested elements are generated independently from some source distribution, and ask what is the stream size required for emulating a pool algorithm with a given pool size. We provide algorithms and matching lower bounds for general pool algorithms, and for utility-based pool algorithms. We further show that a maximal gap between the two settings exists also in the special case of active learning for binary classification. 1 Introduction Interactive algorithms are algorithms which are presented with input in the form of suggested elements (representing actions or queries), and iteratively select elements, getting a response for each selected element. The reward of the algorithm, which is applicationspecific, is a function of the final set of selected elements along with their responses. Interactive algorithms are used in many application domains, including, for instance, active learning (McCallum and Nigam, 1998), interactive sensor placement (Golovin and Krause, 2011), summarization (Singla et al., 2016) and promotion in social networks (Guillory and Bilmes, 2010). As a specific motivating example, consider an application in which elements represent web users, and the algorithm should select up to q users to present with a free promotional item. For each selected user, the response is the observed behavior of the user after having received the promotion, such as the next link that the user clicked on. The final reward of the algorithm depends on the total amount of promotional impact it obtained, as measured by some function of the set of selected users and their observed responses. Note that the algorithm can use responses from previous selected users when deciding on the next user to select. We consider two interaction settings for interactive algorithms: The pool-based setting and the stream-based setting. In the pool-based setting, the entire set of suggested elements 1 is provided in advance to the algorithm, which can then select any of the elements at any order. For instance, in the web promotion example, there might be a set of users who use the website for an extended period of time, and any of them can be approached with a promotion. In the stream-based setting, elements are presented to the algorithm in sequence, and the algorithm must decide immediately after observing an element, whether to select it or not. In the web promotion example, this is consistent with a setting where users access the website for single-page sessions, and so any promotion must be decided on immediately when the user is observed. The stream-based setting is in general weaker than the pool-based setting. Nonetheless, it is important and useful: In many real-life scenarios, it is not possible to postpone selection of elements, for instance due to storage and retrieval constraints, or because of timing constraints. This is especially pertinent when the data stream is real-time in nature, such as in streaming document classification (Bouguelia et al., 2013), in spam filtering (Chu et al., 2011), in web streams such as Twitter (Smailović et al., 2014), in video surveillance (Loy et al., 2012) and with active sensors (Krishnamurthy, 2002). In this work, our goal is to study the relationship between these two important settings. Both of these settings have been widely studied in many contexts. In active learning, both settings have been studied in classic works (Cohn et al., 1994; Lewis and Gale, 1994). Works that address mainly the stream-based setting include, for instance, Balcan et al. (2009); Hanneke (2011); Dasgupta (2012); Balcan and Long (2013); Sabato and Munos (2014). Some theoretical results hold equally for the stream-based and the pool-based settings (e.g., Balcan and Long, 2013; Hanneke and Yang, 2015). Several near-optimal algorithms have been developed for the pool-based setting (Dasgupta, 2005; Golovin and Krause, 2011; Golovin et al., 2010b; Hanneke, 2007; Sabato et al., 2013; Gonen et al., 2013; Cuong et al., 2014). The pool-based setting is also heavily studied in various active learning applications (e.g., Tong and Koller, 2002; Tong and Chang, 2001; Mitra et al., 2004; Gosselin and Cord, 2008; Cebron and Berthold, 2009; Guo et al., 2013). General interactive algorithms have also been studied in both a pool-based setting (e.g., Golovin and Krause, 2011; Guillory and Bilmes, 2010; Deshpande et al., 2014) and in streambased settings (e.g., Demaine et al., 2014; Arlotto et al., 2014; Streeter and Golovin, 2009; Golovin et al., 2010a). Note that unlike some works on interactive algorithms, in our streambased setting, the only direct restriction is on the timing of selecting elements. We do not place restrictions on storage space or any other resources. To study the relationship between the pool-based setting and the stream-based setting, we assume that in both settings the suggested elements, along with their hidden responses, are drawn i.i.d. from some unknown source distribution. We then ask under what conditions, and at what cost, can a stream-based algorithm obtain the same output distribution as a given black-box pool algorithm. Such an exact emulation is advantageous, as it allows direct application of methods and results developed for the pool-based setting, in the stream-based setting. Especially, if a pool-based algorithm succeeds in practice, but its analysis is unknown or limited, exact emulation guarantees that success is transferred to the stream setting as well. For discrete source distributions, any pool-based algorithm can be emulated in a streambased setting, simply by waiting long enough, until the desired element shows up again. The 2 challenge for stream-based interactive algorithms is thus to achieve the same output distribution as a pool-based algorithm, while observing as few suggested elements as possible. Clearly, there are many cases in which it is desired to require less suggested elements: this could result in saving of resources such as time, money, and communication. In active learning as well, while examples are usually assumed cheap, they are not usually completely free in all respects. We study emulation of pool-based algorithm in two settings. First, we consider the fully general case. We provide a stream algorithm that can emulate any given black-box pool algorithm, and uses a uniformly bounded expected number of observed elements. The bound on the expected number of observed elements is exponential in the number of selected elements. We further prove a lower bound which indicates that this exponential dependence is necessary. Second, we consider utility-based interactive algorithm for the pool setting. We provide a stream algorithm that emulates such pool algorithms, using repeated careful solutions of the well known “Secretary Problem” (Dynkin, 1963; Gilbert and Mosteller, 1966; Ferguson, 1989). The expected number of observed elements for this algorithm is only linear in the number of selected elements. In this case too we prove a matching lower bound. Finally, we show a lower bound that applies to active learning for binary classification. We conclude that even in this well-studied setting, there are cases in which there exists a significant gap between the best pool-based algorithm and the best stream-based algorithm. This result generalizes a previous observation of Gonen et al. (2013) on the sub-optimality of CAL (Cohn et al., 1994), the classical stream-based active learning algorithm, compared to pool algorithms. This paper is structured as follows: In Section 2 formal definitions and notations are provided. Section 3 discusses natural but suboptimal solutions. Section 4 provides an algorithm and a lower bound for the general case, and Section 5 addresses the case of utility-based pool algorithms. In Section 6 we provide a lower bound that holds for active learning for binary classification. We conclude in Section 7. Some of the proofs are provided in Appendix A. 2 Definitions For a predicate p, denote by I[p] the indicator function which is 1 if p holds and zero otherwise. For an integer k, denote [k] := {1, . . . , k}. For a sequence S, S(i) is the i’th member of the sequence. Denote concatenation of sequences by ◦. For A, B which are both sequences, or one is a set and one a sequence, we use A =π B and A ⊆π B to denote equality or inclusion on the unordered sets of elements in B and in A. Let X be a measurable domain of elements, and let Y be a measurable domain of responses. A pool-based (or just pool) interactive algorithm Ap receives as input an integer q ≤ m, and a pool of elements (x1 , . . . , xm ) ∈ X m . We assume that for each xi there is a response yi ∈ Y, which is initially hidden from Ap . Denote S = ((xi , yi ))i∈[m] . For a given S, SX denotes the pool (x1 , . . . , xm ). At each round, Ap selects one of the elements it that have not been selected yet, and receives its response yit . After q rounds, Ap terminates. Its output is the set {(xi1 , yi1 ), . . . , (xiq , yiq )}. For a pool algorithm Ap , denote by selp (S, t) the 3 element that Ap selects at round t, if S is the pool it interacts with. selp (S, t), which can be random, can depend on SX and on yik for k < t. Denote by selp (S, [t]) the sequence of elements selected by Ap in the first t rounds. pairsp (S, t) and pairsp (S, [t]) similarly denote the selected elements along with their responses. The final output of Ap is the set of pairs in the sequence pairsp (S, [q]). We assume that S 7→ pairsp (S, [q]) is measurable. We assume that the pool algorithm is permutation invariant. That is, for any S, S ′ ⊆ (X × Y)m , if S ′ is a permutation of S then selp (S, [q]) = selp (S ′ , [q]), or if Ap is randomized then the output distributions are the same. When the pool S is drawn i.i.d. this does not lose generality. A stream-based (or just stream) interactive algorithm As receives as input an integer q. We assume an infinite stream S ⊆ (X × Y)∞ , where S(t) = (xt , yt ). At iteration t, As observes xt , and may select one of the following actions: • Do nothing • Select xt and observe yt • Terminate. At termination, the algorithm outputs a subset of size q of the set of pairs (xt , yt ) it observed. Denote by sels (S, t) the t’th element that As selects and is also in the output set. Denote by sels (S, [t]) the sequence of first t elements selects and are also in the output set. Use pairss to denote the elements along with their responses. The output of As when interacting with S is the set of the pairs in the sequence pairss (S, [q]). We assume S 7→ pairss (S, [q]) is measurable. The total number of elements selected by As when interacting with S (including discarded elements) is denoted Nsel (As , S, q). The number of iterations (observed elements) until As terminates is denoted Niter (As , S, q). We look for stream algorithms that emulate pool algorithms. We define an equivalence between a stream algorithm and a pool algorithm as follows. Definition 2.1. Let D be a distribution over X × Y and let q be an integer. Let S ∼ D m , S ′ ∼ D ∞ . A pool algorithm Ap and a stream algorithm As are (q, D)-equivalent, if the total variation distance between the distributions of pairsp (S, [q]) and pairss (S ′ , [q]) is zero. Denote by DX the marginal of D on X . Below, unless specified otherwise, we assume that the probability under DX of observing any single x ∈ X is zero. This does not lose generality, since if this is not the case, DX can be replaced by the distribution DX × Unif[0, 1], with the interactive algorithms ignoring the second element in the pair. 3 Simple equivalent stream algorithms Let Ap be a pool algorithm. For any discrete distribution D over X × Y, and any q, it is easy to define a stream algorithm which is (q, D)-equivalent to Ap . Let “⋆” be some value not in Y, and define Await as in Alg. 1. 4 Algorithm 1 Algorithm Await 1: In the first m iterations, observe x1 , . . . , xm and do nothing. 2: S ← ((x1 , ⋆), . . . , (xm , ⋆)) 3: j ← 1 4: repeat 5: In iteration t, observe element xt 6: if xt = selp (S, j) then 7: Select xt and observe yt 8: S(i) ← (xt , yt ) 9: j ← j + 1. 10: end if 11: until j = q + 1 12: Return the set of all the pairs (x, y) in S with y 6= ⋆. This stream algorithm is (q, D) equivalent to Ap for any discrete distribution D, and it has Nsel (Await , S ′, q) = q for all S ′ ∈ (X × Y)∞ . However, ES ′ ∼D∞ [Niter (Await , S ′, q)] is not bounded for the class of discrete distributions. On the other hand, the stream algorithm Anowait defined in Alg. 2 is also (q, D) equivalent to Ap . We have Niter (Await , S ′ , q) = m for all S ′ ∈ (X ×Y)∞ , the same as the pool algorithm. However, also Nsel (Anowait , S ′, q) = m > q. These two simple approaches demonstrate a possible tradeoff between the number of selected elements and the number of iterations when emulating a pool algorithm. Algorithm 2 Algorithm Anowait input Pool size m, Black-box pool algorithm Ap . 1: In each iteration t ∈ [m], select xt and observe yt . 2: Return the pairs in pairsp (S, q). 4 An equivalent algorithm with a uniform bound on expected iterations We present the stream algorithm Agen (see Alg. 3), which can emulate any pool based algorithm Ap using only black-box access to Ap . The algorithm emulates a general pool algorithm, by making sure that in each iteration, its probability of selecting an element is identical to the conditional probability of the pool algorithm selecting the same element, conditioned on the history of elements and responses selected and observed so far. This is achieved by repeatedly drawing the remaining part of the pool, and keeping it only if it is consistent with the elements that were already selected. We further can use the partial pool draw only if the element to be selected happens to have been observed last. 5 Algorithm 3 Algorithm Agen input Original pool size m, label budget q < m, black-box pool algorithm Ap . 1: S0 ← () 2: for i = 1 : q do 3: repeat 4: Draw m − i + 1 elements, denote them x̄i,i , . . . , x̄i,m . 5: Si′ ← ((x̄i,i , ⋆), . . . , (x̄i,m , ⋆)). 6: until pairsp (Si−1 ◦ Si′ , [i − 1]) =π Si−1 and selp (Si−1 ◦ Si′ , i) = x̄i,m . 7: Select x̄i,m , get the response ȳi,m . 8: Si ← Si−1 ◦ ((x̄i,m , ȳi,m)). 9: end for 10: Output Sq . Below we show that Agen improves over the two stream algorithms presented above, in that it selects exactly q elements, and has a uniform upper bound on the expected number of iterations, for any source distribution. First, we prove that Agen indeed emulates any poolbased algorithm. The proof is provided in Appendix A. Theorem 4.1. For any pool algorithm Ap , any distribution D over X × Y, any integer m and q ≤ m, As := Agen (Ap ) is (q, D)-equivalent to Ap . The next theorem provides an upper bound on the expected number of elements observed by Agen . Unlike Await , this upper bound holds uniformly for all source distributions. Theorem 4.2. For any pool algorithm Ap , any distribution D over X × Y, any integer m and q ≤ m, if As := Agen (Ap ), Nsel (As , S, q) = q for any S ∈ (X × Y)∞ , and  q−1 em 2 ES∼D∞ [Niter (As , S, q)] ≤ m . q−1 Proof. First, clearly Nsel (As , S, q) = q for any S ∼ D ∞ . We now prove the upper bound on the expected number of iterations of As . Let S ∼ D m . For i ≥ 1, z1 , . . . , zi−1 ∈ X , denote Zj = {z1 , . . . , zj }, and let pi (z1 , . . . , zi ) := P[selp (S, [i]) =π Zi | Zi ⊆π SX ]. Suppose that (Si−1 )X =π Zi−1 . The expected number of times that steps 3 to 6 are repeated for index i is the inverse of the probability that the condition in 6 holds. This condition, in our notation, is that selp (Si−1 ◦ Si′ , [i − 1]) =π Zi−1 and selp (Si−1 ◦ Si′ , i) = x̄i,m . We have, from the permutation invariance of Ap , P[selp (Si−1 ◦ Si′ , [i − 1]) =π Zi−1 | (Si−1 )X =π Zi−1 ] = pi−1 (z1 , . . . , zi−1 ). In addition, for every draw of Si′ , P[selp (Si−1 ◦ Si′ , i) = x̄i,m | selp (Si−1 ◦ Si′ , [i−1]) =π Zi−1 ∧(Si−1 )X =π Zi−1 ] = 6 1 . m−i+1 This is since under the conditional, one of the elements in Si′ must be selected by Ap in round i. Therefore, the probability that the condition in step 6 holds is pi−1 (z1 , . . . , zi−1 )/(m − i + 1). The expected number of times that steps 3 to 6 are repeated for index i is the inverse of that, and in each round m − i + 1 elements are observed. Therefore the expected number of elements observed until selection i is made conditioned on z1 , . . . , zi−1 is (m − i + 1)2 /pi−1 (z1 , . . . , zi−1 ). The unconditional expected number of elements observed until selection i is (m − i + 1)2 · E[1/pi−1 (sels (S ′ , [i − 1]))]. For a set of indices J, denote S|J = {S(j) | j ∈ J}. E[1/pi (sels (S ′ , [i])] = E[1/pi (selp (S, [i])] Z 1 dP[selp (S, [i]) =π Zi ] · = pi (z1 , . . . , zi ) {z ,...,z }⊆X ×Y Z 1 i = dP[Zi ⊆π SX ], {z1 ,...,zi }⊆X ×Y Hence ′ E[1/pi (sels (S , [i])] ≤ = X J⊆[m],|J|=i = X J⊆[m],|J|=i Z X dP[(S|J )X = Zi ] {z1 ,...,zi }⊆X ×Y J⊆[m],|J|=i Z dP[(S|J )X = Zi ] {z1 ,...,zi }⊆X ×Y   m . 1= i It follows that the expected number of elements observed after the i − 1’th selection and  m until selection i is at most (m − i + 1)2 i−1 . We conclude that q−1 X    q−1 em m 2 ≤m (m − i) E[Niter (As , S, q)] ≤ . i q−1 i=0 2 This completes the proof. From the existence of Agen we can conclude that the pool-based and the stream-based setting are essentially equivalent, up to the number of observed elements. However, the expected number of observed elements is exponential in q. In the next section we show that this exponential dependence cannot be avoided for general pool algorithms. 4.1 A lower bound for expected number of iterations We provide a lower bound, which shows that for some pool algorithm, any equivalent stream algorithm has an expected number of observed elements which is at least exponential in q. This indicates that not much improvement can be achieved over Agen for the class of all poolbased algorithms. The proof involves constructing a pool-based algorithm in which the last 7 selected element determines the identity of the previously selected elements. This is easy in a pool setting, since the algorithm has advance knowledge of all the available elements. In a stream setting, however, this requires a possibly long wait to obtain the matching last element. Because the stream algorithm is allowed to select elements in a different order than the pool algorithm, additional care is taken to make sure that in this case, it is not possible circumvent the problem this way. The proof of Theorem 4.3 is provided in Appendix A. Theorem 4.3. There is an integer q0 and a constant C > 0, such that for q ≥ q0 , if 4q 2 log(4q) ≤ m, then there exist a pool algorithm Ap and a marginal DX , such that any stream algorithm As which is (q, D) equivalent to Ap for all D ∈ DS (DX ), and selects only q elements, has ∃D ∈ DS (DX ), ES∼D∞ [Niter (A, S, q)] ≥ C  m 2 q log(4q)  q−1 2 . 5 Utility-based pool algorithms Agen gives a uniform guarantee on expected the number of iterations, however this guarantee is exponential q. We now consider a more restricted class of pool algorithms, and show that it allows emulation with an expected number of iterations linear in q. A common approach for designing pool-based interactive algorithms, employed, e.g., in Seung et al. (1992); Lewis and Gale (1994); Tong and Koller (2002); Guo and Greiner (2007); Golovin et al. (2010b); Guillory and Bilmes (2010); Golovin and Krause (2011); Gonen et al. (2013); Cuong et al. (2014), is to define a utility function, that scores each element depending on the history of selected elements and their responses so far. In each round, the algorithm selects the element that maximizes the current utility function. We consider black-box emulation for this class of pool-based algorithms. Formally, a utility-based interactive pool algorithm is defined by a utility function U, of n the form U : ∪∞ n=0 (X × Y) × X → R. U(x, St−1 ) is the score of element x given history St−1 . The pool algorithm selects, in each round, the element that is assigned the maximal score by the utility function given the history. We assume for simplicity that there are no ties in U. The utility-based interactive pool algorithm for U, denoted AUp , is defined in Alg. 4. 5.1 An stream algorithm for utility-based pool algorithms We propose a stream algorithm AUs that emulates utility-based pool algorithms AUp . We stress that we do not attempt to maximize the value of U on selected elements, but to emulate the behavior of the pool algorithm that uses U. This is because we do not assume any specific relationship between the value of the utility function and the reward of the algorithm. For instance, the utility-based pool algorithm might be empirically successful although its analysis is not fully understood (e.g. Tong and Koller, 2002). The definition of AUs uses the solution to the well-known secretary problem (Dynkin, 1963; Gilbert and Mosteller, 1966; Ferguson, 1989). In the classical formulation of this prob8 Algorithm 4 AUp input Elements x1 , . . . , xm , budget q < m. 1: S0 ← () 2: M0 ← [m] 3: for t = 1 : q do 4: it ← argmaxj∈Mt−1 U(xj , St−1 ). 5: Select xit , get yit . 6: St ← St−1 ◦ (xit , yit ). 7: Mt ← Mt−1 \ {it }. 8: end for 9: Output the set of all pairs in Sq . lem, an algorithm sequentially observes a stream of n real numbers, and selects a single number. The goal of the algorithm is to select the maximal number out of the n, but it can only select a number immediately after it is observed, before observing more numbers. It is assumed that the n numbers in the stream are unknown and selected by an adversary, but their order of appearance is uniformly random. The goal is to select the maximal number with a maximal probability, where n is known to the algorithm. This task can be optimally solved by a simple deterministic algorithm, achieving a success probability psp (n), which satisfies limn→∞ psp (n) = 1/e. The optimal algorithm observes the first t(n) numbers, then selects the next observed number which is at least as large as the first t(n). The limit of t(n)/n for n → ∞ is 1/e. Given a stream of size k of real values R = (r1 , . . . , rk ), we say that SecPr(n, R) holds if the optimal solution to the secretary problem for size n selects rk after observing the stream prefix R. AUs is given in Alg. 5. It uses repeated applications of the solution to the secretary problem to retrieve each of the selected elements. Because the solution succeeds with a probability less than 1, its application might fail. This can be identified in retrospect. In this case, a new solution is selected. This trial-and-error approach means that AUs usually selects more than q elements. However the expected number of selected elements is a constant factor over q. To make sure the equivalence holds, AsU never selects an element that could not have been in a pool in which the previous elements have been selected. This is achieved by discarding such elements in each round. The upper bound on the expected number of observed elements bounds the expected number of elements discarded in this way. First, we show that AUs is indeed equivalent to AUp . The proof is provided in Appendix A. Theorem 5.1. For any utility function U, any distribution D over X × Y, any integer m and q ≤ m, AUs is (q, D)-equivalent to AUp . The following theorem give an upper bound on the expected number of selected elements and the expected number of observed elements used by AUs . 9 Algorithm 5 AsU 1: L0 ← () 2: X1 = X 3: for i = 1 : q do 4: repeat 5: for j = 1 : m − i + 1 do 6: Repeatedly draw elements from DX , until drawing an element in Xi . Denote it xi,j , and let ri,j ← U(xi,j , Li−1 ). 7: if SecPr(m − i + 1, (ri,1 , . . . , ri,j )) then 8: k←j 9: Select xi,k , get its response yi,k . 10: end if 11: end for 12: until ri,k = max{ri,1 , . . . , ri,m−i+1}. 13: ki ← k 14: Li ← Li−1 ◦ (xi,ki , yi,ki ). 15: Xi+1 ← {x ∈ Xi | U(x, Li−1 ) < U(xi,ki , Li−1 )} 16: end for 17: Output the set of pairs in Lq . Theorem 5.2. For any utility function U, any distribution D over X × Y, any integer m and q ≤ m, ES∼D∞ [Nsel (AUs , S, q)] = p−1 sp (m)q, and ES∼D∞ [Niter (AUs , S, q)] ≤ p−1 sp (m) exp( q ) · qm. m−q For q ≤ m/2, and m → ∞, it follows from Theorem 5.2 that the expected number of selected elements is eq, and the expected number of observed elements is at most e2 qm. of Theorem 5.2. Call a full run of the loop starting at step 5 an attempt for the i’th element. In each attempt for the i’th element, m − i + 1 elements from Xi are observed. The expected number of attempts for each element i is e, since each attempt is a run of the secretary problem, with a success probability of psp (m). Therefore, the expected number of elements from Xi observed until xi is selected is p−1 sp (m) · (m − i + 1). Denote by fi the utility function U(·, Li−1 ). Let xi := xi,ki , be the i’th element added to Li . Then Xi = {x ∈ Xi−1 | fi−1 (x) ≤ fi−1 (xi−1 )}. Consider the probability space defined by the input to the stream algorithm S ∼ D ∞ , and let Zi , Zi′ ∼ DX for i ∈ [q] such that these random variables and S are all independent. Denote p(α, i) := P[fi (Zi ) ≤ α | Zi ∈ Xi ]. 10 p(α, i) is a random variable since Xi depends on S. Let Ui := p(fi (Zi′ ), i). Since we assume no ties in U, and no single x has a positive probability in DX , then conditioned on Xi , Ui is distributed uniformly in [0, 1]. Hence U1 , . . . , Uq are statistically independent. For i > 1, define the random variable Mi := p(fi−1 (xi−1 ), i−1). Then Mi = P[Xi ]/P[Xi−1 ]. The expected number that need to be drawn from D to get a single element from Qi of elements −1 Xi is 1/P[Xi ] = ( j=1 Mj ) . Therefore, q X p−1 sp (m) · (m − i + 1) | M2 , . . . , Mq ] = . Qi M j j=1 i=1 E[Niter (AUs , S, q) The element xi maximizes the function x 7→ fi (x) over m − i + 1 independent draws of elements x from DX conditioned on x ∈ Xi , hence it also maximizes x 7→ p(fi (x), i). Therefore, for i > 1, Mi is the maximum of m − i + 2 independent copies of Ui , hence P [Mi ≤ p] = pm−i+2 . Hence dP [M2 , . . . , Mq ](p2 , . . . , pq )/dp2 · . . . · dpq = q Y i=2 q Y (m − i + 2)pm−i+1 . i dP [Mi ≤ pi ]/dpi = i=2 We have E[Niter (AUs , S, q)] = Z 1 ... M2 =0 Z 1 Mq =0 E[Niter (AUs , S, q) | M1 , . . . , Mq ]dP [M1 , . . . , Mq ] q q Y X p−1 sp (m) · (m − i + 1) (m − l + 2)Mlm−l+1 dMl = ... Qi M2 =0 Mq =0 i=1 j=1 Mj l=2 Z Z q i 1 1 X Y −1 (m − l + 2)Mlm−l dMl psp (m) · (m − i + 1) = ... Z 1 Z 1 M2 =0 i=1 Mq =0 l=2 q Y · (m − l + 2)Mlm−l+1 dMl , l=i+1 Therefore E[Niter (AUs , S, q)] = q X i=1 q = X i=1 p−1 sp (m) · (m − i + 1) p−1 sp (m) · (m − i + 1) i Y m−l+2 l=2 i Y m−l+1 (1 + l=2 1 ) m−l+1 1 q ≤ p−1 )q ≤ p−1 ) · mq. sp (m) · qm(1 + sp (m) · exp( m−q m−q This concludes the proof. 11 5.2 A lower bound for expected number of iterations The following lower bound shows that the expected number of observed elements required by Alg. 5 cannot be significantly improved by any emulation of general utility-based pool algorithms. This theorem holds for stream algorithms that select exactly q elements, while Alg. 5 selects approximately eq elements. We conjecture that even if allowing a constant factor more element selections, one can achieve at most a constant factor improvement in the expected number of observed elements. The proof of the lower bound follows by constructing a utility function which in effect allows only one set of selected elements, and has an interaction pattern that forces the stream algorithm to select them in the same order as the pool algorithm. For a given distribution DX over X , let DS (DX ) be the set of distributions over X × Y such that their marginal over X is equal to DX . The proof of Theorem 5.3 is provided in Appendix A. Theorem 5.3. For any m ≥ 8, q ≤ m/2, there exists a utility-based pool algorithm, and a marginal DX , such that any stream algorithm As which is (q, D) equivalent to the pool algorithm for all D ∈ DS (DX ), and selects only q elements, has   q m ∃D ∈ DS (DX ), ES∼D∞ [Niter (As , S, q)] ≥ . 8 2 log(2q) 6 Active Learning for Binary Classification In active learning for binary classification, recent works provide relatively tight label complexity bounds, that hold for both the stream-based and the pool-based settings. In Balcan and Long (2013), tight upper and lower bounds for active learning of homogeneous linear separators under log-concave distributions are provided. The bounds hold for both the stream-based and the pool-based setting, and with the same bound on the number of unlabeled examples. In Hanneke and Yang (2015), tight minimax label complexity bounds for active learning are provided for several classes of distributions. These bounds also hold for both the streambased and the pool-based setting. In that work no restriction is placed on the number of unlabeled examples. These results leave open the possibility that for some distributions, a pool-based algorithm with the same label complexity as a stream-based algorithm might require significantly fewer unlabeled examples. In Example 6.1 and Theorem 6.2 we show that this is indeed the case. Example 6.1. For given integers m and q ≤ m, and T ≤ q, define X = {ak,j | k ∈ [q], j ∈ {0, . . . , 2min(k,T )−1 − 1}} ∪ X ′ , where X ′ includes arbitrary elements so that |X | = n, for some n ≥ q2T /2. Define the following hypothesis class H ⊆ Y X . ( I[i mod 2k = j] k ≤ T, H := {hi | i ∈ {0, . . . , 2q − 1}}, where hi (ak,j ) = T −k T I[ ⌊i/2 ⌋ mod 2 = j]. k > T. (1) 12 Essentially, for k ≤ T , hi (ak,j ) = 1 if the k least significant bits in the binary expansion of i are equal to the binary expansion of j to T bits. For k ≥ T , hi (ak,j ) = 1 if T consecutive bits in i, starting from bit T − k, are equal to the binary expansion of j. Theorem 6.2. Let q ≥ 22 and m ≥ 8 log(2q)q 2 be integers. Consider Example 6.1 with m, q, setting T = ⌈log2 (q)⌉ and n = ⌊m/7 log(2q)⌋. Consider H as defined in Eq. (1). There exist δ, ǫ ∈ (0, 1) such that there is a pool-based active learning algorithm that uses a pool of m unlabeled examples and q labels, such that for any distribution D which is consistent with some h∗ ∈ H and has a uniform marginal over X , with a probability of at least 1 − δ, P[ĥ(X) 6= h∗ (X)] ≤ ǫ. On the other hand, for q > 22, j any stream-based k q m active learning algorithm with the same guarantee requires at least 32 7 log(2q) unlabeled examples in expectation. The proof is provided in Appendix A. This result shows that a gap between the streambased and the pool-based settings exists not only for general interactive algorithms, but also specifically for active learning for binary classification. √ The gap is more significant when q = Θ̃( m), and can be as large as Ω̃(m3/2 ) unlabeled examples in a stream, versus m that are required in a pool. It has been previously observed (Gonen et al., 2013) that in some cases, a specific pool-based active learning algorithm for halfspaces is superior to the classical stream-based algorithm CAL (Cohn et al., 1994). Theorem 6.2 shows that this is not a limitation specifically of CAL, but of any stream-based active learning algorithm. The upper bound in Theorem 5.2 for utility-based pool algorithms can be applied for several deterministic pool-based active-learning algorithms which use a utility function (e.g., Golovin and Krause, 2011; Gonen et al., 2013; Cuong et al., 2014). The upper bound shows that when the label budget q is relatively small, the gap between the stream and the pool settings is not significant. For instance, consider an active learning problem in which a utilitybased pool active learner achieves a label complexity close to the information-theoretic lower bound for the realizable setting (Kulkarni et al., 1993), so that q ∈ Θ(log(1/ǫ)). The passive learning sample complexity is at most m ∈ Θ(1/ǫ). Therefore, a stream-based active learner with the same properties needs at most O(log(1/ǫ)/ǫ) unlabeled examples. Therefore, in this case the difference between the pool-based setting and the stream-based setting can be seen as negligible. 7 Conclusions In this work we studied the relationship between the stream-based and the pool-based interactive settings, by designing algorithms that emulate pool-based behavior in a stream-based setting, and proving upper and lower bounds on the stream sizes required for such emulation. Our results concern mostly the case where the label budget of the stream algorithm is similar or identical to that of the pool algorithm. We expect that as the label budget grows, there should be a smooth improvement in the expected stream length, which should approach m as the label budget approaches m. There are many open problems left for further work. Among 13 them, whether it is possible to emulate utility based pool algorithms with a linear stream size in q and exactly q labels, and a relaxation of the requirement for exact equivalence, which would perhaps allow using smaller streams. Acknowledgements This work was supported in part by the Israel Science Foundation (grant No. 555/15). References A. Arlotto, E. Mossel, and J. M. Steele. Quickest online selection of an increasing subsequence of specified size. arXiv preprint arXiv:1412.7985, 2014. M.-F. Balcan and P. Long. Active and passive learning of linear separators under log-concave distributions. In Proceedings of the Twenty-Sixth Annual Conference on Computational Learning Theory (COLT), pages 288–316, 2013. M.-F. Balcan, A. Beygelzimer, and J. Langford. Agnostic active learning. Journal of Computer and System Sciences, 75(1):78–89, 2009. M. Bouguelia, Y. Belaid, and A. Belaı̈d. A stream-based semi-supervised active learning approach for document classification. In Document Analysis and Recognition (ICDAR), 2013 12th International Conference on, pages 611–615. IEEE, 2013. N. Cebron and M. R. Berthold. Active learning for object classification: from exploration to exploitation. Data Mining and Knowledge Discovery, 18(2):283–299, 2009. W. Chu, M. Zinkevich, L. Li, A. Thomas, and B. Tseng. Unbiased online active learning in data streams. In Proceedings of the 17th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 195–203. ACM, 2011. D. Cohn, L. Atlas, and R. Ladner. Improving generalization with active learning. Machine Learning, 15:201–221, 1994. N. Cuong, W. Lee, and N. Ye. Near-optimal adaptive pool-based active learning with general loss. In 30th conference on Uncertainty in Artificial Intelligence, 2014. S. Dasgupta. Analysis of a greedy active learning strategy. Advances in Neural Information Processing Systems 18 (NIPS), 17:337–344, 2005. S. Dasgupta. Consistency of nearest neighbor classification under selective sampling. In COLT, pages 18–1, 2012. E. D. Demaine, P. Indyk, S. Mahabadi, and A. Vakilian. On streaming and communication complexity of the set cover problem. In Distributed Computing, pages 484–498. Springer, 2014. 14 A. Deshpande, L. Hellerstein, and D. Kletenik. Approximation algorithms for stochastic boolean function evaluation and stochastic submodular set cover. In Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 1453–1467. SIAM, 2014. E. B. Dynkin. The optimum choice of the instant for stopping a markov process. In Soviet Math. Dokl, volume 4, pages 627–629, 1963. T. S. Ferguson. Who solved the secretary problem? Statistical Science, 4(3):282–289, 1989. J. P. Gilbert and F. Mosteller. Recognizing the maximum of a sequence. Journal of the American Statistical Association, 61(313):35–73, 1966. D. Golovin and A. Krause. Adaptive submodularity: Theory and applications in active learning and stochastic optimization. Journal of Artificial Intelligence Research, 42:427–486, 2011. D. Golovin, M. Faulkner, and A. Krause. Online distributed sensor selection. In Proceedings of the 9th ACM/IEEE International Conference on Information Processing in Sensor Networks, pages 220–231. ACM, 2010a. D. Golovin, A. Krause, and D. Ray. Near-optimal bayesian active learning with noisy observations. In Advances in Neural Information Processing Systems 23 (NIPS), pages 766–774, 2010b. A. Gonen, S. Sabato, and S. Shalev-Shwartz. Efficient active learning of halfspaces: an aggressive approach. Journal of Machine Learning Research, 14:2487–2519, 2013. P. H. Gosselin and M. Cord. Active learning methods for interactive image retrieval. Image Processing, IEEE Transactions on, 17(7):1200–1211, 2008. A. Guillory and J. A. Bilmes. Interactive submodular set cover. In Proceedings of the 27th International Conference on Machine Learning (ICML), pages 415–422, 2010. Y. Guo and R. Greiner. Optimistic active-learning using mutual information. In IJCAI, volume 7, pages 823–829, 2007. Y. Guo, I. Silins, U. Stenius, and A. Korhonen. Active learning-based information structure analysis of full scientific articles and two applications for biomedical literature review. Bioinformatics, 29(11):1440–1447, 2013. S. Hanneke. Teaching dimension and the complexity of active learning. In Proceedings of the Twentieth Annual Conference on Computational Learning Theory (COLT), 2007. S. Hanneke. Rates of convergence in active learning. The Annals of Statistics, 39(1):333–361, 2011. 15 S. Hanneke and L. Yang. Minimax analysis of active learning. Journal of Machine Learning Research, 16:3487–3602, 2015. V. Krishnamurthy. Algorithms for optimal scheduling and management of hidden markov model sensors. Signal Processing, IEEE Transactions on, 50(6):1382–1397, 2002. S. R. Kulkarni, S. K. Mitter, and J. N. Tsitsiklis. Active learning using arbitrary binary valued queries. Machine Learning, 11(1):23–35, 1993. D. D. Lewis and W. A. Gale. A sequential algorithm for training text classifiers. In Proceedings of the 17th annual international ACM SIGIR conference on Research and development in information retrieval, pages 3–12. Springer-Verlag New York, Inc., 1994. C. Loy, T. Hospedales, T. Xiang, and S. Gong. Stream-based joint exploration-exploitation active learning. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pages 1560–1567, June 2012. A. K. McCallum and K. Nigam. Employing em and pool-based active learning for text classification. In Proceedings of the Fifteenth International Conference on Machine Learning (ICML), 1998. P. Mitra, C. Murthy, and S. K. Pal. A probabilistic active support vector learning algorithm. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 26(3):413–418, 2004. S. Sabato and R. Munos. Active regression by stratification. In Z. Ghahramani, M. Welling, C. Cortes, N. Lawrence, and K. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 469–477, 2014. S. Sabato, A. D. Sarwate, and N. Srebro. Auditing: Active learning with outcome-dependent query costs. In Advances in Neural Information Processing Systems 26 (NIPS), 2013. H. S. Seung, M. Opper, and H. Sompolinsky. Query by committee. In Proceedings of the fifth annual workshop on Computational learning theory, pages 287–294. ACM, 1992. A. Singla, S. Tschiatschek, and A. Krause. Noisy submodular maximization via adaptive sampling with applications to crowdsourced image collection summarization. In Conference on Artificial Intelligence (AAAI), 2016. J. Smailović, M. Grc̆ar, N. Lavraŏ, and M. Z̆nidarz̆ic̆. Stream-based active learning for sentiment analysis in the financial domain. Information Sciences, 285(0):181 – 203, 2014. M. Streeter and D. Golovin. An online algorithm for maximizing submodular functions. In Advances in Neural Information Processing Systems, pages 1577–1584, 2009. S. Tong and E. Chang. Support vector machine active learning for image retrieval. In Proceedings of the Ninth ACM International Conference on Multimedia, MULTIMEDIA ’01, pages 107–118. ACM, 2001. 16 S. Tong and D. Koller. Support vector machine active learning with applications to text classification. The Journal of Machine Learning Research (JMLR), 2:45–66, 2002. A Additional Proofs Several proofs use the following lemma. Lemma A.1. Let α ∈ (0, 21 ), p ∈ (0, α2 /2). Let X1 , X2 , . . . be independent Bernoulli random variables with P[Xi = 1] ≤ p. Let I be a random integer, which can be dependent on the 2 entire sequence X1 , X2 , . . .. Suppose that P[XI = 1] ≥ α. Then E[I] ≥ α2p . Proof. E[I] is minimized under the constraint when P[Xi = 1] = p. Therefore assume this equality holds. Let W be the random variable whose value is the smallest integer such that XW = 1. Let T be the largest integer such that P[W ≤ T ] ≤ α. The expectation of I is lower bounded subject to P[XI = 1] ≥ α by I such that P[I = W | W ≤ T ] = 1, P[I = W | W = T + 1] = α − P[W ≤ T ], and in all other cases, I = 0. Therefore, E[I] ≥ E[W · I[W ≤ T ]]. We have 1 = E[W ] = E[W · I[W ≤ T ]] + E[W · I[W > T ]] p 1 = E[W · I[W ≤ T ]] + ( + T )(1 − p)T . p Therefore E[I] ≥ E[W · I[W ≤ T ]] = 1 1 − ( + T )(1 − p)T . p p From the definition of T , T is the largest integer such that 1 − (1 − p)T ≤ α. Hence T ≥ log(1−α) and (1 − p)T ≤ (1 − α)/(1 − p). Therefore log(1−p) 1 E[I] ≥ − p  1 log(1 − α) + p log(1 − p) Hence pE[I] ≥ 1 +  1−α 1 ≥ − 1−p p  1 log(1 − α) − p 2p  1−α 1−p 1−α (log(1 − α)/2 − 1) 1−p For p ≤ a2 /2 and α ∈ (0, 1/2), elementary calculus shows that pE[I] ≥ α2 /2. of Theorem 4.1. Consider the probability space defined by the infinite sequence S ′ ∼ D ∞ which generates the input to the stream algorithm, and an independent sequence S ∼ D m which is the input to the pool algorithm. 17 For z1 , . . . , zq ∈ X × Y, denote Zj = {z1 , . . . , zj }. We have, for every i ∈ [q], dP[pairsp (S, [i]) =π Zi ] = i X j=1 dP[pairsp (S, i) = zj | pairsp (S, [i − 1]) =π Zi \ {zj }] · dP[pairsp (S, [i − 1]) =π Zi \ {zj }]. The same holds for pairss (S ′ , ·). To show the equivalence it thus suffices to show that for all z1 , . . . , zq ∈ X × Y, i ∈ [q], dP[pairss (S ′ , i) = zi | pairss (S ′ , [i−1]) =π Zi−1 ] = dP[pairsp (S, i) = zi | pairsp (S, [i−1]) =π Zi−1 ]. From the definition of As we have dP[pairss (S ′ , i) = zi | pairss (S ′ , [i − 1]) =π Zi−1 ] = dP[pairsp (Si−1 ◦ Si′ , i) = zi | Si−1 =π Zi−1 ∧ pairsp (Si−1 ◦ Si′ , [i − 1]) =π Zi−1 ] = dP[pairsp (S, i) = zi | pairsp (S, [i − 1]) =π Zi−1 ]. The last equality follows since Ap is permutation invariant and never selects the same index twice. This proves the equivalence. of Theorem 4.3. Denote by Πk the set of permutations over [k]. Let the domain of elements be X = [0, 2] and assume responses in Y = {0, 1}. We now define a pool algorithm as follows. Call a pool SX in which exactly one element in the pool is in (1, 2] and the rest are in [0, 1] a “good pool”. On bad pools, Ap always selects only elements in [0, 1] or only elements in (1, 2]. For a good pool, denote for simplicity the single element in (1, 2] by xm , and other elements by x1 , . . . , xm−1 , where xi−1 < xi for i ∈ [m − 1]. Define a mapping ψ : (1, 2] → Πm−1 , such that if xm is uniform over (1, 2], then for ψ(xm ) all permutations in the range are equally likely. Ap behaves as follows: Let σ = ψ(xm ). The first q−1 elements it selects are xσ(1) , . . . , xσ(q−1) . The last element it selects is xm if the response for all previous elements was 0, and xσ(q) otherwise. Define the marginal DX over X in which for X ∼ DX , P[X ∈ [0, 1]] = 1 − 1/m, P[X ∈ (1, 2]] = 1/m, and in each range [0, 1], (1, 2], X is uniform. The probability of a good pool under D ∈ DS (DX ) is (1 − 1/m)m−1 ≥ 1/e2 =: pg . We now show a lower bound on the expected number of iterations of a stream algorithm which is (q, D)-equivalent to any D ∈ DS (DX ). Let D0 be the distribution over X × Y such that for (X, Y ) ∼ D0 , X ∼ DX and Y = 0 with probability 1. Let S ∼ D0m be the input to Ap . The proof will follow a series of claims: 1. The probability that, on a good pool, ψ(xm ) is in a given set of permutation Φ(Z), where Z is the set of first q − 1 selected elements, is at least 1/2. 2. When As emulates a good pool, it selects an element from (1, 2] only after selecting q − 1 elements from [0, 1]. 18 3. Therefore, when As emulates a good pool, the expected number of observed elements until selecting the last element is lower bounded, and so the overall expected number is lower bounded. We start with claim 1. For a given set Z = {z1 , . . . , zq−1 } ⊆ [0, 1], define the set of permutations Φ(Z) as follows. The expectedP number of elements that p are smaller than zi in q−1 m I[zj < zi ]. Let ǫ := (m − q) log(4q)/2, SX ∼ D X , if Z ⊆π SX , is ni = (m − q)zi + j=1 and define Φ(Z) := {σ ∈ Πm−1 | ∃σ ′ ∈ Πq−1 , ∀i ∈ [q − 1], |σ −1 (i) − nσ′ (i) | ≤ ǫ}. (2) These are the permutations such that the first q − 1 elements according to the permutation are mapped from elements with ranks in [ni − ǫ, ni + ǫ]. For x ∈ SX , denote by rS (x) the rank of x in SX , when the elements in SX are ordered by value. Since ψ(selp (S, q)) determines the choice of Z from SX , we have P[ψ(selp (S, q)) ∈ Φ(Z) | selp (S, [q − 1]) =π Z ∧ S is good] ≥ P[∀i ∈ [q − 1], |rS (zi ) − ni | ≤ ǫ | selp (S, [q − 1]) =π Z ∧ S is good] = P[∀i ∈ [q − 1], |rS (zi ) − ni | ≤ ǫ | Z ⊆π S ∧ S is good]. The last inequality follows since ψ(selp (S, q)) is uniform over all permutations. By Hoeffding’s inequality, for any i ≤ q − 1, P[|rS (zi ) − ni | > ǫ | Z ⊆π S ∧ S is good] ≤ 2 exp(−2ǫ2 /(m − q)). Therefore, using the definition of ǫ and applying the union bound, we get, for any Z ⊆ [0, 1] with |Z| = q − 1, 1 P[ψ(selp (S, q)) ∈ Φ(Z) | selp (S, [q − 1]) =π Z ∧ S is good] ≥ . 2 (3) This completes the proof of claim 1. We now turn to claim 2. Consider a stream algorithm which is (q, D)-equivalent to Ap for any D ∈ DS (DX ). Consider runs of As with input S ′ ∼ D0∞ . Denote by Eg the event that the output of As is equal to a possible output of Ap on a good pool with S ∼ D0m . Then P[Eg ] ≥ pg . Claim 2 is that P[sels (S ′ , [q − 1]) ⊆π [0, 1] | Eg ] = 1. (4) In other words, when simulating a good pool, the elements in [0, 1] are all selected before the element in (1, 2]. To show claim 2, note that by the definition of Ap , for any source distribution over X ×Y, if Ap outputs a set with elements both in [0, 1] and in (1, 2], then there is exactly one element in (1, 2] in the output, and all the responses in the output for elements in [0, 1] are 0 with probability 1. 19 Now, suppose that P[sels (S ′ , [q − 1]) ⊆π [0, 1] | Eg ] < 1. Then P[sels (S ′ , q) ∈ [0, 1] | Eg ] > 0, since there can be only one element in (1, 2] in the output of a good pool. But, consider running As with a source distribution D ′ ∈ DS (DX ) such that for (X, Y ) ∼ D ′, X ∼ DX and PD′ [Y = 0|X = x] = 12 for all x. There is a positive probability that in the first q − 1 selected elements all the responses are 0, just as for D0 . Therefore, also for S ′′ ∼ D ′ ∞ , P[sels (S ′′ , q) ∈ [0, 1] | Eg ] > 0. But then there is a positive probability that the response for the last element, which is in [0, 1], is 1, contradicting the (q, D ′)-equivalence of the pool and As . This proves claim 2. We now show claim 3 which completes the proof. From claim 2 in Eq. (4), we conclude that P[sels (S ′ , q) ∈ (1, 2] | Eg ] = 1. Therefore, from claim 1 in Eq. (3), for any Z ⊆π [0, 1] with |Z| = q − 1, P[ψ(sels (S ′ , q)) ∈ Φ(sels (S ′ , [q − 1])) | Eg ] ≥ 1/2. Therefore P[ψ(sels (S ′ , q)) ∈ Φ(sels (S ′ , [q − 1]))] ≥ P[Eg ]/2 ≥ pg /2. Now, let Xi ∼ DX be the i’th element observed after selecting the first q−1 elements, and let Bi = I[ψ(Xi ) ∈ Φ(Z)], where Z is the set of q − 1 selected elements. Bi are independent Bernoulli random variables, each with a probability of success at most p, where from the definition of φ in Eq. (2), |Φ(Z)| p≤ ≤ |Πm−1 |  (q − 1)(2ǫ + 1) m−1 q−1 ≤  2q 2 log(4q) m  q−1 2 . Let I be the number of elements As observes after selecting Z, until selecting element q. We have P[BI = 1] ≥ pg /2. By Lemma A.1, for p ≤ p2g /8, pE[I] ≥ p2g /8. From the assumption in the theorem statement, 2q 2 log(4q)/m ≤ 12 , hence for a large enough q, p ≤ 2−(q−1) ≤ p2g /8, and so E[I] ≥ p2g −1 p . 8 Hence there is a constant such that E[I] ≥ C  m 2 q log(4q)  q−1 2 . Since E[Niter (A, S, q)] ≥ E[I], this completes claim 3 and finalizes the proof. of Theorem 5.1. Consider the probability space defined by S ∼ D m and S ′ ∼ D ∞ , where S, S ′ are independent. We prove the equivalence by showing that for any j ∈ [q] and Lj = ((xi,ki , yi,ki ))i∈[j] that could have been selected by the pool algorithm, dP[pairsp (S, j + 1) | pairsp (S, [j]) = Lj ] = dP[pairss (S ′ , j + 1) | pairss (S ′ , [j]) = Lj ]. For a given Lj , denote by Dj+1 the distribution generated by drawing (X, Y ) ∼ D conditioned on X ∈ Xj+1 , where Xj+1 depends on Lj . Denote by G all the finite sequences of pairs such that when the optimal secretary problem solution is applied to the sequence, it succeeds. 20 That is, the optimal value under the score (x, y) → U(x, Lj ) is indeed selected. From the definition of AsU , we have dP[pairss (S ′ , j + 1) | pairss (S ′ , [j]) = Lj ] = dPS̄∼Dm−j [argmax U(x, Lj ) | S̄ ∈ G]. j+1 (x,y)∈S̄ For a given sequence S̄ = ((x̄i , yi ))i∈[m−j] , let σ(S̄) : [m − j] → [m − j] be a permutation such that for all i ≤ m − j, x̄σ(i) ≤ x̄σ(i+1) . The success of the optimal secretary problem algorithm depends only on the ordering of ranks in its input sequence, hence there is a set of permutations G ′ such that S̄ ∈ G if and only if σ(S̄) ∈ G ′ . Now, argmax(x,y)∈S̄ U(x, Lj ) depends only on the identity of pairs in S̄, while σ(S̄) depends only on their order. Since the elements in S̄ are i.i.d., these two properties are independent. Therefore dPS̄∼Dm−j [argmax U(x, Lj ) | S̄ ∈ G] = dPS̄∼Dm−j [argmax U(x, Lj )]. j+1 j+1 (x,y)∈S̄ (x,y)∈S̄ Therefore dP[pairss (S ′ , j + 1) | pairss (S ′ , [j]) = Lj ] = dPS̄∼Dm−j [argmax U(x, Lj )] j+1 (x,y)∈S̄ = dPŜ∼Dm−j [argmax U(x, Lj ) | Ŝ ⊆ (Xj+1 × Y)m−j ] (x,y)∈Ŝ = dPŜ∼Dm−j [argmax U(x, Lj ) | ∀(x, y) ∈ Ŝ, i ∈ [j], U(x, Li−1 ) < U(xi,ki , Li−1 )] (x,y)∈Ŝ = dPŜ∼Dm−j [argmax U(x, Lj ) | pairsp (Lj ◦ Ŝ, [j]) = Lj ] (x,y)∈Ŝ = dPS∼Dm [ argmax U(x, Lj ) | pairsp (S, [j]) = Lj ] (x,y)∈S\Lj = dPS∼Dm [pairsp (S)(j + 1) | pairsp (S, [j]) = Lj ]. Here Li is the prefix of length i of Lj . Since this equality holds for all j ∈ [q − 1], dP[pairss (S ′ , [q])] = dP[Ōq (S, [q])]. j k m of Theorem 5.3. Let n = 2 log(2q) , and let DX be a uniform distribution over X = {ai | i ∈ [n]}. Assume Y = {0, 1}. A pool of size m then includes all elements in A := {ai | i ∈ [2q − 1]} with a probability of at least α ≥ 1 − (2q − 1) exp(−m/n) ≥ 1 − 2q1 . Consider a utility function U such that given a history of the form ((a1 , 0), . . . , (at , 0)) for t ∈ [q − 1], assigns a maximal score in X to at+1 , and given a history of the form ((a1 , 0), . . . , (at−1 , 0), (at , 1)), for t ∈ [q − 1], assigns a maximal score in X to aq+t−1 . Then, in a pool that includes all elements a1 , . . . , a2q−1 , the pool algorithm based on U behaves as follows: In every round, if all selected elements so far received the response 0, it selects at round t the element at . Otherwise, it selects the element aq+t−1 . Let D0 be a distribution in which the response is deterministically zero. If the distribution is D0 , As selects Z0 = {a1 , . . . , aq } with a probability at least α. Denote Dt for t ∈ [q], in 21 which the response is deterministically zero for X ∈ {a1 , . . . , aq } \ {at } and 1 for at . For this distribution, the algorithm must select the elements in Zt = {a1 , . . . , at , aq+t , . . . , a2q−1 } with a probability at least α. We show a lower bound on the probability that As selects a1 , . . . , aq in order when the input sequence is S ∼ D0∞ . Denote this probability β, and the event that this occurs E. Consider the random process defined by the input sequence S ∼ D0∞ and the randomness of As . Let T be a random variable, such that T is the smallest round in which the algorithm selects some at′ , for t′ > T , or T = 0 if no such round exists. Since P[T ∈ [q]] = 1 − β, there exists some t∗ ∈ [q] such that P[T = t∗ ] ≥ (1 − β)/q. Now, consider the distribution Dt∗ . Define a sequence of pairs γ(S) such that S and γ(S) have the same elements in the same order, and the responses in γ(S) are determined by Dt∗ instead of by D0 . Clearly, γ(S) is distributed according to Dt∞∗ . Consider a run of the algorithm on S and a parallel run (with the same random bits) on γ(S). The algorithm selects the same elements for both sequences until the T ’th selection, inclusive. But the T ’th selection is some element in {aT +1 , . . . , aq }. If T = t∗ , then Zt∗ does not include the element selected in round T . Since As selects exactly the set Zt∗ with a probability of at least α, we have P[T = t∗ ] ≤ 1 − α. Therefore (1 − β) = P[T ∈ [q]] ≤ q(1 − α), hence β ≥ 12 . Let Wi be the number of elements that As observes after selecting element i − 1, until observing the next element. Let Xi ∼ DX be the i’th element observed after selecting the first i − 1 elements, and let Bi = I[Xi ) = ai ]. Bi are independent Bernoulli random variables with P[Bi = 1] = 1/n, and P[BWi = 1] ≥ P[E] = β ≥ 21 . By Lemma A.1, if n1 ≤ 18 , E[Wi ] ≥ n8 . j k q m . = It follows that the expected number of iterations over q selections is at least qn 8 8 2 log(2q) of Theorem 6.2. Let DX be uniform over X . Let E be the event that X *π SX , and define δ := PS∼DXm [E]. Define ǫ = 1/n, so that P[ĥ(X) 6= h∗ (X)] < ǫ if and only if ĥ = h∗ . Let i∗ such that h∗ = hi∗ . First, a pool-based algorithm can achieve the required accuracy as follows: Let jt := i∗ mod 2t for t ≤ T , and jt := ⌊i∗ /2T −t ⌋ mod 2T for t ≥ T . If E holds, then t’th element selected by the pool algorithm is at,j , where j is obtained as follows: If t ≤ T , j = jt−1 . If t > T , j = ⌊jt−1 /2⌋. In round 1, j = 0 and the selected element is a1,0 . Inductively, in this strategy the algorithm finds the t’th least significant bit in the binary expansion of i∗ in round t, thus it can use jt−1 to set j for round t. Under E, after q labels i∗ is identified exactly. This happens with a probability of 1 − δ for any D with the uniform marginal DX . Now, let Dh be a distribution with a uniform marginal over X with labels consistent with h ∈ H. Consider a stream-based algorithm As , denote its output by h̄ and its input by S ∼ Dh∞∗ . Let I be a random variable drawn uniformly at random from {0, . . . , 2q − 1}. Let H = hI be a hypothesis chosen uniformly at random from H. Consider the probability space defined ∞ by I, S ∼ DH , and the run of As on S. Let (Z1 , Y1), . . . , (Zq , Yq ) be the examples that As receives and the labels it gets, in order. Let Y = (Y1 , . . . , Yq ). Let α = P[Z1 = a1,0 | SX ]. If Z1 = a1,0 , then P[Y1 = 0 | SX ] = 12 . If Z1 6= a1,0 , then P[Y1 = 0 | SX ] ≥ 3/4. Let H be the 22 base-2 entropy, and Hb be the binary entropy. Then Hb (Y1 | SX ) = Hb ((α + 1)/4), and so H(H | Y, SX ) = H(H, Y | SX ) − H(Y1 | SX ) − H(Y1 , . . . , Yq | Y1 , SX ) ≥ q − Hb ((α + 1)/4) − (q − 1) = 1 − Hb ((α + 1)/4). From the Taylor expansion of the binary entropy around 1/2, Hb (p) ≤ 1 − (1 − 2p)2 /2, therefore H(H | Y, SX ) ≥ (1 − α)2 /8. We have P[h̄ 6= H] ≤ δ, hence PSX [P[h̄ 6= H | SX ] ≤ 2δ] ≥ 12 . By Fano’s inequality, for any SX such that P[h̄ 6= H | SX ] ≤ 2δ, (1 − α)2 /8 ≤ H(H | Y, SX ) ≤ Hb (2δ) + 2δq ≤ 2δ(log2 ( 1 ) + 2 + q). 2δ Where the last inequality follows from Hb (p) ≤ p log2 (1/p) + 2p. From the definition of δ, we have δ ≤ |X | exp(−m/n). Setting T = ⌈log2 (q)⌉, and noting that |X | ≤ q2T /2 ≤ q 2 1 and so m ≥ n log(128q 3|X |), we have δ ≤ 128q 3. 1 Therefore, for q ≥ 22, 1 − α ≤ 2q . It follows that PSX [P[Z1 6= a1,0 | SX ] ≤ 2q1 ] ≥ 1/2. Now, the same argument holds for any round t conditioned on I mod 2t = 0 and Z1 = a1,0 , . . . , Zt = at,0 , since in this case after t labels, the algorithm has q − t queries left, and needs to select from H′ , which is equivalent to H, with q − t instead of q. Moreover, P[h̄ = H | I mod 2t = 0] ≤ 1 − δ as well, since this holds for every H individually. We conclude that for every t ≤ q, with a probability at least 12 over SX , P[Zt 6= at,0 | SX , H = h0 ] ≤ 1 . 2q It follows that with a probability at least 12 over SX , P[Z1 = a1,0 , . . . , Zq = aq,0 | SX , H = h0 ] ≥ 1/2. Hence P[Z1 = a1,0 , . . . , Zq = aq,0 | H = h0 ] ≥ 1/4. Now, suppose H = h0 . Let Wt be the number of elements that As observes after selecting element t − 1, until observing the next element. Let Xj ∼ DX be the j’th element observed after selecting the first t − 1 elements, and let Bj = I[Xj = at,0 ]. Bj are independent Bernoulli random variables with P[Bj = 1] = 1/n, and P[BWt = 1] ≥ P[E] = β ≥ 41 . By n Lemma A.1, if n1 ≤ 81 , then E[Wt ] j≥ 32 . Itk follows that the expected number of iterations over q selections is at least qn 32 ≥ q 32 m 7 log(2q) . 23
10math.ST
ON THE PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I arXiv:1601.05689v3 [math.RT] 9 Nov 2017 ANDREAS BÄCHLE AND LEO MARGOLIS Abstract. We study the Prime Graph Question for integral group rings. This question can be reduced to almost simple groups by a result of Kimmerle and Konovalov. We prove that the Prime Graph Question has an affirmative answer for all almost simple groups having a socle isomorphic to PSL(2, pf ) for f ≤ 2, establishing the Prime Graph Question for all groups where the only non-abelian composition factors are of the aforementioned form. Using this, we determine exactly how far the so-called HeLP method can take us for (almost simple) groups having an order divisible by at most 4 different primes. 1. Introduction Let G be a finite group. The integral group ring ZG of G comes with a natural augmentation map X X ε : ZG → Z : zg g 7→ zg . g∈G g∈G This map is a ring homomorphism, hence every unit of ZG is mapped to 1 or −1, so up to a sign every unit of ZG lies in V(ZG) – the units of augmentation 1, also called normalized units. The connections between the properties of G and V(ZG) inspired a lot of interesting research, culminating in Weiss’ results on p-adic group rings of nilpotent groups [Wei88, Wei91], Hertweck’s counterexample to the isomorphism problem [Her01] and Jespers’ and del Rı́o’s comprehensive books [JdR16a, JdR16b], among others. Concerning the finite subgroups of V(ZG) the major open question today is the Zassenhaus Conjecture [Zas74], also known as the first Zassenhaus Conjecture: Zassenhaus Conjecture (ZC). For any u ∈ V(ZG) of finite order, there exist an element g ∈ G and a unit x in the rational group algebra QG such that x−1 ux = g. In case such g and x exist for a torsion unit u, the elements g and u are said to be rationally conjugate. This conjecture has been proven, e.g. for all nilpotent groups [Wei91], groups having a normal Sylow subgroup with abelian complement [Her06] and cyclic-by-abelian groups [CMdR13]. The conjecture is known for the simple groups PSL(2, p) for primes p ≤ 23, see [BM17] for references. But in general this conjecture remains widely open. As a first step towards the Zassenhaus Conjecture W. Kimmerle proposed the following question [Kim06]: Prime Graph Question (PQ). If V(ZG) contains a unit of order pq, does G have an element of order pq, where p and q are different primes? This is the same as to ask whether G and V(ZG) have the same Prime Graph. The Prime Graph of a group X is the graph Γ(X) whose vertices are the primes appearing as orders of elements of X; two different vertices p and q are joined by an edge if there is an element of order pq in X. Kimmerle was probably motivated to raise this question as he proved it true for all solvable groups [Kim06] – a class for which a solution for the Zassenhaus Conjecture seems to be out of reach. The Prime Graph Question became even more approachable by a reduction result [KK17, Theorem 2.1]. 2010 Mathematics Subject Classification. 16S34, 16U60, 20C05. Key words and phrases. integral group ring, torsion units, projective special linear group, Prime Graph Question, almost simple groups. The first author is a postdoctoral researcher of the FWO (Research Foundation Flanders). The second author is supported by a Marie Curie grant from EU project 705112-ZC. 1 2 ANDREAS BÄCHLE AND LEO MARGOLIS Theorem 1.1 (Kimmerle, Konovalov). If the Prime Graph Question has an affirmative answer for all almost simple images of G, then it has an affirmative answer for G itself. A group G is called almost simple if it is “sandwiched” between a non-abelian simple group S and its automorphism group, i.e. S ≃ Inn(S) ≤ G ≤ Aut(S). In this case S is the socle of G. The Prime Graph Question has been confirmed for all Frobenius groups [Kim06] and for all PSL(2, p), p a prime [Her07]. Furthermore, it is known to hold for almost simple groups with socle S isomorphic to one of the 13 smaller sporadic simple groups (by work of Bovdi, Konovalov and their collaborators, cf. [KK15] and the references therein) or to an alternating group of degree at most 17 [BC17]. Theorem A gives together with Theorem 1.1 for the first time a positive answer to the Prime Graph Question for finite groups with non-abelian composition factors from infinite series of simple groups. Theorem A. The Prime Graph Question has an affirmative answer for all almost simple groups with socle PSL(2, pf ), if f ≤ 2. The theorem follows from Proposition 3.4 and Theorem 3.5. This, and most of the previously mentioned, results are achieved by extensively using the so-called HeLP method, which is discussed in Section 2. For a finite group G denote by π(G) the set of prime divisors of the order of G. A group is called k-primary, if |π(G)| = k. After Kimmerle and Konovalov had obtained their reduction result, they investigated in the same article (almost simple) 3-primary groups. This seemed promising as there are only eight simple groups of this kind by [Fei71, § 7] and the Classification on Finite Simple Groups. The HeLP method turned out to be not entirely sufficient and the result was completed by the authors using a new method, the so-called lattice method [BM17]. After the Prime Graph Question for 3-primary groups was settled, it was natural to consider the question for 4-primary groups – a much bigger class of groups. Lately, the prime graphs of the almost simple 4-primary groups were investigated in [KK11]. The simple 4-primary groups were first classified in [Shi91] and independently in [HL00], using the Classification of the Finite Simple Groups. More arithmetic restrictions were obtained in [BCM01, Theorem 2]. There are three, potentially infinite, series and 37 specific simple 4-primary groups. These simple groups give rise to 123 specific and 5 series of almost simple 4-primary groups. We sum up the results relevant to us in the following proposition: Proposition 1.2 (Shi; Huppert, Lempken; Bugeaud, Cao, Mignotte). The almost simple 4primary groups G are the ones listed in Table 9 on page 23. If G = PSL(2, 2f ), then either f f = 4 or 2f − 1 is a Mersenne prime; in this case 2 3+1 is also a prime. If G = PSL(2, 3f ) or f f G = PGL(2, 3f ), then either f ∈ {4, 5} or 3 2−1 and 3 4+1 are both prime. It is an open number theoretical problem, whether there are actually infinitely many 4-primary groups as noted in the Kourovka Notebook [MK15, Problem 13.65]. This study of the Prime Graph Question for 4-primary groups is divided into two parts. In this first part we apply the HeLP method to the almost simple 4-primary groups and determine exactly for which of them the HeLP method suffices to answer the Prime Graph Question. For a bunch of groups, this is straight forward and can be done by a GAP package developed by the authors for such a purpose [BM15b, BM15a]. In these instances, the data are collected in a compact form in Section 5. However, there are cases left requiring a more detailed study for different reasons. Here, the arguments are given in more detail. This analysis is the starting point of part two of this study, where the lattice method will be applied to many of the remaining cases. The results for 4-primary groups of this part read as follows. Theorem B. Let G be an almost simple 4-primary group. The following table shows, whether the HeLP method is sufficient to prove the Prime Graph Question for G. A simple group S appearing in bold indicates all almost simple groups having S as a socle. The HeLP method suffices to answer the Prime Graph Question if and only if the isomorphism type of G appears in the left column of the following table. If the HeLP method does not suffice to prove that there are no units of order PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I 3 pq in V(ZG) for a group G in the right column, then pq is given in italic in parentheses. HeLP method sufficient to prove (PQ) PSL(2, p), p a prime HeLP method not sufficient to prove (PQ) PSL(2, 2f ), f ≥ 5 (6) PSL(2, 3f ), f ≥ 7 (6) A7 , A8 , A9 , A10 PSL(2, 25), PSL(2, 49), PSL(4, 3) PSU(3, 5), PSU(3, 8), PSU(3, 9) PSU(4, 3), PSU(4, 5), PSU(4, 4), PSU(5, 2) PSp(4, 4), PSp(4, 5), PSp(4, 9), PSp(6, 2) P Ω+ (8, 2), Sz(8), G2 (3), 3 D4 (2) 2 F4 (2)′ , M11 , M12 , J2 PSL(2, 16).2, PSL(2, 16).4 PSL(2, 27).3, PSL(2, 27).6 PSL(2, 81).2a, PSL(2, 81).4a PSL(3, 4).2a, PSL(3, 4).2b, PSL(3, 4).2c PSL(3, 4).3, PSL(3, 4).6, PSL(3, 4).S3 b PSL(3, 4).S3 c, PSL(3, 4).D12 PSL(3, 7).3, PSL(3, 7).S3 PSL(3, 8).2, PSL(3, 8).3, PSL(3, 8).6 PSU(3, 4).2, PSU(3, 4).4 Sz(32).5 PSL(3, 5) (15), PSL(3, 17) (51) PSU(3, 7) (21) PSp(4, 7) (35) PSL(2, 16) (6) PSL(2, 27) (6), PSL(2, 27).2 (6) PSL(2, 81) (6), PSL(2, 81).2b (6, 15) PSL(2, 81).2c (6, 15), PSL(2, 81).22 (15) PSL(2, 81).4b (15), PSL(2, 81).(2 × 4) (15) PSL(2, 243) (6), PGL(2, 243) (6, 33) PSL(3, 4) (6) PSL(3, 7) (21), PSL(3, 7).2 (21) PSL(3, 8) (6) PSU(3, 4) (6) Sz(32) (10) The proof is given in Section 5. Together with the reduction in Theorem 1.1 we obtain: Corollary C. Let G be a finite group and assume that all almost simple images of G are k-primary with k at most 4. Assume moreover that if an almost simple image of G appears in the right column of the table in Theorem B, then G contains elements of the orders given in parentheses. Then the Prime Graph Question has an affirmative answer for G. The class of 4-primary groups turns out to be a good benchmark for the power of the HeLP method. We encounter several difficulties and limitations when applying it. Firstly the (possibly) infinite series can be handled using generic ordinary and Brauer characters. In many cases we needed to do manual computations, when character tables were not available in the GAP Atlas of Group Representations [WPN+ 11] and the GAP character table library [Bre12]. In these cases we use induced characters, special tables from the literature and other specific arguments. In one situation we encounter a limit of representation theoretical knowledge, namely for the projective symplectic group PSp(4, 7). Here the 2-Brauer table is only known up to a parameter. We show however that the value of the parameter has no influence on the ability of the HeLP method to answer the Prime Graph Question for this group. In the follow-up article the Prime Graph Question will be proved for more of the almost simple groups in question, among others for the series of all 4-primary PSL(2, 2f ), Aut(PSL(2, 81)) = PSL(2, 81).(2 × 4), PSL(3, 4) and PSU(3, 7) using the lattice method. 2. HeLP Method The main notion to study the Zassenhaus Conjecture P and related questions are partial augmenzg g ∈ ZG. Then tations. Let C be a conjugacy class in G and u = g∈G εC (u) = X g∈C zg 4 ANDREAS BÄCHLE AND LEO MARGOLIS is called the partial augmentation of u with respect to C. Sometimes wePdenote it also by εc (u), where c is an element in C. Note that for a normalized unit u we have C εC (u) = 1, summing over all conjugacy classes C of G. The connection between rational conjugacy and partial augmentations is provided by [MRSW87, Theorem 2.5]: A unit u ∈ V(ZG) of order n is rationally conjugate to an element of G if and only if εC (ud ) ≥ 0 for all conjugacy classes C in G and all divisors d of n. It is known in general that for a torsion unit u ∈ V(ZG) we have ε1 (u) = 0, unless u = 1, by the Berman-Higman Theorem [JdR16a, Proposition 1.5.1]. Moreover if the order of elements in C does not divide the order of u, then εC (u) = 0 [Her07, Theorem 2.3]. A method to study the Zassenhaus Conjecture using ordinary characters of G was introduced by Luthar and Passi in [LP89] and later extended to Brauer characters by Hertweck in [Her07]. Subsequently it became known as HeLP (HertweckLutharPassi), a name coined by Konovalov. Let D be a K-representation of G with character χ where K is an algebraically closed field of characteristic p ≥ 0. Then D can be linearly extended to ZG and restricted afterwards to V(ZG), providing a K-representation, also called D, of V(ZG) with the character χ now defined on all p-regular elements of V(ZG), i.e. those torsion units whose order is not divisible by p, see [Her07, § 3]. All torsion units are considered to be 0-regular. Let u ∈ V(ZG) be a torsion unit of order n, such that n is not divisible by p. Summing over all p-regular conjugacy classes C of G we obtain X εC (u)χ(C) = χ(u). (1) C This holds for ordinary characters and also for Brauer characters by [Her07, Theorem 3.2]. In the next two paragraphs, let u ∈ V(ZG) always be a unit of order n. Denote by A ∼ (α1 , ..., αm ) the fact that a diagonalizable matrix A has eigenvalues α1 , ..., αm with multiplicities. Now assume one knows, e.g. by induction, the eigenvalues of D(ud ) for all divisors d of n, apart from 1. Then one can obtain restrictions on the possible eigenvalues of D(u) in the following way: If n = q f is a power of the prime q with D(uq ) ∼ (α1 , ..., αm ) then there exist β1 , ..., βm such that βiq = αi and D(u) ∼ (β1 , ..., βm ). In case n is not a prime power and q and r are different prime divisors of n, there are integers a and b such that aq + br = 1. Assume that D(uaq ) ∼ (α1 , ..., αm ) and D(ubr ) ∼ (β1 , ..., βm ). Then, since D(uaq ) and D(ubr ) are simultaneously diagonalizable, there is a permutation π ∈ Sm such that D(u) = D(uaq )D(ubr ) ∼ (α1 βπ(1) , ..., αm βπ(m) ). Usually the character ring Z[χ] of χ, i.e. the smallest ring containing the values of χ on elements of G, allows to obtain more information on the eigenvalues of D(u) since χ(u) has to lie in Z[χ]. Comparing eigenvalues of D(u) obtained in this way with (1) one obtains restrictions on the possible partial augmentations of u and vice versa. Via discrete Fourier inversion this may be formalized in the following way: Denote by ζ a fixed primitive complex n-th root of unity and by ξ some complex n-th root of unity. In case p > 0 still ξ can be understood to be a possible eigenvalue of D(u) via a fixed Brauer correspondence of n-th roots of unity in K and C, cf. [CR90, § 17]. Denote by TrL/Q the number theoretical trace of the field extension L/Q. Then the multiplicity µ(ξ, u, χ) of ξ as an eigenvalue of D(u), which is a non-negative integer, is 1X 1X µ(ξ, u, χ) = TrQ(ζ d )/Q (χ(ud )ξ −d ) + εC (u) TrQ(ζ)/Q (χ(C)ξ −1 ) ∈ Z≥0 . (2) n n d|n d6=1 C Here the second sum runs over all conjugacy classes containing elements of order coprime to p, if p > 0. Thus, if we know the partial augmentations of ud for all divisors d 6= 1 of n, we obtain a system of integral inequalities for the partial augmentations of u. While it is mostly more convenient to calculate with actual eigenvalues of representations, the more formal formulation of the method given in (2) provides an algorithm directly implementable in a computer program which has been done in the HeLP package [BM15b, BM15a] written by the authors. It was programmed for the computer algebra system GAP [GAP15] and uses the PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I 5 program 4ti2 [tt] to solve integral inequalities. This package, the character table library of GAP [Bre12] and the GAP Atlas of Group Representations [WPN+ 11] provide the basis of the second part of the current paper. We give the results in a way such that they can easily be reproduced using the package. On the other hand several results, especially for series of groups, are given in Section 3 with complete proofs. Notation: We will use the following notation to indicate that certain eigenvalues occur with greater multiplicity. For a diagonalizable matrix A we write   A ∼ α, β, γ, m × δ1 , ..., δk , n × η1 , ..., ηℓ to indicate that the eigenvalues of A are δ1 , ..., δk (each with multiplicity m), and η1 , ..., ηℓ (each with multiplicity n), α, β and γ (all with multiplicity 1). If C1 , ..., Ck are all conjugacy classes of elements of some fixed order n in G and u ∈ ZG, we write ε̃n (u) = εC1 (u) + ... + εCk (u). For a conjugacy class K we denote by K p the conjugacy class containing the p-th powers of the elements of K. The following Lemma can be found in [BH08, Remark 6]. Lemma 2.1. Let G be a finite group, u ∈ V(ZG) a torsion unit and p a prime. Then for every conjugacy class C of G X εC (up ) ≡ εK (u) mod p. K : K p =C Assume u is of order pq, where p and q are different primes, and G contains no elements of order pq. Then using the Berman-Higman Theorem we obtain ε̃p (u) ≡ 0 mod p and ε̃p (u) ≡ 1 mod q. Remark 2.2. We provide some explanations about our understanding of the HeLP method. (1) In view of the criterion for rational conjugacy of torsion units in V(ZG) to elements of G, it is important not only to know the partial augmentations of a torsion unit u, but also of its powers ud , where d is a divisor of the order of u. For that reason we consider as the possible partial augmentations for elements of order n the partial augmentations of all ud , for all divisors d of n. Since un = 1 always, the partial augmentations of un are not included here. Say e.g. a group possesses two conjugacy classes of involutions, 2a and 2b, and one of elements of order 3, say 3a, and none of elements of order 6. Then a typical tuple of possible partial augmentations of a unit u ∈ V(ZG) of order 6 looks like (ε2a (u3 ), ε2b (u3 ), ε3a (u2 ), ε2a (u), ε2b (u), ε3a (u)). As above, we always list only those partial augmentations of units which might not be equal to 0. We call a tuple of possible partial augmentations of u ∈ V(ZG) trivial, if it coincides with the tuple of partial augmentations of an element g ∈ G. By [MRSW87, Theorem 2.5] this is the case if and only if this tuple consists of non-negative numbers. (2) When we speak of the maximal possible results using the HeLP method, we include into this all results listed so far in this paragraph. This means if u ∈ V(ZG) is a torsion unit of order n 6= 1, then • ε1 (u) = 0 and εC (u) = 0, if a conjugacy class C consists of elements of order not dividing n. • u satisfies the HeLP constraints given in (2) for all ordinary characters of G and all p-Brauer characters of G, for all primes p not dividing n. • u satisfies Lemma 2.1. (3) Let u ∈ V(ZG) be a torsion unit of order n and q and r different prime divisors of n. Assume that D is a representation having a character which is rational valued on all conjugacy classes of elements of order dividing n. By the method explained above we have D(u) = D(uaq )D(ubr ) for some integers a and b. For every fixed k, the multiplicity of all 6 ANDREAS BÄCHLE AND LEO MARGOLIS primitive k-th roots of unity as eigenvalues of D(uaq ) and of D(uq ) have to be the same, as their trace is rational. Hence D(uaq ) ∼ D(uq ) and we will give in such situations the diagonal form of D(uq ) instead of the diagonal form of D(uaq ). It is in general much harder to compute Brauer tables of a group than ordinary character tables. For this reason it is often of importance to be able to exclude some prime divisors p of the order of G as candidates whose p-Brauer tables will provide new information for the HeLP method. If a p-Brauer character coincides on all p-regular conjugacy classes of G with an ordinary character it is called liftable, cf. e.g. [Whi90a], and will surely not provide new information. E.g. by the FongSwan-Rukolaine Theorem [CR90, Theorem 22.1] any p-Brauer character of a p-solvable group is liftable and one does not need to include p-Brauer tables in the computations in this case. 3. General Results In this section we prove general results, independent of the special class of 4-primary groups. These results turn out however to be very useful for this class of groups. Lemma 3.1. Let G be a finite group, N a normal subgroup and p a prime. Assume N contains exactly one conjugacy class of elements of order p, the p-rank of G/N is 1 and that G/N possesses a representation D over a field of characteristic coprime to p such that a p-element of G/N is in the center, but not in the kernel of D. Then units of order p in V(ZG) are rationally conjugate to elements of G. Proof. Let u ∈ V(ZG) be a unit of order p. Let C be the conjugacy class of elements of order p contained in N . If this is the only class of elements of order p in G, then we are done. So assume there are classes K1 , ..., Kp−1 of elements of order p in G \ N such that K1j = Kj , this is possible by the assumptions on G. We have εC (u) + εK1 (u) + ... + εKp−1 (u) = 1. (3) ′ Denote by π : G → G/N the natural projection and set D = D ◦ π, a representation of G of degree d, say. Let χ be the character afforded by D′ . Let χ(K1 ) = dζ for some primitive p-th root of unity ζ. We have χ(u) = dεC (u) + dζεK1 (u) + ... + dζ p−1 εKp−1 (u) = d(ζ(εK1 (u) − εC (u)) + ... + ζ p−1 (εKp−1 (u) − εC (u))). Hence χ(u)/d ∈ Z[ζ]. On the other hand, χ(u) is the sum of d roots of unity and hence χ(u) = dζ i for some i. Thus ζ i = ζ(εK1 (u) − εC (u)) + ... + ζ p−1 (εKp−1 (u) − εC (u)). Considering the basis ζ, ..., ζ p−1 of Z[ζ] and using (3) we obtain that exactly one of the partial  augmentations εC (u), εK1 (u), ..., εKp−1 (u) must be 1 while all others are 0. We will apply this lemma frequently for representations of degree 1 and refer to it in Table 9 along with the character inflated to G. To establish the results for the almost simple groups containing PSL(2, pf ) we will need some well-known properties of these groups and their representation theory which we collect for the convenience of the reader in the following remark. Remark 3.2. Let G = PGL(2, q) and H = PSL(2, q), where q = pf . Set d = gcd(2, p − 1). Then |G| = (q − 1)q(q + 1) and |H| = |G|/d. (1) The orders of elements of G are exactly the divisors of q − 1, q + 1 and p, while the orders of elements in H are exactly the divisors of (q − 1)/d, (q + 1)/d and p. The group H possesses a partition into cyclic subgroups, so different cyclic subgroups of the same order have trivial intersection. There are d conjugacy classes of elements of order p in H and these classes fuse in G. If g ∈ H is of order coprime to p then g −1 is the only conjugate of g in hgi and the conjugacy class of g is the same in G [Dic58, Chapter XII] (see also [Hup67, II, §6 - §8]). PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I 7 (2) The outer automorphism group of H is isomorphic to Cd × Cf while the outer automorphism group of G is isomorphic to Cf . The group Cf is induced by the projection of the entry-wise action of the Frobenius automorphism of Fq on the 2 × 2-matrices over Fq [Wil09, 3.3.4]. Let σ be a generator of this group Cf . The group hH, σi is called PΣL(2, q). The full automorphism group of H is PΓL(2, q), the group of semilinearities of the projective line over Fq . (3) The natural permutation representation of H, G and PΓL(2, q) on the projective line over Fq , which has q + 1 elements, is 2-transitive [HB82, XI, Example 1.3]. Thus modulo the trivial representation we obtain an irreducible ordinary representation of degree q [Hup67, V, Satz 20.2]. The character corresponding to this representation is known as the Steinberg character. With the facts given in [HB82, XI, Example 1.3] the character values may easily be calculated to be:  q x=1    1 o(x) | q−1 d ψ(x) =  0 o(x) | p    −1 o(x) | q+1 d . The ordinary character tables of G and H were first computed in [Sch07] and [Jor07]. In particular for every prime r dividing q−1 d and fixed conjugacy class C of elements of order r in H there exist characters χi of degree q + 1 such that χi (C) = ζ i + ζ −i for some fixed primitive r-th root of unity ζ and all possible i. Moreover χi (g) = 1, if g has order p, and χi (g) = 0, if the order of g divides q+1 d . The general linear group GL(2, q) acts via conjugation on the Lie Algebra sl2 (Fq ) of 2 × 2-matrices over Fq with trace 0. The kernel of this action is exactly the center of GL(2, q) giving a 3-dimensional Fq -representation of G, say P with character ϕ. Let g be an element of G of order r coprime to p. Computing the eigenvalues of P (g) we find ϕ(g) = 1 + ζ + ζ −1 for some primitive r-th root of unity ζ. Let r be an odd prime divisor of |H| different from p. By [Bur76] any r-Brauer character of H is liftable and any 2-Brauer character of H is liftable if and only if q ≡ −1 mod 4. If p is odd, there are exactly two irreducible ordinary characters of H whose inductions to G are irreducible and the induced character η is the same for both. Since both these H-characters take different values on the conjugacy classes of elements of order p the reduction of η modulo r will be irreducible. This implies that any r-modular Brauer character of G is also liftable. A proof of the following results can be found in [Her07, Propositions 6.3, 6.4, 6.7]. Proposition 3.3 (Hertweck). Let G = PSL(2, pf ) and u ∈ V(ZG) a torsion unit. Then the following statements hold: (1) If u is of prime order different from p, then u is rationally conjugate to an element of G. (2) If the order of u is not divisible by p, then the order of u coincides with the order of an element of G. (3) If f = 1, then (PQ) has an affirmative answer for G. With a generalization of Hertweck’s proofs of [Her07, Propositions 6.3, 6.7] we obtain the following result for PGL(2, pf ). Proposition 3.4. Let G = PGL(2, pf ). If u ∈ V(ZG) is a torsion unit of order coprime to p, then u has the same order as an element of G. If f = 1, the Prime Graph Question has an affirmative answer for G and thus for any almost simple group with socle PSL(2, p). Proof. The Zassenhaus Conjecture for small values of pf was proved in [HP72] for PGL(2, 2) ≃ S3 , in [AH88] for PGL(2, 3) ≃ S4 , in [LP89] for PGL(2, 4) ≃ A5 and in [LT91] for PGL(2, 5) ≃ S5 . (ZC) for these groups may be also easily verified using HeLP. Let first f = 1 and let u ∈ V(ZG) be of order pr for a prime r different from p. Then there are no elements of order pr in G. Let η be the twist of the Steinberg character with the non-trivial 8 ANDREAS BÄCHLE AND LEO MARGOLIS character of degree 1 and let D be a representation affording η. Then η is integral and takes the same value on both classes of involutions of G. First assume r | p − 1. Then  D(ur ) ∼ 1, ζp , ..., ζpp−1 ,   2 r−1 × 1 , p−1 D(up ) ∼ p+r−1 r r × ζr , ζr , ..., ζr and the sum of eigenvalues of D(u) can not be an integer, since we may assume p > 3. Next assume r | p + 1. Then  D(ur ) ∼ 1, ζp , ..., ζpp−1 ,   2 r−1 D(up ) ∼ p−r+1 × 1 , p+1 r r × 1, ζr , ζr , ..., ζr and again the sum of eigenvalues of D(u) is not an integer, since p > 3. So let G = PGL(2, pf ) and let u ∈ V(ZG) be of order coprime to p. Let D be the 3-dimensional p-modular representation of G described in Remark 3.2(3) with character ϕ. By Remark 3.2(1) we may assume that u is of odd order rs where r and s are primes. Let g and h be elements of G of order r and s respectively. Since (r−1)/2 (r−1)/2 X ϕ(us ) = εgi (us )(1 + ζri + ζr−i ) = 1 + X εgi (us )(ζri + ζr−i ) i=1 i=1 P(r−1)/2 is the sum of exactly three r-th roots of unity and i=1 εgi (us ) = 1, we obtain that exactly s s one εgi (u ) is 1, while all others are 0 and u is rationally conjugate to an element of G. The same applies for ur . Thus there exists a primitive rs-th root of unity ξ such that D(ur ) ∼ (1, ξ r , ξ −r ) D(us ) ∼ (1, ξ s , ξ −s ). and Since ϕ(u) is real, D(u) has the eigenvalue 1 and two primitive rs-th roots of unity as eigenvalues which are inverses of each other. Thus there exists some k coprime with rs such that (s−1)/2 (r−1)/2 ϕ(u) = 1 + ξ k + ξ −k = X X εgi (u)(1 + ζri + ζr−i ) + i=1 i=1 (s−1)/2 (r−1)/2 =1+ εhi (u)(1 + ζsi + ζs−i ) X εgi (u)(ζri + ζr−i ) + X εhi (u)(ζsi + ζs−i ). i=1 i=1 Hence (s−1)/2 (r−1)/2 k ξ +ξ −k = X εgi (u)(ζri + ζr−i ) + X εhi (u)(ζsi + ζs−i ). (4) i=1 i=1 Consider {ξ j | gcd(j, rs) = 1} as a basis of Z[ξ]. Note that a primitive r-th root of unity has coefficient sum −(s−1) with respect to this basis, while a primitive s-th root of unity has coefficient sum −(r − 1). Recall that ε̃r (u) denotes the sum of all partial augmentations of u at classes with elements of order r. Then comparing coefficient sums in (4) we obtain (s−1)/2 (r−1)/2 2 = −2(s − 1) X i=1 εgi (u) − 2(r − 1) X εhi (u) = −2(s − 1)ε̃r (u) − 2(r − 1)ε̃s (u). i=1 Using ε̃r (u) + ε̃s (u) = 1 this implies −1 = (s − 1)(1 − ε̃s (u)) + (r − 1)ε̃s (u) and so ε̃s (u) = A contradiction, since r and s are odd. −s r−s .  Theorem 3.5. Let G be an almost simple group with socle S = PSL(2, p2 ) for some prime p. Then the Prime Graph Question has an affirmative answer for G. Proof. If p = 2, then G is the alternating or symmetric group of degree 5. In that case even the Zassenhaus Conjecture holds for G [LP89, LT91]. If p = 3, then S is the alternating group of degree 6 and the Prime Graph Question has been answered for all possibilities of G [Her08, KK15, BM17]. So assume p ≥ 5. PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I 9 We will use the facts given in Remark 3.2(2). Let g be an involution in PGL(2, p2 ) not lying in PSL(2, p2 ) and let σ be the automorphism of S induced by the Frobenius automorphism of Fp2 . Then the outer automorphism group of S is generated by g and σ, modulo the inner automorphisms, and is isomorphic to the Klein four group, see [HB82, XI, Example 1.3]. We will use the names for the groups given in Fig. 1 where PGL(2, p2 ) = hPSL(2, p2 ), gi and PΣL(2, p2 ) = hPSL(2, p2 ), σi. Figure 1. Almost simple groups containing PSL(2, p2 ), indices of successive groups are 2. PΓL(2, p2 ) ▲▲▲ ♣♣ ▲▲▲ ♣♣♣ ♣ ▲▲▲ ♣ ♣ ▲ ♣♣♣ PΣL(2, p2 ) M (p2 ) PGL(2, p2 ) ◆◆◆ r r ◆◆◆ rrr ◆◆◆ r r ◆◆ rrr PSL(2, p2 ) Let q and r be different primes dividing the order of S. Then S contains elements of order qr if and 2 2 only if q and r both divide p 2−1 or both divide p 2+1 . Moreover PGL(2, p2 ) contains an element of order 2q for any q 6= p, cf. Remark 3.2(1), and PΣL(2, p2 ) contains elements of order 2p and 2 2q whenever q | p 2−1 , since σ commutes exactly with the elements lying in the natural subgroup PSL(2, p). Note that if C1 and C2 are different conjugacy classes in PSL(2, p2 ) of elements of prime order q 6= p, then they are still different classes in PGL(2, p2 ) by Remark 3.2(1). They fuse into one class in PΣL(2, p2 ), M (p2 ) and PΓL(2, p2 ) if and only if the p-th powers of elements in 2 C1 lie in C2 , in particular q | p 2+1 . This can be seen when thinking of the elements of C1 as diagonalized matrices (if necessary over a bigger field). Then σ is conjugating such an element to its p-th power. Note that all elements of prime order in M (p2 ) already lie in S. This is clear for elements of odd order and follows for involutions from [Gor69, End of proof of Lemma 2.3]. 2 2 Let q | p 2+1 and 2 6= r | p 2−1 be primes. By the discussion above it suffices to prove that the following units u ∈ V(ZG) do not exist: • G = PΓL(2, pf ) and u has order qr, pq or pr. • G = M (p2 ) and u has order 2p or 2q. • G = PGL(2, p2 ) and u has order 2p. • G = PΣL(2, p2 ) and u has order 2q. We will consider all these cases, some of them simultaneously. 2 2 First let G = PΓL(2, p2 ) and q | p 2+1 and r | p 2−1 be odd primes. Let ψ be the p-modular Brauer character of G of degree 6 induced from the Brauer character ϕ of PGL(2, p2 ) having degree 3 described in Remark 3.2(3). Let D be a representation affording ψ. We will show first that units of order r and q in V(ZG) are rationally conjugate to elements of G. If v ∈ V(ZG) has order r and g is an element of order r in G then g lies in PGL(2, p2 ) and ψ(g) is just twice the value of ϕ(g). We thus can argue in the same way as in the proof of Proposition 3.4 to prove that v is rationally conjugate to an element of G. If v is of order q, let g be an element of order q in G. Then there exists a primitive q-th root of unity ξ such that D(g) ∼ (1, ξ, ξ −1 , 1, ξ p , ξ −p ). Let C1 , ..., Ck be the conjugacy classes of elements of order q in G such that g i ∈ Ci for all i. Then X  εCi (v) ξ i + ξ −i + ξ ip + ξ −ip . ψ(v) = 2 + i i −i ip −ip Viewing {ξ + ξ + ξ + ξ | (i, q) = 1} as a basis of Z[ξ + ξ −1 + ξ p + ξ −p ], using the fact that P i εCi (v) = 1 and that ψ(v) is the sum of exactly 6 roots of unity, we obtain that v is rationally conjugate to an element in G. 10 ANDREAS BÄCHLE AND LEO MARGOLIS Assume now that u ∈ V(ZG) is a unit of order qr. Let ζ be a primitive qr-th root of unity. For g ∈ G of order r we have ψ(g) = 2(1 + ζ qi + ζ −qi ) for some i coprime to r and for h ∈ G of order q we have ψ(h) = 2 + ζ rj + ζ −rj + ζ prj + ζ −prj for some j coprime to q. Consider B = {ζ i +ζ −i | (i, qr) = 1} as a Z-basis of Z[ζ+ζ −1 ]. Then by the above and using ε̃r (u)+ ε̃q (u) = 1 the coefficient sum of ψ(u) expressed with respect to the basis B is exactly ε̃r (u) ((q − 1)(r − 1) − 2(q − 1)) + ε̃q (u)((q − 1)(r − 1) − 2(r − 1)) =(q − 1)(r − 1) − 2(q − 1)ε̃r (u) − 2(r − 1)(1 − ε̃r (u)) =(q − 3)(r − 1) + 2(r − q)ε̃r (u). (5) On the other hand from the fact that ur and uq are rationally conjugate to elements of G we conclude that there exists an i coprime to r and a j coprime to q such that D(uq ) ∼ (1, 1, ζ qi , ζ −qi , ζ qi , ζ −qi ), D(ur ) ∼ (1, 1, ζ rj , ζ −rj , ζ prj , ζ −prj ). Then ψ(u) is either the sum of 2 and four primitive qr-th roots of unity or the sum of two primitive r-th roots of unity, two primitive q-th roots of unity and two primitive qr-th roots of unity. Comparing the corresponding coefficient sum expressed with respect to B to the sum computed in (5) we find in the first case (q − 1)(r − 1) + 2 = (q − 3)(r − 1) + 2(r − q)ε̃r (u) ⇔ ε̃r (u) = r , r−q a contradiction. In the second case we obtain −(q − 1) − (r − 1) + 1 = (q − 3)(r − 1) + 2(r − q)ε̃r (u). The left hand side of this equation is odd, while the right side is even, so u does not exist. 2 Now assume that u ∈ V(ZG) is of order pq, for a prime q | p 2+1 . Denote by C the conjugacy class of elements of order p in G and let ζ be a primitive pq-th root of unity. We will use the ordinary character χ1 of PSL(2, p2 ) of degree p2 + 1 described in Remark 3.2(3). It takes the value 0 on 2 each conjugacy class of elements of order q, if q | p 2+1 , and the sum of two primitive r-th roots of 2 unity, if r | p 2−1 . Recall that χ1 (g) = 1 for elements of order p. Let χ be the character induced from χ1 on G. Computing several multiplicities of eigenvalues of a representation realizing χ using (2) we obtain  1 4(p2 + 1) + TrQ(ζ q )/Q (4) + εC (u) TrQ(ζ)/Q (4ζ −p ) pq  4 2 = p + p − (p − 1)εC (u) , pq µ(ζ p , u, χ) =  1 4(p2 + 1) + TrQ(ζ q )/Q (4) + εC (u) TrQ(ζ)/Q (4) pq  4 2 = p + p + (p − 1)(q − 1)εC (u) pq µ(1, u, χ) = Since εC (u) ≡ 0 mod p by Lemma 2.1 and p ≥ 5 these multiplicities imply εC (u) ∈ {0, p}, since otherwise one of the multiplicities is negative. But since also εC (u) ≡ 1 mod q by Lemma 2.1 we 2 get q | p 2−1 , contradicting our assumption on q. 2 So assume u ∈ V(ZG) is a unit of order pr with an odd prime r | p 2−1 . Denote by χ the character of G obtained from inducing the sum of all Galois conjugates of χ1 . Thus χ has degree r−1 4(p2 + 1) · r−1 2 , χ(g) = −4, if g is of order r, and χ(h) = 4 · 2 for every h of order p. Using again PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I 11 (2) and εC (u) + ε̃r (u) = 1 we obtain   r−1 r−1 1 2 4(p + 1) + TrQ(ζ p )/Q (−4ζ p ) + TrQ(ζ r )/Q 4 pr 2 2    r − 1 −p + εC (u) TrQ(ζ)/Q 4 + ε̃r (u) TrQ(ζ)/Q (−4ζ −p ) ζ 2   r−1 r+1 4 p(p + 1) +p−( )(p − 1)εC (u) , = pr 2 2 µ(ζ p , u, χ) =    1 r−1 r−1 2 µ(1, u, χ) = 4(p + 1) + TrQ(ζ p )/Q (−4) + TrQ(ζ r )/Q 4 pr 2 2    r−1 + ε̃r (u) TrQ(ζ)/Q (−4)) + εC (u) TrQ(ζ)/Q 4 2   4 r−1 r2 − 1 = p(p + 1) − p(r − 1) + ( )(p − 1)εC (u) . pr 2 2 Since p ≥ 5 and εC (u) ≡ 0 mod p and εC (u) ≡ 1 mod r not both these multiplicities can simultaneously be non-negative integers, completing the proof of the Prime Graph Question for G = PΓL(2, p2 ). Assume next that G = M (p2 ) or G = PGL(2, p2 ) and u has order 2p. We will use the character χ, which is the induced character of the character χ1 of degree p2 +1 of S described in Remark 3.2(3). Denote by 2a the conjugacy class of involutions in G which lie already in S and by 2b the other class of involutions in G, if G = PGL(2, p2 ). If G = M (p2 ), the unique class of involutions is contained in S and the class 2b can just be ignored in the following computations (see the discussion following Fig. 1). Denote by C again the class of elements of order p. Then χ(2a) = −4, χ(C) = 2 and χ(2b) = 0. There is a character τ containing S in its kernel and mapping elements outside of S to −1. By Lemma 3.1 up is then rationally conjugate to an element of G. Assume first that up is rationally conjugate to an element of 2a. From τ we then get ε2a (u) + εC (u) − ε2b (u) = 1 and since u is normalized this implies ε2b (u) = 0 and ε2a (u) = 1−εC (u). Denoting by ζ a primitive 2p-th root of unity and computing again multiplicities of certain roots of unity as eigenvalues of u under a representation realizing χ we obtain µ(−1, u, χ) = 1 2 2(p + 1) + TrQ/Q ((−4) · (−1)) + TrQ(ζ 2 )/Q (2) 2p  + εC (u) TrQ(ζ)/Q (2 · (−1)) + ε2a (u) TrQ(ζ)/Q (−4 · (−1)) = µ(1, u, χ) =  1 2 p + 3p − 3(p − 1)εC (u) , p 1 2 2(p + 1) + TrQ/Q (4) + TrQ(ζ 2 )/Q (2) 2p  + εC (u) TrQ(ζ)/Q (2) + ε2a (u) TrQ(ζ)/Q (−4) =  1 2 p − p + 3(p − 1)εC (u) . p Since p ≥ 5 this contradicts εC (u) ≡ 0 mod p and εC (u) ≡ 1 mod 2 and the fact that both expressions are non-negative. 12 ANDREAS BÄCHLE AND LEO MARGOLIS So assume up is rationally conjugate to elements in 2b. Then form τ we get ε2b (u) = 1 and ε2a (u) = −εC (u). Computing the multiplicities as above we obtain 1 2 2(p + 1) + TrQ(ζ 2 )/Q (2) µ(−1, u, χ) = 2p  + εC (u) TrQ(ζ)/Q (2 · (−1)) + ε2a (u) TrQ(ζ)/Q (−4 · (−1)) 1 = (p2 + p − 3(p − 1)εC (u)), p µ(1, u, χ) = 1 2 2(p + 1) + TrQ(ζ 2 )/Q (2) 2p  + εC (u) TrQ(ζ)/Q (2) + ε2a (u) TrQ(ζ)/Q (−4) 1 = (p2 + p + 3(p − 1)εC (u)). p This contradicts once again εC (u) ≡ 0 mod p and εC (u) ≡ 1 mod q and the non-negativity of the multiplicities. 2 So finally let G = PΣL(2, p2 ) or G = M (p2 ) and let u be of order 2q where q | p 2+1 is an odd prime. Denote by 2a again the conjugacy class of involutions in G which lie in S and by 2b and 2c the other conjugacy classes of involutions in G, if G = PΣL(2, p2 ). If G = M (p2 ), the group has a unique class of involutions and the classes 2b and 2c can again be ignored in the following computations (see the discussion following Fig. 1). Let C1 , ..., Ck be the conjugacy classes of elements of order q in G such that for some fixed elements g of order q we have g i ∈ Ci . Denote by ψ the character induced from the 3-dimensional p-modular character ϕ of S = PSL(2, p2 ) described in Remark 3.2(3) and by τ the character containing S in the kernel and sending elements outside of S to −1. Since τ (uq ) = ε2a (uq ) − ε2b (uq ) − ε2c (uq ) ∈ {±1} and uq is normalized, we get ε2a (uq ) ∈ {0, 1}. Now ψ(2a) = −2, ψ(2b) = ψ(2c) = 0 and ψ(Ci ) = 2 + ζ i + ζ −i + ζ ip + ζ −ip for some fixed q-th root of unity ζ. Consider B = {ζ i + ζ −i + ζ ip + ζ −ip |(i, q) = 1} as a basis of Z[ζ + ζ −1 + ζ p + ζ −p ] and let D be a representation realizing ψ. Separating the cases ε2a (uq ) = 1 and ε2a (uq ) = 0 we have D(uq ) ∼ (1, 1, −1, −1, −1, −1) and D(uq ) ∼ (1, 1, 1, −1, −1, −1) respectively. In any case u2 is rationally conjugate to an element of G, which we can prove as in the case of G = PΓL(2, p2 ) and this implies the existence of some i coprime to q such that D(u2 ) ∼ (1, 1, ζ i , ζ −i , ζ ip , ζ −ip ). Since ψ(u) is in the Z-span of B we get D(u) ∼ (1, 1, −ζ i , −ζ −i , −ζ ip , −ζ −ip ). q+1 Thus the coefficient sum of ψ(u) with respect to B is 2 · (− q−1 4 ) − 1 = − 2 . Moreover from the q q eigenvalues of D(u) we deduce that ε2a (u ) = 1. Then τ (u ) = 1 and this yields 1 = τ (u) = ε2a (u) + ε̃q (u) − ε2b (u) − ε2c (u). Since u is normalized, we obtain −ε2b (u) − ε2c (u) = 0 and thus ε2a (u) = 1 − ε̃r (u). On the other hand X εCi (2 + ζ i + ζ −i + ζ ip + ζ −ip ). ψ(u) = −2ε2a (u) + i Using ε2a (u) = 1 − ε̃q (u), this value expressed in the basis B has coefficient sum   q−1 q−1 q−3 ε̃q (u) = ε2a (u) − + (2 − q)ε̃q (u). 2 2 2 PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I 13 q , implying Comparing this with the coefficient sum computed above this means ε̃q (u) = − 2−q 2 q = 3. However q is a divisor of p 2+1 by assumption and any divisor d of mod 4, hence also q = 3 is impossible. p2 +1 2 satisfies d ≡ 1  Remark 3.6. For G = PSL(2, p3 ), p ≥ 3 it is not known whether the integral group ring of G contains a normalized unit of order 2p. 4. Some particular 4-primary groups For some almost simple 4-primary groups it is not possible to obtain the maximal information on the Prime Graph Question the HeLP method can give using only the package [BM15b]. The reason is mostly that some character and Brauer tables are known but not yet available in the Character table library of GAP [Bre12] or the GAP Atlas of Group Representations [WPN+ 11] or that the package [BM15b] cannot solve the underlying inequalities. These (series of) groups are handled in the following lemmas. Lemma 4.1. Let G be a 4-primary group isomorphic to some PSL(2, 2f ), PSL(2, 3f ) or PGL(2, 3f ). Let p, q ∈ π(G) be different primes. Then there is an element of order pq in V(ZG) if and only if there is an element of that order in G except possibly for the following cases: • G ≃ PGL(2, 81) and p · q = 3 · 5. • G ≃ PGL(2, 243) and p · q = 3 · 11. • G ≃ PSL(2, 2f ) or G ≃ PSL(2, 3f ) or G ≃ PGL(2, 3f ) and p · q = 2 · 3. Proof. For PSL(2, 16), PGL(2, 27) and PGL(2, 81) the result follows from Table 9. So assume G = PSL(2, 2f ) or G = PGL(2, 3f ) with f ≥ 5. Let D be a representation affording the Steinberg character of G, cf. Remark 3.2(3). For a positive integer n, let ζn denote a primitive n-th root of unity. f First assume that G = PSL(2, 2f ). By Proposition 1.2 the prime divisors of |G| are 2, 3, r = 2 3+1 and s = 2f − 1. By Proposition 3.3 it suffices to consider elements of order 2r and 2s. So let u ∈ V(ZG) be a unit of order 2r or 2s. Then,   D(ur ) ∼ 2f −1 × 1 , 2f −1 × − 1 ,   D(u2 ) ∼ 1, 1, 3 × ζr , ζr2 , ..., ζrr−1 and   D(us ) ∼ 2f −1 × 1 , 2f −1 × − 1 ,  D(u2 ) ∼ 1, 1, ζs , ζs2 , ..., ζss−1 respectively. In any case the trace of D(u) can not be integral, contradicting the fact that the Steinberg character only takes integral values. Assume now that G = PGL(2, 3f ). By Proposition 1.2 either f = 5 or the prime divisors of |G| f f f are 2, 3, r = 3 4+1 and s = 3 2−1 . Note that in case f = 5 the number 3 4+1 is also prime, while we do not need to consider elements of order 3 · 11. Then by Proposition 3.4 it suffices in any case to consider elements of order 3r and 3s. Suppose that u ∈ V(ZG) has order 3r or 3s. Then   D(ur ) ∼ 3f −1 × 1 , 3f −1 × ζ3 , ζ32 ,   D(u3 ) ∼ 1, 1, 1, 4 × ζr , ζr2 , ..., ζrr−1 and   D(us ) ∼ 3f −1 × 1 , 3f −1 × ζ3 , ζ32 ,   D(u3 ) ∼ 1, 1, 1, 2 × ζs , ζs2 , ..., ζss−1 respectively. Again, the sum of the eigenvalues of D(u) can not be integral.  14 ANDREAS BÄCHLE AND LEO MARGOLIS f −2 Remark 4.2. There are 2 3 +1 possible partial augmentations for normalized torsion units of order 6 in V(Z PSL(2, 2f )) and f ≥ 5, and 3f −2 +1 possible partial augmentations for normalized torsion units of order 6 in V(Z PGL(2, 3f )) and f ≥ 5. Assume G = PSL(2, 2f ), f ≥ 5 and u ∈ V(ZG) is of order 6. Note that f is odd by Proposition 1.2. The maximal information we can obtain on the partial augmentations of u using the HeLP method is provided by the characters given in Table 2 since any other character of G on the classes 1a, 2a and 3a can be written as a linear combination with non-negative integers of the trivial character and the given ones, cf. the character table of G in [Jor07, II]. Moreover any irreducible Brauer character in characteristic p 6= 2 is liftable by Remark 3.2(3). Table 2. Part of the character table of PSL(2, 2f ). 1a χ θ 2a 2f − 1 2f − 1 3a −1 1 −1 −2 Let D be a representation of G corresponding to the character χ. Denote by ζ a primitive 3rd root of unity. Then   f   f and D(u2 ) ∼ 2 3+1 × 1 , 2 3−2 × ζ, ζ 2 . D(u3 ) ∼ 2f −1 − 1 × 1 , 2f −1 × − 1 Since the number of −1 in D(u3 ) is smaller than the number of ζ and ζ 2 in D(u2 ), χ(u) attains its maximal value when     f f D(u) ∼ 2f −2 × − ζ, −ζ 2 , 2 3−2 − 2f −2 × ζ, ζ 2 , 2 3+1 × 1 . Thus using ε2a (u) + ε3a (u) = 1 we obtain −ε2a (u) + ε3a (u) = −1 + 2ε3a (u) = χ(u) ≤ 2 f −2 −   2f + 1 2f − 2 f −2 + −2 = 2f −1 + 1 3 3 and hence ε3a (u) ≤ 2f −2 + 1. To minimize the value of χ(u) we have   f f −2 D(u) ∼ 1, 2 3−2 × − 1 , 2 3 +1 × − ζ, −ζ 2 , (2f −2 − 1) × ζ, ζ 2 . Thus  2f − 2 2f −2 + 1 + − 2f −2 − 1 = −2f −1 + 3 3 3 and hence ε3a (u) ≥ −2f −2 + 2. Since ε3a (u) ≡ 3 mod 6 by Lemma 2.1 this may be changed f −2 to ε3a (u) ≥ −2f −2 + 5. In between −2f −2 + 5 and 2f −2 + 1 there are exactly 2 3 +1 integers being congruent 3 modulo 6 and these are all legitimate possibilities for ε3a (u). Doing the same calculations with the character θ does not give stronger bounds for ε3a (u). Now let G = PGL(2, 3f ) with f odd and let u ∈ V(ZG) of order 6. Denote by 3a the conjugacy class of elements of order 3 in G and by 2a and 2b the conjugacy classes of involutions such that 2a is the class in PSL(2, 3f ). By the character table of G given in [Jor07, III] the maximal information for the HeLP method can be extracted from the ordinary characters given in Table 3, since any irreducible Brauer character in characteristic p 6= 3 is liftable by Remark 3.2(3). −1 + 2ε3a (u) = χ(u) ≥ 1 − Table 3. Part of the character table of PGL(2, 3f ). 1a τ χ θ 2a 3a 2b 1 1 1 −1 3f − 1 2 −1 0 3f − 1 −2 −1 0 PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I 15 Using τ and Lemma 3.1 any involution in V(ZG) is rationally conjugate to an element of G. Assume first that u3 ∼ 2b. Then using τ and the fact that u is normalized we get ε2b (u) = 1 and ε2a (u) = −ε3a (u). Arguing as in the case of PSL(2, 2f ) we get 2ε2a (u) − ε3a (u) = −3ε3a (u) = χ(u) ≤ f −1 and thus ε3a (u) ≥ − 3 2 −3 3f − 9 2 . On the other hand 2ε2a (u) − ε3a (u) = −3ε3a (u) = χ(u) ≥ − f −1 3f + 9 , 2 f −2 hence ε3a (u) ≤ 3 2 −3 . Using Lemma 2.1, there are 3 2 +1 possibilities for ε3a (u) and this fixes also ε2a (u). The bounds that can be obtained using θ do not give stronger restrictions on the partial augmentations of u. Now assume u3 is rationally conjugate to elements in 2a. Then using τ we have ε2b (u) = 0 and hence ε2a (u) = 1 − ε3a (u). Via χ we get 2ε2a (u) − ε3a (u) = 2 − 3ε3a (u) = χ(u) ≤ and 3f − 5 2 3f − 1 2 3f −1 −3 ≤ ε3a (u) ≤ . This gives another 2 2ε2a (u) − ε3a (u) = 2 − 3ε3a (u) = χ(u) ≥ − f −1 f −2 3 +1 possible implying, using Lemma 2.1, that − 3 2 −3 2 partial augmentations for u. Let G = PSL(2, 3f ) for odd f = 2e + 1 ≥ 3. As the number of admissible possibilities of partial augmentations for normalized units of order 6 in V(ZG) depends on the number of possibilities for units of order 3 we will show that the HeLP method does not suffice to show that there is no unit of order 6 in V(ZG) by verifying that a unit u ∈ V(ZG) with the partial augmentations (ε2a (u3 ), ε3a (u2 ), ε3b (u2 ), ε2a (u), ε3a (u), ε3b (u)) = (1, 1, 0, −2, 2, 1) can not be ruled out. As such a unit would have admissible partial augmentations in Z PGL(2, 3f ), new obstructions can only arise from irreducible characters of G that stay irreducible after being induced to PGL(2, 3f ). These characters are listed in Table 4. Table 4. Part of the character table of PSL(2, 3f ), f = 2e + 1, ζ a primitive 3rd root of unity. 1a η η′ f 3 −1 2 3f −1 2 2a 1 1 3a e 3 −1 e 2 +3 ζ 3e −1 e 2 2 +3 ζ 3b e 3 −1 e 2 2 +3 ζ 3e −1 e 2 +3 ζ Let D be a representation affording η and let ζ be a fixed primitive 3rd root of unity. Assume that D(u) has the following eigenvalues for some normalized unit u  2e  2e 2e 2e e 2 −3 32e +2·3e −3 , D(u) ∼ 3 4−5 × 1 , 3 4+3 × − 1 , 3 4+3 × ζ, ζ 2 , 3 −2·3 . × − ζ × − ζ 4 4 3e −7 2 + 3e ζ = −2η(2a) + 2η(3a) + η(3b) and   f f D(u3 ) ∼ D(2a) ∼ 3 4+1 × 1 , 3 4−3 × − 1 ,  2e  e e e e D(u2 ) ∼ D(3a) ∼ 3 2−1 × 1 , 3 (32 +1) × ζ , 3 (32 −1) × ζ 2 . Then this u fulfills η(u) = So all obstructions that can be derived from the HeLP method for this character are fulfilled. We can take the images under the non-trivial element of Gal(Q(ζ)/Q) as the eigenvalues of the image of u under a representation affording η ′ , so this character can also not eliminate this possibility. 16 ANDREAS BÄCHLE AND LEO MARGOLIS Lemma 4.3. Let G be an almost simple group with socle S = PSL(2, 81). Then units of order 5 in V(ZG) are rationally conjugate to elements of G. If u ∈ V(ZG) is of order 15, then the restrictions on the partial augmentations of u using the HeLP method for Brauer tables of G are the same as when using the ordinary character table of G. Proof. Let the outer automorphism group of S be generated by g and σ, where σ is the automorphism induced by the Frobenius automorphism of F81 and g is an involution in PGL(2, 81) outside of S, see Remark 3.2(2). There are two conjugacy classes of elements of order 5 in S and these fuse into one class in G, if and only if G/S contains elements of order 4. If there are two classes of elements of order 5 using the 3-modular Brauer character called ϕ in Remark 3.2(3), if defined for G, or the character induced by ϕ and performing the same computations as in the proof of Proposition 3.4, we obtain that units of order 5 in V(ZG) are rationally conjugate to elements of G. All 2-modular Brauer tables are available in [Bre12], so we have to show that no new information can be deduced for the partial augmentations of units of 15 using the 41-modular Brauer characters of G compared to the ordinary character table. If G/S is elementary abelian, all Brauer tables of G in characteristic 41 are available in [Bre12] and the result follows. So let G/S contain elements of order 4. Let k be a field of characteristic 41 large enough to admit all 41-modular representation of G. Let M be a simple kG-module, then M is also a kS-module. Looking at the Brauer table of S and comparing it with the ordinary table of G, we obtain that the character associated to M could only give more information, if M would be 41-dimensional. If G/S is generated by σ, then G has a 41-dimensional simple module, since there is even a 41-dimensional ordinary representation of G and in this case the ordinary characters suffice to show that there are no elements of order 15 in V(ZG), cf. Table 9. However PGL(2, 81) does not possess a simple 41-dimensional 41-modular module and thus G does not, if G/S is not generated by σ.  For certain groups where not all characters we need are directly accesible in GAP we give expanded arguments. Lemma 4.4. Let G = PSL(2, 243). There are no units of order 33 in V(ZG). Proof. The character table of G is not contained in [Bre12]. G contains exactly five conjugacy classes of elements of order 11 and two conjugacy classes of elements of order 3. By [Sch07] G possesses a character as given in Table 5. Table 5. Part of the character table of PSL(2, 243). χ 1a 3a 3b 121 √ −1+ −243 2 √ −1− −243 2 11a 11b 11c 11d 11e 0 0 0 0 0 This character may be used to show that there are no units of order 33 in V(ZG) via the package [BM15b] and the following code. gap> H := PSL(2,243);; C := CharacterTable(H);; gap> h := Size(ConjugacyClasses(C)); 124 gap> o3 := Positions(OrdersClassRepresentatives(C), 3); [ 2, 3 ] gap> chi := ListWithIdenticalEntries(h, 0);; gap> chi[1] := 121;; gap> chi[o3[1]] := (-1 + Sqrt(-243))/2;; chi[o3[2]] := (-1 - Sqrt(-243))/2;; gap> chi := ClassFunction(C, chi);; gap> HeLP_WithGivenOrderSConstant([chi], 11, 3);; #I Number of solutions for elements of order 33: 0; stored in HeLP_sol[33].  PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I 17 Remark 4.5. Let G = PGL(2, 243). We will show that the HeLP method is not sufficient to prove that there are no units if order 33 in V(ZG). There are five conjugacy classes of elements of order 11 in G and one class of elements of order 3. Looking at the character table of G given in [Sch07] we see that the maximal possible information using the ordinary character table and the HeLP method can be obtained from the characters given in Table 6. Table 6. Part of the character table of PGL(2, 243), where z denotes some fixed 11-th root of unity. 1a χ ψ1 ψ2 ψ3 ψ4 ψ5 3a 11a 242 −1 0 244 1 z + z −1 244 1 z 2 + z −2 244 1 z 4 + z −4 244 1 z 3 + z −3 244 1 z 5 + z −5 11b 11c 11d 11e 0 z 2 + z −2 z 4 + z −4 z 3 + z −3 z 5 + z −5 z + z −1 0 z 4 + z −4 z 3 + z −3 z 5 + z −5 z + z −1 z 2 + z −2 0 z 3 + z −3 z 5 + z −5 z + z −1 z 2 + z −2 z 4 + z −4 0 z 5 + z −5 z + z −1 z 2 + z −2 z 4 + z −4 z 3 + z −3 Assuming that u3 is rationally conjugate to elements in 11a the partial augmentations ε3a (u) = 12, ε11c (u) = −11 and εC (u) = 0 for any other class C of elements of order 11 satisfy all HeLP constraints imposed by the characters in Table 6. This can be seen with the HeLP package [BM15b] via the following GAP code: gap> G := PGL(2,243);; C := CharacterTable(G);; gap> h := Size(ConjugacyClasses(C)); 245 gap> o := OrdersClassRepresentatives(C);; o3 := Positions(o, 3); o11 := Positions(o, 11); [ 245 ] [ 2, 3, 4, 5, 6 ] gap> chi := ListWithIdenticalEntries(h, 0);; gap> chi[1] := 242;; gap> chi[o3[1]] := -1;; gap> chi := ClassFunction(C, chi);; gap> y := E(11) + E(11)^-1;; K := Field(y);; gap> S := GaloisGroup(K);; s := GeneratorsOfGroup(S)[1];; gap> psi := [];; # list of the characters psi_1, ..., psi_5 gap> for j in [1..5] do psi[j]:=ListWithIdenticalEntries(h, 0); psi[j][1]:=244; psi[j][o3[1]]:=1; > for k in [1..Size(o11)] do psi[j][o11[k]] := y^(s^(j+k)); od; > psi[j] := ClassFunction(C, psi[j]); od; gap> HeLP_sol[33] := [ [ [1], [1, 0, 0, 0, 0], [12, [ [ [ 1 ], [ 1, 0, 0, 0, 0 ], [ 12, 0, 0, -11, 0, 0 gap> HeLP_VerifySolution(Concatenation([chi], psi), [ [ [ 1 ], [ 1, 0, 0, 0, 0 ], [ 12, 0, 0, -11, 0, 0 0, 0, -11, 0, 0] ] ]; ] ] ] 33); ] ] ] Since every 2-Brauer character and 61-Brauer character is liftable by Remark 3.2(3), the ordinary table of G provides the maximal information, and this finishes the proof. The number of possible partial augmentations for elements of order 33 given in Table 9 was computed using the program Normaliz [BIS16]. Lemma 4.6. Let G = Aut(PSL(3, 17)) or G = PSL(3, 17). Let p, q ∈ π(G) be different primes. Then there is an element of order pq in V(ZG) if and only if there is an element of that order in G except possibly for p · q = 3 · 17. Proof. Using [BCP97] or [SF73] we can calculate the characters of G = Aut(PSL(3, 17)) given in Table 7. Applying Lemma 3.1 to the non-trivial linear character of G/ PSL(3, 17) ≃ C2 (corresponding to χ1 ) we obtain that involutions in V(ZG) are rationally conjugate to elements in G. Let u ∈ V(ZG). Assuming u has order 2 · 307, 3 · 307 or 17 · 307 analogues calculations as in the proof of Lemma 4.1 prove the non-existence of u. 18 ANDREAS BÄCHLE AND LEO MARGOLIS Table 7. Parts of the character table of Aut(PSL(3, 17)). The class 307x stands for any class of elements of order 307, dots indicate zeros, blank spots are entries not needed. χ1 χ306 χ4912 χ9216 1a 2a 2b 3a 17a 17b 307x 1 306 4912 9216 1 18 16 . −1 . 16 . 1 . 1 . 1 17 −1 −32 1 . −1 2 1 −1 . Assume that o(u) = 2 · 307. Recall that ε̃307 (u) denotes the sum of all partial augmentations of u at classes of elements of order 307. Using that u is normalized, we have χ1 (u) = ε2a (u) − ε2b (u) + ε̃307 (u) = 1 − 2ε2b (u) ∈ {±1} and thus ε2b (u) ∈ {0, 1}. We have χ4912 (u2 ) = 0 and χ4912 (u307 ) = 16. Denote by Dj a representation having character χj . Then   D4912 (u2 ) ∼ 16 × 1 , 16 × ζ, ..., ζ 306 ,   D4912 (u307 ) ∼ 2464 × 1 , 2448 × − 1 for a primitive 307-th root of unity ζ. Note that χ4912 (u) = 16(ε2a (u)+ε2b (u)) ∈ Z. Hence ε2a (u)+ ε2b (u) = 1, implying (ε2a (u), ε2b (u), ε̃307 (u)) ∈ {(1, 0, 0), (0, 1, 0)} contradicting Lemma 2.1. Now assume that o(u) = 3 · 307. From the character values we get   D306 (u3 ) ∼ 1 × ζ, ..., ζ 306 ,   D306 (u307 ) ∼ 102 × 1 , 102 × ξ, ξ 2 where ζ denotes a again a primitive 307-th root of unity and ξ a primitive third root of unity. As χ306 (u) = −ε̃307 (u) ∈ Z this yields a contradiction. Now assume that o(u) = 17 · 307. Then by considering the character values we obtain   D4912 (u17 ) ∼ 16 × 1 , 16 × ζ, ..., ζ 306 ,   D4912 (u307 ) ∼ 288 × 1 , 289 × η, ..., η 16 for a primitive 307-th root of unity ζ and a primitive 17-th root of unity η. Now as χ4912 (u) ∈ Z, the 288 eigenvalues 1 of D4912 (u307 ) have to either all be multiplied with 1’s or a whole block of 307-ths roots of unity. But as 288 < 306 and the multiplicity of the eigenvalue 1 in D4912 (u17 ) is 16, this is impossible.  Remark 4.7. We will show that for G = PSL(3, 17) or G = Aut(PSL(3, 17)) the constraints imposed by the HeLP method allow exactly 126 possible partial augmentations for elements of order 3 · 17 = 51. So let u ∈ V(ZG) and assume that o(u) = 51. Then using the HeLP package in the same way as in the proof of Lemma 4.4 with the characters χ306 , χ4912 and χ9216 from Table 7 one obtains that there are exactly 126 tuples of partial augmentations admissible according to the HeLP constraints for these three characters. We need to show that this is the maximal possible information available using also the modular characters. Note that we do not have to consider 17-modular characters. The decomposition matrices of PSL(3, 17) are, in principle, given in [Jam90], but to get them explicitly requires some computational effort, so we give other arguments. Let G = Aut(PSL(3, 17)) and H = PSL(3, 17). The Sylow 3- and Sylow 307-subgroups of G and H are cyclic. Thus we can investigate the 3-modular and 307-modular blocks of G and H using the theory of Brauer Tree Algebras, cf. [CR87, § 62]. From the ordinary character table it can PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I 19 be determined which ordinary characters lie in the same block for a given prime [CR87, § 56]. By the number of 3-regular conjugacy classes in G and H and the degrees of ordinary characters lying in the same block, we conclude that any 3-block contains at most two irreducible modular characters, i.e. a corresponding Brauer Tree has at most 2 edges. Thus any 3-Brauer character is liftable. All 307-blocks apart from the main block contain exactly one irreducible ordinary character. By the number of 307-regular conjugacy classes of G and H we conclude that the main block of G contains six, while the main block for H consist of three irreducible modular characters. The irreducible 306-dimensional ordinary representation of H is a deleted permutation representation coming from the natural 2-transitive permutation action on the projective plane over F17 . Thus by [Hup67, V, Beispiel 20.3] the reduction of a corresponding lattice has a trivial constituent. This implies that the vertices corresponding to the trivial character χ1 and the character χ306 of degree 306 are connected in the Brauer Tree of the main block of H. Since the trivial character always sits at an end of the tree, the tree has the form χ1 χ306 χ4913 χ4608 . By restricting the characters of G to characters of H we obtain that the Brauer Tree of the main block of G looks as follows: χ1 χ306 χ4913 χ9216 χ4913′ χ306′ χ1′ . We conclude that H possesses one irreducible 307-modular Brauer character that can not be lifted, while G possesses four. These four however fall into pairs coinciding on the conjugacy classes of elements of order 3 and 17. All of these characters however can not exclude any partial augmentation computed before. All 2-modular characters of H are liftable, but the arguments here are more elaborated. The main block is the only block possessing more than one irreducible Brauer character, namely three. Just from comparing character values we get the following decomposition matrix D, where repeating lines are omitted.   1 0 0  a1 a2 a3     1 + a1 a2 a3    b1 b2 b3  D=    1 + b1 b2 b3     1 + a1 + b 1 a2 + b 2 a3 + b 3  2 + 2a1 + b1 2a2 + b2 2a3 + b3 The second line of D corresponds to the canceled natural permutation module on the 307 points of the projective plane over F17 . This action is 2-transitive and a short computations implies that this is a simple F2 H-module, a 306-dimensional invariant space is spanned by the vectors containing an odd number of 0’s. Thus a1 = a3 = 0 and a2 = 1. The fifth line of D corresponds to the Steinberg character of H and from [His90, Theorem A], we get b1 = 0. Since the decomposition matrix of H can be brought to be in unitriangular form by [Dip85, Theorem 3.8] we obtain b3 = 1. By dimensions of degrees we obtain then b2 ≤ 16. Since the determinant of the Cartan matrix D · Dt is a power of 2 [CR90, Theorem 18.25] this implies b2 = 0 and we are done. For G and for the prime 2 also only the main block contains more then one irreducible Brauer character. From the dimensions of the representations in the main block it follows that apart from a 4912-dimensional irreducible Brauer character corresponding to the 4912-dimensional character in the main block of H, any irreducible Brauer character is liftable. This character does not provide new information on the possible partial augmentations of units of order 51. Lemma 4.8. Let G be PSp(4, 7) or Aut(PSp(4, 7)) and let p, q ∈ π(G) different primes. Then there are normalized units of order p · q in V(ZG) if and only if there exist elements of this order in G except possibly for p · q = 5 · 7. 20 ANDREAS BÄCHLE AND LEO MARGOLIS Proof. For both groups the ordinary character tables and one character in characteristic 7 are available in [WPN+ 11]. We will exclude the existence of normalized units of order 2·5 in Z PSp(4, 7) and 3 · 5 in Z Aut(PSp(4, 7)). First let G = PSp(4, 7) and assume that u ∈ V(ZG) is of order 10. Note that G contains two conjugacy classes of elements of order 2, which can be distinguished by the sizes of their centralizers, and one conjugacy class of elements of order 5. To disprove the existence of u we use an ordinary character χ of degree 175, which is uniquely determined by its values on involutions, together with a 7-Brauer character ϕ coming from the isomorphism PSp(4, 7) ≃ Ω(5, 7). The values of these characters are given in Table 8. gap> C := CharacterTable("S4(7)");; gap> oC := OrdersClassRepresentatives(C);; gap> G := AtlasGroup("S4(7)", Characteristic, 7, Dimension, 5);; gap> CC := ConjugacyClasses(G);; gap> oG := List(CC, C -> Order(Representative(C)));; gap> phi := ListWithIdenticalEntries(Size(Irr(C)), 0);; gap> phi[1] := BrauerCharacterValue(Representative(CC[Position(oC, 1)]));; gap> phi[Position(oC, 5)] := BrauerCharacterValue(Representative(CC[Position(oG, 5)]));; gap> for j in Positions(oG, 2) do for k in Positions(oC, 2) do > if SizesCentralizers(C)[k] = Order(Centralizer(G, Representative(CC[j]))) then > phi[k] := BrauerCharacterValue(Representative(CC[j])); > fi; od; od; gap> phi := ClassFunction(C, phi);; gap> HeLP_WithGivenOrder([phi], 2);; #I Number of solutions for elements of order 2: 3; stored in HeLP_sol[2]. gap> chi := First(Irr(C), x -> x{Positions(oC,2)} = [31, 7]);; gap> HeLP_WithGivenOrder([ chi, phi ], 2*5);; #I Number of solutions for elements of order 10: 0; stored in HeLP_sol[10]. Table 8. Parts of some characters of G ∈ {PSp(4, 7), Aut(PSp(4, 7))}. (a) G = PSp(4, 7) 1a χ = χ8/175b ϕ 2a 175 31 5 −3 (b) G = Aut(PSp(4, 7)) 2b 5a 7 1 0 0 ′ χ = χ3/50 ϕ′ 1a 3a 3b 5a 50 5 8 −1 0 0 2 2 Now assume that G = Aut(PSp(4, 7)) and that u ∈ V(ZG) is of order 15. The character table of G is available in GAP via the command CharacterTable("S4(7).2");. With a similar code as above one can exclude the existence of units of order 15 in ZG using the 7-Brauer character ϕ′ for elements of order 3 and the characters ϕ′ and χ′ for elements of order 15. The relevant values are given in Table 8. Note that the conjugacy classes of elements of order 3 can be distinguished by the structures of their centralizers, in particular by the number of involutions contained therein, or by power maps: the class 3b contains all 16th powers of elements of order 48.  Remark 4.9. Let G = PSp(4, 7) or G = Aut(PSp(4, 7)). The HeLP method is not sufficient to decide if there exist units of order 5 · 7 = 35 in V(ZG). First let G = PSp(4, 7). Since there is only one conjugacy class of elements of order 5 in G, we do not need to consider 7-modular Brauer characters. The irreducible 3-modular and 5modular Brauer characters of G are known. Every irreducible 3-modular Brauer character is liftable by [Whi90b, Theorem 4.1] and there are excatly two non-liftable irreducible 5-modular Brauer characters by [Whi92, Theorem 3.9]. These can be obtained in GAP via the code given below and are called eta1 and eta2 there. The irreducible 2-modular Brauer characters are not completly known, to our knowledge. They are determined in [Whi90a, Theorem 3.1] up to an parameter x which for our G can take values 1, 2 or 3. The constraints for x = 1 and x = 2 are PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I 21 weaker then for x = 3 and it thus will suffice to consider the case x = 3, since we show the existence of non-trivial solutions. Then there are five non-liaftable irreducible 2-modular Brauer characters of G called ϕ1 to ϕ5 in [Whi90a, Theorem 3.1]. Note that ϕ4 and ϕ5 are liftable as characters of the corresponding symplectic group, but not as characters of the projective symplectic group. The HeLP restrictions provided by these characters leave exactly 9 possible non-trivial partial augmentations for elements of order 35 in V(ZG). Thus the following code demonstrates that there are 9 possible non-trivial partial augmentations satisfying the HeLP constraints for elements of order 35 in V(ZG). gap> C := CharacterTable("S4(7)");; gap> eta1 := Irr(C)[9] - Irr(C)[1];; gap> eta2 := Irr(C)[37] - Irr(C)[4];; # 5-modular Brauer characters gap> gap> gap> gap> gap> gap> gap> phi4 phi5 phi6 phi3 x := phi1 phi2 := Irr(C)[2] - Irr(C)[1];; := Irr(C)[3] - Irr(C)[1];; := Irr(C)[4];; := Irr(C)[7] - Irr(C)[1];; 3;; := Irr(C)[18] - (x-1)*phi6;; := Irr(C)[19] - (x-1)*phi6;; # 2-modular Brauer characters gap> L5 := [eta1, eta2];; gap> L2 := [phi1, phi2, phi3, phi4, phi5];; gap> HeLP_WithGivenOrder(Concatenation(Irr(C), L2, L5), 7);; #I Number of solutions for elements of order 7: 4706; stored in HeLP_sol[7]. gap> HeLP_WithGivenOrder(Concatenation(Irr(C), L2), 5*7);; #I Number of solutions for elements of order 35: 9; stored in HeLP_sol[35]. For G = Aut(PSp(4, 7)) analogues computations demonstrate that there are 4 possible non-trivial partial augmentations satisfying the HeLP constraints. The irreducible Brauer characters can be derived from the ordinary table and the arguments above. In particular an irreducible 2-modular Brauer character of PSp(4, 7) induced to G is irreducible if and only if it is rational-valued on the conjugacy classes of elements of order 7. Example 4.10. We give an explicit example how the HeLP package can be used to check the information given in Table 9. gap> LoadPackage("help");; gap> C := CharacterTable("L2(81).(2x4)");; gap> HeLP_WithGivenOrder(C, 15); #I Number of solutions for elements of order 15: 1; stored in HeLP_sol[15]. [ [ [ 1 ], [ 1 ], [ 6, -5 ] ] ] gap> HeLP_WithGivenOrder(Irr(C){[13, 33]}, 15);; #I Number of solutions for elements of order 15: 1; stored in HeLP_sol[15]. gap> HeLP_WithGivenOrderSConstant(Irr(C){[9]}, 41, 3);; #I Number of solutions for elements of order 123: 0; stored in HeLP_sol[123]. gap> HeLP_WithGivenOrderSConstant(Irr(C){[9]}, 41, 5);; #I Number of solutions for elements of order 205: 0; stored in HeLP_sol[205]. Example 4.11. We give an example, how induced characters can be used in the package. This is necessary for some groups. More specifically, we will prove here that for G = Aut(PSU(3, 8)) there are no elements of order 7 · 19 in V(ZG). gap> C := CharacterTable("U3(8)");; gap> G := PSU(3,8);; gap> A := AutomorphismGroup(G);; gap> AllCharacterTableNames(Size,Size(A)); [ "3.U3(8).6", "3.U3(8).S3" ] #This means: The character table of the automorphism group A of PSU(3,8) is not available in GAP. gap> NN := Filtered(NormalSubgroups(A), N -> Order(N) = Order(G)); [ <group of size 5515776 with 2 generators> ] gap> H := NN[1];; #Subgroup of A isomorphic to G gap> CharacterTableWithStoredGroup(H,C);; gap> D := CharacterTable(H);; gap> chi := InducedClassFunction(Irr(D)[2],A);; 22 ANDREAS BÄCHLE AND LEO MARGOLIS gap> HeLP_WithGivenOrder([chi],7*19);; #I Number of solutions for elements of order 133: 0; stored in HeLP_sol[133]. 5. Proof of Theorem B To prove Theorem B we give in Table 9 below the complete information for all almost simple 4-primary groups in a compact form such that the results are easy to reproduce1. For every simple 4-primary group S, it contains every 4-primary subgroup of Aut(S) up to isomorphism. Almost simple groups having the same socle are grouped together and are separated by a single line, while groups having different socles are separated by two lines. It is to read in the following way. • The first column contains one or more names of the group. If the ordinary character table of the group is available in the GAP character table library, a name of it from that library is given in quotes. For instance, the character table of Aut(PSL(2, 16)) can then be obtained in GAP by CharacterTable("L2(16).4");. • The second column contains the prime graph of the group. • The third column records which orders of torsion units need to be checked to obtain a positive answer to the Prime Graph Question for the given group. The critical order is only given for the biggest group it has to be checked (in case the existence of units of that order can be excluded for that group). So if H is a subgroup of G such that G and H both contain elements of order p and q, but not of order pq, the entry pq will only appear for G. E.g. A7 and S7 both contain involutions and elements of order 7, but not of order 2 · 7. So 2 · 7 will appear for S7 , but not for A7 . While 2 · 5 appears for A7 , but not for S7 , since S7 contains elements of order 10. The column sometimes also contains primes. A prime p appears, if the partial augmentations of units of order p are needed to obtain the maximal restrictions on units of order pq. E.g. to obtain that there are no units of order 3 · 5 for PSL(2, 81).4a one needs to know the partial augmentations of units of order 3. In two cases a prime p will not appear in the column, although it appears as a factor of p · q. This will happen if either there is only one conjugacy class of elements of order p in the group and thus the partial augmentations are clear, or if the characters used to obtain the information for units of order p · q are constant on all conjugacy classes of elements of order p. In the second case the partial augmentations of units of order p do not influence the calculations for elements of order p · q and this is also marked in the fourth column. For the possibly infinite series appearing in the table, some of the groups in these series contain elements of order p · q, others do not. For that reason these orders appear in parentheses and the edge is dotted in the prime graph. • The fourth column contains how one can obtain the information for units of the order given in the third column. If the order is composite this information is sufficient to obtain the maximal available information using the HeLP method. The information can be of the following types: – If the group has been handled before in the literature a reference is given. If only some specific order has been handled a reference is given for this order. – Several cases are covered by general results in this article and in this case an internal reference is given. – If explicit computations have to be performed a list of characters is given. For composite orders these characters allow us to obtain the maximal possible information available via the HeLP restrictions as explained in Remark 2.2. Mostly the characters are taken from the GAP character table library. χn/mα denotes the n-th ordinary in the character table. This is the α-th character of degree m in that table. If the table contains only one character of degree m the index α is omitted. E.g. the restriction obtained for units of order 2 · 3 for PSL(2, 16) use two ordinary characters χ2/11a and χ11/17a from CharacterTable("L2(16)");. While for units of order 2 · 5 only 1A file to check the claimed data is http://homepages.vub.ac.be/abachle/#research . available on the website of the first author: PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I 23 the character χ12/17b is used, which is the second character of degree 17 in the table. See Example 4.10 how to use this information in the implementation of the HeLP method. Characters of the form ϕrn/mα refer to Brauer characters modulo r available in the GAP character table library. The lower indices are to be read in the same way as for ordinary characters. E.g. the character ϕ33/55a used for PSL(3, 7).2 refers to the third character of CharacterTable("L3(7).2") mod 3;. In some situations where the characters available in the GAP character table library are not sufficient to obtain the maximal possible information induced characters are used. This happens for two groups containing PSU(3, 8). See Example 4.11, how to do this. • The fifth column contains the number of possible non-trivial partial augmentations obtained for the order in the third column. For composite orders this is the minimal possible number obtainable using the HeLP method. In case they are non-zero, they are set in bold and they are exactly the critical cases remaining to answer the Prime Graph Question. For units of prime order the information obtainable with the characters in the GAP character table library may sometimes not be sufficient to obtain the maximal possible restrictions, since some Brauer tables are not available in the library. In this cases the given number are marked with a star. In these situations we are however able to prove the Prime Graph Question and for this reason we do not aim at obtaining the best possible information. Table 9. Results of the HeLP-method applied to the almost simple 4-primary groups Group G Γ(G) o(u) S7 , S8 , S9 , S10 A7 , A8 , A9 , A10 PSL(2, 16).4 "L2(16).4" 2 5 3 ⑧⑧ ⑧⑧ ⑧ ⑧ 17 5 ⑧ ⑧⑧ 2 5 13 PSL(2, 25).2c "L2(25).2 3" 2 3 5 13 2 3 5 2 5 PSL(2, 25) "L2(25)" PSL(2, 27).6 "L2(27).6" 2 2 · 17 3 · 17 5 · 17 Lemma 3.1 (χ2,1b ) χ7/16aC17 χ7/16aC17 χ7/16aC17 5 2·3 2·5 Proposition 3.3 χ2/11a , χ11/17a χ12/17b 3·5 3 · 13 5 · 13 Theorem 3.5 2·5 2 · 13 Theorem 3.5 2 · 13 Theorem 3.5 2·5 Theorem 3.5 3 3·7 3 · 13 7 · 13 continued Lemma 3.1 (χ2,1b ) χ7/26a χ7/26aC13 χ7/26aC13 17 PSL(2, 25).22 "L2(25).2^2" PSL(2, 25).2a PGL(2, 25) "L2(25).2 1" # n.-t. Solutions [BC17, Theorem 5.1] [Sal11, Sal13] PSL(2, 16).2 "L2(16).2" Γ(PSL(2, 16).4) 2 3 PSL(2, 16) ⑧ "L2(16)" ⑧⑧ PSL(2, 25).2b "L2(25).2 2" Characters ❄❄ 3 ❄❄ ❄❄ 13 ❄❄ 3 ❄❄ ❄❄ 13 Γ(PSL(2, 25).2c) 2 7 ❄❄ 3 ❄❄ ❄❄ 13 2 24 ANDREAS BÄCHLE AND LEO MARGOLIS Group G PSL(2, 27).3 "L2(27).3" Γ(G) 2 7 PSL(2, 27).2 PGL(2, 27) "L2(27).2" 2 3 7 13 2 3 7 13 PSL(2, 49).22 2 PSL(2, 49).2c "L2(49).2 3" PSL(2, 49).2b "L2(49).2 2" PSL(2, 49).2a PGL(2, 49) "L2(49).2 1" PSL(2, 49) "L2(49)" PSL(2, 81) .(C2 × C4) "L2(81).(2x4)" PSL(2, 81).4b "L2(81).4 2" PSL(2, 81).4a "L2(81).4 1" ❄❄ 3 ❄❄ ❄❄ 5 7 2 3 5 7 2 ❄❄ 3 ❄❄ ❄❄ 5 7 2 3 5 7 2 ❄❄ 3 ❄❄ ❄❄ 5 41 2 3 5 41 2 3 5 41 2 5 41 PSL(2, 81).2c "L2(81).2 3" 2 3 5 41 2 5 PSL(2, 81).2a "L2(81).2 1" subgroup of .4a, .4b PSL(2, 81) "L2(81)" # n.-t. Solutions 2 2·3 Lemma 3.1 (χ2,1b ) χ2/1b , χ3/26a , χ4/26b 4 3 2·3 χ2/13a χ2/13a , χ4/26a 2 12 3·5 3·7 5·7 Theorem 3.5 2·5 2·7 Theorem 3.5 2·5 Theorem 3.5 2·7 Theorem 3.5 3·5 2 3 2 · 41 3·5 5 3·5 χ13/320a , χ33/164c , Lemma 4.3 χ9/82aC41 χ9/82aC41 Lemma 3.1 (χ2,1b ) χ2/1b , χ5/82aC41 , Lemma 2.1 χ7/320a , χ20/164a , Lemma 4.3 χ2/1b , χ28/164c χ5/41a , χ9/41e χ5/41aC41 χ5/41a , χ9/41e , χ32/328a Lemma 4.3 χ5/82a , χ35/82g 5 2·3 2 · 41 3·5 2 5 2·3 3·5 Lemma 4.3 χ3/82a , χ32/164c 5 χ14/81a , χ22/82hC41 , Lemma 2.1 10 χ17/82c , χ18/82d Lemma 3.1 (χ2,1b ) Lemma 4.3 χ2/1b , χ3/82a , χ52/82h 9 χ3/82a , χ48/82d 10 3 2·3 χ2/41a , χ3/41b χ2/41a , χ3/41b , χ28/82d Γ(PSL(2, 49).2c) PSL(2, 81).22 "L2(81).2^2" PSL(2, 81).2b PGL(2, 81) "L2(81).2 2" Characters χ4/13aC13 13 ❄❄ 3 ❄❄ ❄❄ PSL(2, 27) "L2(27)" "L2(49).2^2" o(u) 2 · 13 ❄❄ 3 ❄❄ ❄❄ ❄❄ 3 ❄❄ ❄❄ 41 3 · 41 5 · 41 2 2 · 41 3·5 1 1 14* 2* 10 Γ(PSL(2, 81).4a) 2 3 5 41 continued 2 28 PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I Group G Γ(G) PSL(2, 243).2 PGL(2, 243) --- o(u) Characters 2·3 3 · 11 3 · 61 11 · 61 2·3 2 · 11 3 · 11 Remark 4.2 Remark 4.5 Lemma 4.1 Proposition 3.4 Remark 4.2 Proposition 3.3 Lemma 4.4 2·p 3·p (3 · r) p·r (2 · 3) Proposition 3.4 2·3 2·r 2·s 3·s r·s 2·3 3·r 3·s r·s Remark 4.2 Lemma 4.1 Lemma 4.1 Proposition 3.3 Proposition 3.3 Remark 4.2 Lemma 4.1 Lemma 4.1 Proposition 3.4 2·3 2·s Lemma 4.1 Proposition 3.3 5·7 χ7/20a 2 2·7 Lemma 3.1 (χ2,1b ) χ2/1b , χ4/20a ❄❄ ⑧ 3 ❄⑧ ⑧ ⑧❄❄❄ ⑧ ⑧ 2 2·5 Lemma 3.1 (χ2,1b ) χ2/1b , χ7/105a 3 2 2·5 2·7 Lemma 3.1 (χ2,1b ) χ2/1b , χ13/105a χ2/1b , χ7/20a 3·5 3·7 χ3/20aC5 χ3/20a , χ5/35a 3·5 3·7 χ3/20a χ3/20a , χ5/35aC7 3·5 3·7 χ3/20a χ3/20a , χ5/35a 2 ❄❄ 3 ❄❄ ❄❄ 11 PSL(2, 243) --- 2 61 ❄❄ 3 ❄❄ ❄❄ 11 PSL(2, p).2 PGL(2, p) p prime 2 p PSL(2, p) p prime PSL(2, 2f ) f ≥ 5, s = 2f − 1, f r = 2 3+1 PSL(2, 3f ).2 PGL(2, 3f ) f ≥ 7, f s = 3 2−1 , r = PSL(2, 3f ) f ≥ 7, f s = 3 2−1 , r = r 2 3 p r r 3f +1 4 3f +1 4 3 ⑧ ⑧⑧ ⑧ ⑧⑧ s 2 ❄❄ 3 ❄❄ ❄❄ r s 2 3 r s PSL(3, 4).D12 "L3(4).D12" 2 3 PSL(3, 4).S3 c "L3(4).3.2 3" 2 5 5 PSL(3, 4).S3 b "L3(4).3.2 2" 2 5 PSL(3, 4).6 "L3(4).6" PSL(3, 4).2b "L3(4).2 2" subgroup of .S3 b PSL(3, 4).2a "L3(4).2 1" subgroup of .6 ⑧⑧ ⑧⑧ ⑧ ⑧ 7 7 ⑧⑧ ⑧⑧ ⑧ ⑧ 7 Γ(PSL(3, 4).6) 2 ≥1 Proposition 3.3 7 3 2 5 PSL(3, 4).3 = PGL(3, 4) "L3(4).3" PSL(3, 4).2c "L3(4).2 3" subgroup of .S3 c ❄❄ ⑧ ❄⑧ ⑧ ⑧❄❄❄ ⑧ ⑧ 28 22251 61 ❄❄ 3 ❄❄ ❄❄ 2 # n.-t. Solutions 3 5 7 2 ❄❄ 3 ❄❄ ❄❄ 5 7 2 3 5 7 continued 2f −2 +1 3 3f −2 + 1 ≥1 25 26 ANDREAS BÄCHLE AND LEO MARGOLIS Group G PSL(3, 4) "L3(4)" PSL(3, 5).2 "L3(5).2" Γ(G) 2 3 5 7 2 3 5 31 PSL(3, 5) PGL(3, 5) "L3(5)" 2 3 5 31 PSL(3, 7).S3 "L3(7).S3" 2 7 PSL(3, 7).3 = PGL(3, 7) "L3(7).3" PSL(3, 7).2 "L3(7).2" PSL(3, 7) "L3(7)" PSL(3, 8).6 "L3(8).6" 2 3 7 19 2 3 7 19 2 PSL(3, 17) --- # n.-t. Solutions 2 2 5 2 · 31 3·5 3 · 31 5 · 31 5 3·5 Lemma 3.1 (χ2,1b ) χ3/30a , χ8/192a χ3/30aC31 χ3/30a , χ8/192a , χ13/124a χ3/30aC31 χ3/30aC31 χ2/30 , χ6/96a χ2/30 , χ6/96a , χ16/124a 2 7 2 · 19 7 · 19 Lemma 3.1 (χ2,1b ) χ4/56a , χ12/576a χ4/56aC19 χ4/56aC19 7 3·7 ϕ33/55a , ϕ37/96a , ϕ39/192 χ3/56a , χ7/152a , χ9/304 , χ10/576a χ7/152aC19 ϕ32/55 , ϕ34/96a , ϕ35/96b , ϕ36/96c χ2/56a , χ4/152a , χ5/152b , χ6/152c , χ7/288a 5 6 5 6 7 3 ⑧⑧ ⑧⑧ ⑧ ⑧ 73 3 · 19 7 3·7 42 134 161 478 2 3 7 2 · 73 3 · 73 7 · 73 Lemma 3.1 (χ2,1b ) Lemma 3.1 (χ2,1b ) ϕ24/18 , ϕ26/54a , ϕ27/54 , ϕ210/54c χ7/72aC73 χ7/72aC73 χ7/72aC73 2·3 χ2/7a , χ9/441a 2 17 2 · 307 3 · 17 3 · 307 17 · 307 Lemma 4.6, Remark 4.7 17 3 · 17 Remark 4.7 17 126 3 3·5 3 · 13 5 · 13 2 2 · 13 χ5/39a , χ9/52a χ5/39a , χ9/52a , χ16/260a χ5/39a , χ11/90a , χ16/260aC13 χ5/39aC13 ϕ32/1b , ϕ33/6a χ2/1b , χ3/52a , χ4/39aC13 60* Γ(PSL(3, 8).6) Γ(PSL(3, 8).6) 2 7 PSL(3, 17).2 --- 19 Characters χ3/35a , χ6/45a Γ(PSL(3, 7).6) 7 PSL(3, 8).3 "L3(8).3" PSL(3, 8).2 "L3(8).2" PSL(3, 8) PGL(3, 8) "L3(8)" 3 ⑧ ⑧⑧ ⑧ ⑧⑧ o(u) 2·3 3 ⑧⑧ ⑧⑧ ⑧ ⑧ 2 73 2 3 17 307 2 3 17 307 PSL(4, 3).22 "L4(3).2^2" 2 5 13 PSL(4, 3).2c "L4(3).2 3" 2 3 5 13 ❄❄ 3 ❄❄ ❄❄ continued 17 126 4 PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I Group G PSL(4, 3).2b "L4(3).2 2" Γ(G) o(u) 2 Characters ϕ32/1b , ϕ33/6a , ϕ34/6b , 2 · 13 ϕ36/15a , ϕ37/15b , ϕ38/19a χ4/26b , χ7/39aC13 2 5 2 · 13 3 · 13 5 · 13 Lemma 3.1 (χ2,1b ) ϕ22/12 , ϕ23/16 χ5/12a χ5/12a χ9/52 2·3 χ7/39a 2 5 2·7 5·7 Lemma 3.1 (χ2,1b ) χ4/20a , χ10/84a χ2/1b , χ4/20a χ4/20a 5 3·5 3·7 χ3/20a , χ7/28a , χ9/56 χ3/20a , χ7/28a , χ9/56 χ7/28a 2 7 2 · 43 3·7 3 · 43 7 · 43 7 3·7 Lemma 3.1 (χ2,1b ) χ3/42a , χ10/258a χ3/42aC43 χ3/42a , χ10/258a , χ29/688a χ3/42aC43 χ3/42aC43 χ2/42 , χ10/258a χ2/42 , χ10/258a , χ25/344a 3 2 2 · 19 19 7 · 19 2·7 Lemma 3.1 (χ2,1b ) indU 3(8) (χ1/1 ), indU 3(8) (χ23/567a ) indU 3(8) (χ2/56 ) indU 3(8) (χ5/133a ) 3 3 · 19 ϕ22/1b , ϕ24/24 , ϕ26/54b , ϕ27/54c χ7/56a , χ16/133a 2 3 5 13 PSL(4, 3).2a = PGL(4, 3) Γ(PSL(4, 3).22 ) "L4(3).2 1" PSL(4, 3) Γ(PSL(4, 3).2c) "L4(3)" 2 3 PSU(3, 4).4 ⑧ "U3(4).4" ⑧⑧ 5 PSU(3, 4).2 "U3(4).2" PSU(3, 4) "U3(4)" 13 2 3 ⑧⑧ ⑧⑧ ⑧ ⑧ 5 3 ⑧⑧ ⑧⑧ ⑧ ⑧ 7 Γ(PSU(3, 5).S3 ) PSU(3, 5) "U3(5)" PSU(3, 7).2 "U3(7).2" Γ(PSU(3, 5).2) PSU(3, 8) .(C3 × S3 ) --- 2 3 5 7 2 43 2 3 7 43 2 ⑧⑧ ⑧⑧ ⑧ ⑧ 2 13 3 4 3 4 19 2 3 ⑧⑧ ⑧⑧ ⑧ ⑧ 19 2 7 PSU(3, 8).3b "U3(8).3 2" subgroup of .S3 3 Γ(PSU(3, 8) .(C3 × S3 )) 7 PSU(3, 8).3c "U3(8).3 3" subgroup of .6 ⑧ ⑧⑧ ⑧ ⑧⑧ 2 7 PSU(3, 8).S3 "U3(8).S3" PSU(3, 8).6 "U3(8).6" 3 7 7 PSU(3, 8).32 --- 1 13 2 PSU(3, 5).3 "U3(5).3" PSU(3, 5).2 "U3(5).2" PSU(3, 7) "U3(7)" 1 Γ(PSU(3, 4).4) 5 PSU(3, 5).S3 "U3(5).S3" ⑧ ⑧⑧ # n.-t. Solutions 17 3 ⑧⑧ ⑧⑧ ⑧ ⑧ 19 Γ(PSU(3, 8).32 ) continued 428 27 28 ANDREAS BÄCHLE AND LEO MARGOLIS Group G PSU(3, 8).3a "U3(8).3 1" Γ(G) PSU(3, 8).2 "U3(8).2" PSU(3, 8) "U3(8)" PSU(3, 9).4 "U3(9).4" Γ(PSU(3, 8).6) 2 7 PSU(4, 3).4 "U4(3).4" PSU(4, 3).22 b "U4(3).(2^2) {133}" PSU(4, 3).22 a "U4(3).(2^2) {122}" PSU(4, 3).2c "U4(3).2 3" PSU(4, 3).2b "U4(3).2 2" PSU(4, 3).2a "U4(3).2 1" PSU(4, 3) "U4(3)" PSU(5, 2).2 "U5(2).2" 3 ⑧⑧ ⑧⑧ ⑧ ⑧ Lemma 3.1 (χ2,1b ) χ5/72a ϕ35/12 , ϕ37/14a χ5/72aC73 χ5/72a , χ15/1168aC73 χ5/72aC73 73 3 3·5 3·7 5·7 ϕ22/20 , ϕ23/68 , ϕ25/120 χ6/21a , χ11/70a , χ41/420a χ6/21a , χ11/70a , χ41/420a χ6/21a 2 2·7 Lemma 3.1 (χ2,1b ) χ2/1b , χ3/21a 2 2·7 ϕ32/1b , ϕ33/15a , ϕ34/15b χ2/1b , χ3/21a , χ9/90a 2·5 χ3/35a 2 3 2 · 11 3 · 11 5 · 11 2 2·5 χ2/1b , χ3/10a ϕ22/10 , ϕ23/20 , ϕ24/24 , ϕ26/80b χ2/1b , χ3/10a , χ11/132 χ5/22 , χ8/55a χ3/10a χ2/10a χ2/10a , χ6/55a 3 23 2 5 2 · 17 3 · 17 5 · 17 χ2/1b , χ5/18a ϕ22/16 , ϕ23/32 χ2/1b , χ5/18a , χ9/68a χ5/18a χ5/18a 7 1 11 Γ(PSU(3, 9).4) 2 ❄❄ 3 ❄❄ ❄❄ 5 7 33 Γ(PSU(4, 3).D8 ) Γ(PSU(4, 3).D8 ) Γ(PSU(4, 3).D8 ) 2 3 5 7 2 3 5 7 4 Γ(PSU(4, 3).D8 ) 2 3 5 7 2 3 ⑧⑧ ⑧⑧ ⑧ ⑧ 11 2 3 ⑧⑧ ⑧⑧ ⑧ ⑧ 1 11 2 5 PSp(4, 4).2 "S4(4).2" PSp(4, 4) "S4(4)" 2 3 5 2 · 73 3 · 73 5 · 73 19 Γ(PSU(3, 9).4) 5 PSp(4, 4).4 "S4(4).4" # n.-t. Solutions ⑧⑧ ⑧⑧ ⑧ ⑧ 2 5 PSU(5, 2) "U5(2)" Characters Γ(PSU(3, 8).3c) 5 PSU(3, 9).2 "U3(9).2" PSU(3, 9) "U3(9)" PSU(4, 3).D8 "U4(3).D8" o(u) 3 3 ⑧⑧ ⑧⑧ ⑧ ⑧ 17 Γ(PSp(4, 4).4) Γ(PSp(4, 4).4) continued PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I Group G Γ(G) PSp(4, 5).2 "S4(5).2" 2 5 o(u) Characters 3 5 3 · 13 5 · 13 2 2 · 13 ϕ53/5a χ3/26 , χ4/40a , χ8/65c , χ23/416 χ3/26C13 χ3/26 , χ13/104aC13 ϕ52/5 χ2/13aC13 1 170 3 7 3·5 5·7 2 7 2·5 5·7 Lemma 4.8, Remark 4.9 1 ≥ 518 3 5 3 · 41 5 · 41 2 2 · 41 χ5/82a , χ7/288a , χ11/369a χ5/82a , χ7/288a , χ25/1312a χ5/82a , χ7/288aC41 χ21/450aC41 χ3/82 χ3/82 , χ4/288aC41 52* 343* 2 107* 2 · 41 χ2/1b , χ3/41a , χ4/41b , χ5/41c , χ6/41d χ3/41a , χ4/41b , χ7/288aC41 2 3 2·7 3·7 5·7 χ2/7 , χ3/15 , χ4/21a ϕ22/6 , ϕ23/8 , ϕ24/14 χ2/7 , χ4/21 , χ7/35a χ2/7 , χ3/15 χ2/7 40 3 ❄❄ ⑧ 3 ❄❄ ⑧ ⑧⑧❄ ⑧⑧ ❄ 5·7 χ4/28a 3 2 2·7 χ4/28a , χ8/50a χ4/28a , χ7/105a 49 3 3·7 ϕ22/8 , ϕ23/16 , ϕ24/26 , ϕ25/48 χ3/28a , χ5/35a , χ7/70a , χ10/84a 16 7 2·5 2·7 2 · 13 5·7 5 · 13 7 · 13 continued ϕ22/4a χ4/35a χ4/35aC7 χ2/14aC13 χ2/14aC7 χ2/14aC13 χ2/14aC13 3 ❄❄ ⑧ 3 ❄⑧ ⑧ ⑧❄❄ ⑧⑧ ❄ 13 PSp(4, 5) "S4(5)" 2 PSp(4, 7).2 "S4(7).2" 2 ❄❄ 3 ❄❄ ❄❄ 5 7 2 ❄❄ 3 ❄❄ ❄❄ 5 7 2 3 5 PSp(4, 7) "S4(7)" PSp(4, 9).22 "S4(9).2^2" 5 PSp(4, 9).2c "S4(9).2 3" "S4(9)" PSp(6, 2) "S6(2)" ≥9 9* 41 3 ⑧⑧ ⑧⑧ ⑧ ⑧ 41 2 2 P Ω+ (8, 2).3 "O8+(2).3" 2 5 5 2 5 3 ⑧ ⑧⑧ ⑧ ⑧⑧ 7 7 ⑧ ⑧⑧ ⑧ ⑧⑧ 7 ❄❄ ⑧ 3 ❄⑧ ⑧ ⑧❄❄ ⑧⑧ ❄ 7 2 5 Sz(8) "Sz(8)" 3 ⑧⑧ ⑧⑧ ⑧ ⑧ ≥4 1 ≥ 4700 Γ(PSp(4, 9).2a) P Ω+ (8, 2).S3 "O8+(2).3.2" P Ω+ (8, 2) "O8+(2)" 41 2 5 P Ω+ (8, 2).2 "O8+(2).2" ❄❄ ⑧ ❄⑧ ⑧ ⑧❄❄ ⑧⑧ ❄ Lemma 4.8, Remark 4.9 Γ(PSp(4, 9).22 ) 5 PSp(4, 9) 1 13 2 5 PSp(4, 9).2b "S4(9).2 2" PSp(4, 9).2a "S4(9).2 1" 3 ⑧⑧ ⑧⑧ ⑧ ⑧ # n.-t. Solutions 3 ⑧⑧ ⑧⑧ ⑧ ⑧ 7 2 5 7 13 29 30 ANDREAS BÄCHLE AND LEO MARGOLIS Group G Γ(G) Sz(32).5 "Sz(32).5" Sz(32) "Sz(32)" G2 (3).2 "G2(3).2" 2 5 31 41 2 5 31 41 2 3 7 G2 (3) "G2(3)" 3D 4 (2).3 "3D4(2).3" 2 3 7 13 2 7 3D 2F 4 (2) ′ 4 (2) .2 "3D4(2)" 13 3 ⑧⑧ ⑧⑧ ⑧ ⑧ 13 ′ 4 (2) M11 "2F4(2)’" "M11" Characters Lemma 3.1 (χ2,1b ) ϕ26/20 χ6/124a , χ18/1024aC31 χ6/124aC41 χ6/124aC31 χ6/124aC41 χ6/124aC31 χ2/124a # n.-t. Solutions 2 2 3 Lemma 3.1 (χ2,1b ) ϕ73/14a , ϕ75/64a , ϕ79/78a , 242 2 · 13 3·7 ϕ711/92a , ϕ714/103a χ14/104a , χ20/896 ϕ13 , ϕ13 , ϕ13 , 3/14a 5/64a 9/78a 3 · 13 7 · 13 2·7 , ϕ13 , ϕ13 ϕ13 20/434a 16/167a 11/91a χ3/14a , χ5/64a , χ11/91a χ3/14a χ2/14 , χ3/64a 2 3 χ7/52a ϕ22/1b , ϕ24/24 , ϕ25/26a , ϕ26/26b 7 2 · 13 3 · 13 7 · 13 ϕ24/24 , ϕ25/26a χ4/26a , χ10/196a χ2/1b , χ4/26a , χ5/26b χ7/52a 2 2 · 13 3·5 3 · 13 5 · 13 χ3/52 χ8/78a , χ10/300a χ4/27a χ4/27a χ4/27a 3 140 Γ(3 D4 (2).3) 2 3 5 13 "2F4(2)’.2" 2F o(u) 5 41 2 · 31 2 · 41 5 · 31 5 · 41 31 · 41 2·5 5 Γ(2 F4 (2)′ .2) [BK07] M12 .2 "M12.2" M12 "M12" [KK15] [BKS07] J2 .2 "J2.2" J2 "J2" [KK15] [BJK11] Remark 5.1. Note that there are more almost simple groups with 4-primary socle, but these are not 4-primary themselves and thus not listed in Table 9. Namely this is the automorphism group of Sz(8), having 3 as an additional prime divisor, the automorphism groups of PSL(2, 2f ) and PSL(2, 3f ) and a degree f -extension of PSL(2, 3f ), where the group either appears in the series PSL(2, 3f ) described in Proposition 1.2 or 3f = 35 . Note that in the case that PSL(2, 3f ) is 4-primary, f has to be a prime if f ≥ 5. This follows easily from Proposition 1.2 and [Wil09, 3.3.4]. Acknowledgements We are grateful to Christof Söger and Sebastian Gutsche for helping us to solve linear inequalities on computers. We thank Thomas Breuer for help with the GAP Character Table Library. We also want to thank the referee for improving the presentation in the article. PRIME GRAPH QUESTION FOR INTEGRAL GROUP RINGS OF 4-PRIMARY GROUPS I 31 References [AH88] P.J. Allen and C. Hobby, A characterization of units in ZS4 , Comm. Algebra 16 (1988), no. 7, 1479– 1505. [BC17] A. Bächle and M. Caicedo, On the Prime Graph Question for Almost Simple Groups with an Alternating Socle, Internat. J. Algebra Comput. 27 (2017), no. 3, 333–347. [BCM01] Y. Bugeaud, Z. Cao, and M. Mignotte, On simple K4 -groups, J. Algebra 241 (2001), no. 2, 658–668. [BCP97] W. Bosma, J. Cannon, and C. Playoust, The Magma algebra system. I. The user language, J. Symbolic Comput. 24 (1997), no. 3-4, 235–265, Computational algebra and number theory (London, 1993). [BH08] V. Bovdi and M. Hertweck, Zassenhaus conjecture for central extensions of S5 , J. Group Theory 11 (2008), no. 1, 63–74. [BIS16] W. Bruns, B. Ichim, and C. Söger, The power of pyramid decomposition in Normaliz, J. Symbolic Comput. 74 (2016), 513–536. [BJK11] V.A. Bovdi, E. Jespers, and A.B. Konovalov, Torsion units in integral group rings of Janko simple groups, Math. Comp. 80 (2011), no. 273, 593–615. [BK07] V.A. Bovdi and A.B. Konovalov, Integral group ring of the first Mathieu simple group, Groups St. Andrews 2005. Vol. 1, London Math. Soc. Lecture Note Ser., vol. 339, Cambridge Univ. Press, Cambridge, 2007, pp. 237–245. [BKS07] V.A. Bovdi, A.B. Konovalov, and S. Siciliano, Integral group ring of the Mathieu simple group M12 , Rend. Circ. Mat. Palermo (2) 56 (2007), no. 1, 125–136. [BM15a] A. Bächle and L. Margolis, HeLP – A GAP package for torsion units in integral group rings, submitted (2015), 6 pages, arXiv:1507.08174[math.RT]. , HeLP – Hertweck-Luthar-Passi method, GAP package, Version 2.2, [BM15b] http://homepages.vub.ac.be/abachle/help/ , 2015. , Rational conjugacy of torsion units in integral group rings of non-solvable groups, Proc. Edinb. [BM17] Math. Soc. (2017), 1–18, In press. [Bre12] T. Breuer, The GAP Character Table Library, Version 1.2.1, http://www.math.rwth-aachen.de/~ Thomas.Breuer/ctbllib, May 2012, GAP package. [Bur76] R. Burkhardt, Die Zerlegungsmatrizen der Gruppen PSL(2, pf ), J. Algebra 40 (1976), no. 1, 75–96. [CMdR13] M. Caicedo, L. Margolis, and Á. del Rı́o, Zassenhaus conjecture for cyclic-by-abelian groups, J. Lond. Math. Soc. (2) 88 (2013), no. 1, 65–78. [CR87] C.W. Curtis and I. Reiner, Methods of representation theory. Vol. II, Pure and Applied Mathematics (New York), John Wiley & Sons, Inc., New York, 1987, With applications to finite groups and orders, A Wiley-Interscience Publication. [CR90] , Methods of representation theory. Vol. I, Wiley Classics Library, John Wiley & Sons, Inc., New York, 1990, With applications to finite groups and orders, Reprint of the 1981 original, A WileyInterscience Publication. [Dic58] L.E. Dickson, Linear groups: With an exposition of the Galois field theory, with an introduction by W. Magnus, Dover Publications, Inc., New York, 1958. [Dip85] R. Dipper, On the decomposition numbers of the finite general linear groups. II, Trans. Amer. Math. Soc. 292 (1985), no. 1, 123–133. [Fei71] W. Feit, The current situation in the theory of finite simple groups, Actes du Congrès International des Mathématiciens (Nice, 1970), Tome 1, Gauthier-Villars, Paris, 1971, pp. 55–93. [GAP15] The GAP Group, GAP – Groups, Algorithms, and Programming, Version 4.7.8, 2015, http://www.gap-system.org. [Gor69] D. Gorenstein, Finite groups the centralizers of whose involutions have normal 2-complements, Canad. J. Math. 21 (1969), 335–357. [HB82] B. Huppert and N. Blackburn, Finite groups. III, Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences], vol. 243, Springer-Verlag, Berlin-New York, 1982. [Her01] M. Hertweck, A counterexample to the isomorphism problem for integral group rings, Ann. of Math. (2) 154 (2001), no. 1, 115–138. [Her06] , On the torsion units of some integral group rings, Algebra Colloq. 13 (2006), no. 2, 329–348. , Partial augmentations and Brauer character values of torsion units in group rings, 16 pages, [Her07] arXiv:math/0612429[math.RA]. , Zassenhaus conjecture for A6 , Proc. Indian Acad. Sci. Math. Sci. 118 (2008), no. 2, 189–195. [Her08] [His90] G. Hiss, The number of trivial composition factors of the Steinberg module, Arch. Math. (Basel) 54 (1990), no. 3, 247–251. [HL00] B. Huppert and W. Lempken, Simple groups of order divisible by at most four primes, Proc. F. Scorina Gomel State University 16 (2000), no. 3, 64–75. [HP72] I. Hughes and K.R. Pearson, The group of units of the integral group ring ZS3 , Canad. Math. Bull. 15 (1972), 529–534. [Hup67] B. Huppert, Endliche Gruppen. I, Die Grundlehren der Mathematischen Wissenschaften, Band 134, Springer-Verlag, Berlin-New York, 1967. 32 ANDREAS BÄCHLE AND LEO MARGOLIS [Jam90] G. James, The decomposition matrices of GLn (q) for n ≤ 10, Proc. London Math. Soc. (3) 60 (1990), no. 2, 225–265. [JdR16a] E. Jespers and Á. del Rı́o, Group ring groups. Volume 1: Orders and generic constructions of units, Berlin: De Gruyter, 2016. , Group ring groups. Volume 2: Structure theorems of unit groups, Berlin: De Gruyter, 2016. [JdR16b] [Jor07] H.E. Jordan, Group-Characters of Various Types of Linear Groups, Amer. J. Math. 29 (1907), no. 4, 387–405. [Kim06] W. Kimmerle, On the prime graph of the unit group of integral group rings of finite groups, Groups, rings and algebras, Contemp. Math., vol. 420, Amer. Math. Soc., Providence, RI, 2006, pp. 215–228. [KK11] A.S. Kondrat’ev and I.V. Khramtsov, On finite tetraprimary groups, Tr. IMM UrO RAN 17 (2011), no. 4, 142–159 (Russisch), Englische Version in Proc. Steklov Inst. Math. (Suppl.) 279 (2012), no. 1, 43-61. [KK15] W. Kimmerle and A.B. Konovalov, Recent advances on torsion subgroups of Integral Group Rings, Proc. of Groups St Andrews 2013 (2015), 331–347. [KK17] W. Kimmerle and A. Konovalov, On the Gruenberg–Kegel graph of integral group rings of finite groups, Internat. J. Algebra Comput. 27 (2017), no. 6, 619–631. [LP89] I.S. Luthar and I.B.S. Passi, Zassenhaus conjecture for A5 , Proc. Indian Acad. Sci. Math. Sci. 99 (1989), no. 1, 1–5. [LT91] I.S. Luthar and P. Trama, Zassenhaus conjecture for S5 , Comm. Algebra 19 (1991), no. 8, 2353–2362. [MK15] V.D. Mazurov and E.I. Khukhro, Unsolved problems in Group Theory. The Kourovka Notebook. No. 18 (english version), arXiv:1401.0300v6[math.GR], 2015. [MRSW87] Z. Marciniak, J. Ritter, S.K. Sehgal, and A. Weiss, Torsion units in integral group rings of some metabelian groups. II, J. Number Theory 25 (1987), no. 3, 340–352. [Sal11] M. Salim, Kimmerle’s conjecture for integral group rings of some alternating groups, Acta Math. Acad. Paedagog. Nyházi. (N.S.) 27 (2011), no. 1, 9–22. , The prime graph conjecture for integral group rings of some alternating groups, Int. J. Group [Sal13] Theory 2 (2013), no. 1, 175–185. [Sch07] I. Schur, Untersuchungen über die Darstellungen der endlichen Gruppen durch gebrochene lineare Substitutionen, J. Reine Angew. Math. 132 (1907), 85–137. [SF73] W.A. Simpson and J.S. Frame, The character tables for SL(3, q), SU(3, q 2 ), PSL(3, q), PSU(3, q 2 ), Canad. J. Math. 25 (1973), 486–494. [Shi91] W.J. Shi, On simple K4 -groups, Chinese Science Bull. 36 (1991), no. 17, 1281–1283, (Chinese). [tt] 4ti2 team, 4ti2—a software package for algebraic, geometric and combinatorial problems on linear spaces, Available at www.4ti2.de, Version 1.6.7. [Wei88] A. Weiss, Rigidity of p-adic p-torsion, Ann. of Math. (2) 127 (1988), no. 2, 317–332. , Torsion units in integral group rings, J. Reine Angew. Math. 415 (1991), 175–187. [Wei91] [Whi90a] D.L. White, The 2-decomposition numbers of Sp(4, q), q odd, J. Algebra 131 (1990), no. 2, 703–725. [Whi90b] , Decomposition numbers of Sp(4, q) for primes dividing q ± 1, J. Algebra 132 (1990), no. 2, 488–500. [Whi92] , Brauer trees of Sp(4, q), Comm. Algebra 20 (1992), no. 3, 645–653. [Wil09] R.A. Wilson, The finite simple groups, Graduate Texts in Mathematics, vol. 251, Springer-Verlag London, Ltd., London, 2009. [WPN+ 11] R.A. Wilson, R.A. Parker, S. Nickerson, J.N. Bray, and T. Breuer, AtlasRep, A GAP Interface to the Atlas of Group Representations, Version 1.5, http://www.math.rwth-aachen.de/~ Thomas.Breuer/atlasrep , July 2011, Refereed GAP package. [Zas74] H.J. Zassenhaus, On the torsion units of finite group rings, Studies in mathematics (in honor of A. Almeida Costa), Instituto de Alta Cultura, Lisbon, 1974, pp. 119–126. Vakgroep Wiskunde, Vrije Universiteit Brussel, Pleinlaan 2, 1050 Brussels, Belgium E-mail address: [email protected] Departamento de matemáticas, Facultad de matemáticas, Universidad de Murcia, 30100 Murcia, Spain E-mail address: [email protected]
4math.GR
The Projected Power Method: An Efficient Algorithm for Joint Alignment from Pairwise Differences Yuxin Chen ∗† Emmanuel J. Candès ∗‡ arXiv:1609.05820v3 [cs.IT] 7 Dec 2017 September 2016; Revised November 2016 Abstract Various applications involve assigning discrete label values to a collection of objects based on some pairwise noisy data. Due to the discrete—and hence nonconvex—structure of the problem, computing the optimal assignment (e.g. maximum likelihood assignment) becomes intractable at first sight. This paper makes progress towards efficient computation by focusing on a concrete joint alignment problem—that is, the problem of recovering n discrete variables xi ∈ {1, · · · , m}, 1 ≤ i ≤ n given noisy observations of their modulo differences {xi − xj mod m}. We propose a low-complexity and model-free procedure, which operates in a lifted space by representing distinct label values in orthogonal directions, and which attempts to optimize quadratic functions over hypercubes. Starting with a first guess computed via a spectral method, the algorithm successively refines the iterates via projected power iterations. We prove that for a broad class of statistical models, the proposed projected power method makes no error—and hence converges to the maximum likelihood estimate—in a suitable regime. Numerical experiments have been carried out on both synthetic and real data to demonstrate the practicality of our algorithm. We expect this algorithmic framework to be effective for a broad range of discrete assignment problems. 1 Introduction 1.1 Nonconvex optimization Nonconvex optimization permeates almost all fields of science and engineering applications. For instance, consider the structured recovery problem where one wishes to recover some structured inputs x = [xi ]1≤i≤n from noisy samples y. The recovery procedure often involves solving some optimization problem (e.g. maximum likelihood estimation) maximizez∈Rn `(z; y) subject to z ∈ S, (1) where the objective function `(z; y) measures how well a candidate z fits the samples. Unfortunately, this program (1) may be highly nonconvex, depending on the choices of the goodness-of-fit measure `(·) as well as the feasible set S. In contrast to convex optimization that has become the cornerstone of modern algorithm design, nonconvex problems are in general daunting to solve. Part of the challenges arises from the existence of (possibly exponentially many) local stationary points; in fact, oftentimes even checking local optimality for a feasible point proves NP-hard. Despite the general intractability, recent years have seen progress on nonconvex procedures for several classes of problems, including low-rank matrix recovery [KMO10a, KMO10b, JNS13, SL15, CW15, ZL15, TBSR15,MWCC17,ZWL15,PKB+ 16,YPCC16], phase retrieval [NJS13,CLS15,SBE14,CC17,CLM15,SQW16, CL16,ZCL16,MWCC17,WGE16,ZL16], dictionary learning [SQW15a,SQW15b], blind deconvolution [LLSW16, MWCC17], empirical risk minimization [MBM16], to name just a few. For example, we have learned that several problems of this kind provably enjoy benign geometric structure when the sample complexity is sufficiently large, in the sense that all local stationary points (except for the global optimum) become saddle ∗ Department of Statistics, Stanford University, Stanford, CA 94305, U.S.A. of Electrical Engineering, Princeton University, Princeton, NJ 08544, U.S.A. ‡ Department of Mathematics, Stanford University, Stanford, CA 94305, U.S.A. † Department 1 points and are not difficult to escape [SQW15b,SQW15a,GLM16,BNS16,LSJR16]. For the problem of solving certain random systems of quadratic equations, this phenomenon arises as long as the number of equations or sample size exceeds the order of n log3 n, with n denoting the number of unknowns [SQW16].1 We have also learned that it is possible to minimize certain non-convex random functionals—closely associated with the famous phase retrieval problem—even when there may be multiple local minima [CLS15, CC17]. In such problems, one can find a reasonably large basin of attraction around the global solution, in which a first-order method converges geometrically fast. More importantly, the existence of such a basin is often guaranteed even in the most challenging regime with minimal sample complexity. Take the phase retrieval problem as an example: this basin exists as soon as the sample size is about the order of n [CC17]. This motivates the development of an efficient two-stage paradigm that consists of a carefully-designed initialization scheme to enter the basin, followed by an iterative refinement procedure that is expected to converge within a logarithmic number of iterations [CLS15, CC17]; see also [KMO10a, KMO10b] for related ideas in matrix completion. In the present work, we extend the knowledge of nonconvex optimization by studying a class of assignment problems in which each xi is represented on a finite alphabet, as detailed in the next subsection. Unlike the aforementioned problems like phase retrieval which are inherently continuous in nature, in this work we are preoccupied with an input space that is discrete and already nonconvex to start with. We would like to contribute to understanding what is possible to solve in this setting. 1.2 A joint alignment problem This paper primarily focuses on the following joint discrete alignment problem. Consider a collection of n variables {xi }1≤i≤n , where each variable can take m different possible values, namely, xi ∈ [m] := {1, · · · , m}. Imagine we obtain a set of pairwise difference samples {yi,j | (i, j) ∈ Ω} over some symmetric2 index set Ω ⊆ [n] × [n], where yi,j is a noisy measurement of the modulo difference of the incident variables yi,j ← xi − xj mod m, (i, j) ∈ Ω. (2) For example, one might obtain a set of data {yi,j } where only 50% of them are consistent with the truth xi − xj mod m. The goal is to simultaneously recover all {xi } based on the measurements {yi,j }, up to some unrecoverable global offset.3 To tackle this problem, one is often led to the following program X maximize{zi } ` (zi , zj ; yi,j ) (3) (i,j)∈Ω subject to zi ∈ {1, · · · , m} , i = 1, · · · , n, where ` (zi , zj ; yi,j ) is some function that evaluates how consistent the observed sample yi,j corresponds to the candidate solution (zi , zj ). For instance, one possibility for ` may be ( 1, if zi − zj = yi,j mod m, ` (zi , zj ; yi,j ) = (4) 0, else, under which the program (3) seeks a solution that maximizes the agreement between the paiwise observations and the recovery. Throughout the rest of the paper, we set `(zi , zj ; yi,j ) ≡ 0 whenever (i, j) ∈ / Ω. This joint alignment problem finds applications in multiple domains. To begin with, the binary case (i.e. m = 2) deserves special attention, as it reduces to a graph partitioning problem. For instance, in a community detection scenario in which one wishes to partition all users into two clusters, the variables {xi } to recover indicate the cluster assignments for each user, while yi,j represents the friendship between two users i and j (e.g. [KN11,CO10,ABH16,CGT12,MNS14,JCSX11,OH11,CSX12,HWX16,CKST16,JMRT16,CRV15, GRSY15]). This allows to model, for example, the haplotype phasing problem arising in computational 1 This geometric property alone is not sufficient to ensure rapid convergence of an algorithm. say Ω is symmetric if (i, j) ∈ Ω implies (j, i) ∈ Ω for any i and j. 3 Specifically, it is impossible to distinguish the m sets of inputs {x } i 1≤i≤n , {xi − 1}1≤i≤n , · · · , and {xi − m + 1}1≤i≤n even if we obtain perfect measurements of all pairwise differences {xi − xj mod m : 1 ≤ i, j ≤ n}. 2 We 2 genomics [SVV14, CKST16]. Another example is the problem of water-fat separation in magnetic resonance imaging (more precisely, in Dixon imaging). A crucial step is to determine, at each image pixel i, the phasor (associated with the field inhomogeneity) out of two possible candidates, represented by xi = 1 and xi = 2, respectively. The task takes as input some pre-computed pairwise cost functions −`(xi , xj ), which provides information about whether xi = xj or not at pixels i and j; see [ZCB+ 17, HKHL10, BAJK11] for details. Moving beyond the binary case, this problem is motivated by the need of jointly aligning multiple images/shapes/pictures that arises in various fields. Imagine a sequence of images of the same physical instance (e.g. a building, a molecule), where each xi represents the orientation of the camera when taking the ith image. A variety of computer vision tasks (e.g. 3D reconstruction from multiple scenes) or structural biology applications (e.g. cryo-electron microscopy) rely upon joint alignment of these images; or equivalently, joint recovery of the camera orientations associated with each image. Practically, it is often easier to estimate the relative camera orientation between a pair of images using raw features [HSG13, WS13, BCSZ14]. The problem then boils down to this: how to jointly aggregate such pairwise information in order to improve the collection of camera pose estimates? 1.3 Our contributions In this work, we propose to solve the problem (3) via a novel model-free nonconvex procedure. Informally, the procedure starts by lifting each variable xi ∈ [m] to higher dimensions such that distinct values are represented in orthogonal directions, and then encodes the goodness-of-fit measure `(xi , xj ; yi,j ) for each (i, j) by an m × m matrix. This way of representation allows to recast (3) as a constrained quadratic program or, equivalently, a constrained principal component analysis (PCA) problem. We then attempt optimization by means of projected power iterations, following an initial guess obtained via suitable lowrank factorization. This procedure proves effective for a broad family of statistical models, and might be interesting for many other Boolean assignment problems beyond joint alignment. 2 Algorithm: projected power method In this section, we present a nonconvex procedure to solve the nonconvex problem (3), which entails a series of projected power iterations over a higher-dimensional space. In what follows, this algorithm will be termed a projected power method (PPM). 2.1 Matrix representation The formulation (3) admits an alternative matrix representation that is often more amenable to computation. m To begin with, each state zi ∈ {1, · · · , m} can be represented by a binary-valued vector zi ∈ {0, 1} such that zi = j ⇐⇒ zi = ej ∈ Rm , (5)       1 0 0  0   1   0        where e1 =  . , e2 =  . , · · · , em =  .  are the canonical basis vectors. In addition, for each  ..   ..   ..  0 0 1 pair (i, j), one can introduce an input matrix Li,j ∈ Rm×m to encode `(zi , zj ; yi,j ) given all possible input combinations of (zi , zj ); that is, (Li,j )α,β := ` (zi = α, zj = β; yi,j ) , 1 ≤ α, β ≤ m. (6) Take the choice (4) of ` for example: ( (Li,j )α,β = 1, if α − β = yi,j mod m, 0, else, ∀(i, j) ∈ Ω; (7) in words, Li,j is a cyclic permutation matrix obtained by circularly shifting the identity matrix Im ∈ Rm×m by yi,j positions. By convention, we take Li,i ≡ 0 for all 1 ≤ i ≤ n and Li,j ≡ 0 for all (i, j) ∈ / Ω. 3 The preceding notation enables the quadratic form representation ` (zi , zj ; yi,j ) = zi> Li,j zj . For notational simplicity, we stack all the zi ’s and the Li,j ’s into a concatenated vector and matrix     z1 L1,1 · · · L1,n    ..  ∈ Rnm×nm .. z =  ...  ∈ Rnm and L =  ... . .  zn Ln,1 · · · Ln,n (8) respectively, representing the states and log-likelihoods altogether. As a consequence, our problem can be succinctly recast as a constrained quadratic program: maximizez z > Lz subject to zi ∈ {e1 , · · · , em } , (9) i = 1, · · · , n. This representation is appealing due to the simplicity of the objective function regardless of the landscape of `(·, ·), which allows one to focus on quadratic optimization rather than optimizing the (possibly complicated) function `(·, ·) directly. There are other families of L that also lead to the problem (3). We single out a simple, yet, important family obtained by enforcing global scaling and offset of L. Specifically, the solution to (9) remains unchanged if each Li,j is replaced by4 Li,j ← aLi,j + b · 11> , (i, j) ∈ Ω (10) for some numerical values a > 0 and b ∈ R. Another important instance in this family is the debiased version of L—denoted by Ldebias —defined as follows Ldebias = Li,j − i,j 1> Li,j 1 · 11> , m2 1 ≤ i, j ≤ n, (11) which essentially removes the empirical average of Li,j in each block. 2.2 Algorithm One can interpret the quadratic program (9) as finding the principal component of L subject to certain structural constraints. This motivates us to tackle this constrained PCA problem by means of a power method, with the assistance of appropriate regularization to enforce the structural constraints. More precisely, we consider the following procedure, which starts from a suitable initialization z (0) and follows the update rule   z (t+1) = P∆n µt Lz (t) , ∀t ≥ 0 (12) for some scaling parameter µt ∈ R+ ∪ {∞}. Here, P∆n represents block-wise projection onto the standard simplex, namely, for any vector z = [zi ]1≤i≤n ∈ Rnm ,   P∆ (z1 )   .. P∆n (z) :=  (13) , . P∆ (zn ) where P∆ (zi ) is the projection of zi ∈ Rm onto the standard simplex  ∆ := s ∈ Rm | 1> s = 1; s is non-negative . (14) In particular, when µt = ∞, P∆ (µt zi ) reduces to a rounding procedure. Specifically, if the largest entry of zi is strictly larger than its second largest entry, then one has lim P∆ (µt zi ) = ej µt →∞ 4 This is because zi> (aLi,j + b11> )zj = azi> Li,j zj + b given that 1> zi = 1> zj = 1. 4 (15) with j denoting the index of the largest entry of zi ; see Fact 3 for a justification. The key advantage of the PPM is its computational efficiency: the most expensive step in each iteration lies in matrix multiplication, which can be completed in nearly linear time, i.e. in time O (|Ω|m log m).5 This arises from the fact that each block Li,j is circulant, so we can compute a matrix-vector product using at most two m-point FFTs. The projection step P∆ can be performed in O (m log m) flops via a sortingbased algorithm (e.g. [DSSSC08, Figure 1]), and hence P∆n (·) is much cheaper than the matrix-vector multiplication Lz (t) given that |Ω|  n occurs in most applications. One important step towards guaranteeing rapid convergence is to identify a decent initial guess z (0) . This is accomplished by low-rank factorization as follows 1. Compute the best rank-m approximation of the input matrix L, namely, L̂ := arg min M : rank(M )≤m kM − LkF , (16) where k · k represents the Frobenius norm; 2. Pick a random column ẑ of L̂ and set the initial guess as z (0) = P∆n (µ0 ẑ). Remark 1. Alternatively, one can take L̂ to be the best rank-(m − 1) approximation of the debiased input matrix Ldebias defined in (11), which can be computed in a slightly faster manner. Remark 2. A natural question arises as to whether the algorithm works with an arbitrary initial point. This question has been studied by [BBV16] for the more special stochastic block models, which shows that under some (suboptimal) conditions, all second-order critical points correspond to the truth and hence an arbitrary initialization works. However, the condition presented therein is much more stringent than the optimal threshold [ABH16, MNS14]. Moreover, it is unclear whether a local algorithm like the PPM can achieve optimal computation time without proper initialization. All of this would be interesting for future investigation. The main motivation comes from the (approximate) low-rank structure of the input matrix L. As we shall shortly see, in many scenarios the data matrix is approximately of rank m if the samples are noise-free. Therefore, a low-rank approximation of L serves as a denoised version of the data, which is expected to reveal much information about the truth. The low-rank factorization step can be performed efficiently via the method of orthogonal iteration (also called block power method) [GVL12, Section 7.3.2]. Each power iteration consists of a matrix product of the form LU as well as a QR decomposition of some matrix V , where U , V ∈ Rnm×m . The matrix product can be computed in O(|Ω|m2 log m) flops with the assistance of m-point FFTs, whereas the QR decomposition takes time O(nm3 ). In summary, each power iteration runs in time O(|Ω|m2 log m + nm3 ). Consequently, the matrix product constitutes the main computational cost when m . (|Ω| log m)/n, while the QR decomposition becomes the bottleneck when m  |Ω| log m/n. It is noteworthy that both the initialization and the refinement we propose are model-free, which do not make any assumptions on the data model. The whole algorithm is summarized in Algorithm 1. There is of course the question of what sequence {µt } to use, which we defer to Section 3. The proposed two-step algorithm, which is based on proper initialization followed by successive projection onto product of simplices, is a new paradigm for solving a class of discrete optimization problems. As we will detail in the next section, it is provably effective for a family of statistical models. On the other hand, we remark that there exist many algorithms of a similar flavor to tackle other generalized eigenproblems, including but not limited to sparse PCA [JNRS10, HB10, YZ13], water-fat separation [ZCB+ 17], the hidden clique problem [DM15], phase synchronization [Bou16, LYS16], cone-constrained PCA [DMR14], and automatic network analysis [WLS12]. These algorithms are variants of the projected power method, which combine proper power iterations with additional procedures to promote sparsity or enforce other feasibility constraints. For instance, Deshpande et al. [DMR14] show that under some simple models, cone-constrained PCA can be efficiently computed using a generalized projected power method, provided that the cone constraint is convex. The current work adds a new instance to this growing family of nonconvex methods. 5 Here and throughout, the standard notion f (n) = O (g(n)) or f (n) . g(n) mean there exists a constant c > 0 such that |f (n)| ≤ cg(n); f (n) = o (g(n)) means lim f (n)/g(n) = 0; f (n) & g(n) means there exists a constant c > 0 such that n→∞ |f (n)| ≥ cg(n); and f (n)  g(n) means there exist constants c1 , c2 > 0 such that c1 g(n) ≤ |f (n)| ≤ c2 g(n). 5 Algorithm 1 Projected power method. Input: the input matrix L = [Li,j ]1≤i,j≤n ; the scaling factors {µt }t≥0 . Initialize z (0) to be P∆n (µ0 ẑ) as defined in (13), where ẑ is a random column of the best rank-m approximation L̂ of L. Loop: for t = 0, 1, · · · , T − 1 do  z (t+1) = P∆n µt Lz (t) , (17) where P∆n (·) is as defined in (13). (T ) Output {x̂i }1≤i≤n , where x̂i is the index of the largest entry of the block zi . 3 Statistical models and main results This section explores the performance guarantees of the projected power method. We assume that Ω is obtained via random sampling at an observation rate pobs so that each (i, j), i > j is included in Ω independently with probability pobs , and Ω is assumed to be independent of the measurement noise. In addition, we assume that the samples {yi,j | i > j} are independently generated. While the independence noise assumption may not hold in reality, it serves as a starting point for us to develop a quantitative theoretical understanding for the effectiveness of the projected power method. This is also a common assumption in the literature (e.g. [Sin11, WS13, HG13, CGH14, LYS16, Bou16, PKS13]). With the above assumptions in mind, the MLE is exactly given by (3), with ` (zi , zj ; yi,j ) representing the log-likelihood (or some other equivalent function) of the candidate solution (zi , zj ) given the outcome yi,j . Our key finding is that the PPM is not only much more practical than computing the MLE directly6 , but also capable of achieving nearly identical statistical accuracy as the MLE in a variety of scenarios. Before proceeding to our results, we find it convenient to introduce a block sparsity metric. Specifically, the block sparsity of a vector h = {hi }1≤i≤n is defined and denoted by khk∗,0 := n X I {hi 6= 0} , i=1 where I {·} is the indicator function. Since one can only hope to recover x up to some global offset, we define the misclassification rate as the normalized block sparsity of the estimation error modulo the global shift MCR(x̂, x) := 1 min kx̂ − shiftl (x)k∗,0 . n 0≤l<m (18) Here, shiftl (x) := [shiftl (xi )]1≤i≤n ∈ Rmn , where shiftl (xi ) ∈ Rm is obtained by circularly shifting the entries of xi ∈ Rm by l positions. Additionally, we let log (·) represent the natural logarithm throughout this paper. 3.1 Random corruption model While our goal is to accommodate a general class of noise models, it is helpful to start with a concrete and simple example—termed a random corruption model —such that ( xi − xj mod m, with probability π0 , yi,j = (i, j) ∈ Ω, (19) Unif (m) , else, with Unif (m) being the uniform distribution over {0, 1, · · · , m − 1}. We will term the parameter π0 the non-corruption rate, since with probability 1 − π0 the observation behaves like a random noise carrying no information whatsoever. Under this single-parameter model, one can write (  0 log π0 + 1−π , if zi − zj = yi,j mod m, m  ` (zi , zj ; yi,j ) = (i, j) ∈ Ω. (20) 1−π0 log m , else, 6 Finding the MLE here is an NP hard problem, and in general cannot be solved within polynomial time. Practically, one might attempt to compute it via convex relaxation (e.g. [HG13, BCSZ14, CGH14]), which is much more expensive than the PPM. 6 Apart from its mathematical simplicity, the random corruption model somehow corresponds to the worstcase situation since the uniform noise enjoys the highest entropy among all distributions over a fixed range, thus forming a reasonable benchmark for practitioners. Additionally, while Algorithm 1 can certainly be implemented using the formulation (  0 , if α − β = yi,j mod m, log π0 + 1−π m  (i, j) ∈ Ω, (21) (Li,j )α,β = 0 log 1−π , else, m we recommend taking (7) as the input matrix in this case. It is easy to verify that (21) and (7) are equivalent up to global scaling and offset, but (7) is parameter free and hence practically more appealing. We show that the PPM is guaranteed to work even when the non-corruption rate π0 is vanishingly small, which corresponds to the scenario where almost all acquired measurements behave like random noise. A formal statement is this: Theorem 1. Consider the random corruption model (19) and the input matrix L given in (7). Fix m > 0, and suppose pobs > c1 log n/n and µt > c2 /σ2 (L) for some sufficiently large constants c1 , c2 > 0. Then there exists some absolute constant 0 < ρ < 1 such that with probability approaching one as n scales, the iterates of Algorithm 1 obey MCR(z (t) , x) ≤ 0.49ρt , ∀t ≥ 0, (22) provided that the non-corruption rate π0 exceeds7 s π0 > 2 1.01 log n . mnpobs (23) Remark 3. Here and throughout, σi (L) is the ith largest singular value of L. In fact, one can often replace σ2 (L) with σi (L) for other 2 ≤ i < m. But σ1 (L) is usually not a good choice unless we employ the debiased version of L instead, because σ1 (L) typically corresponds to the “direct current” component of L which could be excessively large. In addition, we note that σi (L) (i ≤ m) have been computed during spectral initialization and, as a result, will not result in extra computational cost. Remark 4. As will be seen in Section 6, a stronger version of error contraction arises such that MCR(z (t+1) , x) ≤ ρ MCR(z (t) , x), if MCR(z (t) , x) ≤ 0.49. (24) This is a uniform result in the sense that (24) occurs simultaneously for all z (t) ∈ ∆n obeying MCR(z (t) , x) ≤ 0.49, regardless of the preceding iterates {z (0) , · · · , z (t−1) } and the statistical dependency between z (t) and {yi,j }. In particular, if µt = ∞, one has z (t) ∈ {e1 , · · · , em }n , and hence {z (t) } forms a sequence of feasible iterates with increasing accuracy. In this case, the iterates become accurate whenever MCR(z (t) , x) < 1/n.  Remark 5. The contraction rate ρ can actually be as small as O 1/(π02 npobs ) , which is at most O (1/ log n) if m is fixed and if the condition (23) holds. According to Theorem 1, convergence to the ground truth can be expected in at most O (log n) iterations. This together with the per-iteration cost (which is on the order of |Ω| since Li,j is a cyclic permutation matrix) shows that the computational complexity of the iterative stage is at most O(|Ω| log n). This is nearly optimal since even reading all the data and likelihood values take the order of |Ω|. All of this happens q time about  log n as soon as the corruption rate does not exceed 1 − O mnpobs , uncovering the remarkable ability of the PPM to tolerate and correct dense input errors. As we shall see later in Section 6, Theorem 1 holds as long as the algorithm starts with any initial guess z (0) obeying MCR(z (0) , x) ≤ 0.49, (25) irrespective of whether z (0) is independent of the data {yi,j } or not. Therefore, it often suffices to run the power method for a constant number of iterations during the initialization stage, which can be completed in 7 Theorem 1 continues to hold if we replace 1.01 with any other constant in (1,∞). 7 O(|Ω|) flops when m is fixed. The broader implication is that Algorithm 1 remains successful if one adopts other initialization that can enter the basin of attraction. Finally, our result is sharp: to be sure, the error-correction capability of the projected power method is statistically optimal, as revealed by the following converse result. Theorem 2. Consider the random corruption model (19) with any fixed m > 0, and suppose pobs > c1 log n/n for some sufficiently large constant c1 > 0. If 8 s 0.99 log n , (26) π0 < 2 mnpobs then the minimax probability of error inf max x̂ xi ∈[m],1≤i≤n P (MCR (x̂, x) > 0 | x) → 1, as n → ∞, where the infimum is taken over all estimators and x is the vector representation of {xi } as before. As mentioned before, the binary case m = 2 bears some similarity with the community detection problem in the presence of two communities. Arguably the most popular model for community detection is the stochastic block model (SBM), where any two vertices within the same cluster (resp. across different clusters) are connected by an edge with probability p (resp. q). The asymptotic limits for both exact and partial recovery have been extensively studied [Mas14, ABH16, MNS14, HWX16, AS15, CRV15, BDG+ 16, GV15]. We note, however, that the primary focus of community detection lies in the sparse regime p, q  1/n or logarithmic sparse regime (i.e. p, q  log n/n), which is in contrast to the joint alignment problem in which the measurements are often considerably denser. There are, however, a few theoretical results that cover the 0 0 and q = 1−π for dense regime, e.g. [MNS14]. To facilitate comparison, consider the case where p = 1+π 2 2 some π0 > 0, then the SBM reduces to the random corruption model with p = 1. One can easily verify obs p that the limit π0 = 2 log n/n we derive matches the recovery threshold given in9 [MNS14, Theorem 2.5 and Proposition 2.9]. 3.2 More general noise models The theoretical guarantees we develop for the random corruption model are special instances of a set of more general results. In this subsection, we cover a far more general class of noise models such that ind. yi,j = xi − xj + ηi,j mod m, (i, j) ∈ Ω, (27) where the additive noise ηi,j (i > j) are i.i.d. random variables supported on {0, 1, · · · , m − 1}. In what follows, we define P0 (·) to be the distribution of ηi,j , i.e. P0 (y) = P (ηi,j = y) , 0 ≤ y < m. For instance, the random corruption model (19) is a special case of (27) with the noise distribution ( π0 + 1−π0 , if y = 0; P0 (y) = 1−π0 m if y = 1, · · · , m − 1. m , (28) (29) To simplify notation, we set P0 (y) = P0 (y mod m) for all y ∈ / {0, · · · , m − 1} throughout the paper. Unless otherwise noted, we take ηj,i = −ηi,j for all (i, j) ∈ Ω, and restrict attention to the class of symmetric noise distributions obeying P0 (y) = P0 (m − y) , y = 1, · · · , m − 1, (30) which largely simplifies the exposition. 8 Theorem 2 continues to hold if we replace 0.99 with any other constant between 0 and 1. that the model studied in [MNS14] is an SBM with 2n vertices with n vertices belonging to each cluster. Therefore, the threshold chacterization [MNS14, Proposition 2.9] should read p   σ n/2 n(p − q)2 →0 exp − p−q 4σ 2 p p when applied to our setting, with σ := p(1 − q) + q(1 − p) ≈ 1/2. 9 Note 8 3.2.1 Key metrics The feasibility of accurate recovery necessarily depends on the noise distribution or, more precisely, the distinguishability of the output distributions {yi,j } given distinct inputs. In particular, there are m distributions {Pl }0≤l<m that we’d like to emphasize, where Pl (·) represents the distribution of yi,j conditional on xi − xj = l. Alternatively, Pl is also the l-shifted distribution of the noise ηi,j given by  Pl (y) := P(yi,j = y | xi − xj = l) = P ηi,j = y − l . (31) Here and below, we write a − b and a − b mod m interchangeably whenever it is clear from the context, and adopt the cyclic notation cl = cl+m (l ∈ Z) for any quantity taking the form cl . We would like to quantify the distinguishability of these distributions via some distance metric. One candidate is the Kullback–Leibler (KL) divergence defined by X Pi (y) , 0 ≤ i, l < m, (32) KL (Pi k Pl ) := Pi (y) log y Pl (y) which plays an important role in our main theory. 3.2.2 Performance guarantees We now proceed to the main findings. To simplify matters, we shall concern ourselves primarily with the kind of noise distributions obeying the following assumption. Assumption 1. m miny P0 (y) is bounded away from 0. Remark 6. When m = O(1), one can replace m miny P0 (y) with miny P0 (y) in Assumption 1. However, if m is allowed to scale with n—which is the case in Section 3.4—then the prefactor m cannot be dropped. In words, Assumption 1 ensures that the noise density is not exceedingly lower than the average density 1/m at any point. The reason why we introduce this assumption is two-fold. To begin with, this enables us to preclude the case where the entries of L—or equivalently, the log-likelihoods—are too wild. For instance, if P0 (y) = 0 for some y, then log P0 (y) = −∞, resulting in computational instability. The other reason is to simplify the analysis and exposition slightly, making it easier for the readers. We note, however, that this assumption is not crucial and can be dropped by means of a slight modification of the algorithm, which will be detailed later. Another assumption that we would like to introduce is more subtle: Assumption 2. KLmax /KLmin is bounded, where KLmin := min KL (P0 k Pl ) 1≤l<m KLmax := max KL (P0 k Pl ) . and 1≤l<m (33) Roughly speaking, Assumption 2 states that the mutual distances of the m possible output distributions {Pl }1≤l≤m lie within a reasonable dynamic range, so that one cannot find a pair of them that are considerably more separated than other pairs. Alternatively, it is understood that the variation of the log-likelihood ratio, as we will show later, is often governed by the KL divergence between the two corresponding distributions. From this point of view, Assumption 2 tells us that there is no submatrix of L that is significantly more volatile than the remaining parts, which often leads to enhanced stability when computing the power iteration. With these assumptions in place, we are positioned to state our main result. It is not hard to see that Theorem 1 is an immediate consequence of the following theorem. Theorem 3. Fix m > 0, and assume pobs > c1 log n/n and µt > c2 /σ2 (L) for some sufficiently large constants c1 , c2 > 0. Under Assumptions 1-2, there exist some absolute constants 0 < ρ, ν < 1 such that with probability tending to one as n scales, the iterates of Algorithm 1 with the input matrix (6) or (11) obey MCR(z (t) , x) ≤ νρt , ∀t ≥ 0, (34) provided that10 KLmin ≥ 10 Theorem 4.01 log n . npobs 3 remains valid if we replace 4.01 by any other constant in (4,∞). 9 (35) Remark 7. Alternatively, Theorem 3 can be stated in terms of other divergence metrics like the squared Hellinger distance H2 (·, ·). Specifically, Theorem 3 holds if the minimum squared Hellinger distance obeys H2min := min H2 (P0 , Pl ) > 1≤l<m 1.01 log n , npobs (36) p P p where H2 (P, Q) := 21 y ( P (y) − Q(y))2 . We will see later in Lemma 3 that KLmin ≈ 4H2min , which justifies the equivalence between (35) and (36). The recovery condition (35) is non-asymptotic, and takes the form of a minimum KL divergence criterion. This is consistent with the understanding that the hardness of exact recovery often arises in differentiating minimally separated output distributions. Within at most O(log n) projected power iterations, the PPM returns an estimate with absolutely no error, as soon as the minimum KL divergence exceeds some threshold. This threshold can be remarkably small when pobs is large or, equivalently, when we have many pairwise measurements available. Theorem 3 accommodates a broad class of noise models. Here we highlight a few examples to illustrate its generality. To begin with, it is self-evident that the random corruption model belongs to this class with KLmax /KLmin = 1. Beyond this simple model, we list two important families which satisfy Assumption 2 and which receive broad practical interest. This list, however, is by no means exhaustive. (1) A class of distributions that obey KLmin = KL (P0 k P1 ) or KLmin = KL (P0 k P−1 ) . (37) This says that the output distributions are the closest when the two corresponding inputs are minimally separated. (2) A class of unimodal distributions that satisfy P0 (0) ≥ P0 (1) ≥ · · · ≥ P0 (bm/2c) . (38) This says that the likelihood decays as the distance to the truth increases. Lemma 1. Fix m > 0, and suppose Assumption 1 holds. Then the noise distribution satisfying either (37) or (38) obeys Assumption 2. Proof. See Appendix B. 3.2.3 Why Algorithm 1 works? We pause here to gain some insights about Algorithm 1 and, in particular, why the minimum KL divergence has emerged as a key metric. Without loss of generality, we assume x1 = · · · = xn = 1 to simplify the presentation. Recall that Algorithm 1 attempts to find the constrained principal component of L. To enable successful recovery, one would naturally hope the structure of the data matrix L to reveal much information about the truth. In the limit of large samples, it is helpful to start by looking at the mean of Li,j , which is given by   E[Li,j ]α,β = pobs Ey∼P0 log Pα−β (y)     Pα−β (y) + pobs Ey∼P0 log P0 (y) = pobs Ey∼P0 log P0 (y) = pobs [−KLα−β − H(P0 )] (39) P for any i 6= j and 1 ≤ α, β ≤ m; here and throughout, H (P0 ) := − y P0 (y) log P0 (y) is the entropy functional, and KLl := KL (P0 k Pl ) , 10 0 ≤ l < m. (40) We can thus write  0 K   E [L] = pobs    K .. . 0 .. . ··· K with K ∈ Rm×m denoting a circulant matrix  −KL0 −KLm−1   −KL1 −KL0 K :=   .. ..  . . −KLm−1 ··· | {z ··· .. . .. . −KL1 ··· .. . 0 K  K ..  .    K  0 (41) −KL1  −KL2 .. .    − H (P0 ) 1 · 1> .   (42) −KL0 } :=K 0 It is easy to see that the largest entries of K lie on the main diagonal, due to the fact that −KL0 = 0 and − KLl = −KL(P0 k Pl ) < 0 (1 ≤ l < m). Consequently, for any column of E[L], knowledge of the largest entries in each block reveals the relative positions across all {xi }. Take the 2nd column of E[L] for example: all but the first blocks of this column attain the maximum values in their 2nd entries, telling us that x2 = · · · = xn . Given the noisy nature of the acquired data, one would further need to ensure that the true structure stands out from the noise. This hinges upon understanding when L can serve as a reasonably good proxy for E[L] in the (projected) power iterations. Since we are interested in identifying the largest entries, the signal contained in each block—which is essentially the mean separation between the largest and second largest entries—is of size pobs min Ey∼P0 [log P0 (y) − log Pl (y)] = pobs min KLl = pobs KLmin . 1≤l<m 1≤l<m The total signal strength is thus given by npobs KLmin . In addition, the variance in each measurement is bounded by (a) max Vary∼P0 [log P0 (y) − log Pl (y)] 1≤l<m . max KLl = KLmax , 1≤l<m where the inequality (a) will be demonstrated later in Lemma 3. From the semicircle law, the perturbation can be controlled by p  kL − E [L]k = O npobs KLmax , (43) where k · k is the spectral norm. This cannot exceed the size of the signal, namely, p npobs KLmin & npobs KLmax . This condition reduces to KLmin & 1 npobs under Assumption 2, which is consistent with Theorem 3 up to some logarithmic factor. 3.2.4 Optimality The preceding performance guarantee turns out to be information theoretically optimal in the asymptotic regime. In fact, the KL divergence threshold given in Theorem 3 is arbitrarily close to the information limit, a level below which every procedure is bound to fail in a minimax sense. We formalize this finding as a converse result: 11 Theorem 4. Fix m > 0. Let {Pl,n : 0 ≤ l < m}n≥1 be a sequence of probability measures supported on a finite set Y, where inf y∈Y,n,p Pl,n (y) is bounded away from 0. Suppose that there exists 1 ≤ l < m such that KL (P0,n k Pl,n ) = min KL (P0,n k Pj,n ) := KLmin,n 1≤j<m for all sufficiently large n, and that pobs > c0 log n n for some sufficiently large constant c0 > 0. If KLmin,n < 11 3.99 log n , npobs (44) then the minimax probability of error inf max x̂ xi ∈[m],1≤i≤n P (MCR (x̂, x) > 0 | x) → 1, as n → ∞, (45) where the infimum is over all possible estimators and x is the vector representation of {xi } as usual. 3.3 Extension: removing Assumption 1 We return to Assumption 1. As mentioned before, an exceedingly small P0 (y) might result in unstable loglikelihoods, which suggests we regularize the data before running the algorithm. To this end, one alternative is to introduce a little more entropy to the samples so as to regularize the noise density, namely, we add a small level of random noise to yield ( yi,j , with probability 1 − ς, ind. ỹi,j = (46) Unif (m) , else, for some appropriate small constant ς > 0. The distribution of the new data ỹi,j given xi − xj = l is thus given by P̃l ← (1 − ς)Pl + ςUnif (m) , (47) which effectively bumps min P0 (y) up to (1 − ς) min P0 (y) + ς/m. We then propose to run Algorithm 1 using the new data {ỹi,j } and {P̃l }, leading to the following performance guarantee. Theorem 5. Take ς > 0 to be some sufficiently small constant, and suppose that Algorithm 1 operates upon {ỹi,j } and {P̃l }. Then Theorem 3 holds without Assumption 1. Proof. See Appendix A. 3.4 Extension: large-m case So far our study has focused on the case where the alphabet size m does not scale with n. There are, however, no shortage of situations where m is so large that it cannot be treated as a fixed constant. The encouraging news is that Algorithm 1 appears surprisingly competitive for the large-m case as well. Once again, we begin with the random corruption model, and our analysis developed for fixed m immediately applies here. Theorem 6. Suppose that m & log n, m = O(poly(n)), and pobs ≥ c1 log2 n/n for some sufficiently large constant c1 > 0. Then Theorem 1 continues to hold with probability at least 0.99, as long as (23) is replaced by c3 π0 > √ (48) npobs for some universal constant c3 > 0. Here, 0.99 is arbitrary and can be replaced by any constant between 0 and 1. 11 Theorem 4 continues to hold if we replace 3.99 with any other constant between 0 and 4. 12 The main message of Theorem 6 is that the error correction capability of the proposed method improves as the number n of unknowns grows. The quantitative bound (48) implies successful recovery even when an overwhelming fraction of the measurements are corrupted. Notably, when m is exceedingly large, Theorem 6 might shed light on the continuous joint alignment problem. In particular, there are two cases worth emphasizing: • When m  n (e.g. m & n10 ), the random corruption model converges to the following continuous spike model as n scales: ( xi − xj mod 1, with prob. π0 , xi ∈ [0, 1), 1 ≤ i ≤ n and yi,j = (i, j) ∈ Ω. (49) Unif(0, 1), else, This coincides with the setting studied in [Sin11, WS13] over the orthogonal group SO(2), under the name of synchronization [LYS16, Bou16, BBV16]. It has been shown that the leading √ eigenvector of a certain data matrix becomes positively correlated with the truth as long as π0 > 1/ n when pobs = 1 [Sin11]. In addition, a generalized power method—which is equivalent to projected gradient descent— provably converges to the solution of the nonconvex least-squares estimation, as long as the size of the noise is below some threshold [LYS16, Bou16]. When it comes to exact recovery, Wang et al. prove that semidefinite relaxation succeeds as long as π0 > 0.457 [WS13, Theorem 4.1], a constant threshold irrespective of n. In contrast, the exact recovery performance of our approach—which operates over a lifted discrete space rather than SO(2)—improves with n, allowing π0 to be arbitrarily small when n is sufficiently large. On the other hand, the model (49) is reminiscent of the more general robust PCA problem [CLMW11, CSPW11], which consists in recovering a low-rank matrix when a fraction of observed entries are corrupted. We have learned from the literature [GWL+ 10, CJSC13] that perfect reconstruction is feasible and tractable even though a dominant portion of the observed entries may suffer from random corruption, which is consistent with our finding in Theorem 6. • In the preceding spike model, the probability density of each measurement experiences an impulse around the truth. In a variety of realistic scenarios, however, the noise density might be more smooth rather than being spiky. Such smoothness conditions can be modeled by enforcing P0 (z)  P0 (z + 1) √ for all z, so as to rule out any sharp jump. To satisfy this condition, we can at most take m  npobs in view of Theorem 6. In some sense, this uncovers the “resolution” of our estimator under the “smooth” noise model: if we constrain the input domain to be the unit interval by letting xi = 1, · · · , m represent 1 , · · · , m−1 the grid points 0, m m , respectively, then the PPM can recover each variable up to a resolution of 1 1 √ . m npobs (50) Notably, the discrete random corruption model has been investigated in prior literature [HG13,CGH14], with the best theoretical support derived for convex programming. Specifically, it has been shown by [CGH14] 2 n that convex relaxation is guaranteed to work as soon as π0 & √log npobs . In comparison, this is more stringent than the recovery condition (48) we develop for the PPM by some logarithmic factor. Furthermore, Theorem 6 is an immediate consequence of a more general result: Theorem 7. Assume that m & log n, m = O(poly(n)), and pobs > c1 log5 n/n for some sufficiently large constant c1 > 0. Suppose that L is replaced by Ldebias when computing the initial guess z (0) and µ ≥ √ c3 m/σm Ldebias for some sufficiently large constant c3 > 0. Then Theorem 3 continues to hold with probability exceeding 0.99, provided that (35) is replaced by KL2min max1≤l<m log for some universal constant c3 > 0. Here, constant in between 0 and 1. log P0 Pl P0 Pl 1 13 := 2 ≥ c3 npobs (51) 1 P y log P0 (y) Pl (y) , and 0.99 can be replaced by any Some brief interpretations of (51) are in order. As discussed before, the quantity KLmin represents the strength of the signal. In contrast, the term maxl log matrix Li,j ; to be more precise, P0 Pl 2 controls the variability of each block of the data 1 h i 2 E kLi,j − E [Li,j ]k . max 1≤l<m log P0 Pl 2 1 as we will demonstrate in the proof. Thus, the left-hand side of (51) can be regarded as the signal-to-noiseratio (SNR) experienced in each block Li,j . The recovery criterion is thus in terms of a lower threshold on the SNR, which can be vanishingly small in the regime considered in Theorem 7. We note that the general alignment problem has been studied in [BCSZ14] as well, although the focus therein is to show the stability of semidefinite relaxation in the presence of random vertex noise. We caution, however, that the performance guarantees presented in this subsection are in general not information-theoretically optimal. For instance, it has been shown in [CSG16] that the MLE succeeds as long as s log n π0 & mnpobs in the regime where m  npobs / log n; that is, the performance of the MLE improves as m increases. It is noteworthy that none of the polynomial algorithms proposed in prior works achieves optimal scaling in m. It remains to be seen whether this arises due to some drawback of the algorithms, or due to the existence of some inherent information-computation gap. 4 Numerical experiments This section examines the empirical performance of the projected power method on both synthetic instances and real image data. While the statistical assumptions (i.e. the i.i.d. noise model) underlying our theory typically do not hold in practical applications (e.g. shape alignment and graph matching), our numerical experiments show that the PPM developed based on our statistical models enjoy favorable performances when applied to real datasets. 4.1 Synthetic experiments To begin with, we conduct a series of Monte Carlo trials for various problem sizes under the random corruption model (19). Specifically, we vary the number n of unknowns, the input corruption rate 1 − π0 , and the alphabet size m, with the observation rate set to be pobs = 1 throughout. For each (n, π0 , m) tuple, 20 Monte Carlo trials are conducted. In each trial, we draw each xi uniformly at random over [m], generate a set of measurements {yi,j }1≤i,j≤n according to (19), and record the misclassification rate MCR(x̂, x) of Algorithm 1. The mean empirical misclassification rate is then calculated by averaging over 20 Monte Carlo trials. Fig. 1 depicts the mean empirical misclassification rate when m = 2, 10, 20, and accounts for two choices of the scaling factors: (1) µt ≡ 10/σ2 (L), and (2) µt ≡ ∞. In particular, the solid lines locate the asymptotic phase transitions for exact recovery predicted by our theory. In all cases, the empirical phase transition curves come closer to the analytical prediction as the problem size n increases. Another noise model that we have studied numerically is a modified Gaussian model. Specifically, we set m = 5, 9, 15, and the random noise ηi,j is generated in such a way that   z2 m−1 m−1 P {ηi,j = z} ∝ exp − 2 , − ≤z≤ , (52) 2σ 2 2 where σ controls the flatness of the noise density. We vary the parameters (σ, n, m), take pobs = 1, and experiment on two choices of scaling factors µt ≡ 20/σm (L) and µt ≡ ∞. The mean misclassification rate of the PPM is reported in Fig. 2, where the empirical phase transition matches the theory very well. 14 0.95 0.85 1% 0.1% theory 0.01% 0.65 100 400 700 1000 10% 0.9 1% 0.1% 0.85 theory 0.01% 0.8 0 100 number of variables: n (m =2) 700 1000 1% 0.1% 0.75 theory 0.01% 400 700 1000 input corruption rate: 1-π 0 0.95 10% 0.65 100 10% 1% 0.9 0.1% theory 0.01% 0.85 100 0 0.9 1% 0.1% 0.85 theory 0.01% 100 400 700 1000 0 50% 0.95 10% 1% 0.9 0.1% theory 0.01% 0.85 100 0 number of variables: n (m =10) m = 2, µt = ∞ 1000 m = 20, µt = 10/σ2 (L) 10% number of variables: n (m =2) 700 50% 0.8 0 400 number of variables: n (m =20) m = 10, µt = 10/σ2 (L) 0.95 0.85 50% 0.95 number of variables: n (m =10) m = 2, µt = 10/σ2 (L) input corruption rate: 1-π 0 400 input corruption rate: 1-π 0 0.75 50% input corruption rate: 1-π 0 10% input corruption rate: 1-π 0 input corruption rate: 1-π 0 0.95 400 700 1000 0 number of variables: n (m =20) m = 10, µt = ∞ m = 20, µt = ∞ 50% 2.0 10% 1.8 1% 1.6 1.4 0.1% theory 0.01% 1.0 100 400 700 1000 0 2.0 0.1% 0.01% 1.1 100 2.0 1.8 1% 1.6 1.4 0.1% theory 0.01% 1.0 number of variables: n (m =5) m = 5, µt = ∞ 1000 0 standard dev of Gaussian density standard dev of Gaussian density 10% 700 700 1000 0 3.5 10% 3.0 1% 2.5 2 0.1% theory 1.5 0.01% 3.8 100 10% 2.5 1% 2.0 0.1% theory 0.01% 1.1 100 400 700 number of variables: n (m =9) m = 9, µt = ∞ 700 1000 1000 0 3.8 3.5 10% 3.0 1% 2.5 2 0.1% theory 1.5 0.01% 100 400 700 1000 number of variables: n (m =15) m = 15, µt = ∞ Figure 2: The empirical mean misclassification rate of Algorithm 1 under the modified Gaussian model. 15 0 m = 15, µt = 20/σm (L) 3.0 1.5 400 number of variables: n (m =15) m = 9, µt = 20/σm (L) 2.2 400 400 3.8 number of variables: n (m =9) m = 5, µt = 20/σm (L) 100 theory 1.5 number of variables: n (m =5) 1.2 1% 2.5 standard dev of Gaussian density 1.2 3.0 standard dev of Gaussian density 2.2 standard dev of Gaussian density standard dev of Gaussian density Figure 1: The empirical mean misclassification rate of Algorithm 1 under the random corruption model. 0 0.9 0.9 0.8 0.8 Cumulative distribution Cumulative distribution Figure 3: The performance of the PPM on a Chair dataset of n = 50 shapes: (left) the first 20 input shapes; (right) the first 20 shapes after alignment. 0.7 0.6 0.5 0.4 0.3 PPM SDP 0.2 0.1 0 5° 10° 15° 0.7 0.6 0.5 0.4 0.3 0.1 0 20° Absolute angular estimation error PPM SDP 0.2 5° 10° 15° 20° Absolute angular estimation error Figure 4: The cumulative distributions of the absolute angular estimation errors on: (left) the Plane dataset, and (right) the Chair dataset. 4.2 Joint shape alignment Next, we return to the motivating application—i.e. joint image/shape alignment—of this work, and validate the applicability of the PPM on two datasets drawn from the ShapeNet repository [CFG+ 15]: (a) the Chair dataset (03001627), and (b) the Plane dataset (02691156). Specifically, n = 50 shapes are taken from each dataset, and we randomly sample 8192 points from each shape as input features. Each shape is rotated in the x-z plane by a random continuous angle θi ∈ [0, 360◦ ). Since the shapes in these datasets have high quality and low noise, we perturb the shape data by adding independent Gaussian noise N (0, 0.22 ) to each coordinate of each point and use the perturbed data as inputs. This makes the task more challenging; for instance, the resulting SNR on the Chair dataset is around 0.945 (since the mean square values of each coordinate of the samples is 0.0378). To apply the projected power method, we discretize the angular domain [0, 360◦ ) by m = 32 points, so that xi = j (1 ≤ j ≤ 32) represents an angle θi = j360◦ /32. Following the procedure adopted in12 [HSG13], we compute the pairwise cost (i.e. −`(zi , zj )) using some nearest-neighbor distance metric; to be precise, we set −`(zi , zj ) as the average nearest-neighbor squared distance between the samples of the ith and jth shapes, z zi after they are rotated by 32 360◦ and 32j 360◦ , respectively. Such pairwise cost functions have been widely used in computer graphics and vision, and one can regard it as assuming that the average nearest-neighbor distance follows some Gaussian distribution. Careful readers might remark that we have not specified {yi,j } in this experiment. Practically, oftentimes we only have access to some pairwise potential/cost functions rather than {yi,j }. Fortunately, all we need to run the algorithm is `(zi , zj ), or some proxy of `(zi , zj ). Fig. 3 shows the first 20 representative shapes before and after joint alignment in the Chair dataset. As one can see, the shapes are aligned in a reasonably good manner. More quantitatively, Fig. 4 displays the cumulative distributions of the absolute angular estimation errors for both datasets. We have also reported in Fig. 4 the performance of semidefinite programming (SDP)—that is, the MatchLift algorithm presented in [CGH14]. Note that the angular errors are measured as the distance to the un-discretized angles {θi }, and are hence somewhat continuous. We see that for the PPM, 70% (resp. 44%) of the estimates on the 12 https://github.com/huangqx/map_synchronization/ 16 Plane (resp. Chair) dataset have an error of 5.5◦ or lower, while the proportion is 48% (resp. 44%) for the SDP formulation. Recall that the resolution of the discretization is 360◦ /32 ≈ 11◦ , which would mean that all estimates with an error less than 5.5◦ are, in some sense, perfect recoveries. Computationally, it takes around 2.4 seconds to run the PPM, while SDP (implemented using the alternating direction method of multipliers (ADMM)) runs in 895.6 seconds. All experiments are carried out on a MacBook Pro equipped with a 2.9 GHz Intel Core i5 and 8GB of memory. 4.3 Joint graph matching The PPM is applicable to other combinatorial problems beyond joint alignment. We present here an example called joint graph matching [KLM+ 12, HG13, CGH14, PKS13, GBM16, SHSS16]. Consider a collection of n images each containing m feature points, and suppose that there exists one-to-one correspondence between the feature points in any pair of images. Many off-the-shelf algorithms are able to compute feature correspondence over the points in two images, and the joint matching problem concerns the recovery of a collection of globally consistent feature matches given these noisy pairwise matches. To put it mathematically, one can think of the ground truth as n permutation matrices {Xi ∈ Rm×m }1≤i≤n each representing the feature mapping between an image and a reference, and the true feature correspondence over the ith and jth images can be represented by Xi Xj> . The provided pairwise matches between the features of two images are encoded by Li,j ∈ Rm×m , which is a noisy version of Xi Xj> . The goal is then to recover {Xi }—up to some global permutation—given a set of pairwise observations {Li,j }. See [HG13, CGH14] for more detailed problem formulations as well as theoretical guarantees for convex relaxation. This problem differs from joint alignment in that the ground truth Xi is an m × m permutation matrix. In light of this, we make two modifications to the algorithm: (i) we maintain the iterates Z t = [Zit ]1≤i≤n as nm × m matrices and replace P∆ by PΠ (·) that projects each Zit ∈ Rm×m to the set of permutation matrices (via the Jonker-Volgenant algorithm [JV87]), which corresponds to hard rounding (i.e. µt = ∞) in power iterations (ii) the initial guess Z (0) ∈ Rnm×m is taken to be the projection of a random column block of L̂ (which is the rank-m approximation of L). We first apply the PPM on two benchmark image datasets: (1) the CMU House dataset13 consisting of n = 111 images of a house, and (2) the CMU Hotel dataset14 consisting of n = 101 images of a hotel. Each image contains m = 30 feature points that have been labeled consistently across all images. The initial pairwise matches, which are obtained through the Jonker-Volgenant algorithm, have mismatching rates of 13.36% (resp. 12.94%) for the House (resp. Hotel) dataset. Our algorithm allows to lower the mismatching rate to 3.25% (resp. 4.81%) for House (resp. Hotel). Some representative results from each dataset are depicted in Fig. 5. Next, we turn to three shape datasets: (1) the Hand dataset containing n = 20 shapes, (2) the Fourleg dataset containing n = 20 shapes, and (3) the Human dataset containing n = 18 shapes, all of which are drawn from the collection SHREC07 [GBP07]. We set m = 64, m = 96, and m = 64 feature points for Hand, Fourleg, and Human datasets, respectively, and follow the shape sampling and pairwise matching procedures described in [HG13]15 . To evaluate the matching performance, we report the fraction of output matches whose normalized geodesic errors (see [KLM+ 12, HG13]) are below some threshold , with  ranging from 0 to 0.25. For the sake of comparisons, we plot in Fig. 6 the quality of the initial matches, the matches returned by the projected power method, as well as the matches returned by semidefinite relaxation [HG13, CGH14]. The computation runtime is reported in Table 1. The numerical results demonstrate that the projected power method is significantly faster than SDP, while achieving a joint matching performance as competitive as SDP. 5 Preliminaries and notation Starting from this section, we turn attention to the analyses of the main results. Before proceeding, we gather a few preliminary facts and notations that will be useful throughout. 13 http://vasc.ri.cmu.edu/idb/html/motion/house/ 14 http://vasc.ri.cmu.edu//idb/html/motion/hotel/index.html 15 https://github.com/huangqx/CSP_Codes 17 (a) initial pairwise matches (CMU House) (b) optimized matches (CMU House) (c) initial pairwise matches (CMU Hotel) (d) optimized matches (CMU Hotel) Figure 5: Comparisons between the input matches and the outputs of the PPM on the CMU House and Hotel datasets, with 3 representative images shown for each dataset. The yellow dots refer to the manually labeled feature points, while the green (resp. red) lines represent the set of matches consistent (resp. inconsistent) with the ground truth. fraction of correspondences fraction of correspondences 0.8 0.7 0.6 0.5 0.4 inputs output (projected power method) output (SDP) 0.3 0.2 0.1 0 1 1 0.9 0.9 0.8 0.7 0.6 0.5 0.4 inputs output (projected power method) output (SDP) 0.3 0.2 fraction of correspondences 1 0.9 0.05 0.1 0.15 0.2 0 0.25 geodesic error threshold ǫ 0 0.05 0.1 0.15 0.2 0.25 0.6 0.5 0.4 inputs output (projected power method) output (SDP) 0.3 0.2 0 0 0.05 0.1 0.15 0.2 0.25 geodesic error threshold ǫ geodesic error threshold ǫ (a) Hand 0.7 0.1 0.1 0 0.8 (b) Fourleg (c) Human Figure 6: The fraction of correspondences whose normalized geodesic errors are smaller than some threshold . SDP PPM Hand 455.5 sec 35.1 sec Fourleg 1389.6 sec 76.8 sec Human 368.9 sec 40.8 sec Table 1: Runtime of SDP (implemented using ADMM) and the PPM on 3 benchmark datasets, when carried out on a MacBook Pro equipped with a 2.9 GHz i5 and 8GB of memory. 18 v + (0.5, 0.5) (0, 1) v Draw graphs (1, 0) v + (0.5, 0.5) (0, 1) (0, 1) v µv v (1, 0) (a) (1, 0) (0, 1) Page 11 (b) µv (a) For any v, P∆ (v) = Figure 7: Illustration of Facts 2-3 on a two-dimensional standard simplex. P∆ (v + 0.5 · 1); (b) for an vector v ∈ R2 obeying v1 > v2 , one has P∆ (µv) = e1 when µ is sufficiently v large. (1, 0) 5.1 Projection onto the standard simplex Page 11 Firstly, our algorithm involves projection onto the standard simplex ∆. In light of this, we single out several elementary facts concerning ∆ and P∆ as follows. Here and throughout, kak is the `2 norm of a vector a. √ > Fact 1. Suppose that a = [a1 , · · · , am ] obeys a + el ∈ ∆ for some 1 ≤ l ≤ m. Then kak ≤ 2. P Proof. The feasibility condition requires 0 ≤ i:i6=l ai = −al ≤ 1 and ai ≥ 0 for all i 6= l. Therefore, it is P P P easy to check that i:i6=l a2i ≤ i:i6=l ai ≤ 1, and hence kak2 = a2l + i:i6=l a2i ≤ 2. Fact 2. For any vector v ∈ Rm and any value δ, one has P∆ (v) = P∆ (v + δ1) . (53) Proof. For any x ∈ ∆, kv + δ1 − xk2 = kv − xk2 + δ 2 k1k2 + 2δ(v − x)> 1 = kv − xk2 + δ 2 n + 2δ(v > 1 − 1). Hence, P∆ (v + δ1) = arg minx∈∆ kv + δ1 − xk2 = arg minx∈∆ kv − xk2 = P∆ (v). Fact 3. For any non-zero vector v = [vi ]1≤i≤m , let v(1) and v(2) be its largest and second largest entries, respectively. Suppose vj = v(1) . If µ > 1/(v(1) − v(2) ), then P∆ (µv) = ej . (54) Proof. By convexity of ∆, we have P∆ (µv) = ej if and only if, for any x = [xi ]1≤i≤m ∈ ∆, (x − ej )> (µv − ej ) ≤ 0. P P Since x> v = xj v(1) + i:i6=j xi vi ≤ xj v(1) + v(2) i:i6=j xi = xj v(1) + v(2) (1 − xj ), we see that (x − ej )> (µv − ej ) ≤ (1 − xj )(1 − µ(v(1) − v(2) )) ≤ 0. In words, Fact 2 claims that a global offset does not alter the projection P∆ (·), while Fact 3 reveals that a large scaling factor µ results in sufficient separation between the largest entry and the remaining ones. See Fig. 7 for a graphical illustration. 19 5.2 Properties of the likelihood ratios Next, we study the log-likelihood ratio statistics. The first result makes a connection between the KL divergence and other properties of the log-likelihood ratio. Here and below, for any two distributions P and Q P supported on Y, the total variation distance between them is defined by TV (P, Q) := 12 y∈Y |P (y) − Q(y)|. Lemma 2. (1) Consider two probability distributions P and Q over a finite set Y. Then p 2KL (P k Q) Q(y) 2TV (P, Q) log ≤ ≤ . P (y) min {P (y) , Q (y)} min {P (y) , Q (y)} (2) In addition, if both maxy∈Y P (y) Q(y) ≤ κ0 and maxy∈Y " Ey∼P P (y) log Q(y) 2 # Q(y) P (y) (55) ≤ κ0 hold, then ≤ 2κ20 KL (Q k P ) . (56) Proof. See Appendix C. In particular, when KL (P k Q) is small, one almost attains equality in (56), as stated below. Lemma 3. Consider two probability distributions P and Q on a finite set Y such that P (y) and Q(y) are both bounded away from zero. If KL (P k Q) ≤ ε for some 0 < ε < 1, then one has   1 + ζ1 (ε) P (y) Vary∼P log KL (P k Q) = (57) 2 Q (y) 1 + ζ2 (ε) KL(P k Q), 4 √ where ζ1 and ζ2 are functions satisfying |ζ1 (ε)|, |ζ2 (ε)| ≤ c0 ε for some universal constant c0 > 0. and H2 (P, Q) = (58) Proof. See Appendix D. 5.3 Block random matrices Additionally, the data matrix L is assumed to have independent blocks. It is thus crucial to control the fluctuation of such random block matrices, for which the following lemma proves useful. Lemma 4. Let M := [Mi,j ]1≤i,j≤n be any random symmetric block matrix, where {Mi,j ∈ Rm×m | i ≥ j} are independently generated. Suppose that m = O (poly(n)), E [Mi,j ] = 0, maxi,j kMi,j k ≤ K, and P {Mi,j = 0} = pobs for some pobs & log n/n. Then with probability exceeding 1 − O(n−10 ), kM k √ . K npobs . (59) Proof. See Appendix E. Lemma 4 immediately leads to an upper estimate on the fluctuations of L and Ldebias . P (y) Lemma 5. Suppose m = O(poly (n)), and define log PP0l := y log PP0l (y) . If pobs & log n/n, then with 1  debias −10 , the matrices L and L given respectively in (6) and (11) satisfy probability exceeding 1 − O n  X  m−1 1 P0 √ debias debias kL − E[L]k = L − E[L ] . log npobs . (60) l=1 m Pl 1 Proof. See Appendix F. 20 5.4 Other notation For any vector h = [hi ]1≤i≤n ∈ Rmn with hi ∈ Rm , we denote by hi,j the jth component of hi . For any m × n matrix A = [ai,j ]1≤i≤m,1≤j≤n and any matrix B, the Kronecker product A ⊗ B is defined as  a1,1 B  .. A ⊗ B :=  . am,1 B 6  a1,n B  .. . . am,n B ··· .. . ··· Iterative stage We establish the performance guarantees of our two-stage algorithm in a reverse order. Specifically, we demonstrate in this section that the iterative refinement stage achieves exact recovery, provided that the initial guess is reasonably close to the truth. The analysis for the initialization is deferred to Section 7. 6.1 Error contraction This section mainly consists of establishing the following claim, which concerns error contraction of iterative refinement in the presence of an appropriate initial guess. Theorem 8. Under the conditions of Theorem 3 or Theorem 7, there exist some absolute constants 0 <  ρ, c1 < 1 such that with probability exceeding 1 − O n−5 , n o 2 kP∆n (µLz) − xk∗,0 ≤ ρ min kz − xk∗,0 , kz − xk (61) holds simultaneously for all z ∈ ∆n obeying16   KLmin kz − xk kz − xk∗,0 , ≤ 0.49 , min kxk kxk∗,0 KLmax provided that µ> (62) c5 npobs KLmin (63) for some sufficiently large constant c5 > 0. At each iteration, the PPM produces a more accurate estimate as long as the iterates {z (t) } stay within a reasonable neighborhood surrounding x. Here and below, we term this neighborhood a basin of attraction. In fact, if the initial guess z (0) successfully lands within this basin, then the subsequent iterates will never jump out of it. To see this, observe that for any z (t) obeying KLmin kz (t) − xk ≤ 0.49 kxk KLmax or kz (t) − xk∗,0 KLmin ≤ 0.49 , kxk∗,0 KLmax the inequality (61) implies error contraction kz (t+1) − xk∗,0 ≤ ρkz (t) − xk∗,0 . 2 Moreover, since kxk∗,0 = kxk = n, one has z (t+1) − x kxk∗,0 ( ∗,0 < min 16 The ∗,0 kxk∗,0 ( ≤ min z (t) − x z (t) − x kxk∗,0 ∗,0 , z (t) − x 2) 2 kxk z (t) − x , kxk ) ≤ 0.49 KLmin , KLmax numerical constant 0.49 is arbitrary and can be replaced by any other constant in between 0 and 0.5. 21 precluding the possibility that z (t+1) leaves the basin. As a result, invoking the preceding theorem iteratively we arrive at kz (t) − xk∗,0 ≤ ρt kz (0) − xk∗,0 , indicating that the estimation error reduces to zero within at most logarithmic iterations.     Remark 8. In fact, the contraction rate ρ can be as small as O npobs1KLmin = O log1 n in the scenario   2 considered in Theorem 3 or O maxl log PP0l /(npobs KL2min ) in the case studied in Theorem 7. 1 Furthermore, we emphasize that Theorem 8 is a uniform result, namely, it holds simultaneously for all z within the basin, regardless of whether z is independent of the data {yi,j } or not. Consequently, the theory and the analyses remain valid for other initialization schemes that can produce a suitable first guess. The rest of the section is thus devoted to establishing Theorem 8. The proofs for the two scenarios—the fixed m case and the large m case—follow almost identical arguments, and hence we shall merge the analyses. 6.2 Analysis We outline the key steps for the proof of Theorem 8. Before continuing, it is helpful to introduce additional assumptions and notation that will be used throughout. From now on, we will assume xi = e1 for all 1 ≤ i ≤ n without loss of generality. We shall denote h = {hi } 1≤i≤n ∈ Rnm and w = {wi } 1≤i≤n ∈ Rnm as h := z − x w := Lz, and (64) and set k := khk∗,0 ;  := k∗ := (65) khk khk = √ ; kxk n    khk2 min khk∗,0 , kxk∗,0 = min k, 2 n . kxk2 (66) (67) One of the key metrics that will play an important role in our proof is the following separation measure S (a) := min (a1 − al ) 2≤l≤m (68) defined for any vector a = [al ]1≤l≤m ∈ Rm . This metric is important because, by Fact 3, the projection of a block µwi onto the standard simplex ∆ returns the correct solution—that is, P∆ (µwi ) = e1 —as long as S (wi ) > 0 and µ is sufficiently large. As such, our aim is to show that the vector w given in (64) obeys S (wi ) > 0.01npobs KLmin ∀i ∈ I ⊆ {1, · · · , n}, (69) for some index set I of size |I| ≥ n − ρk ∗ , where 0 < ρ < 1 is bounded away from 1 (which will be specified later). This taken collectively with Fact 3 implies P∆ (µwi ) = xi = e1 for every i ∈ I and, as a result, X kP∆n (µw) − xk∗,0 ≤ kP∆ (µwi ) − xi k0 = n − |I| i∈I /   khk2 ≤ ρk ∗ = ρ min khk∗,0 , kxk ∗,0 , kxk2 provided that the scaling factor obeys µ > 100/(npobs KLmin ). We will organize the proof of the claim (69) based on the size / block sparsity of h, leaving us with two separate regimes to deal with: 22 • The large-error regime in which  ξ < min  k KLmin ,  ≤ 0.49 ; n KLmax (70) • The small-error regime in which  min  k ,  ≤ ξ. n (71) Here, one can take ξ > 0 to be any (small) positive constant independent of n. In what follows, the input matrix L takes either the original form (6) or the debiased form (11). The version (7) tailored to the random corruption model will be discussed in Section 6.4. (1) Large-error regime. Suppose that z falls within the regime (70). In order to control S (wi ), we decompose w = Lz into a few terms that are easier to work with. Specifically, setting n 1X h := hi n i=1 L̃ := L − E [L] , and (72) we can expand   w = Lz = E [L] + L̃ (x + h) = E [L] x + E [L] h + L̃x + L̃h. {z } | {z } | (73) :=r :=t This allows us to lower bound the separation for the ith component by S (wi ) = S (ti + ri ) ≥ S (ti ) + S (ri ) = S (ti ) + min (ri,1 − ri,l ) ≥ S (ti ) − 2kri k∞ . 2≤l≤m (74) With this in mind, attention naturally turns to controlling S (ti ) and kri k∞ . The first quantity S (ti ) admits a closed-form expression. From (42) and (73) one sees that X  ti = pobs Kxj = pobs (n − 1) Ke1 . j:j6=i It is self-evident that S (Ke1 ) = KLmin , giving the formula S (ti ) = pobs (n − 1) S (Ke1 ) = pobs (n − 1) KLmin . (75) We are now faced with the problem of estimating kri k∞ . To this end, we make the following observation, which holds uniformly over all z residing within this regime: Lemma 6. Consider the regime (70). Suppose m = O(poly(n)), pobs & log n/n, and KL2max n 1 m Pm−1 l=1 log P0 Pl o2 > c2 npobs (76) 1 for some sufficiently large constant c2 > 0. With probability exceeding 1 − O(n−10 ), the index set     k I := 1 ≤ i ≤ n kri k∞ ≤ npobs KLmax min ,  + αnpobs KLmax (77) n  has cardinality exceeding n − ρk ∗ for some 0 < ρ < 1 bounded away from 1, where k ∗ = min k, 2 n and α > 0 is some arbitrarily small constant. In particular, if m is fixed and if Assumption 1 holds, then (76) can be replaced by KLmax > for some sufficiently large constant c4 > 0. 23 c4 npobs (78) Proof. See Appendix G. Combining Lemma 6 with the preceding bounds (74) and (75), we obtain   k S (wi ) ≥ (n − 1) pobs KLmin − 2npobs KLmax min ,  − 2αnpobs KLmax (79) n > 0.01npobs KLmin (80) k KLmin for all i ∈ I as given in (77), provided that (i) min n ,  ≤ 0.49 KL , (ii) KLmax /KLmin is bounded, (iii) α max is sufficiently small, and (iv) n is sufficiently large. This concludes the treatment for the large-error regime. (2) Small-error regime. We now turn to the second regime obeying (71). Similarly, we find it convenient to decompose w as w = Lx + Lh = |{z} Lx + E [L] h + L̃h. (81) | {z } :=s :=q We then lower bound the separation measure by controlling si and qi separately, i.e. S (wi ) ≥ S (si ) + S (qi ) ≥ S (si ) − 2 kqi k∞ . (82) We start by obtaining uniform control over the separation of all components of s: Lemma 7. Suppose that Assumption 1 holds and that pobs > c0 log n/n for some sufficiently large constant c0 > 0 . (1) Fix m > 0, and let ζ > 0 be any sufficiently small constant. Under Condition (35), one has S (si ) > ζnpobs KLmin , 1≤i≤n (83) with probability exceeding 1 − C6 exp {−c6 ζ log(nm)} − c7 n−10 , where C6 , c6 , c7 > 0 are some absolute constants. (2) There exist some constants c4 , c5 , c6 > 0 such that S (si ) > c4 npobs KLmin , −10 −10 with probability 1 − O m n KL2min h max0≤l<m Vary∼P0 log P0 (y) Pl (y)  1≤i≤n (84) , provided that i≥ c5 log (mn) npobs n c6 maxl,y log and KLmin ≥ P0 (y) Pl (y) o log (mn) npobs . (85) Proof. See Appendix H. The next step comes down to controlling kqi k∞ . This can be accomplished using similar argument as for Lemma 6, as summarized below. Lemma 8. Consider the regime (71). Then Lemma 6 continues to hold if r is replaced by q. Remark 9. Notably, Lemma 8 does not rely on the definition of the small-error regime. Putting the inequality (82) and Lemma 8 together yields   k S (wi ) ≥ S (si ) − 2npobs KLmax min ,  − 2αnpobs KLmax n ≥ S (si ) − 2(ξ + α)npobs KLmax   KLmax npobs KLmin ≥ S (si ) − 2(ξ + α) KLmin (86) (87) (88) for all i ∈ I with high probability, where (87) follows from the definition of the small-error regime. Recall that KLmax /KLmin is bounded according to Assumption 2. Picking ξ and α to be sufficiently small constants and applying Lemma 7, we arrive at (69). To summarize, we have established the claim (69)—and hence the error contraction—as long as (a) m is fixed and Condition (35) is satisfied, or (b) the conditions (76) and (85) hold. Interestingly, one can simplify Case (b) when pobs & log5 n/n, leading to a matching condition to Theorem 7. 24 Lemma 9. Suppose m & log n, m = poly(n), and pobs ≥ c6 log5 n/n for some sufficiently large constant c6 > 0. The inequalities (76) and (85) hold under Condition (51) in addition to Assumptions 1-2. Proof. See Appendix I. 6.3 Choice of the scaling factor µ So far we have proved the result under the scaling factor condition (63) given in Theorem 8. To conclude the analysis for Theorem 3 and Theorem 7, it remains to convert it to conditions in terms of the singular value σi (·). To begin with, it follows from (41) that L = E [L] + (L − E[L]) = pobs 11> ⊗ K − pobs In ⊗ K + (L − E[L]), leading to an upper estimate σi (L) ≤ σi (pobs 11> ⊗ K) + kpobs In ⊗ Kk + kL − E[L]k = npobs σi (K) + pobs kKk + kL − E[L]k. (89) Since K is circulant, its eigenvalues are given by λl = with j = √ Xm−1 i=0  2πil (−KLi − H(P0 )) exp j m −1. In fact, except for λ0 , one can simplify   Xm−1 2πil λl = − KLi exp j , i=0 m  , 0≤l<m 1 ≤ l < m, which are eigenvalues of K 0 (see (42)) as well. This leads to the upper bounds r Xm−1 λ2j ≤ kK 0 kF ≤ mKLmax . mKLmin , σ2 (K) ≤ j=1 s r r 1 Xm−1 2 1 m2 KL2max σm (K) ≤ λj ≤ kK 0 k2F ≤ j=1 m−1 m−1 m−1 √ √ ≤ 2mKLmax . mKLmin , (90) (91) where both (90) and (91) follow from Assumption 2. In addition, it is immediate to see that (89) and (91) 1 remain valid if we replace L with Ldebias and take K = pobs E[Ldebias ] (i 6= j) instead. i,j To bound the remaining terms on the right-hand side of (89), we divide into two separate cases: (i) When m is fixed, it follows from (42) that kKk ≤ kK0 k + mH (P0 ) ≤ mKLmax + m log m = O(1). When combined with Lemma 5, this yields  1 Xm−1 P0 pobs kKk + kL̃k . pobs + log l=1 m Pl p . pobs + npobs KLmax ,  √ npobs 1 (92) where the last inequality follows from (159). Putting this together with (89) and (90) and using Assumption 2, we get p σ2 (L) . npobs mKLmin + pobs + npobs KLmax  npobs KLmin . (93) Thus, one would satisfy (63) by taking µ ≥ c12 /σ2 (L) for some sufficiently large c12 > 0. 25 (ii) When m = O(poly(n)), we consider Ldebias and set K = Pm−1 1 ≤m Ldebias log PP0l , thus indicating that i,j l=1 1 debias ]. pobs E[Li,j According to (146), one has 1   pobs kKk = E Ldebias i,j ≤ P0 1 Xm−1 log l=1 m Pl . (94) 1 This together with Lemma 5 gives  X m−1 P0 1 log pobs kKk + kLdebias − E[Ldebias ]k . l=1 m Pl   X m−1 P0 1 √ log npobs . npobs KLmin  l=1 m Pl 1  (1 + √ npobs ) (95) 1 (96) under the condition (51). Combine all of this to derive  √ √ σm Ldebias . mnpobs KLmin + npobs KLmin  mnpobs KLmin ,  √ thus justifying (63) as long as µ ≥ c12 m/σm Ldebias for some sufficiently large constant c12 > 0. 6.4 Consequences for random corruption models Having obtained the qualitative behavior of the iterative stage for general models, we can now specialize it to the random corruption model (19). Before continuing, it is straightforward to compute two metrics:   1−π0 0 π0 + 1−π 1 − π0 1 − π0 m m log + log KLmin = KLmax = π0 + 1−π 0 0 m m π0 + 1−π m m = π0 log and log P0 Pl 1 + (m − 1) π0 ; 1 − π0 = 2 log 1−π0 m 1−π0 m π0 + 1 = 2 log 1 + (m − 1) π0 . 1 − π0 1. When m is fixed and π0 is small, it is not hard to see that KLmin = KLmax ≈ mπ02 , which taken collectively with (35) leads to (23). 2. When m & log n and m = O (poly (n)), the condition (51) reduces to π02 & 1/(npobs ), which coincides with (48). In fact, one can also easily verify (85) under Condition (48), assuming that pobs & log2 n/n. This improves slightly upon the condition pobs & log5 n/n required in the general theorem. Next, we demonstrate that the algorithm with the input matrix (7) undergoes the same trajectory as the version using (6). To avoid confusion, we shall let Lrcm denote the matrix (7), and set wrcm := Lrcm z. > As discussed before, there are some constants a > 0 and b such that Lrcm i,j = aLi,j + b11 for all (i, j) ∈ Ω, indicating that wircm = awi + b̃i 1, 1 ≤ i ≤ n for some numerical values {b̃i }. In view of Fact 2, the projection P∆ remains unchanged up to global shift. This justifies the equivalence between the two input matrices when running Algorithm 1. Finally, one would have to adjust the scaling factor accordingly. It is straightforward to show that the scaling factor condition (63) can be translated into µ > c5 /(npobs π0 ) when the input matrix (7) is employed. Observe that (89) continues to hold as long as we set K = π0 Im + (1 − π0 ) 11> . We can also verify that √ (97) σ2 (K) = π0 , kKk ≤ 1, and kL − E[L]k . npobs , where the last inequality follows from Lemma 4. These taken collectively with (89) lead to √ σ2 (L) . npobs π0 + pobs π0 + npobs . npobs π0 under the condition (48). This justifies the choice µ & 1/σ2 (L) as advertised. 26 (98) 7 Spectral initialization We come back to assess the performance of spectral initialization by establishing the theorem below. Similar to the definition (18), we introduce the counterpart of `2 distance modulo the global offset as dist(x̂, x) := min kx̂ − shiftl (x)k . 0≤l<m Theorem 9. Fix δ > 0, and suppose that pobs & log n/n. Under Assumptions 1-2, there are some universal constants c1 , c2 , c3 > 0 such that with probability at least 1 − ξ, the initial estimate z (0) of Algorithms 1 obeys dist(z (0) , x) ≤ δkxk MCR(z (0) , x) ≤ δ 2 /2 and (99) in the following scenarios: (i) the random corruption model with m = O(poly(n)), provided that L is given by (7) and that 1 c1 π0 ≥ √ √ ; δ ξ pobs n (100) (iii) the general model with a fixed m, provided that L is given by (6) and that KLmin ≥ c2 1 ; δ 2 ξ pobs n (101) (iii) the general model with m = O(poly(n)), provided that L is replaced by Ldebias (given in (11)) and that KL2min max1≤l<m log P0 Pl 2 ≥ c3 1 . δ 2 ξ pobs n (102) 1 The main reason for the success of spectral initialization is that the low-rank approximation of L (resp. Ldebias ) produce a decent estimate of E [L] (resp. E[Ldebias ]) and, as discussed before, E [L] (resp. E[Ldebias ]) reveals the structure of the truth. In what follows, we will first prove the result for general L, and then specialize it to the three choices considered in the theorem. As usual, we suppose without loss of generality that xi = e1 , 1 ≤ i ≤ n. 1 To begin with, we set K = pobs E[Li,j ] (i 6= j) as before and write L = pobs 11> ⊗ K − pobs In ⊗ K + (L − E[L]), (103) where the first term on the right-hand side of (103) has rank at most m. If we let L̂ be the best rank-m approximation of L, then matrix perturbation theory gives kL̂ − Lk ≤ kpobs 11> ⊗ K − Lk. Hence, the triangle inequality yields kL̂ − pobs 11> ⊗ Kk ≤ kL̂ − Lk + kL − pobs 11> ⊗ Kk ≤ 2kL − pobs 11> ⊗ Kk (i) ≤ 2kpobs In ⊗ Kk + 2kL − E[L]k = 2pobs kKk + 2kL − E[L]k := γL , where (i) follows from (103). This together with the facts rank(L̂) ≤ m and rank(K) ≤ m gives 2 kL̂ − pobs 11> ⊗ Kk2F ≤ 2mkL̂ − pobs 11> ⊗ Kk2 ≤ 2mγL . 27 (104) Further, let K:,1 (resp. 1 ⊗ K:,1 ) be the first column of K (resp. 1 ⊗ K). When ẑ is taken to be a random column of L̂, it is straightforward to verify that   1 2γ 2 E dist2 (ẑ, pobs 1 ⊗ K:,1 ) ≤ kL̂ − pobs 11> ⊗ Kk2F ≤ L , nm n where the expectation is w.r.t. the randomness in picking the column (see Section 2.2). Apply Markov’s inequality to deduce that, with probability at least 1 − ξ, √ 2γL (105) dist (ẑ, pobs 1 ⊗ K:,1 ) ≤ √ . ξn For simplicity of presentation, we shall assume kẑ − pobs 1 ⊗ K:,1 k = dist (ẑ, pobs 1 ⊗ K:,1 ) from now on. We shall pay particular attention to the index set ( ) √ √ 2 2 J := i ∈ [n] kẑi − pobs K:,1 k ≤ √ kẑ − pobs 1 ⊗ K:,1 k = √ dist (ẑ, pobs 1 ⊗ K:,1 ) , δ n δ n which consists of all blocks whose estimation errors are not much larger than the average estimation error. It is easily seen that the set J satisfies |J | ≥ (1 − δ 2 /2) n (106) and hence contains most blocks. This comes from the fact that X 2 2 kẑ − pobs 1 ⊗ K:,1 k ≥ kẑi − pobs K:,1 k i∈J / > (n − |J |) · 2 δ2 n 2 kẑ − pobs 1 ⊗ K:,1 k . which can only happen if (106) holds. The `∞ error in each block can also be bounded by √ 2 kẑi − pobs K:,1 k∞ ≤ kẑi − pobs K:,1 k ≤ √ dist (ẑ, pobs 1 ⊗ K:,1 ) , i ∈ J . δ n (107) If the above `∞ error is sufficiently small for each i ∈ J , then the projection operation recovers the truth for all blocks falling in J . Specifically, adopting the separation measure S (·) as defined in (68), we obtain S (ẑi ) ≥ S (pobs K:,1 ) + S (ẑi − pobs K:,1 ) ≥ pobs S (K:,1 ) − 2kẑi − pobs K:,1 k∞ . If kẑi − pobs K:,1 k∞ ≤ c5 pobs S (K:,1 ) , i∈J (108) for some constant 0 < c5 < 1/2, then it would follow from Fact 3 that (0) zi as long as µ0 > 1 (1−2c5 )pobs S (K:,1 ) . ( = P∆ (µ0 ẑi ) = e1 , i∈J This taken collectively with Fact 1 further reveals that √ p √ dist(z (0) , x) ≤ 2 · n − |J | ≤ δ n = δkxk MCR(z (0) , x) ≤ (n − |J |)/n ≤ δ 2 /2 (109) as claimed. As a result, everything boils down to proving (108). In view of (105) and (107), this condition (108) would hold if p γL ≤ c6 δ ξnpobs S (K:,1 ) (110) for some sufficiently small constant c6 > 0. To finish up, we establish (110) for the three scenarios considered Theorem 9. 28 (i) The random corruption model with L given by (7). Simple calculation gives S (K:,1 ) = π0 , and it √ follows from (97) that γL . npobs . Thus, the condition (110) would hold under the assumption (100). (ii) The general model with fixed√m and with L given by (6). Observe that S (K:,1 ) = KLmin , and recall from (92) that γL . pobs + npobs KLmax . Thus, we necessarily have (110) under the condition (101) and Assumption 2. (iii) The general model with m = O(poly(n)) and with L replaced by Ldebias , in which S (K:,1 ) = KLmin . It has been shown in (96) that  X  m−1 1 P0 √ log npobs . γLdebias . l=1 m Pl 1 As a consequence, we establish (110) under the assumption (102). Finally, repeating the analyses for the scaling factor in Section 6 justifies the choice of µ0 as suggested in the main theorems. This finishes the proof. 8 Minimax lower bound This section proves the minimax lower bound as claimed in Theorem 4. Once this is done, we can apply it to the random corruption model, which immediately establishes Theorem 2 using exactly the same calculation as in Section 6.4. To prove Theorem 4, it suffices to analyze the maximum likelihood (ML) rule, which minimizes the Bayesian error probability when we impose a uniform prior over all possible inputs. Before continuing, we provide an asymptotic estimate on the tail exponent of the likelihood ratio test, which proves crucial in bounding the probability of error of ML decoding. Lemma 10. Let {Pn }n≥1 and {Qn }n≥1 be two sequences of probability measures on a fixed finite set Y, where minn,y Pn (y) and minn,y Qn (y) are both bounded away from 0. Let {yj,n : 1 ≤ j ≤ n}n≥1 be a triangular array of independent random variables such that yj,n ∼ Pn . If we define   Qn (y) 2 µn := KL (Pn k Qn ) and σn := Vary∼Pn log , Pn (y) then for any given constant τ > 0,  X    n 1 Qn (yj,n ) τ 2 µ2 P + µn > τ µn = exp − (1 + on (1)) n 2n log j=1 n Pn (yj,n ) 2σn   1 + on (1) 2 = exp − τ nµn 4 (111) and  P hold as long as µ2n 2 σn  1 Xn Qn (yj,n ) log + µn < −τ µn j=1 n Pn (yj,n ) log n n and µn   τ 2 µ2 = exp − (1 + on (1)) n 2n 2σn   1 + on (1) 2 = exp − τ nµn 4   (112) log n n . Proof. This lemma is a consequence of the moderate deviation theory. See Appendix J. Remark 10. The asymptotic limits presented in Lemma 10 correspond to the Gaussian tail, meaning that some sort of the central limit theorem holds in this regime. 29 We shall now freeze the input to be x1 = · · · = xn = 1 and consider the conditional error probability of the ML rule. Without loss of generality, we assume P0,n and P1,n are minimally separated, namely, KL (P0,n k P1,n ) = KLmin,n . (113) In what follows, we will suppress the dependence on n whenever clear from the context, and let xML represent the ML estimate. We claim that it suffices to prove Theorem 4 for the boundary regime where KLmin  log n npobs and KLmin ≤ 3.99 log n . npobs (114) In fact, suppose instead that the error probability  Pe := P MCR(xML , x) > 0 tends to one in the regime (114) but is bounded away from one when KLmin = o  log n npobs  . Then this indicates 17 that, in the regime (114), one can always add extra noise to yi,j to decrease KLmin while significantly improving the success probability, which results in contradiction. Moreover, when Pn (y) and Qn (y) are both bounded away from 0, it follows from Lemma 3 that   log n log n P1,n (y) KL2min h i  KLmin  Vary∼P0,n log and . (115) P1,n (y) P0,n (y) npobs np obs Vary∼P0,n log P0,n (y) Consider a set V1 = {1, · · · , δn} for some small constant δ > 0. We first single out a subset V2 ⊆ V1 such that the local likelihood ratio score—when restricted to samples over the subgraph induced by V1 —is sufficiently large. More precisely, we take   X P1 (yi,j ) > −2δnpobs KL (P0 k P1 ) ; V2 := i ∈ V1 log j:j∈V1 P0 (yi,j ) P (y ) i,j here and throughout, we set P01 (yi,j / Ω for notational simplicity. Recall that for each i, ) = 1 for any (i, j) ∈ the ML rule favors P1 (resp. xi = 2) against P0 (resp. xi = 1) if and only if X j log P1 (yi,j ) > 0, P0 (yi,j ) which would happen if X j: j∈V1 log P1 (yi,j ) > −2δnpobs KL (P0 k P1 ) and P0 (yi,j ) X j: j ∈V / 1 log P1 (yi,j ) > 2δnpobs KL (P0 k P1 ) . P0 (yi,j ) Thus, conditional on V2 we can lower bound the probability of error by     X P1 (yi,j ) Pe ≥ P ∃i ∈ V2 : log >0   P0 (yi,j ) j   X P1 (yi,j ) ≥ P ∃i ∈ V2 : log > −2δnpobs KL (P0 k P1 )  P0 (yi,j ) j: j∈V1   P1 (yi,j ) and log > 2δnpobs KL (P0 k P1 )  P0 (yi,j ) j: j ∈V / 1     X P1 (yi,j ) = P ∃i ∈ V2 : log > 2δnpobs KL (P0 k P1 ) ,   P0 (yi,j ) X j: j ∈V / 1 ( 17 For instance, we can let ỹi,j = yi,j , Unif (m) , with probability ρ0 with ρ0 controlling the noise level. else 30 (116) where the last identity comes from the definition of V2 . We pause to remark on why (116) facilitates analysis. To begin with, V2 depends only on those samples P P1 (yi,j ) lying within the subgraph induced by V1 , and is thus independent of j ∈V / 1 log P0 (yi,j ) . More importantly, o n P P1 (yi,j ) are statistically independent across all i ∈ V1 as they rely on distinct the scores si := j: j ∈V / 1 log P0 (yi,j ) samples. These allow us to derive that, conditional on V2 , X  Y P1 (yi,j ) (116) = 1 − 1−P log > 2δnpobs KL (P0 k P1 ) j:j ∈V / 1 P0 (yi,j ) i∈V2   |V2 | KLmin 2 (117) ≥ 1 − 1 − exp − (1 + o (1)) (1 + 2δ) npobs 4    KLmin 2 ≥ 1 − exp − |V2 | exp − (1 + o (1)) (1 + 2δ) npobs , (118) 4 where the last line results from the elementary inequality 1 − x ≤ e−x . To see why (117) holds, we note that / V1 : (i, j) ∈ Ω}|) according to the Chernoff bound, the number of samples linking each i and V 1 (i.e. |{j ∈ obs is at most npobs with high probability, provided that (i) np is sufficiently large, and (ii) n is sufficiently log n large. These taken collectively with Lemma 10 and (115) yield X  P1 (yi,j ) P log > 2δnpobs KL (P0 k P1 ) j: j ∈V / 1 P0 (yi,j )   KLmin 2 ≥ exp − (1 + o (1)) (1 + 2δ) npobs , 4 thus justifying (117). To establish Theorem 4, we would need to show that (118) (and hence Pe ) is lower bounded by 1 − o (1) or, equivalently, n o 2 |V2 | exp − (1 + o (1)) (1 + 2δ) npobs KLmin /4 → ∞. This condition would hold if 2 (1 + 2δ) npobs KLmin /4 < (1 − δ) log n (119) |V2 | = (1 − o (1)) |V1 | = (1 − o (1)) δn, (120) and since under the above two hypotheses one has n o 2 |V2 | exp − (1 + 2δ) npobs KLmin /4 ≥ |V2 | exp {− (1 − δ) log n} ≥ δ exp {log n − (1 − δ) log n} ≥ δnδ → ∞. The first condition (119) is a consequence from (44) as long as δ is sufficiently small. It remains to verify the second condition (120). When npobs > c0 log n for some sufficiently large constant c0 > 0, each i ∈ V1 is connected to at least (1 − δ) pobs |V1 | vertices in V1 with high probability, meaning that the number of random variables involved P P1 (yi,j ) in the sum j: j∈V1 log P0 (yi,j ) concentrates around |V1 |pobs . Lemma 10 thus implies that P X  P1 (yi,j ) log ≤ −2δnpobs KL (P0 kP1 ) j: j∈V1 P0 (yi,j ) X  P1 (yi,j ) log ≤ −2|V1 |pobs KL (P0 kP1 ) =P j: j∈V1 P0 (yi,j ) ≤ exp {−c4 (|V1 |pobs ) KLmin } ≤ exp {−c5 (δnpobs ) KLmin } 31 for some constants c4 , c5 > 0, provided that n is sufficiently large. This gives rise to an upper bound X  P1 (yi,j ) log E [|V1 \V2 |] = |V1 | · P ≤ −2δnKL (P0 kP1 ) j: j∈V1 P0 (yi,j ) ≤ δn · exp {−c5 δnpobs KLmin } (i) = δn · n−Θ(δ) = o (n) , where (i) arises from the condition (114). As a result, Markov’s inequality implies that with probability approaching one, |V1 \V2 | = o (n) or, equivalently, |V2 | = (1 − o (1)) δn. This finishes the proof of Theorem 4. 9 Discussion We have developed an efficient nonconvex paradigm for a class of discrete assignment problems. There are numerous questions we leave open that might be interesting for future investigation. For instance, it can be seen from Fig. 1 and Fig. 2 that the algorithm returns reasonably good estimates even when we are below the information limits. A natural question is this: how can we characterize the accuracy of the algorithm if one is satisfied with approximate solutions? In addition, this work assumes the index set Ω of the pairwise samples are drawn uniformly at random. Depending on the application scenarios, we might encounter other measurement patterns that cannot be modeled in this random manner; for example, the samples might only come from nearby objects and hence the sampling pattern might be highly local (see, e.g. [CKST16,GRSY15]). Can we determine the performance of the algorithm for more general sampling set Ω? Moreover, the log-likelihood functions we incorporate in the data matrix L might be imperfect. Further study could help understand the stability of the algorithm in the presence of model mismatch. Returning to Assumption 2, we remark that this assumption is imposed primarily out of computational concern. In fact, KLmax /KLmin being exceedingly large might actually be a favorable case from an information theoretic viewpoint, as it indicates that the hypothesis corresponding to KLmax is much easier to preclude compared to other hypotheses. It would be interesting to establish rigorously the performance of the PPM without this assumption and, in case it becomes suboptimal, how shall we modify the algorithm so as to be more adaptive to the most general class of noise models. Moving beyond joint alignment, we are interested in seeing the potential benefits of the PPM on other discrete problems. For instance, the joint alignment problem falls under the category of maximum a posteriori (MAP) inference in a discrete Markov random field, which spans numerous applications including segmentation, object detection, error correcting codes, and so on [BKR11, RL06, HCG14]. Specifically, consider n discrete variables xi ∈ [m], 1 ≤ i ≤ n. We are given a set of unitary potential functions (or prior distributions) {ψi (xi )}1≤i≤n as well as a collection of pairwise potential functions (or likelihood functions) {ψi,j (xi , xj )}(i,j)∈G over some graph G. The goal is to compute the MAP assignment xMAP := arg max z n Y i=1 ψi (zi ) Y ψi,j (zi , zj ) = arg max z (i,j)∈G  n X  log ψi (zi ) + i=1 X log ψi,j (zi , zj ) (i,j)∈G   . (121)  Similar to (5) and (6), one can introduce the vector zi = ej to represent zi = j, and use a matrix Li,j ∈ Rm×m to encode each pairwise log-potential function log ψi,j (·, ·), (i, j) ∈ G. The unitary potential function ψi (·) can also be encoded by a diagonal matrix Li,i ∈ Rm×m (Li,i )α,α = log ψi (α), 1≤α≤m (122) so that log ψ(zi ) = zi> Li,i zi . This enables a quadratic form representation of MAP estimation: maximizez z > Lz subject to zi ∈ {e1 , · · · , em } , (123) 32 1 ≤ i ≤ n. As such, we expect the PPM to be effective in solving many instances of such MAP inference problems. One of the key questions amounts to finding an appropriate initialization that allows efficient exploitation of the unitary prior belief ψi (·). We leave this for future work. Acknowledgements E. C. is partially supported by NSF via grant DMS-1546206, and by the Math + X Award from the Simons Foundation. Y. C. is supported by the same award. We thank Qixing Huang for motivating discussions about the join image alignment problem. Y. Chen is grateful to Qixing Huang, Leonidas Guibas, and Nan Hu for helpful discussions about joint graph matching. A Proof of Theorem 5 We will concentrate on proving the case where Assumption 1 is violated. Set ymax := arg maxy P0 (y) and ymin := arg miny P0 (y). Since m is fixed, it is seen that P0 (ymax )  1. We also have P0 (ymin ) → 0. Denoting max ) by ν := PP00(y (ymin ) the dynamic range of P0 and introducing the metric d (P k Q) := X y P (y) log P (y) , Q(y) we obtain max d (P0 kPl ) = max l l X P0 (y) log y P0 (y) P0 (ymax )  P0 (ymax ) log  log ν  1. Pl (y) P0 (ymin ) The elementary inequality KL(P k Q) ≤ d(P k Q), together with the second Pinsker’s inequality KL(P k Q)+ p 2KL(P k Q) ≥ d(P k Q) [Tsy08, Lemma 2.5], reveals that KLmax  max d(P0 k Pl )  log ν. l Making use of Assumption 2 we get d(P0 k Pl )  KLmin  KLmax  log ν, 1 ≤ l < m. Next, for each 1 ≤ l < m we single out an element yl := arg maxy P0 (y) log important because, when m is fixed, d(P0 k Pl )  P0 (yl ) log (124) P0 (y) Pl (y) . This element is P0 (yl ) . P0 (yl ) log ν. Pl (yl ) As a result, (124) would only happen if P0 (yl )  1 and P0 (yl ) Pl (yl ) → ∞. We are now ready to prove the theorem. With Pl replaced by P̃l as defined in (47), one has KL P̃0 k P̃l  ≥   1 2 2TV2 P̃0 , P̃l ≥ P̃0 (yl ) − P̃l (yl ) 2 2 P0 (yl ) − Pl (yl )  P02 (yl )  1, which exceeds the threshold 4.01 log n/(npobs ) as long as pobs ≥ c1 log n/n for some sufficiently large constant c1 . In addition, since P̃0 (y) is bounded away from both 0 and 1, it is easy to see that KL P̃0 k P̃l ) . 1 for any l and, hence, Assumption 2 remains valid. Invoking Theorem 3 concludes the proof. 33 B Proof of Lemma 1 (1) It suffices to prove the case where KLmin = KL (P0 k P1 ). Suppose that |P0 (y0 ) − Pl (y0 )| = maxj,y |P0 (y) − Pj (y)| for some 0 ≤ l, y0 < m. In view of Pinsker’s inequality [Tsy08, Lemma 2.5], 2 KL(P0 k P1 ) ≥ 2TV (P0 , P1 ) = 2 = ≥ 1 2 m−1 X m−1 1 X |P0 (y) − P1 (y)| 2 y=0 !2 !2 |P0 (y) − P0 (y − 1)| y=0 1 1 2 |P0 (y0 ) − P0 (y0 − l)| = maxj,y |P0 (y) − Pj (y)|2 . 2 2 (125) In addition, for any 1 ≤ j < m, (a) KL (P0 k Pj ) ≤ χ2 (P0 k Pj ) := X (P0 (y) − Pj (y))2 Pj (y) y (b)  X (P0 (y) − Pj (y)) 2 y (c) . maxj,y |P0 (y) − Pj (y)|2 , (126) where (a) comes from [SV15, Eqn. (5)], (b) is a consequence from Assumption 1, and (c) follows since m is fixed. Combining (125) and (126) establishes KLmin  KLmax . (2) Suppose that P0 (y ∗ ) = miny P0 (y) for y ∗ = bm/2c, and that KL (P0 k Pl ) = KLmin for some 0 < l ≤ y ∗ . Applying Pinsker’s inequality again gives 1 KL (P0 k Pl ) ≥ 2TV (P0 , Pl ) = 2 2 = ≥ 1 2 m−1 X m−1 X !2 |Pl (y) − P0 (y)| y=0 !2 |P0 (y − l) − P0 (y)| y=0  2 dy ∗ /le−1 X 1 |P0 (y ∗ ) − P0 (y ∗ − l)| + P0 (kl) − P0 ((k − 1)l)  2 k=1  ≥ ≥ = 1 |P0 (y ∗ ) − P0 ((dy ∗ /le − 1) l)| + 2 2 dy ∗ /le−1 X P0 (kl) − P0 ((k − 1)l)  (127) k=1 1 1 2 |P0 (y ∗ ) − P0 (0)| = max |P0 (0) − P0 (y)|2 2 2 y 1 max |P0 (y) − Pj (y)|2 , 2 j,y (128) where (127) follows from the unimodality assumption, and the last line results from the facts P0 (0) = maxj,y Pj (y) and P0 (y ∗ ) = minj,y Pj (y). These taken collectively with (126) finish the proof. 34 C Proof of Lemma 2 (1) Since log(1 + x) ≤ x for any x ≥ 0, we get   log 1 + Q (y)  log = log 1 + P (y) ≤ ≤  Q(y)−P (y) , P (y)  P (y)−Q(y) , Q(y) if Q (y) ≥ P (y) (129) else |Q (y) − P (y)| min {P (y) , Q (y)} (130) p 2KL (P k Q) 2TV (P, Q) ≤ , min {P (y) , Q (y)} min {P (y) , Q (y)} (131) where the last inequality comes from Pinsker’s inequality. (2) Using the inequality (130) once again as well as the definition of κ0 , we obtain "  2 # X 2 P (y) P (y) = P (y) log Ey∼P log y Q (y) Q (y) ≤ X y ≤ κ0 Note that 2] P y (Q(y)−P (y))2 Q(y) P (y) X |P (y) − Q(y)|2 |P (y) − Q(y)|2 n o = P (y) Q(y) y min {P 2 (y), Q2 (y)} min Q(y) , P (y) Q(y) (132) X (Q (y) − P (y))2 . y Q(y) (133) is exactly the χ2 divergence between P and Q, which satisfies [Dra00, Proposition χ2 (P k Q) ≤ 2κ0 KL (P k Q) . (134) Substitution into (133) concludes the proof. D Proof of Lemma 3 For notational simplicity, let µ := Ey∼P   P (y) log = KL (P k Q) Q (y) s and σ =   P (y) Vary∼P log . Q (y) We first recall from our calculation in (131) that   √ 2µ |Q (y) − P (y)| |Q (y) − P (y)| √ , ≤ = O( µ), max Q(y) P (y) min {P (y), Q(y)} where the last identity follows since P (y) and Q(y) are all bounded away from 0. Here and below, the √ √ notation f (µ) = O( µ) means |f (µ)| ≤ c0 µ for some universal constant c0 > 0. This fact tells us that P (y) Q(y) √ , ∈ [1 ± O( µ)] , Q(y) P (y) (135) thus indicating that  log Q(y) P (y)   Q(y) − P (y) = log 1 + P (y)  Q(y) − P (y) = +O P (y) Q (y) − P (y) √ = (1 + O ( µ)) . P (y) 35 2 |Q(y) − P (y)| P 2 (y) ! All of this allows one to write " " 2 # 2 # Q (y) − P (y) Q (y) √ 2 2 − µ = (1 + O ( µ)) Ey∼P − µ2 σ = Ey∼P log P (y) P (y) " 2 # Q (y) − P (y) √ (a) = (1 + O ( µ)) Ey∼Q − µ2 Q (y) √ = (1 + O ( µ)) χ2 (P k Q) − µ2 √ = 2 (1 + O ( µ)) µ. Here, (a) arises due to (135), as the difference Q(y)/P (y) can be absorbed into the prefactor 1 + O(µ) by adjusting the constant in O(µ) appropriately. The last line follows since, by [Dra00, Proposition 2],     µ KL (P k Q) Q(y) P (y) 1 1 √ = 2 = 1 + O max max , max = (1 + O ( µ)) . 2 y y χ (P k Q) χ (P k Q) P (y) Q(y) 2 2 Furthermore, it follows from [CSG16, Fact 1] that (4 − log R) H2 (P, Q) ≤ KL (P k Q) ≤ (4 + 2 log R) H2 (P, Q) , n o √  P (y) where R := max maxy Q(y) , maxy Q(y) µ , thus establishing P (y) . In view of (135), it is seen that log R = O (58). E Proof of Lemma 4 It is tempting to invoke the matrix Bernstein inequality [Tro15] to analyze random block matrices, but it loses a logarithmic factor in comparison to the bound advertised in Lemma 4. As it turns out, it would be better to resort to Talagrand’s inequality [Tal95]. The starting point is to use the standard moment method and reduce to the case with independent entries (which has been studied in [Seg00,BvH14]). Specifically, a standard symmetrization argument [Tao12, Section 2.3] gives √ E [kM k] ≤ 2πE [kBk] , (136) where B = [Bi,j ]1≤i,j≤n := [gi,j Mi,j ]1≤i,j≤n is obtained by inserting i.i.d. standard Gaussian variables  {gi,j | i ≥ j} in front of {Mi,j }. In order to upper bound kBk, we further recognize that kBk2p ≤ Tr B 2p for all p ∈ Z. Expanding B 2p as a sum over cycles of length 2p and conditioning on M , we have X       E Tr B 2p | M = E Tr Bi1 ,i2 Bi2 ,i3 · · · Bi2p−1 ,i2p Bi2p i1 | M 1≤i1 ,··· ,i2p ≤n Y   2p Tr Mi1 ,i2 · · · Mi2p ,i1 E gij ,ij+1 X = j=1 1≤i1 ,··· ,i2p ≤n (137) with the cyclic notation i2p+1 = i1 . The summands that are non-vanishing are those in which each distinct  Q2p  edge is visited an even number of times [Tao12], and these summands obey E j=1 gij ,ij+1 ≥ 0. As a result, (137) ≤ X 1≤i1 ,··· ,i2p ≤n m Y 2p j=1  Y  2p kMij ,ij+1 k E gij ,ij+1 . j=1 (138)    We make the observation that the right-hand side of (138) is equal to m · E Tr Z 2p | M , where Z := [gi,j kMi,j k]1≤i,j≤n . Following the argument in [BvH14, Section 2] and setting p = log n, one derives p    1 E Tr Z 2p | M 2p . σ + K 2 log n, 36 where σ := we obtain q maxi P j kMi,j k2 , and K is the upper bound on maxi,j kMi,j k. Putting all of this together, E [kBk | M ] ≤ ≤   1    1 E kBk2p | M 2p ≤ E Tr B 2p | M 2p p    1 1 m 2p · E Tr Z 2p | M 2p . σ + K log n, (139) 1 where the last inequality follows since m log n . 1 as long as m = nO(1) . Combining (136) and (139) and undoing the conditional expectation yield p √   (140) E [kM k] ≤ 2πE [kBk] . E σ + K log n . Furthermore, Markov’s inequality gives P {kM k ≥ 2E [kM k]} ≤ 1/2 and hence p   Median [kM k] ≤ 2E [kM k] . E σ + K log n . (141) Now that we have controlled the expected spectral norm of M , we can obtain concentration results by means of Talagrand’s inequality [Tal95]. See [Tao12, Pages 73-75] for an introduction. Proposition 1 (Talagrand’s inequality). Let Ω = Ω1 × · · · × ΩN and P = µ1 × · · · × µN form a product probability measure. Each Ωl is equipped with a norm k · k, and supxl ∈Ωl kxl k ≤ K holds for all 1 ≤ l ≤ N . qP N 2 Define d (x, y) := l=1 kxl − yl k for any x, y ∈ Ω, and let f : Ω → R be a 1-Lipschitz convex function with respect to d (·, ·). Then there exist some absolute constants C, c > 0 such that  P {|f (x) − Median [f (x)]| ≥ λK} ≤ C exp −cλ2 , ∀λ. (142) Let Ω1 , · · · , ΩN represent the sample spaces for M1,1 , · · · , Mn,n , respectively, and take k · k to be the spectral norm. Clearly, for any M , M̃ ∈ Rnm×nm , one has rX  kM k − kM̃ k ≤ kM − M̃ k ≤ kMi,j − M̃i,j k2 := d M , M̃ . i≤j Consequently, Talagrand’s inequality together with (141) implies that with probability 1 − O(n−11 ), p p kM k . Median [kM k] + K log n . E [σ] + K log n. (143) Finally, if P {Mi,j = 0} = pobs for some pobs & log n/n, then the Chernoff bound when combined with the union bound indicates that X X kMi,j k2 ≤ K 2 I {Mi,j = 0} . K 2 npobs , 1≤i≤n j with probability 1 − O n j  −10 , which in turn gives  √  p √ E [σ] . 1 − O n−10 K 2 npobs + O n−10 K n . K npobs . This together with (143) as well as the assumption pobs & log n/n concludes the proof. F Proof of Lemma 5 The first step is to see that   L − E [L] = Ldebias − E Ldebias , where Ldebias is a debiased version of L given in (11). This can be shown by recognizing that X X 1> Li,j 1 = ` (zi = α, zj = β; yi,j ) = log P (ηi,j = yi,j − (α − β)) 1≤α,β≤m =m m−1 X 1≤α,β≤m log P (ηi,j = z) z=0 37 for any i 6= j, which is a fixed constant irrespective of yi,j . The main advantage to work with Ldebias is that each entry of Ldebias can be written as a linear combination of the log-likelihood ratios. Specifically, for any 1 ≤ α, β ≤ m, Ldebias i,j  α,β = m−1 1 X log Pl (yi,j ) m `(zi = α, zj = β; yi,j ) − l=0 = 1 m log Pα−β (yi,j ) − m−1 X log Pα−β+l (yi,j ) l=0 m−1 m−1 1 X Pα−β (yi,j ) 1 X P0 (yi,j − α + β) log = log . m Pα−β+l (yi,j ) m Pl (yi,j − α + β) = l=1 (144) l=1 is circulant, its spectral norm is bounded by the `1 norm of any of its column: Since Ldebias i,j Ldebias i,j ≤ m X Ldebias i,j  ≤ α,1 α=1 = m−1 m 1 XX P0 (yi,j − α + 1) log m Pl (yi,j − α + 1) α=1 (145) l=1 m−1 m m−1 1 XX P0 (y) 1 X P0 log ≤ log m Pl (y) m Pl y=1 l=1 l=1 . (146) 1 To finish up, apply Lemma 4 to arrive at kL − E[L]k = . debias L − E[L m−1 1 X P0 log m Pl l=1 G  debias max kLdebias k i,j i,j ] . ! √ npobs .  √ npobs 1 Proofs of Lemma 6 and Lemma 8 (1) Proof of Lemma 6. In view of (73), for each 1 ≤ i ≤ n one has kri k∞ E [L] h ≤ ∞ + kgi k , (147) where g := L̃z. In what follows, we will look at each term on the right-hand side of (147) separately. • The 1st term on the right-hand side of (147). The feasibility constraint zi , xi ∈ ∆ implies 1> hj = 0, 1 which enables us to express the ith block of f := pobs E[L]h as fi = X Khj = j:j6=i X K 0 hj , j:j6=i > with K 0 defined in (42). By letting hj,\1 := [hj,2 , · · · , hj,m ] and denoting by K:,l (resp. Kl,: ) the lth column (resp. row) of K, we see that   X X 0  0  fi = K:,1 hj,1  + K 0 . (148) hj,\1 j:j6=i j:j6=i Recall from the feasibility constraint that hj,1 ≤ 0 and hj,\1 ≥ 0. Since K 0 is a non-positive matrix, one sees that the first term on the right-hand side of (148) is non-negative, whereas the second term is 38 non-positive. As a result, the lth entry of fi —denoted by fi,l —is bounded in magnitude by   X X 0  0  0 hj,1  + Kl,: |fi,l | = Kl,1 hj,\1 j:j6=i j:j6=i    X 0  X 0 0 · ≤ max |Kl,1 | |hj,1 |, Kl,: hj,\1   j:j6=i j:j6=i     X X ≤ max KLmax |hj,1 | , KLmax 1> hj,\1   j:j6=i j:j6=i X = KLmax |hj,1 | , j:j6=i where the last identity arises since 1> hj,\1 = −hj,1 . Setting n   1X h = hi 1≤i≤m := hi , n i=1 we obtain kfi k∞ ≤ KLmax Xn j=1 |hj,1 | = nKLmax h1 ≤ nKLmax khk∞ . If we can further prove that  h ∞ ≤ min  k ,  , n (149) then we will arrive at the upper bound  kE [L] hk∞ = kpobs fi k∞ ≤ npobs KLmax khk∞ ≤ npobs KLmax min  k , . n (150) To see why (149) holds, we observe that (i) the constraint zi ∈ ∆ implies |hi,l | ≤ 1, revealing that h ∞ k 1 Xn 1 |hi,l | ≤ khk∗,0 = , i=1 1≤l≤m n n n ≤ max and (ii) by Cauchy-Schwarz, h ∞ = 1  Im n ··· Im  h ∞ ≤  1 √ n · khk = . n • It remains to bound the 2nd term on the right-hand side of (147). Making use of Lemma 5 gives ( m−1 ) √ 1 X P0 √ kgk ≤ kL̃k kzk . log npobs n (151) m Pl 1 l=1  −10 with probability 1 − O n . Let kgk(1) ≥ kgk(2) ≥ · · · ≥ kgk(n) denote the order statistics of kg1 k, · · · , kgn k. Then, for any 0 < ρ < 1, n P o2 m−1 1 ρk∗ n2 pobs m log PP0l X l=1 1 1 1 kgk2(ρk∗ ) ≤ ∗ kgk2(i) ≤ ∗ kgk2 . , (152) ρk i=1 ρk ρk ∗ where k ∗ is defined in (67). In addition, we have k/n ≥ ξ and 2 ≥ ξ 2 for some constant 0 < ξ < 1 in the large-error regime (70), and hence k ∗ = min{k, 2 n} ≥ ξ 2 n. 39 Substitution into (152) yields ( m−1 P0 1 X log kgk(ρk∗ ) . m Pl l=1 ) r ( m−1 pobs P0 1 X n ≤ log ∗ ρk m Pl 1 l=1 )r 1 pobs n . ξ2ρ (153) Consequently, if we denote by I the index set of those blocks gi satisfying )r ( m−1 P0 pobs n 1 X log , kgi k . m Pl 1 ξ2ρ l=1 then one has |I| ≥ n − ρk ∗ . We are now ready to upper bound kri k∞ . For each i ∈ I as defined above, ( m−1   k P0 1 X (147) ≤ npobs KLmax min log , + O n m Pl l=1   k ≤ npobs KLmax min ,  + αnpobs KLmax n for some arbitrarily small constant α > 0, with the proviso that ( m−1 P0 1 X log npobs KLmax ≥ c9 m Pl l=1 )r 1 )r 1 npobs ξ2ρ ! pobs n ξ2ρ (154) (155) for some sufficiently large constant c9 > 0. Since ξ > 0 is assumed to be a fixed positive constant, the condition (155) can be satisfied if we pick n ρ = c5 1 m Pm−1 l=1 log o2 P0 Pl 1 npobs KL2max for some sufficiently large constant c5 > 0. Furthermore, in order to guarantee ρ < 1, one would need KL2max n 1 m Pm−1 l=1 log P0 Pl o2 ≥ c10 pobs n (156) 1 for some sufficiently large constant c10 > 0. It is noteworthy that if m is fixed and if minl,y Pl (y) is bounded away from 0, then     X X P0 P0 (y) − Pl (y) Pl (y) − P0 (y) log ≤ log 1 + + log 1 + (157) Pl 1 Pl (y) P0 (y) y:P0 (y)<Pl (y) y:P0 (y)≥Pl (y) ≤ (a) . 1 minl,y Pl (y) p X |P0 (y) − Pl (y)|  TV (P0 , Pl ) (158) p (159) y KL (P0 kPl ) ≤ KLmax , where (a) comes from Pinsker’s inequality. Thus, in this case (156) would follow if KLmax  1/(npobs ). (2) Proof of Lemma 8. This part can be shown using similar argument as in the proof of Lemma 6. Specifically, from the definition (81) we have   k kqi k∞ ≤ kE [L] hk∞ + kĝi k ≤ npobs KLmax min ,  + kĝi k , (160) n 40 where ĝ := L̃h, and the last inequality is due to (150). Similar to (151) and (152), we get ) ( m−1 √ P0 1 X √ kĝk ≤ kL̃kkhk . log npobs ( n), m Pl 1 l=1 n P o √ √ m−1 P0 1 log ( n) npobs l=1 m P 1 l √ ∗1 kĝk(ρk∗ ) ≤ √ ∗ kĝk  ρk ρk ( m−1 )r (b) 1 X P0 npobs . log , m Pl 1 ρ l=1 where (b) arises since √  n √ k∗ √  n √ k∗ p √ khk (c) 2khk∗,0 √ √ ≤ ≤ 2, if k ≤ 2 n; k k √  n √ = 1, if k > 2 n. 2 n = = Here, (c) results from Fact 1. One can thus find an index set I with cardinality |I| ≥ n − ρk ∗ such that )r ( m−1 npobs P0 1 X log , i ∈ I, (161) kĝi k . m Pl 1 ρ l=1 where the right-hand side of (161) is identical to that of (153). Putting these bounds together and repeating the same argument as in (154)-(159) complete the proof. H Proof of Lemma 7 By definition, for each 1 ≤ i ≤ n one has si,1 − si,l = X log j: (i,j)∈Ω P0 (yi,j ) , Pl−1 (yi,j ) 2 ≤ l ≤ m, which is a sum of independent log-likelihood ratio statistics. The main ingredient to control si,1 − si,l is to establish the following lemma. Lemma 11. Consider two sequences of probability distributions {Pi } and {Qi } on a finite set Y. Generate n independent random variables yi ∼ Pi . (1) For any γ ≥ 0, X   X  n n Pi (yi ) 1 P log ≤ γ ≤ exp − H2 (Pi , Qi ) + γ , (162) i=1 i=1 Qi (yi ) 2 p P p where H2 (Pi , Qi ) := 21 y ( Pi (y) − Qi (y))2 . (2) Suppose that log Qi (yi ) Pi (yi ) ≤ K. If min KL (Pi k Qi ) ≥ c2 ( s 1 Xn 1≤i≤n n i=1  Varyi ∼Pi )  Qi (yi ) K log (mn) log log (mn) + Pi (yi ) n for some sufficiently large constant c2 > 0, then Qi (yi ) Pi (yi )  with probability at least 1 − O m−11 n−11 . Xn i=1 log ≤ 1 − n min KL (Pi k Qi ) 2 1≤i≤n 41 (163) We start from the case where m is fixed. When pobs > c0 log n/n for some sufficiently large c0 > 0, it follows from the Chernoff bound that | {j : (i, j) ∈ Ω} | ≥ (1 − ζ)npobs , 1≤i≤n (164) with probability at least 1 − O(n−10 ), where ζ > 0 is some small constant. Taken together, Lemma 11(1) (with γ set to be 2ζnpobs H2min ), (164), and the union bound give si,1 − si,l > 2ζnpobs H2min , 1 ≤ i ≤ n, 2 ≤ l ≤ m or, equivalently, S (si ) > 2ζnpobs H2min , 1≤i≤n (165)  with probability exceeding 1 − mn exp − (1 − 2ζ) npobs H2min . As a result, (165) would follow with probability at least 1 − exp {−ζ log(mn)} − O(n−10 ), as long as H2min ≥ 1 + ζ log n + log m · . 1 − 2ζ npobs (166) It remains to translate these results into a version based on the KL divergence. Under Assumption 1, it comes from [CSG16, Fact 1] that H2 (P0 , Pl ) and KL (P0 k Pl ) are orderwise equivalent. This allows to rewrite (165) as S (si ) > c5 ζnpobs KLmin , 1≤i≤n (167) for some constant c5 > 0. In addition, Lemma 3 and [CSG16, Fact 1] reveal that  p 1 H2min ≥ 1 − c6 KLmin KLmin and H2min ≥ c8 KLmin 4 for some constants c6 , c8 > 0. As a result, (166) would hold if  √ 1 − c6 KLmin KLmin 1 + ζ log n + log m ≥ · 4 1 − 2ζ npobs 1 + ζ log n + log m or c8 KLmin ≥ · 1 − 2ζ npobs (168) (169) log n When both np and ζ are sufficiently small, it is not hard to show that (168) is a consequence of KLmin ≥ obs 4.01 log n/(npobs ). Finally, the second part (85) of Lemma 7 is straightforward by combining (164), Lemma 11(2), and the union bound. Proof of Lemma 11. (1) For any γ ≥ 0, taking the Chernoff bound we obtain h  i Qn ( n ) Qi (y) 1 X i=1 Ey∼Pi exp 2 log Pi (y) Qi (yi )  P log ≥ −γ ≤ Pi (yi ) exp − 12 γ i=1  Y n  1 = exp γ 1 − H2 (Pi , Qi ) , 2 i=1 where the last identity follows since "s #    Xp 1 Q(y) Q(y) Ey∼P exp log = Ey∼P = P (y)Q(y) 2 P (y) P (y) y p 2  X1 p = P (y) + Q(y) − P (y) − Q(y) = 1 − H2 (P, Q) . 2 y  The claim (83) then follows by observing that 1 − H2 (Pi , Qi ) ≤ exp −H2 (Pi , Qi ) . 42 (2) Taking expectation gives n X   Qi (yi ) Eyi ∼Pi log = −KL(Pi k Qi ). Pi (yi ) i=1 From our assumption log c0 , c1 > 0 such that n  X Qi (yi ) Pi (yi ) ≤ K, the Bernstein inequality ensures the existence of some constants  Qi (yi ) + KL (Pi k Qi ) Pi (yi ) i=1 v u n   uX Qi (yi ) Qi (yi ) t log(mn) ≤ c0 Varyi ∼Pi log log (mn) + c1 max log i P (y ) Pi (yi ) i i i=1 log (170)  with probability at least 1 − O m−11 n−11 . This taken collectively with the assumption v u n   uX Qi (yi ) n min KL (Pi k Qi )  t Varyi ∼Pi log log (mn) + K log (mn) 1≤i≤n Pi (yi ) i=1 establishes (163). I Proof of Lemma 9 To begin with, (76) is an immediate consequence from (51) and Assumption 2. Next, KLmax maxl,y log P0 (y) Pl (y) KLmax ≥ max1≤l<m log (a)  √ P0 Pl (b) log (mn) 1 & . npobs npobs 1 2 where (a) arises from (51) together with Assumption 2, and (b) follows as soon as pobs & log n(mn) . This establishes the second property of (85). Next, we turn to the first condition of (85). If maxy P0 (y) . 1/ log (mn) holds, then we can derive   P0 (y) Vary∼P0 log Pl (y) ≤ X y ≤  2 2 X P0 (y) 1 P0 (y) P0 (y) log . log Pl (y) log (mn) y Pl (y) 1 P0 log log (mn) Pl 2 , which together with (51) implies that KL2min h max0≤l<m Vary∼P0 log P0 (y) Pl (y) i & log (mn) · KL2min max1≤l<m log P0 Pl 2 ≥ c4 log (mn) . npobs 1 log(mn) , which obeys maxy P0 (y)  1/m (y0 ) 0 (y) log(n). Suppose P0 (y0 ) = maxy P0 (y) and PP0l (y = maxj,y P Pj (y) hold for some l and y0 , then 0) (y0 ) the preceding inequality maxy P0 (y)  1/m that PP0l (y ≥ 2. Under Assumption 2, the KL 0) Finally, consider the complement regime in which maxy P0 (y)  as long as m & (171) it follows from divergence is lower bounded by KLmin  KLl & H2 (P0 , Pl ) ≥ 2 p 1 p 1 P0 (y0 ) − Pl (y0 )  P0 (y0 )  . 2 log(mn) 43 Moreover, the assumption m = nO(1) taken collectively with Assumption 1 ensures max log j,y P0 (y) . log n, Pj (y) allowing one to bound   P0 (y) P0 (y) Vary∼P0 log ≤ max log j,y Pl (y) Pj (y) 2 . log2 n. Combining the above inequalities we obtain KL2min h max0≤l<m Vary∼P0 log as long as pobs & J log5 (mn) , n P0 (y) Pl (y) i 1 log2 (mn) 2 log n & 1 log (mn) & , npobs log (mn) 4 as claimed. Proof of Lemma 10 For the sake of conciseness, we will only prove (111), as (112) can be shown using the same argument. We recognize that (111) can be established by demonstrating the moderate deviation principle with respect to Sn = n X (ζi,n − E [ζi,n ]) where ζi,n := log i=1 Qn (yi,n ) Pn (yi,n ) σn . To be precise, the main step is to invoke [MPR+ 09, Theorem 6] to deduce that   √ Sn τ2 an √ > τ = − (1 + on (1)) an log P 2 n (172) for any constant τ > 0, where an := In fact, one can connect the event  P √ n√ Sn an √ >τ n Sn an √ > τ n o  = P = P σn2 . nµ2n (173) with the likelihood ratio test because  n log X  i=1 ( n X Qn (yi,n ) Pn (yi,n ) + µn σn log i=1 This reveals that (172) is equivalent to X  n Qn (yi,n ) P log > (τ − 1) nµn i=1 Pn (yi,n )  µn  >n τ σn  ) Qn (yi,n ) > (τ − 1) nµn Pn (yi,n ) = .   τ 2 µ2 exp − (1 + on (1)) n 2n 2σn (174) √  as claimed in the first identity of (111). Moreover, by Lemma 3, it is seen that 2µn = 1 + O µn σn2 in the regime considered herein, leading to the second identity of (111). Hence, it suffices to prove (172). In order to apply [MPR+ 09, Theorem 6], we need to check that the double indexed sequence {ζi,n − E [ζi,n ] : i ≤ n}n≥1 satisfies the conditions required therein. First of all, the independence assumption gives o n X v 2 := sup Var [ζi,n ] + 2 |Cov (ζi,n , ζj,n )| = sup {Var [ζi,n ]} = 1 < ∞. i,n j>i i,n 44 Second, Var [Sn ] = n Third, it follows from Lemma 2 that Mn := sup |ζi,n | = supi log µ2n 2 σn  log n n i=1 Qn (yi,n ) Pn (yi,n ) Var [ζi,n ] = 1 > 0. n √ √ µn 2µn 1  . min {Pn (yi,n ) , Qn (yi,n )} σn σn ≤ σn i The assumption Pn (175) further gives an = σn2 1  = on (1). 2 nµn log n Moreover, making use of the bound (175) as well as the assumptions nan & Mn2 log4 n σ2 n nµn2 n µn 2 σn 4 · log n = µ3n µ2n 2 σn  log n n and µn & log n n , we derive σn4 σ4 µn n = n4 · & → ∞. 4 µn log4 n log n log5 n With these conditions in place, we can invoke [MPR+ 09, Theorem 6] to establish (172). References [ABH16] E. Abbe, A. Bandeira, and G. Hall. Exact recovery in the stochastic block model. IEEE Transactions on Information Theory, 62(1):471–487, 2016. [AS15] E. Abbe and C. Sandon. Community detection in general stochastic block models: fundamental limits and efficient recovery algorithms. arXiv preprint arXiv:1503.00609, 2015. [BAJK11] J. Berglund, H. Ahlström, L. Johansson, and J. Kullberg. Two-point dixon method with flexible echo times. Magnetic resonance in medicine, 65(4):994–1004, 2011. [BBV16] A. Bandeira, N. Boumal, and V. Voroninski. On the low-rank approach for semidefinite programs arising in synchronization and community detection. arXiv preprint arXiv:1602.04426, 2016. [BCSZ14] A. S. Bandeira, M. Charikar, A. Singer, and A. Zhu. Multireference alignment using semidefinite programming. In Conference on Innovations in Theoretical Computer Science, pages 459–470, 2014. [BDG+ 16] G. Brito, I. Dumitriu, S. Ganguly, C. Hoffman, and L. V. Tran. Recovery and rigidity in a regular stochastic block model. In Symposium on Discrete Algorithms, pages 1589–1601, 2016. [BKR11] A. Blake, P. Kohli, and C. Rother. Markov random fields for vision and image processing. Mit Press, 2011. [BNS16] S. Bhojanapalli, B. Neyshabur, and N. Srebro. Global optimality of local search for low rank matrix recovery. arXiv preprint arXiv:1605.07221, 2016. [Bou16] N. Boumal. Nonconvex phase synchronization. arXiv preprint arXiv:1601.06114, 2016. [BvH14] A. Bandeira and R. van Handel. Sharp nonasymptotic bounds on the norm of random matrices with independent entries. arXiv preprint arXiv:1408.6185, 2014. [CC17] Y. Chen and E. Candes. Solving random quadratic systems of equations is nearly as easy as solving linear systems. Communications on Pure and Applied Mathematics, 70(5):822 – 883, May 2017. 45 [CFG+ 15] A. 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. arXiv preprint arXiv:1512.03012, 2015. [CGH14] Y. Chen, L. J. Guibas, and Q.-X. Huang. Near-optimal joint object matching via convex relaxation. International Conference on Machine Learning (ICML), pages 100 – 108, 2014. [CGT12] K. Chaudhuri, F. C. Graham, and A. Tsiatas. Spectral clustering of graphs with general degrees in the extended planted partition model. Journal of Machine Learning Research, 23:35–1, 2012. [CJSC13] Y. Chen, A. Jalali, S. Sanghavi, and C. Caramanis. Low-rank matrix recovery from errors and erasures. IEEE Transactions on Information Theory, 59(7):4324–4337, 2013. [CKST16] Y. Chen, G. Kamath, C. Suh, and D. Tse. Community recovery in graphs with locality. International Conference on Machine Learning, June 2016. [CL16] Y. Chi and Y. M. Lu. Kaczmarz method for solving quadratic equations. IEEE Signal Processing Letters, 23(9):1183–1187, 2016. [CLM15] T. Cai, X. Li, and Z. Ma. Optimal rates of convergence for noisy sparse phase retrieval via thresholded Wirtinger flow. arXiv preprint arXiv:1506.03382, 2015. [CLMW11] E. Candès, X. Li, Y. Ma, and J. Wright. Robust principal component analysis? Journal of ACM, 58(3):11:1–11:37, Jun 2011. [CLS15] E. Candes, X. Li, and M. Soltanolkotabi. Phase retrieval via wirtinger flow: Theory and algorithms. Information Theory, IEEE Transactions on, 61(4):1985–2007, 2015. [CO10] A. Coja-Oghlan. Graph partitioning via adaptive spectral techniques. Combinatorics, Probability and Computing, 19(02):227–284, 2010. [CRV15] P. Chin, A. Rao, and V. Vu. Stochastic block model and community detection in the sparse graphs: A spectral algorithm with optimal rate of recovery. arXiv preprint arXiv:1501.05021, 2(4), 2015. [CSG16] Y. Chen, C. Suh, and A. J. Goldsmith. Information recovery from pairwise measurements. IEEE Transactions on Information Theory, 62(10):5881 – 5905, 2016. [CSPW11] V. Chandrasekaran, S. Sanghavi, P. Parrilo, and A. Willsky. Rank-sparsity incoherence for matrix decomposition. SIAM Journal on Optimization, 21(2), 2011. [CSX12] Y. Chen, S. Sanghavi, and H. Xu. Clustering sparse graphs. NIPS, December 2012. [CW15] Y. Chen and M. J. Wainwright. Fast low-rank estimation by projected gradient descent: General statistical and algorithmic guarantees. arXiv preprint arXiv:1509.03025, 2015. p Y. Deshpande and A. Montanari. Finding hidden cliques of size N/e in nearly linear time. Foundations of Computational Mathematics, 15(4):1069–1128, 2015. [DM15] [DMR14] Y. Deshpande, A. Montanari, and E. Richard. Cone-constrained principal component analysis. In Advances in Neural Information Processing Systems, pages 2717–2725, 2014. [Dra00] S. Dragomir. Upper and lower bounds for Csiszár’s f-divergence in terms of the Kullback-Leibler distance and applications. Inequalities for the Csiszár’s f-divergence in Information Theory, 2000. [DSSSC08] J. Duchi, S. Shalev-Shwartz, Y. Singer, and T. Chandra. Efficient projections onto the `1 -ball for learning in high dimensions. In International conference on Machine learning, pages 272–279, 2008. 46 [GBM16] T. Gao, J. Brodzki, and S. Mukherjee. The geometry of synchronization problems and learning group actions. arXiv preprint arXiv:1610.09051, 2016. [GBP07] D. Giorgi, S. Biasotti, and L. Paraboschi. Shape retrieval contest 2007: Watertight models track. SHREC competition, 8, 2007. [GLM16] R. Ge, J. D. Lee, and T. Ma. Matrix completion has no spurious local minimum. arXiv preprint arXiv:1605.07272, 2016. [GRSY15] A. Globerson, T. Roughgarden, D. Sontag, and C. Yildirim. How hard is inference for structured prediction? In International Conference on Machine Learning, pages 2181–2190, 2015. [GV15] O. Guédon and R. Vershynin. Community detection in sparse networks via Grothendieck’s inequality. Probability Theory and Related Fields, pages 1–25, 2015. [GVL12] G. H. Golub and C. F. Van Loan. Matrix computations, volume 3. JHU Press, 2012. [GWL+ 10] A. Ganesh, J. Wright, X. Li, E. Candes, and Y. Ma. Dense error correction for low-rank matrices via principal component pursuit. In International Symposium on Information Theory, pages 1513–1517, 2010. [HB10] M. Hein and T. Bühler. An inverse power method for nonlinear eigenproblems with applications in 1-spectral clustering and sparse pca. In Neural Information Processing Systems, pages 847– 855, 2010. [HCG14] Q. Huang, Y. Chen, and L. Guibas. Scalable semidefinite relaxation for maximum a posterior estimation. International Conference on Machine Learning, 2014. [HG13] Q. Huang and L. Guibas. Consistent shape maps via semidefinite programming. Computer Graphics Forum, 32(5):177–186, 2013. [HKHL10] D. Hernando, P. Kellman, J. Haldar, and Z.-P. Liang. Robust water/fat separation in the presence of large field inhomogeneities using a graph cut algorithm. Magnetic resonance in medicine, 63(1):79–90, 2010. [HSG13] Q.-X. Huang, H. Su, and L. Guibas. Fine-grained semi-supervised labeling of large shape collections. ACM Transactions on Graphics, 32(6):190, 2013. [HWX16] B. Hajek, Y. Wu, and J. Xu. Achieving exact cluster recovery threshold via semidefinite programming. IEEE Transactions on Information Theory, 62(5):2788–2797, 2016. [JCSX11] A. Jalali, Y. Chen, S. Sanghavi, and H. Xu. Clustering partially observed graphs via convex optimization. International Conf. on Machine Learning (ICML), 2011. [JMRT16] A. Javanmard, A. Montanari, and F. Ricci-Tersenghi. Phase transitions in semidefinite relaxations. Proceedings of the National Academy of Sciences, 113(16):E2218–E2223, 2016. [JNRS10] M. Journée, Y. Nesterov, P. Richtárik, and R. Sepulchre. Generalized power method for sparse principal component analysis. Journal of Machine Learning Research, 11(Feb):517–553, 2010. [JNS13] P. Jain, P. Netrapalli, and S. Sanghavi. Low-rank matrix completion using alternating minimization. In ACM symposium on Theory of computing, pages 665–674. ACM, 2013. [JV87] R. Jonker and A. Volgenant. A shortest augmenting path algorithm for dense and sparse linear assignment problems. Computing, 38(4):325–340, 1987. [KLM+ 12] V. G. Kim, W. Li, N. J. Mitra, S. DiVerdi, and T. Funkhouser. Exploring collections of 3d models using fuzzy correspondences. ACM Transactions on Graphics (TOG), 31(4):54, 2012. [KMO10a] R. Keshavan, A. Montanari, and S. Oh. Matrix completion from a few entries. IEEE Transactions on Information Theory, 56(6):2980–2998, 2010. 47 [KMO10b] R. Keshavan, A. Montanari, and S. Oh. Matrix completion from noisy entries. Journal of Machine Learning Research, 99:2057–2078, 2010. [KN11] B. Karrer and M. E. Newman. Stochastic blockmodels and community structure in networks. Physical Review E, 83(1):016107, 2011. [LLSW16] X. Li, S. Ling, T. Strohmer, and K. Wei. Rapid, robust, and reliable blind deconvolution via nonconvex optimization. arXiv preprint arXiv:1606.04933, 2016. [LSJR16] J. D. Lee, M. Simchowitz, M. I. Jordan, and B. Recht. Gradient descent only converges to minimizers. In Conference on Learning Theory, pages 1246–1257, 2016. [LYS16] H. Liu, M.-C. Yue, and A. M.-C. So. On the estimation performance and convergence rate of the generalized power method for phase synchronization. arXiv preprint arXiv:1603.00211, 2016. [Mas14] L. Massoulié. Community detection thresholds and the weak Ramanujan property. In Symposium on Theory of Computing, pages 694–703. ACM, 2014. [MBM16] S. Mei, Y. Bai, and A. Montanari. The landscape of empirical risk for non-convex losses. arXiv preprint arXiv:1607.06534, 2016. [MNS14] E. Mossel, J. Neeman, and A. Sly. Consistency thresholds for binary symmetric block models. Arxiv preprint, 2014. [MPR+ 09] F. Merlevède, M. Peligrad, E. Rio, et al. Bernstein inequality and moderate deviations under strong mixing conditions. In High dimensional probability V: the Luminy volume, pages 273–292. Institute of Mathematical Statistics, 2009. [MWCC17] C. Ma, K. Wang, Y. Chi, and Y. Chen. Implicit regularization in nonconvex statistical estimation: Gradient descent converges linearly for phase retrieval, matrix completion and blind deconvolution. arXiv preprint arXiv:1711.10467, 2017. [NJS13] P. Netrapalli, P. Jain, and S. Sanghavi. Phase retrieval using alternating minimization. In Advances in Neural Information Processing Systems, pages 2796–2804, 2013. [OH11] S. Oymak and B. Hassibi. Finding dense clusters via" low rank+ sparse" decomposition. arXiv preprint arXiv:1104.5186, 2011. [PKB+ 16] D. Park, A. Kyrillidis, S. Bhojanapalli, C. Caramanis, and S. Sanghavi. Provable non-convex projected gradient descent for a class of constrained matrix optimization problems. arXiv preprint arXiv:1606.01316, 2016. [PKS13] D. Pachauri, R. Kondor, and V. Singh. Solving the multi-way matching problem by permutation synchronization. In Advanced in Neural Information Processing Systems (NIPS), 2013. [RL06] P. Ravikumar and J. Lafferty. Quadratic programming relaxations for metric labeling and Markov random field MAP estimation. International Conference on Machine Learning, pages 737–744, 2006. [SBE14] Y. Shechtman, A. Beck, and Y. C. Eldar. GESPAR: Efficient phase retrieval of sparse signals. IEEE transactions on signal processing, 62(4):928–938, 2014. [Seg00] Y. Seginer. The expected norm of random matrices. Combinatorics, Probability and Computing, 9(02):149–166, 2000. [SHSS16] Y. Shen, Q. Huang, N. Srebro, and S. Sanghavi. Normalized spectral map synchronization. In Neural Information Processing Systems (NIPS), 2016. [Sin11] A. Singer. Angular synchronization by eigenvectors and semidefinite programming. Applied and computational harmonic analysis, 30(1):20–36, 2011. 48 [SL15] R. Sun and Z.-Q. Luo. Guaranteed matrix completion via nonconvex factorization. In Symposium on Foundations of Computer Science (FOCS), pages 270–289. IEEE, 2015. [SQW15a] J. Sun, Q. Qu, and J. Wright. Complete dictionary recovery using nonconvex optimization. In Proceedings of the 32nd International Conference on Machine Learning, pages 2351–2360, 2015. [SQW15b] J. Sun, Q. Qu, and J. Wright. When are nonconvex problems not scary? arXiv:1510.06096, 2015. arXiv preprint [SQW16] J. Sun, Q. Qu, and J. Wright. A geometric analysis of phase retrieval. arXiv:1602.06664, 2016. [SV15] I. Sason and S. Verdú. f-divergence inequalities. arxiv preprint arXiv:1508.00335, 2015. [SVV14] H. Si, H. Vikalo, and S. Vishwanath. Haplotype assembly: An information theoretic view. In Information Theory Workshop (ITW), 2014 IEEE, pages 182–186. IEEE, 2014. [Tal95] M. Talagrand. Concentration of measure and isoperimetric inequalities in product spaces. Publications Mathématiques de l’Institut des Hautes Etudes Scientifiques, 81(1):73–205, 1995. [Tao12] T. Tao. Topics in random matrix theory, volume 132. AMS Bookstore, 2012. [TBSR15] S. Tu, R. Boczar, M. Soltanolkotabi, and B. Recht. Low-rank solutions of linear matrix equations via procrustes flow. arXiv preprint arXiv:1507.03566, 2015. [Tro15] J. A. Tropp. An introduction to matrix concentration inequalities. to appear in Foundations and Trends in Machine Learning, 2015. [Tsy08] A. B. Tsybakov. Introduction to nonparametric estimation. Springer Science & Business Media, 2008. [WGE16] G. Wang, G. B. Giannakis, and Y. C. Eldar. Solving systems of random quadratic equations via truncated amplitude flow. Advances in Neural Information Processing Systems, 2016. [WLS12] Z. Wang, W. Li, and Y. Sun. Automated network analysis by projected power method. In International Conference on Information and Automation, pages 626–630. IEEE, 2012. [WS13] L. Wang and A. Singer. Exact and stable recovery of rotations for robust synchronization. Information and Inference, 2013. [YPCC16] X. Yi, D. Park, Y. Chen, and C. Caramanis. Fast algorithms for robust PCA via gradient descent. Advances in Neural Information Processing Systems, 2016. [YZ13] X.-T. Yuan and T. Zhang. Truncated power method for sparse eigenvalue problems. Journal of Machine Learning Research, 14(Apr):899–925, 2013. [ZCB+ 17] T. Zhang, Y. Chen, S. Bao, M. Alley, J. Pauly, B. Hargreaves, and S. Vasanawala. Resolving phase ambiguity in dual-echo dixon imaging using a projected power method. Magnetic Resonance in Medicine, 77(5):2066 – 2076, 2017. [ZCL16] H. Zhang, Y. Chi, and Y. Liang. Provable non-convex phase retrieval with outliers: Median truncated Wirtinger flow. International conference on machine learning, June 2016. [ZL15] Q. Zheng and J. Lafferty. A convergent gradient descent algorithm for rank minimization and semidefinite programming from random linear measurements. In NIPS, pages 109–117, 2015. [ZL16] H. Zhang and Y. Liang. Reshaped Wirtinger flow for solving quadratic systems of equations. Advances in Neural Information Processing Systems, 2016. [ZWL15] T. Zhao, Z. Wang, and H. Liu. Nonconvex low rank matrix factorization via inexact first order oracle. Advances in Neural Information Processing Systems, 2015. 49
7cs.IT
This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which this version may no longer be accessible Dendritic-Inspired Processing Enables BioPlausible STDP in Compound Binary Synapses Xinyu Wu, Student Member, IEEE and Vishal Saxena, Member, IEEE Abstract — Brain-inspired learning mechanisms, e.g. spike timing dependent plasticity (STDP), enable agile and fast on-thefly adaptation capability in a spiking neural network. When incorporating emerging nanoscale resistive non-volatile memory (NVM) devices, with ultra-low power consumption and highdensity integration capability, a spiking neural network hardware would result in several orders of magnitude reduction in energy consumption at a very small form factor and potentially herald autonomous learning machines. However, actual memory devices have shown to be intrinsically binary with stochastic switching, and thus impede the realization of ideal STDP with continuous analog values. In this work, a dendritic-inspired processing architecture is proposed in addition to novel CMOS neuron circuits. The utilization of spike attenuations and delays transforms the traditionally undesired stochastic behavior of binary NVMs into a useful leverage that enables biologicallyplausible STDP learning. As a result, this work paves a pathway to adopt practical binary emerging NVM devices in brain-inspired neuromorphic computing. Index Terms— Brain-Inspired Computing, Crossbar, Neuromorphic Computing, Machine Learning, Memristor, Emerging Non-Volatile Memory, RRAM, Silicon Neuron, SpikeTiming Dependent Plasticity (STDP), Spiking Neural Network. I. INTRODUCTION B rain-inspired neuromorphic computing has been attracting a lot of interest recently; deep neural networks and deep learning are quickly shaping modern computing industry and human society with their outstanding performance in imaging pattern recognition, speech recognition, natural language processing, and autonomous driving and flight. However, while running on modern CPU, GPU or FPGA platforms enabled by the most advanced complementary metaloxide semiconductor (CMOS) technologies, these computing machines are very power hungry and still require several orders of magnitudes higher energy compared to their biological analogs, as well as need specialized programming. Recently, Xinyu Wu and Vishal Saxena are with the Electrical and Computer Engineering Department, University of Idaho, Moscow, ID 83844, USA (email: [email protected]) brain-inspired neuromorphic hardware have demonstrated impressive ultra-low power performance in implementing convolutional neural networks [1] by leveraging massive parallelism and event-driven spiking neural processing techniques. However, it cannot adjust the synaptic weights while in operation; moreover, in view of the foreseeable physical limitations, CMOS based brain-inspired computing integrated circuits (ICs) will not amenable to accommodate a neural network comparable to the level of human cortex in terms of synaptic density and power consumption. In the past decade, the discovery of spike-timing-dependentplasticity (STDP) mechanisms and the emergence of nanoscale non-volatile memory (NVM) devices have opened a new avenue towards the realization of brain-inspired computing. Prior research suggests that STDP can be used to train spiking neural networks (SNNs) with resistive random-access memory (RRAM) synapses in-situ, without trading-off their parallelism [2], [3]. Further, these devices have shown low-energy consumption to change their states and very compact layout footprint [4]–[9]. Hybrid CMOS-RRAM analog very-largescale integrated (VLSI) circuits have been proposed [10], [11] [20, 21] to achieve dense integration of CMOS neurons and emerging devices for neuromorphic system-on-a-chip (NeuSoC). Fig.1a illustrates a NeuSoC architecture where a three layer fully-connected spiking neural network is envisioned. Here, the input layer encodes the real-valued inputs into spatiotemporal spike patterns, and the subsequent layers process these inputs using STDP-based unsupervised or semisupervised learning [12]–[18]. The neurons in each of the layers are connected to the higher layers using synapses that hold the ‘weights’ of the SNN. As shown in Fig.1b, an NVM crossbar array is used to form synaptic connections between the two layers of neurons. The spiking neurons in the second and higher layers implement competitive learning using a winner-take-all shared bus mechanism where the neuron that spikes first for an input pattern, inhibits the rest of the neurons in the same layer [37]. Using a combination of STDP and WTA-based learning rules, the synapses are locally updated through the interaction of pre- and post-synaptic neuron spikes (Fig.1c) that results in network learning in the form of the fine-grained weight (or conductance) adaptation in the synapses. The presented This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which 2 this version may no longer be accessible. Output Output Layer Backward spike Labels Output Neurons Spikes Hidden Layer Spikes Input Layer (a) Forward spike Synaptic Crossbar Array Input data patterns (b) Input Neurons WTA bus Pre-synaptic Multi-bit Post-synaptic Synapse Neuron Neuron (c) Input Neurons Data Flow Array1 Crossbar Array Hidden Neurons (d) Output Neurons Array2 Fig.1. Envisioned Neuromorphic SoC architecture: (a) A fully-connected spiking neural network showing input, hidden and output layers comprised of spiking neurons, with synaptic connections shown for one neuron in the hidden and output layers; (b) A section of the neural network architecture implemented using RRAM crossbar memory array and column/rows of mixed-signal CMOS neurons with winner-take-all (WTA) bus architecture for competitive learning; (c) A single multi-bit synapse between the input (pre-synaptic) and output (post-synaptic) neurons that adjusts its weight using STDP; (d) the architecture leverages 2D arrays and peripheral circuits used in memory technology to achieve high-density spiking neural network hardware motifs. architecture is very similar to existing memory architectures, where the devices are arranged in a dense two-dimensional array with the input and output neurons forming the peripheral circuitry, laid out at a matching pitch with the memory array (see Fig.1d). This layout forms a repeatable motif which can be scaled to deeper SNN architectures. Thus, such a NeuSoC architecture can achieve highest area density aided by nanoscale NVM devices and compact mixed-signal neurons. Extension to larger 3D IC architectures using thru-silicon-via (TSVs) provides a natural pathway for further scaling to very high integration density and network complexity without resorting to the overhead incurred by asynchronous communication protocols such as the address-eventrepresentation (AER). Ideally, non-volatile analog-like weights are required for effective STDP learning. However, majority of practical smallsized RRAM devices exhibit abrupt switching behavior, which consequently limits the stable synaptic resolution to 1-bit (or binary, bistable). Furthermore, their switching probability and switching times typically depend upon the voltage applied across the device, as well as the duration of the voltage pulse [19]–[24]. To circumvent the binary resolution of devices, compound memristive synapse with multiple bistable devices in parallel was recently proposed to emulate analog weights on average [23], [25], [26]. However, we will show that this compound synapse only yields a simple linear STDP learning function. This work proposes a new concept where dendritic-inspired processing is added to the compound synapse, along with necessary modifications to the CMOS neuron circuit. This architecture introduces two additional set of parameters to the spike waveforms: amplitude modulation and additional temporal delays. They, in turn, enable nonlinear STDP learning functions, e.g. exponentially shaped window that appears in biological neural electrophysiology, and has been found critical for guaranteeing computing stability and efficiency in theoretical analyses [27]–[29]. Therefore, this is an important step towards integrating practical binary NVM devices, employed in stochastic operating regime, to realize synapses with multi-bit resolution; a breakthrough can lead to practical realization of large-scale spiking neural networks on a chip. Leveraging the bistable probabilistic switching, we specifically demonstrate in this work that the proposed compound synapse with dendritic-inspired processing can realize multi-bit resolution plasticity in synapses with complex non-linear STDP learning functions, including the highly desired exponential one needed for spike-based learning [29]. Therefore, inclusion of even simple dendritic behavior unlocks the computing effectiveness of STDP without any limitations of realistic synaptic device behavior. The novelty of this work is that it combines bistable RRAM devices, that are inherently stochastic, to be used in parallel with simple dendrites with simple circuit structures implementing delay and/or attenuation in event-driven CMOS neurons, to realize higher resolution weights. Simulation results have shown that a STDP learning behavior similar to biological plasticity can be recreated with the proposed concept. The rest of this article is organized as follows: Section II reviews the STDP learning and its realization in emerging NVM devices; Section III introduces the proposed dendriticinspired processing architecture and the respective circuitry; Section IV presents the experimental setup and results; finally, Section V estimates the energy-efficiency of the architecture, discusses current limitations, and presents future investigations. II. STDP LEARNING AND EMERGING NVM DEVICES Spike-timing dependent plasticity (STDP) is a mechanism that uses the relative timing of spikes between pre- and postsynaptic neurons to modulate synaptic strength. It was first formulated in spiking neural network simulations without considering it as a biologically plausible mechanism [30]; while observed in in vivo experiments of cortical pyramidal cells [31] and many other neuroscience experiments conducted later [31]– [36]. The well-known pair-wise STDP states that the strength of synapse connection is modulated according to the relative timing of the pre- and post-synaptic neuron firing. As illustrated in Fig. 2A, a spike pair with the pre-synaptic spike arrives before the post-synaptic spike results in increasing the synaptic strength (or potentiation); a pre-synaptic spike after a postsynaptic spike results in decreasing the synaptic strength (or This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which 3 this version may no longer be accessible. A C B Pre-spike Vpre Vpre Post-spike t t Pre-neuron Δt < 0 Δt > 0 Vpost Δw / w (%) Synapse t t Post-neuron Stochastic Switch Vpost Abrupt Switch Vnet = Vpost - Vpre Vnet = Vpost - Vpre Veff Vth+ Vth+ Vth- Vth- t t Veff Δt (ms) Fig.2. The spike timing dependent plasticity (STDP). (A) A STDP learning window shows the change in synaptic connections as a function of the relative timing of pre- and post-synaptic spikes after 60 spike pairings redrawn from [32]. The double-exponential curves show the typical STDP learning function. (B) A pair of spikes are applied across a synapse to create relative-timing dependent net potential Vnet, of which the over-threshold portion (Veff) may cause the RRAM resistance to switch. (C) Abrupt switching and stochastic switching of a typical RRAM device, adapted from [46]. depression). Changes in the synaptic strength Δw, plotted as a function of the relative arrival timing, Δt, of the post-synaptic spike with respect to the pre-synaptic spike is called the STDP function or learning window. A typical STDP function, Δw, is a double-exponential function ∆𝑤 = { 𝐴+ 𝑒 −∆𝑡 /𝜏+ , 𝑓𝑜𝑟 ∆𝑡 > 0 , 𝐴− 𝑒 ∆𝑡 /𝜏− , 𝑓𝑜𝑟 ∆𝑡 < 0 (1) where A+, A-, τ+, and τ- are the parameters that control the shape of the curve. Further experiments have shown that the relative voltage of the pre- and post-synaptic spike pair is more fundamental than the spike timing [35], [37]. Theoretical studies have revealed that STDP learning rule enables unsupervised local learning in spiking neural networks by realizing Bayesian expectation-maximization algorithm [29], and hidden Markov models [38]. Moreover, a nonlinear STDP learning function, e.g. exponentially shaped window that appears in biological neural systems, is critical for guaranteeing computing stability and efficiency [27]–[29]. As mentioned earlier, emerging NVM devices are being considered as an enabler of realizing large-scale neuromorphic hardware. Emerging NVMs, including phase change memory (PCM), resistive random-access memory (RRAM) and spintorque-transfer random-access memory (STT-RAM), have been demonstrated to realize STDP-like switching characteristics [4], [5], [7]–[9], [39]–[43]; while enabling highly desired advantage of small silicon area of 4F2 (F is the feature size of the semiconductor fabrication process) [44], ultra-energy-efficient operation of sub-pico-Joule per switching event, CMOS compatibility, and dense crossbar (or crosspoint) arrays and 3D integration. Specially, RRAM devices behave like the biological synapses in several aspects. Besides having their conductance to be equivalent to the synaptic strength (or weight) and that the conductance can be modulated by voltage pulses, RRAMs realize STDP directly with identical pair-wise spikes. As illustrated in Fig. 2B, the net potential Vnet created by a presynaptic spike and a late arriving post-synaptic spike, with Δt>0, produces an over-threshold (Vth+) portion Veff, and then, causes an increase in conductance in a typical bipolar RRAM. On the contrary, a pre-synaptic spike and an earlier arriving post-synaptic spike with Δt<0 produces Veff that crosses negative threshold, Vth-, and thus causes a decrease in the conductance. Consequently, it is natural to envision a verylarge-scale integrated (VLSI) Neuromorphic SoC built using CMOS neurons and RRAM synapses. Few research groups, including ours, have developed prototype chips and demonstrated such neural motifs with small-scale spiking neural networks [10], [11], [45]. In these works, analog-like conductance modulation capability that supports continuous weight change is required for effective STDP learning [2], [10]. However, experimental studies suggest that nanoscale RRAMs exhibit a stochastic process in their filament formation, as well as an abrupt conductance change once the filament is formed [19]–[24]. Fig. 2C illustrates experimental data from 20 consecutive switching cycles of a typical bipolar RRAM device [46]. It clearly shows abrupt switching from the high resistance state (HRS) to low resistance state (LRS), the variations of switching threshold voltages and HRS/LRS variations which tend to be stochastic in nature. The intrinsic stochastic switching in RRAM, in consequence, limits stable synaptic resolution to 1-bit, or bistable behavior. To circumvent these issues, compound memristive synapses with multiple bistable devices in parallel were recently proposed to emulate analog weights on average. The concept of using several bistable synaptic devices to represent a multi-bit synapse was proposed in [47]; while this concept reinvigorated neuromorphic computing research when several earlier works demonstrated analog memristors are extremely difficult to realize in the nano-scale regime. On the contrary, binary memristors are easier to fabricate, more robust and offer a larger dynamic range, and [23] showed that they can be connected in the form of an array to achieve multi-bit resolution. Thus, it is not surprising that researchers now turn to seek viable solution for constructing memristive neural network using binary synapses. In [25], compound memristive synapse was used for the first time as an alternative solution to the analog synapse for This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which 4 this version may no longer be accessible. A B Vleaky Vrefr Vrest Vthr Vpd,0 Mleaky Vpd,1 Фd=1 Foreward spikes Cmem SW2 SW1 Pre-synaptic neuron Vpost α1 1 Фd=0 α2 1 SW3 Vcpr Vmem Av Backward spike Фd Фi Ф1 Phase Controller Ф2 Spike Generator Vpre Vpd,2 Фf=0 Post-synaptic neurons …... RRAMs …... Compound Synapse αn Dendritic Processing Фf Bus Interface Vtch Vmode Vrst Фc Vwtab Fig.3. The proposed concept with hybrid CMOS-RRAM neural network with dendritic processing. (A) A single layer of spiking neural network with RRAM synapses organized in crossbar architecture. Post-synaptic neuron connects with a pre-synaptic neuron with several RRAM synapses in parallel. Back-propagated spikes after dendritic processing modulate RRAM in-situ under STDP learning rule. (B) Schematic diagram of the proposed CMOS neuron with dendritic processing architecture. Parallel attenuators (αi) reduce voltage amplitude of forward pre-synaptic spikes applied to parallel RRAM devices when CMOS soma fires. During non-fire (integration) mode, all parallel RRAM devices are connected to same current summing point. neural network computing, and a simulation demonstrated that a 4-bit compound synapse (16 memristors in parallel) is able to achieve a comparable accuracy on a 2-layer fully-connected neural network with MNIST handwritten digits dataset. At the same time, a simulation work in [26] also suggested it is possible to create biological plausible STDP learning window using a compound binary synapse. However, no circuit implementation or practical method to control the shape of the learning window was provided. Thus, in order to unlock the STDP-based learning in SNN hardware, a solution to enable non-linear, especially exponential, STDP learning function with binary RRAMs is highly desired and investigated in this work. III. DENDRITIC PROCESSING ARCHITECTURE AND CIRCUITS The role of active dendrites in neural cells in the computing ability has been studied in [48] where it was shown that nonlinear dendritic processing enhances the ability to learn patterns with low resolution synapses. Recent work in neuromorphic computing in [49], [50] implemented a reservoir readout layer that used the dendritic concept provided in [48] to improve the classification performance. Here, nonlinear dendritic processing circuits were used to achieve learning with analog synapses (realized using CMOS transistors) with binary long-term storage. However, to the best of our knowledge, dendritic-inspired processing with nanoscale NVMs, and the associated spike waveform engineering, have not been explored prior to our work. To leverage RRAM in the compound synapse with nonlinear spike-timing-dependent switching probability, a dendritic-inspired processing stage is applied to the presynaptic neuron output as shown in Fig. 3A. Here, a single-layer neural network is implemented using the crossbar architecture with a RRAM devices as electrical synapses; synapses interconnect pre- and post-synaptic neurons at each crosspoint. In this configuration, we don’t use the nonlinearity of active dendrites as in [48-50], but instead introduce simple circuit modifications such as delay and spike amplitude variations, hence terming it as “dendritic-inspired” processing. The novelty of this work is that it combines bistable (or binary) RRAM devices that are inherently stochastic, to be used in parallel with simple dendrites with varying delay and/or attenuation to realize higher resolution nonlinear STDP learning. Also, the use of dendrites with nanoscale NVM devices is a natural fit as it doesn’t incur area penalty as several rows/columns of memory devices can be laid out on the pitch of the CMOS neurons. Also, separating the attenuating buffers for each dendrite helps reduce the resistive loading, and thus the current drive needed to drive the load by the neuron. The presented neuron in Fig. 3A is adapted from our previous experimental demonstration of RRAM-compatible spiking neuron integrated circuits [10], [11], [45]. Here in contrast to Fig. 1b, the original spike waveform from the pre-synaptic neuron runs through multiple dendritic branches before reaching the binary synaptic devices, and the spike amplitudes are reduced in these branches depending on their attenuation. Since the synaptic devices’ switching depends on the voltage and pulse duration applied across their two terminals, these post-dendritic spike waveforms produce several different voltage amplitudes and cause the respective synaptic devices to switch with different probabilities (assuming same pulse duration for each device). The greater the post-dendritic spike amplitude, the higher probability of switching; the lower the post-dendritic spike amplitude, the lesser probability of switching. From statistical standpoint, the average conductance of the compound synapse ̅̅̅̅ 𝐺𝑐𝑠 with n binary RRAM devices in parallel under a given voltage Vi can be written in a mathematical expression as 𝑛 ̅̅̅̅ 𝐺𝑐𝑠 (𝑉) = ∑ 𝑝𝑖 (𝑉𝑖 ) 𝑖=1 1 𝑅𝑂𝑁,𝑖 𝑛 + ∑(1 − 𝑝𝑖 (𝑉𝑖 )) 𝑖=1 1 𝑅𝑂𝐹𝐹,𝑖 , (1) where pi is the SET switching probability of the ith device, and This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which 5 this version may no longer be accessible. A B C D Fig. 4. STDP learning in a compound binary resistive synapse. (A) Simple pre- and post-synaptic spike waveform and (B) the respective double linear STDP window simulated with resistance variations. (C) Pre-synaptic spike waveforms with dendritic processing, of which the voltage amplitude is attenuated with factors from 0.6 to 1 and creates 16 parallel spikes, and (D) the respective STDP window with dot density presenting the probability (with resistance variations), to which an exponential curve fit well on the left-hand panel. RON and ROFF are the RRAM resistances in the ON and OFF states respectively. Generally, ROFF is greater than RON by several orders of magnitude [51], and thus, can be neglected in overall conductance. Furthermore, assuming RON of all devices are the same*, a simplified expression for Eq. (1) is 𝑛 1 ̅̅̅̅ 𝐺𝑐𝑠 (𝑉) = ∑ 𝑝𝑖 (𝑉𝑖 ). 𝑅𝑂𝑁 (2) 𝑖=1 Noting that the devices are operated in probabilistic switching regime, and each device switches differently with respect to the time difference between the pre- and post-spikes (Δt) 𝑉𝑖 = 𝑓(∆𝑡), (3) Thus, the combined effect of parallel RRAMs could approximate a nonlinear function if pi and Vi are not linear functions at the same time. Therefore, the proposed dendritic processing provides additional degrees of freedom to manage the amplitudes and relative timing of spikes. With appropriate design, the proposed concept able to approach biology-like exponential functions (see an example in the Appendix). In terms of circuit realization, each dendritic branch is implemented by adding an attenuator to the CMOS soma output using compact circuitry as shown in Fig. 3B. Some of the several possible realizations can be a resistor, or diodeconnected MOSFET, ladder followed by source follower buffers, or parallel buffers with varying attenuations. In detail, noting the spike waveform generated by the spike generator as Va+ and Va-, dendritic processing generates n post-dendritic spikes { + 𝑉𝑝𝑑,𝑖 = 𝛼𝑖 𝑉𝑎+ , − 𝑉𝑝𝑑,𝑖 = 𝛼𝑖 𝑉𝑎− 𝑤ℎ𝑖𝑙𝑒 𝑖 = 1,2, ⋯ , 𝑛 (4) where Vpd,i+ and Vpd,i- is the positive and negative amplitudes of the ith post- dendritic spike, and αi is the attenuation factor of the ith dendritic branch. Besides the amplitude attenuation, time delays could be also introduced into the dentritic processing. Noting the spike waveform generated by the spike generator as Vi, then the dendritic processing generates n post-dendritic spikes * RON of an actual RRAM could be stochastic as well. See an example in [51]. 𝑉𝑝𝑑,𝑖 = 𝑉𝑖 (𝑡 + ∆𝜏), 𝑤ℎ𝑖𝑙𝑒 𝑖 = 1,2, ⋯ , 𝑛 (5) th where Δτ is the delay of the i dendritic branch. The CMOS soma can be implemented as an integrate-andfire circuit with a winner-takes-all (WTA) mechanism in an event-driven triple-mode architecture based on a single opamp, as previously presented by us in [10], [11], [45]. In the integration-mode configuration, the CMOS soma is designed to provide a constant voltage at the neuron’s current summing input, and allows reliable and linear spatio-temporal spike integration by charging membrane capacitor, with the inflowing currents flowing through the passive resistive synaptic devices. In the firing-mode configuration, the CMOS soma generates STDP- compatible spike and drives the spikes propagating in both forward as well as backward directions with high energyefficiency. In the discharge-mode, this soma circuitry supports local learning with several neurons organized in a group and becomes selective to input patterns through competition and lateral inhibition with a shared WTA bus [10]. It is worthwhile to note that dendritic attenuation and delay are natural phenomenon and intrinsic properties of biological neurons. A biological dendritic tree has much higher resistance than metal interconnection in semiconductor chips, then, yield a larger attenuation to the spike amplitude. For examples, in a biophysical simulation, the synaptic potential close to the center of soma is 13 mV whereas the potential is approximately 0.014 mV at the end of the dendritic tree which is a more than 900fold attenuation [52]; while the simulation in this work will use attenuation factors less than 2-fold. IV. EXPERIMENTS A. Setup The stochastic switching of the RRAM synapse is modeled by the cumulative probability of a normal distribution as experimentally demonstrated in [53] 𝑉 𝑝(𝑉) = ∫ 0 1 √2𝜎 2 𝜋 𝑒 −(𝑥−𝑉𝑡ℎ )2 2𝜎 2 𝑑𝑥, (6) where p(V) is the SET or RESET switching probability under net potential V applied across the two terminals of the RRAM; This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which 6 this version may no longer be accessible. A B C D Fig. 5. Some details of the compound binary resistive synapse with dendritic processing. (A) Effective potential Veff over parallel devices versus the relative arrival timing of post- and pre-synaptic spikes. 16 levels are created over Vth+ and Vth-. (B) The compound synapse shows an equivalent of 4-bit (16 levels) weight STDP leaning. Each dot represents a possible resistance value. (C) Switching probability for the 16 devices versus the relative pre / post-synaptic spikes’ timing (Δt). The asymmetric shape is created by dendritic processing on the pre-synaptic neuron only. (D) Probability as a function of relative timing of the compound synapse at each of its conductance state. The state probability curve in the left-hand panel is spaced with each other in an increasing exponential manner. Vth is the mean of threshold voltage, and σ is the standard deviation of the distribution. Here, for demonstration purpose we choose Vth+ = 1V and Vth- = -1V for the positive and negative thresholds respectively, with σ = 0.1. During simulation, the timescale and change in conductance were normalized for convenience. A simulation step of 0.01 was used, and the delay of circuits were ignored except the delay implemented in dendritic processing unit as described earlier. A total of 10,000 epochs were performed to generate stochastic data for each simulation. The whole neural circuit with dendritic neurons and synapses was modeled and simulated with Python 2.7 in Linux Mint 18 environment and on an Intel Core-i5 6600 quad-core CPU running at 3.5GHz. Each simulation took approximately 7.5 seconds. B. A Stochastic STDP with Exponential Learning Function In the first simulation, a circuit hardware-friendly spike waveform [2], [10] as shown in Fig. 4A is selected. This halfrectangular-half-triangular (HRHT) spike waveform has a constant positive shape and a linearly rising negative tail, and has been demonstrated on a CMOS neuron chip by the authors [11]. The positive tail of the spike has 0.9V amplitude and spans 1 time unit; the negative tail has a peak amplitude of 0.4V and spans 5 time units. Without dendritic processing, a pair of spike was applied to a compound synapse with 16 RRAM devices in parallel. In this scenario, the attenuating factors αi = 1, or simply, the terminals of these devices are connected to one node. The simulation results for stochastic STDP learning is shown in Fig. 4B. Here, each dot represents the state of conductance of the compound synapse, and the LRS variation of RRAMs is modelled as a normal distributed random variable with standard deviation of 0.1. By connecting 16 binary devices in parallel, this simple compound synapse achieves 4-bit weight resolution through STDP leaning, however, the learning curves are linear, i.e. have a linear best fit, due to the same switching probability for all the devices in parallel. With dendritic processing applied to the pre-synaptic spike, the attenuating factors αi of the dendritic attenuators were set to values linearly spanning from 0.6 to 1, and produced 16 positive and 16 negative levels as shown in Fig. 4C; while the postsynaptic spike remained a single waveform same to the one shown in Fig. 4A. The simulation result is shown in Fig. 4D, and it can be discerned that the STDP learning windows is significantly different from the previous one in Fig. 4B. Interestingly on the left-hand panel, the conductance change shows a non-linear relationship to the relative time Δt, and an exponential curve fits well to it. Another significant difference between the two schemes is that the flat plateau in Fig. 4B for Δt in the range of -1 to 0 almost disappeared, while the plateau region narrowed down in the right-hand panel with Δt close to 0. Since the maximum net potential over the RRAM devices is same when only a portion of the pre-synaptic spike’s tall positive head overlaps with the post-synaptic spike’s negative tail, the switching probabilities of the parallel devices are also the same and equal to 1 in this design. Ideally, this plateau can be eliminated by using a very narrow positive tail for the spike waveform which corresponds to faster switching characteristics for the RRAM device. Fig.5 provides a closer look to the impact of dendritic processing on the overall STDP learning. Fig. 5A shows the effective potential Veff over parallel devices versus the relative arrival times of post- and pre-synaptic spikes. Here, 16 voltage levels are created over Vth+ and Vth- for Δt >0 and Δt < 0 respectively. As a result, they produce 16 levels of conductance change as shown in Fig. 5B. In this plot, each dot represents a non-zero probability of conductance change without taking the values of probability into consideration and by ignoring LRS variations. Fig. 5C plots the individual switching probability of the 16 devices versus Δt. With the attenuated amplitudes in the dendrites, the switching probabilities of these 16 devices decreased and entered into non-switching status (0 switching probability) successively in the left-hand panel. As shown in the Appendix, the successive shifting of switching probability from non-zero to zero introduces a quadratic term in the compound synapse, and thus produces the approximated exponential curve. One can also find that the RRAMs’ switching probability curves are dense in the left-hand panel, due to the smaller amplitude of the spike’s negative tail than its positive head. Dense probability curves yield narrow span of their combined This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which 7 this version may no longer be accessible. A1. Double Rectangurlar Spike B1. Double Linear Spike C1. Double Exponential Spike D1. Bio-Plausible Spike A2. STDP Window w/o Dendritic Processing B2. STDP Window w/o Dendritic Processing C2. STDP Window w/o Dendritic Processing D2. STDP Window w/o Dendritic Processing A2. STDP Window w/ Dendritic Processing B2. STDP Window w/ Dendritic Processing C2. STDP Window w/ Dendritic Processing D2. STDP Window w/ Dendritic Processing B3 C3 D3 Fig. 6. Spike waveform shapes and their respective STDP learning functions without and with the dendritic processing. The top row are the spike waveforms with various pulse shapes. With dendritic attenuation processing, each original spike (corresponding to the waveform with the largest amplitudes) turns into a group of 16 spikes with progressively reduced amplitudes. The middle row shows the respective STDP windows created with the single original spikes on a 4-bit compound binary synapse. We can observe that they are visibly linear with respect to the relative timing of spike arrival. STDP windows in the bottom row are the ones created by the spike group shown in the top row, where the B3, C3 and D3 show clear exponential curves compared to their counterparts of B2, C2 and D2 respectively. Moreover, the non-linear STDP learning function can be further customized by tuning the attenuation and delays in the dendritic pathways. distribution, and are easier to saturate, especially when the positive head of pre-spike partially overlaps with the post-spike and creates a smaller change to the net potential with respect to Δt. In this simulation, almost a half of the RRAM devices were saturated when Δt is in the range of 0 to 1. double-exponential STDP. Another view is shown in Fig. 5D, which depicts the probability of the compound synapse to occupy each of the normalized conductance states. It shows that the state-wise probability curves are spaced with exponential increments in time. C. Other Stochastic STDP Learning Functions Several other spike waveform shapes were also simulated and the results are illustrated in Fig. 6. In this figure, the spike waveforms with dendritic processing are shown in the first row while waveforms without dendritic processing will correspond to the ones with largest peak-to-peak swing. The respective STDP learning functions without dendritic processing are shown in the second row, and the corresponding STDP learning functions with dendritic processing are shown in the third row. The HRHT spike waveform used in this simulation is very easy to realize in CMOS circuits and produces a single exponential curve in the STDP learning function. However, in the other positive half, the curve fit follows a straight line with a linear decrease for most of the time; while has a small exponential decreasing tail at the far end. Consequently, other waveform shapes were explored to realize a biology-like A widely employed simple rectangular spike produces a rectangular STDP learning widow with dendritic processing, as shown in Fig. 6A. It is easy to observe that the switching probability of the RRAM devices remains unchanged in the learning window because the amplitude of the spike waveform is independent of the relative timing. Hence, there isn’t a quadratic term which can be introduced into the design. This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which 8 this version may no longer be accessible. A1 B1 C1 D1 A2 B2 C2 D2 Fig. 7. (1st row) Spike waveform shapes with dendritic attenuation and delays and (2 nd row) respective STDP learning functions. When incorporating dendritic delays, the dendritic processing yields STDP learning window very plausible to the measured biological STDP as shown in Fig. 1A. Double sawtooth and double exponential spike waveforms were simulated and the results are shown in Fig. 6B and 6C. Similar to the waveform of Fig. 4C, dendritic processing introduced nonlinearity into the STDP learning window. Due to the sharp curves in the spike waveforms, both of them produced curves of STDP learning functions that eliminated the plateau and approximated to a double-exponential function as shown in Fig. 2A and formulated in Eq. (1). waveform amplitudes or attenuation factors). Interestingly, the double-exponential spike waveform created a STDP learning function very similar to the in vivo measured biological STDP seen in Fig. 2A. This waveform with dendritic delays can be used to realize an STDP response that is highly faithful to the biological measurements. A biologically plausible spike was also simulated and shown in Fig. 6D. Dendritic processing introduced nonlinearity into the STDP learning window for this waveform as well; whereas conductance changes are also found around the Δt = 0 region due to the smooth change of the positive and negative tails in this waveform. A. Energy Efficiency The primary motivation of exploring memristive (or RRAMbased) spiking neural network is the potential energy efficiency saving comparing to conventional computing paradigms. This goal could be achieved from two aspects: the event-driven asynchronized architecture of SNN, and the ultra-low-power memory devices. In an SNN, the spike shape parameters and the ON state resistance RON of the memristive devices (ROFF is generally several orders of magnitude greater than RON, and thus can to be neglected) contribute to the energy computation of one spike event; while the total energy consumption is also decided by the percentage of RRAM devices in ON state, spike activity, and the power consumption in the neurons. Taking the HRHT waveform with tall and thin positive rectangular head and a short and fat negative triangular tail as example, the pulse shape is defined as: In the case of a STDP learning function where a doubleexponential curve is desired for a VLSI implementation, the sawtooth waveform is a good choice because it is easier to realize in circuits compared to the exponential or the biologicalplausible spike waveforms. D. Incorporating with Dendritic Delay Propagation delay is another parameter which can be implemented into the dendritic processing architecture. To find the impact of the dendritic delay, a 0.3 time-unit delay was used in this simulation which accounts for 5% of the 6 time-unit total waveform span. As shown in Fig. 7, HRHT, double sawtooth, double exponential and biological plausible spike waveforms were applied. With time delays, all of them produce conductance change probability around Δt=0, as few dots that can be seen at the two sides of y-axis, and a wider distribution of dots towards y-axis. Time delays also reduce the probability of large conductance change due to the shift in the pairwise spike peaks (this problem can be resolved by choosing appropriate V. DISCUSSION 𝐴+ ∆𝑡 𝑉𝑠𝑝𝑘 (∆𝑡) = {−𝐴− (1 − ) , 𝜏+ 0 𝑤ℎ𝑖𝑙𝑒 𝜏− < ∆𝑡 < 0 𝑤ℎ𝑖𝑙𝑒 0 < ∆𝑡 < 𝜏+ , (8) 𝑒𝑙𝑠𝑒 where A = A+ + A- is the peak-to-peak amplitude of the waveform, and τ- and τ- are the positive and negative tail duration respectively. Then, energy consumption of one spike over a memristor device with ON resistance RON is given by This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which 9 this version may no longer be accessible. 2 𝐸𝑠𝑝𝑘 = 𝜏+ [−𝐴− (1 − 𝐴+ 𝜏 +∫ 𝑅𝑂𝑁 − 0 𝑡 2 )] 𝜏+ 𝑅𝑂𝑁 𝑑𝑡, (9) and the total SNN energy consumption for one event can be formulated as 𝐸𝑆𝑁𝑁 = 𝜂𝑎𝑐𝑡 𝜂𝑂𝑁 𝑠𝐸𝑠𝑝𝑘 + 𝑛𝑃𝑛𝑒𝑢𝑜𝑛 𝜏, (9) where ηact is neuron activity ratio, ηON is ON-state RRAM ratio in the SNN, s is the number of synaptic connections, n is the number of neurons, Pneuron is neuron power and τ = τ- + τ- is the spike duration. For instance, the well-known AlexNet convolutional neural network for deep learning is built with 61 million synaptic connections and 640 thousand neurons. With a conservative estimation based on the spiking neuron chip realization in [11] and 4-bit compound binary synapse, the energy consumption for processing of one image is 62 μJ, as shown in Table 1. By comparing with the today’s most advanced GPU Nvidia P4 for deep learning [54], it could provide a better energy-efficiency of 94-fold. Noting a great room for improvement in the CMOS design in [11], high-LRS memristor devices (>10MΩ) and fast STDP (<50 ns) have been demonstrated, and penitential low neuron activity ratio, a 11 thousand-fold energy efficiency improvement could be a reasonable target for a SNN on a hybrid CMOS-RRAM chip. Table 1. Energy Efficiency Estimation of Memristor Based SNN τSpike Duration τ+ A+ Spike Amplitude AON State Resistance RON Single Spike Energy Espk Neuron Baseline Energy Eneuron Neuron Act Ratio ηact On State RRAM Ratio ηON Single Event Energy ESNN Images / Sec / Watt Acceleration Ratio to GPU [54] - Conservative 500 ns 2500 ns 300 mV 150 mV 1 MΩ 45 fJ 70 pJ 0.8 0.5 62 μJ 16 k ×94 Medium Aggressive 50 ns 5 ns 250 ns 25 ns 300 mV 300 mV 150 mV 150 mV 10 MΩ 10 MΩ 0.45 fJ 0.045 fJ 700 fJ 35 fJ 0.5 0.1 0.5 0.5 560 nJ 25 nJ 1.8 M 41 M ×11 k ×240 k For an aggressive estimation, the power consumption of neuron and RON are kept unchanged by considering steep slowdown in CMOS process evolution, and the signal-to-noise ratio (SNR) being fundamentally limited by the thermal noise [55]. However, a faster spike duration and much sparse neuron activity could be possible. With nano-second scale spike duration and 0.1 neuron activity, we could expect an energyefficiency improvement of 240 thousand-fold. B. Limitations and Future Work This work proposes a dendritic processing architecture that provides a potential solution for implementing biologically plausible STDP and its realization using CMOS neuron circuits with stochastic binary RRAM devices. Although the mathematical analysis of HRHT waveform proves that dendritic attenuation introduces a second order approximation of the exponential function, it was performed in terms of average conductance instead of the maximum probability. In this work, simulations were used to demonstrate that the produced STDP learning functions closely mimic the measured biological STDP. In order to provide analytical guidance for the spike waveform design, precise mathematical analysis in terms of probability of each conductance state is required to establish the relationship between the maximum probability and the relative timing, Δt, and this could be a future theoretical work. Besides the variations in the LRS, the noise in the waveform amplitude is also a practical parameter to be considered. Amplitude noise has impact on the switching of RRAM devices. It can shift device switching probabilities; cause switching probability to saturate at the higher end, and turn off the switching at the lower end. As a result, the amplitude noise can create undesired conductance change states or skip conductance states. Our simulations show that a normal distributed amplitude noise with standard deviation more than 0.05 significantly distorted the STDP learning window; and a noise with standard deviation less than 0.02 created a few additional conductance states while retaining shaped similar to the ideal STDP learning windows. Finally, there have been a few theoretical studies on the impact of STDP learning function to learning in very simple neural networks [38], [56]. However, detailed study hasn’t been performed for a neural network of practical size, e.g. a multilayer perceptron. It would be very interesting to understand the impact of STDP function to the overall network learning performance, including the stability, learning speed or convergence time, the resulting classification accuracy, and these metrics’ sensitivity to the variations in the STDP function. In a further step, when STDP is applied to state-of-the-art networks, like deep convolutional neural networks and recurrent neural networks, the impact of STDP function remains completely unknown and will form the bulk of our future study. VI. CONCLUSION The proposed compound synapse with dendritic processing realizes biologically plausible exponential STDP learning, while using practically feasible bistable nonvolatile memory devices with probabilistic switching. This can potentially create a breakthrough in ultra-low-power and significantly compact machine learning hardware for large-scale spiking neural networks that require synaptic plasticity with multibit resolution; a bottleneck in taking the next leap with the practical RRAM or memristive devices. Immediate applications will include practical realization of spike-based deep neural networks in a compact chip-scale form factor, with orders of magnitude reduction in energy consumption compared to GPUs and digital ASICs. Architectural exploration using the proposed compound probabilistic synapses can help benchmark the expected behavior from the emerging RRAM devices; nanoscale RRAM devices with large resistances will help realize lower power consumption. This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which 10 this version may no longer be accessible. APPENDIX: AN APPROACH TO EXPONENTIAL STDP CURVE 𝑘(∆𝑡) = 𝑎1 + 𝑏1 ∆𝑡, A. Approximation of Exponential Function The exponential function can be expressed using Taylor expansion as ∞ (−𝑥)𝑛 −𝑥 1 −𝑥 𝑒 =∑ 𝑒 ≈ 1 − 𝑥 + 𝑥2 , (7) 𝑛! 2 Here a1 and b1 can be solved from Eq. (10) and Eq. (11) 1 𝑎1 = (𝐴 − 𝑉𝑡ℎ ), (15) ∆𝑉 𝛽 𝑏1 = . (16) ∆𝑉 when x is sufficiently small. Normalizing 1/Ron to a value of one for convenience and rearranging Eq. (13) we obtain 𝑛=0 B. Model of Stochastic Switching For an RRAM device with linear stochastic switching characteristics as shown in Fig.2, it is described by the equation 1 + 𝑉𝑡ℎ 𝛼 𝑝(𝑉) = { 𝛾(𝑉 − 𝑉𝑡ℎ ) , 𝑉𝑡ℎ < 𝑉 < 𝛾 −1 + 𝑉𝑡ℎ , 0 , 𝑉 ≤ 𝑉𝑡ℎ 1 𝑛 ∑𝑖 = 𝑖=𝑘 C. Model of Dendritic Processed Spike Several spike shapes have been studied for STDP learning while they possess different levels of biological mimicry and hardware realization complexity. Here, the HRHT waveform with tall and thin positive rectangular head and a short and fat negative triangular tail is selected as Formulated in Eq. 9. This spike shape is widely used in widely used in simulation and CMOS neuromorphic implementations, while at the same time it is convenient for mathematical analysis. When the proposed dendritic processing is applied to the prespike, the net potential Vi created by the ith pre-spike and the post-spike is ∆𝑡 (11) 𝑉𝑖 (∆𝑡) ≈ (𝐴+ − 𝑖∆𝑉) + 𝐴− (1 − ) 𝜏+ (12) where A = A+ + A- is the peak-to-peak amplitude of the waveform, ΔV is the step of amplitude change, and β = A- / τ+. D. Average Conductance The value of greatest interest in this analysis is the maximum likelihood value of the conductance versus relative time difference, Δt. However, it is very difficult to derive the analytic results for a general case. As an alternative, the average conductance is assumed as a reasonable approximation without providing explicit proof in this work. To derive the relationship between average conductance ̅̅̅̅ 𝐺𝑐𝑠 and relative timing Δt, by substituting Eq. (9) and (10) into Eq. (2), we have 𝑛 1 ∑ 𝛾(𝐴 − 𝑖∆𝑉 − 𝛽∆𝑡 − 𝑉𝑡ℎ ). 𝑅𝑂𝑁 𝑖=𝑘 (10) where p the switching probability, V is the voltage across the device, Vth is the minimum threshold voltage, and γ is a constant which represents the slope of the switching function. ̅̅̅̅ 𝐺𝑐𝑠 (𝑉) = 𝑛 ̅̅̅̅ 𝐺𝑐𝑠 (∆𝑡) = (𝑛 − 𝑘)[𝛾(𝐴 − 𝑉𝑡ℎ ) − 𝛽𝛾∆𝑡] − 𝛾∆𝑉 ∑ 𝑖. (17) In Eq. (17), the last term can be expressed as 𝑉≥ = 𝐴 − 𝑖∆𝑉 − 𝛽 ∆𝑡, (14) ̅̅̅̅ 𝐺𝑐𝑠 (∆𝑡) = 𝑎 − 𝑏∆𝑡 + 𝑐∆𝑡 2 , (19) where the constant a is given by 𝑎 = 𝛾(𝐴 − 𝑉𝑡ℎ )(𝑛 − 𝑎1 ) − 𝛾∆𝑉 𝑛(𝑛 + 1) − 𝑎1 (𝑎1 + 1) . (20) 2 The factor b of the first-order term is expressed as 1 𝑏 = 𝑏1 𝛾 [ ∆𝑉(𝑎1 + 1) − 𝛽]. 2 (21) By substituting a1, b1 and β into above equation, it is not difficult to find b > 0 as τ+ > 2 and A+ > Vth. The factor c of the second order term is 𝑐 = 𝑏1 (𝛽𝛾 + 𝑏1 ). (22) As b1, β and γ are all positive numbers, c is a positive number as well. Thus, it has been shown that the average conductance of STDP learning window with dendritic processed HRHT waveforms is a second-order approximation of the exponential learning function. REFERENCES [1] [2] [3] (13) where all the waveforms have their switching probability less than one, and k is the index of the waveforms that have a smallest non-zero switching probability and is a linear function of Δt (18) Substituting Eq. (15) and (16) into Eq. (17) and allocating the terms according to the order of ∆𝑡, we get [4] 𝑖=𝑘 𝑛(𝑛 + 1) 𝑘(𝑘 + 1) − 2 2 [5] [6] [7] S. K. Esser et al., “Convolutional Networks for Fast, Energy-Efficient Neuromorphic Computing,” Proc. Natl. Acad. Sci., 2016. C. Zamarreño-Ramos, L. A. Camuñas-Mesa, J. A. Pérez-Carrasco, T. Masquelier, T. Serrano-Gotarredona, and B. Linares-Barranco, “On spike-timing-dependent-plasticity, memristive devices, and building a self-learning visual cortex,” Front. Neurosci., vol. 5, no. March, p. 26, Jan. 2011. D. Querlioz, W. Zhao, and P. Dollfus, “Bioinspired networks with nanoscale memristive devices that combine the unsupervised and supervised learning approaches,” in International Symposium on Nanoscale Architectures (NANOARCH), 2012, pp. 203–210. S. Yu, Y. Wu, and R. Jeyasingh, “An electronic synapse device based on metal oxide resistive switching memory for neuromorphic computation,” IEEE Transations Electron Devices, vol. 58, no. 8, pp. 2729–2737, 2011. D. Kuzum, R. R. G. D. Jeyasingh, B. Lee, and H. P. Wong, “Nanoelectronic Programmable Synapses Based on Phase Change Materials for Brain-Inspired Computing,” Nano Lett., vol. 12, pp. 2179– 2186, 2012. X. WANG et al., “Review on Memristor and Its Applications,” Acta Autom. Sin., vol. 39, no. 8, pp. 1170–1184, Jun. 2014. D. H. Kang, H. G. Jun, K. C. Ryoo, H. Jeong, and H. Sohn, “Emulation This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which 11 this version may no longer be accessible. [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] of spike-timing dependent plasticity in nano-scale phase change memory,” Neurocomputing, vol. 155, pp. 153–158, 2015. A. Sengupta, Z. Al Azim, X. Fong, and K. Roy, “Spin-orbit torque induced spike-timing dependent plasticity,” Appl. Phys. Lett., vol. 106, no. 9, 2015. S. Mandal, A. El-Amin, K. Alexander, B. Rajendran, and R. Jha, “Novel synaptic memory device for neuromorphic computing,” Sci. Rep., vol. 4, p. 5333, Jan. 2014. X. Wu, V. Saxena, K. Zhu, S. Member, V. Saxena, and K. Zhu, “Homogeneous Spiking Neuromorphic System for Real-World Pattern Recognition,” IEEE J. Emerg. Sel. Top. Circuits Syst., vol. 5, no. 2, pp. 254–266, 2015. X. Wu, V. Saxena, K. Zhu, and S. Balagopal, “A CMOS Spiking Neuron for Brain-Inspired Neural Networks with Resistive Synapses and In-Situ Learning,” IEEE Trans. Circuits Syst. II Express Briefs, vol. 62, no. 11, pp. 1088–1092, 2015. T. Masquelier, R. Guyonneau, and S. J. Thorpe, “Spike timing dependent plasticity finds the start of repeating patterns in continuous spike trains,” PLoS One, vol. 3, no. 1, p. e1377, Jan. 2008. P. U. Diehl, D. Neil, J. Binas, M. Cook, S. Liu, and M. Pfeiffer, “FastClassifying, High-Accuracy Spiking Deep Networks Through Weight and Threshold Balancing,” Int. Jt. Conf. Neural Networks, no. January 2016, 2015. P. U. Diehl and M. Cook, “Unsupervised learning of digit recognition using spike-timing-dependent plasticity,” Front. Comput. Neurosci., vol. 9, 2015. J. H. Lee et al., “Training deep spiking neural networks using backpropagation,” Front. Neurosci., vol. 10, no. November, pp. 1–10, 2016. S. R. Kheradpisheh, M. Ganjtabesh, S. J. Thorpe, and T. Masquelier, “STDP-based spiking deep neural networks for object recognition,” 2016. A. Tavanaei and A. S. Maida, “Bio-Inspired Spiking Convolutional Neural Network using Layer-wise Sparse Coding and STDP Learning,” no. 2014, pp. 1–20, 2016. E. Neftci, C. Augustine, S. Paul, and G. Detorakis, “Event-driven random back-propagation: Enabling neuromorphic deep learning machines,” arXiv, vol. 1612.05596, 2016. S. H. Jo, K. H. Kim, and W. Lu, “Programmable resistance switching in nanoscale two-terminal devices,” Nano Lett., vol. 9, no. 1, pp. 496–500, 2009. R. Soni et al., “On the stochastic nature of resistive switching in Cu doped Ge 0.3Se0.7 based memory devices,” J. Appl. Phys., vol. 110, no. 5, pp. 0–10, 2011. S. Yu, X. Guan, and H.-S. P. Wong, “On the Switching Parameter Variation of Metal Oxide RRAM-Part II: Model Corroboration and Device Design Strategy,” IEEE Trans. Electron Devices, vol. 59, no. 4, pp. 1183–1188, 2012. M. Suri et al., “Bio-inspired stochastic computing using binary CBRAM synapses,” IEEE Trans. Electron Devices, vol. 60, no. 7, pp. 2402–2409, 2013. S. Gaba, P. Sheridan, J. Zhou, S. Choi, and W. Lu, “Stochastic memristive devices for computing and neuromorphic applications,” Nanoscale, vol. 5, pp. 5872–8, 2013. Q. Li, A. Khiat, I. Salaoru, H. Xu, and T. Prodromakis, “Stochastic switching of TiO2-based memristive devices with identical initial memory states.,” Nanoscale Res. Lett., vol. 9, no. 1, p. 293, 2014. J. Bill and R. Legenstein, “A compound memristive synapse model for statistical learning through STDP in spiking neural networks,” Front. Neurosci., vol. 8, no. December, pp. 1–18, 2014. A. Singha, B. Muralidharan, and B. Rajendran, “Analog memristive time dependent learning using discrete nanoscale RRAM devices,” in International Joint Conference on Neural Networks (IJCNN), 2014, pp. 2248–2255. H. Sprekeler, C. Michaelis, and L. Wiskott, “Slowness: an objective for spike-timing-dependent plasticity?,” PLOS Comput. Biol., vol. 3, no. 6, p. e112, Jun. 2007. T. Toyoizumi and J. Pfister, “Spike-timing dependent plasticity and mutual information maximization for a spiking neuron model,” in Advances in Neural Information Processing Systems (NIPS), 2004. B. Nessler, M. Pfeiffer, L. Buesing, and W. Maass, “Bayesian computation emerges in generic cortical microcircuits through spiketiming-dependent plasticity,” PLOS Comput. Biol., vol. 9, no. 4, Apr. 2013. W. Gerstner, R. Ritz, and J. L. van Hemmen, “Why spikes? Hebbian learning and retrieval of time-resolved excitation patterns,” Biol. Cybern., vol. 69, no. 5–6, pp. 503–15, Jan. 1993. [31] H. Markram, “Regulation of Synaptic Efficacy by Coincidence of Postsynaptic APs and EPSPs,” Science (80-. )., vol. 275, no. 5297, pp. 213–215, Jan. 1997. [32] G. Q. Bi and M. M. Poo, “Synaptic modifications in cultured hippocampal neurons: dependence on spike timing, synaptic strength, and postsynaptic cell type,” J. Neurosci., vol. 18, no. 24, pp. 10464–72, Dec. 1998. [33] L. F. L. Abbott, S. B. S. Nelson, and L. F. L. Abbott, “Synaptic plasticity: taming the beast,” Nat. Neurosci., vol. 3, no. 11, pp. 1178–183, 2000. [34] S. Song, K. D. K. Miller, and L. F. Abbott, “Competitive Hebbian learning through spike-timing-dependent synaptic plasticity,” Nat. Neurosci., vol. 3, no. 9, pp. 919–926, 2000. [35] P. J. Sjöström, G. G. Turrigiano, and S. B. Nelson, “Rate, timing, and cooperativity jointly determine cortical synaptic plasticity,” Neuron, vol. 32, no. 6, pp. 1149–64, Dec. 2001. [36] G. Bi and M. Poo, “Synaptic modification by correlated activity: Hebb’s postulate revisited,” Annu. Rev. Neurosci., vol. 24, pp. 139–166, 2001. [37] H. Markram, W. Gerstner, and P. J. Sjöström, “Spike-timing-dependent plasticity: a comprehensive overview,” Front. Synaptic Neurosci., vol. 4, no. July, p. 2, Jan. 2012. [38] D. Kappel, B. Nessler, and W. Maass, “STDP Installs in Winner-TakeAll Circuits an Online Approximation to Hidden Markov Model Learning,” PLOS Comput. Biol., vol. 10, no. 3, p. e1003511, 2014. [39] S. H. Jo, T. Chang, I. Ebong, B. B. Bhadviya, P. Mazumder, and W. Lu, “Nanoscale memristor device as synapse in neuromorphic systems,” Nano Lett., vol. 10, no. 4, pp. 1297–301, Apr. 2010. [40] K. Seo et al., “Analog memory and spike-timing-dependent plasticity characteristics of a nanoscale titanium oxide bilayer resistive switching device,” Nanotechnology, vol. 22, no. 25, p. 254023, Jun. 2011. [41] P. Krzysteczko, “The Memristive Magnetic Tunnel Junction as a Nanoscopic Synapse-Neuron System,” Adv. Mater., vol. 24, no. 6, pp. 762–6, Feb. 2012. [42] Y. Li et al., “Ultrafast synaptic events in a chalcogenide memristor.,” Sci. Rep., vol. 3, p. 1619, Jan. 2013. [43] Y. Li et al., “Activity-dependent synaptic plasticity of a chalcogenide electronic synapse for neuromorphic systems,” Sci. Rep., vol. 4, p. 4906, Jan. 2014. [44] A. Chen, “A review of emerging non-volatile memory (NVM) technologies and applications,” Solid. State. Electron., vol. 125, pp. 25– 38, 2016. [45] X. Wu, V. Saxena, and K. Zhu, “A CMOS Spiking Neuron for Dense Memristor-Synapse Connectivity for Brain-Inspired Computing,” in International Joint Conference on Neural Networks (IJCNN), 2015. [46] A. Prakash and H. Hwang, “Multilevel Cell Storage and Resistance Variability in Resistive Random Access Memory,” Phys. Sci. Rev., vol. 1, no. 6, 2016. [47] K. Likharev, A. Mayr, I. Muckra, and Ö. Türel, “CrossNets: High ‐ Performance Neuromorphic Architectures for CMOL Circuits,” Ann. N. Y. Acad. Sci., vol. 163, pp. 146–163, 2003. [48] P. Poirazi and B. W. Mel, “Impact of active dendrites and structural plasticity on the memory capacity of neural tissue,” Neuron, vol. 29, no. 3, pp. 779–796, 2001. [49] S. Roy, A. Banerjee, and A. Basu, “Liquid State Machine With Dendritically Enhanced Readout for Low-Power, Neuromorphic VLSI Implementations,” Biomed. Circuits Syst. IEEE Trans., vol. 8, no. 5, pp. 681–695, 2014. [50] S. Roy and A. Basu, “An Online Structural Plasticity Rule for Generating Better Reservoirs,” Neural Comput., vol. 28, no. 11, pp. 2557–2584, 2016. [51] Vishal Saxena, X. Wu, and M. Mitkova, “Addressing Challenges in Neuromorphic Computing with Memristive Synapses,” in Neuromorphic Computing Workshop: Architectures, Models, and Applications, 2016. [52] N. Spruston, “Pyramidal neurons: dendritic structure and synaptic integration.,” Nat. Rev. Neurosci., vol. 9, no. 3, pp. 206–221, 2008. [53] S. Yu, B. Gao, Z. Fang, H. Yu, J. Kang, and H.-S. P. Wong, “Stochastic learning in oxide binary synaptic device for neuromorphic computing,” Front. Neurosci., vol. 7, no. October, p. 186, 2013. [54] Nvidia, “New Pascal GPUs Accelerate Inference in the Data Center,” 2016. [Online]. Available: https://devblogs.nvidia.com/parallelforall/new-pascal-gpus-accelerateinference-in-the-data-center/. [55] A. S et al., “Energy Scaling Advantages of Resistive Memory Crossbar Based Computation and Its Application to Sparse Coding,” Front. Neurosci., vol. 9, 2015. [56] H. S. Seung, “Learning in spiking neural networks by reinforcement of This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which 12 this version may no longer be accessible. stochastic synaptic transmission,” Neuron, vol. 40, no. 6, pp. 1063–73, Dec. 2003.
9cs.NE
ON THE CLASSIFYING SPACE OF ARTIN MONOIDS arXiv:1511.02062v2 [math.AT] 20 Feb 2016 GIOVANNI PAOLINI Abstract. A theorem proved by Dobrinskaya in 2006 shows that there is a strong connection between the K(π, 1) conjecture for Artin groups and the classifying space of Artin monoids. More recently Ozornova obtained a different proof of Dobrinskaya’s theorem based on the application of discrete Morse theory to the standard CW model of the classifying space of an Artin monoid. In Ozornova’s work there are hints at some deeper connections between the above-mentioned CW model and the Salvetti complex, a CW complex which arises in the combinatorial study of Artin groups. In this work we show that such connections actually exist, and as a consequence we derive yet another proof of Dobrinskaya’s theorem. 1. Introduction The beginning of the study of Artin groups dates back to the introduction of braid groups in the 20s. Artin groups where defined in general by Tits and Brieskorn in the 60s, in relation to the theory of Coxeter groups and singularity theory. Since then some of their general properties were studied (cf. [BS72]) but many questions remain open. One of these questions is the so called K(π, 1) conjecture, which states that a certain space N (A) with the homotopy type of a finite CW complex is a classifying space for the corresponding Artin group A. Such conjecture was proved for some particular families of Artin groups (see [CD95, CMS10, Del72, Hen85, Oko79]) but not in the general case. Every Artin group A has a special submonoid A+ , called Artin monoid, whose groupification is A itself. In 2006 Dobrinskaya [Dob06] proved that the K(π, 1) conjecture holds for an Artin group A if and only if the natural map BA+ → BA between the classifying spaces of A+ and A is a homotopy equivalence. This revealed an interesting connection between the K(π, 1) conjecture and the geometry beneath Artin monoids. A more concrete proof of the same theorem was given more recently by Ozornova [Ozo13], using the technique of discrete Morse theory (cf. [For98, BW02]). This new proof gave some hints, and left some open questions, about a further connection between the standard CW model for BA+ and the Salvetti complex, a finite CW model for the space N (A) introduced by Salvetti [Sal87, Sal94]. In this work we will explore such connection, showing that the standard CW model for BA+ can be collapsed (in the sense of discrete Morse theory) to obtain a CW complex which is naturally homotopy equivalent to the Salvetti complex. This results also answers some of the open questions in [Ozo13] concerning the computation of the homology of Artin groups, and gives another proof of Dobrinskaya’s theorem. 1 2 GIOVANNI PAOLINI 2. Preliminaries In this section we are going to recall some concepts and known results concerning Coxeter and Artin groups, Artin monoids, the Salvetti complex, the K(π, 1) conjecture, and discrete Morse theory. 2.1. Coxeter and Artin groups. Let S be a finite set, and let M = (ms,t )s,t∈S be a square matrix indexed by S and satisfying the following properties: • ms,t ∈ {2, 3, . . . } ∪ {∞} for all s 6= t, and ms,t = 1 for s = t; • ms,t = mt,s i.e. M is symmetric. Such a matrix is called a Coxeter matrix. From a Coxeter matrix M , we define the corresponding Coxeter group as follows: W = h S | (st)ms,t = 1 ∀ s, t ∈ S such that ms,t 6= ∞ i. Given a subset T ⊆ S, let WT be the subgroup of W generated by T . This is also a Coxeter group, with the natural structure deriving from the Coxeter matrix M |T ×T [Bou68]. Also, define S f as the set of subsets T of S such that WT is finite. Coxeter groups are naturally endowed with a length function ` : W → N, namely the function that maps an element w ∈ W to the minimal length of an expression of w as a product of generators in S. Since in W all the generators of S have order 2, the relations (st)ms,t = 1 for s 6= t can be also written as Π(s, t, ms,t ) = Π(t, s, ms,t ), where the notation Π(a, b, m) stands for ( m (ab) 2 Π(a, b, m) = m−1 (ab) 2 a if m is even, if m is odd. For instance, if ms,t = 3 the relation (st)3 = 1 can be written as sts = tst. So we have that   s2 = 1 ∀ s ∈ S, W = S . Π(s, t, ms,t ) = Π(t, s, ms,t ) ∀ s, t ∈ S such that ms,t 6= ∞ Consider now the set Σ = {σs | s ∈ S}, which is in natural bijection with S, and define an Artin group as follows. A = h Σ | Π(σs , σt , ms,t ) = Π(σt , σs , ms,t ) ∀ s, t ∈ S such that ms,t 6= ∞i. Clearly, for any Coxeter matrix M there is a natural projection π : A → W between the corresponding Artin and Coxeter groups, sending σs to s for all s ∈ S. If W is finite, then we say that A is an Artin group of finite type. 2.2. Artin monoids. The Artin monoid corresponding to a Coxeter matrix M is the monoid presented as A+ = h Σ | Π(σs , σt , ms,t ) = Π(σt , σs , ms,t ) ∀ s, t ∈ S such that ms,t 6= ∞i. The reason why we take the freedom to use the same generating set Σ for A+ and for A is given by the following theorem. Theorem 2.1 ([Par02]). The natural monoid homomorphism A+ → A is injective. ON THE CLASSIFYING SPACE OF ARTIN MONOIDS 3 In view of Theorem 2.1, from now on we will consider A+ as contained in A. The Artin monoid is also called positive monoid of A, for its elements are precisely those which can be written as a product (with positive exponents) of generators in Σ. An immediate consequence of the previous theorem is that the Artin monoid is left and right cancellative (this was originally proved in [BS72]). Since the relations Π(σs , σt , ms,t ) = Π(σt , σs , ms,t ) involve the same number of generators on the left hand side and on the right hand side, there is a well defined length function ` : A+ → N that sends an element σs1 · · · σsk ∈ A+ to the length k of its representation. Definition 2.2. Given α, β ∈ A+ , we say that α  L β if there exists γ ∈ A+ such that αγ = β. Similarly we say that α  R β if there exists γ ∈ A+ such that γα = β. If α  L β we also say that α is a left divisor of β, that α left divides β, or that β is left divisible by α. We do the same for right divisibility. Both  L and  R are partial order relations on A+ [BS72]. Definition 2.3. Let E be a subset of A+ . A left common divisor of E is any element of A+ which left divides all elements of E. A greatest left common divisor of E is a left common divisor of E which is left multiple of all the left common divisors of E. Similarly, a left common multiple of E is any element of A+ which is left multiple of all elements of E, and a left least common multiple of E is a left common multiple of E which is left divisible for all the left common multiples of E. Define in the obvious way the analogous concepts for right divisibility. Proposition 2.4 ([BS72]). When a greatest common divisor or a least common multiple exists for a set E, then it is unique. Proposition 2.5 ([BS72]). Let E be a subset of A+ . If E admits a left (resp. right) common multiple, then it also admits a least left (resp. right) common multiple. Proposition 2.6 ([BS72]). Any non-empty subset E of A+ admits a greatest left common divisor and a greatest right common divisor. We are now going to introduce the fundamental element of the Artin monoid, which is (when it exists) significantly important. Recall that Σ = {σs | s ∈ S}. Theorem 2.7 ([BS72]). For an Artin monoid A+ , the following conditions are equivalent: • A is of finite type; • Σ admits a least left common multiple; • Σ admits a least right common multiple. Moreover, if they are satisfied, then the least left common multiple and the least right common multiple of Σ coincide. Definition 2.8. If M is a Coxeter matrix corresponding to an Artin group of finite type, the least left (or right) common multiple of Σ in A+ is called fundamental element of A+ and is usually denoted by ∆. The following theorem summarizes some of the properties of the fundamental element. Before that, two more definitions are required. Definition 2.9. An element α ∈ A+ is squarefree if it cannot be written in the form βσs2 γ for β, γ ∈ A+ and s ∈ S. 4 GIOVANNI PAOLINI Definition 2.10. Let rev : A+ → A+ be the bijection that sends an element σs1 σs2 · · · σsk ∈ A+ to its “reverse” σsk σsk−1 · · · σs1 . It is easy to check that it is well defined. Theorem 2.11 ([BS72]). Let M be a Coxeter matrix corresponding to an Artin group of finite type, so that A+ admits a fundamental element ∆. Then the following properties hold: (i) rev ∆ = ∆; (ii) an element of A+ left divides ∆ if and only if it right divides ∆; (iii) an element of A+ is squarefree if and only if it is a (left or right) divisor of ∆; (iv) the least (left or right) common multiple of squarefree elements of A+ is squarefree; (v) ∆ is the uniquely determined squarefree element of maximal length in A+ ; (vi) ∆ = τ (δ), where δ is the longest element of W ; (vii) any element α ∈ A can be written in the form α = ∆−k β for some β ∈ A+ and k ∈ N. Consider now some subset T ⊆ S. Let ΣT = {σs | s ∈ T } and let AT be the subgroup of A generated by ΣT . Theorem 2.12 ([vdL83]). The natural homomorphism AT → A which sends σs to σs for all s ∈ T is injective. In other words, AT is the Artin group corresponding to the Coxeter matrix MT ×T . Theorem 2.13 ([BS72]). The least (left or right) common multiple of ΣT exists in A+ if and only if the Coxeter matrix MT ×T is of finite type. If MT ×T is a Coxeter matrix of finite type, it makes sense to consider the fundamental element of the Artin monoid A+ T corresponding to MT ×T . Such element will be denoted by ∆T . Lemma 2.14 ([BS72]). ∆T is precisely the least (left or right) common multiple of ΣT in A+ . We will finally introduce a normal form for elements of the Artin monoid A+ . To do so, define for any α ∈ A+ the set I(α) = {s ∈ S | α = βσs for some β ∈ A+ }. In other words, I(α) is the set of elements s ∈ S such that σs right divides α. Theorem 2.15 ([BS72]). For any α ∈ A+ there exists a unique tuple (T1 , . . . , Tk ) of non-empty subsets of S such that α = ∆Tk ∆Tk−1 · · · ∆T1 and I(∆Tk · · · ∆Tj ) = Tj for 1 ≤ j ≤ k. 2.3. The Salvetti complex and the K(π, 1) conjecture. The Salvetti complex was first defined by Salvetti [Sal87] for arrangements of affine hyperplanes, thus including Coxeter graphs of finite and affine type, and later generalized by for arbitrary Coxeter graphs (see [Sal94, Par12]). We are going to define it as in [Par12], and we will quote some known results about it. Definition 2.16. Given a poset (P, ≤), its derived complex is a simplicial complex with P as set of vertices and having a simplex {p1 , . . . , pk } for every chain p1 ≤ p2 ≤ . . . ≤ pk in P . ON THE CLASSIFYING SPACE OF ARTIN MONOIDS 5 Definition 2.17. Let T ⊆ S. An element w ∈ W is T -minimal if it is the unique element of smallest length in the coset wWT (the uniqueness of such element is proved in [Bou68]). Consider now the set W × S f , with the following partial order: (u, T ) ≤ (v, R) if T ⊆ R, v −1 u ∈ WR and v −1 u is T -minimal (we omit the proof that this is indeed a partial order relation). Lemma 2.18 ([Par12]). Let (u, T ) ∈ W × S f , and set P = {(v, R) ∈ W × S f | (v, R) ≤ (u, T )}, P1 = {(v, R) ∈ W × S f | (v, R) < (u, T )}. Call P 0 and P10 the geometric realizations of the derived complexes of (P, ≤) and (P1 , ≤), respectively. Then the pair (P 0 , P10 ) is homeomorphic to the pair (Dn , S n−1 ) for n = |T |. Definition 2.19. The Salvetti complex of a Coxeter matrix M , denoted by Sal(M ), is the geometric realization of the derived complex of (W × S f , ≤). By Lemma 2.18 it has a CW structure with one cell C(u, T ) for all (u, T ) ∈ W × S f , where the dimension of a cell C(u, T ) is |T |. The Coxeter group W acts on W ×S f by left-multiplication on the first coordinate, and thus also acts on Sal(M ). Such action is free, properly discontinuous and cellular, so the quotient map Sal(M ) → Sal(M )/W is a covering map. Moreover such covering map induces a CW structure on the quotient space Sal(M ) = Sal(M )/W . The complex Sal(M ) has one cell C̄(T ) of dimension |T | for each T ∈ S f . Let’s describe in more detail the combinatorics of the low-dimensional cells of the complexes Sal(M ) and Sal(M ). • The 0-cells of Sal(M ) are in one-to-one correspondence with the elements of the Coxeter group W . For this reason we also denote a 0-cell C(w, ∅) simply by w. • Since {s} ∈ S f for all s ∈ S, we have a 1-cell C(w, {s}) joining vertices w and ws for each w ∈ W and s ∈ S. Notice that the 1-cell C(ws, {s}) joins vertices w and ws, but is different from C(w, {s}). Orient the 1-cell C(w, {s}) from w to ws. • A 2-cell C(w, {s, t}) exists only if {s, t} ∈ S f , i.e. if m = ms,t 6= ∞. If it exists, such 2-cell is a 2m-agon with vertices w, ws, wst, . . . , w Π(s, t, m − 1), w Π(s, t, m) = w Π(t, s, m), w Π(t, s, m − 1), . . . , wt. See also Figure 1 for a representation of such cell in the case m = 3. The quotient complex Sal(M ) has one 0-cell C̄(∅), a 1-cell C̄({s}) for each s ∈ S, and a 2-cell C̄({s, t}) for each {s, t} ∈ S f . Therefore the fundamental group of Sal(M ) admits a representation with a generator σs for each s ∈ S and a relation for each 2-cell C̄({s, t}). Such relation turns out to be exactly of the form Π(σs , σt , ms,t ) = Π(σt , σs , ms,t ), which means that the fundamental group of Sal(M ) is naturally isomorphic to the corresponding Artin group A. 6 GIOVANNI PAOLINI wts wsts = wtst wt wst w ws Figure 1. Example of a 2-cell C(w, {s, t}) of the complex Sal(M ), in the case ms,t = 3. Given a Coxeter matrix M , a particular representation of the corresponding Coxeter group gives rise in a natural way to a certain topological space N (M ). The K(π, 1) conjecture, due to Brieskorn [Bri73] (for groups of finite type), Arnold, Pham, and Thom [vdL83] (in full generality), is the following. Conjecture 2.20 (K(π, 1) conjecture). The space N (M ) is a classifying space for the Artin group A corresponding to M . We will not discuss further the definition of such space N (M ). We simply need to know that it is homotopy equivalent to the Salvetti complex Sal(M ). Therefore, the K(π, 1) conjecture is equivalent to the following. Conjecture 2.21. The CW complex Sal(M ) is a classifying space for the corresponding Artin group A. The K(π, 1) conjecture would have important consequences in the theory of Artin groups. For instance, the existence of a finite CW model for the classifying space of A implies that the homology of A is finite-dimensional, and that A is torsion-free (both these properties are not known in general). The conjecture was proved only for some families of Artin groups; the most important result in this regard is probably the following. Theorem 2.22 ([Del72]). The K(π, 1) conjecture holds for Artin groups of finite type. 2.4. Discrete Morse theory. Discrete Morse theory is a powerful tool for simplifying CW complexes while mantaining their homotopy type. It was first developed by Forman [For98], who presented it as a combinatorial analogue of Morse theory. Forman’s version of discrete Morse theory, based on the concept of discrete Morse function, was later reformulated by Chari and Batzies in terms of acyclic matchings [Cha00, BW02]. Here we will breafly present the latter formulation, which we will use later. Let X be a CW complex. Recall that each cell of X has a characteristic map Φ : Dn → X and an attaching map ϕ : S n−1 → X, where ϕ = Φ|∂Dn . Definition 2.23. The face poset of X is the set X (∗) of its open cells together with the partial order defined by σ ≤ τ if σ̄ ⊆ τ̄ . Definition 2.24 ([For98]). Let σ, τ ∈ X (∗) . If dim τ = dim σ + 1 and σ ≤ τ we say that σ is a face of τ . We say that σ is a regular face of τ if, in addition, the two following conditions hold (set n = dim σ and let Φ be the attaching map of τ ): ON THE CLASSIFYING SPACE OF ARTIN MONOIDS 7 (i) Φ|Φ−1 (σ) : Φ−1 (σ) → σ is a homeomorphism; (ii) Φ−1 (σ) is homeomorphic to Dn . Definition 2.25 ([For98]). X is a regular CW complex if all the attaching maps are injective. Remark 2.26. If X is regular, then all its faces are regular. Definition 2.27. The cell graph GX of X is the Hasse diagram of X (∗) , i.e. a directed graph with X (∗) as set of vertices and an edge from τ to σ (written τ → σ) if σ is a face of τ . Denote the set of edges of GX by EX . Definition 2.28. A matching on X is a subset M ⊆ EX such that (i) if (τ → σ) ∈ M, then σ is a regular face of τ ; (ii) any cell of X occurs in at most one edge of M. Given a matching M on X, define a graph GM X obtained from GX by inverting all the edges in M. Definition 2.29. A matching M on X is acyclic if the corresponding graph GM X is acyclic. The aim of discrete Morse theory is to construct, from a CW complex X with an acyclic matching M, a simpler CW complex XM (called Morse complex ) homotopy equivalent to X but with fewer cells. Definition 2.30. Let M be an acyclic matching on X. A cell of X is M-essential if it doesn’t occur in any edge of M. Definition 2.31. Let (P, ≤) be a poset. A P -grading on X is a poset map η : X (∗) → P . Given a P -grading on X, for any p ∈ P denote by X≤p the subcomplex of X consisting of all the cells σ such that η(σ) ≤ p. Definition 2.32. A P -grading on X is compact if X≤p is compact for all p ∈ P . Definition 2.33. Let M be an acyclic matching on X and η a P -grading on X. We say that M and η are compatible if η(σ) = η(τ ) for all (τ → σ) ∈ M. In other words, the matching M can be written as union of matchings Mp for p ∈ P , where each Mp is a matching on the fiber η −1 (p). Theorem 2.34 ([BW02]). Let X be a CW complex with an acyclic matching M and a compact P -grading η such that M and η are compatible. Then there exist a CW complex XM , with n-cells in one-to-one correspondence with the M-essential ncells of X, and a homotopy equivalence fM : X → XM . Moreover such construction is natural with respect to inclusion: let Y be a subcomplex of X such that, if (τ → σ) ∈ M and σ ∈ Y (∗) , then τ ∈ Y (∗) ; then YM0 ⊆ XM and the diagram Y X fM0 fM YM0 XM is commutative, where M0 is the restriction of M to GY . The CW complex XM is called Morse complex of X with respect to the acyclic matching M. We are finally going to prove a lemma which will be useful later, when it will come to apply discrete Morse theory. 8 GIOVANNI PAOLINI Lemma 2.35. Let M be a matching on X and let η be a P -grading on X compatible with M. Let Mp be the restriction of M to the fiber η −1 (p), for all p ∈ P . If Mp is acyclic for all p ∈ P , then M is also acyclic. Proof. Suppose by contradiction that the graph GM X contains a cycle. Since the edges in M increase the dimension by 1 whereas all the others lower the dimension by 1, a cycle must be of the form M M M M τ1 −−→ σ1 −−→ τ2 −−→ σ2 −−→ . . . −−→ σk−1 −−→ τk −−→ σk −−→ τ1 , where the edges labelled with M are those belonging to M. Since τi ≥ σi in X (∗) we have that η(τi ) ≥ η(σi ) in P , for all i = 1, . . . , k. Moreover η(σi ) = η(τi+1 ) since (τi+1 → σi ) ∈ M, for all i = 1, . . . , k (the indices are taken modulo k). Therefore η(τ1 ) ≥ η(σ1 ) = η(τ2 ) ≥ η(σ2 ) = · · · = η(τk ) ≥ η(σk ) = η(τ1 ). The first and the last term of this chain of inequalities are equal, so all the terms are equal to the same element p ∈ P . Then this cycle is contained in the graph M GX p and therefore Mp is not acyclic, which is a contradiction.  In view of Lemma 2.35, it possible to weaken the hypothesis of Theorem 2.34 by removing the requirement of M being acyclic and asking instead that Mp is acyclic for all p ∈ P (where Mp is the restriction of M to the fiber η −1 (p)). In this way the P -grading η is used to obtain both compactness and acyclicity. 3. The classifying space of monoids We are now going to introduce the notion of classifying space of a monoid, as a particular case of the classifying space of a small category (viewing a monoid as a category with one object) [Seg73]. Definition 3.1. The classifying space BM of a monoid M is the geometric realization of the following simplicial set. The n-simplices are given by the sequences (x1 , . . . , xn ) of n elements of M , denoted by the symbol [x1 | . . . |xn ]. The face maps send an n-simplex [x1 | . . . |xn ] to the simplices [x2 | . . . |xn ], [x1 | . . . |xi xi+1 | . . . |xn ] for i = 1, . . . , n − 1, and [x1 | . . . |xn−1 ]. The degeneracy maps send [x1 | . . . |xn ] to [x1 | . . . |xi |1|xi+1 | . . . |xn ] for i = 0, . . . , n. As shown in [Mil57], the geometric realization of a simplicial set is a CW complex having a n-cell for each non-degenerate n-simplex. Therefore the classifying space of a monoid is a CW complex having as n-cells the simplices [x1 | . . . |xn ] with xi = 6 1 for all i. Notice also that BM has only one 0-cell denoted by [ ]. Definition 3.2. The groupification of a monoid M is a group G together with a homomorphism M → G satisfying the following universal property: for any group H and homomorphism M → H, there exists a unique homomorphism G → H which makes the following diagram commutative. M G H Remark 3.3. If any presentation of M is given, then the groupification G of M is the group with the same presentation. ON THE CLASSIFYING SPACE OF ARTIN MONOIDS 9 Remark 3.4. The fundamental group of the classifying space BM of a monoid M is given by the groupification G of M . This can be easily seen using the well-known presentation of the fundamental group of a CW complex with one 0-cell: generators are given by the 1-cells, and relations are given by the attaching maps of the 2-cells. In our case the generator set is {[x] | x ∈ M, x 6= 1} and the relation corresponding to the 2-cell [x|y] is given by [x][y][xy]−1 if xy = 6 1 and [x][y] if xy = 1. This is indeed a presentation for the groupification G of M , by Remark 3.3. Before focusing on the case of Artin monoids, we are going to give an explicit construction for the universal cover of BM for any monoid M that injects in its groupification G (i.e. when the natural map M → G is injective). This construction generalizes the one of Example 1B.7 in [Hat02]. Let EM be the geometric realization of the simplicial set whose n-simplices are given by the (n + 1)-tuples [g|x1 | . . . |xn ], where g ∈ G and xi ∈ M . The i-th face map sends [g|x1 | . . . |xn ] to   for i = 0; [gx1 |x2 | . . . |xn ] [g|x1 | . . . |xi xi+1 | . . . |xn ] for 1 ≤ i ≤ n − 1;   [g|x1 | . . . |xn−1 ] for i = n. The i-th degeneracy map sends [g|x1 | . . . |xn ] to [g|x1 | . . . |xi |1|xi+1 | . . . |xn ] for all i = 0, . . . , n. Notice that the vertices of EM are in bijection with the group G, and that the vertices of an n-simplex [g|x1 | . . . |xn ] are of the form [gx1 · · · xi ] for i = 0, . . . , n. The group G acts freely and simplicially on EM by left multiplication: an element h ∈ G sends the simplex [g|x1 | . . . |xn ] to the simplex [hg|x1 . . . |xn ]. Thus the quotient map EM → EM/G is a covering map. Lemma 3.5. EM/G is naturally homeomorphic to BM . Proof. A simplex [x1 | . . . |xn ] of BM can be identified with the equivalence class of the simplex [1|x1 | . . . |xn ] of EM/G. This identification is bijective and respects face maps and degeneracy maps, so it is a homeomorphism.  Proposition 3.6. The space EM is the universal cover of BM , with the natural covering map p : EM → BM obtained composing the quotient map EM → EM/G and the homeomorphism EM/G → BM of Lemma 3.5. Proof. We have already seen that p is indeed a covering map. Therefore it is enough to show that EM is simply connected. Choose [ ] and [1] as basepoints for BM and EM respectively, so that p : (EM, ∗) → (BM, ∗) becomes a basepoint-preserving covering map. An element c of π1 (BM, ∗) can be represented as a signed sequence (1 [x1 ], . . . , k [xk ]) of 1-cells, where the sign i = ±1 indicates whether the arc [xi ] is travelled in positive or negative direction. If we lift such path to the covering space EM , we obtain a path passing through the vertices [1], [x11 ], [x11 x22 ], . . . , [x11 x22 · · · xkk ]. Notice that under the isomorphism  π1 (BM, ∗) ∼ = G of Remark 3.4 the path c corresponds precisely to x11 x22 · · · xkk . This means that if c is non-trivial in π1 (BM, ∗) then it lifts to a non-closed path in EM . Since p∗ : π1 (EM, ∗) → π1 (BM, ∗) is injective, we can conclude that π1 (EM, ∗) is trivial.  The space EM has a particular subcomplex E + M consisting of all the cells [g|x1 | . . . |xn ] such that g ∈ M . In analogy to the case when M is a group (for which EM = E + M ), we prove that E + M is contractible. 10 GIOVANNI PAOLINI Proposition 3.7. The space E + M deformation retracts onto its vertex [1]. In particular it is contractible. Proof. Any simplex [g|x1 | . . . |xn ] of E + M is a face of the (possibly degenerate) simplex [1|g|x1 | . . . |xn ], which is also in E + M . Then we have a deformation retraction of E + M onto the vertex [1] which slides any point q ∈ [g|x1 | . . . |xn ] along the line segment from q to [1]. Such line segment exists in [1|g|x1 | . . . |xn ], and is well defined in E + M because the attaching maps of the simplices are linear.  4. The Salvetti complex and Artin monoids In [Dob06], Dobrinskaya proved that the K(π, 1) conjecture can be reformulated as follows. Theorem 4.1 ([Dob06]). The K(π, 1) conjecture holds for an Artin group A if and only if the natural map BA+ → BA is a homotopy equivalence. Dobrinskaya’s theorem is particularly interesting since it relates the K(π, 1) conjecture to the problem of determining when the natural map M → G between a monoid and its groupification induces a homotopy equivalence BM → BG between the corresponding classifying spaces. Such phenomenon is known to happen in some cases (see [MS76]), but the general problem is still open. To prove Theorem 4.1, Dobrinskaya also proved the following result. Theorem 4.2 ([Dob06]). The space N (M ) is homotopy equivalent to the classifying space BA+ of the Artin monoid A+ corresponding to M . It is quite easy to deduce Theorem 4.1 from Theorem 4.2. Indeed, if the natural map BA+ → BA is a homotopy equivalence then N (M ) ' BA+ ' BA, so the K(π, 1) conjecture holds for the Artin group A. On the other hand, if the K(π, 1) conjecture holds for A then both spaces BA and BA+ are classifying spaces for A, so the natural map BA+ → BA must be a homotopy equivalence since it induces an isomorphism at the level of fundamental groups. In the rest of this section we will present a new proof of Theorem 4.2 based on discrete Morse theory. Some ideas are taken from a recent work of Ozornova [Ozo13], but we will prove the stronger statement that the space BA+ can be collapsed (in the sense of discrete Morse theory) to obtain a CW complex which is naturally homotopy equivalent to the Salvetti complex Sal(M ). This in particular answers some of the questions left open in [Ozo13], Section 7. From now on, let M be a Coxeter matrix and A the corresponding Artin group. When A is of finite type we are able to show that EA+ is contractible. Before that, recall the following classical result which be deduced from [Hat02], Corollary 4G.3. Lemma 4.3. Let X be a CW complex, and let {Yi | i ∈ N} be a family of contractible subcomplexes of X such that Yi ⊆ Yi+1 for all i ∈ N and [ Yi = X. i∈N Then X is also contractible. Theorem 4.4. If A is an Artin group of finite type, then the space EA+ is contractible. ON THE CLASSIFYING SPACE OF ARTIN MONOIDS 11 Proof. To make the notation more readable denote the space EA+ by X and its subcomplex E + A+ by X + . For any h ∈ A the subcomplex hX + is homeomorphic to X + , and therefore it is contractible by Proposition 3.7. Notice also that hX + consists of all the simplices [g|x1 | . . . |xn ] of X such that g  L h. Then by Theorem 2.11, if ∆ is the fundamental element of A+ , X is the union of the subcomplexes Yi = ∆−i X + for i ∈ N. Since Yi ⊆ Yi+1 for all i, we can apply Lemma 4.3 to conclude that X is contractible.  Corollary 4.5. If A is an Artin group of finite type, then the classifying space BA+ is a classifying space for A. Proof. This result follows immediately by Remark 3.4, Proposition 3.6 and Theorem 4.4.  We are going to construct an acyclic matching M on BA+ which is essentially a combination of the two matchings used in [Ozo13], with the difference that ours will be entirely on the topological level. Set Z = BA+ and D = {∆T | T ∈ S f \ {∅}}, + where ∆T is the fundamental element of A+ T ⊆ A . First we are going to describe some definitions and results of [Ozo13], which will lead to the construction of two matchings M1 and M2 . • A cell c = [x1 | . . . |xn ] ∈ Z (∗) is µ1 -essential if the product xk · · · xn lies in D for 1 ≤ k ≤ n. • The µ1 -depth of a cell c = [x1 | . . . |xn ] is given by d1 (c) = min{j | [xj | . . . |xn ] is µ1 -essential}, with the convention that d1 (c) = n + 1 if no such j exists. Notice that c is µ1 -essential if and only if d1 (c) = 1. • For a cell c = [x1 | . . . |xn ] of µ1 -depth d, and for d ≤ k ≤ n, define Ik ⊆ S to be the unique subset of S with the property that xk · · · xn = ∆Ik . • A cell c = [x1 | . . . |xn ] of µ1 -depth d > 0 is µ1 -collapsible if I(xd−1 xd · · · xn ) = Id , Lemma 4.6 ([Ozo13]). Define   c1 = [x1 | . . . |xn ] ∈ Z (∗) is µ1 -collapsible, and M1 = (c1 → c2 ) . c2 = [x1 | . . . |xd−1 xd | . . . |xn ] where d = d1 (c1 ) Then M1 is an acyclic matching on Z with essential cells given by the µ1 -essential cells defined above. To construct the second matching M2 , assume from now on that the set S carries a total order ≤. Notice that a µ1 -essential cell c = [x1 | . . . |xn ] is completely characterized by the sequence of subsets I1 ⊂ I2 ⊂ · · · ⊂ Ik defined above. • A µ1 -essential cell c = [x1 | . . . |xn ] is µ2 -essential if, for any 1 ≤ k ≤ n, Ik \ Ik+1 = {sk } and sk = max Ik . • The µ2 -depth of a µ1 -essential cell c = [x1 | . . . |xn ] is given by d2 (c) = min{j | [xj | . . . |xn ] is µ2 -essential}, • A µ1 -essential cell c = [x1 | . . . |xn ] of µ2 -depth d > 0 is µ2 -collapsible if max Id−1 = max Id . 12 GIOVANNI PAOLINI Lemma 4.7 ([Ozo13]). Define   c1 = [x1 | . . . |xn ] ∈ Z (∗) is µ2 -collapsible, and . M2 = (c1 → c2 ) c2 = [x1 | . . . |xd−1 xd | . . . |xn ] where d = d2 (c1 ) Then M2 is an acyclic matching on Z with essential cells given by the non-µ1 essential cells and the µ2 -essential cells. Consider now the matching M = M1 ∪M2 on Z. With a slight abuse of notation, define the length of a cell as `([x1 | . . . |xn ]) = `(x1 · · · xn ) for any cell [x1 | . . . |xn ] ∈ Z (∗) . Define also a function η : Z (∗) → N × {0, 1} as follows: ( (`(c), 0) if c is µ1 -essential; η(c) = (`(c), 1) if c is not µ1 -essential. Lemma 4.8. The function η : Z (∗) → N × {0, 1} is a compact grading on Z, if N × {0, 1} is equipped with the lexicographic order. Proof. First we have to prove that η is a poset map. For this it is enough to prove that, for any cell c1 = [x1 | . . . |xn ] ∈ Z (∗) and for any cell c2 which is a face of c1 , η(c1 ) ≥ η(c2 ). Suppose by contradiction that η(c1 ) < η(c2 ) for some cells c1 and c2 as above. Since `(c1 ) ≥ `(c2 ) the only possibility is that η(c1 ) = (k, 0) and η(c2 ) = (k, 1) where k = `(c1 ) = `(c2 ). This means in particular that c1 is µ1 -essential whereas c2 is not. Since `(c1 ) = `(c2 ), the cell c2 must be of the form c2 = [x1 | . . . |xi xi+1 | . . . |xn ] for some i ∈ {1, . . . , n − 1}. Clearly if c1 is µ1 -essential then also c2 is, so we obtain a contradiction. It only remains to prove that Z(n,q) is compact for all (n, q) ∈ N × {0, 1}. This is immediate since Z(n,q) contains only cells of length ≤ n and there is only a finite number of them.  Proposition 4.9. The matching M on Z is acyclic and compatible with the compact grading η. Proof. First let us prove that M and η are compatible. If (c1 → c2 ) ∈ M1 then, by definition of M1 , we have that `(c1 ) = `(c2 ) and that both c1 and c2 are not µ1 -essential. On the other hand, if (c1 → c2 ) ∈ M2 , then `(c1 ) = `(c2 ) and both c1 and c2 are µ1 -essential. In any case we have η(c1 ) = η(c2 ), which means that M and η are compatible. Consider a fiber η −1 (n, q), for some (n, q) ∈ N × {0, 1}. It cannot simultaneously contain edges in M1 and edges in M2 , because the value of q determines whether the cells in η −1 (n, q) must be µ1 -essential or not. Since M1 and M2 are acyclic, the restriction of M to η −1 (n, q) is also acyclic. This is true for all fibers η −1 (n, q), therefore by Lemma 2.35 we can conclude that M is also acyclic.  The previous proposition allows to apply Theorem 2.34 to Z, obtaining a smaller CW complex which we will call Y . The essential cells of the matching M are precisely the µ2 -essential cells. Notice that a µ2 -essential cell c = [x1 | . . . |xn ] ∈ Z (∗) is uniquely identified by the set I(x1 · · · xn ) ∈ S f . This means that the cells of Y are in one-to-one correspondence with S f . ON THE CLASSIFYING SPACE OF ARTIN MONOIDS 13 Call eT the cell of Y corresponding to the set T ∈ S f . Then dim eT = |T |. By construction, every oriented path in the graph GM Z starting from a cell [x1 | . . . |xn ] with all xi ∈ T ends in a cell [x01 | . . . |x0m ] also satisfying x0j ∈ T for all j. Therefore the attaching map of eT has image contained in the union of the cells eR with R ( T . Thus any subset F ⊆ S f which is closed under inclusion (i.e. R ⊆ T ∈ F implies R ∈ F) corresponds to a subcomplex YF of Y . In particular this holds when F = T f for any T ⊆ S. In a similar way we have subcomplexes SalF (M ) of Sal(M ) for all subsets F of S f closed under inclusion. Remark 4.10. The reduced complex Y is natural with respect to inclusion of the set S. Indeed, consider Coxeter matrices M , M 0 on the generating sets S, S 0 such that S ⊆ S 0 (with a fixed total order on S 0 , which induces a total order on S) and M 0 |S×S = M . Then we obtain reduced complexes Y and Y 0 such that Y can be naturally identified with the subcomplex YS0 f of Y 0 . This is true because for any + non-degenerate simplex e of the subcomplex BA+ M ⊆ BAM 0 all the faces of e, as well as the matched cell µ(e), also belong to the subcomplex BA+ M . Here we indicated with AM and AM 0 the Artin groups corresponding to M and M 0 , respectively. Let us recall a few more results of homotopy theory which will be used later. Lemma 4.11 ([Hat02], Proposition 0.18). If (X1 , A) is a CW pair and we have attaching maps f, g : A → X0 that are homotopic, then X0 tf X1 ' X0 tg X1 rel X0 . Corollary 4.12. If X is a CW complex and f, g : S n−1 → X are two attaching maps of an n-cell en that are homotopic, then X tf en ' X tg en rel X. Proof. It follows from the previous lemma with (X1 , A) = (Dn , S n−1 ) and X0 = X.  We are finally ready to prove that the CW complexes Y and Sal(M ) are homotopy equivalent. In order to prove our main theorem, the following lemma is required. Lemma 4.13. Up to orientation, the boundary curve of a 2-cell e{s,t} of Y is given by ( −1 Π(e{s} , e{t} , ms,t ) Π(e−1 {s} , e{t} , ms,t ) if ms,t is even; −1 Π(e{s} , e{t} , ms,t ) Π(e−1 {t} , e{s} , ms,t ) if ms,t is odd. Proof. By Remark 4.10 it is sufficient to treat the case S = {s, t}, so that Y consists only of one 0-cell e∅ , two 1-cells e{s} , e{t} and one 2-cell e{s,t} . Suppose that s > t (in the other case the result is the same but with reversed orientation). Set ( Π(a, b, k) if k is even, Π0 (a, b, k) = Π(b, a, k) if k is odd. Moreover, set ξsk = Π0 (σt , σs , k), ξtk = Π0 (σs , σt , k). Essentially ξsk is a product of k alternating elements (σs or σt ) ending with σs , and ξtk is the same but ending with σt . For example, ξs4 = σt σs σt σs . Set also m = ms,t . 14 GIOVANNI PAOLINI The cells e∅ , e{s} , e{t} and e{s,t} correspond to the M-essential cells of Z, which are the following: c∅ = [ ], c{s} = [σs ], c{t} = [σt ], c{s,t} = [ξsm−1 |σt ]. If c is a cell of Z, call M<c the restriction of the matching M to the cells that are < c with respect to the partial order induced by the acyclic graph GM Z . Since M<c is also an acyclic matching on Z, compatible with the compact grading η, we can consider the complex Y <c obtained collapsing Z along the matching M<c . For simplicity, we will call a cell of some Y <c with the same name as the corresponding M<c -essential cell in Z. We want to prove by induction on k the following two assertions: (i) the boundary curve of the 2-cell c = [ξtk |σs ] in Y <c is Π0 ([σt ], [σs ], k + 1) [ξsk+1 ]−1 for 1 ≤ k ≤ m − 1; (ii) the boundary curve of the 2-cell c = [ξsk |σt ] in Y <c is Π0 ([σs ], [σt ], k + 1) [ξtk+1 ]−1 for 1 ≤ k ≤ m − 2. The base steps are for k = 1. Start from case (i). We have c = [σt |σs ], whose boundary in Z is given by [σt ][σs ][σt σs ]−1 . The 1-cells [σt ] and [σs ] are M-essential, whereas the 1-cell [σt σs ] is matched with c. Therefore all these 1-cells are M<c essential. This means that the boundary of c in Y <c is also given by [σt ][σs ][σt σs ]−1 . Case (ii) is similar: we have c = [σs |σt ], and its boundary in Z is [σt ][σs ][σs σt ]−1 . This is also the boundary in Y <c , because [σs σt ] is matched with c (this wouldn’t be true for m = 2, but such case is excluded by the condition k ≤ m − 2). We want now to prove step k, case (i), for 2 ≤ k ≤ m − 1. We have c = [ξtk |σs ], whose boundary in Z is given by [ξtk ][σs ][ξsk+1 ]−1 . The 1-cell [σs ] is M-essential, so it is in particular M<c -essential. The 1-cell [ξsk+1 ] is matched with c in M, so it is M<c -essential. Finally the 1-cell [ξtk ] is matched with c0 = [ξsk−1 |σt ], whose boundary 0 in Y <c is by induction hypothesis Π0 ([σs ], [σt ], k) [ξtk ]−1 . Thus the boundary of c in <c Y is given by Π0 ([σs ], [σt ], k) [σs ] [ξsk+1 ]−1 = Π0 ([σt ], [σs ], k + 1) [ξsk+1 ]−1 . See the left part of Figure 2 for a picture of case (i). We finally want to prove step k, case (ii), for 1 ≤ k ≤ m − 2. We have c = [ξsk |σt ], whose boundary in Z is given by [ξsk ][σt ][ξtk+1 ]−1 . The 1-cell [σt ] is M-essential, so it is M<c -essential. The 1-cell [ξtk+1 ] is matched with c in M (notice that this is true only for k < m − 1, because ξtm = ξsm ), thus it is also M<c -essential. The only 1-cell left to analyze is [ξsk ], which is matched with c0 = [ξtk−1 |σs ], whose boundary 0 in Y <c is by induction Π0 ([σt ], [σs ], k) [ξsk ]−1 . Then the boundary of c in Y <c is given by Π0 ([σt ], [σs ], k) [σt ] [ξtk+1 ]−1 = Π0 ([σs ], [σt ], k + 1) [ξtk+1 ]−1 . See the right part of Figure 2 for a picture of case (ii). ON THE CLASSIFYING SPACE OF ARTIN MONOIDS [σt ] [σs ] [σs ] 15 [σt ] [σt ] [σs ] [ξtk−1 |σs ] [ξsk−1 |σt ] [ξtk ] [σs ] [ξsk ] [ξtk |σs ] [ξsk |σt ] [ξsk+1 ] [ξtk+1 ] [σt ] Figure 2. On the left: the induction step, case (i); on the right: the induction step, case (ii). The boundary curve for all the 2-cells is denoted clockwise, starting from the black vertex. The light arrows indicate the Morse collapse. The induction argument is complete. To end the proof, consider now the 2cell c{s,t} = [ξsm−1 |σt ] of Z. Its boundary is [ξsm−1 ][σt ][ξtm ]. The 1-cell [σt ] is M-essential. The 1-cell [ξsm−1 ] is matched with c0 = [ξtm−2 |σs ], whose boundary 0 in Y <c is Π0 ([σt ], [σs ], m − 1) [ξsm−1 ]−1 . The 1-cell [ξtm ] = [ξsm ] is matched with 00 c00 = [ξtm−1 |σs ], whose boundary in Y <c is Π0 ([σt ], [σs ], m) [ξsm ]−1 . Therefore the boundary of c{s,t} in Y is  −1 Π0 ([σt ], [σs ], m − 1) [σt ] Π0 ([σt ], [σs ], m) = Π0 ([σt ], [σs ], m − 1) [σt ] Π([σs ]−1 , [σt ]−1 , m) = Π0 ([σs ], [σt ], m) Π([σs ]−1 , [σt ]−1 , m). Up to orientation and starting point of the boundary curve, this is exactly what is stated in the lemma.  Theorem 4.14. For any Coxeter matrix M there exists a homotopy equivalence ψ : Y → Sal(M ) such that, for every subset F of S f closed under inclusion, the restriction ψ|YF has image contained in SalF (M ) and ψ|YF : YF → SalF (M ) is also a homotopy equivalence. Proof. We are going to construct simultaneously the map ψ of the statement and its homotopy inverse ψ 0 : Sal(M ) → Y , together with homotopies F : Y × [0, 1] → Y between ψ 0 ◦ ψ and idY , and F 0 : Sal(M ) × [0, 1] → Sal(M ) between ψ ◦ ψ 0 and idSal(M ) . Consider a chain {∅} = F1 ⊆ F2 ⊆ · · · ⊆ Fk = S f of subsets of S f closed under inclusion and such that |Fi+1 | = |Fi | + 1 for all i. We will define ψ, ψ 0 , F and F 0 recursively on the subcomplexes YFi and SalFi (M ), starting with the subcomplexes YF1 and SalF1 consisting only of one 0-cell, and extending them one cell at a time. We will construct the maps in such a way that ψ|YFi has image contained in SalFi (M ), ψ 0 |SalF (M ) has image contained in YFi , and the same will i hold for the homotopies F and F 0 for any time t ∈ [0, 1]. Simultaneously we will prove by induction that, for any subset F ⊆ Fi closed under inclusion, 16 GIOVANNI PAOLINI • the constructed maps ψ|YFi : YFi → SalFi (M ) and ψ 0 |SalF i (M ) : SalFi (M ) → YFi , restricted to YF and SalF (M ), have image contained in SalF (M ) and YF respectively; • the constructed homotopies F |YFi ×[0,1] : YFi × [0, 1] → YFi and F 0 |SalF i (M )×[0,1] : SalFi × [0, 1] → SalFi , restricted to YF × [0, 1] and SalF (M ) × [0, 1], have image contained in YF and SalF (M ) respectively. In particular this means that the restrictions of ψ|YFi and ψ 0 |SalF (M ) to YF and i SalF (M ) are homotopy inverses one of the other through the homotopies obtained 0 by restricting F |YFi ×[0,1] and F |SalF (M )×[0,1] to the subspaces YF × [0, 1] and i SalF (M ) × [0, 1], respectively. Define ψ|YF1 sending the 0-cell of Y to the 0-cell of Sal(M ), and ψ 0 |SalF (M ) as 1 its inverse. Moreover define the homotopies F |YF1 ×[0,1] and F 0 |SalF (M )×[0,1] as the 1 constant maps. Assume now by induction to have already defined the maps ψ|YFi , ψ 0 |SalF (M ) , i F |YFi ×[0,1] and F 0 |SalF (M )×[0,1] for some i. To simplify the notation, set: i X = YFi+1 , X 0 = SalFi+1 (M ), ϑ = ψ|A , ϑ0 = ψ|A0 , A0 = SalFi (M ), A = YFi , G = F |A×[0,1] , G0 = F 0 |A0 ×[0,1] . Let T be the only element of S f which belongs to Fi+1 but not to Fi . Moreover let en and f n be the n-cells corresponding to T in X and X 0 respectively. We want to extend ϑ to en , G to en × [0, 1], ϑ0 to f n and G0 to f n × [0, 1]. If n = 1 we simply send homeomorphically e1 to f 1 , preserving the orientation, and f 1 to e1 with the inverse homeomorphism; the homotopies G and G0 are then extended being constant on the new cells. If n = 2 we can apply Lemma 4.13 to observe that the boundary curve of e2 in X is the same (via ϑ) as the boundary curve of f 2 in X 0 ; then we extend ϑ sending e2 to f 2 homeomorphically, preserving the boundary, and similarly we extend ϑ0 . The homotopies G and G0 can be extended to the new cells by Corollary 4.12. Now we are going to deal with the case n ≥ 3. Consider the following subsets of S f , which are closed under inclusion: F ∗ = F ∪ {T }. F = {R ∈ S f | R ( T }, b = YF , X b = YF ∗ , A b0 = SalF (M ) and X b 0 = SalF ∗ (M ). Notice that F ⊆ Fi Set A because Fi+1 is closed under inclusion and T is the only element in Fi+1 \ Fi . Then we have the following inclusions of CW complexes. A X A0 X0 b A b X b0 A b0 X ON THE CLASSIFYING SPACE OF ARTIN MONOIDS 17 b is obtained Let ϕ : S n−1 → A be the attaching map of the cell en . Notice that X n b from A by attaching the same cell e , so the image of ϕ is actually contained in b Thus we have ϕ : S n−1 → A. b With the same argument we can deduce that A. 0 n b0 . Setting M1 = M |T ×T the attaching map ϕ of f has image contained in A we have that M1 is a Coxeter matrix corresponding to a finite Coxeter group, because T ∈ S f . Let AM1 be the Artin group corresponding to M1 . The CW b = YF ∗ ' BA+ is a space of type K(AM , 1) by Corollary 4.5. Similarly, complex X 1 M1 0 b X = SalF ∗ (M ) ' Sal(M1 ) is also a space of type K(AM1 , 1) by Theorem 2.22. By induction we know that ϑ : A → A0 and ϑ0 : A0 → A are homotopy inverses one of the other through the homotopies G and G0 , and that the restrictions b → A b0 and λ0 = ϑ0 |Ab0 : A b0 → A b are homotopy inverses one of the λ = ϑ|Ab : A b × [0, 1] → A b and H 0 = other through the restricted homotopies H = G|A×[0,1] :A b 0 0 0 0 b b G |Ab ×[0,1] : A × [0, 1] → A . b = 0 and πn−1 (X b 0 ) = 0, the maps λ and λ0 can be extended to Since πn−1 (X) maps b →X b 0 , λ̃0 : X b 0 → X. b λ̃ : X b b ×{0, 1} → X b where H̄|X×{0} b →X b Extend H to the map H̄ : A×[0, 1]∪X = λ̃0 ◦λ̃ : X b n b b b and H̄|X×{1} = idX . Then attaching the (n+1)-cell e ×[0, 1] to A×[0, 1]∪ X ×{0, 1} b b × [0, 1], and H̄ can be extended to a map H̃ : X b × [0, 1] → X b yields the space X 0 b because πn (X) = 0. By construction, the map H̃ is a homotopy between λ̃ ◦ λ̃ and b Extend similarly H 0 to a homotopy H̃ 0 between λ̃ ◦ λ̃0 and the identity map of X. b the identity map of X 0 . b = A), b Finally extend ϑ to en by gluing it with λ̃ (these two maps coincide on A∩ X n extend G to e × [0, 1] by gluing it with H̃ (these two homotopies coincide on b × [0, 1] = A b × [0, 1]), and do the same for ϑ0 and G0 . Call ϑ̃, G̃, ϑ̃0 A × [0, 1] ∩ X 0 and G̃ the extended maps. By construction G̃ is a homotopy between ϑ̃0 ◦ ϑ̃ and idX , and G̃0 is a homotopy between ϑ̃ ◦ ϑ̃0 and idX 0 . To complete our induction argument we only need to prove that, for any subset F ⊆ Fi+1 closed under inclusion, the restrictions ϑ̃|YF and G̃|YF ×[0,1] have image contained in SalF (M ) and YF respectively (the analogous property for ϑ̃0 and G̃0 will hold similarly). If T 6∈ F then F ⊆ Fi , so ϑ̃|YF and G̃|YF ×[0,1] are restrictions of ϑ and G, and our claim follows by induction. So we can assume T ∈ F. If we set F 0 = F \ {T } then F 0 ⊆ Fi , so the claim holds for F 0 by induction. If en is the cell corresponding to T , then by construction the restrictions ϑ̃|en and G̃|en ×[0,1] have image contained in SalF ∗ (M ) and YF ∗ respectively, where F ∗ = {R ∈ S f | R ⊆ T }. Since F is closed under inclusion and T ∈ F, then F ∗ ⊆ F. Therefore the restrictions ϑ̃|YF and G̃|YF ×[0,1] have image contained in SalF 0 (M ) ∪ SalF ∗ (M ) = SalF (M ) and YF 0 ∪ YF ∗ = YF respectively.  In her paper [Ozo13] Ozornova found an algebraic complex that computes the homology of Artin groups through the algebraic version of discrete Morse theory, and left open the question of whether this complex is related to the complex that computes the cellular homology of the Salvetti complex. The homotopy equivalence ψ of Theorem 4.14 induces isomorphisms ψ∗ : Hk (Yk , Yk−1 ; Z) → Hk (Sal(M )k , Sal(M )k−1 ; Z) between the two cellular chain complexes, for all dimension k (here the notation Ck indicates the k-skeleton of the CW complex C). By the naturality property proved 18 GIOVANNI PAOLINI in Theorem 4.14, ψ∗ sends (up to sign) the standard generators of Hk (Yk , Yk−1 ; Z), namely the k-cells of Y , to the corresponding k-cells of Sal(M ) seen as generators of Hk (Sal(M )k , Sal(M )k−1 ; Z). Moreover, by naturality of the cellular boundary maps, the following diagram is commutative for all k: dk Hk (Yk , Yk−1 ; Z) Hk−1 (Yk−1 , Yk−2 ; Z) ψ∗ ψ∗ Hk (Sal(M )k , Sal(M )k−1 ; Z) d0k Hk−1 (Sal(M )k−1 , Sal(M )k−2 ; Z). Therefore ψ∗ is an isomorphism of algebraic complexes. In other words we have proved that Ozornova’s algebraic complex coincides with the algebraic complex which computes the cellular homology of the Salvetti complex, as it was natural to expect since these two complexes have the same rank in all dimensions. 5. Acknowledgements This note is based on the material of my master thesis, written under the supervision of Mario Salvetti. Therefore I would like to thank him for introducing me to the topic and for giving me good advice throughout my final year of master degree at the University of Pisa. References [Bou68] N. Bourbaki, Éléments de mathématique: Fasc. XXXIV. Groupes et algèbres de Lie; Chap. 4, Groupes de Coxeter et systèmes de Tits; Chap. 5; Chap. 6, Systèmes de racines, Hermann, 1968. [Bri73] E. Brieskorn, Sur les groupes de tresses [d’après VI Arnol’d], in Séminaire Bourbaki vol. 1971/72 Exposés 400–417, pages 21–44, Springer, 1973. [BS72] E. Brieskorn and K. Saito, Artin-gruppen und Coxeter-gruppen, Inventiones mathematicae 17(4), 245–271 (1972). [BW02] E. Batzies and V. Welker, Discrete Morse theory for cellular resolutions, Journal fur die Reine und Angewandte Mathematik , 147–168 (2002). [CD95] R. Charney and M. W. Davis, The K (π, 1)-problem for hyperplane complements associated to infinite reflection groups, Journal of the American Mathematical Society , 597–627 (1995). [Cha00] M. K. Chari, On discrete Morse functions and combinatorial decompositions, Discrete Mathematics 217(1), 101–113 (2000). [CMS10] F. Callegaro, D. Moroni and M. Salvetti, The K(π, 1) problem for the affine Artin group of type Bn and its cohomology, J. Eur. Math. Soc.(JEMS) 12(1), 1–22 (2010). [Del72] P. Deligne, Les immeubles des groupes de tresses généralisés, Inventiones mathematicae 17(4), 273–302 (1972). [Dob06] N. E. Dobrinskaya, Configuration spaces of labeled particles and finite Eilenberg-MacLane complexes, Proceedings of the Steklov Institute of Mathematics 252(1), 30–46 (2006). [For98] R. Forman, Morse theory for cell complexes, Advances in mathematics 134(1), 90–145 (1998). [Hat02] A. Hatcher, Algebraic topology, Cambridge University Press, 2002. [Hen85] H. Hendriks, Hyperplane complements of large type, Inventiones mathematicae 79(2), 375–381 (1985). [Mil57] J. Milnor, The geometric realization of a semi-simplicial complex, Annals of Mathematics , 357–362 (1957). [MS76] D. McDuff and G. Segal, Homology fibrations and the “group-completion” theorem, Inventiones mathematicae 31(3), 279–284 (1976). [Oko79] C. Okonek, Das K(π, 1)-Problem für die affinen Wurzelsysteme vom Typ An , Cn , Mathematische Zeitschrift 168(2), 143–148 (1979). ON THE CLASSIFYING SPACE OF ARTIN MONOIDS [Ozo13] [Par02] [Par12] [Sal87] [Sal94] [Seg73] [vdL83] 19 V. Ozornova, Discrete Morse theory and a reformulation of the K(π, 1)-conjecture, arXiv preprint arXiv:1309.1337 (2013). L. Paris, Artin monoids inject in their groups, Commentarii Mathematici Helvetici 77(3), 609–637 (2002). L. Paris, K(π, 1) conjecture for Artin groups, arXiv preprint arXiv:1211.7339 (2012). M. Salvetti, Topology of the complement of real hyperplanes in CN , Inventiones mathematicae 88(3), 603–618 (1987). M. Salvetti, The homotopy type of Artin groups, Math. Res. Lett 1(5), 565–577 (1994). G. Segal, Configuration-spaces and iterated loop-spaces, Inventiones Mathematicae 21(3), 213–221 (1973). H. van der Lek, The homotopy type of complex hyperplane complements, PhD thesis, Katholieke Universiteit te Nijmegen, 1983.
4math.GR
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 1 Traffic Sign Timely Visual Recognizability Evaluation Based on 3D Measurable Point Clouds arXiv:1710.03553v1 [cs.CV] 10 Oct 2017 Shanxin Zhang, Cheng Wang, Senior Member, IEEE, Zhuang Yang, Member, IEEE, Chenglu Wen, Member, IEEE, Jonathan Li, Senior Member, IEEE and Chenhui Yang Abstract—The timely provision of traffic sign information to drivers is essential for the drivers to respond, to ensure safe driving, and to avoid traffic accidents in a timely manner. We proposed a timely visual recognizability quantitative evaluation method for traffic signs in large-scale transportation environments. To achieve this goal, we first address the concept of a visibility field to reflect the visible distribution of threedimensional (3D) space and construct a traffic sign Visibility Evaluation Model (VEM) to measure the traffic sign’s visibility for a given viewpoint. Then, based on the VEM, we proposed the concept of the Visual Recognizability Field (VRF) to reflect the visual recognizability distribution in 3D space and established a Visual Recognizability Evaluation Model (VREM) to measure a traffic sign’s visual recognizability for a given viewpoint. Next, we proposed a Traffic Sign Timely Visual Recognizability Evaluation Model (TSTVREM) by combining VREM, the actual maximum continuous visual recognizable distance, and traffic big data to measure a traffic signs visual recognizability in different lanes. Finally, we presented an automatic algorithm to implement the TSTVREM model through traffic sign and road marking detection and classification, traffic sign environment point cloud segmentation, viewpoints calculation, and TSTVREM model realization. The performance of our method for traffic sign timely visual recognizability evaluation is tested on three road point clouds acquired by a mobile laser scanning system (RIEGL VMX-450) according to Road Traffic Signs and Markings (GB 5768-1999 in China) , showing that our method is feasible and efficient. Index Terms—Traffic sign, visibility, visibility field, visual recognizability field, recognizability, mobile laser scanning, point clouds. I. I NTRODUCTION T RAFFIC signs include a number of important traffic information, such as speed restrictions, driving behavior restrictions, changes ahead of road conditions and other information; the timely provision of this information to drivers S. Zhang is with Fujian Key Laboratory of Sensing and Computing for Smart City, School of Information Science and Engineering, Xiamen University, Xiamen 361005, China, and also with Xizang Key Laboratory of Optical Information Processing and Visualization Technology, Information Engineering College, Xizang Minzu University, Xianyang 712000, China (email: [email protected]). C. Wang , Z. Yang, C. Wen, C. Yang are with Fujian Key Laboratory of Sensing and Computing for Smart City, School of Information Science and Engineering, Xiamen University, Xiamen 361005, China (e-mail: [email protected]; [email protected]; [email protected]; [email protected]). J. Li is with the MoE Key Laboratory of Underwater Acoustic Communication and Marine Information Technology, School of Information Science and Engineering, Xiamen University, Xiamen 361005, China, and also with the Department of Geography and Environmental Management, Faculty of Environment, University of Waterloo, Waterloo, ON N2L 3G1, Canada (email: [email protected]). increases the likelihood that the drivers will respond in a timely manner, to ensure safe driving, and to avoid traffic accidents [1]–[3]. Detecting and reading a roadside on-premise sign by a driver involves a complex series of sequentially occurring events, both mental and physical. They include message detection and processing, intervals of eye and/or head movement alternating between the sign and the roadway environment, and finally, active maneuvering of the vehicle (such as lane changes, deceleration, and turning into a destination) as required in response to the stimulus provided by the sign [4]. In these complex procedures, it is of paramount importance that traffic signs be clearly visible to the driver. However, some signs are damaged by humans or nature and some signs are occluded by other objects in the traffic environment. This may lead to a sign being of low visibility or invisible, thereby decreasing its visual recognizability and increasing the probability of a traffic accident. An efficient traffic sign timely visual recognizability evaluation method is needed to judge whether a traffic signs can be recognized in the driving process. There are many facts that affect a traffic sign’s visual recognizability for a given traffic sign in a given traffic environment. We summarize these into two aspects: objective factors and subjective factors. For objective factors, a traffic sign’s size, placement, mounting height, aiming, depression angle, shape damage degree, traffic sign occlusion degree, road curve, road surface up and down, and visual continuity in the surrounding environment are the factors that affect the driver’s ability to achieve visual recognition. As is known, a reasonable and legitimate traffic sign can provide the driver with good retinal imaging to help with visual recognizability. As for the subjective factors, the driver’s vehicle speed, sight direction, and Viewer Reaction Time (VRT) [4] are the factors that affect visual recognizability. The drivers Geometric Field Of View (GFOV) decreases progressively with increasing vehicle speed [5]. The direction of the line of sight determines whether the traffic sign falls within the GFOV. Obviously, because of occlusion, the frequency of visual continuity being interrupted is also one of the factors that affects the traffic signs being recognized by drivers [6]. The sign cannot be recognized by humans when the actual maximum recognizable distance is less than the Viewer Reaction Distance (VRD) [4]. Of course, there are facts included by objective factors and subjective factors that also affect traffic signs visual recognizability and were not mentioned above. For example, the weather condition [7], light influence caused by solar elevation angle, age and sight of driver [8], and cognitive JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 (a) Object occlusion (b) Object occlusion (c) Plants occlusion (d) Tilted signs (e) Wrong angle (f) Wrong height Fig. 1: Traffic signs with low visual recognizability. burden of traffic density [9], among others. We unify these as other factors. An interface is left in the TSTVREM model regarding other factors influence to research them in the future. Although promising results have been achieved in the areas of traffic sign detection and classification [10]–[12], so far, only a few works have focused on computing the visibility of traffic signs from a given viewpoint for smart driver assistance systems or transportation facilities maintenance purposes. Of those works, most of them are based mainly on sign images and videos using computer vision methods [13]–[15]; some works research the occlusion of traffic signs based on point clouds acquired by mobile laser scanning (MLS). With the limitation of lighting conditions, and a fixed viewpoint position and view angle of getting images from cameras, there is no way to get all the information to compute a traffic sign’s visual recognizability from any position above road surface. Therefore, it is not feasible to use the image or video to calculate the visual recognizability in any position of the traffic sign. The development of MLS technology makes it possible to evaluate the traffic sign’s visual recognizability from 3D measurable point clouds. Unlike optical imaging, in addition to taking pictures, MLS can provide a complete point cloud of the entire roadway scene without limitations of lighting conditions. One can extract all of the information from a point cloud needed to compute a traffic sign’s visual recognizability. Its appearance provides a new way to research visibility and recognizability in a measurable and real traffic environment. Fig. 1 illustrates some examples of traffic signs that with low visual recognizability caused by object occlusion, plants occlusion, tilt, wrong depress angle and height, respectively. Fig. 1a and 1b are the same place from different viewpoints above the road. Of course, the height influence for traffic sign visibility is not obvious, but the influences it brings do exist. In this paper, we present an automatic traffic sign timely 2 visual recognizability evaluation model based on human visual cognition theory using 3D measurable point clouds acquired by an MLS system. We summarize our main contributions as follows: 1) We addressed the conception of a visibility field to reflect the visible distribution in a 3D space. For a viewpoint in a 3D space, we presented a VEM model based on human visual cognition theory to compute a traffic sign’s visibility. The VEM combines the principle of retinal imaging with the actual human driving situation to measure the clarity of traffic signs for a given viewpoint. 2) Comparing with the VEM, we addressed the conception of a visual recognizability field to reflect visual recognizable distribution in a 3D space. For a viewpoint in a 3D space, we established a VREM model to measure a traffic sign’s visual recognizability for a given viewpoint. 3) To evaluate a traffic sign’s visual recognizability, we propose the TSTVREM model by combining the VREM, the actual maximum continuous visual recognizable distance, and traffic big data. 4) We presented an automatic algorithm to realize the TSTVREM. It includes extracting a traffic sign point clouds, segmented surrounding point clouds in front of traffic signs on the right of roadway, and computing viewpoints according the different lanes based on extracted road marking point clouds. The pipeline of traffic sign timely visual recognizability evaluation is illustrated in Fig. 2. Firstly, we segment MLS point clouds into ground point clouds and nonground point clouds and extract the traffic sign point clouds from nonground point clouds. Secondly, we split surrounding point clouds in front of the traffic sign from nonground point clouds according to the designed visual cognition distance of the roadway. Thirdly, we extract the road marking point clouds from the ground point clouds and then get the viewpoints in different lanes. Finally, we use our algorithm to realize the TSTVREM model based on the extracted point clouds and viewpoints to get the visual usability of a traffic sign. This paper is organized as follows. A review of the previous work is given in Section II. Sections III and IV describe the definition of the TSTVREM model and its implementation, respectively. Section V shows experiments and Section VI concludes this paper. II. R ELATED W ORK With the rapid development of laser radar, especially the application of MLS systems that are able to collect accurate and reliable 3D point clouds, these point clouds provide geometric and radiometric information for infrastructure facilities. This makes it more simple and efficient for people to survey an urban or a roadway environment. Wen et al. [16] state the attributes of the MLS system and its data acquisition process. According to the main focus of this paper, we divide the related work into three categories: traffic sign detection and classification, road marking detection and classification, and visibility research. JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 3 Fig. 2: Pipeline of traffic sign timely visual recognizability evaluation. A. Traffic Sign Detection and Classification The goal of traffic sign detection and classification is to find the locations and types of traffic signs. Most of the existing traffic sign detection and classification methods are based on extracting color and shape information from images or videos. The color-based method mainly uses the color space design to segment the sign candidate area, and then uses the shape feature or the edge feature to extract the traffic sign [17], [18]. The shape-based detection methods include: shape matching [19], Hough transform [20], HOG feature and SVM classification [21], HOG feature and Convolutional Neural Networks (CNNs) [22], among others. However, the detection performance of these methods is heavily effected by weather conditions, illumination, view distance and occlusion. Recently, researchers have developed various methods to detect traffic signs in point clouds. Yang et al. [23] proposed a method to extract urban objects (include traffic signs) from MLS over-segmentations of urban scenes based on supervoxels and semantic knowledge. Lehtom et al. [24] took spin images and LDHs into account to recognize the objects (including traffic signs) in a roadway environment using a machine learning method. Wen et al. [16] presented a spatial-related traffic sign detection process for inventory purpose. Some researchers also proposed the detected method combining a 3D point cloud and 2D images for getting a good detecting performance [11], [12], [25], [26]. B. Road Marking Detection and Classification Road markings on paved roadways, as critical features in traffic management systems, have important functions in providing guidance and information to drivers and pedestrians. Guan et al. [27] proposed an algorithm to extract road markings using the point-density-dependent multi-threshold segmentation and morphological closing operation. [28], [29] mentioned a method for rapidly extracting road marking by generating 2D georeferenced images from 3D point clouds. The method of extracting road marking by converting 3D point clouds into 2D georeferenced feature images will lead to incompleteness and incorrectness in the feature extraction process, Yu et al. [30] extracted the road marking directly from the 3D point clouds relying on the reflective properties and classified them using deep learning. C. Visibility Research Doman et al. [31] proposed a visibility estimation method for traffic signs as part of nuisance-free driving safety support systems by preventing the provision of too much information to a driver. They improved their method by considering temporal environmental changes in [32] and integrated both the local and global features in a driving environment with [32] in [14]. They use different contrast ratio and distance counted by pixel numbers in different area of a image to compute visibility of traffic sign. This way is limited by the position of viewpoint and weather condition and they did not consider the traffic sign placement, occlusion, road curve, and subjective factor mentioned in Section I in their model. Katz et al. proposed a Hidden Point Removal (HPR) operator to get visible points from a given viewpoint [33], applied it for improving the visual comprehension of point sets in [34], and researched what properties should transformation the function of an HPR operator satisfy in [35]. Based on the HPR operator, traffic signs occlusion detection from a point cloud has been researched in [36]. This paper measured the occlusion by occluded distribution index and occlusion gradient index. However, other factors including occluded area proportion, the influence of driver speed on vision, road curve, number JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 4 1) Actual traffic sign visibility field and VEM model: For a traffic sign in an actual traffic environment, the visibility of each viewpoint, which has a fixed height above on the road surface of driving direction lanes in front of the traffic sign, constitutes an actual traffic sign visibility field. It is related to the orientation of traffic sign’s panel, traffic sign’s height, observation distance, road curve, road surface up and down, viewpoint position, degree of occlusion, and sight line deviation, among others. We call the influence of traffic sign’s panel orientation, traffic sign’s height, observation distance, road curve, road surface up and down, viewpoint position as geometric factor. The VEM model is constructed by geometric factor E geo , occlusion factor E occ , and sight line deviation factor E sight . The viewpoint visibility of a traffic sign E visibility can be defined as follows: E visibility = E geo ∗ E occ ∗ E sight Fig. 3: The framework of TSTVREM model. of lanes, and others have not been considered. Those factors are important for a traffic sign and influence the visibility and recognizability of the traffic sign. Beside this, the HPR operator only can detect the surface points which occluded the traffic sign, and it cannot detect all the occlusion point clouds when the occlusion point cloud is composed by many objects or plans. In the following part, we describe how to evaluate the geometric factor, occlusion factor, and sight line deviation factor, respectively. • Geometric factor evaluation In order to make the visibility calculation consistent with the human visual recognition theory. We use the principle of retinal imaging to consider the impact of geometric factor. The evaluation of geometric factor E geo is given as blow. E geo = Aview /Astandard type III. D EFINITION OF TSTVREM M ODEL The framework of TSTVREM model as shown in Fig. 3. In this paper, the phrase viewpoint visibility means the visibility of a traffic sign for a given viewpoint, and the phrase viewpoint recognizability means the recognizable degree of a traffic sign for a given viewpoint. The framework can be divided into three parts: visibility field definition and VEM model (Section 3.1), visual recognizability field definition and VREM model (Section 3.2), and traffic sign timely visual recognizability evaluation (Section 3.3). A. Definition of Visibility Field and VEM Model Visibility field definition: for a given 3D environment around a target object, the visibility of each viewpoint in 3D space around the object constitutes a visibility field. It reflects the visible distribution about a target object in 3D space. The visibility field can be divided into the actual visibility field and ideal visibility field according to an actual traffic sign set in a real road environment and its corresponding ideal traffic sign in an ideal road environment, respectively. Take a traffic sign as an example; the hemispherical visibility field for the traffic sign is shown in Fig.4; the environment with occlusion or not is the actual visibility field or ideal visibility field separately; the traffic sign is yellow in 4a; white indicates visibility 1 and black indicates visibility 0 in Fig. 4b and 4c. (1) • (2) - Aview : the retinal imaging area of the traffic sign observed from a given viewpoint. : the standard retinal imaging area of its - Astandard type corresponding ideal traffic sign for a given viewpoint, which is at the normal of ideal traffic sign panel and passes through the center of the panel and has a fixed standard distance dstandard to the panel. In order to make E geo ≤ 1, we take the standard distance dstandard less than 3 m. Because the traffic sign has disappeared in driver’s view field, there is no meaning to compute visibility of a traffic sign when the observation distance less than dstandard meter. Different types of traffic signs have different standard retinal imaging areas. Obviously, E geo is inversely proportional to the angle between the line connecting the viewpoint to the traffic sign panel center and the normal passing through the traffic sign panel center (orientation factor), observation distance, and height difference between the viewpoint and traffic sign panel center. Occlusion factor evaluation We also use the principle of retinal imaging to consider the impact of the occlusion area ratio. Apart from that, we introduce the occlusion distribution factor as [36] did. The evaluation of the occlusion degree E od is given as blow. E od = α∗ kcocc − csign k Aocc Aocc +β ∗(1− )∗ (3) Aview dmax Aview JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 (a) viewpoints 5 (b) Actual visibility field (c) Ideal visibility field Fig. 4: Hemispherical visibility field of a traffic sign. Aocc Aview : the retinal imaging occluded area ratio. Aocc is the retinal imaging area of the occluded traffic sign region for a given viewpoint. - 1 − kcocc − csign k/dmax : the occlusion distribution. kcocc − csign k is the distance between the center point of occluded traffic sign region cocc and traffic sign panel center point csign . dmax is the maximum length from csign to each vertex of the boundary polygon of the traffic sign panel. - α, β: weights. They should satisfy the condition: α+ β = 1. After adding the punishment item λ, the evaluation of the occlusion factor E occ is given as below. - E • occ =e −λ∗E od (4) In order to make sure E occ nearly to zero when E od is nearly one, λ should meet the conditions λ ≥ 6. Obviously, when the degree of occlusion E od is constant, E occ decreases as the penalty parameter λ increases; when the penalty parameter λ is constant, E occ decreases as the degree of occlusion E od increases. Therefore, Formula 4 meets our expectations that the effect on visibility decreases when the degree of occlusion increases. Sight line deviation factor evaluation For an object we see in a fixed viewpoint, it is more clear we look at it in the front view than we when look at it in an oblique view. This factor reflects how the different imaging positions on the retina may lead to different visibilities. Furthermore, a driver on the road at different drive speeds will lead to him having different GFOVs [37]. Combine with those above, the sight line deviation factor evaluation E sight is established as below.   V a < 0.5 ∗ V f  1,  a f V −0.5∗V E sight = e−η∗ 0.5∗V f , 0.5 ∗ V f ≤ V a ≤ π/2    0, V a > π/2 (5) - V : sight line deviation angle between the line of sight and the line connecting the viewpoint to csign . - V f : the actual GFOV. It depends on the actual 85th percentile speed v 85 [38] which comes from traffic big data. V f can be denoted by a function with parameter v 85 as V f = f (v 85 ). - η : It is used as punishment item when sight line deviation angle is bigger than half of the actual GFOV. To sum up all factors discussed above, For given a traffic sign and a j th viewpoint pj in the ith lane li , its visibility visibility Ei,j equals: visibility geo sight occ Ei,j = Ei,j ∗ Ei,j ∗ Ei,j = Aview i,j Astandard type ∗e −λ∗(α∗ Aocc i,j Aview i,j +β∗(1− occ kcocc −csign k )∗ Aview dmax A ) sight ∗ Ei,j (6) 2) Traffic Sign Ideal Visibility Field and VEM model: For a traffic sign in an ideal traffic environment, the visibility of each viewpoint that has a fixed height above the surface of driving direction lanes in front of the traffic sign constitutes an ideal traffic sign visibility field. An ideal traffic environment is an environment that has an ideal traffic sign installed specified in a suitable placement beside the straight horizontal roadway according to traffic design installation rules, and meets the condition that there is no other object around the roadway in addition to the traffic sign. Therefore, the VEM model in an ideal environment degenerates into the product of the geometric factors E geoI and sight line deviation factors E sightI . The formula for viewpoint visibility in an ideal traffic environment E visibilityI is shown below: i,j visibilityI sightI Ei,j = E geoI i,j ∗ Ei,j (7) - E geoIdeal : the evaluation of geometric factor in an ideal i,j traffic environment. sightIdeal - Ei,j : the evaluation of sight line deviation factor in an ideal traffic environment. a E geoI = AviewI /Astandard i,j type i,j (8) JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 : the retinal imaging area of the traffic sign - AviewI i,j observed from a given viewpoint in an ideal traffic environment. E sightI =     1, e−η∗    0, V aI < 0.5 ∗ V f I V aI −0.5∗V f I 0.5∗V f I , 0.5 ∗ V f I ≤ V aI ≤ π/2 V aI > π/2 (9) aI - V : sight line deviation angle between the line of sight and the line connected viewpoint to csign in an ideal traffic environment. - V f I : the ideal GFOV. It depend by the design speed v design of the road and V f I = f (v design ). - η : It is used as punishment item when sight line deviation angle big than half of the ideal GFOV. B. Definition of Visual Recognizability Field and VREM Model Although the VEM model uses retinal imaging area to estimate viewpoint visibility in accordance with the natural recognition process, it is still a difficult problem to determine the viewpoint recognizability only by viewpoint visibility. For example, for two viewpoints have the same visibility to the same traffic sign, the near viewpoint with occlusion, the far viewpoint without occlusion. The sign cannot be recognized from the near viewpoint, for too much effective information has been lost to occlusion, while the sign may be recognized from the far viewpoint from the blurred silhouette. In order to conquer this problem, we introduced corresponding viewpoint visibility in the ideal traffic environment as the standard to evaluate viewpoint recognizability. Beside this, the advantage of introducing ideal viewpoint visibility is that it can be used as the standard to judge whether traffic signs meet the design and installation specifications or not, and then evaluate whether the traffic sign is recognizable or not from a given viewpoint. Visual recognizability field definition: for a given 3D environment around a target object, the visual recognizability of each viewpoint in 3D space around the object constitutes a visual recognizability field. It reflects the visual recognizable distribution about an object in 3D space. In the VREM model, the viewpoint recognizability is related to the actual viewpoint visibility and the corresponding ideal viewpoint visibility, and the other factors E other mentioned in Section I. We denote the intersection point that the polyline made up by viewpoints intersects with the perpendicular line to the driving direction and passing through the traffic sign center as pintersect . Remember the intersection point which the line perpendicular to driving direction and passing traffic sign center intersects with the right road marking outline with prOutline . Remember the distance from viewpoint to pintersect along the polyline made up by viewpoints and the distance from pintersect to prOutline with dlength and dwidth respectively. The corresponding viewpoint in an ideal traffic environment has the same dlength and dwidth as the viewpoint in an actual traffic environment. 6 recognizability The visual recognizability Ei,j is given as follows: recognizability = 1{γ ∗ Ei,j visibility Ei,j visibilityI Ei,j + δ ∗ E other > σ} (10) - γ, δ : weights. γ and δ meet the condition γ + δ = 1. In this paper, we leave the research of other factors influence to cognition for the future, that is δ = 0. - σ : threshold. It is used to judge whether the traffic sign at a viewpoint is can be recognized or not. C. Traffic Sign Timely Visual Recognizability Evaluation According to the Manual on Uniform Traffic Control Devices (MUTCD in the United States) [38] or Road Traffic Signs and Markings (GB 5768-1999 in China) [39], Sight Distance (SD) is a length of road surface from the point which a driver can see traffic sign with an acceptable level of clarity to the traffic sign. SD dsightDistance is given based on a driver’s ability for visual recognition under a designed vehicle speed. We use the visual recognizability field composed by the viewpoints within SD length of forward direction area of road surface to evaluate visual recognizability of a traffic sign. The traffic sign timely visual recognizability is evaluated according to different lanes in the forward direction area of a road surface. It is not only related to the actual maximum continuous visual recognizable distance dmaxCogLength , which i the maximum continuous length of the viewpoints can be recognized along a lane, but also to the actual vehicle speed on the roadway and VRT. VRT is simply the time necessary for a driver to detect, read, and react to the message displayed on an approaching on-premise sign that lies within his or her cone of vision [4]. Once VRT is ascertained, VRD dvrd for a given sign location, or the distance which a vehicle travels during the VRT interval, can be calculated; therefore, dvrd = v 85 ∗ tvrt . The relationship between dmaxCogLength i and dvrd determines whether the traffic sign has enough time to recognize or not. The evaluation of traffic sign visual recognizability Eirecognizability is given as below. 1{condition} return 1 when condition is ture, else return 0. Eirecognizability = 1{dmaxCogLength ≥ dvrd } i = 1{dmaxCogLength ≥ v 85 ∗ tvrt } i (11) IV. TSTVREM M ODEL I MPLEMENTATION We construct an automatic algorithm to implement the TSTVREM model in point clouds acquired by an MLS system. The input is a road’s point clouds and its trajectory, the output is a visibility field, recognizability field, and traffic sign timely visual recognizability in each lane. First, we detect and classify the traffic signs and extracted road marking from the input point clouds. This step is called preliminary work. Second, we abbreviate the surrounding point clouds on the right side above the roadway in front of a traffic sign as traffic sign surrounding point clouds and segment traffic sign surrounding point clouds and road marking point clouds along the roadway according to SD for each traffic sign. This step JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 is called the segment process. Then, the viewpoints position above road surface forward direction region is computed form the segmented road marking point clouds. This step is called viewpoints computing. In the end, we use the traffic sign panel point cloud, the traffic sign surrounding point clouds, and the viewpoints together to extract information to compute traffic sign timely visual recognizability using TSTVREM model. This step is called traffic sign timely recognizability computing. The following part is to introduce these processes separately. All symbols used to describe the TSTVREM model implementation are illustrated in Fig. 5. A. Preliminary Works For input point clouds of a road, we adopt the method proposed by Wen et al. [16] for traffic sign detection and classification. The output is all a traffic sign’s panel point clouds and its type. Using the sign type and speed limit of the roadway, we can get the SD of each traffic sign dsightDistance type according to the country’s traffic signs design specifications. The extracted traffic signs’ panel point clouds combine with SD are used to segment traffic sign surrounding point clouds. We adopt the algorithm presented by Yu et al. [30] for road markings detection and classification. The extracted road markings are segmented by extracted traffic signs position and SD for every traffic signs. The type of road markings is used to distinguish road surface forward direction region and different lanes for each segmented road marking point clouds. B. Segment Process Using the traffic sign panel point clouds, we can compute the traffic sign center csign and find the nearest trajectory point ptraj to csign . The vector from csign to ptraj is denoted as hsign . From the road markings point clouds we extracted, we use the different length of clusters along the roadway direction to distinguish solid and dashed lines. Its length threshold is the smallest SD 30 meters in [39]. If the solid line is not continuous or partially missing because of the low reflectivity, we use its attribute that it approximately parallels with trajectory line to complete it. For solid lines in the right of ptraj , we sorted the distances from solid line to ptraj perpendicular to the driving direction. The solid line which has the maximum distance is the right roadside outline RrOutline . For solid lines in the left of ptraj , we sorted distance from the solid line to ptraj perpendicular to the driving direction. The solid line which has the nearest distance is the left outline RlOutline of the road surface forward direction region. The vector hsign intersects RrOutline with point prOutline . The vector hsign intersects RlOutline with point plOutline . Remember the distance from plOutline to prOutline with ddrivingW idth . If the road surface forward direction region is not detected because of road markings wear and tear or no road marking, we get RlOutline and RrOutline through left and right move the trajectory and minus the height of the MLS device for every trajectory point. The method to get plOutline and prOutline from solid lines is as follows. In the xOy plane, select the nearest point tk 7 to the traffic sign in the trajectory. The two points near the tk in trajectory are denoted by tk−1 and tk+1 . Segment the solid lines in a slice along the hsign and compute the centers of the sliced point clouds for every cluster. The plOutline and prOutline is selected by the distance and side from centers to line tk−1 to tk+1 . Using plOutline and prOutline as start points, constantly cutting pieces of road marking clusters along the trajectory by interval [27] and remember the intersection with b[] and a[] respectively, compute the center of b[] and a[] denoted as m[], until the distance accumulated in m[] is bigger than the traffic sign’s SD. Remember the point which is in the line from last point to second last point in m[], and its position at last point minus the extra length longer than SD as ptmp . The last point in b[] and a[] should be adjustment by the ratio of ptmp in line from last point to second last point in m[]. We construct two rectangles in a vertical plane to segment out the traffic sign surrounding point clouds and solid road marking point clouds. The rectangles have a horizontal edge always perpendicular to a[], and their horizontal length and vertical height of edges can change according to our will. The octree segment method is used to segment out the traffic sign environment point cloud and solid road marking point cloud along a[]. The vector from a[k] to a[k + 1] denoted as akk+1 , the horizontal unit vector perpendicular to a[] can be denoted as hkk+1 = (akk+1 × z)/kakk+1 × zk. Remember the coordinate of a[k] is a[k] = (xk , yk , zk ). The four coordinates of the rectangle used to segment out the traffic sign environment point cloud we constructed are r1 , r2 , r3 , r4 , then r1 = (xk , yk , zk + 0.3), r2 = (xk , yk , zk + 3), r3 = r2 + 2 ∗ hkk+1 , and r4 = r1 + 2 ∗ hkk+1 . We use the same method to get the rectangle for segment solid road markings. The four coordinates of the rectangle used to segment out the road marking point cloud we constructed are m1 , m2 , m3 , m4 , then m1 = (xk , yk , zk + 1), m2 = (xk , yk , zk − 1), m3 = m2 − [kplOutline − prOutline k + 0.1] ∗ hkk+1 , m4 = m1 − [kplOutline − prOutline k + 0.1] ∗ hkk+1 . C. Viewpoints Computing In order to reduce the effect of reflectivity on the extraction of traffic marks, we use solid road marking lines to calculate the number of lanes. If the lane standard width is denoted as dlane , then we get the number of lanes m = IN T (ddrivingW idth /dlane ). The actual lane width dlaneW idth is computed by formula dlaneW idth = ddrivingW idth /m. The next step is to get all the lane dividing lines between RrOutline and RlOutline . We denote the dividing lines as RLane , RLane , ..., RLane , ..., RLane 1 2 i m−1 from right to left, rOutline Lane lOutline R as R0 , R as RLane . The RLane and m 0 Lane the Rm is known and depressed by arrays a[] and b[] respectively. The unit vector a[k] to b[k] is be denoted by hab k = (b[k] − a[k])/kb[k] − a[k]k firstly. Then we get the split points in lane dividing lines. The k th point pi,k in RLane i is pi,k = pi−1,k + dlaneW idth ∗ hab k and p0,k = a[k]. When we get every lane dividing line expressed in arrays, we can use interpolation or a sampling method as above to get any point in a lane. As the method interpolation or sampling JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 (a) Actual environment 8 (b) Ideal environment Fig. 5: Illustration of TSTVREM model implementation. the TSTVREM model to compute traffic sign timely visual recognizability. Its details include: compute retinal imaging area of a point cloud for a given viewpoint, get the occlusion point cloud projected in traffic sign panel, get the angle of sight line deviation, set the ideal traffic environment. (a) Top view (b) Side view Fig. 6: Viewpoints computation result. is determined, we got a column points (maybe more column th points) along a lane. The point pcol i,j is used to denote j Lane Lane point in the column between Ri and Ri+1 . We get the viewpoint pviewpointO by plus observation height heye to the z i,j col coordinate of pi,j . The observation height is usually set to 1.2 meters above the road surface [40]. The result of calculated viewpoints is shown in Fig. 6. D. Traffic Sign Timely Visual Recognizability Computing Through those three steps above, for a traffic sign, we get a traffic sign panel point cloud, a traffic sign environment point cloud, and viewpoints along the lanes. The remaining work is how to use them to extract information as the input of 1) Retinal Imaging Area Computing: The first aspect of computing the retinal imaging area is to rotate the coordinates of point clouds to the human view. The line from the traffic sign panel point cloud center csign to the viewpoint pviewpointO is denoted as lcp . For a group of traffic sign i,j panel point clouds, a traffic sign surrounding point cloud and a viewpoint, we rotate their z-axis coordinates to the line lcp using quaternions rotation method [41], and move the origin of coordinate system to the rotated csign . Remember the coordinate transformed traffic sign panel center as csignT and csignT = (0, 0, 0). Remember the coordinate transformed pviewpointO as pviewpoint , the coordinate-transformed i,j i,j traffic sign panel point cloud and coordinate-transformed traffic sign environment point cloud are denoted as Ssign and Senvironment , respectively. Next, project the Ssign to its xOy and denote it as SsignP rojected . Then, the edges of SsignP rojected are computed by the alpha shape algorithm [42]. The parameter alpha of this algorithm is remembered dalpha . Remember the polygon composed by those edges as epolygon . At last, we can use polygon area formula to compute edge area and map the area to retinal imaging area using human retinal imaging principle [43]. The distance from the center of eye’s entrance pupil to the retina dretina is set to 17 JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 millimeters. 2) Occlusion Point Cloud Obtaining: Compute the distances from csignT to every vertex of epolygon and select out the vertex v that has the largest distance dmax . Remember the line vector from pviewpoint to csignT as g and the line vector i,j viewpoint from pi,j to v as gmax . The angle ϕ between g and max g equals ϕ = arctan(dmax /kpviewpoint − csignT k). The i,j viewpoint environment to a point pl in Senvironment vector from pi,j is labeled as gl . The symbol τl is the angle between g and the line gl and τl = g ∗ gl /(|g| ∗ |gl |). For every point in Senvironment , if τl ≤ ϕ, then compute the intersection point of gl with xOy plane, add the intersection point into point cloud Sintersection and add penvironment into occlusion point l cloud Socclusion . For every point in Sintersection , if it inside the polygon epolygon , then add it into the occluded point cloud Soccluded , else delete its corresponding point in Socclusion . The retinal imaging area of Soccluded is computed by the alpha shape algorithm and human retinal imaging principle. 3) Sight Line Deviation Computing: The sight line of a driver in point pviewpoint is the line esight defined by i,j i,j viewpoint neighboring points from pviewpoint to p . The sight i,j i,j+1 line deviation angle V angle is the angle from esight to g, and i,j sight sight angle V = (ei,j ∗ g)/(|ei,j | ∗ |g|). 4) Ideal Traffic Environment Setting: For all kinds of traffic signs included in a state traffic system, we need to build a traffic sign panel point cloud library of which each class of traffic signs contains one. We choose one traffic sign for each class from actual traffic environment point clouds to constitute the library. Coordinates of every traffic sign in the library are transformed such that their normal vector is parallel with yaxis and their center is the origin O. As the traffic sign design manual of a roadway, the height h above the road surface, depression angle φ, the angle in the direction road users are to pass ψ, road shoulder width wshoulder are specified. The coordinate system of ideal traffic environment is set as follows. According to whether the traffic sign can be detected, it is divided into two parts. If the road marking is detected. We use the origin O as prOutline , the y-axis as RrOoutline . The normal vector of the traffic sign panel nsignI is [cos φ ∗ sin ψ, cos φ ∗ cos ψ, sin φ]T . If the traffic sign in the right of roadway, the traffic sign panel center csignI equals (wshoulder , 0, h). If the traffic signs hanging above the roadway, coordinates of csign with (xsign , y sign , z sign ) and prOutline with (xrOutline , y rOutline , z rOutline ) are known, then the distance dsign between (csign and rOutline p in xOy plane is computed by formula dsign = p sign (x − xrOutline )2 + (y sign − y rOutline )2 , coordinate of signI c is (−dsign , 0, h). Rotate the corresponding traffic sign panel point cloud according to nsignI and csignI using the quaternions rotation method and coordinate translation transformation. The coordinate of the corresponding viewpoint pviewpointI of pviewpoint is (−dwidth , dlength , heye ). Among i,j i,j i,j i,j width these, di,j is the distance in xOy plane from pviewpoint i,j to RrOutline , and dlength is the accumulated distance from i,j pviewpoint to pviewpoint . i,0 i,j 9 TABLE I: Descriptions of the two mobile lidar datasets Dataset Points Length Speed limit Actual speed CABR 131681009 770.06 m 30 mph 25.0 mph LHSR 187751087 1571.747 m 40 mph 61.1 mph WPR 130862580 1956.14 m 40 mph 42.2 mph If the road marking is not detected. We see the traffic sign in the ideal place. We only change the prOutline coordinate into prOutline − wshoulder ∗ hsign , the left work is the same as the situation of detected road marking. V. E XPERIMENTS AND D ISCUSSIONS A. MLS System and Datasets A RIEGL VMX-450 MLS system is used in this study to acquire the datasets in the area within Xiamen Island. This system integrated two laser scanners, four high-resolution digital cameras, a GNSS, an IMU, and a DMI [44]. Two laser scanners are installed with X configuration pattern and rotate to emit laser beams with maximum valid range of 800 m at a measurement rate of 550,000 samples/s. The accuracy of scanned point cloud data is within 8 mm. Four cameras are installed in four corners to get high-resolution pictures of the surroundings. In order to prove the practicality of our models and algorithm both in urban roads and mountain roads, one survey including three roads were performed with the MLS to obtain the data required for this research. There are Zengcuoanbei Road (ZCABR), Longhushan Road (LHSR), and Wenping Road (WPR). The ZCABR and LHSR are urban roads, the WPR is a mountain road. The three roads information is presented in table I. The taxi travel records for the last year is extracted from the traffic big data library of Xiamen China. We use the driving speed of taxi car to estimate the actual driving speed on the road. B. Parameter Sensitivity Analysis For parameters in the geometric factor evaluation, once viewpoint, traffic sign, E occ , and E sight are ascertained, the viewpoint visibility is inversely proportional to the size of the parameter dstandard . For parameters in occlusion factor evaluation, E occ = 1 under the circumstances of no occlusion, and E occ nearly equals to 0 under the circumstances of half occlusion. The relationship among the parameters α, β, and λ in the occlusion factor evaluation part of Function 6 is shown in Fig. 7. The upper three lines are generated under an occlusion ratio of 0.01 and occlusion distribution equals 0.2. From the figure, we can see that with the increment of occlusion ratio weight, E occ decreases gradually. This is because the occlusion distribution weight is increasing as occlusion ratio weight decreases. E occ decreases with the increase in λ when other parameters ascertained and it nearly is equal to 1. Those all shown that the parameter sets do meet the demand of our model. Seemingly, to the upper three lines, the lower three lines are generated under the occlusion ratio equals 0.5 and the occlusion distribution equals 0.8, E occ nearly is equal to 0; JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 10 TABLE II: Descriptions of parameters of datasets Fig. 7: Occlusion value with different weights of occlusion ratio and punishment item. Parameters ZCABR LHSR WPR dstandard 2m 2m 2m α 0.8 0.8 0.8 β 0.2 0.2 0.2 λ 6 6 6 η 6 6 6 V f ield 90◦ 53.9◦ 72.8◦ V f ieldI 85◦ 75◦ 75◦ γ 1 1 1 δ 0 0 0 σ 0.71 0.71 0.71 dalpha 0.1 m 0.1 m 0.1 m dretina 17 mm 17 mm 17 mm heye 1.2 m 1.2 m 1.2 m dwidth 2m 2m 2m dlength 40 40 40 wshoulder 0.5 m 0.5 m 0.5 m h 2/4.75 m 2/4.75 m 2/4.75 m φ 15◦ 15◦ 15◦ ψ 22.5◦ 22.5◦ 22.5◦ 60 m SD 45 m 60 m tvrt 4s 5s 5s v 85 25.0 mph 61.1 mph 42.2 mph Fig. 8: Occlusion value with different occlusion ratio and occlusion distribution. this meets our model demand too. Fig. 8 shows that E occ decreases when the occlusion ratio increases and occlusion distribution near to the center of traffic sign under conditions α = 0.8, β = 0.2, and λ = 6. These parameters were used to test in the three datasets as Table II. The dlength in this table is the viewpoint interval along the road, its unit is the number of trajectory points. Its about 2 m when trajectory points number equals 40 at vehicle speed 40 mph. Some research [5], [37] shows that most of traffic signs fall in the GFOV equals to 55◦ can be recognized accurately in the 60 mph velocity, and most of traffic signs fall in the GFOV equals to 85◦ can be recognized accurately in the 30 mph velocities. Linear interpolation was used to calculate the GFOV at different velocities. The value of E sight is changed by the value of the sight line deviation angle under η = 6 as shown in Fig. 9. When the angle is less than the GFOV angle, E sight = 1, else the diver needs to turn his head to see the traffic sign, so E sight = 1 drastically reduced. If the angle is greater than π/2, the vehicle has passed the traffic sign, so it equals to 0. The middle values of SD for different design speeds listed in [39] are used as dsightDistance in the type experiments. In the Chinese traffic sign setting standard, SD is the same when the types change. The mounting height of the Fig. 9: Sight line deviation value with different angle road side traffic signs and the height of overhead signs are set to the middle value in the state standard [39]. VRT for vehicles traveling under 35 mph in less than three-lane environments can be estimated as 8 s; for vehicles traveling over 35 mph in a more complex four- to five-lane environment, at 10 s. Considering that the driving maneuver can be made after the sign location, the tvrt is set to 4 s and 5 s for vehicles speed 30 mph and 40 mph, respectively [4]. From an experiment of observing the 100 images with actual viewpoint visibility and ideal viewpoint visibility within the VRT time of 20 students, 16 men, and 4 women. We got the threshold σ = 0.71 that all students can recognize all images. JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 C. Calculation Result and Discuss An example of the calculated results of viewpoint visibility for a traffic sign is illustrated by Fig. 10. The yellow point cloud is a traffic sign panel. The green point cloud is the traffic sign surrounding objects and road surface point cloud. The common vertex of the blue line cluster is the viewpoint. In Fig. 10c, the closed yellow line is the traffic sign panel point cloud edges, the pink closed line in traffic sign panel is the occlusion part which is occluded by billboard. The visibility field results are saved as text, as the Fig. 11 shows. The viewpoint line is composed by column viewpoints along the road. The visual recognizability field results are saved in text, as the Fig. 12 shows. The CognitiveDouble in this figure is the ratio of actual viewpoint visibility to ideal viewpoint visibility. In a normal situation, the CognitiveDouble value is smaller than 1, but sometimes, CognitiveDouble value will be bigger than 1 because the road curve or road surface up and down may lead to the aiming, distance, and sight line from the viewpoint to the traffic sign in the actual traffic environment being better than in the ideal traffic environment. It does not matter for discriminating the recognizability of a viewpoint, if CognitiveDouble value is bigger than σ, its recognizability equals to 1, else equals to 0. Traffic sign timely visual recognizability results are shown in Fig. 13. The maxCognitiveDistance and minCognitiveDistance in this figure are dmaxCogLength and dvrd respectively. i From this figure, we can see the recognizability of the viewpoint line 3 of traffic sign 1, of which the viewpoint visibilities shown in Fig. 11 and viewpoint recognizability shown in Fig. 12 are 0. The Fig. 14 shows a graphical interface to the evaluation of traffic sign timely visual recognizability generated in our algorithm. It is a section of Wenping Road and includes the detected traffic sign (yellow) viewpoint visibility result (mesh plane with color from red to green), viewpoint recognizability result (mesh polygon with color black), occlusion point cloud (red), and some pictures have a same position with corresponding mesh in actual environment. The color of mesh planes change from red to green means that the values of viewpoint visibility change from big to small. The X symbol in a polygon means that the traffic sign cannot been recognizable in the polygon plane. The proposed traffic sign timely visual recognizability model was implemented using C++ running on an Intel (R) Core (TM) i5-4460 computer. The computing times in each processing step in every section were recorded in Table III. As seen from Table III, among traffic sign detection and classification computing time (STime), road marking detection and classification computing time (MTime) and traffic sign timely visual recognizability evaluation computing time (RTime), traffic sign detection and classification computing time is the least. Road marking detection and classification takes more computing time than traffic sign detection and classification. The computing time of TSTVREM model is related to the number of signs. The time complexity of our proposed method is fast enough to meet the demand of large- 11 scale implementation. This is benefited from the segmentation along the right road outline step, which dramatically reduces the quantity of the point cloud data to be processed. Taking the sec2 of the WPR dataset with approximately 44 million points and a length of 453.5 m of road, which have 6 traffic signs as an example. The total computing time of our proposed method took 81.339 s to evaluate traffic sign timely visual recognizability from the raw MLS point clouds. Therefore, our method is efficient capable of rapid implementation in a large-scale transportation environment. VI. C ONCLUSION This paper presented a traffic sign timely visual recognizability evaluation model for traffic sign inventory and management purpose based on human visual cognition theory and traffic big data using measurable point clouds collected by an MLS system. In the process of building the model, we considered a number of factors, such as traffic sign’s size, position, placement, mounting height, panel aiming, depression angle, shape damage, occlusion, actual vehicle speed, sight line deviation, GFOV, VRT, road curve, road surface gradient, and different lanes. The conception of a visibility field is addressed to reflect the traffic sign visibility distribution in 3D space. A visibility evaluation model is presented based human visual cognition theory to compute a traffic sign’s visibility for a given viewpoint. Comparing with the concept of a visibility field, we addressed the conception of a visual recognizability field to reflect the visual recognizable distribution in 3D surface and proposed the visual recognition evaluation model to compute a traffic sign’s visual recognizability from a given viewpoint. In order to evaluate a traffic sign timely visual recognizability in different lanes, we propose a TSTVREM model by combining the visual recognizability field with the actual maximum continuous cognitive distance and traffic big data. Finally, we constructed an automatic algorithm to implement the TSTVREM model. The algorithm includes: traffic sign and road marking point clouds extraction and classification; traffic sign surrounding point clouds segmentation; viewpoints computation in different lanes; and TSTVREM model realization. In addition, not only for traffic signs, but also for other traffic devices, the timely visual recognizability can be evaluated by our model based on the MLS point cloud. For example, the traffic light. The only different form traffic sign is that it is needed to detect the traffic light from point cloud and think of it as a plane. Our model is based on three key ideas. First, we evaluate the viewpoint visibility from the angle of human retinal imaging, GFOV changes at different driving speeds and roadway condition, and occlusion degree as other works. Second, we get the actual driving speed from traffic big data to evaluate the timely visual recognizability of the traffic sign. Third, we use the latest equipment obtained the measurable point clouds of roadway environment and use the latest point cloud processing algorithm to enable the implementation of our model. In the future, other facts may be considered for our model. For example: the light influence caused by solar elevation angle, background influence, and the cognitive burden of traffic density, among others. JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 12 (a) Top view (b) Side view (c) Occlusion area Fig. 10: Occluded point cloud obtaining result. Fig. 11: Visibility field results TABLE III: Computing time of different datasets Roads Sections Length PointsNumber STime MTime RTime TotalTime ZCABR sec1 770.06 m 131681009 101.562 s 1331.77 s 23.4443 s 1456.78 s LHSR sec1 sec2 sec3 734.051 m 593.169 m 244.527 m 91212406 69915170 26623511 34.9641 s 24.2266 s 8.99354 s 462.631 s 178.086 s 16.3995 s 11.0206 s 3.50449 s 1.11341 s 508.615 s 205.817 s 26.5064 s WPR sec1 sec2 sec3 453.526 m 632.114 m 870.5 m 44234114 51933545 34694921 15.2498 s 19.9543 s 28.8413 s 0.131961 s 54.6281 s 58.7381 s 0.00027 s 6.75658 s 5.59397 s 15.3821 s 81.339 s 93.1734 s Fig. 13: Traffic sign timely visual recognizability result Fig. 12: Visual recognizability field results from Natural Science Foundation of China (No.61371144 and No.U1605254) and Natural Science Foundation of Xizang Autonomous Region of China (No.2015ZR-14-16). ACKNOWLEDGMENT R EFERENCES We would like to thank the anonymous reviewers for their valuable comments. This work is supported by grants [1] B. Liu, Z. Wang, G. Song, and G. Wu, “Cognitive processing of traffic signs in immersive virtual reality environment: An erp study,” JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 13 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] Fig. 14: Graphical interface of traffic sign timely visual recognizability results [22] [23] Neuroscience letters, vol. 485, no. 1, pp. 43–48, 2010. [2] E. Kirmizioglu and H. Tuydes-Yaman, “Comprehensibility of traffic signs among urban drivers in turkey,” Accident Analysis & Prevention, vol. 45, pp. 131–141, 2012. [3] T. Ben-Bassat and D. Shinar, “The effect of context and drivers age on highway traffic signs comprehension,” Transportation research part F: traffic psychology and behaviour, vol. 33, pp. 117–127, 2015. [4] A. Bertucci, “Sign legibility rules of thumb,” United States Sign Counc, 2006. [5] R. R. Mourant, N. Ahmad, B. K. Jaeger, and Y. Lin, “Optic flow and geometric field of view in a driving simulator display,” Displays, vol. 28, no. 3, pp. 145–149, 2007. [6] G. Tieri, E. Tidoni, E. Pavone, and S. M. Aglioti, “Mere observation of body discontinuity affects perceived ownership and vicarious agency over a virtual hand,” Experimental brain research, vol. 233, no. 4, pp. 1247–1259, 2015. [7] R. Belaroussi and D. Gruyer, “Impact of reduced visibility from fog on traffic sign detection,” in Intelligent Vehicles Symposium Proceedings, 2014 IEEE. IEEE, 2014, pp. 1302–1306. [8] J. Rogé, T. Pébayle, E. Lambilliotte, F. Spitzenstetter, D. Giselbrecht, and A. Muzet, “Influence of age, speed and duration of monotonous driving task in traffic on the drivers useful visual field,” Vision research, vol. 44, no. 23, pp. 2737–2744, 2004. [9] M. Costa, A. Simone, V. Vignali, C. Lantieri, A. Bucchi, and G. Dondi, “Looking behavior for vertical road signs,” Transportation research part F: traffic psychology and behaviour, vol. 23, pp. 147–155, 2014. [10] Z. Zhu, D. Liang, S. Zhang, X. Huang, B. Li, and S. Hu, “Traffic- [24] [25] [26] [27] [28] [29] [30] sign detection and classification in the wild,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016, pp. 2110–2118. M. Soilán, B. Riveiro, J. Martı́nez-Sánchez, and P. Arias, “Traffic sign detection in mls acquired point clouds for geometric and image-based semantic inventory,” ISPRS Journal of Photogrammetry and Remote Sensing, vol. 114, pp. 92–101, 2016. Y. Yu, J. Li, C. Wen, H. Guan, H. Luo, and C. Wang, “Bag-ofvisual-phrases and hierarchical deep models for traffic sign detection and recognition in mobile laser scanning data,” ISPRS Journal of Photogrammetry and Remote Sensing, vol. 113, pp. 106–123, 2016. Á. González, M. Á. Garrido, D. F. Llorca, M. Gavilán, J. P. Fernández, P. F. Alcantarilla, I. Parra, F. Herranz, L. M. Bergasa, M. Á. Sotelo et al., “Automatic traffic signs and panels inspection system using computer vision,” IEEE Transactions on intelligent transportation systems, vol. 12, no. 2, pp. 485–499, 2011. K. Doman, D. Deguchi, T. Takahashi, Y. Mekada, I. Ide, H. Murase, and U. Sakai, “Estimation of traffic sign visibility considering local and global features in a driving environment,” in Intelligent Vehicles Symposium Proceedings, 2014 IEEE. IEEE, 2014, pp. 202–207. M. Khalilikhah and K. Heaslip, “Analysis of factors temporarily impacting traffic sign readability,” International Journal of Transportation Science and Technology, vol. 5, no. 2, pp. 60–67, 2016. C. Wen, J. Li, H. Luo, Y. Yu, Z. Cai, H. Wang, and C. Wang, “Spatialrelated traffic sign inspection for inventory purposes using mobile laser scanning data,” IEEE Transactions on Intelligent Transportation Systems, vol. 17, no. 1, pp. 27–37, 2016. J. Marinas, L. Salgado, J. Arróspide, and M. Nieto, “Detection and tracking of traffic signs using a recursive bayesian decision framework,” in Intelligent Transportation Systems (ITSC), 2011 14th International IEEE Conference on. IEEE, 2011, pp. 1942–1947. J. Lillo-Castellano, I. Mora-Jiménez, C. Figuera-Pozuelo, and J. L. RojoÁlvarez, “Traffic sign segmentation and classification using statistical learning methods,” Neurocomputing, vol. 153, pp. 286–299, 2015. H. Li, F. Sun, L. Liu, and L. Wang, “A novel traffic sign detection method via color segmentation and robust shape matching,” Neurocomputing, vol. 169, pp. 77–88, 2015. K.-h. Qin, H.-y. WANG, and J.-t. ZHENG, “A unified approach based on hough transform for quick detection of circles and rectangles,” Journal of Image and Graphics, vol. 1, p. 020, 2010. J. Greenhalgh and M. Mirmehdi, “Real-time detection and recognition of road traffic signs,” IEEE Transactions on Intelligent Transportation Systems, vol. 13, no. 4, pp. 1498–1506, 2012. Y. Yang, H. Luo, H. Xu, and F. Wu, “Towards real-time traffic sign detection and classification,” IEEE Transactions on Intelligent Transportation Systems, vol. 17, no. 7, pp. 2022–2031, 2016. B. Yang, Z. Dong, G. Zhao, and W. Dai, “Hierarchical extraction of urban objects from mobile laser scanning data,” ISPRS Journal of Photogrammetry and Remote Sensing, vol. 99, pp. 45–57, 2015. M. Lehtomäki, A. Jaakkola, J. Hyyppä, J. Lampinen, H. Kaartinen, A. Kukko, E. Puttonen, and H. Hyyppä, “Object classification and recognition from mobile laser scanning point clouds in a road environment,” IEEE Transactions on Geoscience and Remote Sensing, vol. 54, no. 2, pp. 1226–1239, 2016. M. Tan, B. Wang, Z. Wu, J. Wang, and G. Pan, “Weakly supervised metric learning for traffic sign recognition in a lidar-equipped vehicle,” IEEE Transactions on Intelligent Transportation Systems, vol. 17, no. 5, pp. 1415–1427, 2016. C. Ai and Y. J. Tsai, “An automated sign retroreflectivity condition evaluation methodology using mobile lidar and computer vision,” Transportation Research Part C: Emerging Technologies, vol. 63, pp. 96–113, 2016. H. Guan, J. Li, Y. Yu, C. Wang, M. Chapman, and B. Yang, “Using mobile laser scanning data for automated extraction of road markings,” ISPRS Journal of Photogrammetry and Remote Sensing, vol. 87, pp. 93–107, 2014. H. Guan, J. Li, Y. Yu, Z. Ji, and C. Wang, “Using mobile lidar data for rapidly updating road markings,” IEEE Transactions on Intelligent Transportation Systems, vol. 16, no. 5, pp. 2457–2466, 2015. M. Soilán, B. Riveiro, J. Martı́nez-Sánchez, and P. Arias, “Segmentation and classification of road markings using mls data,” ISPRS Journal of Photogrammetry and Remote Sensing, vol. 123, pp. 94–103, 2017. Y. Yu, J. Li, H. Guan, F. Jia, and C. Wang, “Learning hierarchical features for automated extraction of road markings from 3-d mobile lidar point clouds,” IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, vol. 8, no. 2, pp. 709–726, 2015. JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 [31] K. Doman, D. Deguchi, T. Takahashi, Y. Mekada, I. Ide, H. Murase, and Y. Tamatsu, “Estimation of traffic sign visibility toward smart driver assistance,” in Intelligent Vehicles Symposium (IV), 2010 IEEE. IEEE, 2010, pp. 45–50. [32] ——, “Estimation of traffic sign visibility considering temporal environmental changes for smart driver assistance,” in Intelligent Vehicles Symposium (IV), 2011 IEEE. IEEE, 2011, pp. 667–672. [33] S. Katz, A. Tal, and R. Basri, “Direct visibility of point sets,” in ACM Transactions on Graphics (TOG), vol. 26, no. 3. ACM, 2007, p. 24. [34] S. Katz and A. Tal, “Improving the visual comprehension of point sets,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2013, pp. 121–128. [35] ——, “On the visibility of point clouds,” in Proceedings of the IEEE International Conference on Computer Vision, 2015, pp. 1350–1358. [36] P. Huang, M. Cheng, Y. Chen, H. Luo, C. Wang, and J. Li, “Traffic sign occlusion detection using mobile laser scanning point clouds,” IEEE Transactions on Intelligent Transportation Systems, 2017. [37] C. D. A. Parkes, “Geometric field of view manipulations affect perceived speed in driving simulators,” 2010. [38] F. H. Adminstration, “Manual on uniform traffic control devices,” 2009. [39] J. Yang and H. Liu, “Gb 5768-1999, road traffic signs and markings,” 1999. [40] J. H. Banks, Introduction to transportation engineering. McGraw-Hill New York, 2002, vol. 21. [41] J. B. Kuipers et al., Quaternions and rotation sequences. Princeton university press Princeton, 1999, vol. 66. [42] H. Edelsbrunner, D. Kirkpatrick, and R. Seidel, “On the shape of a set of points in the plane,” IEEE Transactions on information theory, vol. 29, no. 4, pp. 551–559, 1983. [43] P. K. Kaiser, “Calculation of visual angle,” The Joy of Visual Perception: A Web Book, York University. Available from http://www. yorku. ca/eye/visangle. htm, 2007. [44] H. Guan, J. Li, Y. Yu, M. Chapman, and C. Wang, “Automated road information extraction from mobile laser scanning data,” IEEE Transactions on Intelligent Transportation Systems, vol. 16, no. 1, pp. 194–205, 2015. Shanxin Zhang received his M.E. degree in computer software and theory from Shandong University of Science and Technology, Qingdao, China, in 2010. He is an assistant Professor of Xizang Minzu University and currently a Ph.D. student in computer science and technology with the Fujian Key Laboratory of Sensing and Computing for Smart City in the School of Information Science and Engineering, Xiamen University, China. His current research interests include computer vision, machine learning, deep learning, and mobile LiDAR point clouds data processing. Cheng Wang (M’04-SM’16) received the Ph.D. degree in information communication engineering from the National University of Defense Technology, Changsha, China, in 2002. He is currently Professor and Associate. Dean of the School of Information Science and Engineering, and Executive Director of Fujian Key Laboratory of Sensing and Computing for Smart City, both at Xiamen University, China. His current research interests include remote sensing image processing, mobile LiDAR data analysis, and multi-sensor fusion. He is Chair of ISPRS WG I/6 on Multi-Sensor Integration and Fusion (2016-2020), council member of the China Society of Image and Graphics. He has coauthored more than 150 papers in referred journals and top conferences including IEEE-TGRS, PR, IEEE-TITS, AAAI, and ISPRS-JPRS. 14 Zhuang Yang received the M.Sc. degree in computational mathematics from the GuiLin University of Electronic Technology, Guilin, China in 2014. He is currently pursuing a Ph.D. degree in information and communication engineering with the Fujian Key Laboratory of Sensing and Computing for Smart Cities and the Department of Communication Engineering, School of Information Science and Engineering, Xiamen University, Xiamen, China. His current research interests include machine learning, computer vision, matrix analysis, optimization algorithm. Chenglu Wen received the Ph.D. Degree in mechanical engineering from China Agricultural University, Beijing, China, in 2009. She is currently an Assistant Professor with Fujian Key Laboratory of Sensing and Computing for Smart City, School of In- formation Science and Engineering, Xiamen University, Xiamen, China. She has coauthored more than 30 research papers published in refereed journals and proceedings. Her current research interests include machine vision, machine learning, and point cloud data processing. She is the Secretary of the ISPRS WG I/3 on Multi-Platform Multi-Sensor System Calibration (20122016). Jonathan Li (M’00-SM’11) received the Ph.D. degree in geomatics engineering from the University of Cape Town, South Africa. He is currently a Professor and head of the Mobile Sensing and Geodata Science Lab at the Department of Geography and Environmental Management, University of Waterloo, Canada. His current research interests include information extraction from LiDAR point clouds and from earth observation images. He has co-authored more than 350 publications, over 150 of which were published in refereed journals including IEEE-TGRS, IEEE-TITS, IEEE-GRSL, IEEEJSTARS, ISPRS-JPRS, IJRS, PE&RS and RSE. He is Chair of the ISPRS Working Group I/2 on LiDAR for Airborne and Spaceborne Sensing (2016-2020), Chair of the ICA Commission on Sensor-driven Mapping (2015-2019), and Associate Editor of IEEE-TITS and IEEE-JSTARS. Chenhui Yang received the Ph.D. degree in Mechanical Engineering from Zhejiang University, Zhejiang, China, in 1995. He is currently a Professor of the School of Information Science and Engineering at Xiamen University, China. He was a visiting scholar in University of Chicago/Argonne National Laboratory in 1999–2000 and in University of Southern California in 2014–2015. His research interests focus on computer vision, computer graphics, data mining, and their applications to other sciences and industries, including transportation, security, and medicine, among others.
1cs.CV
Dropping Activation Outputs with Localized First-layer Deep Network for Enhancing User Privacy and Data Security Hao Dong, Chao Wu, Zhen Wei, Yike Guo arXiv:1711.07520v1 [cs.CV] 20 Nov 2017 Department of Computing, Imperial College London {hao.dong11, chao.wu, zhen.wei11, y.guo}@imperial.ac.uk Abstract—Deep learning methods can play a crucial role in anomaly detection, prediction, and supporting decision making for applications like personal health-care, pervasive body sensing, etc. However, current architecture of deep networks suffers the privacy issue that users need to give out their data to the model (typically hosted in a server or a cluster on Cloud) for training or prediction. This problem is getting more severe for those sensitive health-care or medical data (e.g fMRI or body sensors measures like EEG signals). In addition to this, there is also a security risk of leaking these data during the data transmission from user to the model (especially when it’s through Internet). Targeting at these issues, in this paper we proposed a new architecture for deep network in which users don’t reveal their original data to the model. In our method, feed-forward propagation and data encryption are combined into one process: we migrate the first layer of deep network to users’ local devices, and apply the activation functions locally, and then use “dropping activation output” method to make the output non-invertible. The resulting approach is able to make model prediction without accessing users’ sensitive raw data. Experiment conducted in this paper showed that our approach achieves the desirable privacy protection requirement, and demonstrated several advantages over the traditional approach with encryption / decryption. I. I NTRODUCTION Deep learning, also known as deep neural networks [1], has been proved to be successful for classification and regression tasks. Once well established, deep learning models exhibited promising performance, which is desired by many real-time prediction / decision-making applications [2], like automatic speech recognition, image recognition, natural language processing, etc. For these applications, due to hardware limitations (i.e. the computation capability due to the power consumption limitation), it is very expensive to implement deep learning algorithms entirely on users’ local devices (sensors, mobiles, and even laptops). As a result, the typical approach is to collect data locally at first and then transmit the data to a remote server / cluster, and then apply the deep networks for training / prediction. However, such approach suffers an important privacy issue, especially for those sensitive data, e.g. patients clinical data (like fMRI images) and sensitive environment data (like video monitoring in public space). While these kind of data are becoming more important for big data analytics (e.g. for personalized health-care), it brings the privacy concern when sending these data directly to a remote model. For example, it would cause severe consequence if a company as a model provider with a lot of users’ health-care data like DNA, EHR, fMRI, etc. was invaded by malicious hackers. It also causes another security risk of leaking data during the transmission from user to the model (especially when it’s through Internet). It is problematic if we transfer the users’ sensitive data directly to a deep learning model hosted on the remote server. There have been some researches on conducting neural network prediction on encrypted data rather than the original data in the situation so that users / sensors won’t share them with remote servers [6], [7]. However, their approach bring in extra computation cost, and it would not be safe once the key for encryption was hacked. Targeting at this issue, we proposed a novel deep network architecture, in which users don’t need to reveal their original data to the model. Instead of the tradition approach shown in Fig 1, we split the layers between local device and the server, and migrate the first layer to local device (as shown in Fig. 2). We apply the activation functions for the first layer locally and then transfer the outputs from the first layer to the server. We then use “dropping activation output” method to make the output non-invertible, which randomly drop some outputs from activation function. In this method, feed-forward propagation and data encryption are combined into one process. We investigated both invertible and non-invertible activations and their performance in privacy protection. We proved this method can make sure the original data cannot be recovered from the transmitted data. Concretely, the main contributions of this paper are listed as follow: • We introduced a new deep network architecture that combines neural network and data encryption to solve privacy and data security problem. With privacy preserving feedforward propagation, server (model provider) can serve for user without directly accessing the user’s data. • We proved and evaluated that dropping few activation outputs can encrypt data for invertible activation function. We also evaluated that ramp function is better than rectifier in term of encryption. • We proposed privacy preserving error-back propagation, by which server can train a neural network for user without accessing user’s data. • With our method, data compression for data transmission is available when the number of neurons is less than the size of input data. The paper is organized as follows: Section II firstly introduces the new architecture of deep network and then discusses invertible and non-invertible activation functions, mainly focusing on invertible activation function to encrypt the data. We then give the details of “dropping activation output” method Figure 2 and how it works during feed-forward propagation without any additional computation. Section III provides mathematics proven and explanation for our method. Section IV presents our experiment and its result. We conclude our work in Section V. II. M ETHOD : D ROPPING ACTIVATION O UTPUTS WITH L OCALIZED F IRST- LAYER D EEP N ETWORK We firstly introduce our new architecture of localized firstlayer deep network, then we introduce the proposed encrypt methods for both invertible activation (like sigmoid) and noninvertible activation (like rectifier). The main content will focus on a method for encrypting data for invertible activation function. A. Localized First-layer Deep Network Fig. 1 illustrates the traditional deep network’s architecture, which sends the data from local device to server with encryption / decryption processes, then server uses the original data to compute the result. The general equation of a single layer can be written as a = f (x ∗ W + b) (1) where x is a row vector of original input data, W is the weight matrix, b is the row vector of biases, a is a row vector of activation outputs and f reflects the activation function such as sigmoid, hyperbolic tangent, softplus, rectifier [9], max-out [18], etc. From security aspect, the activation outputs a can be captured by the network sniffer, the weight matrix W and bias b can be acquired by hacking the software. As a result, given a, W , b and f , the input data x can be fully reconstructed by Equation (2) 1 , where W −1 is inverse matrix of W and f −1 is the inverse activation function. Therefore, encrypting the activation outputs a is desired for data privacy and security. x = (f −1 (a) − b) ∗ W −1 (2) Fig. 1. Implement feed-forward propagation in server; x is the input data, y is the output value, P (y|x) is the probability of y given x. Our new architecture decomposes layers of a neural network between local device and server, as shown in Fig. 2. The local device transfers the activation outputs of first hidden 1 If the number of activation outputs equals or greater than the number of input data X1 a1 a1 X2 a2 a2 X3 a3 a3 X4 a4 a4 P(y|x) X5 a5 a5 X6 a6 a6 Local Server Fig. 2. Spliting neuron network during feed-forward propagation. layer to the server, and server can only use the activation outputs to compute the result. We will now discuss how this architecture can enable privacy protection in both noninvertible and invertible activation functions. B. Non-invertible Activation Functions Several up-to-date activation functions are non-invertible [9], [18], for example, rectifier is commonly used in deep neural network, which is able to reach network’s best performance without any unsupervised pre-training on unlabeled data [9]. Its output is a linear function of the inputs, so the vanishing gradient problem can be reduced. The rectifier is shown on Equation (3), where z = x ∗ W + b. It sets all negative activation outputs to zero.  0 , when z < 0 a = f (z) = (3) z , otherwise Non-invertible activation functions naturally can encrypt the activation outputs in some degree. For non-invertible activation functions, the best way to reconstruct input data is to use an approximated inverse activation function fˆ−1 and the transposed weight matrix W T (instead of W −1 ), as Equation (4) describes. The mathematical explanation can be found in Section III. x̂ = (fˆ−1 (a) − b) ∗ W T (4) However, due to the linearity of rectifier, the activation outputs is highly related to the scale of feature patterns from inputs. The general features of original data can be decrypted by Equation (4). To alleviate this problem, we introduce ramp activation function, as Equation (5) shows, where z = x ∗ W + b, and v reflects a small value. Smaller v will cut more scale information, so that the activation outputs will contain lesser scale information but more information of features combination (i.e. a set of small feature identifiers). The rectifier and ramp functions will be evaluated in Section IV-A.  0 , when z < 0 a = f (z) = z , when 0 <= z < v (5)  v , when z >= v In the view of information, the non-invertible outputs will result in information loss, so the original data cannot be fully reconstructed. However, from a neural network perspective, the non-invertible function selects features, therefore, information is not lost, and its accuracy can even be improved [9]. Based on this principle, in the rectifying layer even if just one activation output is turned to zero from negative value, the original input data cannot be reconstructed completely. In practice, due to the sparse property of rectifying layer, there will be a large portion of rectifying outputs being zero - therefore, the reconstructed data will be distorted completely. Hence, data encryption and privacy are realized through non-invertible activation functions, as the input of each hidden layer cannot be reconstructed. Even if all parameters of the model are known, the original inputs still cannot be reconstructed by the server. Hence, privacy is preserved for users. Apart from the rectifier and ramp functions, other activation function such as binary step and max-out [18] are all noninvertible. C. Invertible Activation Functions â = d Different from non-invertible activation functions, reconstruction is solvable when activation function is invertible, e.g. sigmoid, hyperbolic tangent, softplus, etc. The sigmoid and inverse sigmoid is shown in Equation 6 and 7. a= 1 1 + e−(x∗W +b) method would not lead to noticeable performance decreases, as a small dropping probabilities is enough for encryption. The sparse behavior of neural network can be achieved by the methods of Dropout, Dropconnect, and Autoencoder ([10], [11], [12], [13]). In this paper, we proposed the idea of Dropping activation outputs and Dropping connections. The definitions of Dropping activation outputs and Dropping connections are different from Dropout and Dropconnect. They are applied in the feed-forward propagation, whereas Dropout and Dropconnect are applied in the error-back propagation. A figure of Dropping activation outputs and Dropping connections can be shown in Fig. 3. Dropping activation outputs during feed-forward process: For encrypting the data during feed-forward propagation process, we purposed a method called Dropping activation output. Mathematically the modified activation output â is written as (6) 1 (7) x = (−ln( − 1) − b) ∗ W −1 a Therefore, the only ways to encrypt x are modifying a, W or b. The modification will bring uncertainty to neural network. Therefore, the key is to find a modification method which does not affect the final predicting result. Due to the sparse behavior of state-of-the-art neural network, accuracy will not be affected by slightly changing activation outputs and weights. First of all, during training, the proposed method would not compromise the learning results, because both Dropout and Dropconnect are the state-of-theart way to avoid overfitting. For testing / inferencing, noninvertible activation would not affect the result at all. For invertible activation, dropping a few of activation outputs also would not harm the final result, that is because: 1) In theory point of view, Dropout training can be considered as training many sub-networks to do the same job, the result is the averaged of all sub-networks, which is one sort of ensemble learning and recently be proved as a gaussian process [11], [15]. On the other hand, reasonable uncertainty of neural network during testing would not affect the testing result if the network have uncertainty during training [15], [14], [16], [17]. 2) In experience point of view, the Dropping probability required by the method (0.5%) is quite low, compared with the Dropping probability during training (usually 20 to 50%), and would not affect the final averaged result of all subnetworks. TABLE I and II show the effect with different dropping probabilities using sigmoid function, as expect, our f (x ∗ W + b) (8) where, the element-wise multiplication (hadamard product) is denoted by , and d is a binary vector randomly, setting some activation outputs to zero. Setting an activation output to zero is equivalent to removing all connections between a neuron and all input data. We will describe more detail in Section III. Equation (2) and (4) can be used to reconstruct the data, and we found that similar with non-invertible activation, Equation (4) can better reconstruct the data. Dropping connections during feed-forward process: Another purposed method is called Dropping connections. In dropping connections, some elements of weight matrix W are set to zero. The modified weight matrix Ŵ and the modified activation output ã are written as Ŵ = W D ã = f (x ∗ Ŵ + b) (9) (10) where, D is a binary matrix with some elements are zero. However, the experiment shows that this method is not effective enough to encrypt the data. III. M ATHEMATICAL E XPLANATION If the activation is linear, we have: a=x∗W +b (11) x = (a − b) ∗ W −1 (12) We now discuss why dropping connections won’t encrypt as good as dropping activation. Figure 3 Left Figure 3 Right X1 a1 a1 X1 a1 a1 X2 a2 a2 X2 a2 a2 X3 a3 a3 X3 a3 a3 X4 a4 a4 X4 a4 a4 P(y|x) P(y|x) X5 a5 a5 X5 a5 a5 X6 a6 a6 X6 a6 a6 Server Local Server Local Fig. 3. Dropping activation output (Left) and Dropping connection (Right) during feed-forward propagation.  0 0 if ∆W = 2 0 0 0 A. Dropping connections Assume ∆W is the different between W and W̃ , i.e. ∆W = W − W̃ , replace a in Equation (12) by Equation (11), let ã represent the new a that is calculated through the changed W, then the new x̃ can be written as  0 if ∆W = 0 0 x̃ = (ã − b)W −1 = (x ∗ W = x(W D + b − b)W −1 D)W −1 (13) = x(W − ∆W )W −1 = x(I − ∆W W −1 ) Note in ∆W , only a few entries are non-zero, hence the product of ∆W W −1 is very small, which means it can be neglected. The reason behind it is the product of W W −1 is an identity matrix, which means the sum of the product of entries in row W and their corresponding entries in column W −1 is 1 when the sum position is diagonal, but the sum is 0 elsewhere. Then (I − ∆W W −1 ) approximates to an identity matrix. This means the input data is nearly the same as the dropping connection result, written as x̃ ≈ x, therefore the encrypt performance is poor. Mathematically, it corresponds to the Affine transformation with no change circumstances [28]. This result applies to any c-by-d matrix W , where c ≤ d. As ∆Wc×d is a c-by-d matrix with a few entries change, which means only a few terms are affected in the summation of d −1 −1 terms, therefore, ∆Wc×d Wc×d ≈ 0, hence Ic − ∆Wc×d Wc×d approximate to identity matrix Ic , which means x̃1×c ≈ x1×c . Give an example when W is a 3-by-5  matrix, and ∗represent 1 3 1 7 2 entries that are not zero, let W = 2 2 7 5 3 2 5 3 1 1 • When the changing entry/entries are on the same row in ∆W , then it is the same row that is non-zero in ∆W W −1 :    0 3 0 0 0 0 3 0 7 0 if ∆W = 0 0 0 0 0 or 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0   ∗ ∗ ∗ −1 → ∆W W = 0 0 0 (14) 0 0 0 •   0 0 0 or 0 0  0 0 0 → ∆W W −1 = ∗ ∗ 0 0   0 0 0 0 0 0 0 0 0 or 0 0 3 0 0 0  0 0 → ∆W W −1 = 0 0 ∗ ∗ 0 0 0 0 0 0  0 0 0 0 0 7 5 0 0 0 0 0 0 ∗ (15) 0  0 0 0 0 0 0 0 0 5 3 1 1  0 0 (16) ∗ When changing entries are at different row, then those corresponding W −1 have non-zero entries.  rows in ∆W  0 0 0 0 0 if ∆W = 0 2 0 0 0 0 0 3 0 0   0 0 0 (17) → ∆W W −1 = ∗ ∗ ∗ ∗ ∗ ∗   0 0 0 7 0 if ∆W = 0 2 0 0 0 → 0 0 3 0 0   ∗ ∗ ∗ (18) → ∆W W −1 = ∗ ∗ ∗ ∗ ∗ ∗ W −1 is the inverse of W, therefore W W −1 = I3 (i.e. −1 −1 −1 −1 −1 W11 W11 +W12 W21 +W13 W31 +W14 W41 +W15 W51 =1 −1 −1 −1 −1 −1 W11 W12 +W12 W22 +W13 W32 +W14 W42 +W15 W52 =0 −1 −1 −1 −1 −1 W11 W13 +W12 W23 +W13 W33 +W14 W43 +W15 W53 =0 −1 −1 −1 −1 −1 W21 W11 +W22 W21 +W23 W31 +W24 W41 +W25 W51 =0 −1 −1 −1 −1 −1 W21 W12 +W22 W22 +W23 W32 +W24 W42 +W25 W52 =1 −1 −1 −1 −1 −1 W21 W13 +W22 W23 +W23 W33 +W24 W43 +W25 W53 =0 −1 −1 −1 −1 −1 W31 W11 +W32 W21 +W33 W31 +W34 W41 +W35 W51 =0 −1 −1 −1 −1 −1 W31 W12 +W32 W22 +W33 W32 +W34 W42 +W35 W52 =0 −1 −1 −1 −1 −1 W31 W13 +W32 W23 +W33 W33 +W34 W43 +W35 W53 =1 IV. E XPERIMENTAL S TUDIES ). However, ∆W represents change of only a few entries in W, which means only a few terms are affected in the summation of five terms, therefore, ∆W W −1 ≈ 0, hence I3 − ∆W W −1 approximate to identity matrix I3 , which means x̃1×3 = x1×3 . We used MNIST dataset to evaluate our methods, which has a training set of 50k, a validation set of 10k and a test set of 10k. Each image is a 28 x 28 grey-scale digit, with 10 classes in total. We adopted accuracy of classification task to evaluate our model, which is a standard way of evaluating machine learning algorithms. For classification, the definition of accuracy is the percentage of correct prediction on test set. We further evaluated dropping activation outputs on CIFAR10 dataset, which is a more challenging dataset compared with MNIST and has 50k training images and 10k test images. Each image is a 32 x 32 RGB image, with 10 classes in total (airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck). B. Dropping activation outputs In Dropping activation outputs, linear activation is also used in explanation, let the modified activation output be â and its corresponding modified input data be x̂, then it can be written as x̂ = (â − b)W −1 (19) = (a − ∆a − b)W −1 = (a − b)W −1 − ∆aW −1 = x − ∆aW −1 ∆aW −1 = x(I − ) x Hence for any activation output vector a in size 1-by-d and weight matrix W that has size c-by-d, where c ≤ d. If a few entries of a change, then the modified vector x̂ can be written as a product of 1-by-c original input data x and a ∆a1×d W −1 d×c matrix (I − ), where all diagonal entries are not x1×c necessary to be 1. Then x 6≈ x̂. Therefore it won’t necessary to be no change circumstance in the Affine transformation. For example,  let a = (a 1 , a2 , a3 ), ∆a = (∆a1 , ∆a2 , ∆a3 ), w11 w12 −1 and W3×2 = w21 w22  w31 w32 Then x can be written as: −1 x = (x1 , x2 ) = aW3×2  w11 = (a1 , a2 , a3 ) w21 w31 = (a1 w11 + a2 w21 + a3 w31 , a1 w12 + a2 w22  w12 w22  w32 32 ) x̂ can be written as: −1 x̂ = (xˆ1 , xˆ2 ) = âW3×2  w11 = (a1 − ∆a1 , a2 − ∆a2 , a3 − ∆a3 ) w21 w31 Rectifier Our experimental network has three rectifying hidden layers, and each layer has 800 neurons, so the model can be represented as (784-800-800-800-10) from input layer to output layer. Dropout has been applied during training to prevent overfitting. The Dropout probability from the input layer to the first layer is 20%, and the probabilities of other layers are 40%. No weights decay were used. All neural networks were trained by using Adam gradient descent [25] with mini-batches of size 500 and 2000 of epochs. Accuracy of 98.87% was found (under the null hypothesis of the pairwise test with p = 0.05). To evaluate the rectifier, Equation (23) and (24) are used to reconstruct the approximate input data. Fig. 4 shows the original input data and the reconstructed input data from the activation outputs of first hidden layer by using Equation (23). It is clear that the reconstruction was failed. (20) Figure 4 + a w 3 A. Non-invertible Activation Functions  x̂ ≈ (a − b) ∗ W −1 (23) x̂ ≈ (a − b) ∗ W T (24) (21) w12 w22  w32 = (a1 w11 − ∆a1 w11 + a2 w21 − ∆a2 w21 + a3 w31 − ∆a3 w31 , a1 w12 − ∆a1 w12 + a2 w22 − ∆a2 w22 + a3 w32 − ∆a3 w32 ) Which means (xˆ1 , xˆ2 )   = (x1 , x2 )  In 1− ∆a1 w11 +∆a2 w21 +∆a3 w31 x1 0 this case,  0  ∆a1 w12 +∆a2 w22 +∆a3 w32  1− x2 (22) ∆a1 w11 +∆a2 w21 +∆a3 w31 x1 and are unknown and there is no restriction on them, which means they can be any number, hence it is not an identity matrix. ∆a1 w12 +∆a2 w22 +∆a3 w32 x2 Fig. 4. Reconstructed input data from rectifying output by using x̂ ≈ (a−b)∗ W −1 (Right); Original input data x (Left); Activation output a = max(0, x∗ W + b). The KL Divergence between x and x̂ for digit 2 and 6 are 1.91 and 1.88. The input data can be better reconstructed by Equation (24). As the middle column of Fig. 5 demonstrated, even when the Figure 6 reconstructed data were totally distorted, the outline of original input data can still be recognized from the reconstructed data. Further encryption can be applied by transferring the activation outputs of the second hidden layer, i.e. encrypting the data twice. Right hand side of Fig. 5 shows the reconstructed input data by Equation (24), where the outline of digit cannot be recognized. However, applying more local rectifying layers will lead to higher local computation. e5 Fig. 6. Reconstructed input data from ramp activation outputs by using x̂ ≈ (a−b)∗W T (Middle and Right) and Original input data x with v = 0.2(Left); The KL Divergence between x and x̂ (v = 0.2), which are 2.35, 1.54, 1.55 for digit 1, 2, 6, is smaller than that between x and x̂ (v = 0.05), which are 2.42, 1.63, 1.62. B. Invertible Activation Functions - Dropping Activation Outputs Fig. 5. Reconstructed input data from rectifying outputs by x̂ ≈ (a−b)∗W T : Original input data x (Left); Reconstruct from outputs of first hidden layer (Middle, the KL Divergence between x and x̂ (1 st layer) are 2.32, 1.49, 1.51 for digit 1, 2, 6); Reconstruct from outputs of second hidden layer (Right, the KL Divergence between x and x̂(2nd layer) are 2.63, 1.58, 1.56 which are higher than x̂ (1st layer)). Ramp To let the activation outputs of first hidden layer contain lesser scale information, ramp activation function can be applied. The two testing networks are the same with the previous rectifier network, except for the activation function of first layer, which are ramp with v of 0.2 and 0.05 respectively. The accuracies of these two networks are both 98.87%, which are approximately the same as the previous pure rectifier neural network. According to Fig. 6, smaller v can better encrypt the input data, and the topology of input data cannot be recognized from the reconstructed data. The above experiments can be summarized as below: • • • With the purposed architecture, no matter what kind of activation function is used, without knowing the model parameters in local device, the original input data cannot be reconstructed from the activation output. Even knowing the model parameters in local device, a single rectifying layer is able to encrypt the input data. Better encryption can be done by applying more rectifying layers before transferring the activation outputs. Further encryption to the data can be done through Ramp activation function as it reduces the scale of feature pattern. For invertible activation function, the first experiment is about Dropping activation outputs. We consider a networks of 3 hidden layers of 800 units each, the activation function is sigmoid, which is invertible. All hyper-parameters and training methods are set to be the same as the previous rectifier neural network. As a few of activation outputs are set to zero, the inverse sigmoid at Equation (7) becomes insolvable, since a number can not be divided by zero. An approximate reconstruction can be achieved by Equation (25) and (4), i.e. when a is out of range, the approximate inverse number is set to zero 1 . f −1 (a) =  0 , when a ≥ 0, a ≤ 0 −ln( a1 − 1) , otherwise (25) Fig. 7 shows the reconstructed input data under dropping probabilities p of 0.5%, 1% and 2%. It is clear that the reconstructed input data were distorted, and no further distortion was found as the dropping probability increase. Therefore, dropping a few activation outputs is enough to encrypt the input data, and does not lead to noticeable performance decreases as Table. I shows. In addition, adding some noise to a few activation outputs can also lead to the same result. If we choose Equation (2) for reconstruction, the reconstructed input data will be show in Fig. 8, which is worse than Fig. 7. For CIFAR10, we used a convolutional neural network (CNN) for this task. The network architecture is as follows: 1 Expect zero, the following constants have been explored: {−10, −1, −0.5, 0, 0.5, 1, 10}, we found them all giving similar results as Fig 7 shows. TABLE I R ANDOMLY SETTING ACTIVATION OUTPUTS TO ZERO IN FIRST HIDDEN LAYER DURING FEED - FORWARD PROPAGATION OVER 100 TRAILS p Accuracy(%) Standard Derivation Max/Min Accuracy (%) 0% 0.5% 1% 2% 3% 5% 10% 98.7900 98.8026 98.8081 98.8093 98.7978 98.7721 98.6991 NA 0.000221 0.000294 0.000356 0.000373 0.000419 0.000500 NA 98.86 98.88 98.92 98.89 98.87 98.87 / / / / / / 98.74 98.73 98.73 98.69 98.65 98.57 TABLE II R ANDOMLY SETTING ACTIVATION OUTPUTS TO ZERO IN FIRST CONVOLUTIONAL LAYER DURING FEED - FORWARD PROPAGATION OVER 100 TRAILS p Accuracy(%) Standard Derivation Max/Min Accuracy (%) 0% 0.1% 0.5% 1% 2% 3% 5% 84.5640 84.5641 84.5535 84.5313 84.4696 84.4180 84.3613 NA 0.000409 0.000635 0.000787 0.001037 0.000859 0.001230 NA 84.68 84.78 84.70 84.71 84.23 84.68 / / / / / / 84.51 84.48 84.35 84.16 84.75 84.09 N64F5S1> Sigmoid> F3S2> LRN> N64F5S1> ReLU> LRN> F3S2> D384> ReLU> D192> ReLU> D10> Softmax, where N64F5S1 represents a CNN with 64 filters of size 5 and of stride 1, F3S2 represents Maxpooling with size of 3, stride of 2, and D10 represents fully-connective layer with unit of 10, LRN represents local response normalization. The model is trained by 50000 epochs with learning rate of 0.0001 and Adam gradient descent. We randomly dropped activation outputs on the 1st convolutional layer. The result can be seen in Table. II. The experiments can be summarized as follow: • • • For invertible activation function, dropping a few activation outputs during feed-forward propagation can provide data encryption and privacy. To make the function insolvable, the activation value needs to be set out of its reasonable range, for example, setting the value out of (0, 1) for sigmoid, and (−1, 1) for hyperbolic tangent. Instead of setting activation outputs out of its reasonable range, adding small noise values to few activation output can have similar impact. C. Invertible Activation Functions - Dropping Connections Randomly setting a part of weight values to zero can indirectly modify the activation outputs. However, according to our experiment by using MNIST dataset, when combining sigmoid function and dropping activation outputs during feed-forward process, encryption does not appear and the reconstructed data is almost the same with the original input data. D. Autoencoder Small number of activation output can reduce both computation and communication cost for local device. In that case, Autoencoder can be applied. Even for invertible activation function, when the number of activation outputs is smaller than the number of input data, the original input data cannot be reconstructed correctly from its activation outputs, as it uses smaller dimension to represent the original data. The input data can be approximately reconstructed by Equation (7). Fig. 9 shows the input data which is reconstructed from Autoencoder with sigmoid activation function. In this case, the number of the neuron is half of the number of input data. In other words, half of the information of original input data can be reconstructed, noting the shape of digit image can still be identified clearly. Therefore, an Autoencoder with noninvertible activation function or dropping activation output are recommended, so as to provide both data encryption and data compression. E. Privacy preserving Here we analyze the privacy preserving property of our method, by discussing how it works in bruteforce attack and honest-but-curious model. Assume we drop M neurons, as we discussed before, the computation raised exponentially, the attackers have to precompute possible activation results. Take sigmoid function as an example, as the outputs of neurons are continuous values, assume attacker pre-define N possible output values, and the algorithm drop M neurons of the outputs, the number of possible combinations is N M . In our sigmoid experiment when dropping probability is 0.5%, M is 4, if define N to 100, the number of possible combinations is 100 millions, after reconstructing 100 millions images, the attacker also need an algorithm to recognize the good image. If we used rectifier, the attacker would not know where and how many neurons are dropped by our method, which mean the number of possible combinations will become significantly larger. We illustrate this by conducting a bruteforce experiment on MNIST classifier with sigmoid function. There are 800 outputs, M is 4 (0.5%). We separated [0, 1] to 101 gaps, i.e. from 0, 0.01, 0.02 to 1. Therefore, there is 104060401 possible inputs, it takes 5083 hours to compute all possibilities on a Titan X Pascal GPU. Note that, the attacker needs an extra algorithm to select one data from 104060401 data, but as the attacker do not know the content of data, it is difficult to define the criteria. In honest-but-curious model, for invertible activation function, the intact activation outputs can be obtained if local device inputs the same data into the network for multiple times, and the dropping positions do not overlap. The probability of the dropping position do not overlap on second time with the M M first time is CN −M /CN . As M is relatively smaller than N , so the original input data has high probability to be decrypted if the data is input to the network twice. Figure 7 Figure 9 Fig. 7. Equation (25) and (4) are used to reconstruct input data from first sigmoid hidden layer after dropping activation outputs. The first column is the original input data x; the dropping probabilities increase from 0.5% to 2% from second to forth column. Note that 0.5% is only 4 neurons in the layer of 800 neurons. The KL Divergence between x and x̂(p = 0.5%) are 2.03, 1.34, 1.35 which are similar with x̂(p = 1%) (2.02, 1.35, 1.35) and x̂(p = 2%) (2.04, 1.35, 1.36). e8 Fig. 9. Reconstructed input data from sigmoid outputs by using Equation (7) (Right); Original input data x (Left). The number of neuron is the half of the number of input data. but-curious model can not work. F. Speed To verify the impact of implementing Sigmoid function on user local devices, we did a system test to measure it. We used Metal framework 1 to develop the Sigmoid function on GPU (in Swift language): Fig. 8. Reconstructed input data from first sigmoid hidden layer after drop activation outputs by using Equation (25) and (2). Original input data x (The first column); From second to third columns, the dropping probabilities increase from 0.25% to 0.5%. The KL Divergence between x and x̂(p = 0.25%) are 2.34, 1.51, 1.45, and x̂(p = 0.5%) are 2.49, 1.52, 1.46, which are higher than Fig.7 As a result, in practice, to prevent such situation, we drop the same position for the same data. We used the max value in the data as the random seed to select the dropping position. We need to mention that, for non-invertible activation function, as the activation outputs are dropped inherently, even without using dropping activation outputs, the honest- kernel void sigmoid(const device float *inVector [[ buffer(0) ]], device float *outVector [[ buffer(1) ]], uint id [[ thread_position_in_grid ]]) { outVector[id] = 1.0 / (1.0 + exp(-inVector[id])); } The device we used is iPhone 6 with iOS 10. N SDate() was used to measured the time lapse of computing the first layer activations. The input we used is a vector x where |x| = 40000 (200x200 pixels grayscale images), and we 1 https://developer.apple.com/metal/ applied Sigmoid(W ẋ + b) with W (size 40000x1000) and b (size 1000) for 1000 neurons. Below is a sample output of time lapses measured, 1300ms is calculated to be the average latency induced. D/Sigmoid(601): onActivation: begin D/Sigmoid(601): onActivation: 1311 ms D/Sigmoid(601): onActivation: end, 1311 ms V. C ONCLUSION In this paper, we proposed a new architecture for deep network, with the localized first layer of the network. We investigate how this architecture can support better privacy protection in model prediction. Invertible activation function through Dropping activation outputs during feed-forward propagation are proved to be able to encrypt the original input data and preserving privacy. The whole encryption process can be improved through combining feed-forward propagation and data encryption into one process, which means no need for a specialized data encryption process on the local device, nor data decryption process on the server. During the encryption process, both invertible and noninvertible activation functions have been discussed and mathematically proved possible to do encryption. In error-back propagation, splitting the neural network into local device and server can provide data privacy during training. In other words, the server is able to provide model learning service by using error-back propagation, without accessing the original input data from the local device. ACKNOWLEDGMENT The authors would like to thank Charles R. Johnson from William and Mary College and Xinman Ye from University of Cambridge, for their helpful comments and suggestions on the manuscript. Hao Dong is supported by the OPTIMISE Portal. R EFERENCES [1] L. Deng and D. Yu. Deep Learning: Methods and Applications. Now Publishers Inc. Jan, 2014. [2] Redmon, J., Divvala, S., Girshick, R., & Farhadi, A. [YOLO] You only look once: Unified, real-time object detection. CVPR, 2016. [3] Yuan, J., & Yu, S. Privacy Preserving Back-Propagation Neural Network Learning Made Practical with Cloud Computing. IEEE transactions on Parallel and Distributed Systems, 25(1), 212221, 2014 [4] Bonde, D. J., Akib, S., and etc. Review Techniques of Data Privacy in Cloud Using Back Propagation Neural Network. International Journal of Emerging Technology and Advanced Engineering, 4(2), 15, 2014. [5] Bansal, A., Chen, T., & Zhong, S. Privacy preserving Back-propagation neural network learning over arbitrarily partitioned data. Neural Computing and Applications, 20(1), 143150, 2010. [6] Bost, R., Popa, R., Tu, S., & Goldwasser, S. Machine learning classification over encrypted data. Crypto ePrint Archive, 2014. [7] Graepel, Thore, and etc. ML confidential: Machine learning on encrypted data. ICISC, pp. 121. Springer, 2013. [8] Khalid Sayood. Introduction to Data Compression, 4th Edition, Elsevier, 2012. [9] Glorot, X., Bordes, A., & Bengio, Y. Deep Sparse Rectifier Neural Networks. Aistats, 2011. [10] Hinton, G., and etc. Improving neural networks by preventing coadaptation of feature detectors, 2012. [11] Srivastava Nitish, Hinton, G., and etc: Dropout: A Simple Way to Prevent Neural Networks from Overfitting. JMLR, 2014. [12] Wan, L., Zeiler, M and etc, R. Regularization of neural networks using dropconnect. ICML, 2013. [13] Vincent, P., and etc. Stacked Denoising Autoencoders: Learning Useful Representations in a Deep Network with a Local Denoising Criterion. JMLR, 2010. [14] Gal, Y., & Ghahramani, Z. Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning. ICML, 2016. [15] Gal, Yarin. Uncertainty in Deep Learning. University of Cambridge. 2016. [16] Giryes, R., Sapiro, G., & Bronstein, A. M: Deep Neural Networks with Random Gaussian Weights: A Universal Classification Strategy? IEEE Transactions on Signal Processing, 64(13), 34443457. 2016. [17] Blundell, C., Cornebise, J., and etc: Weight Uncertainty in Neural Networks. ICML, 2015. [18] Goodfellow, I. J., and etc: Maxout Networks. JMLR, 2013. [19] Hochreiter, S., Hochreiter, S., and etc: Long short-term memory. Neural Computation, 9(8), 1735-80, 1997. [20] Bengio, Y: Learing Long-Term Dependencies with Gradient Descant is Difficult. IEEE Transaction on Neural Networks, 5, 1994. [21] Gers, F. a, Schraudolph, N. N., & Schmidhuber, J: Learning Precise Timing with LSTM Recurrent Networks. JMLR. 2002. [22] Greff, K., Srivastava, R. K., Koutnı́k, J., Steunebrink, B. R., & Schmidhuber, J. LSTM: A Search Space Odyssey. NIPS. 2015. [23] Chung, J., Gulcehre, C., Cho, K., & Bengio, Y. Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling. NIPS, 2014. [24] Krizhevsky, A., & Hinton, G. E. Imagenet Classification With Deep Convolutional Neural Networks. NIPS, 2012. [25] Kingma, Diederik, and Jimmy Ba. Adam: A Method for Stochastic Optimization. ICLR, 2014. [26] F. Bastien, P. Lamblin and etc. Theano: new features and speed improvements. NIPS, 2012. [27] J. Bergstra, and etc. Theano: A CPU and GPU Math Expression Compiler. Proceedings of the Python for Scientific Computing Conference (SciPy), 2010. [28] Hazewinkel, Michiel, ed. ”Affine transformation”, Encyclopedia of Mathematics, Springer, ISBN 978-1-55608-010-4, 2001
1cs.CV